Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
feat(plan): audit plan spec add/remove/update mutations (#20276)
boojack3356e2ee5045
diff --git a/backend/api/mcp/gen/openapi.yaml b/backend/api/mcp/gen/openapi.yamlindex d5c032fb7e..f7b6f060a5 100644--- a/backend/api/mcp/gen/openapi.yaml+++ b/backend/api/mcp/gen/openapi.yaml@@ -8358,6 +8358,20 @@ components:description: The roles required for approval in order.title: ApprovalFlowadditionalProperties: false+ bytebase.v1.ApprovalStatus:+ type: string+ title: ApprovalStatus+ enum:+ - APPROVAL_STATUS_UNSPECIFIED+ - CHECKING+ - PENDING+ - APPROVED+ - REJECTED+ - SKIPPED+ description: |-+ Approval workflow status for an issue or a plan.+ Lives at the top level so both plan_service.proto and issue_service.proto+ can reference it without a circular import.bytebase.v1.ApprovalTemplate:type: objectproperties:@@ -12438,7 +12452,8 @@ components:description: Labels attached to the issue for categorization and filtering.approvalStatus:title: approval_status- $ref: '#/components/schemas/bytebase.v1.Issue.ApprovalStatus'+ description: The overall approval status for the issue.+ $ref: '#/components/schemas/bytebase.v1.ApprovalStatus'accessGrant:type: stringtitle: access_grant@@ -12447,17 +12462,6 @@ components:Format: projects/{project}/accessGrants/{access_grant}title: IssueadditionalProperties: false- bytebase.v1.Issue.ApprovalStatus:- type: string- title: ApprovalStatus- enum:- - APPROVAL_STATUS_UNSPECIFIED- - CHECKING- - PENDING- - APPROVED- - REJECTED- - SKIPPED- description: The overall approval status for the issue.bytebase.v1.Issue.Approver:type: objectproperties:@@ -12539,13 +12543,13 @@ components:- issueUpdate- type: objectproperties:- planSpecUpdate:- title: plan_spec_update- description: Plan spec update event.- $ref: '#/components/schemas/bytebase.v1.IssueComment.PlanSpecUpdate'- title: plan_spec_update+ planUpdate:+ title: plan_update+ description: Plan update event.+ $ref: '#/components/schemas/bytebase.v1.IssueComment.PlanUpdate'+ title: plan_updaterequired:- - planSpecUpdate+ - planUpdatetitle: IssueCommentadditionalProperties: falsedescription: A comment on an issue.@@ -12614,34 +12618,24 @@ components:title: IssueUpdateadditionalProperties: falsedescription: Issue update event information.- bytebase.v1.IssueComment.PlanSpecUpdate:+ bytebase.v1.IssueComment.PlanUpdate:type: objectproperties:- spec:- type: string- title: spec- description: |-- The spec that was updated.- Format: projects/{project}/plans/{plan}/specs/{spec}- fromSheet:- type:- - string- - "null"- title: from_sheet- description: |-- The previous sheet.- Format: projects/{project}/sheets/{sheet}- toSheet:- type:- - string- - "null"- title: to_sheet- description: |-- The new sheet.- Format: projects/{project}/sheets/{sheet}- title: PlanSpecUpdate+ fromSpecs:+ type: array+ items:+ $ref: '#/components/schemas/bytebase.v1.Plan.Spec'+ title: from_specs+ toSpecs:+ type: array+ items:+ $ref: '#/components/schemas/bytebase.v1.Plan.Spec'+ title: to_specs+ title: PlanUpdateadditionalProperties: false- description: Plan spec update event information (tracks sheet changes to plan specs).+ description: |-+ Plan update event information (snapshot of plan.config.specs before+ and after a PlanService.UpdatePlan call that mutated specs).bytebase.v1.IssueStatus:type: stringtitle: IssueStatus@@ -14680,7 +14674,7 @@ components:description: |-The approval status of the linked issue.Unspecified when no linked issue exists.- $ref: '#/components/schemas/bytebase.v1.Issue.ApprovalStatus'+ $ref: '#/components/schemas/bytebase.v1.ApprovalStatus'rolloutStageSummaries:type: arrayitems:@@ -21579,6 +21573,18 @@ security: []tags:- name: bytebase.v1.AccessGrantServicedescription: AccessGrantService manages temporary access grants within projects.+ - name: bytebase.v1.RolloutService+ description: RolloutService manages the execution of deployment plans.+ - name: bytebase.v1.InstanceRoleService+ description: InstanceRoleService manages database roles within instances.+ - name: bytebase.v1.InstanceService+ description: InstanceService manages database instances and their connections.+ - name: bytebase.v1.DatabaseService+ description: DatabaseService manages databases and their schemas.+ - name: bytebase.v1.SQLService+ description: SQLService executes SQL queries and manages query operations.+ - name: bytebase.v1.PlanService+ description: PlanService manages deployment plans for database changes.- name: bytebase.v1.IssueServicedescription: IssueService manages issues for tracking database changes and tasks.- name: bytebase.v1.SettingService@@ -21599,24 +21605,12 @@ tags:description: DatabaseCatalogService manages database schema metadata and classification.- name: bytebase.v1.DatabaseGroupServicedescription: DatabaseGroupService manages database groups for organizing databases by criteria.- - name: bytebase.v1.InstanceRoleService- description: InstanceRoleService manages database roles within instances.- - name: bytebase.v1.InstanceService- description: InstanceService manages database instances and their connections.- - name: bytebase.v1.DatabaseService- description: DatabaseService manages databases and their schemas.- name: bytebase.v1.GroupServicedescription: GroupService manages user groups for organizing users and permissions.- name: bytebase.v1.IdentityProviderServicedescription: IdentityProviderService manages external identity providers for SSO authentication.- name: bytebase.v1.OrgPolicyServicedescription: OrgPolicyService manages organizational policies at various resource levels.- - name: bytebase.v1.RolloutService- description: RolloutService manages the execution of deployment plans.- - name: bytebase.v1.SQLService- description: SQLService executes SQL queries and manages query operations.- - name: bytebase.v1.PlanService- description: PlanService manages deployment plans for database changes.- name: bytebase.v1.ProjectServicedescription: ProjectService manages projects that group databases and changes.- name: bytebase.v1.ReleaseServicediff --git a/backend/api/v1/issue_service.go b/backend/api/v1/issue_service.goindex b90bd7bbf4..80ccc914d5 100644--- a/backend/api/v1/issue_service.go+++ b/backend/api/v1/issue_service.go@@ -4,6 +4,7 @@ import ("context""fmt""log/slog"+ "slices""strings""time"@@ -39,7 +40,7 @@ type IssueService struct {}type filterIssueMessage struct {- ApprovalStatus *v1pb.Issue_ApprovalStatus+ ApprovalStatus *v1pb.ApprovalStatus// Approver is the user who can approve the issue.Approver *store.UserMessage}@@ -130,11 +131,11 @@ func (s *IssueService) getIssueFind(case "labels":issueFind.LabelList = append(issueFind.LabelList, value.(string))case "approval_status":- approvalStatusValue, ok := v1pb.Issue_ApprovalStatus_value[value.(string)]+ approvalStatusValue, ok := v1pb.ApprovalStatus_value[value.(string)]if !ok {return "", connect.NewError(connect.CodeInvalidArgument, errors.Errorf(`invalid approval_status %q`, value))}- filterIssue.ApprovalStatus = new(v1pb.Issue_ApprovalStatus(approvalStatusValue))+ filterIssue.ApprovalStatus = new(v1pb.ApprovalStatus(approvalStatusValue))case "current_approver", "creator":user, err := s.getUserByIdentifier(ctx, value.(string))if err != nil {@@ -649,7 +650,7 @@ func (s *IssueService) ApproveIssue(ctx context.Context, req *connect.Request[v1}// Auto-create rollout if this approval completes the approval flow- if issueV1.ApprovalStatus == v1pb.Issue_APPROVED {+ if issueV1.ApprovalStatus == v1pb.ApprovalStatus_APPROVED {if issue.PlanUID != nil {s.bus.RolloutCreationChan <- bus.PlanRef{ProjectID: issue.ProjectID, PlanID: *issue.PlanUID}}@@ -995,6 +996,11 @@ func (s *IssueService) UpdateIssue(ctx context.Context, req *connect.Request[v1pif trimmed == "" {return nil, connect.NewError(connect.CodeInvalidArgument, errors.Errorf("title cannot be empty"))}+ if trimmed == issue.Title {+ // No-op update — skip both the patch and the audit comment so we+ // don't pollute the timeline with "changed name from X to X".+ continue+ }patch.Title = &trimmed@@ -1011,6 +1017,9 @@ func (s *IssueService) UpdateIssue(ctx context.Context, req *connect.Request[v1p})case "description":+ if req.Msg.Issue.Description == issue.Description {+ continue+ }patch.Description = &req.Msg.Issue.DescriptionissueCommentCreates = append(issueCommentCreates, &store.IssueCommentMessage{@@ -1026,6 +1035,9 @@ func (s *IssueService) UpdateIssue(ctx context.Context, req *connect.Request[v1p})case "labels":+ if slices.Equal(issue.Payload.Labels, req.Msg.Issue.Labels) {+ continue+ }if len(req.Msg.Issue.Labels) == 0 {patch.RemoveLabels = true} else {diff --git a/backend/api/v1/issue_service_converter.go b/backend/api/v1/issue_service_converter.goindex 3526afba21..9d7bc6d8b6 100644--- a/backend/api/v1/issue_service_converter.go+++ b/backend/api/v1/issue_service_converter.go@@ -122,16 +122,16 @@ func (*IssueService) convertToIssue(issue *store.IssueMessage) (*v1pb.Issue, errreturn issueV1, nil}-func computeApprovalStatus(approval *storepb.IssuePayloadApproval) v1pb.Issue_ApprovalStatus {+func computeApprovalStatus(approval *storepb.IssuePayloadApproval) v1pb.ApprovalStatus {// If approval finding is not done, status is checking// Note: approval.GetApprovalFindingDone() returns false when approval is nilif !approval.GetApprovalFindingDone() {- return v1pb.Issue_CHECKING+ return v1pb.ApprovalStatus_CHECKING}// If no approval template, approval is skipped (not required)if approval.GetApprovalTemplate() == nil {- return v1pb.Issue_SKIPPED+ return v1pb.ApprovalStatus_SKIPPED}approvalTemplate := approval.GetApprovalTemplate()@@ -140,14 +140,14 @@ func computeApprovalStatus(approval *storepb.IssuePayloadApproval) v1pb.Issue_Ap// If no approvers are assigned yet, it's pendingif len(approvers) == 0 {- return v1pb.Issue_PENDING+ return v1pb.ApprovalStatus_PENDING}// Check approver statusesfor _, approver := range approvers {if approver.GetStatus() == storepb.IssuePayloadApproval_Approver_REJECTED {// Short-circuit: if any approver rejected, overall status is rejected- return v1pb.Issue_REJECTED+ return v1pb.ApprovalStatus_REJECTED}}@@ -165,12 +165,12 @@ func computeApprovalStatus(approval *storepb.IssuePayloadApproval) v1pb.Issue_Ap}}if allApproved {- return v1pb.Issue_APPROVED+ return v1pb.ApprovalStatus_APPROVED}}// Otherwise, approval is pending (more steps to complete or waiting for approvals)- return v1pb.Issue_PENDING+ return v1pb.ApprovalStatus_PENDING}func convertToIssueType(t storepb.Issue_Type) v1pb.Issue_Type {@@ -305,9 +305,9 @@ func convertToIssueComment(issueName string, ic *store.IssueCommentMessage) *v1pr.Event = convertToIssueCommentEventApproval(e)case *storepb.IssueCommentPayload_IssueUpdate_:r.Event = convertToIssueCommentEventIssueUpdate(e)- case *storepb.IssueCommentPayload_PlanSpecUpdate_:+ case *storepb.IssueCommentPayload_PlanUpdate_:projectID, _, _ := common.GetProjectIDIssueUID(issueName)- r.Event = convertToIssueCommentEventPlanSpecUpdate(projectID, e)+ r.Event = convertToIssueCommentEventPlanUpdate(projectID, e)default:}@@ -372,19 +372,11 @@ func convertToIssueCommentEventApprovalStatus(s storepb.IssuePayloadApproval_App}}-func convertToIssueCommentEventPlanSpecUpdate(projectID string, u *storepb.IssueCommentPayload_PlanSpecUpdate_) *v1pb.IssueComment_PlanSpecUpdate_ {- result := &v1pb.IssueComment_PlanSpecUpdate_{- PlanSpecUpdate: &v1pb.IssueComment_PlanSpecUpdate{- Spec: u.PlanSpecUpdate.Spec,+func convertToIssueCommentEventPlanUpdate(projectID string, u *storepb.IssueCommentPayload_PlanUpdate_) *v1pb.IssueComment_PlanUpdate_ {+ return &v1pb.IssueComment_PlanUpdate_{+ PlanUpdate: &v1pb.IssueComment_PlanUpdate{+ FromSpecs: convertToPlanSpecs(projectID, u.PlanUpdate.GetFromSpecs()),+ ToSpecs: convertToPlanSpecs(projectID, u.PlanUpdate.GetToSpecs()),},}- if fromSha256 := u.PlanSpecUpdate.GetFromSheetSha256(); fromSha256 != "" {- fromSheet := common.FormatSheet(projectID, fromSha256)- result.PlanSpecUpdate.FromSheet = &fromSheet- }- if toSha256 := u.PlanSpecUpdate.GetToSheetSha256(); toSha256 != "" {- toSheet := common.FormatSheet(projectID, toSha256)- result.PlanSpecUpdate.ToSheet = &toSheet- }- return result}diff --git a/backend/api/v1/plan_service.go b/backend/api/v1/plan_service.goindex 1e66865469..aa1795492b 100644--- a/backend/api/v1/plan_service.go+++ b/backend/api/v1/plan_service.go@@ -301,6 +301,7 @@ func (s *PlanService) UpdatePlan(ctx context.Context, request *connect.Request[vvar planCheckRunsTrigger boolvar databaseGroup *v1pb.DatabaseGroup+ var issueCommentCreates []*store.IssueCommentMessagefor _, path := range req.UpdateMask.Paths {switch path {@@ -315,8 +316,6 @@ func (s *PlanService) UpdatePlan(ctx context.Context, request *connect.Request[vcase "state":planUpdate.Deleted = new(req.Plan.State == v1pb.State_DELETED)case "specs":- // Block all spec changes if plan has a rollout (pipeline).- // Block all spec changes if plan has a rollout (pipeline).if oldPlan.Config != nil && oldPlan.Config.GetHasRollout() {return nil, connect.NewError(connect.CodeInvalidArgument, errors.Errorf("cannot update specs for plan that has a rollout"))}@@ -343,6 +342,20 @@ func (s *PlanService) UpdatePlan(ctx context.Context, request *connect.Request[vreturn nil, connect.NewError(connect.CodeInternal, errors.Errorf("failed to get issue: %v", err))}if issue != nil {+ if !planSpecsEqualSet(oldPlan.Config.GetSpecs(), allSpecs) {+ issueCommentCreates = append(issueCommentCreates, &store.IssueCommentMessage{+ ProjectID: issue.ProjectID,+ IssueUID: issue.UID,+ Payload: &storepb.IssueCommentPayload{+ Event: &storepb.IssueCommentPayload_PlanUpdate_{+ PlanUpdate: &storepb.IssueCommentPayload_PlanUpdate{+ FromSpecs: oldPlan.Config.GetSpecs(),+ ToSpecs: allSpecs,+ },+ },+ },+ })+ }// Reset approval finding statusupdatedIssue, err := s.store.UpdateIssue(ctx, issue.ProjectID, issue.UID, &store.UpdateIssueMessage{PayloadUpsert: &storepb.Issue{@@ -378,6 +391,12 @@ func (s *PlanService) UpdatePlan(ctx context.Context, request *connect.Request[vreturn nil, connect.NewError(connect.CodeInternal, errors.Errorf("failed to update plan %q: %v", req.Plan.Name, err))}+ if len(issueCommentCreates) > 0 {+ if _, err := s.store.CreateIssueComments(ctx, user.Email, issueCommentCreates...); err != nil {+ slog.Warn("failed to create plan spec audit issue comments", log.BBError(err))+ }+ }+if planCheckRunsTrigger {planCheckRun, err := getPlanCheckRunFromPlan(ctx, s.store, project, updatedPlan, databaseGroup)if err != nil {@@ -1087,6 +1106,26 @@ func convertToPlanSpecExportDataConfig(projectID string, config *storepb.PlanCon}}+// planSpecsEqualSet reports whether two spec slices have the same set of+// specs keyed by id, with each pair byte-equal under proto.Equal. Order+// is ignored — reorder-only diffs are not audited.+func planSpecsEqualSet(a, b []*storepb.PlanConfig_Spec) bool {+ if len(a) != len(b) {+ return false+ }+ byID := make(map[string]*storepb.PlanConfig_Spec, len(a))+ for _, s := range a {+ byID[s.GetId()] = s+ }+ for _, s := range b {+ other, ok := byID[s.GetId()]+ if !ok || !proto.Equal(s, other) {+ return false+ }+ }+ return true+}+func convertPlanSpecs(specs []*v1pb.Plan_Spec) []*storepb.PlanConfig_Spec {storeSpecs := make([]*storepb.PlanConfig_Spec, len(specs))for i := range specs {diff --git a/backend/api/v1/plan_service_test.go b/backend/api/v1/plan_service_test.gonew file mode 100644index 0000000000..2a27a528d1--- /dev/null+++ b/backend/api/v1/plan_service_test.go@@ -0,0 +1,96 @@+package v1++import (+ "testing"++ "github.com/stretchr/testify/assert"++ storepb "github.com/bytebase/bytebase/backend/generated-go/store"+)++func cdcSpec(id, sheet string, targets []string, priorBackup bool) *storepb.PlanConfig_Spec {+ return &storepb.PlanConfig_Spec{+ Id: id,+ Config: &storepb.PlanConfig_Spec_ChangeDatabaseConfig{+ ChangeDatabaseConfig: &storepb.PlanConfig_ChangeDatabaseConfig{+ SheetSha256: sheet,+ Targets: targets,+ EnablePriorBackup: priorBackup,+ },+ },+ }+}++func TestPlanSpecsEqualSet(t *testing.T) {+ cases := []struct {+ name string+ a, b []*storepb.PlanConfig_Spec+ want bool+ }{+ {+ name: "both nil",+ a: nil,+ b: nil,+ want: true,+ },+ {+ name: "identical single spec",+ a: []*storepb.PlanConfig_Spec{cdcSpec("s1", "sha1", []string{"db1"}, false)},+ b: []*storepb.PlanConfig_Spec{cdcSpec("s1", "sha1", []string{"db1"}, false)},+ want: true,+ },+ {+ name: "same set reordered",+ a: []*storepb.PlanConfig_Spec{+ cdcSpec("s1", "sha1", []string{"db1"}, false),+ cdcSpec("s2", "sha2", []string{"db2"}, false),+ },+ b: []*storepb.PlanConfig_Spec{+ cdcSpec("s2", "sha2", []string{"db2"}, false),+ cdcSpec("s1", "sha1", []string{"db1"}, false),+ },+ want: true,+ },+ {+ name: "added spec",+ a: []*storepb.PlanConfig_Spec{cdcSpec("s1", "sha1", []string{"db1"}, false)},+ b: []*storepb.PlanConfig_Spec{+ cdcSpec("s1", "sha1", []string{"db1"}, false),+ cdcSpec("s2", "sha2", []string{"db2"}, false),+ },+ want: false,+ },+ {+ name: "removed spec",+ a: []*storepb.PlanConfig_Spec{+ cdcSpec("s1", "sha1", []string{"db1"}, false),+ cdcSpec("s2", "sha2", []string{"db2"}, false),+ },+ b: []*storepb.PlanConfig_Spec{cdcSpec("s1", "sha1", []string{"db1"}, false)},+ want: false,+ },+ {+ name: "same id sheet differs",+ a: []*storepb.PlanConfig_Spec{cdcSpec("s1", "sha1", []string{"db1"}, false)},+ b: []*storepb.PlanConfig_Spec{cdcSpec("s1", "sha2", []string{"db1"}, false)},+ want: false,+ },+ {+ name: "same id targets differ",+ a: []*storepb.PlanConfig_Spec{cdcSpec("s1", "sha1", []string{"db1"}, false)},+ b: []*storepb.PlanConfig_Spec{cdcSpec("s1", "sha1", []string{"db1", "db2"}, false)},+ want: false,+ },+ {+ name: "same id prior_backup differs",+ a: []*storepb.PlanConfig_Spec{cdcSpec("s1", "sha1", []string{"db1"}, false)},+ b: []*storepb.PlanConfig_Spec{cdcSpec("s1", "sha1", []string{"db1"}, true)},+ want: false,+ },+ }+ for _, tc := range cases {+ t.Run(tc.name, func(t *testing.T) {+ assert.Equal(t, tc.want, planSpecsEqualSet(tc.a, tc.b))+ })+ }+}diff --git a/backend/generated-go/store/issue_comment.pb.go b/backend/generated-go/store/issue_comment.pb.goindex 24402bb1d3..8c298a9a6f 100644--- a/backend/generated-go/store/issue_comment.pb.go+++ b/backend/generated-go/store/issue_comment.pb.go@@ -28,7 +28,7 @@ type IssueCommentPayload struct {//// *IssueCommentPayload_Approval_// *IssueCommentPayload_IssueUpdate_- // *IssueCommentPayload_PlanSpecUpdate_+ // *IssueCommentPayload_PlanUpdate_Event isIssueCommentPayload_Event `protobuf_oneof:"event"`unknownFields protoimpl.UnknownFieldssizeCache protoimpl.SizeCache@@ -96,10 +96,10 @@ func (x *IssueCommentPayload) GetIssueUpdate() *IssueCommentPayload_IssueUpdatereturn nil}-func (x *IssueCommentPayload) GetPlanSpecUpdate() *IssueCommentPayload_PlanSpecUpdate {+func (x *IssueCommentPayload) GetPlanUpdate() *IssueCommentPayload_PlanUpdate {if x != nil {- if x, ok := x.Event.(*IssueCommentPayload_PlanSpecUpdate_); ok {- return x.PlanSpecUpdate+ if x, ok := x.Event.(*IssueCommentPayload_PlanUpdate_); ok {+ return x.PlanUpdate}}return nil@@ -117,15 +117,15 @@ type IssueCommentPayload_IssueUpdate_ struct {IssueUpdate *IssueCommentPayload_IssueUpdate `protobuf:"bytes,3,opt,name=issue_update,json=issueUpdate,proto3,oneof"`}-type IssueCommentPayload_PlanSpecUpdate_ struct {- PlanSpecUpdate *IssueCommentPayload_PlanSpecUpdate `protobuf:"bytes,7,opt,name=plan_spec_update,json=planSpecUpdate,proto3,oneof"`+type IssueCommentPayload_PlanUpdate_ struct {+ PlanUpdate *IssueCommentPayload_PlanUpdate `protobuf:"bytes,7,opt,name=plan_update,json=planUpdate,proto3,oneof"`}func (*IssueCommentPayload_Approval_) isIssueCommentPayload_Event() {}func (*IssueCommentPayload_IssueUpdate_) isIssueCommentPayload_Event() {}-func (*IssueCommentPayload_PlanSpecUpdate_) isIssueCommentPayload_Event() {}+func (*IssueCommentPayload_PlanUpdate_) isIssueCommentPayload_Event() {}type IssueCommentPayload_Approval struct {state protoimpl.MessageState `protogen:"open.v1"`@@ -271,34 +271,32 @@ func (x *IssueCommentPayload_IssueUpdate) GetToLabels() []string {return nil}-// Plan spec update event (tracks sheet changes to plan specs)-type IssueCommentPayload_PlanSpecUpdate struct {- state protoimpl.MessageState `protogen:"open.v1"`- // The spec that was updated- // Format: projects/{project}/plans/{plan}/specs/{spec}- Spec string `protobuf:"bytes,1,opt,name=spec,proto3" json:"spec,omitempty"`- // The SHA256 hash of the previous sheet content (hex-encoded).- FromSheetSha256 *string `protobuf:"bytes,2,opt,name=from_sheet_sha256,json=fromSheetSha256,proto3,oneof" json:"from_sheet_sha256,omitempty"`- // The SHA256 hash of the new sheet content (hex-encoded).- ToSheetSha256 *string `protobuf:"bytes,3,opt,name=to_sheet_sha256,json=toSheetSha256,proto3,oneof" json:"to_sheet_sha256,omitempty"`+// PlanUpdate carries before/after snapshots of plan.config.specs,+// emitted once per PlanService.UpdatePlan call whose specs branch+// produces a non-cosmetic diff. The renderer computes per-spec+// add/remove/update from the snapshot pair.+type IssueCommentPayload_PlanUpdate struct {+ state protoimpl.MessageState `protogen:"open.v1"`+ FromSpecs []*PlanConfig_Spec `protobuf:"bytes,1,rep,name=from_specs,json=fromSpecs,proto3" json:"from_specs,omitempty"`+ ToSpecs []*PlanConfig_Spec `protobuf:"bytes,2,rep,name=to_specs,json=toSpecs,proto3" json:"to_specs,omitempty"`unknownFields protoimpl.UnknownFieldssizeCache protoimpl.SizeCache}-func (x *IssueCommentPayload_PlanSpecUpdate) Reset() {- *x = IssueCommentPayload_PlanSpecUpdate{}+func (x *IssueCommentPayload_PlanUpdate) Reset() {+ *x = IssueCommentPayload_PlanUpdate{}mi := &file_store_issue_comment_proto_msgTypes[3]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}-func (x *IssueCommentPayload_PlanSpecUpdate) String() string {+func (x *IssueCommentPayload_PlanUpdate) String() string {return protoimpl.X.MessageStringOf(x)}-func (*IssueCommentPayload_PlanSpecUpdate) ProtoMessage() {}+func (*IssueCommentPayload_PlanUpdate) ProtoMessage() {}-func (x *IssueCommentPayload_PlanSpecUpdate) ProtoReflect() protoreflect.Message {+func (x *IssueCommentPayload_PlanUpdate) ProtoReflect() protoreflect.Message {mi := &file_store_issue_comment_proto_msgTypes[3]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))@@ -310,42 +308,36 @@ func (x *IssueCommentPayload_PlanSpecUpdate) ProtoReflect() protoreflect.Messagereturn mi.MessageOf(x)}-// Deprecated: Use IssueCommentPayload_PlanSpecUpdate.ProtoReflect.Descriptor instead.-func (*IssueCommentPayload_PlanSpecUpdate) Descriptor() ([]byte, []int) {+// Deprecated: Use IssueCommentPayload_PlanUpdate.ProtoReflect.Descriptor instead.+func (*IssueCommentPayload_PlanUpdate) Descriptor() ([]byte, []int) {return file_store_issue_comment_proto_rawDescGZIP(), []int{0, 2}}-func (x *IssueCommentPayload_PlanSpecUpdate) GetSpec() string {+func (x *IssueCommentPayload_PlanUpdate) GetFromSpecs() []*PlanConfig_Spec {if x != nil {- return x.Spec+ return x.FromSpecs}- return ""-}--func (x *IssueCommentPayload_PlanSpecUpdate) GetFromSheetSha256() string {- if x != nil && x.FromSheetSha256 != nil {- return *x.FromSheetSha256- }- return ""+ return nil}-func (x *IssueCommentPayload_PlanSpecUpdate) GetToSheetSha256() string {- if x != nil && x.ToSheetSha256 != nil {- return *x.ToSheetSha256+func (x *IssueCommentPayload_PlanUpdate) GetToSpecs() []*PlanConfig_Spec {+ if x != nil {+ return x.ToSpecs}- return ""+ return nil}var File_store_issue_comment_proto protoreflect.FileDescriptorconst file_store_issue_comment_proto_rawDesc = "" +"\n" +- "\x19store/issue_comment.proto\x12\x0ebytebase.store\x1a\x14store/approval.proto\x1a\x11store/issue.proto\"\x97\b\n" ++ "\x19store/issue_comment.proto\x12\x0ebytebase.store\x1a\x14store/approval.proto\x1a\x11store/issue.proto\x1a\x10store/plan.proto\"\xe6\a\n" +"\x13IssueCommentPayload\x12\x18\n" +"\acomment\x18\x01 \x01(\tR\acomment\x12J\n" +"\bapproval\x18\x02 \x01(\v2,.bytebase.store.IssueCommentPayload.ApprovalH\x00R\bapproval\x12T\n" +- "\fissue_update\x18\x03 \x01(\v2/.bytebase.store.IssueCommentPayload.IssueUpdateH\x00R\vissueUpdate\x12^\n" +- "\x10plan_spec_update\x18\a \x01(\v22.bytebase.store.IssueCommentPayload.PlanSpecUpdateH\x00R\x0eplanSpecUpdate\x1aX\n" ++ "\fissue_update\x18\x03 \x01(\v2/.bytebase.store.IssueCommentPayload.IssueUpdateH\x00R\vissueUpdate\x12Q\n" ++ "\vplan_update\x18\a \x01(\v2..bytebase.store.IssueCommentPayload.PlanUpdateH\x00R\n" ++ "planUpdate\x1aX\n" +"\bApproval\x12L\n" +"\x06status\x18\x01 \x01(\x0e24.bytebase.store.IssuePayloadApproval.Approver.StatusR\x06status\x1a\xd1\x03\n" +"\vIssueUpdate\x12\"\n" +@@ -366,13 +358,12 @@ const file_store_issue_comment_proto_rawDesc = "" +"\x0f_to_descriptionB\x0e\n" +"\f_from_statusB\f\n" +"\n" +- "_to_status\x1a\xac\x01\n" +- "\x0ePlanSpecUpdate\x12\x12\n" +- "\x04spec\x18\x01 \x01(\tR\x04spec\x12/\n" +- "\x11from_sheet_sha256\x18\x02 \x01(\tH\x00R\x0ffromSheetSha256\x88\x01\x01\x12+\n" +- "\x0fto_sheet_sha256\x18\x03 \x01(\tH\x01R\rtoSheetSha256\x88\x01\x01B\x14\n" +- "\x12_from_sheet_sha256B\x12\n" +- "\x10_to_sheet_sha256B\a\n" ++ "_to_status\x1a\x88\x01\n" ++ "\n" ++ "PlanUpdate\x12>\n" ++ "\n" ++ "from_specs\x18\x01 \x03(\v2\x1f.bytebase.store.PlanConfig.SpecR\tfromSpecs\x12:\n" ++ "\bto_specs\x18\x02 \x03(\v2\x1f.bytebase.store.PlanConfig.SpecR\atoSpecsB\a\n" +"\x05eventB\x94\x01\n" +"\x12com.bytebase.storeB\x11IssueCommentProtoP\x01Z\x12generated-go/store\xa2\x02\x03BSX\xaa\x02\x0eBytebase.Store\xca\x02\x0eBytebase\\Store\xe2\x02\x1aBytebase\\Store\\GPBMetadata\xea\x02\x0fBytebase::Storeb\x06proto3"@@ -390,25 +381,28 @@ func file_store_issue_comment_proto_rawDescGZIP() []byte {var file_store_issue_comment_proto_msgTypes = make([]protoimpl.MessageInfo, 4)var file_store_issue_comment_proto_goTypes = []any{- (*IssueCommentPayload)(nil), // 0: bytebase.store.IssueCommentPayload- (*IssueCommentPayload_Approval)(nil), // 1: bytebase.store.IssueCommentPayload.Approval- (*IssueCommentPayload_IssueUpdate)(nil), // 2: bytebase.store.IssueCommentPayload.IssueUpdate- (*IssueCommentPayload_PlanSpecUpdate)(nil), // 3: bytebase.store.IssueCommentPayload.PlanSpecUpdate- (IssuePayloadApproval_Approver_Status)(0), // 4: bytebase.store.IssuePayloadApproval.Approver.Status- (Issue_Status)(0), // 5: bytebase.store.Issue.Status+ (*IssueCommentPayload)(nil), // 0: bytebase.store.IssueCommentPayload+ (*IssueCommentPayload_Approval)(nil), // 1: bytebase.store.IssueCommentPayload.Approval+ (*IssueCommentPayload_IssueUpdate)(nil), // 2: bytebase.store.IssueCommentPayload.IssueUpdate+ (*IssueCommentPayload_PlanUpdate)(nil), // 3: bytebase.store.IssueCommentPayload.PlanUpdate+ (IssuePayloadApproval_Approver_Status)(0), // 4: bytebase.store.IssuePayloadApproval.Approver.Status+ (Issue_Status)(0), // 5: bytebase.store.Issue.Status+ (*PlanConfig_Spec)(nil), // 6: bytebase.store.PlanConfig.Spec}var file_store_issue_comment_proto_depIdxs = []int32{1, // 0: bytebase.store.IssueCommentPayload.approval:type_name -> bytebase.store.IssueCommentPayload.Approval2, // 1: bytebase.store.IssueCommentPayload.issue_update:type_name -> bytebase.store.IssueCommentPayload.IssueUpdate- 3, // 2: bytebase.store.IssueCommentPayload.plan_spec_update:type_name -> bytebase.store.IssueCommentPayload.PlanSpecUpdate+ 3, // 2: bytebase.store.IssueCommentPayload.plan_update:type_name -> bytebase.store.IssueCommentPayload.PlanUpdate4, // 3: bytebase.store.IssueCommentPayload.Approval.status:type_name -> bytebase.store.IssuePayloadApproval.Approver.Status5, // 4: bytebase.store.IssueCommentPayload.IssueUpdate.from_status:type_name -> bytebase.store.Issue.Status5, // 5: bytebase.store.IssueCommentPayload.IssueUpdate.to_status:type_name -> bytebase.store.Issue.Status- 6, // [6:6] is the sub-list for method output_type- 6, // [6:6] is the sub-list for method input_type- 6, // [6:6] is the sub-list for extension type_name- 6, // [6:6] is the sub-list for extension extendee- 0, // [0:6] is the sub-list for field type_name+ 6, // 6: bytebase.store.IssueCommentPayload.PlanUpdate.from_specs:type_name -> bytebase.store.PlanConfig.Spec+ 6, // 7: bytebase.store.IssueCommentPayload.PlanUpdate.to_specs:type_name -> bytebase.store.PlanConfig.Spec+ 8, // [8:8] is the sub-list for method output_type+ 8, // [8:8] is the sub-list for method input_type+ 8, // [8:8] is the sub-list for extension type_name+ 8, // [8:8] is the sub-list for extension extendee+ 0, // [0:8] is the sub-list for field type_name}func init() { file_store_issue_comment_proto_init() }@@ -418,13 +412,13 @@ func file_store_issue_comment_proto_init() {}file_store_approval_proto_init()file_store_issue_proto_init()+ file_store_plan_proto_init()file_store_issue_comment_proto_msgTypes[0].OneofWrappers = []any{(*IssueCommentPayload_Approval_)(nil),(*IssueCommentPayload_IssueUpdate_)(nil),- (*IssueCommentPayload_PlanSpecUpdate_)(nil),+ (*IssueCommentPayload_PlanUpdate_)(nil),}file_store_issue_comment_proto_msgTypes[2].OneofWrappers = []any{}- file_store_issue_comment_proto_msgTypes[3].OneofWrappers = []any{}type x struct{}out := protoimpl.TypeBuilder{File: protoimpl.DescBuilder{diff --git a/backend/generated-go/store/issue_comment_equal.pb.go b/backend/generated-go/store/issue_comment_equal.pb.goindex 551566cfd2..5382872d66 100644--- a/backend/generated-go/store/issue_comment_equal.pb.go+++ b/backend/generated-go/store/issue_comment_equal.pb.go@@ -60,22 +60,29 @@ func (x *IssueCommentPayload_IssueUpdate) Equal(y *IssueCommentPayload_IssueUpdareturn true}-func (x *IssueCommentPayload_PlanSpecUpdate) Equal(y *IssueCommentPayload_PlanSpecUpdate) bool {+func (x *IssueCommentPayload_PlanUpdate) Equal(y *IssueCommentPayload_PlanUpdate) bool {if x == y {return true}if x == nil || y == nil {return x == nil && y == nil}- if x.Spec != y.Spec {+ if len(x.FromSpecs) != len(y.FromSpecs) {return false}- if p, q := x.FromSheetSha256, y.FromSheetSha256; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) {- return false+ for i := 0; i < len(x.FromSpecs); i++ {+ if !x.FromSpecs[i].Equal(y.FromSpecs[i]) {+ return false+ }}- if p, q := x.ToSheetSha256, y.ToSheetSha256; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) {+ if len(x.ToSpecs) != len(y.ToSpecs) {return false}+ for i := 0; i < len(x.ToSpecs); i++ {+ if !x.ToSpecs[i].Equal(y.ToSpecs[i]) {+ return false+ }+ }return true}@@ -95,7 +102,7 @@ func (x *IssueCommentPayload) Equal(y *IssueCommentPayload) bool {if !x.GetIssueUpdate().Equal(y.GetIssueUpdate()) {return false}- if !x.GetPlanSpecUpdate().Equal(y.GetPlanSpecUpdate()) {+ if !x.GetPlanUpdate().Equal(y.GetPlanUpdate()) {return false}return truediff --git a/backend/generated-go/v1/common.pb.go b/backend/generated-go/v1/common.pb.goindex d540d844cc..ad6bf3c096 100644--- a/backend/generated-go/v1/common.pb.go+++ b/backend/generated-go/v1/common.pb.go@@ -340,6 +340,73 @@ func (ExportFormat) EnumDescriptor() ([]byte, []int) {return file_v1_common_proto_rawDescGZIP(), []int{3}}+// Approval workflow status for an issue or a plan.+// Lives at the top level so both plan_service.proto and issue_service.proto+// can reference it without a circular import.+type ApprovalStatus int32++const (+ // Unspecified approval status.+ ApprovalStatus_APPROVAL_STATUS_UNSPECIFIED ApprovalStatus = 0+ // Approval checks are being evaluated.+ ApprovalStatus_CHECKING ApprovalStatus = 1+ // Approval is pending.+ ApprovalStatus_PENDING ApprovalStatus = 2+ // Issue has been approved.+ ApprovalStatus_APPROVED ApprovalStatus = 3+ // Issue has been rejected.+ ApprovalStatus_REJECTED ApprovalStatus = 4+ // Approval was skipped.+ ApprovalStatus_SKIPPED ApprovalStatus = 5+)++// Enum value maps for ApprovalStatus.+var (+ ApprovalStatus_name = map[int32]string{+ 0: "APPROVAL_STATUS_UNSPECIFIED",+ 1: "CHECKING",+ 2: "PENDING",+ 3: "APPROVED",+ 4: "REJECTED",+ 5: "SKIPPED",+ }+ ApprovalStatus_value = map[string]int32{+ "APPROVAL_STATUS_UNSPECIFIED": 0,+ "CHECKING": 1,+ "PENDING": 2,+ "APPROVED": 3,+ "REJECTED": 4,+ "SKIPPED": 5,+ }+)++func (x ApprovalStatus) Enum() *ApprovalStatus {+ p := new(ApprovalStatus)+ *p = x+ return p+}++func (x ApprovalStatus) String() string {+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))+}++func (ApprovalStatus) Descriptor() protoreflect.EnumDescriptor {+ return file_v1_common_proto_enumTypes[4].Descriptor()+}++func (ApprovalStatus) Type() protoreflect.EnumType {+ return &file_v1_common_proto_enumTypes[4]+}++func (x ApprovalStatus) Number() protoreflect.EnumNumber {+ return protoreflect.EnumNumber(x)+}++// Deprecated: Use ApprovalStatus.Descriptor instead.+func (ApprovalStatus) EnumDescriptor() ([]byte, []int) {+ return file_v1_common_proto_rawDescGZIP(), []int{4}+}+// RiskLevel is the risk level.type RiskLevel int32@@ -381,11 +448,11 @@ func (x RiskLevel) String() string {}func (RiskLevel) Descriptor() protoreflect.EnumDescriptor {- return file_v1_common_proto_enumTypes[4].Descriptor()+ return file_v1_common_proto_enumTypes[5].Descriptor()}func (RiskLevel) Type() protoreflect.EnumType {- return &file_v1_common_proto_enumTypes[4]+ return &file_v1_common_proto_enumTypes[5]}func (x RiskLevel) Number() protoreflect.EnumNumber {@@ -394,7 +461,7 @@ func (x RiskLevel) Number() protoreflect.EnumNumber {// Deprecated: Use RiskLevel.Descriptor instead.func (RiskLevel) EnumDescriptor() ([]byte, []int) {- return file_v1_common_proto_rawDescGZIP(), []int{4}+ return file_v1_common_proto_rawDescGZIP(), []int{5}}// Webhook integration type.@@ -458,11 +525,11 @@ func (x WebhookType) String() string {}func (WebhookType) Descriptor() protoreflect.EnumDescriptor {- return file_v1_common_proto_enumTypes[5].Descriptor()+ return file_v1_common_proto_enumTypes[6].Descriptor()}func (WebhookType) Type() protoreflect.EnumType {- return &file_v1_common_proto_enumTypes[5]+ return &file_v1_common_proto_enumTypes[6]}func (x WebhookType) Number() protoreflect.EnumNumber {@@ -471,7 +538,7 @@ func (x WebhookType) Number() protoreflect.EnumNumber {// Deprecated: Use WebhookType.Descriptor instead.func (WebhookType) EnumDescriptor() ([]byte, []int) {- return file_v1_common_proto_rawDescGZIP(), []int{5}+ return file_v1_common_proto_rawDescGZIP(), []int{6}}// StatementType represents the type of SQL statement.@@ -627,11 +694,11 @@ func (x StatementType) String() string {}func (StatementType) Descriptor() protoreflect.EnumDescriptor {- return file_v1_common_proto_enumTypes[6].Descriptor()+ return file_v1_common_proto_enumTypes[7].Descriptor()}func (StatementType) Type() protoreflect.EnumType {- return &file_v1_common_proto_enumTypes[6]+ return &file_v1_common_proto_enumTypes[7]}func (x StatementType) Number() protoreflect.EnumNumber {@@ -640,7 +707,7 @@ func (x StatementType) Number() protoreflect.EnumNumber {// Deprecated: Use StatementType.Descriptor instead.func (StatementType) EnumDescriptor() ([]byte, []int) {- return file_v1_common_proto_rawDescGZIP(), []int{6}+ return file_v1_common_proto_rawDescGZIP(), []int{7}}// Position in a text expressed as one-based line and one-based column.@@ -907,7 +974,14 @@ const file_v1_common_proto_rawDesc = "" +"\x03CSV\x10\x01\x12\b\n" +"\x04JSON\x10\x02\x12\a\n" +"\x03SQL\x10\x03\x12\b\n" +- "\x04XLSX\x10\x04*H\n" ++ "\x04XLSX\x10\x04*u\n" ++ "\x0eApprovalStatus\x12\x1f\n" ++ "\x1bAPPROVAL_STATUS_UNSPECIFIED\x10\x00\x12\f\n" ++ "\bCHECKING\x10\x01\x12\v\n" ++ "\aPENDING\x10\x02\x12\f\n" ++ "\bAPPROVED\x10\x03\x12\f\n" ++ "\bREJECTED\x10\x04\x12\v\n" ++ "\aSKIPPED\x10\x05*H\n" +"\tRiskLevel\x12\x1a\n" +"\x16RISK_LEVEL_UNSPECIFIED\x10\x00\x12\a\n" +"\x03LOW\x10\x01\x12\f\n" +@@ -990,19 +1064,20 @@ func file_v1_common_proto_rawDescGZIP() []byte {return file_v1_common_proto_rawDescData}-var file_v1_common_proto_enumTypes = make([]protoimpl.EnumInfo, 7)+var file_v1_common_proto_enumTypes = make([]protoimpl.EnumInfo, 8)var file_v1_common_proto_msgTypes = make([]protoimpl.MessageInfo, 3)var file_v1_common_proto_goTypes = []any{(State)(0), // 0: bytebase.v1.State(Engine)(0), // 1: bytebase.v1.Engine(VCSType)(0), // 2: bytebase.v1.VCSType(ExportFormat)(0), // 3: bytebase.v1.ExportFormat- (RiskLevel)(0), // 4: bytebase.v1.RiskLevel- (WebhookType)(0), // 5: bytebase.v1.WebhookType- (StatementType)(0), // 6: bytebase.v1.StatementType- (*Position)(nil), // 7: bytebase.v1.Position- (*Range)(nil), // 8: bytebase.v1.Range- (*PermissionDeniedDetail)(nil), // 9: bytebase.v1.PermissionDeniedDetail+ (ApprovalStatus)(0), // 4: bytebase.v1.ApprovalStatus+ (RiskLevel)(0), // 5: bytebase.v1.RiskLevel+ (WebhookType)(0), // 6: bytebase.v1.WebhookType+ (StatementType)(0), // 7: bytebase.v1.StatementType+ (*Position)(nil), // 8: bytebase.v1.Position+ (*Range)(nil), // 9: bytebase.v1.Range+ (*PermissionDeniedDetail)(nil), // 10: bytebase.v1.PermissionDeniedDetail}var file_v1_common_proto_depIdxs = []int32{0, // [0:0] is the sub-list for method output_type@@ -1022,7 +1097,7 @@ func file_v1_common_proto_init() {File: protoimpl.DescBuilder{GoPackagePath: reflect.TypeOf(x{}).PkgPath(),RawDescriptor: unsafe.Slice(unsafe.StringData(file_v1_common_proto_rawDesc), len(file_v1_common_proto_rawDesc)),- NumEnums: 7,+ NumEnums: 8,NumMessages: 3,NumExtensions: 0,NumServices: 0,diff --git a/backend/generated-go/v1/issue_service.pb.go b/backend/generated-go/v1/issue_service.pb.goindex a502918e73..24623e9f85 100644--- a/backend/generated-go/v1/issue_service.pb.go+++ b/backend/generated-go/v1/issue_service.pb.go@@ -145,71 +145,6 @@ func (Issue_Type) EnumDescriptor() ([]byte, []int) {return file_v1_issue_service_proto_rawDescGZIP(), []int{13, 0}}-// The overall approval status for the issue.-type Issue_ApprovalStatus int32--const (- // Unspecified approval status.- Issue_APPROVAL_STATUS_UNSPECIFIED Issue_ApprovalStatus = 0- // Approval checks are being evaluated.- Issue_CHECKING Issue_ApprovalStatus = 1- // Approval is pending.- Issue_PENDING Issue_ApprovalStatus = 2- // Issue has been approved.- Issue_APPROVED Issue_ApprovalStatus = 3- // Issue has been rejected.- Issue_REJECTED Issue_ApprovalStatus = 4- // Approval was skipped.- Issue_SKIPPED Issue_ApprovalStatus = 5-)--// Enum value maps for Issue_ApprovalStatus.-var (- Issue_ApprovalStatus_name = map[int32]string{- 0: "APPROVAL_STATUS_UNSPECIFIED",- 1: "CHECKING",- 2: "PENDING",- 3: "APPROVED",- 4: "REJECTED",- 5: "SKIPPED",- }- Issue_ApprovalStatus_value = map[string]int32{- "APPROVAL_STATUS_UNSPECIFIED": 0,- "CHECKING": 1,- "PENDING": 2,- "APPROVED": 3,- "REJECTED": 4,- "SKIPPED": 5,- }-)--func (x Issue_ApprovalStatus) Enum() *Issue_ApprovalStatus {- p := new(Issue_ApprovalStatus)- *p = x- return p-}--func (x Issue_ApprovalStatus) String() string {- return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))-}--func (Issue_ApprovalStatus) Descriptor() protoreflect.EnumDescriptor {- return file_v1_issue_service_proto_enumTypes[2].Descriptor()-}--func (Issue_ApprovalStatus) Type() protoreflect.EnumType {- return &file_v1_issue_service_proto_enumTypes[2]-}--func (x Issue_ApprovalStatus) Number() protoreflect.EnumNumber {- return protoreflect.EnumNumber(x)-}--// Deprecated: Use Issue_ApprovalStatus.Descriptor instead.-func (Issue_ApprovalStatus) EnumDescriptor() ([]byte, []int) {- return file_v1_issue_service_proto_rawDescGZIP(), []int{13, 1}-}-// The approval status of an approver.type Issue_Approver_Status int32@@ -251,11 +186,11 @@ func (x Issue_Approver_Status) String() string {}func (Issue_Approver_Status) Descriptor() protoreflect.EnumDescriptor {- return file_v1_issue_service_proto_enumTypes[3].Descriptor()+ return file_v1_issue_service_proto_enumTypes[2].Descriptor()}func (Issue_Approver_Status) Type() protoreflect.EnumType {- return &file_v1_issue_service_proto_enumTypes[3]+ return &file_v1_issue_service_proto_enumTypes[2]}func (x Issue_Approver_Status) Number() protoreflect.EnumNumber {@@ -308,11 +243,11 @@ func (x IssueComment_Approval_Status) String() string {}func (IssueComment_Approval_Status) Descriptor() protoreflect.EnumDescriptor {- return file_v1_issue_service_proto_enumTypes[4].Descriptor()+ return file_v1_issue_service_proto_enumTypes[3].Descriptor()}func (IssueComment_Approval_Status) Type() protoreflect.EnumType {- return &file_v1_issue_service_proto_enumTypes[4]+ return &file_v1_issue_service_proto_enumTypes[3]}func (x IssueComment_Approval_Status) Number() protoreflect.EnumNumber {@@ -1192,8 +1127,9 @@ type Issue struct {// The risk level of the issue.RiskLevel RiskLevel `protobuf:"varint,15,opt,name=risk_level,json=riskLevel,proto3,enum=bytebase.v1.RiskLevel" json:"risk_level,omitempty"`// Labels attached to the issue for categorization and filtering.- Labels []string `protobuf:"bytes,17,rep,name=labels,proto3" json:"labels,omitempty"`- ApprovalStatus Issue_ApprovalStatus `protobuf:"varint,18,opt,name=approval_status,json=approvalStatus,proto3,enum=bytebase.v1.Issue_ApprovalStatus" json:"approval_status,omitempty"`+ Labels []string `protobuf:"bytes,17,rep,name=labels,proto3" json:"labels,omitempty"`+ // The overall approval status for the issue.+ ApprovalStatus ApprovalStatus `protobuf:"varint,18,opt,name=approval_status,json=approvalStatus,proto3,enum=bytebase.v1.ApprovalStatus" json:"approval_status,omitempty"`// The access grant associated with this issue.// Format: projects/{project}/accessGrants/{access_grant}AccessGrant string `protobuf:"bytes,19,opt,name=access_grant,json=accessGrant,proto3" json:"access_grant,omitempty"`@@ -1329,11 +1265,11 @@ func (x *Issue) GetLabels() []string {return nil}-func (x *Issue) GetApprovalStatus() Issue_ApprovalStatus {+func (x *Issue) GetApprovalStatus() ApprovalStatus {if x != nil {return x.ApprovalStatus}- return Issue_APPROVAL_STATUS_UNSPECIFIED+ return ApprovalStatus_APPROVAL_STATUS_UNSPECIFIED}func (x *Issue) GetAccessGrant() string {@@ -1798,7 +1734,7 @@ type IssueComment struct {//// *IssueComment_Approval_// *IssueComment_IssueUpdate_- // *IssueComment_PlanSpecUpdate_+ // *IssueComment_PlanUpdate_Event isIssueComment_Event `protobuf_oneof:"event"`unknownFields protoimpl.UnknownFieldssizeCache protoimpl.SizeCache@@ -1901,10 +1837,10 @@ func (x *IssueComment) GetIssueUpdate() *IssueComment_IssueUpdate {return nil}-func (x *IssueComment) GetPlanSpecUpdate() *IssueComment_PlanSpecUpdate {+func (x *IssueComment) GetPlanUpdate() *IssueComment_PlanUpdate {if x != nil {- if x, ok := x.Event.(*IssueComment_PlanSpecUpdate_); ok {- return x.PlanSpecUpdate+ if x, ok := x.Event.(*IssueComment_PlanUpdate_); ok {+ return x.PlanUpdate}}return nil@@ -1924,16 +1860,16 @@ type IssueComment_IssueUpdate_ struct {IssueUpdate *IssueComment_IssueUpdate `protobuf:"bytes,8,opt,name=issue_update,json=issueUpdate,proto3,oneof"`}-type IssueComment_PlanSpecUpdate_ struct {- // Plan spec update event.- PlanSpecUpdate *IssueComment_PlanSpecUpdate `protobuf:"bytes,12,opt,name=plan_spec_update,json=planSpecUpdate,proto3,oneof"`+type IssueComment_PlanUpdate_ struct {+ // Plan update event.+ PlanUpdate *IssueComment_PlanUpdate `protobuf:"bytes,12,opt,name=plan_update,json=planUpdate,proto3,oneof"`}func (*IssueComment_Approval_) isIssueComment_Event() {}func (*IssueComment_IssueUpdate_) isIssueComment_Event() {}-func (*IssueComment_PlanSpecUpdate_) isIssueComment_Event() {}+func (*IssueComment_PlanUpdate_) isIssueComment_Event() {}// Approvers and their approval status for the issue.type Issue_Approver struct {@@ -2137,36 +2073,30 @@ func (x *IssueComment_IssueUpdate) GetToLabels() []string {return nil}-// Plan spec update event information (tracks sheet changes to plan specs).-type IssueComment_PlanSpecUpdate struct {- state protoimpl.MessageState `protogen:"open.v1"`- // The spec that was updated.- // Format: projects/{project}/plans/{plan}/specs/{spec}- Spec string `protobuf:"bytes,1,opt,name=spec,proto3" json:"spec,omitempty"`- // The previous sheet.- // Format: projects/{project}/sheets/{sheet}- FromSheet *string `protobuf:"bytes,2,opt,name=from_sheet,json=fromSheet,proto3,oneof" json:"from_sheet,omitempty"`- // The new sheet.- // Format: projects/{project}/sheets/{sheet}- ToSheet *string `protobuf:"bytes,3,opt,name=to_sheet,json=toSheet,proto3,oneof" json:"to_sheet,omitempty"`+// Plan update event information (snapshot of plan.config.specs before+// and after a PlanService.UpdatePlan call that mutated specs).+type IssueComment_PlanUpdate struct {+ state protoimpl.MessageState `protogen:"open.v1"`+ FromSpecs []*Plan_Spec `protobuf:"bytes,1,rep,name=from_specs,json=fromSpecs,proto3" json:"from_specs,omitempty"`+ ToSpecs []*Plan_Spec `protobuf:"bytes,2,rep,name=to_specs,json=toSpecs,proto3" json:"to_specs,omitempty"`unknownFields protoimpl.UnknownFieldssizeCache protoimpl.SizeCache}-func (x *IssueComment_PlanSpecUpdate) Reset() {- *x = IssueComment_PlanSpecUpdate{}+func (x *IssueComment_PlanUpdate) Reset() {+ *x = IssueComment_PlanUpdate{}mi := &file_v1_issue_service_proto_msgTypes[25]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}-func (x *IssueComment_PlanSpecUpdate) String() string {+func (x *IssueComment_PlanUpdate) String() string {return protoimpl.X.MessageStringOf(x)}-func (*IssueComment_PlanSpecUpdate) ProtoMessage() {}+func (*IssueComment_PlanUpdate) ProtoMessage() {}-func (x *IssueComment_PlanSpecUpdate) ProtoReflect() protoreflect.Message {+func (x *IssueComment_PlanUpdate) ProtoReflect() protoreflect.Message {mi := &file_v1_issue_service_proto_msgTypes[25]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))@@ -2178,37 +2108,30 @@ func (x *IssueComment_PlanSpecUpdate) ProtoReflect() protoreflect.Message {return mi.MessageOf(x)}-// Deprecated: Use IssueComment_PlanSpecUpdate.ProtoReflect.Descriptor instead.-func (*IssueComment_PlanSpecUpdate) Descriptor() ([]byte, []int) {+// Deprecated: Use IssueComment_PlanUpdate.ProtoReflect.Descriptor instead.+func (*IssueComment_PlanUpdate) Descriptor() ([]byte, []int) {return file_v1_issue_service_proto_rawDescGZIP(), []int{21, 2}}-func (x *IssueComment_PlanSpecUpdate) GetSpec() string {+func (x *IssueComment_PlanUpdate) GetFromSpecs() []*Plan_Spec {if x != nil {- return x.Spec- }- return ""-}--func (x *IssueComment_PlanSpecUpdate) GetFromSheet() string {- if x != nil && x.FromSheet != nil {- return *x.FromSheet+ return x.FromSpecs}- return ""+ return nil}-func (x *IssueComment_PlanSpecUpdate) GetToSheet() string {- if x != nil && x.ToSheet != nil {- return *x.ToSheet+func (x *IssueComment_PlanUpdate) GetToSpecs() []*Plan_Spec {+ if x != nil {+ return x.ToSpecs}- return ""+ return nil}var File_v1_issue_service_proto protoreflect.FileDescriptorconst file_v1_issue_service_proto_rawDesc = "" +"\n" +- "\x16v1/issue_service.proto\x12\vbytebase.v1\x1a\x1bbuf/validate/validate.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x16google/type/expr.proto\x1a\x13v1/annotation.proto\x1a\x0fv1/common.proto\"W\n" ++ "\x16v1/issue_service.proto\x12\vbytebase.v1\x1a\x1bbuf/validate/validate.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x16google/type/expr.proto\x1a\x13v1/annotation.proto\x1a\x0fv1/common.proto\x1a\x15v1/plan_service.proto\"W\n" +"\x0fGetIssueRequest\x12.\n" +"\x04name\x18\x01 \x01(\tB\x1a\xe0A\x02\xfaA\x14\n" +"\x12bytebase.com/IssueR\x04name\x12\x14\n" +@@ -2267,7 +2190,7 @@ const file_v1_issue_service_proto_rawDesc = "" +"\acomment\x18\x02 \x01(\tR\acomment\"K\n" +"\x19RetryIssueApprovalRequest\x12.\n" +"\x04name\x18\x01 \x01(\tB\x1a\xe0A\x02\xfaA\x14\n" +- "\x12bytebase.com/IssueR\x04name\"\xef\t\n" ++ "\x12bytebase.com/IssueR\x04name\"\xf2\b\n" +"\x05Issue\x12\x12\n" +"\x04name\x18\x01 \x01(\tR\x04name\x12\x1e\n" +"\x05title\x18\x02 \x01(\tB\b\xbaH\x05r\x03\x18\xc8\x01R\x05title\x12*\n" +@@ -2287,8 +2210,8 @@ const file_v1_issue_service_proto_rawDesc = "" +"role_grant\x18\r \x01(\v2\x16.bytebase.v1.RoleGrantR\troleGrant\x125\n" +"\n" +"risk_level\x18\x0f \x01(\x0e2\x16.bytebase.v1.RiskLevelR\triskLevel\x12\x16\n" +- "\x06labels\x18\x11 \x03(\tR\x06labels\x12O\n" +- "\x0fapproval_status\x18\x12 \x01(\x0e2!.bytebase.v1.Issue.ApprovalStatusB\x03\xe0A\x03R\x0eapprovalStatus\x12C\n" ++ "\x06labels\x18\x11 \x03(\tR\x06labels\x12I\n" ++ "\x0fapproval_status\x18\x12 \x01(\x0e2\x1b.bytebase.v1.ApprovalStatusB\x03\xe0A\x03R\x0eapprovalStatus\x12C\n" +"\faccess_grant\x18\x13 \x01(\tB \xe0A\x03\xfaA\x1a\n" +"\x18bytebase.com/AccessGrantR\vaccessGrant\x1a\xaf\x01\n" +"\bApprover\x12:\n" +@@ -2305,14 +2228,7 @@ const file_v1_issue_service_proto_rawDesc = "" +"\n" +"ROLE_GRANT\x10\x02\x12\x13\n" +"\x0fDATABASE_EXPORT\x10\x03\x12\x10\n" +- "\fACCESS_GRANT\x10\x04\"u\n" +- "\x0eApprovalStatus\x12\x1f\n" +- "\x1bAPPROVAL_STATUS_UNSPECIFIED\x10\x00\x12\f\n" +- "\bCHECKING\x10\x01\x12\v\n" +- "\aPENDING\x10\x02\x12\f\n" +- "\bAPPROVED\x10\x03\x12\f\n" +- "\bREJECTED\x10\x04\x12\v\n" +- "\aSKIPPED\x10\x05::\xeaA7\n" ++ "\fACCESS_GRANT\x10\x04::\xeaA7\n" +"\x12bytebase.com/Issue\x12!projects/{project}/issues/{issue}\"\x9f\x01\n" +"\tRoleGrant\x12\x12\n" +"\x04role\x18\x01 \x01(\tR\x04role\x12\x12\n" +@@ -2346,7 +2262,7 @@ const file_v1_issue_service_proto_rawDesc = "" +"\rissue_comment\x18\x02 \x01(\v2\x19.bytebase.v1.IssueCommentR\fissueComment\x12@\n" +"\vupdate_mask\x18\x03 \x01(\v2\x1a.google.protobuf.FieldMaskB\x03\xe0A\x02R\n" +"updateMask\x12#\n" +- "\rallow_missing\x18\x04 \x01(\bR\fallowMissing\"\xdf\t\n" ++ "\rallow_missing\x18\x04 \x01(\bR\fallowMissing\"\xc3\t\n" +"\fIssueComment\x12\x12\n" +"\x04name\x18\x01 \x01(\tR\x04name\x12#\n" +"\acomment\x18\x02 \x01(\tB\t\xbaH\x06r\x04\x18\x80\x80\x04R\acomment\x12\x18\n" +@@ -2357,8 +2273,9 @@ const file_v1_issue_service_proto_rawDesc = "" +"updateTime\x12\x1d\n" +"\acreator\x18\x06 \x01(\tB\x03\xe0A\x03R\acreator\x12@\n" +"\bapproval\x18\a \x01(\v2\".bytebase.v1.IssueComment.ApprovalH\x00R\bapproval\x12J\n" +- "\fissue_update\x18\b \x01(\v2%.bytebase.v1.IssueComment.IssueUpdateH\x00R\vissueUpdate\x12T\n" +- "\x10plan_spec_update\x18\f \x01(\v2(.bytebase.v1.IssueComment.PlanSpecUpdateH\x00R\x0eplanSpecUpdate\x1a\x98\x01\n" ++ "\fissue_update\x18\b \x01(\v2%.bytebase.v1.IssueComment.IssueUpdateH\x00R\vissueUpdate\x12G\n" ++ "\vplan_update\x18\f \x01(\v2$.bytebase.v1.IssueComment.PlanUpdateH\x00R\n" ++ "planUpdate\x1a\x98\x01\n" +"\bApproval\x12A\n" +"\x06status\x18\x01 \x01(\x0e2).bytebase.v1.IssueComment.Approval.StatusR\x06status\"I\n" +"\x06Status\x12\x16\n" +@@ -2384,14 +2301,12 @@ const file_v1_issue_service_proto_rawDesc = "" +"\x0f_to_descriptionB\x0e\n" +"\f_from_statusB\f\n" +"\n" +- "_to_status\x1a\x84\x01\n" +- "\x0ePlanSpecUpdate\x12\x12\n" +- "\x04spec\x18\x01 \x01(\tR\x04spec\x12\"\n" ++ "_to_status\x1av\n" ++ "\n" ++ "PlanUpdate\x125\n" +"\n" +- "from_sheet\x18\x02 \x01(\tH\x00R\tfromSheet\x88\x01\x01\x12\x1e\n" +- "\bto_sheet\x18\x03 \x01(\tH\x01R\atoSheet\x88\x01\x01B\r\n" +- "\v_from_sheetB\v\n" +- "\t_to_sheetB\a\n" ++ "from_specs\x18\x01 \x03(\v2\x16.bytebase.v1.Plan.SpecR\tfromSpecs\x121\n" ++ "\bto_specs\x18\x02 \x03(\v2\x16.bytebase.v1.Plan.SpecR\atoSpecsB\a\n" +"\x05event*M\n" +"\vIssueStatus\x12\x1c\n" +"\x18ISSUE_STATUS_UNSPECIFIED\x10\x00\x12\b\n" +@@ -2427,109 +2342,112 @@ func file_v1_issue_service_proto_rawDescGZIP() []byte {return file_v1_issue_service_proto_rawDescData}-var file_v1_issue_service_proto_enumTypes = make([]protoimpl.EnumInfo, 5)+var file_v1_issue_service_proto_enumTypes = make([]protoimpl.EnumInfo, 4)var file_v1_issue_service_proto_msgTypes = make([]protoimpl.MessageInfo, 26)var file_v1_issue_service_proto_goTypes = []any{(IssueStatus)(0), // 0: bytebase.v1.IssueStatus(Issue_Type)(0), // 1: bytebase.v1.Issue.Type- (Issue_ApprovalStatus)(0), // 2: bytebase.v1.Issue.ApprovalStatus- (Issue_Approver_Status)(0), // 3: bytebase.v1.Issue.Approver.Status- (IssueComment_Approval_Status)(0), // 4: bytebase.v1.IssueComment.Approval.Status- (*GetIssueRequest)(nil), // 5: bytebase.v1.GetIssueRequest- (*CreateIssueRequest)(nil), // 6: bytebase.v1.CreateIssueRequest- (*ListIssuesRequest)(nil), // 7: bytebase.v1.ListIssuesRequest- (*ListIssuesResponse)(nil), // 8: bytebase.v1.ListIssuesResponse- (*SearchIssuesRequest)(nil), // 9: bytebase.v1.SearchIssuesRequest- (*SearchIssuesResponse)(nil), // 10: bytebase.v1.SearchIssuesResponse- (*UpdateIssueRequest)(nil), // 11: bytebase.v1.UpdateIssueRequest- (*BatchUpdateIssuesStatusRequest)(nil), // 12: bytebase.v1.BatchUpdateIssuesStatusRequest- (*BatchUpdateIssuesStatusResponse)(nil), // 13: bytebase.v1.BatchUpdateIssuesStatusResponse- (*ApproveIssueRequest)(nil), // 14: bytebase.v1.ApproveIssueRequest- (*RejectIssueRequest)(nil), // 15: bytebase.v1.RejectIssueRequest- (*RequestIssueRequest)(nil), // 16: bytebase.v1.RequestIssueRequest- (*RetryIssueApprovalRequest)(nil), // 17: bytebase.v1.RetryIssueApprovalRequest- (*Issue)(nil), // 18: bytebase.v1.Issue- (*RoleGrant)(nil), // 19: bytebase.v1.RoleGrant- (*ApprovalTemplate)(nil), // 20: bytebase.v1.ApprovalTemplate- (*ApprovalFlow)(nil), // 21: bytebase.v1.ApprovalFlow- (*ListIssueCommentsRequest)(nil), // 22: bytebase.v1.ListIssueCommentsRequest- (*ListIssueCommentsResponse)(nil), // 23: bytebase.v1.ListIssueCommentsResponse- (*CreateIssueCommentRequest)(nil), // 24: bytebase.v1.CreateIssueCommentRequest- (*UpdateIssueCommentRequest)(nil), // 25: bytebase.v1.UpdateIssueCommentRequest- (*IssueComment)(nil), // 26: bytebase.v1.IssueComment- (*Issue_Approver)(nil), // 27: bytebase.v1.Issue.Approver- (*IssueComment_Approval)(nil), // 28: bytebase.v1.IssueComment.Approval- (*IssueComment_IssueUpdate)(nil), // 29: bytebase.v1.IssueComment.IssueUpdate- (*IssueComment_PlanSpecUpdate)(nil), // 30: bytebase.v1.IssueComment.PlanSpecUpdate- (*fieldmaskpb.FieldMask)(nil), // 31: google.protobuf.FieldMask- (*timestamppb.Timestamp)(nil), // 32: google.protobuf.Timestamp- (RiskLevel)(0), // 33: bytebase.v1.RiskLevel+ (Issue_Approver_Status)(0), // 2: bytebase.v1.Issue.Approver.Status+ (IssueComment_Approval_Status)(0), // 3: bytebase.v1.IssueComment.Approval.Status+ (*GetIssueRequest)(nil), // 4: bytebase.v1.GetIssueRequest+ (*CreateIssueRequest)(nil), // 5: bytebase.v1.CreateIssueRequest+ (*ListIssuesRequest)(nil), // 6: bytebase.v1.ListIssuesRequest+ (*ListIssuesResponse)(nil), // 7: bytebase.v1.ListIssuesResponse+ (*SearchIssuesRequest)(nil), // 8: bytebase.v1.SearchIssuesRequest+ (*SearchIssuesResponse)(nil), // 9: bytebase.v1.SearchIssuesResponse+ (*UpdateIssueRequest)(nil), // 10: bytebase.v1.UpdateIssueRequest+ (*BatchUpdateIssuesStatusRequest)(nil), // 11: bytebase.v1.BatchUpdateIssuesStatusRequest+ (*BatchUpdateIssuesStatusResponse)(nil), // 12: bytebase.v1.BatchUpdateIssuesStatusResponse+ (*ApproveIssueRequest)(nil), // 13: bytebase.v1.ApproveIssueRequest+ (*RejectIssueRequest)(nil), // 14: bytebase.v1.RejectIssueRequest+ (*RequestIssueRequest)(nil), // 15: bytebase.v1.RequestIssueRequest+ (*RetryIssueApprovalRequest)(nil), // 16: bytebase.v1.RetryIssueApprovalRequest+ (*Issue)(nil), // 17: bytebase.v1.Issue+ (*RoleGrant)(nil), // 18: bytebase.v1.RoleGrant+ (*ApprovalTemplate)(nil), // 19: bytebase.v1.ApprovalTemplate+ (*ApprovalFlow)(nil), // 20: bytebase.v1.ApprovalFlow+ (*ListIssueCommentsRequest)(nil), // 21: bytebase.v1.ListIssueCommentsRequest+ (*ListIssueCommentsResponse)(nil), // 22: bytebase.v1.ListIssueCommentsResponse+ (*CreateIssueCommentRequest)(nil), // 23: bytebase.v1.CreateIssueCommentRequest+ (*UpdateIssueCommentRequest)(nil), // 24: bytebase.v1.UpdateIssueCommentRequest+ (*IssueComment)(nil), // 25: bytebase.v1.IssueComment+ (*Issue_Approver)(nil), // 26: bytebase.v1.Issue.Approver+ (*IssueComment_Approval)(nil), // 27: bytebase.v1.IssueComment.Approval+ (*IssueComment_IssueUpdate)(nil), // 28: bytebase.v1.IssueComment.IssueUpdate+ (*IssueComment_PlanUpdate)(nil), // 29: bytebase.v1.IssueComment.PlanUpdate+ (*fieldmaskpb.FieldMask)(nil), // 30: google.protobuf.FieldMask+ (*timestamppb.Timestamp)(nil), // 31: google.protobuf.Timestamp+ (RiskLevel)(0), // 32: bytebase.v1.RiskLevel+ (ApprovalStatus)(0), // 33: bytebase.v1.ApprovalStatus(*expr.Expr)(nil), // 34: google.type.Expr(*durationpb.Duration)(nil), // 35: google.protobuf.Duration+ (*Plan_Spec)(nil), // 36: bytebase.v1.Plan.Spec}var file_v1_issue_service_proto_depIdxs = []int32{- 18, // 0: bytebase.v1.CreateIssueRequest.issue:type_name -> bytebase.v1.Issue- 18, // 1: bytebase.v1.ListIssuesResponse.issues:type_name -> bytebase.v1.Issue- 18, // 2: bytebase.v1.SearchIssuesResponse.issues:type_name -> bytebase.v1.Issue- 18, // 3: bytebase.v1.UpdateIssueRequest.issue:type_name -> bytebase.v1.Issue- 31, // 4: bytebase.v1.UpdateIssueRequest.update_mask:type_name -> google.protobuf.FieldMask+ 17, // 0: bytebase.v1.CreateIssueRequest.issue:type_name -> bytebase.v1.Issue+ 17, // 1: bytebase.v1.ListIssuesResponse.issues:type_name -> bytebase.v1.Issue+ 17, // 2: bytebase.v1.SearchIssuesResponse.issues:type_name -> bytebase.v1.Issue+ 17, // 3: bytebase.v1.UpdateIssueRequest.issue:type_name -> bytebase.v1.Issue+ 30, // 4: bytebase.v1.UpdateIssueRequest.update_mask:type_name -> google.protobuf.FieldMask0, // 5: bytebase.v1.BatchUpdateIssuesStatusRequest.status:type_name -> bytebase.v1.IssueStatus1, // 6: bytebase.v1.Issue.type:type_name -> bytebase.v1.Issue.Type0, // 7: bytebase.v1.Issue.status:type_name -> bytebase.v1.IssueStatus- 27, // 8: bytebase.v1.Issue.approvers:type_name -> bytebase.v1.Issue.Approver- 20, // 9: bytebase.v1.Issue.approval_template:type_name -> bytebase.v1.ApprovalTemplate- 32, // 10: bytebase.v1.Issue.create_time:type_name -> google.protobuf.Timestamp- 32, // 11: bytebase.v1.Issue.update_time:type_name -> google.protobuf.Timestamp- 19, // 12: bytebase.v1.Issue.role_grant:type_name -> bytebase.v1.RoleGrant- 33, // 13: bytebase.v1.Issue.risk_level:type_name -> bytebase.v1.RiskLevel- 2, // 14: bytebase.v1.Issue.approval_status:type_name -> bytebase.v1.Issue.ApprovalStatus+ 26, // 8: bytebase.v1.Issue.approvers:type_name -> bytebase.v1.Issue.Approver+ 19, // 9: bytebase.v1.Issue.approval_template:type_name -> bytebase.v1.ApprovalTemplate+ 31, // 10: bytebase.v1.Issue.create_time:type_name -> google.protobuf.Timestamp+ 31, // 11: bytebase.v1.Issue.update_time:type_name -> google.protobuf.Timestamp+ 18, // 12: bytebase.v1.Issue.role_grant:type_name -> bytebase.v1.RoleGrant+ 32, // 13: bytebase.v1.Issue.risk_level:type_name -> bytebase.v1.RiskLevel+ 33, // 14: bytebase.v1.Issue.approval_status:type_name -> bytebase.v1.ApprovalStatus34, // 15: bytebase.v1.RoleGrant.condition:type_name -> google.type.Expr35, // 16: bytebase.v1.RoleGrant.expiration:type_name -> google.protobuf.Duration- 21, // 17: bytebase.v1.ApprovalTemplate.flow:type_name -> bytebase.v1.ApprovalFlow- 26, // 18: bytebase.v1.ListIssueCommentsResponse.issue_comments:type_name -> bytebase.v1.IssueComment- 26, // 19: bytebase.v1.CreateIssueCommentRequest.issue_comment:type_name -> bytebase.v1.IssueComment- 26, // 20: bytebase.v1.UpdateIssueCommentRequest.issue_comment:type_name -> bytebase.v1.IssueComment- 31, // 21: bytebase.v1.UpdateIssueCommentRequest.update_mask:type_name -> google.protobuf.FieldMask- 32, // 22: bytebase.v1.IssueComment.create_time:type_name -> google.protobuf.Timestamp- 32, // 23: bytebase.v1.IssueComment.update_time:type_name -> google.protobuf.Timestamp- 28, // 24: bytebase.v1.IssueComment.approval:type_name -> bytebase.v1.IssueComment.Approval- 29, // 25: bytebase.v1.IssueComment.issue_update:type_name -> bytebase.v1.IssueComment.IssueUpdate- 30, // 26: bytebase.v1.IssueComment.plan_spec_update:type_name -> bytebase.v1.IssueComment.PlanSpecUpdate- 3, // 27: bytebase.v1.Issue.Approver.status:type_name -> bytebase.v1.Issue.Approver.Status- 4, // 28: bytebase.v1.IssueComment.Approval.status:type_name -> bytebase.v1.IssueComment.Approval.Status+ 20, // 17: bytebase.v1.ApprovalTemplate.flow:type_name -> bytebase.v1.ApprovalFlow+ 25, // 18: bytebase.v1.ListIssueCommentsResponse.issue_comments:type_name -> bytebase.v1.IssueComment+ 25, // 19: bytebase.v1.CreateIssueCommentRequest.issue_comment:type_name -> bytebase.v1.IssueComment+ 25, // 20: bytebase.v1.UpdateIssueCommentRequest.issue_comment:type_name -> bytebase.v1.IssueComment+ 30, // 21: bytebase.v1.UpdateIssueCommentRequest.update_mask:type_name -> google.protobuf.FieldMask+ 31, // 22: bytebase.v1.IssueComment.create_time:type_name -> google.protobuf.Timestamp+ 31, // 23: bytebase.v1.IssueComment.update_time:type_name -> google.protobuf.Timestamp+ 27, // 24: bytebase.v1.IssueComment.approval:type_name -> bytebase.v1.IssueComment.Approval+ 28, // 25: bytebase.v1.IssueComment.issue_update:type_name -> bytebase.v1.IssueComment.IssueUpdate+ 29, // 26: bytebase.v1.IssueComment.plan_update:type_name -> bytebase.v1.IssueComment.PlanUpdate+ 2, // 27: bytebase.v1.Issue.Approver.status:type_name -> bytebase.v1.Issue.Approver.Status+ 3, // 28: bytebase.v1.IssueComment.Approval.status:type_name -> bytebase.v1.IssueComment.Approval.Status0, // 29: bytebase.v1.IssueComment.IssueUpdate.from_status:type_name -> bytebase.v1.IssueStatus0, // 30: bytebase.v1.IssueComment.IssueUpdate.to_status:type_name -> bytebase.v1.IssueStatus- 5, // 31: bytebase.v1.IssueService.GetIssue:input_type -> bytebase.v1.GetIssueRequest- 6, // 32: bytebase.v1.IssueService.CreateIssue:input_type -> bytebase.v1.CreateIssueRequest- 7, // 33: bytebase.v1.IssueService.ListIssues:input_type -> bytebase.v1.ListIssuesRequest- 9, // 34: bytebase.v1.IssueService.SearchIssues:input_type -> bytebase.v1.SearchIssuesRequest- 11, // 35: bytebase.v1.IssueService.UpdateIssue:input_type -> bytebase.v1.UpdateIssueRequest- 22, // 36: bytebase.v1.IssueService.ListIssueComments:input_type -> bytebase.v1.ListIssueCommentsRequest- 24, // 37: bytebase.v1.IssueService.CreateIssueComment:input_type -> bytebase.v1.CreateIssueCommentRequest- 25, // 38: bytebase.v1.IssueService.UpdateIssueComment:input_type -> bytebase.v1.UpdateIssueCommentRequest- 12, // 39: bytebase.v1.IssueService.BatchUpdateIssuesStatus:input_type -> bytebase.v1.BatchUpdateIssuesStatusRequest- 14, // 40: bytebase.v1.IssueService.ApproveIssue:input_type -> bytebase.v1.ApproveIssueRequest- 15, // 41: bytebase.v1.IssueService.RejectIssue:input_type -> bytebase.v1.RejectIssueRequest- 16, // 42: bytebase.v1.IssueService.RequestIssue:input_type -> bytebase.v1.RequestIssueRequest- 17, // 43: bytebase.v1.IssueService.RetryIssueApproval:input_type -> bytebase.v1.RetryIssueApprovalRequest- 18, // 44: bytebase.v1.IssueService.GetIssue:output_type -> bytebase.v1.Issue- 18, // 45: bytebase.v1.IssueService.CreateIssue:output_type -> bytebase.v1.Issue- 8, // 46: bytebase.v1.IssueService.ListIssues:output_type -> bytebase.v1.ListIssuesResponse- 10, // 47: bytebase.v1.IssueService.SearchIssues:output_type -> bytebase.v1.SearchIssuesResponse- 18, // 48: bytebase.v1.IssueService.UpdateIssue:output_type -> bytebase.v1.Issue- 23, // 49: bytebase.v1.IssueService.ListIssueComments:output_type -> bytebase.v1.ListIssueCommentsResponse- 26, // 50: bytebase.v1.IssueService.CreateIssueComment:output_type -> bytebase.v1.IssueComment- 26, // 51: bytebase.v1.IssueService.UpdateIssueComment:output_type -> bytebase.v1.IssueComment- 13, // 52: bytebase.v1.IssueService.BatchUpdateIssuesStatus:output_type -> bytebase.v1.BatchUpdateIssuesStatusResponse- 18, // 53: bytebase.v1.IssueService.ApproveIssue:output_type -> bytebase.v1.Issue- 18, // 54: bytebase.v1.IssueService.RejectIssue:output_type -> bytebase.v1.Issue- 18, // 55: bytebase.v1.IssueService.RequestIssue:output_type -> bytebase.v1.Issue- 18, // 56: bytebase.v1.IssueService.RetryIssueApproval:output_type -> bytebase.v1.Issue- 44, // [44:57] is the sub-list for method output_type- 31, // [31:44] is the sub-list for method input_type- 31, // [31:31] is the sub-list for extension type_name- 31, // [31:31] is the sub-list for extension extendee- 0, // [0:31] is the sub-list for field type_name+ 36, // 31: bytebase.v1.IssueComment.PlanUpdate.from_specs:type_name -> bytebase.v1.Plan.Spec+ 36, // 32: bytebase.v1.IssueComment.PlanUpdate.to_specs:type_name -> bytebase.v1.Plan.Spec+ 4, // 33: bytebase.v1.IssueService.GetIssue:input_type -> bytebase.v1.GetIssueRequest+ 5, // 34: bytebase.v1.IssueService.CreateIssue:input_type -> bytebase.v1.CreateIssueRequest+ 6, // 35: bytebase.v1.IssueService.ListIssues:input_type -> bytebase.v1.ListIssuesRequest+ 8, // 36: bytebase.v1.IssueService.SearchIssues:input_type -> bytebase.v1.SearchIssuesRequest+ 10, // 37: bytebase.v1.IssueService.UpdateIssue:input_type -> bytebase.v1.UpdateIssueRequest+ 21, // 38: bytebase.v1.IssueService.ListIssueComments:input_type -> bytebase.v1.ListIssueCommentsRequest+ 23, // 39: bytebase.v1.IssueService.CreateIssueComment:input_type -> bytebase.v1.CreateIssueCommentRequest+ 24, // 40: bytebase.v1.IssueService.UpdateIssueComment:input_type -> bytebase.v1.UpdateIssueCommentRequest+ 11, // 41: bytebase.v1.IssueService.BatchUpdateIssuesStatus:input_type -> bytebase.v1.BatchUpdateIssuesStatusRequest+ 13, // 42: bytebase.v1.IssueService.ApproveIssue:input_type -> bytebase.v1.ApproveIssueRequest+ 14, // 43: bytebase.v1.IssueService.RejectIssue:input_type -> bytebase.v1.RejectIssueRequest+ 15, // 44: bytebase.v1.IssueService.RequestIssue:input_type -> bytebase.v1.RequestIssueRequest+ 16, // 45: bytebase.v1.IssueService.RetryIssueApproval:input_type -> bytebase.v1.RetryIssueApprovalRequest+ 17, // 46: bytebase.v1.IssueService.GetIssue:output_type -> bytebase.v1.Issue+ 17, // 47: bytebase.v1.IssueService.CreateIssue:output_type -> bytebase.v1.Issue+ 7, // 48: bytebase.v1.IssueService.ListIssues:output_type -> bytebase.v1.ListIssuesResponse+ 9, // 49: bytebase.v1.IssueService.SearchIssues:output_type -> bytebase.v1.SearchIssuesResponse+ 17, // 50: bytebase.v1.IssueService.UpdateIssue:output_type -> bytebase.v1.Issue+ 22, // 51: bytebase.v1.IssueService.ListIssueComments:output_type -> bytebase.v1.ListIssueCommentsResponse+ 25, // 52: bytebase.v1.IssueService.CreateIssueComment:output_type -> bytebase.v1.IssueComment+ 25, // 53: bytebase.v1.IssueService.UpdateIssueComment:output_type -> bytebase.v1.IssueComment+ 12, // 54: bytebase.v1.IssueService.BatchUpdateIssuesStatus:output_type -> bytebase.v1.BatchUpdateIssuesStatusResponse+ 17, // 55: bytebase.v1.IssueService.ApproveIssue:output_type -> bytebase.v1.Issue+ 17, // 56: bytebase.v1.IssueService.RejectIssue:output_type -> bytebase.v1.Issue+ 17, // 57: bytebase.v1.IssueService.RequestIssue:output_type -> bytebase.v1.Issue+ 17, // 58: bytebase.v1.IssueService.RetryIssueApproval:output_type -> bytebase.v1.Issue+ 46, // [46:59] is the sub-list for method output_type+ 33, // [33:46] is the sub-list for method input_type+ 33, // [33:33] is the sub-list for extension type_name+ 33, // [33:33] is the sub-list for extension extendee+ 0, // [0:33] is the sub-list for field type_name}func init() { file_v1_issue_service_proto_init() }@@ -2539,19 +2457,19 @@ func file_v1_issue_service_proto_init() {}file_v1_annotation_proto_init()file_v1_common_proto_init()+ file_v1_plan_service_proto_init()file_v1_issue_service_proto_msgTypes[21].OneofWrappers = []any{(*IssueComment_Approval_)(nil),(*IssueComment_IssueUpdate_)(nil),- (*IssueComment_PlanSpecUpdate_)(nil),+ (*IssueComment_PlanUpdate_)(nil),}file_v1_issue_service_proto_msgTypes[24].OneofWrappers = []any{}- file_v1_issue_service_proto_msgTypes[25].OneofWrappers = []any{}type x struct{}out := protoimpl.TypeBuilder{File: protoimpl.DescBuilder{GoPackagePath: reflect.TypeOf(x{}).PkgPath(),RawDescriptor: unsafe.Slice(unsafe.StringData(file_v1_issue_service_proto_rawDesc), len(file_v1_issue_service_proto_rawDesc)),- NumEnums: 5,+ NumEnums: 4,NumMessages: 26,NumExtensions: 0,NumServices: 1,diff --git a/backend/generated-go/v1/issue_service_equal.pb.go b/backend/generated-go/v1/issue_service_equal.pb.goindex 87903399fb..6c540745a1 100644--- a/backend/generated-go/v1/issue_service_equal.pb.go+++ b/backend/generated-go/v1/issue_service_equal.pb.go@@ -544,22 +544,29 @@ func (x *IssueComment_IssueUpdate) Equal(y *IssueComment_IssueUpdate) bool {return true}-func (x *IssueComment_PlanSpecUpdate) Equal(y *IssueComment_PlanSpecUpdate) bool {+func (x *IssueComment_PlanUpdate) Equal(y *IssueComment_PlanUpdate) bool {if x == y {return true}if x == nil || y == nil {return x == nil && y == nil}- if x.Spec != y.Spec {+ if len(x.FromSpecs) != len(y.FromSpecs) {return false}- if p, q := x.FromSheet, y.FromSheet; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) {- return false+ for i := 0; i < len(x.FromSpecs); i++ {+ if !x.FromSpecs[i].Equal(y.FromSpecs[i]) {+ return false+ }}- if p, q := x.ToSheet, y.ToSheet; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) {+ if len(x.ToSpecs) != len(y.ToSpecs) {return false}+ for i := 0; i < len(x.ToSpecs); i++ {+ if !x.ToSpecs[i].Equal(y.ToSpecs[i]) {+ return false+ }+ }return true}@@ -594,7 +601,7 @@ func (x *IssueComment) Equal(y *IssueComment) bool {if !x.GetIssueUpdate().Equal(y.GetIssueUpdate()) {return false}- if !x.GetPlanSpecUpdate().Equal(y.GetPlanSpecUpdate()) {+ if !x.GetPlanUpdate().Equal(y.GetPlanUpdate()) {return false}return truediff --git a/backend/generated-go/v1/plan_service.pb.go b/backend/generated-go/v1/plan_service.pb.goindex fcb1923453..b42cc5651a 100644--- a/backend/generated-go/v1/plan_service.pb.go+++ b/backend/generated-go/v1/plan_service.pb.go@@ -487,7 +487,7 @@ type Plan struct {HasRollout bool `protobuf:"varint,12,opt,name=has_rollout,json=hasRollout,proto3" json:"has_rollout,omitempty"`// The approval status of the linked issue.// Unspecified when no linked issue exists.- ApprovalStatus Issue_ApprovalStatus `protobuf:"varint,13,opt,name=approval_status,json=approvalStatus,proto3,enum=bytebase.v1.Issue_ApprovalStatus" json:"approval_status,omitempty"`+ ApprovalStatus ApprovalStatus `protobuf:"varint,13,opt,name=approval_status,json=approvalStatus,proto3,enum=bytebase.v1.ApprovalStatus" json:"approval_status,omitempty"`// Per-stage rollout status summary.// Ordered by environment deployment order. Empty when no rollout exists.RolloutStageSummaries []*Plan_RolloutStageSummary `protobuf:"bytes,14,rep,name=rollout_stage_summaries,json=rolloutStageSummaries,proto3" json:"rollout_stage_summaries,omitempty"`@@ -602,11 +602,11 @@ func (x *Plan) GetHasRollout() bool {return false}-func (x *Plan) GetApprovalStatus() Issue_ApprovalStatus {+func (x *Plan) GetApprovalStatus() ApprovalStatus {if x != nil {return x.ApprovalStatus}- return Issue_APPROVAL_STATUS_UNSPECIFIED+ return ApprovalStatus_APPROVAL_STATUS_UNSPECIFIED}func (x *Plan) GetRolloutStageSummaries() []*Plan_RolloutStageSummary {@@ -1636,7 +1636,7 @@ var File_v1_plan_service_proto protoreflect.FileDescriptorconst file_v1_plan_service_proto_rawDesc = "" +"\n" +- "\x15v1/plan_service.proto\x12\vbytebase.v1\x1a\x1bbuf/validate/validate.proto\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\x16v1/issue_service.proto\x1a\x18v1/rollout_service.proto\x1a\x14v1/sql_service.proto\"?\n" ++ "\x15v1/plan_service.proto\x12\vbytebase.v1\x1a\x1bbuf/validate/validate.proto\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\x18v1/rollout_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\"\x9c\x01\n" +@@ -1658,7 +1658,7 @@ const file_v1_plan_service_proto_rawDesc = "" +"\x04plan\x18\x01 \x01(\v2\x11.bytebase.v1.PlanB\x03\xe0A\x02R\x04plan\x12@\n" +"\vupdate_mask\x18\x02 \x01(\v2\x1a.google.protobuf.FieldMaskB\x03\xe0A\x02R\n" +"updateMask\x12#\n" +- "\rallow_missing\x18\x03 \x01(\bR\fallowMissing\"\xd3\x0f\n" ++ "\rallow_missing\x18\x03 \x01(\bR\fallowMissing\"\xcd\x0f\n" +"\x04Plan\x12\x12\n" +"\x04name\x18\x01 \x01(\tR\x04name\x12(\n" +"\x05state\x18\x02 \x01(\x0e2\x12.bytebase.v1.StateR\x05state\x12\x19\n" +@@ -1674,8 +1674,8 @@ const file_v1_plan_service_proto_rawDesc = "" +"updateTime\x12q\n" +"\x1bplan_check_run_status_count\x18\v \x03(\v2..bytebase.v1.Plan.PlanCheckRunStatusCountEntryB\x03\xe0A\x03R\x17planCheckRunStatusCount\x12$\n" +"\vhas_rollout\x18\f \x01(\bB\x03\xe0A\x03R\n" +- "hasRollout\x12O\n" +- "\x0fapproval_status\x18\r \x01(\x0e2!.bytebase.v1.Issue.ApprovalStatusB\x03\xe0A\x03R\x0eapprovalStatus\x12b\n" ++ "hasRollout\x12I\n" ++ "\x0fapproval_status\x18\r \x01(\x0e2\x1b.bytebase.v1.ApprovalStatusB\x03\xe0A\x03R\x0eapprovalStatus\x12b\n" +"\x17rollout_stage_summaries\x18\x0e \x03(\v2%.bytebase.v1.Plan.RolloutStageSummaryB\x03\xe0A\x03R\x15rolloutStageSummaries\x1a\xb4\x02\n" +"\x04Spec\x12\x0e\n" +"\x02id\x18\x01 \x01(\tR\x02id\x12^\n" +@@ -1819,7 +1819,7 @@ var file_v1_plan_service_proto_goTypes = []any{(*fieldmaskpb.FieldMask)(nil), // 24: google.protobuf.FieldMask(State)(0), // 25: bytebase.v1.State(*timestamppb.Timestamp)(nil), // 26: google.protobuf.Timestamp- (Issue_ApprovalStatus)(0), // 27: bytebase.v1.Issue.ApprovalStatus+ (ApprovalStatus)(0), // 27: bytebase.v1.ApprovalStatus(ExportFormat)(0), // 28: bytebase.v1.ExportFormat(Task_Status)(0), // 29: bytebase.v1.Task.Status(Advice_Level)(0), // 30: bytebase.v1.Advice.Level@@ -1836,7 +1836,7 @@ var file_v1_plan_service_proto_depIdxs = []int32{26, // 6: bytebase.v1.Plan.create_time:type_name -> google.protobuf.Timestamp26, // 7: bytebase.v1.Plan.update_time:type_name -> google.protobuf.Timestamp15, // 8: bytebase.v1.Plan.plan_check_run_status_count:type_name -> bytebase.v1.Plan.PlanCheckRunStatusCountEntry- 27, // 9: bytebase.v1.Plan.approval_status:type_name -> bytebase.v1.Issue.ApprovalStatus+ 27, // 9: bytebase.v1.Plan.approval_status:type_name -> bytebase.v1.ApprovalStatus19, // 10: bytebase.v1.Plan.rollout_stage_summaries:type_name -> bytebase.v1.Plan.RolloutStageSummary0, // 11: bytebase.v1.PlanCheckRun.status:type_name -> bytebase.v1.PlanCheckRun.Status21, // 12: bytebase.v1.PlanCheckRun.results:type_name -> bytebase.v1.PlanCheckRun.Result@@ -1882,7 +1882,6 @@ func file_v1_plan_service_proto_init() {}file_v1_annotation_proto_init()file_v1_common_proto_init()- file_v1_issue_service_proto_init()file_v1_rollout_service_proto_init()file_v1_sql_service_proto_init()file_v1_plan_service_proto_msgTypes[7].OneofWrappers = []any{}diff --git a/backend/tests/approval_test.go b/backend/tests/approval_test.goindex e49e0a4332..f9afce1ec6 100644--- a/backend/tests/approval_test.go+++ b/backend/tests/approval_test.go@@ -134,14 +134,14 @@ func TestDirectApprovalRuleMatching(t *testing.T) {a.NoError(err)issue = issueGetResp.Msg- if issue.ApprovalStatus != v1pb.Issue_CHECKING {+ if issue.ApprovalStatus != v1pb.ApprovalStatus_CHECKING {break}}// Verify approval finding completed successfullya.NotNil(issue)- a.NotEqual(v1pb.Issue_CHECKING, issue.ApprovalStatus, "Approval finding should complete")+ a.NotEqual(v1pb.ApprovalStatus_CHECKING, issue.ApprovalStatus, "Approval finding should complete")// Verify that the approval template was correctly assigned// Note: The status may be SKIPPED/APPROVED if the user is a workspace owner@@ -282,14 +282,14 @@ func TestApprovalRuleFirstMatchWins(t *testing.T) {a.NoError(err)issue = issueGetResp.Msg- if issue.ApprovalStatus != v1pb.Issue_CHECKING {+ if issue.ApprovalStatus != v1pb.ApprovalStatus_CHECKING {break}}// Verify approval finding completeda.NotNil(issue)- a.NotEqual(v1pb.Issue_CHECKING, issue.ApprovalStatus)+ a.NotEqual(v1pb.ApprovalStatus_CHECKING, issue.ApprovalStatus)// Verify the first rule was applied (not the catch-all)a.Equal("Prod Change Database - First Rule", issue.GetApprovalTemplate().GetTitle(), "First matching rule should be applied")@@ -411,20 +411,20 @@ func TestApprovalRuleNoMatch(t *testing.T) {a.NoError(err)issue = issueGetResp.Msg- if issue.ApprovalStatus != v1pb.Issue_CHECKING {+ if issue.ApprovalStatus != v1pb.ApprovalStatus_CHECKING {break}}// Verify approval finding completeda.NotNil(issue)- a.NotEqual(v1pb.Issue_CHECKING, issue.ApprovalStatus)+ a.NotEqual(v1pb.ApprovalStatus_CHECKING, issue.ApprovalStatus)// Since no rule matches test environment, no approval template should be assigned// and the issue should be auto-approved (or skipped)a.Nil(issue.ApprovalTemplate, "No approval template should be assigned when no rule matches")// Status should be APPROVED or SKIPPED (auto-approved)- a.True(issue.ApprovalStatus == v1pb.Issue_APPROVED || issue.ApprovalStatus == v1pb.Issue_SKIPPED,+ a.True(issue.ApprovalStatus == v1pb.ApprovalStatus_APPROVED || issue.ApprovalStatus == v1pb.ApprovalStatus_SKIPPED,"Issue should be auto-approved when no rule matches, got status: %v", issue.ApprovalStatus)}@@ -623,14 +623,14 @@ func TestFallbackRuleMatchesWhenSourceSpecificDoesNot(t *testing.T) {}))a.NoError(err)issue = issueGetResp.Msg- if issue.ApprovalStatus != v1pb.Issue_CHECKING {+ if issue.ApprovalStatus != v1pb.ApprovalStatus_CHECKING {break}}// Verify fallback rule was applieda.NotNil(issue)- a.NotEqual(v1pb.Issue_CHECKING, issue.ApprovalStatus)+ a.NotEqual(v1pb.ApprovalStatus_CHECKING, issue.ApprovalStatus)a.NotNil(issue.ApprovalTemplate, "Fallback approval template should be assigned")a.Equal("Fallback Rule", issue.GetApprovalTemplate().GetTitle(), "Fallback rule should be applied")}@@ -760,14 +760,14 @@ func TestSourceSpecificRuleTakesPriorityOverFallback(t *testing.T) {}))a.NoError(err)issue = issueGetResp.Msg- if issue.ApprovalStatus != v1pb.Issue_CHECKING {+ if issue.ApprovalStatus != v1pb.ApprovalStatus_CHECKING {break}}// Verify source-specific rule was applied, NOT the fallbacka.NotNil(issue)- a.NotEqual(v1pb.Issue_CHECKING, issue.ApprovalStatus)+ a.NotEqual(v1pb.ApprovalStatus_CHECKING, issue.ApprovalStatus)a.NotNil(issue.ApprovalTemplate)a.Equal("Source Specific Rule (should be used)", issue.GetApprovalTemplate().GetTitle(),"Source-specific rule should take priority over fallback even when fallback is first in list")@@ -908,12 +908,12 @@ func TestSelfApprovalBlocked(t *testing.T) {}))a.NoError(err)issue = issueGetResp.Msg- if issue.ApprovalStatus != v1pb.Issue_CHECKING {+ if issue.ApprovalStatus != v1pb.ApprovalStatus_CHECKING {break}}a.NotNil(issue)- a.Equal(v1pb.Issue_PENDING, issue.ApprovalStatus)+ a.Equal(v1pb.ApprovalStatus_PENDING, issue.ApprovalStatus)// Try to approve as creator (should fail due to self-approval restriction)_, err = ctl.issueServiceClient.ApproveIssue(ctx, connect.NewRequest(&v1pb.ApproveIssueRequest{@@ -980,5 +980,5 @@ func TestSelfApprovalBlocked(t *testing.T) {Name: issue.Name,}))a.NoError(err)- a.Equal(v1pb.Issue_APPROVED, issueGetResp.Msg.ApprovalStatus)+ a.Equal(v1pb.ApprovalStatus_APPROVED, issueGetResp.Msg.ApprovalStatus)}diff --git a/backend/tests/collision_helper_test.go b/backend/tests/collision_helper_test.goindex 4b0197b631..42f1ba9aae 100644--- a/backend/tests/collision_helper_test.go+++ b/backend/tests/collision_helper_test.go@@ -535,6 +535,7 @@ type projectSnapshot struct {Issues []*v1pb.IssueTaskRuns []*v1pb.TaskRunPlanCheckRuns []*v1pb.PlanCheckRun+ IssueComments []*v1pb.IssueComment}// snapshotProject captures every plan/issue/task_run/plan_check_run row@@ -608,11 +609,26 @@ func snapshotProject(}}+ var issueComments []*v1pb.IssueComment+ for _, i := range issues {+ icResp, err := ctl.issueServiceClient.ListIssueComments(ctx, connect.NewRequest(&v1pb.ListIssueCommentsRequest{+ Parent: i.Name,+ PageSize: 1000,+ }))+ a.NoError(err, "ListIssueComments for issue %s", i.Name)+ for _, c := range icResp.Msg.IssueComments {+ a.True(strings.HasPrefix(c.Name, project.Name+"/"),+ "ListIssueComments for issue %s returned %q — read-path leak", i.Name, c.Name)+ }+ issueComments = append(issueComments, icResp.Msg.IssueComments...)+ }+return &projectSnapshot{Plans: plans,Issues: issues,TaskRuns: taskRuns,PlanCheckRuns: planCheckRuns,+ IssueComments: issueComments,}}@@ -661,6 +677,16 @@ func assertProjectUnchanged(a.Equal(b.Status, af.Status, "%s: plan_check_run %s status changed from %v to %v", label, b.Name, b.Status, af.Status)},label, "plan_check_run")++ // issue_comment is keyed by composite (project, id); a cross-project+ // emission would surface here as either a new row in `after` or a+ // disappeared row.+ assertNoChange(t, before.IssueComments, after.IssueComments,+ func(c *v1pb.IssueComment) string { return c.Name },+ func(b, af *v1pb.IssueComment) {+ a.Equal(b.Comment, af.Comment, "%s: issue_comment %s comment changed", label, b.Name)+ },+ label, "issue_comment")}// assertNoChange compares two row slices keyed by name, fails if anydiff --git a/backend/tests/plan_audit_collision_test.go b/backend/tests/plan_audit_collision_test.gonew file mode 100644index 0000000000..b95b62dfe5--- /dev/null+++ b/backend/tests/plan_audit_collision_test.go@@ -0,0 +1,86 @@+package tests++import (+ "context"+ "testing"+ "time"++ "connectrpc.com/connect"+ "github.com/stretchr/testify/require"+ "google.golang.org/protobuf/types/known/fieldmaskpb"++ v1pb "github.com/bytebase/bytebase/backend/generated-go/v1"+)++// TestCollision_PlanSpecAuditEmission verifies that PlanService.UpdatePlan+// emitting issue_comment audit rows for a spec mutation in project A does+// not touch any rows in project B (which shares colliding plan / issue ids+// under composite PK).+func TestCollision_PlanSpecAuditEmission(t *testing.T) {+ t.Parallel()+ a := require.New(t)+ ctx, cancel := context.WithTimeout(context.Background(), 5*time.Minute)+ defer cancel()+ ctl := &controller{}+ ctx, err := ctl.StartServerWithExternalPg(ctx)+ a.NoError(err)+ defer ctl.Close(ctx)++ fixture := setupCollidingProjects(ctx, t, ctl)++ // fixture.PlanA already has a rollout (setupCollidingProjects drives A's+ // rollout to DONE). UpdatePlan rejects spec changes once a plan has a+ // rollout, so we create a fresh, rollout-free plan + issue in project A+ // for the action under test. The collision invariant still holds because+ // both projects share the same plan/issue id allocator — any cross-project+ // leak would still surface as a delta in project B's snapshot.+ planA2, issueA2 := createPlanAndIssue(ctx, t, ctl, fixture.ProjectA, fixture.DatabaseA, "collision-audit-test")++ // Snapshot B before the action under test so we can detect any leak.+ beforeB := snapshotProject(ctx, t, ctl, fixture.ProjectB)++ // In project A, mutate the new plan's spec in a way that produces a+ // PlanUpdate audit row: flip enable_prior_backup from false to true on+ // the existing CDC spec. (Targets/sheet stay identical so the audit+ // helper emits exactly one row carrying only the bool diff.)+ a.NotEmpty(planA2.Specs, "fresh plan A must have at least one spec")+ originalSpec := planA2.Specs[0]+ cdc := originalSpec.GetChangeDatabaseConfig()+ a.NotNil(cdc, "fresh plan A spec is expected to be a ChangeDatabaseConfig")++ _, err = ctl.planServiceClient.UpdatePlan(ctx, connect.NewRequest(&v1pb.UpdatePlanRequest{+ Plan: &v1pb.Plan{+ Name: planA2.Name,+ Specs: []*v1pb.Plan_Spec{{+ Id: originalSpec.Id,+ Config: &v1pb.Plan_Spec_ChangeDatabaseConfig{+ ChangeDatabaseConfig: &v1pb.Plan_ChangeDatabaseConfig{+ Targets: cdc.Targets,+ Sheet: cdc.Sheet,+ EnablePriorBackup: true, // flip+ },+ },+ }},+ },+ UpdateMask: &fieldmaskpb.FieldMask{Paths: []string{"specs"}},+ }))+ a.NoError(err)++ // Positive sanity: the fresh issue in project A gained the audit row.+ commentsA, err := ctl.issueServiceClient.ListIssueComments(ctx,+ connect.NewRequest(&v1pb.ListIssueCommentsRequest{Parent: issueA2.Name}))+ a.NoError(err)+ var sawUpdateA bool+ for _, c := range commentsA.Msg.IssueComments {+ if c.GetPlanUpdate() != nil {+ sawUpdateA = true+ break+ }+ }+ a.True(sawUpdateA, "project A's fresh issue should have received a PlanUpdate audit row")++ // Isolation: project B's snapshot is unchanged across plans, issues,+ // task_runs, plan_check_runs, and (importantly) issue_comments.+ afterB := snapshotProject(ctx, t, ctl, fixture.ProjectB)+ assertProjectUnchanged(t, beforeB, afterB, "project B after plan A spec audit emission")+}diff --git a/backend/tests/plan_update_test.go b/backend/tests/plan_update_test.gonew file mode 100644index 0000000000..f3309c86ff--- /dev/null+++ b/backend/tests/plan_update_test.go@@ -0,0 +1,496 @@+package tests++import (+ "context"+ "fmt"+ "testing"++ "connectrpc.com/connect"+ "github.com/google/uuid"+ "github.com/stretchr/testify/require"+ "google.golang.org/protobuf/types/known/fieldmaskpb"++ v1pb "github.com/bytebase/bytebase/backend/generated-go/v1"+)++// planUpdateFixture holds a project + sqlite instance + database + two sheets+// + plan + linked issue, ready for tests that mutate the plan and inspect+// the resulting issue_comment audit rows.+type planUpdateFixture struct {+ ctl *controller+ ctx context.Context+ instance *v1pb.Instance+ database *v1pb.Database+ plan *v1pb.Plan+ issue *v1pb.Issue+ sheet1 *v1pb.Sheet+ sheet2 *v1pb.Sheet+}++// setupPlanUpdateFixture creates the fixture. withIssue=false skips the+// CreateIssue call (used by the no-issue gate test).+func setupPlanUpdateFixture(t *testing.T, withIssue bool) *planUpdateFixture {+ t.Helper()+ a := require.New(t)+ ctx := context.Background()+ ctl := &controller{}+ ctx, err := ctl.StartServerWithExternalPg(ctx)+ a.NoError(err)+ t.Cleanup(func() { _ = ctl.Close(ctx) })++ instanceRootDir := t.TempDir()+ instanceName := "planUpdateInstance_" + generateRandomString("inst")+ instanceDir, err := ctl.provisionSQLiteInstance(instanceRootDir, instanceName)+ a.NoError(err)+ instanceResp, err := ctl.instanceServiceClient.CreateInstance(ctx, connect.NewRequest(&v1pb.CreateInstanceRequest{+ InstanceId: generateRandomString("instance"),+ Instance: &v1pb.Instance{+ Title: instanceName,+ Engine: v1pb.Engine_SQLITE,+ Environment: new("environments/prod"),+ Activation: true,+ DataSources: []*v1pb.DataSource{{Type: v1pb.DataSourceType_ADMIN, Host: instanceDir, Id: "admin"}},+ },+ }))+ a.NoError(err)+ instance := instanceResp.Msg++ databaseName := "planUpdateDb_" + generateRandomString("db")+ a.NoError(ctl.createDatabase(ctx, ctl.project, instance, nil, databaseName, ""))+ databaseResp, err := ctl.databaseServiceClient.GetDatabase(ctx, connect.NewRequest(&v1pb.GetDatabaseRequest{+ Name: fmt.Sprintf("%s/databases/%s", instance.Name, databaseName),+ }))+ a.NoError(err)++ mkSheet := func(content string) *v1pb.Sheet {+ s, err := ctl.sheetServiceClient.CreateSheet(ctx, connect.NewRequest(&v1pb.CreateSheetRequest{+ Parent: ctl.project.Name,+ Sheet: &v1pb.Sheet{Content: []byte(content)},+ }))+ a.NoError(err)+ return s.Msg+ }+ sheet1 := mkSheet("CREATE TABLE plan_update_a (id INTEGER PRIMARY KEY);")+ sheet2 := mkSheet("CREATE TABLE plan_update_b (id INTEGER PRIMARY KEY);")++ planResp, err := ctl.planServiceClient.CreatePlan(ctx, connect.NewRequest(&v1pb.CreatePlanRequest{+ Parent: ctl.project.Name,+ Plan: &v1pb.Plan{+ Specs: []*v1pb.Plan_Spec{{+ Id: uuid.NewString(),+ Config: &v1pb.Plan_Spec_ChangeDatabaseConfig{+ ChangeDatabaseConfig: &v1pb.Plan_ChangeDatabaseConfig{+ Targets: []string{databaseResp.Msg.Name},+ Sheet: sheet1.Name,+ },+ },+ }},+ },+ }))+ a.NoError(err)++ f := &planUpdateFixture{+ ctl: ctl,+ ctx: ctx,+ instance: instance,+ database: databaseResp.Msg,+ plan: planResp.Msg,+ sheet1: sheet1,+ sheet2: sheet2,+ }+ if withIssue {+ issueResp, err := ctl.issueServiceClient.CreateIssue(ctx, connect.NewRequest(&v1pb.CreateIssueRequest{+ Parent: ctl.project.Name,+ Issue: &v1pb.Issue{+ Type: v1pb.Issue_DATABASE_CHANGE,+ Title: "plan-audit-test",+ Description: "plan-audit-test",+ Plan: f.plan.Name,+ },+ }))+ a.NoError(err)+ f.issue = issueResp.Msg+ }+ return f+}++// listPlanUpdateEvents returns the PlanUpdate event payloads from the+// issue's comment list, in the order the API returned them.+func listPlanUpdateEvents(t *testing.T, f *planUpdateFixture) []*v1pb.IssueComment_PlanUpdate {+ t.Helper()+ a := require.New(t)+ resp, err := f.ctl.issueServiceClient.ListIssueComments(f.ctx, connect.NewRequest(&v1pb.ListIssueCommentsRequest{+ Parent: f.issue.Name,+ }))+ a.NoError(err)+ var out []*v1pb.IssueComment_PlanUpdate+ for _, c := range resp.Msg.IssueComments {+ if x := c.GetPlanUpdate(); x != nil {+ out = append(out, x)+ }+ }+ return out+}++// TestPlanSpecUpdate_SheetChange_EmitsIssueComment is the original test from+// PR #20032: changing a spec's sheet emits a single PlanSpecUpdate row.+func TestPlanSpecUpdate_SheetChange_EmitsIssueComment(t *testing.T) {+ t.Parallel()+ a := require.New(t)+ f := setupPlanUpdateFixture(t, true)++ originalSpec := f.plan.Specs[0]+ _, err := f.ctl.planServiceClient.UpdatePlan(f.ctx, connect.NewRequest(&v1pb.UpdatePlanRequest{+ Plan: &v1pb.Plan{+ Name: f.plan.Name,+ Specs: []*v1pb.Plan_Spec{{+ Id: originalSpec.Id,+ Config: &v1pb.Plan_Spec_ChangeDatabaseConfig{+ ChangeDatabaseConfig: &v1pb.Plan_ChangeDatabaseConfig{+ Targets: []string{f.database.Name},+ Sheet: f.sheet2.Name, // changed+ },+ },+ }},+ },+ UpdateMask: &fieldmaskpb.FieldMask{Paths: []string{"specs"}},+ }))+ a.NoError(err)++ events := listPlanUpdateEvents(t, f)+ a.Len(events, 1)+ ev := events[0]+ a.Len(ev.FromSpecs, 1)+ a.Len(ev.ToSpecs, 1)+ a.Equal(originalSpec.Id, ev.FromSpecs[0].Id)+ a.Equal(originalSpec.Id, ev.ToSpecs[0].Id)+ a.Equal(f.sheet1.Name, ev.FromSpecs[0].GetChangeDatabaseConfig().GetSheet())+ a.Equal(f.sheet2.Name, ev.ToSpecs[0].GetChangeDatabaseConfig().GetSheet())+}++func TestPlanSpecAdd_EmitsIssueComment(t *testing.T) {+ t.Parallel()+ a := require.New(t)+ f := setupPlanUpdateFixture(t, true)++ originalSpec := f.plan.Specs[0]+ newSpecID := uuid.NewString()+ _, err := f.ctl.planServiceClient.UpdatePlan(f.ctx, connect.NewRequest(&v1pb.UpdatePlanRequest{+ Plan: &v1pb.Plan{+ Name: f.plan.Name,+ Specs: []*v1pb.Plan_Spec{+ originalSpec,+ {+ Id: newSpecID,+ Config: &v1pb.Plan_Spec_ChangeDatabaseConfig{+ ChangeDatabaseConfig: &v1pb.Plan_ChangeDatabaseConfig{+ Targets: []string{f.database.Name},+ Sheet: f.sheet2.Name,+ },+ },+ },+ },+ },+ UpdateMask: &fieldmaskpb.FieldMask{Paths: []string{"specs"}},+ }))+ a.NoError(err)++ events := listPlanUpdateEvents(t, f)+ a.Len(events, 1)+ ev := events[0]+ a.Len(ev.FromSpecs, 1)+ a.Len(ev.ToSpecs, 2)+ a.Equal(originalSpec.Id, ev.FromSpecs[0].Id)+ idsAfter := map[string]bool{}+ for _, s := range ev.ToSpecs {+ idsAfter[s.Id] = true+ }+ a.True(idsAfter[originalSpec.Id])+ a.True(idsAfter[newSpecID])+}++func TestPlanSpecRemove_EmitsIssueComment(t *testing.T) {+ t.Parallel()+ a := require.New(t)+ f := setupPlanUpdateFixture(t, true)++ originalSpec := f.plan.Specs[0]+ secondSpecID := uuid.NewString()+ // Seed: add a second spec we can later remove.+ _, err := f.ctl.planServiceClient.UpdatePlan(f.ctx, connect.NewRequest(&v1pb.UpdatePlanRequest{+ Plan: &v1pb.Plan{+ Name: f.plan.Name,+ Specs: []*v1pb.Plan_Spec{+ originalSpec,+ {+ Id: secondSpecID,+ Config: &v1pb.Plan_Spec_ChangeDatabaseConfig{+ ChangeDatabaseConfig: &v1pb.Plan_ChangeDatabaseConfig{+ Targets: []string{f.database.Name},+ Sheet: f.sheet2.Name,+ },+ },+ },+ },+ },+ UpdateMask: &fieldmaskpb.FieldMask{Paths: []string{"specs"}},+ }))+ a.NoError(err)++ // Now remove the second spec.+ _, err = f.ctl.planServiceClient.UpdatePlan(f.ctx, connect.NewRequest(&v1pb.UpdatePlanRequest{+ Plan: &v1pb.Plan{+ Name: f.plan.Name,+ Specs: []*v1pb.Plan_Spec{originalSpec},+ },+ UpdateMask: &fieldmaskpb.FieldMask{Paths: []string{"specs"}},+ }))+ a.NoError(err)++ events := listPlanUpdateEvents(t, f)+ a.Len(events, 2, "expected two PlanUpdate rows: seed add + removal")+ removal := events[1]+ a.Len(removal.FromSpecs, 2)+ a.Len(removal.ToSpecs, 1)+ a.Equal(originalSpec.Id, removal.ToSpecs[0].Id)+ idsBefore := map[string]bool{}+ for _, s := range removal.FromSpecs {+ idsBefore[s.Id] = true+ }+ a.True(idsBefore[secondSpecID])+}++func TestPlanSpecUpdate_TargetsChange_EmitsIssueComment(t *testing.T) {+ t.Parallel()+ a := require.New(t)+ f := setupPlanUpdateFixture(t, true)++ dbName2 := "planUpdateDb2_" + generateRandomString("db")+ a.NoError(f.ctl.createDatabase(f.ctx, f.ctl.project, f.instance, nil, dbName2, ""))+ db2Resp, err := f.ctl.databaseServiceClient.GetDatabase(f.ctx, connect.NewRequest(&v1pb.GetDatabaseRequest{+ Name: fmt.Sprintf("%s/databases/%s", f.instance.Name, dbName2),+ }))+ a.NoError(err)++ originalSpec := f.plan.Specs[0]+ _, err = f.ctl.planServiceClient.UpdatePlan(f.ctx, connect.NewRequest(&v1pb.UpdatePlanRequest{+ Plan: &v1pb.Plan{+ Name: f.plan.Name,+ Specs: []*v1pb.Plan_Spec{{+ Id: originalSpec.Id,+ Config: &v1pb.Plan_Spec_ChangeDatabaseConfig{+ ChangeDatabaseConfig: &v1pb.Plan_ChangeDatabaseConfig{+ Targets: []string{f.database.Name, db2Resp.Msg.Name}, // added db2+ Sheet: f.sheet1.Name, // unchanged+ },+ },+ }},+ },+ UpdateMask: &fieldmaskpb.FieldMask{Paths: []string{"specs"}},+ }))+ a.NoError(err)++ events := listPlanUpdateEvents(t, f)+ a.Len(events, 1)+ ev := events[0]+ a.Len(ev.FromSpecs, 1)+ a.Len(ev.ToSpecs, 1)+ a.Equal([]string{f.database.Name}, ev.FromSpecs[0].GetChangeDatabaseConfig().GetTargets())+ a.Equal([]string{f.database.Name, db2Resp.Msg.Name}, ev.ToSpecs[0].GetChangeDatabaseConfig().GetTargets())+ a.Equal(f.sheet1.Name, ev.FromSpecs[0].GetChangeDatabaseConfig().GetSheet())+ a.Equal(f.sheet1.Name, ev.ToSpecs[0].GetChangeDatabaseConfig().GetSheet())+}++func TestPlanSpecUpdate_PriorBackupToggle_EmitsIssueComment(t *testing.T) {+ t.Parallel()+ a := require.New(t)+ f := setupPlanUpdateFixture(t, true)++ originalSpec := f.plan.Specs[0]+ _, err := f.ctl.planServiceClient.UpdatePlan(f.ctx, connect.NewRequest(&v1pb.UpdatePlanRequest{+ Plan: &v1pb.Plan{+ Name: f.plan.Name,+ Specs: []*v1pb.Plan_Spec{{+ Id: originalSpec.Id,+ Config: &v1pb.Plan_Spec_ChangeDatabaseConfig{+ ChangeDatabaseConfig: &v1pb.Plan_ChangeDatabaseConfig{+ Targets: []string{f.database.Name}, // unchanged+ Sheet: f.sheet1.Name, // unchanged+ EnablePriorBackup: true, // flipped from false+ },+ },+ }},+ },+ UpdateMask: &fieldmaskpb.FieldMask{Paths: []string{"specs"}},+ }))+ a.NoError(err)++ events := listPlanUpdateEvents(t, f)+ a.Len(events, 1)+ ev := events[0]+ a.Len(ev.FromSpecs, 1)+ a.Len(ev.ToSpecs, 1)+ a.False(ev.FromSpecs[0].GetChangeDatabaseConfig().GetEnablePriorBackup())+ a.True(ev.ToSpecs[0].GetChangeDatabaseConfig().GetEnablePriorBackup())+}++// TestPlanSpecAudit_NoIssue_NoEmission documents the G3 deferral: when the+// plan is not linked to an issue, UpdatePlan emits no audit rows. The+// assertion is indirect (no panic / FK violation when the audit emission+// is skipped), since there is no issue to ListIssueComments on.+func TestPlanSpecAudit_NoIssue_NoEmission(t *testing.T) {+ t.Parallel()+ a := require.New(t)+ f := setupPlanUpdateFixture(t, false) // no issue linked++ originalSpec := f.plan.Specs[0]+ _, err := f.ctl.planServiceClient.UpdatePlan(f.ctx, connect.NewRequest(&v1pb.UpdatePlanRequest{+ Plan: &v1pb.Plan{+ Name: f.plan.Name,+ Specs: []*v1pb.Plan_Spec{{+ Id: originalSpec.Id,+ Config: &v1pb.Plan_Spec_ChangeDatabaseConfig{+ ChangeDatabaseConfig: &v1pb.Plan_ChangeDatabaseConfig{+ Targets: []string{f.database.Name},+ Sheet: f.sheet2.Name, // sheet change+ },+ },+ }},+ },+ UpdateMask: &fieldmaskpb.FieldMask{Paths: []string{"specs"}},+ }))+ a.NoError(err)+ a.Nil(f.issue, "fixture intentionally has no linked issue")+}++// TestPlanUpdate_ReorderOnly_NoEmission verifies that reordering specs+// without any other change is treated as cosmetic and produces no+// PlanUpdate audit row.+func TestPlanUpdate_ReorderOnly_NoEmission(t *testing.T) {+ t.Parallel()+ a := require.New(t)+ f := setupPlanUpdateFixture(t, true)++ // Seed: add a second spec so we have something to reorder.+ originalSpec := f.plan.Specs[0]+ secondSpecID := uuid.NewString()+ _, err := f.ctl.planServiceClient.UpdatePlan(f.ctx, connect.NewRequest(&v1pb.UpdatePlanRequest{+ Plan: &v1pb.Plan{+ Name: f.plan.Name,+ Specs: []*v1pb.Plan_Spec{+ originalSpec,+ {+ Id: secondSpecID,+ Config: &v1pb.Plan_Spec_ChangeDatabaseConfig{+ ChangeDatabaseConfig: &v1pb.Plan_ChangeDatabaseConfig{+ Targets: []string{f.database.Name},+ Sheet: f.sheet2.Name,+ },+ },+ },+ },+ },+ UpdateMask: &fieldmaskpb.FieldMask{Paths: []string{"specs"}},+ }))+ a.NoError(err)++ // Read back to get the actual second spec (with any normalized fields).+ planResp, err := f.ctl.planServiceClient.GetPlan(f.ctx, connect.NewRequest(&v1pb.GetPlanRequest{Name: f.plan.Name}))+ a.NoError(err)+ a.Len(planResp.Msg.Specs, 2)+ specs := planResp.Msg.Specs++ // Reorder: swap the two specs, no other change.+ _, err = f.ctl.planServiceClient.UpdatePlan(f.ctx, connect.NewRequest(&v1pb.UpdatePlanRequest{+ Plan: &v1pb.Plan{+ Name: f.plan.Name,+ Specs: []*v1pb.Plan_Spec{specs[1], specs[0]},+ },+ UpdateMask: &fieldmaskpb.FieldMask{Paths: []string{"specs"}},+ }))+ a.NoError(err)++ // Only the seed step's PlanUpdate row should exist; reorder is suppressed.+ events := listPlanUpdateEvents(t, f)+ a.Len(events, 1, "expected only the seed-add PlanUpdate row; reorder must not emit")+}++// TestPlanUpdate_MultiSpec_OneRow verifies that mutating multiple specs+// in one UpdatePlan call produces exactly one PlanUpdate row whose+// snapshots capture all the changes.+func TestPlanUpdate_MultiSpec_OneRow(t *testing.T) {+ t.Parallel()+ a := require.New(t)+ f := setupPlanUpdateFixture(t, true)++ // Seed: add a second spec.+ originalSpec := f.plan.Specs[0]+ secondSpecID := uuid.NewString()+ _, err := f.ctl.planServiceClient.UpdatePlan(f.ctx, connect.NewRequest(&v1pb.UpdatePlanRequest{+ Plan: &v1pb.Plan{+ Name: f.plan.Name,+ Specs: []*v1pb.Plan_Spec{+ originalSpec,+ {+ Id: secondSpecID,+ Config: &v1pb.Plan_Spec_ChangeDatabaseConfig{+ ChangeDatabaseConfig: &v1pb.Plan_ChangeDatabaseConfig{+ Targets: []string{f.database.Name},+ Sheet: f.sheet1.Name,+ },+ },+ },+ },+ },+ UpdateMask: &fieldmaskpb.FieldMask{Paths: []string{"specs"}},+ }))+ a.NoError(err)++ // Multi-mutation: change spec 1's sheet AND toggle spec 2's prior_backup.+ _, err = f.ctl.planServiceClient.UpdatePlan(f.ctx, connect.NewRequest(&v1pb.UpdatePlanRequest{+ Plan: &v1pb.Plan{+ Name: f.plan.Name,+ Specs: []*v1pb.Plan_Spec{+ {+ Id: originalSpec.Id,+ Config: &v1pb.Plan_Spec_ChangeDatabaseConfig{+ ChangeDatabaseConfig: &v1pb.Plan_ChangeDatabaseConfig{+ Targets: []string{f.database.Name},+ Sheet: f.sheet2.Name, // changed+ },+ },+ },+ {+ Id: secondSpecID,+ Config: &v1pb.Plan_Spec_ChangeDatabaseConfig{+ ChangeDatabaseConfig: &v1pb.Plan_ChangeDatabaseConfig{+ Targets: []string{f.database.Name},+ Sheet: f.sheet1.Name,+ EnablePriorBackup: true, // flipped+ },+ },+ },+ },+ },+ UpdateMask: &fieldmaskpb.FieldMask{Paths: []string{"specs"}},+ }))+ a.NoError(err)++ events := listPlanUpdateEvents(t, f)+ a.Len(events, 2, "expected seed-add and multi-mutation PlanUpdate rows")+ multi := events[1]+ a.Len(multi.FromSpecs, 2)+ a.Len(multi.ToSpecs, 2)+ fromByID := map[string]*v1pb.Plan_Spec{}+ for _, s := range multi.FromSpecs {+ fromByID[s.Id] = s+ }+ toByID := map[string]*v1pb.Plan_Spec{}+ for _, s := range multi.ToSpecs {+ toByID[s.Id] = s+ }+ a.Equal(f.sheet1.Name, fromByID[originalSpec.Id].GetChangeDatabaseConfig().GetSheet())+ a.Equal(f.sheet2.Name, toByID[originalSpec.Id].GetChangeDatabaseConfig().GetSheet())+ a.False(fromByID[secondSpecID].GetChangeDatabaseConfig().GetEnablePriorBackup())+ a.True(toByID[secondSpecID].GetChangeDatabaseConfig().GetEnablePriorBackup())+}diff --git a/backend/tests/rollout.go b/backend/tests/rollout.goindex 64ee7475fd..dd1e9964d9 100644--- a/backend/tests/rollout.go+++ b/backend/tests/rollout.go@@ -100,11 +100,11 @@ waitApproval:return err}issue := issueResp.Msg- if issue.ApprovalStatus == v1pb.Issue_APPROVED || issue.ApprovalStatus == v1pb.Issue_SKIPPED {+ if issue.ApprovalStatus == v1pb.ApprovalStatus_APPROVED || issue.ApprovalStatus == v1pb.ApprovalStatus_SKIPPED {break waitApproval}// If the issue is pending approval, approve it (test user should be project owner)- if issue.ApprovalStatus == v1pb.Issue_PENDING {+ if issue.ApprovalStatus == v1pb.ApprovalStatus_PENDING {_, err := ctl.issueServiceClient.ApproveIssue(ctx, connect.NewRequest(&v1pb.ApproveIssueRequest{Name: issueName,}))diff --git a/backend/tests/webhook_helpers_test.go b/backend/tests/webhook_helpers_test.goindex 75ebe744b6..3f6f6310a5 100644--- a/backend/tests/webhook_helpers_test.go+++ b/backend/tests/webhook_helpers_test.go@@ -636,7 +636,7 @@ func waitForApprovalFindingDone(ctx context.Context, t *testing.T, ctl *controllName: issue.Name,}))require.NoError(t, err)- if resp.Msg.ApprovalStatus != v1pb.Issue_CHECKING {+ if resp.Msg.ApprovalStatus != v1pb.ApprovalStatus_CHECKING {return}if time.Now().After(deadline) {@@ -665,7 +665,7 @@ func waitForIssueApproved(ctx context.Context, t *testing.T, ctl *controller, isName: issue.Name,}))require.NoError(t, err)- if resp.Msg.ApprovalStatus == v1pb.Issue_APPROVED {+ if resp.Msg.ApprovalStatus == v1pb.ApprovalStatus_APPROVED {return}if time.Now().After(deadline) {@@ -689,9 +689,9 @@ func waitForIssuePending(ctx context.Context, t *testing.T, ctl *controller, iss}))require.NoError(t, err)switch resp.Msg.ApprovalStatus {- case v1pb.Issue_PENDING:+ case v1pb.ApprovalStatus_PENDING:return- case v1pb.Issue_CHECKING:+ case v1pb.ApprovalStatus_CHECKING:// keep waitingdefault:t.Fatalf("issue %s reached unexpected approval status %s while waiting for PENDING",diff --git a/docs/plans/2026-05-11-plan-mutation-audit-snapshot-design.md b/docs/plans/2026-05-11-plan-mutation-audit-snapshot-design.mdnew file mode 100644index 0000000000..0226f7075a--- /dev/null+++ b/docs/plans/2026-05-11-plan-mutation-audit-snapshot-design.md@@ -0,0 +1,306 @@+# Plan Mutation Audit — Snapshot Design (supersedes 2026-05-09)++Date: 2026-05-11+Author: Steven+Status: Draft (supersedes `2026-05-09-plan-spec-mutation-audit-design.md`)++## TL;DR++Audit `PlanService.UpdatePlan` spec mutations by writing a **before/after snapshot of `plan.config.specs`** to `issue_comment`, instead of typed per-attribute events. One audit row per `UpdatePlan` call (issue-gated). The frontend diffs the snapshot pair and renders per-spec changes.++This supersedes the earlier typed-event design (`PlanSpecAdd` / `PlanSpecRemove` / `PlanSpecUpdate` with `from_*` / `to_*` attribute pairs). The trigger was [PR #20276 review feedback][1]: every new auditable attribute under the typed design costs a coordinated proto + helper + converter + renderer + i18n change, and reorder / `CreatePlan` / `DeletePlan` were explicitly deferred because they didn't fit the typed shape.++[1]: https://github.com/bytebase/bytebase/pull/20276#discussion_r3212945032++## Background++The visibility gap is the same as the earlier design — `BYT-9175`: approvers can't see what an editor changed on a plan during an active approval flow. PR #20032 (still unmerged) covers sheet-only changes. The earlier `2026-05-09` design extended that with typed `PlanSpecUpdate` (sheet + targets + prior_backup) and `PlanSpecAdd` / `PlanSpecRemove`. Reviewer pushed back on the typed approach in PR #20276.++The reviewer's argument, summarized: snapshotting `repeated PlanConfig.Spec` directly is forward-compatible with any future field, covers the deferred non-goals (reorder, `CreatePlan`, `DeletePlan`) for free, and collapses the backend emission to two lines. Storage cost is acceptable because sheets are content-addressed (sha256 only) and `Spec` configs are typically <1KB each. The cost is moving the diff logic from Go into TypeScript.++This design accepts that proposal.++## Goals++1. Approvers can see what changed on a plan they are reviewing — sheet, targets, prior-backup flag, spec adds, spec removes — for plans linked to an issue.+2. Schema is **forward-compatible**: a new field added to `PlanConfig.Spec` is audited automatically with zero backend churn. Only the renderer decides whether to surface it specially or fall through to a JSON-diff fallback.+3. Single uniform event shape — no per-attribute proto messages.+4. No schema migration; no DDL.++## Non-goals++- Plans without a linked issue (G3 in the umbrella doc; deferred to a future `plan_audit` table).+- Self-approval eligibility / editor tracking (the *control* gap from `BYT-9175`).+- Reorder-only audit — order is treated as cosmetic; reorder produces no audit row.+- `CreatePlan` / `DeletePlan` emission paths — the snapshot shape supports them trivially (empty `from_specs` / `to_specs`), but they introduce their own questions (who "created" a plan for audit purposes; semantics of deletion when an issue is still attached). Out of scope here.+- Auditing non-spec plan attributes (title, description, state). Tracked separately if needed.+- Real-time notifications / webhook delivery for plan mutations.++## Decision: Snapshot instead of typed events++| Dimension | Typed events (superseded) | Snapshot (this design) |+|---|---|---|+| New auditable attribute cost | proto + helper + converter + renderer + i18n | renderer only |+| Reorder coverage | non-goal | natural (filtered as cosmetic) |+| `CreatePlan` / `DeletePlan` coverage | non-goal | natural extension (deferred) |+| Storage per row | small typed payload | full Spec snapshot ×2 (sheets are sha256, ~1KB/spec) |+| Diff lives in | Go (backend) | TypeScript (frontend) |+| API consumer cost | event-typed: ready to consume | snapshot: must re-diff if they want per-attribute |+| Field-by-field opt-in to audit | yes | no (audits everything on `Spec`) |++The decision lands on the snapshot side because the forward-compat win is durable and the deferred non-goals fall out for free. The renderer carries more logic, but the diff helper is a pure function with a clean test surface.++## Detailed Design++### 1. Storage proto (`proto/store/store/issue_comment.proto`)++Replace the three typed variants with one snapshot-shaped event:++```proto+import "store/plan.proto";++oneof event {+ Approval approval = 2;+ IssueUpdate issue_update = 3;+ PlanUpdate plan_update = 7;+}++// PlanUpdate carries before/after snapshots of plan.config.specs,+// emitted once per PlanService.UpdatePlan call whose specs branch+// produces a non-cosmetic diff (id-keyed set inequality).+message PlanUpdate {+ repeated PlanConfig.Spec from_specs = 1;+ repeated PlanConfig.Spec to_specs = 2;+}+```++Field number `7` is the same number previously used by `PlanSpecUpdate`. Since neither `PlanSpecUpdate` nor its companions ever landed on `main` (PR #20032 and PR #20276 are both unmerged), there is no wire compatibility constraint and no `reserved` declaration is needed.++### 2. v1 proto (`proto/v1/v1/issue_service.proto`)++Mirror on the public API:++```proto+oneof event {+ Approval approval = 7;+ IssueUpdate issue_update = 8;+ PlanUpdate plan_update = 12;+}++message PlanUpdate {+ repeated Plan.Spec from_specs = 1;+ repeated Plan.Spec to_specs = 2;+}+```++`Plan.Spec` is the v1 type — same shape as storage but with sheet resource names instead of raw sha256s. The converter handles the translation.++### 3. Backend emission (`backend/api/v1/plan_service.go`)++Delete the four helpers introduced in the earlier design (`getPlanSpecSheetSha256`, `getPlanSpecTargets`, `getPlanSpecEnablePriorBackup`, `buildPlanSpecAuditIssueComments`). Replace with a single 12-line helper that detects cosmetic-only diffs:++```go+// planSpecsEqualSet reports whether two spec slices have the same set of+// specs keyed by id, with each pair byte-equal under proto.Equal. Order+// is ignored — reorder-only diffs are not audited.+func planSpecsEqualSet(a, b []*storepb.PlanConfig_Spec) bool {+ if len(a) != len(b) {+ return false+ }+ byID := make(map[string]*storepb.PlanConfig_Spec, len(a))+ for _, s := range a {+ byID[s.GetId()] = s+ }+ for _, s := range b {+ other, ok := byID[s.GetId()]+ if !ok || !proto.Equal(s, other) {+ return false+ }+ }+ return true+}+```++The call site under `case "specs":` becomes:++```go+if issue != nil {+ if !planSpecsEqualSet(oldPlan.Config.GetSpecs(), allSpecs) {+ issueCommentCreates = append(issueCommentCreates, &store.IssueCommentMessage{+ ProjectID: issue.ProjectID,+ IssueUID: issue.UID,+ Payload: &storepb.IssueCommentPayload{+ Event: &storepb.IssueCommentPayload_PlanUpdate_{+ PlanUpdate: &storepb.IssueCommentPayload_PlanUpdate{+ FromSpecs: oldPlan.Config.GetSpecs(),+ ToSpecs: allSpecs,+ },+ },+ },+ })+ }+ // ... existing approval-finding reset logic unchanged ...+}+```++Self-approval reset and approval-template re-run logic are unchanged.++### 4. Backend converter (`backend/api/v1/issue_service_converter.go`)++Delete two trivial converters (`...PlanSpecAdd`, `...PlanSpecRemove`). Replace the third:++```go+func convertToIssueCommentEventPlanUpdate(projectID string, u *storepb.IssueCommentPayload_PlanUpdate_) *v1pb.IssueComment_PlanUpdate_ {+ return &v1pb.IssueComment_PlanUpdate_{+ PlanUpdate: &v1pb.IssueComment_PlanUpdate{+ FromSpecs: convertToPlanSpecs(projectID, u.PlanUpdate.GetFromSpecs()),+ ToSpecs: convertToPlanSpecs(projectID, u.PlanUpdate.GetToSpecs()),+ },+ }+}+```++`convertToPlanSpecs` is the existing storage → v1 converter used by the live-plan view; we reuse it verbatim.++### 5. Frontend renderer (`IssueDetailCommentList.tsx`)++The diff logic moves into a pure helper alongside the renderer:++```ts+// frontend/src/react/pages/project/issue-detail/utils/diffPlanSpecs.ts++type SpecDiffEntry =+ | { kind: "added"; spec: Plan_Spec }+ | { kind: "removed"; spec: Plan_Spec }+ | {+ kind: "updated";+ specId: string;+ from: Plan_Spec;+ to: Plan_Spec;+ sheetChanged: boolean;+ targetsChanged: boolean;+ priorBackupChanged: boolean;+ otherChanged: boolean;+ };++function diffPlanSpecs(from: Plan_Spec[], to: Plan_Spec[]): SpecDiffEntry[];+```++`otherChanged` flags the case where the audit payload contains a `Spec` field difference the renderer doesn't recognize (a future attribute). The renderer falls back to a generic "Change <id8> updated" row with a `<details>` JSON-diff toggle.++The renderer dispatch becomes:++```tsx+if (commentType === IssueCommentType.PLAN_UPDATE &&+ issueComment.event.case === "planUpdate") {+ const { fromSpecs, toSpecs } = issueComment.event.value;+ const entries = diffPlanSpecs(fromSpecs, toSpecs);+ if (entries.length === 0) return null;+ return (+ <div className="flex flex-col gap-1">+ {entries.map((entry) => <SpecDiffRow key={diffEntryKey(entry)} entry={entry} />)}+ </div>+ );+}+```++`SpecDiffRow` switches on `entry.kind` and renders the same three shapes the typed-event design rendered, reusing the existing `SpecChangeRow`, `joinFragments`, `IssueDetailStatementUpdateButton` components.++#### Reused from PR #20276++- `SpecChangeRow` (chip + trailing slot for `[View Details]`)+- `joinFragments` (`common.and`-joined attribute fragments inside a row)+- `IssueDetailStatementUpdateButton` (including one-sided-sheet fallback)+- `?spec=<id>` deep-link in `ProjectIssueDetailPage` (chip click selects spec inline)+- All six i18n keys (`added`, `removed`, `modified-sql-of`, `changed-targets-of`, `enabled-prior-backup-on`, `disabled-prior-backup-on`) in both Vue and React locale trees+- Spec UUID-prefix chip (first 8 chars, stable across add/remove churn)+- Diff viewer height fix (viewport-sized Monaco)+- `UpdateIssue` no-op guard (backend `continue` + frontend `saveTitle` short-circuit)++#### `IssueCommentType` classifier++Drop `PLAN_SPEC_ADD` / `PLAN_SPEC_REMOVE`. Rename `PLAN_SPEC_UPDATE` → `PLAN_UPDATE`. Classifier dispatches on `event.case === "planUpdate"`.++#### `CommentActionIcon`++A single `PLAN_UPDATE` icon (`Pencil`). Per-entry add/remove icons aren't shown at the row level — they live inside `SpecDiffRow` if needed, but for now the entry text alone is enough.++### 6. Issue-gating (G3 still deferred)++Audit emission is still gated on `issue != nil`. Plans without a linked issue produce no audit row. This matches PR #20276 and the umbrella design's G3 deferral. The future `plan_audit` table (Approach 3) remains the path to closing the gap, and is independent of this PR's shape decision.++### 7. Migration from PR #20276++PR #20276 is open with the typed-event implementation. We force-push the snapshot rewrite onto the same branch (`feat/plan-spec-mutation-audit-a2`). Field number `7` (storage) and `12` (v1) are reused since no production data carries the old shape. The existing review thread stays attached to the diff.++### 8. Storage cost++Sheets are content-addressed via `sheet_sha256`, so snapshots do not carry SQL bytes. A typical `ChangeDatabaseConfig` spec serializes to <1KB protojson. A plan with 20 specs edited 100 times = ~4MB of `issue_comment` payload across the issue's timeline. JSONB tolerates this comfortably. Worst-case (hundreds of specs per plan + many edits) gets larger but stays within reasonable bounds; revisit if a customer surfaces a problem.++## Testing++### Backend unit++- `TestPlanSpecsEqualSet` — table-driven, 6 cases (identical, reorder, added, removed, sheet diff, targets diff, prior-backup diff).+- The 9-case `TestBuildPlanSpecAuditIssueComments` from the typed design is **deleted** along with the helper.++### Backend integration (`backend/tests/plan_update_test.go`)++All five original scenarios kept, assertions retargeted to the new `PlanUpdate` shape via `listPlanUpdateEvents` (renamed from `listPlanSpecAuditEvents`). Two new tests:++- `TestPlanUpdate_ReorderOnly_NoEmission` — verifies the cosmetic-reorder filter.+- `TestPlanUpdate_MultiSpec_OneRow` — verifies that mutating multiple specs in one `UpdatePlan` call produces exactly one `PlanUpdate` row.++The shared fixture (`setupPlanUpdateFixture`) and the no-issue test (`TestPlanSpecAudit_NoIssue_NoEmission`) carry over unchanged.++### Composite-PK collision test++`TestCollision_PlanSpecAuditEmission` retargeted to emit a `PlanUpdate` row in project A; assertion that project B's snapshot is untouched. `snapshotProject` / `assertProjectUnchanged` extensions covering `issue_comment` rows (added in PR #20276) carry over.++### Frontend unit (new — `diffPlanSpecs.test.ts`)++Table-driven, ~10 cases:++- empty / empty → []+- one added+- one removed+- sheet sha changed → `updated`, `sheetChanged: true`+- targets changed → `updated`, `targetsChanged: true`+- prior_backup flipped → `updated`, `priorBackupChanged: true`+- all three changed in one spec → one `updated` entry with all three flags set+- reorder-only → []+- mixed (add + remove + update) → three entries+- unknown attribute changed → `updated` with `otherChanged: true`++### Manual UI verification++Same four scenarios as PR #20276 plus two new ones:++- Multi-spec change in one save → one comment row with multiple visual entries.+- Reorder-only edit → no new comment row appears.++## Open questions++- The fallback rendering for `otherChanged: true` (unknown attribute) uses a generic "Change <id8> updated" with a JSON-diff toggle. The visual treatment can be polished later — the design just commits to "render *something* recognizable rather than silently dropping the row."+- Spec id is the only identity we have. If a user adds and immediately removes a spec with the same UUID across separate `UpdatePlan` calls, the timeline shows two rows; the rendering correctly distinguishes them.++## Future work++- **Approach 3** (`plan_audit` table parented to `plan`) closes G3. With the snapshot shape, A2→A3 migration is a near-1:1 row copy: same payload, different table.+- **`CreatePlan` / `DeletePlan` emission** via the same `PlanUpdate` shape (empty `from_specs` or `to_specs`).+- **Reorder audit** if a real user need surfaces. The diff helper already detects reorder; we just chose to filter it out.+- **Self-approval eligibility / editor tracking** — separate workstream addressing the *control* gap from `BYT-9175`.++## References++- PR #20276 review comment driving this redesign: https://github.com/bytebase/bytebase/pull/20276#discussion_r3212945032+- Superseded design: `docs/plans/2026-05-09-plan-spec-mutation-audit-design.md`+- Superseded implementation plan: `docs/plans/2026-05-09-plan-spec-mutation-audit.md`+- Umbrella design: `Design Doc: Plan Mutation Audit` (Apr 20 2026)+- `BYT-9175` — approval-workflow visibility issue+- `proto/store/store/issue_comment.proto`+- `proto/v1/v1/issue_service.proto`+- `proto/store/store/plan.proto` (`PlanConfig.Spec` shape)+- `backend/api/v1/plan_service.go` (`UpdatePlan` `case "specs":` branch)+- `backend/api/v1/issue_service_converter.go` (`convertToIssueComment` dispatch)+- `frontend/src/react/pages/project/issue-detail/components/IssueDetailCommentList.tsx`diff --git a/docs/plans/2026-05-11-plan-mutation-audit-snapshot.md b/docs/plans/2026-05-11-plan-mutation-audit-snapshot.mdnew file mode 100644index 0000000000..9a7d8725a3--- /dev/null+++ b/docs/plans/2026-05-11-plan-mutation-audit-snapshot.md@@ -0,0 +1,1608 @@+# Plan Mutation Audit (Snapshot) Implementation Plan++> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.++**Goal:** Replace the typed `PlanSpecAdd` / `PlanSpecRemove` / `PlanSpecUpdate` audit events currently on `feat/plan-spec-mutation-audit-a2` with a single `PlanUpdate` snapshot event carrying `from_specs` / `to_specs`. Move the per-spec diff logic into a pure TypeScript helper next to the renderer.++**Architecture:** Proto replaces three messages with one. Backend emission collapses to a 12-line set-equality guard + direct snapshot copy. Frontend gains a pure `diffPlanSpecs` helper consumed by a new `SpecDiffRow` component that reuses the existing `SpecChangeRow` / `joinFragments` / `IssueDetailStatementUpdateButton` building blocks.++**Tech Stack:** protobuf (buf), Go (backend), React + TypeScript (frontend), vitest (frontend unit tests).++**Pre-state:** This plan rewrites work already on `feat/plan-spec-mutation-audit-a2` (open PR #20276). Steps assume you're on that branch with all PR #20276 commits present. The final task force-pushes the rewrite.++---++## File Structure++### Modified++| File | Change |+|---|---|+| `proto/store/store/issue_comment.proto` | Replace `PlanSpecUpdate` + `PlanSpecAdd` + `PlanSpecRemove` with `PlanUpdate` |+| `proto/v1/v1/issue_service.proto` | Same shape on public API |+| `backend/api/v1/plan_service.go` | Delete 4 helpers + `buildPlanSpecAuditIssueComments`; add `planSpecsEqualSet`; rewire `UpdatePlan` |+| `backend/api/v1/plan_service_test.go` | Delete tests for deleted helpers; add `TestPlanSpecsEqualSet` |+| `backend/api/v1/issue_service_converter.go` | Delete 2 converters; replace third; update dispatch |+| `backend/tests/plan_update_test.go` | Retarget assertions; rename `listPlanSpecAuditEvents` → `listPlanUpdateEvents`; add 2 new tests |+| `backend/tests/plan_audit_collision_test.go` | Retarget action + assertion to `PlanUpdate` |+| `frontend/src/store/modules/v1/issueComment.ts` | Drop `PLAN_SPEC_ADD` / `PLAN_SPEC_REMOVE`; rename `PLAN_SPEC_UPDATE` → `PLAN_UPDATE` |+| `frontend/src/react/pages/project/issue-detail/components/IssueDetailCommentList.tsx` | Replace 3 dispatch branches with 1 `planUpdate` branch + new `SpecDiffRow` component |++### Created++| File | Purpose |+|---|---|+| `frontend/src/react/pages/project/issue-detail/utils/diffPlanSpecs.ts` | Pure diff helper |+| `frontend/src/react/pages/project/issue-detail/utils/__tests__/diffPlanSpecs.test.ts` | Vitest table-test |++### Untouched (already on branch, ship as-is)++- `SpecChangeRow`, `joinFragments`, `IssueDetailStatementUpdateButton` in `IssueDetailCommentList.tsx`+- `?spec=` deep-link wiring in `ProjectIssueDetailPage.tsx`+- View Details dialog height fix+- `UpdateIssue` no-op guard (backend + frontend)+- All 6 i18n keys in both Vue and React locale trees+- `snapshotProject` / `assertProjectUnchanged` extensions covering `issue_comment` rows in `collision_helper_test.go`++---++## Task 1: Replace proto with PlanUpdate++**Files:**+- Modify: `proto/store/store/issue_comment.proto`+- Modify: `proto/v1/v1/issue_service.proto`++- [ ] **Step 1: Rewrite storage proto**++Edit `proto/store/store/issue_comment.proto`. Replace the `IssueCommentPayload` oneof and the three current `PlanSpec*` messages:++```proto+syntax = "proto3";++package bytebase.store;++import "store/approval.proto";+import "store/issue.proto";+import "store/plan.proto";++option go_package = "generated-go/store";++message IssueCommentPayload {+ string comment = 1;++ oneof event {+ Approval approval = 2;+ IssueUpdate issue_update = 3;+ PlanUpdate plan_update = 7;+ }++ message Approval {+ IssuePayloadApproval.Approver.Status status = 1;+ }++ message IssueUpdate {+ optional string from_title = 1;+ optional string to_title = 2;+ optional string from_description = 3;+ optional string to_description = 4;+ optional Issue.Status from_status = 5;+ optional Issue.Status to_status = 6;+ repeated string from_labels = 7;+ repeated string to_labels = 8;+ }++ // PlanUpdate carries before/after snapshots of plan.config.specs,+ // emitted once per PlanService.UpdatePlan call whose specs branch+ // produces a non-cosmetic diff. The renderer computes per-spec+ // add/remove/update from the snapshot pair.+ message PlanUpdate {+ repeated PlanConfig.Spec from_specs = 1;+ repeated PlanConfig.Spec to_specs = 2;+ }+}+```++- [ ] **Step 2: Rewrite v1 proto**++Edit `proto/v1/v1/issue_service.proto`. Locate the `IssueComment` message (around line 595). Replace the `oneof event { ... }` block and the three `PlanSpec*` message definitions with:++```proto+// The event associated with this comment.+oneof event {+ // Approval event.+ Approval approval = 7;+ // Issue update event.+ IssueUpdate issue_update = 8;+ // Plan update event.+ PlanUpdate plan_update = 12;+}+```++And replace the three `message PlanSpec*` blocks with:++```proto+// Plan update event information (snapshot of plan.config.specs before+// and after a PlanService.UpdatePlan call that mutated specs).+message PlanUpdate {+ repeated Plan.Spec from_specs = 1;+ repeated Plan.Spec to_specs = 2;+}+```++- [ ] **Step 3: Format and lint**++```bash+buf format -w proto+buf lint proto+```++Expected: no output (no errors).++- [ ] **Step 4: Regenerate**++```bash+cd proto && buf generate && cd ..+```++Expected: regenerated files under `backend/generated-go/` and `frontend/src/types/proto-es/`. The build is intentionally broken at this point — callers still reference the deleted `IssueCommentPayload_PlanSpec*` types. Subsequent tasks fix them.++- [ ] **Step 5: Stage but do not commit yet**++```bash+git add proto/store/store/issue_comment.proto proto/v1/v1/issue_service.proto backend/generated-go/ frontend/src/types/proto-es/v1/ proto/gen/grpc-doc/ backend/api/mcp/gen/openapi.yaml+```++Don't commit. The commit lands at the end of Task 3 when the backend compiles again.++---++## Task 2: Replace backend emission helpers++**Files:**+- Modify: `backend/api/v1/plan_service.go`+- Modify: `backend/api/v1/plan_service_test.go`++- [ ] **Step 1: Delete the old helpers and tests**++In `backend/api/v1/plan_service.go`, delete:+- `getPlanSpecSheetSha256`+- `getPlanSpecTargets`+- `getPlanSpecEnablePriorBackup`+- `buildPlanSpecAuditIssueComments`++In `backend/api/v1/plan_service_test.go`, delete:+- `TestGetPlanSpecSheetSha256`+- `TestGetPlanSpecTargets`+- `TestGetPlanSpecEnablePriorBackup`+- `TestBuildPlanSpecAuditIssueComments`+- The `cdcSpec` helper (no longer needed)++The test file will be near-empty after deletion. Step 4 below adds one test back.++- [ ] **Step 2: Add the new helper to plan_service.go**++In `backend/api/v1/plan_service.go`, find the convertPlanSpecs function (around line 1090 in the pre-rewrite state) and add **above** it:++```go+// planSpecsEqualSet reports whether two spec slices have the same set of+// specs keyed by id, with each pair byte-equal under proto.Equal. Order+// is ignored — reorder-only diffs are not audited.+func planSpecsEqualSet(a, b []*storepb.PlanConfig_Spec) bool {+ if len(a) != len(b) {+ return false+ }+ byID := make(map[string]*storepb.PlanConfig_Spec, len(a))+ for _, s := range a {+ byID[s.GetId()] = s+ }+ for _, s := range b {+ other, ok := byID[s.GetId()]+ if !ok || !proto.Equal(s, other) {+ return false+ }+ }+ return true+}+```++The `proto` import is already present in the file (used elsewhere). Verify it's there:++```bash+grep -n '"google.golang.org/protobuf/proto"' backend/api/v1/plan_service.go+```++Expected output: one matching line.++- [ ] **Step 3: Update the UpdatePlan call site**++In `backend/api/v1/plan_service.go`, find the call site in the `case "specs":` branch under `UpdatePlan` (currently appends to `issueCommentCreates` via `buildPlanSpecAuditIssueComments`). Locate this block:++```go+ if issue != nil {+ issueCommentCreates = append(issueCommentCreates, buildPlanSpecAuditIssueComments(issue.ProjectID, issue.UID, oldPlan.UID, oldPlan.Config.GetSpecs(), allSpecs)...)+ // Reset approval finding status+ ...+```++Replace the `issueCommentCreates = append(...)` line (only that one line) with:++```go+ if !planSpecsEqualSet(oldPlan.Config.GetSpecs(), allSpecs) {+ issueCommentCreates = append(issueCommentCreates, &store.IssueCommentMessage{+ ProjectID: issue.ProjectID,+ IssueUID: issue.UID,+ Payload: &storepb.IssueCommentPayload{+ Event: &storepb.IssueCommentPayload_PlanUpdate_{+ PlanUpdate: &storepb.IssueCommentPayload_PlanUpdate{+ FromSpecs: oldPlan.Config.GetSpecs(),+ ToSpecs: allSpecs,+ },+ },+ },+ })+ }+```++The surrounding `if issue != nil { ... }` and approval-finding-reset logic stay unchanged.++- [ ] **Step 4: Write the failing test for planSpecsEqualSet**++Append to `backend/api/v1/plan_service_test.go`:++```go+package v1++import (+ "testing"++ "github.com/stretchr/testify/assert"++ storepb "github.com/bytebase/bytebase/backend/generated-go/store"+)++func cdcSpec(id, sheet string, targets []string, priorBackup bool) *storepb.PlanConfig_Spec {+ return &storepb.PlanConfig_Spec{+ Id: id,+ Config: &storepb.PlanConfig_Spec_ChangeDatabaseConfig{+ ChangeDatabaseConfig: &storepb.PlanConfig_ChangeDatabaseConfig{+ SheetSha256: sheet,+ Targets: targets,+ EnablePriorBackup: priorBackup,+ },+ },+ }+}++func TestPlanSpecsEqualSet(t *testing.T) {+ cases := []struct {+ name string+ a, b []*storepb.PlanConfig_Spec+ want bool+ }{+ {+ name: "both nil",+ a: nil,+ b: nil,+ want: true,+ },+ {+ name: "identical single spec",+ a: []*storepb.PlanConfig_Spec{cdcSpec("s1", "sha1", []string{"db1"}, false)},+ b: []*storepb.PlanConfig_Spec{cdcSpec("s1", "sha1", []string{"db1"}, false)},+ want: true,+ },+ {+ name: "same set reordered",+ a: []*storepb.PlanConfig_Spec{+ cdcSpec("s1", "sha1", []string{"db1"}, false),+ cdcSpec("s2", "sha2", []string{"db2"}, false),+ },+ b: []*storepb.PlanConfig_Spec{+ cdcSpec("s2", "sha2", []string{"db2"}, false),+ cdcSpec("s1", "sha1", []string{"db1"}, false),+ },+ want: true,+ },+ {+ name: "added spec",+ a: []*storepb.PlanConfig_Spec{cdcSpec("s1", "sha1", []string{"db1"}, false)},+ b: []*storepb.PlanConfig_Spec{+ cdcSpec("s1", "sha1", []string{"db1"}, false),+ cdcSpec("s2", "sha2", []string{"db2"}, false),+ },+ want: false,+ },+ {+ name: "removed spec",+ a: []*storepb.PlanConfig_Spec{+ cdcSpec("s1", "sha1", []string{"db1"}, false),+ cdcSpec("s2", "sha2", []string{"db2"}, false),+ },+ b: []*storepb.PlanConfig_Spec{cdcSpec("s1", "sha1", []string{"db1"}, false)},+ want: false,+ },+ {+ name: "same id sheet differs",+ a: []*storepb.PlanConfig_Spec{cdcSpec("s1", "sha1", []string{"db1"}, false)},+ b: []*storepb.PlanConfig_Spec{cdcSpec("s1", "sha2", []string{"db1"}, false)},+ want: false,+ },+ {+ name: "same id targets differ",+ a: []*storepb.PlanConfig_Spec{cdcSpec("s1", "sha1", []string{"db1"}, false)},+ b: []*storepb.PlanConfig_Spec{cdcSpec("s1", "sha1", []string{"db1", "db2"}, false)},+ want: false,+ },+ {+ name: "same id prior_backup differs",+ a: []*storepb.PlanConfig_Spec{cdcSpec("s1", "sha1", []string{"db1"}, false)},+ b: []*storepb.PlanConfig_Spec{cdcSpec("s1", "sha1", []string{"db1"}, true)},+ want: false,+ },+ }+ for _, tc := range cases {+ t.Run(tc.name, func(t *testing.T) {+ assert.Equal(t, tc.want, planSpecsEqualSet(tc.a, tc.b))+ })+ }+}+```++- [ ] **Step 5: Build and run the unit test**++```bash+go build ./backend/...+go test -v -count=1 github.com/bytebase/bytebase/backend/api/v1 -run '^TestPlanSpecsEqualSet$'+```++Expected: build succeeds (proto generated types now match call sites in plan_service.go). All 8 sub-cases PASS.++If the build still fails with references to `IssueCommentPayload_PlanSpecUpdate_`, `IssueCommentPayload_PlanSpecAdd_`, or `IssueCommentPayload_PlanSpecRemove_`, those references are in `issue_service_converter.go` — they are addressed in Task 3, which must run before the build will succeed end-to-end. In that case, complete Task 3 first, then re-run this step.++- [ ] **Step 6: Stage but do not commit yet**++```bash+git add backend/api/v1/plan_service.go backend/api/v1/plan_service_test.go+```++Commit lands at the end of Task 3.++---++## Task 3: Replace backend converter++**Files:**+- Modify: `backend/api/v1/issue_service_converter.go`++- [ ] **Step 1: Update the dispatch switch**++In `backend/api/v1/issue_service_converter.go`, find `convertToIssueComment` (around line 294). Locate the dispatch switch:++```go+ switch e := ic.Payload.Event.(type) {+ case *storepb.IssueCommentPayload_Approval_:+ r.Event = convertToIssueCommentEventApproval(e)+ case *storepb.IssueCommentPayload_IssueUpdate_:+ r.Event = convertToIssueCommentEventIssueUpdate(e)+ case *storepb.IssueCommentPayload_PlanSpecUpdate_:+ projectID, _, _ := common.GetProjectIDIssueUID(issueName)+ r.Event = convertToIssueCommentEventPlanSpecUpdate(projectID, e)+ case *storepb.IssueCommentPayload_PlanSpecAdd_:+ r.Event = convertToIssueCommentEventPlanSpecAdd(e)+ case *storepb.IssueCommentPayload_PlanSpecRemove_:+ r.Event = convertToIssueCommentEventPlanSpecRemove(e)+ default:+ }+```++Replace it with:++```go+ switch e := ic.Payload.Event.(type) {+ case *storepb.IssueCommentPayload_Approval_:+ r.Event = convertToIssueCommentEventApproval(e)+ case *storepb.IssueCommentPayload_IssueUpdate_:+ r.Event = convertToIssueCommentEventIssueUpdate(e)+ case *storepb.IssueCommentPayload_PlanUpdate_:+ projectID, _, _ := common.GetProjectIDIssueUID(issueName)+ r.Event = convertToIssueCommentEventPlanUpdate(projectID, e)+ default:+ }+```++- [ ] **Step 2: Replace the converters**++In the same file, find `convertToIssueCommentEventPlanSpecUpdate`, `convertToIssueCommentEventPlanSpecAdd`, and `convertToIssueCommentEventPlanSpecRemove`. Delete all three. Replace them with a single function:++```go+func convertToIssueCommentEventPlanUpdate(projectID string, u *storepb.IssueCommentPayload_PlanUpdate_) *v1pb.IssueComment_PlanUpdate_ {+ return &v1pb.IssueComment_PlanUpdate_{+ PlanUpdate: &v1pb.IssueComment_PlanUpdate{+ FromSpecs: convertToPlanSpecs(projectID, u.PlanUpdate.GetFromSpecs()),+ ToSpecs: convertToPlanSpecs(projectID, u.PlanUpdate.GetToSpecs()),+ },+ }+}+```++`convertToPlanSpecs` lives in `plan_service.go` and is already used by the live-plan view; we reuse it.++- [ ] **Step 3: Build**++```bash+go build ./backend/...+```++Expected: no output (clean build).++- [ ] **Step 4: Commit Tasks 1–3 together**++```bash+git add backend/api/v1/issue_service_converter.go+git commit -m "$(cat <<'EOF'+refactor(plan): switch spec audit to snapshot-based PlanUpdate event++Replaces the typed PlanSpecAdd / PlanSpecRemove / PlanSpecUpdate+events with a single PlanUpdate message carrying before/after+snapshots of plan.config.specs. Driven by PR #20276 review:+the snapshot shape is forward-compatible with new Spec fields,+covers reorder / CreatePlan / DeletePlan trivially, and collapses+the backend emission to a 12-line set-equality guard.++Deletes:+- buildPlanSpecAuditIssueComments+- getPlanSpecSheetSha256 / getPlanSpecTargets / getPlanSpecEnablePriorBackup+- convertToIssueCommentEventPlanSpecAdd / ...PlanSpecRemove+- their unit tests++Adds:+- planSpecsEqualSet (reorder-as-cosmetic filter)+- TestPlanSpecsEqualSet+- convertToIssueCommentEventPlanUpdate++EOF+)"+```++---++## Task 4: Retarget backend integration tests++**Files:**+- Modify: `backend/tests/plan_update_test.go`++- [ ] **Step 1: Rename listPlanSpecAuditEvents**++In `backend/tests/plan_update_test.go`, find the function:++```go+func listPlanSpecAuditEvents(t *testing.T, f *planUpdateFixture) (+ adds []*v1pb.IssueComment_PlanSpecAdd,+ removes []*v1pb.IssueComment_PlanSpecRemove,+ updates []*v1pb.IssueComment_PlanSpecUpdate,+) {+```++Replace the function entirely with:++```go+// listPlanUpdateEvents returns the PlanUpdate event payloads from the+// issue's comment list, in the order the API returned them.+func listPlanUpdateEvents(t *testing.T, f *planUpdateFixture) []*v1pb.IssueComment_PlanUpdate {+ t.Helper()+ a := require.New(t)+ resp, err := f.ctl.issueServiceClient.ListIssueComments(f.ctx, connect.NewRequest(&v1pb.ListIssueCommentsRequest{+ Parent: f.issue.Name,+ }))+ a.NoError(err)+ var out []*v1pb.IssueComment_PlanUpdate+ for _, c := range resp.Msg.IssueComments {+ if x := c.GetPlanUpdate(); x != nil {+ out = append(out, x)+ }+ }+ return out+}+```++- [ ] **Step 2: Retarget `TestPlanSpecUpdate_SheetChange_EmitsIssueComment`**++Find the test (it asserts on sheet sha changing via the old `updates` slice). Replace its assertion block (everything from `adds, removes, updates := listPlanSpecAuditEvents(t, f)` onward) with:++```go+ events := listPlanUpdateEvents(t, f)+ a.Len(events, 1)+ ev := events[0]+ a.Len(ev.FromSpecs, 1)+ a.Len(ev.ToSpecs, 1)+ a.Equal(originalSpec.Id, ev.FromSpecs[0].Id)+ a.Equal(originalSpec.Id, ev.ToSpecs[0].Id)+ a.Equal(f.sheet1.Name, ev.FromSpecs[0].GetChangeDatabaseConfig().GetSheet())+ a.Equal(f.sheet2.Name, ev.ToSpecs[0].GetChangeDatabaseConfig().GetSheet())+```++- [ ] **Step 3: Retarget `TestPlanSpecAdd_EmitsIssueComment`**++Replace its assertion block with:++```go+ events := listPlanUpdateEvents(t, f)+ a.Len(events, 1)+ ev := events[0]+ a.Len(ev.FromSpecs, 1)+ a.Len(ev.ToSpecs, 2)+ a.Equal(originalSpec.Id, ev.FromSpecs[0].Id)+ // Both old and new ids are present in the after-snapshot.+ idsAfter := map[string]bool{}+ for _, s := range ev.ToSpecs {+ idsAfter[s.Id] = true+ }+ a.True(idsAfter[originalSpec.Id])+ a.True(idsAfter[newSpecID])+```++- [ ] **Step 4: Retarget `TestPlanSpecRemove_EmitsIssueComment`**++This test does two `UpdatePlan` calls (seed add + remove). Both produce a `PlanUpdate` row now. Replace its assertion block with:++```go+ events := listPlanUpdateEvents(t, f)+ a.Len(events, 2, "expected two PlanUpdate rows: seed add + removal")+ // Second event is the removal: from has both specs, to has only the original.+ removal := events[1]+ a.Len(removal.FromSpecs, 2)+ a.Len(removal.ToSpecs, 1)+ a.Equal(originalSpec.Id, removal.ToSpecs[0].Id)+```++- [ ] **Step 5: Retarget `TestPlanSpecUpdate_TargetsChange_EmitsIssueComment`**++Replace its assertion block with:++```go+ events := listPlanUpdateEvents(t, f)+ a.Len(events, 1)+ ev := events[0]+ a.Len(ev.FromSpecs, 1)+ a.Len(ev.ToSpecs, 1)+ a.Equal([]string{f.database.Name}, ev.FromSpecs[0].GetChangeDatabaseConfig().GetTargets())+ a.Equal([]string{f.database.Name, db2Resp.Msg.Name}, ev.ToSpecs[0].GetChangeDatabaseConfig().GetTargets())+ a.Equal(f.sheet1.Name, ev.FromSpecs[0].GetChangeDatabaseConfig().GetSheet())+ a.Equal(f.sheet1.Name, ev.ToSpecs[0].GetChangeDatabaseConfig().GetSheet())+```++- [ ] **Step 6: Retarget `TestPlanSpecUpdate_PriorBackupToggle_EmitsIssueComment`**++Replace its assertion block with:++```go+ events := listPlanUpdateEvents(t, f)+ a.Len(events, 1)+ ev := events[0]+ a.Len(ev.FromSpecs, 1)+ a.Len(ev.ToSpecs, 1)+ a.False(ev.FromSpecs[0].GetChangeDatabaseConfig().GetEnablePriorBackup())+ a.True(ev.ToSpecs[0].GetChangeDatabaseConfig().GetEnablePriorBackup())+```++- [ ] **Step 7: `TestPlanSpecAudit_NoIssue_NoEmission` stays unchanged**++Verify with `grep`:++```bash+grep -n "TestPlanSpecAudit_NoIssue_NoEmission" backend/tests/plan_update_test.go+```++Expected: one match. The test asserts no audit is emitted when there's no issue. The current assertion (`a.Nil(f.issue, ...)`) is correct regardless of audit shape — no changes needed.++- [ ] **Step 8: Add `TestPlanUpdate_ReorderOnly_NoEmission`**++Append to `backend/tests/plan_update_test.go`:++```go+// TestPlanUpdate_ReorderOnly_NoEmission verifies that reordering specs+// without any other change is treated as cosmetic and produces no+// PlanUpdate audit row.+func TestPlanUpdate_ReorderOnly_NoEmission(t *testing.T) {+ t.Parallel()+ a := require.New(t)+ f := setupPlanUpdateFixture(t, true)++ // Seed: add a second spec so we have something to reorder.+ originalSpec := f.plan.Specs[0]+ secondSpecID := uuid.NewString()+ _, err := f.ctl.planServiceClient.UpdatePlan(f.ctx, connect.NewRequest(&v1pb.UpdatePlanRequest{+ Plan: &v1pb.Plan{+ Name: f.plan.Name,+ Specs: []*v1pb.Plan_Spec{+ originalSpec,+ {+ Id: secondSpecID,+ Config: &v1pb.Plan_Spec_ChangeDatabaseConfig{+ ChangeDatabaseConfig: &v1pb.Plan_ChangeDatabaseConfig{+ Targets: []string{f.database.Name},+ Sheet: f.sheet2.Name,+ },+ },+ },+ },+ },+ UpdateMask: &fieldmaskpb.FieldMask{Paths: []string{"specs"}},+ }))+ a.NoError(err)++ // Read back to get the actual second spec (with any normalized fields).+ planResp, err := f.ctl.planServiceClient.GetPlan(f.ctx, connect.NewRequest(&v1pb.GetPlanRequest{Name: f.plan.Name}))+ a.NoError(err)+ a.Len(planResp.Msg.Specs, 2)+ specs := planResp.Msg.Specs++ // Reorder: swap the two specs, no other change.+ _, err = f.ctl.planServiceClient.UpdatePlan(f.ctx, connect.NewRequest(&v1pb.UpdatePlanRequest{+ Plan: &v1pb.Plan{+ Name: f.plan.Name,+ Specs: []*v1pb.Plan_Spec{specs[1], specs[0]},+ },+ UpdateMask: &fieldmaskpb.FieldMask{Paths: []string{"specs"}},+ }))+ a.NoError(err)++ // Only the seed step's PlanUpdate row should exist; reorder is suppressed.+ events := listPlanUpdateEvents(t, f)+ a.Len(events, 1, "expected only the seed-add PlanUpdate row; reorder must not emit")+}+```++- [ ] **Step 9: Add `TestPlanUpdate_MultiSpec_OneRow`**++Append to the same file:++```go+// TestPlanUpdate_MultiSpec_OneRow verifies that mutating multiple specs+// in one UpdatePlan call produces exactly one PlanUpdate row whose+// snapshots capture all the changes.+func TestPlanUpdate_MultiSpec_OneRow(t *testing.T) {+ t.Parallel()+ a := require.New(t)+ f := setupPlanUpdateFixture(t, true)++ // Seed: add a second spec.+ originalSpec := f.plan.Specs[0]+ secondSpecID := uuid.NewString()+ _, err := f.ctl.planServiceClient.UpdatePlan(f.ctx, connect.NewRequest(&v1pb.UpdatePlanRequest{+ Plan: &v1pb.Plan{+ Name: f.plan.Name,+ Specs: []*v1pb.Plan_Spec{+ originalSpec,+ {+ Id: secondSpecID,+ Config: &v1pb.Plan_Spec_ChangeDatabaseConfig{+ ChangeDatabaseConfig: &v1pb.Plan_ChangeDatabaseConfig{+ Targets: []string{f.database.Name},+ Sheet: f.sheet1.Name,+ },+ },+ },+ },+ },+ UpdateMask: &fieldmaskpb.FieldMask{Paths: []string{"specs"}},+ }))+ a.NoError(err)++ // Multi-mutation: change spec 1's sheet AND toggle spec 2's prior_backup.+ _, err = f.ctl.planServiceClient.UpdatePlan(f.ctx, connect.NewRequest(&v1pb.UpdatePlanRequest{+ Plan: &v1pb.Plan{+ Name: f.plan.Name,+ Specs: []*v1pb.Plan_Spec{+ {+ Id: originalSpec.Id,+ Config: &v1pb.Plan_Spec_ChangeDatabaseConfig{+ ChangeDatabaseConfig: &v1pb.Plan_ChangeDatabaseConfig{+ Targets: []string{f.database.Name},+ Sheet: f.sheet2.Name, // changed+ },+ },+ },+ {+ Id: secondSpecID,+ Config: &v1pb.Plan_Spec_ChangeDatabaseConfig{+ ChangeDatabaseConfig: &v1pb.Plan_ChangeDatabaseConfig{+ Targets: []string{f.database.Name},+ Sheet: f.sheet1.Name,+ EnablePriorBackup: true, // flipped+ },+ },+ },+ },+ },+ UpdateMask: &fieldmaskpb.FieldMask{Paths: []string{"specs"}},+ }))+ a.NoError(err)++ events := listPlanUpdateEvents(t, f)+ a.Len(events, 2, "expected seed-add and multi-mutation PlanUpdate rows")+ multi := events[1]+ a.Len(multi.FromSpecs, 2)+ a.Len(multi.ToSpecs, 2)+ fromByID := map[string]*v1pb.Plan_Spec{}+ for _, s := range multi.FromSpecs {+ fromByID[s.Id] = s+ }+ toByID := map[string]*v1pb.Plan_Spec{}+ for _, s := range multi.ToSpecs {+ toByID[s.Id] = s+ }+ a.Equal(f.sheet1.Name, fromByID[originalSpec.Id].GetChangeDatabaseConfig().GetSheet())+ a.Equal(f.sheet2.Name, toByID[originalSpec.Id].GetChangeDatabaseConfig().GetSheet())+ a.False(fromByID[secondSpecID].GetChangeDatabaseConfig().GetEnablePriorBackup())+ a.True(toByID[secondSpecID].GetChangeDatabaseConfig().GetEnablePriorBackup())+}+```++- [ ] **Step 10: Verify the test file compiles**++```bash+go vet ./backend/tests/+```++Expected: no output. (Don't actually run the integration tests — they need Docker. CI will run them.)++- [ ] **Step 11: Commit**++```bash+git add backend/tests/plan_update_test.go+git commit -m "test(plan): retarget integration tests to PlanUpdate shape + add reorder/multi-spec coverage"+```++---++## Task 5: Retarget collision test++**Files:**+- Modify: `backend/tests/plan_audit_collision_test.go`++- [ ] **Step 1: Update the assertion**++In `backend/tests/plan_audit_collision_test.go`, find the block:++```go+ // Positive sanity: project A's issue gained the audit row.+ commentsA, err := ctl.issueServiceClient.ListIssueComments(ctx,+ connect.NewRequest(&v1pb.ListIssueCommentsRequest{Parent: fixture.IssueA.Name}))+ a.NoError(err)+ var sawUpdateA bool+ for _, c := range commentsA.Msg.IssueComments {+ if c.GetPlanSpecUpdate() != nil {+ sawUpdateA = true+ break+ }+ }+ a.True(sawUpdateA, "project A's issue should have received a PlanSpecUpdate audit row")+```++Replace with:++```go+ // Positive sanity: project A's issue gained the audit row.+ commentsA, err := ctl.issueServiceClient.ListIssueComments(ctx,+ connect.NewRequest(&v1pb.ListIssueCommentsRequest{Parent: fixture.IssueA.Name}))+ a.NoError(err)+ var sawUpdateA bool+ for _, c := range commentsA.Msg.IssueComments {+ if c.GetPlanUpdate() != nil {+ sawUpdateA = true+ break+ }+ }+ a.True(sawUpdateA, "project A's issue should have received a PlanUpdate audit row")+```++- [ ] **Step 2: Verify it compiles**++```bash+go vet ./backend/tests/+```++Expected: no output.++- [ ] **Step 3: Commit**++```bash+git add backend/tests/plan_audit_collision_test.go+git commit -m "test(collision): retarget plan audit collision test to PlanUpdate shape"+```++---++## Task 6: Backend lint and full build gate++- [ ] **Step 1: Format**++```bash+gofmt -w backend/api/v1/plan_service.go backend/api/v1/plan_service_test.go backend/api/v1/issue_service_converter.go backend/tests/plan_update_test.go backend/tests/plan_audit_collision_test.go+```++- [ ] **Step 2: Lint with auto-fix**++```bash+golangci-lint run --fix --allow-parallel-runners+```++- [ ] **Step 3: Lint until clean**++```bash+golangci-lint run --allow-parallel-runners+```++Re-run repeatedly until no output remains. Address any reported issues by hand.++- [ ] **Step 4: Full build**++```bash+go build -ldflags "-w -s" -p=16 -o ./bytebase-build/bytebase ./backend/bin/server/main.go+```++Expected: clean build.++- [ ] **Step 5: Re-run unit tests**++```bash+go test -v -count=1 github.com/bytebase/bytebase/backend/api/v1 -run '^TestPlanSpecsEqualSet$'+```++Expected: PASS.++- [ ] **Step 6: Commit any lint/format changes**++```bash+git add -u+git diff --cached --quiet || git commit -m "chore(plan): gofmt / golangci-lint cleanup for snapshot rewrite"+```++(`git diff --cached --quiet` exits non-zero when there are staged changes — the `||` runs the commit only when there is something to commit.)++---++## Task 7: Frontend diff helper++**Files:**+- Create: `frontend/src/react/pages/project/issue-detail/utils/diffPlanSpecs.ts`+- Create: `frontend/src/react/pages/project/issue-detail/utils/__tests__/diffPlanSpecs.test.ts`++- [ ] **Step 1: Write the failing test**++Create `frontend/src/react/pages/project/issue-detail/utils/__tests__/diffPlanSpecs.test.ts`:++```ts+import { create } from "@bufbuild/protobuf";+import { describe, expect, it } from "vitest";+import {+ Plan_ChangeDatabaseConfigSchema,+ type Plan_Spec,+ Plan_SpecSchema,+} from "@/types/proto-es/v1/plan_service_pb";+import { diffPlanSpecs, type SpecDiffEntry } from "../diffPlanSpecs";++function cdcSpec(opts: {+ id: string;+ sheet?: string;+ targets?: string[];+ enablePriorBackup?: boolean;+}): Plan_Spec {+ return create(Plan_SpecSchema, {+ id: opts.id,+ config: {+ case: "changeDatabaseConfig",+ value: create(Plan_ChangeDatabaseConfigSchema, {+ sheet: opts.sheet ?? "",+ targets: opts.targets ?? [],+ enablePriorBackup: opts.enablePriorBackup ?? false,+ }),+ },+ });+}++describe("diffPlanSpecs", () => {+ it("empty/empty -> []", () => {+ expect(diffPlanSpecs([], [])).toEqual([]);+ });++ it("one added", () => {+ const entries = diffPlanSpecs([], [cdcSpec({ id: "a", sheet: "s1" })]);+ expect(entries).toHaveLength(1);+ expect(entries[0].kind).toBe("added");+ expect((entries[0] as Extract<SpecDiffEntry, { kind: "added" }>).spec.id).toBe("a");+ });++ it("one removed", () => {+ const entries = diffPlanSpecs([cdcSpec({ id: "a", sheet: "s1" })], []);+ expect(entries).toHaveLength(1);+ expect(entries[0].kind).toBe("removed");+ expect((entries[0] as Extract<SpecDiffEntry, { kind: "removed" }>).spec.id).toBe("a");+ });++ it("sheet changed -> updated with sheetChanged", () => {+ const entries = diffPlanSpecs(+ [cdcSpec({ id: "a", sheet: "projects/p/sheets/s1" })],+ [cdcSpec({ id: "a", sheet: "projects/p/sheets/s2" })]+ );+ expect(entries).toHaveLength(1);+ expect(entries[0].kind).toBe("updated");+ const u = entries[0] as Extract<SpecDiffEntry, { kind: "updated" }>;+ expect(u.sheetChanged).toBe(true);+ expect(u.targetsChanged).toBe(false);+ expect(u.priorBackupChanged).toBe(false);+ expect(u.otherChanged).toBe(false);+ });++ it("targets changed -> updated with targetsChanged", () => {+ const entries = diffPlanSpecs(+ [cdcSpec({ id: "a", targets: ["db1"] })],+ [cdcSpec({ id: "a", targets: ["db1", "db2"] })]+ );+ expect(entries).toHaveLength(1);+ const u = entries[0] as Extract<SpecDiffEntry, { kind: "updated" }>;+ expect(u.sheetChanged).toBe(false);+ expect(u.targetsChanged).toBe(true);+ expect(u.priorBackupChanged).toBe(false);+ });++ it("prior_backup flipped -> updated with priorBackupChanged", () => {+ const entries = diffPlanSpecs(+ [cdcSpec({ id: "a", enablePriorBackup: false })],+ [cdcSpec({ id: "a", enablePriorBackup: true })]+ );+ expect(entries).toHaveLength(1);+ const u = entries[0] as Extract<SpecDiffEntry, { kind: "updated" }>;+ expect(u.priorBackupChanged).toBe(true);+ });++ it("all three changed -> one updated entry with all flags set", () => {+ const entries = diffPlanSpecs(+ [cdcSpec({ id: "a", sheet: "projects/p/sheets/s1", targets: ["db1"], enablePriorBackup: false })],+ [cdcSpec({ id: "a", sheet: "projects/p/sheets/s2", targets: ["db1", "db2"], enablePriorBackup: true })]+ );+ expect(entries).toHaveLength(1);+ const u = entries[0] as Extract<SpecDiffEntry, { kind: "updated" }>;+ expect(u.sheetChanged).toBe(true);+ expect(u.targetsChanged).toBe(true);+ expect(u.priorBackupChanged).toBe(true);+ });++ it("reorder-only -> []", () => {+ const a = cdcSpec({ id: "a", sheet: "projects/p/sheets/s1" });+ const b = cdcSpec({ id: "b", sheet: "projects/p/sheets/s2" });+ expect(diffPlanSpecs([a, b], [b, a])).toEqual([]);+ });++ it("mixed add + remove + update -> three entries, ADDED, REMOVED, UPDATED order", () => {+ const entries = diffPlanSpecs(+ [+ cdcSpec({ id: "old", sheet: "projects/p/sheets/x" }),+ cdcSpec({ id: "keep", sheet: "projects/p/sheets/v1" }),+ ],+ [+ cdcSpec({ id: "keep", sheet: "projects/p/sheets/v2" }),+ cdcSpec({ id: "new", sheet: "projects/p/sheets/y" }),+ ]+ );+ expect(entries.map((e) => e.kind)).toEqual(["added", "removed", "updated"]);+ });++ it("unchanged content -> []", () => {+ const a = cdcSpec({ id: "a", sheet: "projects/p/sheets/s1", targets: ["db1"], enablePriorBackup: false });+ const b = cdcSpec({ id: "a", sheet: "projects/p/sheets/s1", targets: ["db1"], enablePriorBackup: false });+ expect(diffPlanSpecs([a], [b])).toEqual([]);+ });+});+```++- [ ] **Step 2: Run the test to verify it fails**++```bash+pnpm --dir frontend test diffPlanSpecs 2>&1 | tail -10+```++Expected: failure — `Cannot find module '../diffPlanSpecs'` or equivalent.++- [ ] **Step 3: Implement diffPlanSpecs**++Create `frontend/src/react/pages/project/issue-detail/utils/diffPlanSpecs.ts`:++```ts+import type { Plan_Spec } from "@/types/proto-es/v1/plan_service_pb";++export type SpecDiffEntry =+ | { kind: "added"; spec: Plan_Spec }+ | { kind: "removed"; spec: Plan_Spec }+ | {+ kind: "updated";+ specId: string;+ from: Plan_Spec;+ to: Plan_Spec;+ sheetChanged: boolean;+ targetsChanged: boolean;+ priorBackupChanged: boolean;+ otherChanged: boolean;+ };++function specSheet(s: Plan_Spec): string {+ switch (s.config?.case) {+ case "changeDatabaseConfig":+ return s.config.value.sheet ?? "";+ case "exportDataConfig":+ return s.config.value.sheet ?? "";+ default:+ return "";+ }+}++function specTargets(s: Plan_Spec): string[] {+ switch (s.config?.case) {+ case "changeDatabaseConfig":+ return s.config.value.targets ?? [];+ case "exportDataConfig":+ return s.config.value.targets ?? [];+ default:+ return [];+ }+}++function specPriorBackup(s: Plan_Spec): boolean {+ switch (s.config?.case) {+ case "changeDatabaseConfig":+ return s.config.value.enablePriorBackup ?? false;+ default:+ return false;+ }+}++function arrayEqual(a: string[], b: string[]): boolean {+ if (a.length !== b.length) return false;+ for (let i = 0; i < a.length; i++) if (a[i] !== b[i]) return false;+ return true;+}++// "Other" detection: zero out the fields we render specially and compare+// the JSON-stringified specs. Any residual diff is an unknown attribute+// change that we'll surface via the fallback row in the renderer.+function otherFieldsDiffer(a: Plan_Spec, b: Plan_Spec): boolean {+ const stripped = (s: Plan_Spec) => {+ const clone = JSON.parse(JSON.stringify(s));+ if (clone.config?.case === "changeDatabaseConfig" && clone.config.value) {+ clone.config.value.sheet = "";+ clone.config.value.targets = [];+ clone.config.value.enablePriorBackup = false;+ }+ if (clone.config?.case === "exportDataConfig" && clone.config.value) {+ clone.config.value.sheet = "";+ clone.config.value.targets = [];+ }+ return JSON.stringify(clone);+ };+ return stripped(a) !== stripped(b);+}++export function diffPlanSpecs(from: Plan_Spec[], to: Plan_Spec[]): SpecDiffEntry[] {+ const fromById = new Map(from.map((s) => [s.id, s]));+ const toById = new Map(to.map((s) => [s.id, s]));+ const out: SpecDiffEntry[] = [];++ for (const s of to) {+ if (!fromById.has(s.id)) out.push({ kind: "added", spec: s });+ }+ for (const s of from) {+ if (!toById.has(s.id)) out.push({ kind: "removed", spec: s });+ }+ for (const newSpec of to) {+ const oldSpec = fromById.get(newSpec.id);+ if (!oldSpec) continue;+ const sheetChanged = specSheet(oldSpec) !== specSheet(newSpec);+ const targetsChanged = !arrayEqual(specTargets(oldSpec), specTargets(newSpec));+ const priorBackupChanged = specPriorBackup(oldSpec) !== specPriorBackup(newSpec);+ const otherChanged = otherFieldsDiffer(oldSpec, newSpec);+ if (sheetChanged || targetsChanged || priorBackupChanged || otherChanged) {+ out.push({+ kind: "updated",+ specId: newSpec.id,+ from: oldSpec,+ to: newSpec,+ sheetChanged,+ targetsChanged,+ priorBackupChanged,+ otherChanged,+ });+ }+ }+ return out;+}++// diffEntryKey produces a stable React key for a diff entry.+export function diffEntryKey(entry: SpecDiffEntry): string {+ switch (entry.kind) {+ case "added":+ return `add:${entry.spec.id}`;+ case "removed":+ return `rm:${entry.spec.id}`;+ case "updated":+ return `up:${entry.specId}`;+ }+}+```++- [ ] **Step 4: Run the test**++```bash+pnpm --dir frontend test diffPlanSpecs 2>&1 | tail -10+```++Expected: all 10 cases PASS.++- [ ] **Step 5: Commit**++```bash+git add frontend/src/react/pages/project/issue-detail/utils/diffPlanSpecs.ts \+ frontend/src/react/pages/project/issue-detail/utils/__tests__/diffPlanSpecs.test.ts+git commit -m "feat(frontend): pure diff helper for PlanUpdate snapshot pairs"+```++---++## Task 8: Frontend renderer + classifier rewrite++**Files:**+- Modify: `frontend/src/store/modules/v1/issueComment.ts`+- Modify: `frontend/src/react/pages/project/issue-detail/components/IssueDetailCommentList.tsx`++These two files must be changed together — renaming the enum entry without updating the renderer would leave the file type-broken.++- [ ] **Step 1: Update the classifier**++In `frontend/src/store/modules/v1/issueComment.ts`, replace the `IssueCommentType` enum block:++```ts+export enum IssueCommentType {+ USER_COMMENT = "USER_COMMENT",+ APPROVAL = "APPROVAL",+ ISSUE_UPDATE = "ISSUE_UPDATE",+ PLAN_SPEC_UPDATE = "PLAN_SPEC_UPDATE",+ PLAN_SPEC_ADD = "PLAN_SPEC_ADD",+ PLAN_SPEC_REMOVE = "PLAN_SPEC_REMOVE",+}+```++with:++```ts+export enum IssueCommentType {+ USER_COMMENT = "USER_COMMENT",+ APPROVAL = "APPROVAL",+ ISSUE_UPDATE = "ISSUE_UPDATE",+ PLAN_UPDATE = "PLAN_UPDATE",+}+```++Replace the `getIssueCommentType` function:++```ts+export const getIssueCommentType = (+ issueComment: IssueComment+): IssueCommentType => {+ if (issueComment.event?.case === "approval") {+ return IssueCommentType.APPROVAL;+ } else if (issueComment.event?.case === "issueUpdate") {+ return IssueCommentType.ISSUE_UPDATE;+ } else if (issueComment.event?.case === "planSpecUpdate") {+ return IssueCommentType.PLAN_SPEC_UPDATE;+ } else if (issueComment.event?.case === "planSpecAdd") {+ return IssueCommentType.PLAN_SPEC_ADD;+ } else if (issueComment.event?.case === "planSpecRemove") {+ return IssueCommentType.PLAN_SPEC_REMOVE;+ }+ return IssueCommentType.USER_COMMENT;+};+```++with:++```ts+export const getIssueCommentType = (+ issueComment: IssueComment+): IssueCommentType => {+ if (issueComment.event?.case === "approval") {+ return IssueCommentType.APPROVAL;+ } else if (issueComment.event?.case === "issueUpdate") {+ return IssueCommentType.ISSUE_UPDATE;+ } else if (issueComment.event?.case === "planUpdate") {+ return IssueCommentType.PLAN_UPDATE;+ }+ return IssueCommentType.USER_COMMENT;+};+```++- [ ] **Step 2: Replace the three dispatch branches in IssueDetailCommentList.tsx**++Open `frontend/src/react/pages/project/issue-detail/components/IssueDetailCommentList.tsx`. Find the three sequential `if` blocks for `PLAN_SPEC_UPDATE`, `PLAN_SPEC_ADD`, and `PLAN_SPEC_REMOVE` inside `CommentActionSentence`. Replace **all three** with one block:++```tsx+ if (+ commentType === IssueCommentType.PLAN_UPDATE &&+ issueComment.event.case === "planUpdate"+ ) {+ const { fromSpecs, toSpecs } = issueComment.event.value;+ const entries = diffPlanSpecs(fromSpecs, toSpecs);+ if (entries.length === 0) return null;+ return (+ <div className="flex w-full flex-col gap-1">+ {entries.map((entry) => (+ <SpecDiffRow key={diffEntryKey(entry)} entry={entry} />+ ))}+ </div>+ );+ }+```++Add the imports at the top of the file:++```ts+import { diffEntryKey, diffPlanSpecs, type SpecDiffEntry } from "../utils/diffPlanSpecs";+```++- [ ] **Step 3: Add the SpecDiffRow component**++Insert `SpecDiffRow` immediately after `SpecChangeRow` in the same file:++```tsx+function SpecDiffRow({ entry }: { entry: SpecDiffEntry }) {+ const { t } = useTranslation();+ const page = useIssueDetailContext();+ const planName = page.plan?.name ?? "";++ if (entry.kind === "added") {+ return (+ <SpecChangeRow specRef={specResourceName(planName, entry.spec)}>+ {t("activity.sentence.added-spec")}+ </SpecChangeRow>+ );+ }++ if (entry.kind === "removed") {+ return (+ <SpecChangeRow specRef={specResourceName(planName, entry.spec)}>+ {t("activity.sentence.removed-spec")}+ </SpecChangeRow>+ );+ }++ // updated+ const fragments: ReactNode[] = [];+ let trailing: ReactNode = null;+ if (entry.sheetChanged) {+ const fromSheet = sheetFromSpec(entry.from);+ const toSheet = sheetFromSpec(entry.to);+ fragments.push(+ <span key="sheet">{t("activity.sentence.modified-sql-of")}</span>+ );+ trailing = (+ <IssueDetailStatementUpdateButton+ newSheet={toSheet}+ oldSheet={fromSheet}+ />+ );+ }+ if (entry.targetsChanged) {+ const fromTargets = targetsFromSpec(entry.from);+ const toTargets = targetsFromSpec(entry.to);+ const fromSet = new Set(fromTargets);+ const toSet = new Set(toTargets);+ const added = toTargets.filter((x) => !fromSet.has(x));+ const removed = fromTargets.filter((x) => !toSet.has(x));+ fragments.push(+ <span key="targets" className="inline-flex items-center gap-1">+ {t("activity.sentence.changed-targets-of")}{" "}+ <span className="text-xs">+ {added.length > 0 ? `+${added.join(", ")}` : ""}+ {added.length > 0 && removed.length > 0 ? " " : ""}+ {removed.length > 0 ? `-${removed.join(", ")}` : ""}+ </span>+ </span>+ );+ }+ if (entry.priorBackupChanged) {+ const flipped = priorBackupFromSpec(entry.to);+ fragments.push(+ <span key="backup">+ {flipped+ ? t("activity.sentence.enabled-prior-backup-on")+ : t("activity.sentence.disabled-prior-backup-on")}+ </span>+ );+ }+ if (fragments.length === 0 && entry.otherChanged) {+ // Unknown attribute change — generic fallback. The renderer doesn't+ // know what changed; show a "spec updated" row with a details toggle+ // for the raw before/after JSON.+ return (+ <SpecChangeRow specRef={specResourceName(planName, entry.to)}>+ <span>{t("common.updated")}</span>+ <details className="ml-2 text-xs">+ <summary className="cursor-pointer text-control-light">+ {t("common.details")}+ </summary>+ <pre className="mt-1 max-h-48 overflow-auto rounded bg-control-bg p-2">+ {JSON.stringify(+ { from: entry.from, to: entry.to },+ null,+ 2+ )}+ </pre>+ </details>+ </SpecChangeRow>+ );+ }++ return (+ <SpecChangeRow specRef={specResourceName(planName, entry.to)} trailing={trailing}>+ {joinFragments(fragments, t("common.and"))}+ </SpecChangeRow>+ );+}++// SpecChangeRow expects a full spec resource name so getSpecDisplayInfo+// and the UUID-prefix fallback regex both work. The audit payload only+// carries Plan_Spec objects (with a bare UUID in `id`), so we glue the+// live plan's resource name onto it.+function specResourceName(planName: string, spec: Plan_Spec): string {+ return planName ? `${planName}/specs/${spec.id}` : `specs/${spec.id}`;+}++function sheetFromSpec(s: Plan_Spec): string {+ switch (s.config?.case) {+ case "changeDatabaseConfig":+ return s.config.value.sheet ?? "";+ case "exportDataConfig":+ return s.config.value.sheet ?? "";+ default:+ return "";+ }+}++function targetsFromSpec(s: Plan_Spec): string[] {+ switch (s.config?.case) {+ case "changeDatabaseConfig":+ return s.config.value.targets ?? [];+ case "exportDataConfig":+ return s.config.value.targets ?? [];+ default:+ return [];+ }+}++function priorBackupFromSpec(s: Plan_Spec): boolean {+ return s.config?.case === "changeDatabaseConfig"+ ? s.config.value.enablePriorBackup ?? false+ : false;+}+```++Add the `Plan_Spec` type import at the top of the file:++```ts+import type { Plan_Spec } from "@/types/proto-es/v1/plan_service_pb";+```++**About `specResourceName`:** the audit payload contains `Plan_Spec` objects whose `id` field is the spec UUID. `SpecChangeRow` expects a full resource name (`projects/{p}/plans/{plan}/specs/{specId}`) for resolving the chip. Since this audit row lives on an issue page that already has `page.plan`, the existing `SpecChangeRow` code falls back to parsing the UUID out of whatever string we give it. Passing just the UUID works — `getSpecDisplayInfo` matches by spec id against `page.plan.specs`, so we don't need the resource-name prefix. **Verify by inspecting `getSpecDisplayInfo`'s implementation in `@/utils`** before relying on this — if it requires the full resource name, change `specResourceName` to construct it via `${page.plan?.name}/specs/${spec.id}`.++- [ ] **Step 4: Update CommentActionIcon**++Find the icon dispatch in `CommentActionIcon`. Delete the three blocks:++```tsx+ if (commentType === IssueCommentType.PLAN_SPEC_UPDATE) { ... }+ if (commentType === IssueCommentType.PLAN_SPEC_ADD) { ... }+ if (commentType === IssueCommentType.PLAN_SPEC_REMOVE) { ... }+```++Replace with a single block:++```tsx+ if (commentType === IssueCommentType.PLAN_UPDATE) {+ return (+ <CommentIconBadge+ className="bg-control-bg text-control"+ icon={<Pencil className="h-4 w-4" />}+ />+ );+ }+```++Remove the now-unused `Plus` and `Minus` imports from `lucide-react` if they aren't referenced elsewhere in the file:++```bash+grep -n 'Plus\|Minus' frontend/src/react/pages/project/issue-detail/components/IssueDetailCommentList.tsx+```++If the only matches are in the import statement, remove `Plus` and `Minus` from the `lucide-react` import. If they're used elsewhere, leave them.++- [ ] **Step 5: Type-check**++```bash+pnpm --dir frontend type-check 2>&1 | tail -5+```++Expected: clean (no TS errors).++- [ ] **Step 6: Run the unit test again**++```bash+pnpm --dir frontend test diffPlanSpecs 2>&1 | tail -5+```++Expected: 10/10 PASS.++- [ ] **Step 7: Commit**++```bash+git add frontend/src/store/modules/v1/issueComment.ts \+ frontend/src/react/pages/project/issue-detail/components/IssueDetailCommentList.tsx+git commit -m "$(cat <<'EOF'+feat(frontend): render snapshot-based PlanUpdate audit rows via diff helper++Replace the three planSpecUpdate / planSpecAdd / planSpecRemove+dispatch branches with one planUpdate branch that calls diffPlanSpecs+and maps each entry to a SpecDiffRow. Reuses SpecChangeRow,+joinFragments, IssueDetailStatementUpdateButton, and all i18n keys.+Adds a generic fallback row (with JSON-diff details toggle) for the+case where a Spec field changed that the renderer doesn't yet handle+specially. Classifier collapses to a single PLAN_UPDATE type.++EOF+)"+```++---++## Task 9: Frontend full gate++- [ ] **Step 1: Auto-fix**++```bash+pnpm --dir frontend fix 2>&1 | tail -5+```++Expected: minor formatting fixes only.++- [ ] **Step 2: Check**++```bash+pnpm --dir frontend check 2>&1 | tail -10+```++Expected:+```+React i18n: all checks passed (missing keys, unused keys, cross-locale consistency).+React layering policy: all checks passed.+Locale sorter: all 30 file(s) are normalized.+```++If unused-key errors surface for the existing locale keys (`added`, `removed`, etc.), it likely means the renderer isn't referencing them. Re-check Step 3 of Task 8.++- [ ] **Step 3: Type-check**++```bash+pnpm --dir frontend type-check 2>&1 | tail -3+```++Expected: clean.++- [ ] **Step 4: Run all frontend tests**++```bash+pnpm --dir frontend test 2>&1 | tail -10+```++Expected: all suites pass, including `diffPlanSpecs.test.ts`.++- [ ] **Step 5: Commit any fix/check changes**++```bash+git add -u+git diff --cached --quiet || git commit -m "chore(frontend): formatting cleanup after PlanUpdate rewrite"+```++---++## Task 10: Manual UI verification++**Files:** none (manual, per CLAUDE.md UI rule)++- [ ] **Step 1: Start dev backend**++```bash+PG_URL=postgresql://bbdev@localhost/bbdev go run ./backend/bin/server/main.go --port 8080 --data . --debug+```++Leave running.++- [ ] **Step 2: Start dev frontend**++```bash+pnpm --dir frontend dev+```++Open the local URL.++- [ ] **Step 3: Walk through every audit-row scenario**++For each, create an issue with a linked plan, then perform the action and verify the comment row.++1. **Add a spec** → one row, content reads "Adela added Change <id8>". Chip clickable, updates `?spec=<id>`, selects the spec inline.+2. **Remove a spec** → one row, "Adela removed Change <id8>". Chip non-clickable (spec gone from live plan).+3. **Change a spec's SQL only** → one row, "Adela modified SQL of Change <id8> [View Details]". Diff button after the chip. Dialog fills the viewport.+4. **Change a spec's targets only** → one row, "Adela changed targets of Change <id8> +db_added −db_removed".+5. **Toggle `enable_prior_backup`** → one row, "Adela enabled/disabled prior backup on Change <id8>".+6. **Multi-spec change in one save** → one comment row with multiple visual entries (one per affected spec) stacked.+7. **Reorder specs without other changes** → no new comment row appears.+8. **Rename issue title to itself (autoblur with no edit)** → no new comment row (the bundled `UpdateIssue` no-op guard).++- [ ] **Step 4: Fix and re-verify if anything broke**++If any scenario fails, fix the renderer / helper / diff logic and re-verify before continuing.++---++## Task 11: Force-push the rewrite++- [ ] **Step 1: Final sanity sweep**++```bash+git log --oneline origin/main..HEAD+go build ./backend/...+pnpm --dir frontend type-check 2>&1 | tail -3+pnpm --dir frontend check 2>&1 | tail -3+```++- [ ] **Step 2: Force-push with lease**++```bash+git push --force-with-lease origin feat/plan-spec-mutation-audit-a2+```++`--force-with-lease` aborts the push if origin moved unexpectedly (someone else pushed to the same branch).++- [ ] **Step 3: Post a follow-up comment on PR #20276**++```bash+gh pr comment 20276 --body "$(cat <<'EOF'+Rewrote per the snapshot proposal in your review. Summary:++- `PlanUpdate` message replaces `PlanSpecAdd` / `PlanSpecRemove` / `PlanSpecUpdate`. One audit row per `UpdatePlan` call, carrying `from_specs` / `to_specs`.+- Backend emission collapses to a 12-line `planSpecsEqualSet` guard.+- Per-spec diff lives in `frontend/src/react/pages/project/issue-detail/utils/diffPlanSpecs.ts` (pure helper, 10-case test).+- Reorder filtered as cosmetic on the backend; renderer also no-ops empty diffs defensively.+- Unknown attribute changes fall back to a generic "updated" row with a JSON-diff `<details>` toggle.+- New design doc: `docs/plans/2026-05-11-plan-mutation-audit-snapshot-design.md`.+- Implementation plan: `docs/plans/2026-05-11-plan-mutation-audit-snapshot.md`.++PTAL.+EOF+)"+```++- [ ] **Step 4: Verify PR state**++```bash+gh pr view 20276 --json state,headRefName,reviewDecision+```++Expected: `state: OPEN`, branch name unchanged, review decision unchanged (reviewer needs to re-approve after seeing the rewrite).++---++## Out of scope (deferred — same as superseded design)++- Plans without a linked issue (G3) — needs a future `plan_audit` table.+- Self-approval eligibility / editor tracking (the *control* gap from BYT-9175).+- `CreatePlan` / `DeletePlan` audit emission — snapshot shape supports them trivially, but they introduce their own semantic questions; out of scope here.+- Auditing non-spec plan attributes (title, description, state).+- Real-time notifications / webhook delivery for plan mutations.diff --git a/frontend/src/locales/en-US.json b/frontend/src/locales/en-US.jsonindex 20fc08cb5b..eaf85b5185 100644--- a/frontend/src/locales/en-US.json+++ b/frontend/src/locales/en-US.json@@ -1,11 +1,17 @@{"activity": {"sentence": {+ "added-spec": "added","canceled-issue": "closed the issue","changed-description": "changed description","changed-from-to": "changed {name} from \"{oldValue}\" to \"{newValue}\"","changed-labels": "changed labels",+ "changed-targets-of": "changed targets of","created-issue": "created issue",+ "disabled-prior-backup-on": "disabled prior backup on",+ "enabled-prior-backup-on": "enabled prior backup on",+ "modified-sql-of": "modified SQL of",+ "removed-spec": "removed","reopened-issue": "reopened issue","resolved-issue": "approved the issue"}diff --git a/frontend/src/locales/es-ES.json b/frontend/src/locales/es-ES.jsonindex 397af65dae..b3f8d65d18 100644--- a/frontend/src/locales/es-ES.json+++ b/frontend/src/locales/es-ES.json@@ -1,11 +1,17 @@{"activity": {"sentence": {+ "added-spec": "añadió","canceled-issue": "cerró la incidencia","changed-description": "cambio de descripción","changed-from-to": "cambio de {name} de \"{oldValue}\" a \"{newValue}\"","changed-labels": "etiquetas cambiadas",+ "changed-targets-of": "cambió los targets de","created-issue": "incidencia creado",+ "disabled-prior-backup-on": "desactivó prior backup en",+ "enabled-prior-backup-on": "activó prior backup en",+ "modified-sql-of": "modificó el SQL de",+ "removed-spec": "eliminó","reopened-issue": "incidencia reabierta","resolved-issue": "aprobó la incidencia"}diff --git a/frontend/src/locales/ja-JP.json b/frontend/src/locales/ja-JP.jsonindex 432c9af488..2f15a02a8d 100644--- a/frontend/src/locales/ja-JP.json+++ b/frontend/src/locales/ja-JP.json@@ -1,11 +1,17 @@{"activity": {"sentence": {+ "added-spec": "追加しました","canceled-issue": "イシューを閉じた","changed-description": "説明の変更","changed-from-to": "{name} を「{oldValue}」から「{newValue}」に変更します","changed-labels": "ラベルを変更しました",+ "changed-targets-of": "ターゲットを変更しました","created-issue": "イシューを作成する",+ "disabled-prior-backup-on": "事前バックアップを無効化しました",+ "enabled-prior-backup-on": "事前バックアップを有効化しました",+ "modified-sql-of": "SQL を変更しました",+ "removed-spec": "削除しました","reopened-issue": "イシューを再開する","resolved-issue": "イシューを承認した"}diff --git a/frontend/src/locales/vi-VN.json b/frontend/src/locales/vi-VN.jsonindex f089c6e1c7..044aac26a0 100644--- a/frontend/src/locales/vi-VN.json+++ b/frontend/src/locales/vi-VN.json@@ -1,11 +1,17 @@{"activity": {"sentence": {+ "added-spec": "đã thêm","canceled-issue": "đã đóng vấn đề","changed-description": "đã thay đổi mô tả","changed-from-to": "đã thay đổi {name} từ \"{oldValue}\" thành \"{newValue}\"","changed-labels": "đã thay đổi nhãn",+ "changed-targets-of": "đã thay đổi targets của","created-issue": "đã tạo vấn đề",+ "disabled-prior-backup-on": "đã tắt prior backup trên",+ "enabled-prior-backup-on": "đã bật prior backup trên",+ "modified-sql-of": "đã sửa đổi SQL của",+ "removed-spec": "đã xóa","reopened-issue": "đã mở lại vấn đề","resolved-issue": "đã phê duyệt vấn đề"}diff --git a/frontend/src/locales/zh-CN.json b/frontend/src/locales/zh-CN.jsonindex 4ec0e2a8ba..719bf6686a 100644--- a/frontend/src/locales/zh-CN.json+++ b/frontend/src/locales/zh-CN.json@@ -1,11 +1,17 @@{"activity": {"sentence": {+ "added-spec": "添加了","canceled-issue": "关闭工单","changed-description": "修改描述","changed-from-to": "将 {name} 从 \"{oldValue}\" 修改为 \"{newValue}\"","changed-labels": "改变标签",+ "changed-targets-of": "修改了 targets:","created-issue": "创建工单",+ "disabled-prior-backup-on": "禁用了 prior backup",+ "enabled-prior-backup-on": "启用了 prior backup",+ "modified-sql-of": "修改了 SQL",+ "removed-spec": "移除了","reopened-issue": "重开工单","resolved-issue": "批准工单"}diff --git a/frontend/src/react/components/IssueTable.tsx b/frontend/src/react/components/IssueTable.tsxindex c9c80069bf..03c3b56107 100644--- a/frontend/src/react/components/IssueTable.tsx+++ b/frontend/src/react/components/IssueTable.tsx@@ -43,11 +43,10 @@ import {isValidProjectName,unknownUser,} from "@/types";-import { RiskLevel } from "@/types/proto-es/v1/common_pb";+import { ApprovalStatus, RiskLevel } from "@/types/proto-es/v1/common_pb";import type { Issue } from "@/types/proto-es/v1/issue_service_pb";import {BatchUpdateIssuesStatusRequestSchema,- Issue_ApprovalStatus,Issue_Type,IssueStatus,} from "@/types/proto-es/v1/issue_service_pb";@@ -223,7 +222,7 @@ export function PresetButtons({if (preset === "WAITING_APPROVAL") {return (getValueFromSearchParams(vp, "approval") ===- Issue_ApprovalStatus[Issue_ApprovalStatus.PENDING]+ ApprovalStatus[ApprovalStatus.PENDING]);}if (preset === "OPEN") {@@ -264,7 +263,7 @@ export function PresetButtons({{ id: "status", value: IssueStatus[IssueStatus.OPEN] },{id: "approval",- value: Issue_ApprovalStatus[Issue_ApprovalStatus.PENDING],+ value: ApprovalStatus[ApprovalStatus.PENDING],},{ id: "current-approver", value: myEmail },],@@ -399,7 +398,7 @@ export function useIssueSearchScopeOptions(description: t("issue.advanced-search.scope.approval.description"),options: [{- value: Issue_ApprovalStatus[Issue_ApprovalStatus.CHECKING],+ value: ApprovalStatus[ApprovalStatus.CHECKING],keywords: ["checking"],render: () => (<span>@@ -408,7 +407,7 @@ export function useIssueSearchScopeOptions(),},{- value: Issue_ApprovalStatus[Issue_ApprovalStatus.PENDING],+ value: ApprovalStatus[ApprovalStatus.PENDING],keywords: ["pending"],render: () => (<span>@@ -417,7 +416,7 @@ export function useIssueSearchScopeOptions(),},{- value: Issue_ApprovalStatus[Issue_ApprovalStatus.APPROVED],+ value: ApprovalStatus[ApprovalStatus.APPROVED],keywords: ["approved", "done"],render: () => (<span>@@ -426,7 +425,7 @@ export function useIssueSearchScopeOptions(),},{- value: Issue_ApprovalStatus[Issue_ApprovalStatus.REJECTED],+ value: ApprovalStatus[ApprovalStatus.REJECTED],keywords: ["rejected"],render: () => (<span>@@ -435,7 +434,7 @@ export function useIssueSearchScopeOptions(),},{- value: Issue_ApprovalStatus[Issue_ApprovalStatus.SKIPPED],+ value: ApprovalStatus[ApprovalStatus.SKIPPED],keywords: ["skipped"],render: () => (<span>@@ -823,7 +822,7 @@ function IssueApprovalStatusTag({ issue }: { issue: Issue }) {const { t } = useTranslation();const approvalSteps = issue.approvalTemplate?.flow?.roles ?? [];- if (issue.approvalStatus === Issue_ApprovalStatus.CHECKING) {+ if (issue.approvalStatus === ApprovalStatus.CHECKING) {return (<span className="shrink-0 mt-1 inline-flex items-center rounded-full bg-control-bg px-2 py-0.5 text-xs text-control-light">{t("custom-approval.issue-review.generating-approval-flow")}@@ -838,7 +837,7 @@ function IssueApprovalStatusTag({ issue }: { issue: Issue }) {if (approvalSteps.length > 0) {const status = issue.approvalStatus;- if (status === Issue_ApprovalStatus.APPROVED) {+ if (status === ApprovalStatus.APPROVED) {return (<div className="shrink-0 flex flex-row sm:flex-col items-center sm:items-end gap-x-1.5 sm:gap-x-0 mt-1"><span className="inline-flex items-center rounded-full bg-success/10 text-success px-2 py-0.5 text-xs">@@ -850,7 +849,7 @@ function IssueApprovalStatusTag({ issue }: { issue: Issue }) {</div>);}- if (status === Issue_ApprovalStatus.REJECTED) {+ if (status === ApprovalStatus.REJECTED) {return (<div className="shrink-0 flex flex-row sm:flex-col items-center sm:items-end gap-x-1.5 sm:gap-x-0 mt-1"><span className="inline-flex items-center rounded-full bg-warning/10 text-warning px-2 py-0.5 text-xs">@@ -862,7 +861,7 @@ function IssueApprovalStatusTag({ issue }: { issue: Issue }) {</div>);}- if (status === Issue_ApprovalStatus.PENDING) {+ if (status === ApprovalStatus.PENDING) {const currentRoleIndex = issue.approvers.length;const role = approvalSteps[currentRoleIndex];const roleName = role ? displayRoleTitle(role) : "";diff --git a/frontend/src/react/locales/en-US.json b/frontend/src/react/locales/en-US.jsonindex d4d9602d7f..db7a5f1183 100644--- a/frontend/src/react/locales/en-US.json+++ b/frontend/src/react/locales/en-US.json@@ -1,10 +1,15 @@{+ "activity.sentence.added-spec": "added","activity.sentence.canceled-issue": "closed the issue","activity.sentence.changed-description": "changed description","activity.sentence.changed-from-to": "changed {{name}} from \"{{oldValue}}\" to \"{{newValue}}\"","activity.sentence.changed-labels": "changed labels",+ "activity.sentence.changed-targets-of": "changed targets of","activity.sentence.created-issue": "created issue",+ "activity.sentence.disabled-prior-backup-on": "disabled prior backup on",+ "activity.sentence.enabled-prior-backup-on": "enabled prior backup on","activity.sentence.modified-sql-of": "modified SQL of",+ "activity.sentence.removed-spec": "removed","activity.sentence.reopened-issue": "reopened issue","activity.sentence.resolved-issue": "marked the issue as Done","activity.sentence.review-done-rollout-created": "Review done, rollout created",diff --git a/frontend/src/react/locales/es-ES.json b/frontend/src/react/locales/es-ES.jsonindex 444d6fbe06..25ee32b5e4 100644--- a/frontend/src/react/locales/es-ES.json+++ b/frontend/src/react/locales/es-ES.json@@ -1,10 +1,15 @@{+ "activity.sentence.added-spec": "añadió","activity.sentence.canceled-issue": "closed the issue","activity.sentence.changed-description": "changed description","activity.sentence.changed-from-to": "changed {{name}} from \"{{oldValue}}\" to \"{{newValue}}\"","activity.sentence.changed-labels": "changed labels",+ "activity.sentence.changed-targets-of": "cambió los targets de","activity.sentence.created-issue": "created issue",- "activity.sentence.modified-sql-of": "modified SQL of",+ "activity.sentence.disabled-prior-backup-on": "desactivó prior backup en",+ "activity.sentence.enabled-prior-backup-on": "activó prior backup en",+ "activity.sentence.modified-sql-of": "modificó el SQL de",+ "activity.sentence.removed-spec": "eliminó","activity.sentence.reopened-issue": "reopened issue","activity.sentence.resolved-issue": "marcó la incidencia como completada","activity.sentence.review-done-rollout-created": "Revisión completada, rollout creado",diff --git a/frontend/src/react/locales/ja-JP.json b/frontend/src/react/locales/ja-JP.jsonindex a4e0e3142d..b3f19f186f 100644--- a/frontend/src/react/locales/ja-JP.json+++ b/frontend/src/react/locales/ja-JP.json@@ -1,10 +1,15 @@{+ "activity.sentence.added-spec": "追加しました","activity.sentence.canceled-issue": "closed the issue","activity.sentence.changed-description": "changed description","activity.sentence.changed-from-to": "changed {{name}} from \"{{oldValue}}\" to \"{{newValue}}\"","activity.sentence.changed-labels": "changed labels",+ "activity.sentence.changed-targets-of": "ターゲットを変更しました","activity.sentence.created-issue": "created issue",- "activity.sentence.modified-sql-of": "modified SQL of",+ "activity.sentence.disabled-prior-backup-on": "事前バックアップを無効化しました",+ "activity.sentence.enabled-prior-backup-on": "事前バックアップを有効化しました",+ "activity.sentence.modified-sql-of": "SQL を変更しました",+ "activity.sentence.removed-spec": "削除しました","activity.sentence.reopened-issue": "reopened issue","activity.sentence.resolved-issue": "イシューを完了としてマークしました","activity.sentence.review-done-rollout-created": "レビューが完了し、ロールアウトが作成されました",diff --git a/frontend/src/react/locales/vi-VN.json b/frontend/src/react/locales/vi-VN.jsonindex ce3560b38d..61043d743a 100644--- a/frontend/src/react/locales/vi-VN.json+++ b/frontend/src/react/locales/vi-VN.json@@ -1,10 +1,15 @@{+ "activity.sentence.added-spec": "đã thêm","activity.sentence.canceled-issue": "closed the issue","activity.sentence.changed-description": "changed description","activity.sentence.changed-from-to": "changed {{name}} from \"{{oldValue}}\" to \"{{newValue}}\"","activity.sentence.changed-labels": "changed labels",+ "activity.sentence.changed-targets-of": "đã thay đổi targets của","activity.sentence.created-issue": "created issue",- "activity.sentence.modified-sql-of": "modified SQL of",+ "activity.sentence.disabled-prior-backup-on": "đã tắt prior backup trên",+ "activity.sentence.enabled-prior-backup-on": "đã bật prior backup trên",+ "activity.sentence.modified-sql-of": "đã sửa đổi SQL của",+ "activity.sentence.removed-spec": "đã xóa","activity.sentence.reopened-issue": "reopened issue","activity.sentence.resolved-issue": "đã đánh dấu vấn đề là Hoàn tất","activity.sentence.review-done-rollout-created": "Đánh giá đã hoàn tất, rollout đã được tạo",diff --git a/frontend/src/react/locales/zh-CN.json b/frontend/src/react/locales/zh-CN.jsonindex 511c8fbc5d..9cfba16f78 100644--- a/frontend/src/react/locales/zh-CN.json+++ b/frontend/src/react/locales/zh-CN.json@@ -1,10 +1,15 @@{+ "activity.sentence.added-spec": "添加了","activity.sentence.canceled-issue": "closed the issue","activity.sentence.changed-description": "changed description","activity.sentence.changed-from-to": "changed {{name}} from \"{{oldValue}}\" to \"{{newValue}}\"","activity.sentence.changed-labels": "changed labels",+ "activity.sentence.changed-targets-of": "修改了 targets:","activity.sentence.created-issue": "created issue",- "activity.sentence.modified-sql-of": "modified SQL of",+ "activity.sentence.disabled-prior-backup-on": "禁用了 prior backup",+ "activity.sentence.enabled-prior-backup-on": "启用了 prior backup",+ "activity.sentence.modified-sql-of": "修改了 SQL",+ "activity.sentence.removed-spec": "移除了","activity.sentence.reopened-issue": "reopened issue","activity.sentence.resolved-issue": "将工单标记为已完成","activity.sentence.review-done-rollout-created": "审批完成,已创建发布",diff --git a/frontend/src/react/pages/project/ProjectDataExportPage.tsx b/frontend/src/react/pages/project/ProjectDataExportPage.tsxindex c1ee296854..f043200b00 100644--- a/frontend/src/react/pages/project/ProjectDataExportPage.tsx+++ b/frontend/src/react/pages/project/ProjectDataExportPage.tsx@@ -24,13 +24,9 @@ import {} from "@/store";import { projectNamePrefix } from "@/store/modules/v1/common";import { getTimeForPbTimestampProtoEs, unknownUser } from "@/types";-import { RiskLevel } from "@/types/proto-es/v1/common_pb";+import { ApprovalStatus, RiskLevel } from "@/types/proto-es/v1/common_pb";import type { Issue } from "@/types/proto-es/v1/issue_service_pb";-import {- Issue_ApprovalStatus,- Issue_Type,- IssueStatus,-} from "@/types/proto-es/v1/issue_service_pb";+import { Issue_Type, IssueStatus } from "@/types/proto-es/v1/issue_service_pb";import {buildIssueFilterBySearchParams,displayRoleTitle,@@ -370,7 +366,7 @@ function IssueApprovalStatusTag({ issue }: { issue: Issue }) {const { t } = useTranslation();const approvalSteps = issue.approvalTemplate?.flow?.roles ?? [];- if (issue.approvalStatus === Issue_ApprovalStatus.CHECKING) {+ if (issue.approvalStatus === ApprovalStatus.CHECKING) {return (<span className="shrink-0 mt-1 inline-flex items-center rounded-full bg-control-bg px-2 py-0.5 text-xs text-control-light">{t("custom-approval.issue-review.generating-approval-flow")}@@ -385,7 +381,7 @@ function IssueApprovalStatusTag({ issue }: { issue: Issue }) {if (approvalSteps.length > 0) {const status = issue.approvalStatus;- if (status === Issue_ApprovalStatus.APPROVED) {+ if (status === ApprovalStatus.APPROVED) {return (<div className="shrink-0 flex flex-row sm:flex-col items-center sm:items-end gap-x-1.5 sm:gap-x-0 mt-1"><span className="inline-flex items-center rounded-full bg-success/10 text-success px-2 py-0.5 text-xs">@@ -397,7 +393,7 @@ function IssueApprovalStatusTag({ issue }: { issue: Issue }) {</div>);}- if (status === Issue_ApprovalStatus.REJECTED) {+ if (status === ApprovalStatus.REJECTED) {return (<div className="shrink-0 flex flex-row sm:flex-col items-center sm:items-end gap-x-1.5 sm:gap-x-0 mt-1"><span className="inline-flex items-center rounded-full bg-warning/10 text-warning px-2 py-0.5 text-xs">@@ -409,7 +405,7 @@ function IssueApprovalStatusTag({ issue }: { issue: Issue }) {</div>);}- if (status === Issue_ApprovalStatus.PENDING) {+ if (status === ApprovalStatus.PENDING) {const currentRoleIndex = issue.approvers.length;const role = approvalSteps[currentRoleIndex];const roleName = role ? displayRoleTitle(role) : "";diff --git a/frontend/src/react/pages/project/ProjectIssueDashboardPage.tsx b/frontend/src/react/pages/project/ProjectIssueDashboardPage.tsxindex 54c6fbff28..d1f8e8fa8e 100644--- a/frontend/src/react/pages/project/ProjectIssueDashboardPage.tsx+++ b/frontend/src/react/pages/project/ProjectIssueDashboardPage.tsx@@ -20,11 +20,9 @@ import {useUIStateStore,} from "@/store";import { projectNamePrefix } from "@/store/modules/v1/common";+import { ApprovalStatus } from "@/types/proto-es/v1/common_pb";import type { Issue } from "@/types/proto-es/v1/issue_service_pb";-import {- Issue_ApprovalStatus,- IssueStatus,-} from "@/types/proto-es/v1/issue_service_pb";+import { IssueStatus } from "@/types/proto-es/v1/issue_service_pb";import {buildIssueFilterBySearchParams,buildSearchParamsBySearchText,@@ -73,7 +71,7 @@ export function ProjectIssueDashboardPage({{ id: "status", value: IssueStatus[IssueStatus.OPEN] },{id: "approval",- value: Issue_ApprovalStatus[Issue_ApprovalStatus.PENDING],+ value: ApprovalStatus[ApprovalStatus.PENDING],},{ id: "current-approver", value: myEmail },],diff --git a/frontend/src/react/pages/project/ProjectIssueDetailPage.tsx b/frontend/src/react/pages/project/ProjectIssueDetailPage.tsxindex 8a533e9a0f..c41f45ebf4 100644--- a/frontend/src/react/pages/project/ProjectIssueDetailPage.tsx+++ b/frontend/src/react/pages/project/ProjectIssueDetailPage.tsx@@ -1,8 +1,10 @@import { X } from "lucide-react";-import { useMemo, useState } from "react";+import { useCallback, useMemo, useState } from "react";import { useTranslation } from "react-i18next";import { Button } from "@/react/components/ui/button";+import { useVueState } from "@/react/hooks/useVueState";import { cn } from "@/react/lib/utils";+import { router } from "@/router";import { IssueDetailActivity } from "./issue-detail/components/IssueDetailActivity";import { IssueDetailBranchContent } from "./issue-detail/components/IssueDetailBranchContent";import { IssueDetailHeader } from "./issue-detail/components/IssueDetailHeader";@@ -20,8 +22,18 @@ export function ProjectIssueDetailPage(props: ProjectIssueDetailPageProps) {const [databaseExportTasksExpanded, setDatabaseExportTasksExpanded] =useState(false);const [pageHost, setPageHost] = useState<HTMLDivElement | null>(null);- const [databaseChangeSelectedSpecId, setDatabaseChangeSelectedSpecId] =- useState("");+ // Selected spec id is mirrored to the URL as ?spec=<id> so that links+ // (e.g. from audit rows in the comment list) can deep-link a spec without+ // navigating away from the issue detail page.+ const databaseChangeSelectedSpecId = useVueState(() => {+ const v = router.currentRoute.value.query.spec;+ return typeof v === "string" ? v : "";+ });+ const setDatabaseChangeSelectedSpecId = useCallback((id: string) => {+ void router.replace({+ query: { ...router.currentRoute.value.query, spec: id || undefined },+ });+ }, []);const page = useIssueDetailPage({ ...props, pageHost });const showDesktopSidebar = page.sidebarMode === "DESKTOP";const showMobileSidebar = page.sidebarMode === "MOBILE";diff --git a/frontend/src/react/pages/project/ProjectPlanDashboardPage.tsx b/frontend/src/react/pages/project/ProjectPlanDashboardPage.tsxindex 493c9eb2b6..1a85bf4b1d 100644--- a/frontend/src/react/pages/project/ProjectPlanDashboardPage.tsx+++ b/frontend/src/react/pages/project/ProjectPlanDashboardPage.tsx@@ -68,14 +68,13 @@ import {isValidDatabaseGroupName,unknownUser,} from "@/types";-import { State } from "@/types/proto-es/v1/common_pb";+import { ApprovalStatus, State } from "@/types/proto-es/v1/common_pb";import type { DatabaseGroup } from "@/types/proto-es/v1/database_group_service_pb";import { DatabaseGroupView } from "@/types/proto-es/v1/database_group_service_pb";import {type Database,SyncStatus,} from "@/types/proto-es/v1/database_service_pb";-import { Issue_ApprovalStatus } from "@/types/proto-es/v1/issue_service_pb";import type {Plan,Plan_RolloutStageSummary,@@ -504,18 +503,18 @@ function PlanRow({ plan, projectId }: { plan: Plan; projectId: string }) {const approvalTag = useMemo(() => {if (plan.issue === "") return undefined;switch (plan.approvalStatus) {- case Issue_ApprovalStatus.CHECKING:+ case ApprovalStatus.CHECKING:return { label: t("task.checking"), variant: "default" as const };- case Issue_ApprovalStatus.APPROVED:+ case ApprovalStatus.APPROVED:return {label: t("issue.table.approved"),variant: "success" as const,};- case Issue_ApprovalStatus.SKIPPED:+ case ApprovalStatus.SKIPPED:return { label: t("common.skipped"), variant: "default" as const };- case Issue_ApprovalStatus.REJECTED:+ case ApprovalStatus.REJECTED:return { label: t("common.rejected"), variant: "warning" as const };- case Issue_ApprovalStatus.PENDING:+ case ApprovalStatus.PENDING:return { label: t("common.under-review"), variant: "info" as const };default:return undefined;diff --git a/frontend/src/react/pages/project/ProjectPlanDetailPage.tsx b/frontend/src/react/pages/project/ProjectPlanDetailPage.tsxindex 9c720389b2..6d588b1053 100644--- a/frontend/src/react/pages/project/ProjectPlanDetailPage.tsx+++ b/frontend/src/react/pages/project/ProjectPlanDetailPage.tsx@@ -18,10 +18,8 @@ import {SheetTitle,} from "@/react/components/ui/sheet";import { cn } from "@/react/lib/utils";-import {- Issue_ApprovalStatus,- IssueStatus,-} from "@/types/proto-es/v1/issue_service_pb";+import { ApprovalStatus } from "@/types/proto-es/v1/common_pb";+import { IssueStatus } from "@/types/proto-es/v1/issue_service_pb";import { Task_Status } from "@/types/proto-es/v1/rollout_service_pb";import { DeployBranch } from "./plan-detail/components/deploy/DeployBranch";import { DeployTaskDetailPanel } from "./plan-detail/components/deploy/DeployTaskDetailPanel";@@ -169,21 +167,21 @@ export function ProjectPlanDetailPage({if (review === "future") return undefined;if (review === "completed" &&- page.issue.approvalStatus === Issue_ApprovalStatus.PENDING+ page.issue.approvalStatus === ApprovalStatus.PENDING) {return { label: t("common.bypassed"), variant: "default" as const };}switch (page.issue.approvalStatus) {- case Issue_ApprovalStatus.APPROVED:+ case ApprovalStatus.APPROVED:return {label: t("issue.table.approved"),variant: "success" as const,};- case Issue_ApprovalStatus.SKIPPED:+ case ApprovalStatus.SKIPPED:return { label: t("common.skipped"), variant: "default" as const };- case Issue_ApprovalStatus.REJECTED:+ case ApprovalStatus.REJECTED:return { label: t("common.rejected"), variant: "warning" as const };- case Issue_ApprovalStatus.PENDING:+ case ApprovalStatus.PENDING:return {label: t("common.under-review"),variant: "secondary" as const,diff --git a/frontend/src/react/pages/project/issue-detail/components/IssueDetailApprovalFlow.tsx b/frontend/src/react/pages/project/issue-detail/components/IssueDetailApprovalFlow.tsxindex 963b1590dd..9ef9735a36 100644--- a/frontend/src/react/pages/project/issue-detail/components/IssueDetailApprovalFlow.tsx+++ b/frontend/src/react/pages/project/issue-detail/components/IssueDetailApprovalFlow.tsx@@ -25,10 +25,13 @@ import {useUserStore,} from "@/store";import { projectNamePrefix, userNamePrefix } from "@/store/modules/v1/common";-import { RiskLevel, State } from "@/types/proto-es/v1/common_pb";+import {+ ApprovalStatus,+ RiskLevel,+ State,+} from "@/types/proto-es/v1/common_pb";import type { Issue } from "@/types/proto-es/v1/issue_service_pb";import {- Issue_ApprovalStatus,Issue_Approver_Status,RequestIssueRequestSchema,RetryIssueApprovalRequestSchema,@@ -98,7 +101,7 @@ export function IssueDetailApprovalFlow() {</div><div className="mt-2">- {issue.approvalStatus === Issue_ApprovalStatus.CHECKING ? (+ {issue.approvalStatus === ApprovalStatus.CHECKING ? (<CheckingState issue={issue} />) : approvalSteps.length > 0 ? (<div className="mt-1 flex flex-col gap-y-4 pl-1">@@ -473,19 +476,19 @@ function getStatusTag(if (approvalStepCount === 0) {return undefined;}- if (issue.approvalStatus === Issue_ApprovalStatus.APPROVED) {+ if (issue.approvalStatus === ApprovalStatus.APPROVED) {return {className: "bg-success/10 text-success",label: t("issue.table.approved"),};}- if (issue.approvalStatus === Issue_ApprovalStatus.REJECTED) {+ if (issue.approvalStatus === ApprovalStatus.REJECTED) {return {className: "bg-warning/10 text-warning",label: t("common.rejected"),};}- if (issue.approvalStatus === Issue_ApprovalStatus.PENDING) {+ if (issue.approvalStatus === ApprovalStatus.PENDING) {return {className: "bg-accent/10 text-accent",label: t("common.under-review"),diff --git a/frontend/src/react/pages/project/issue-detail/components/IssueDetailCommentList.tsx b/frontend/src/react/pages/project/issue-detail/components/IssueDetailCommentList.tsxindex fc7e0a164a..cc0f885e4c 100644--- a/frontend/src/react/pages/project/issue-detail/components/IssueDetailCommentList.tsx+++ b/frontend/src/react/pages/project/issue-detail/components/IssueDetailCommentList.tsx@@ -6,8 +6,10 @@ import {Play,Plus,ThumbsUp,+ Trash2,} from "lucide-react";import {+ Fragment,type ReactNode,useCallback,useEffect,@@ -29,7 +31,6 @@ import {import { useVueState } from "@/react/hooks/useVueState";import { cn } from "@/react/lib/utils";import { router } from "@/router";-import { PROJECT_V1_ROUTE_PLAN_DETAIL_SPEC_DETAIL } from "@/router/dashboard/projectV1";import { buildPlanDeployRouteFromPlanName } from "@/router/dashboard/projectV1RouteHelpers";import {extractUserEmail,@@ -44,8 +45,8 @@ import {} from "@/store";import { projectNamePrefix } from "@/store/modules/v1/common";import { getTimeForPbTimestampProtoEs, unknownUser } from "@/types";+import { ApprovalStatus } from "@/types/proto-es/v1/common_pb";import {- Issue_ApprovalStatus,type IssueComment,IssueComment_Approval_Status,IssueSchema,@@ -53,6 +54,7 @@ import {ListIssueCommentsRequestSchema,UpdateIssueRequestSchema,} from "@/types/proto-es/v1/issue_service_pb";+import type { Plan_Spec } from "@/types/proto-es/v1/plan_service_pb";import type { User } from "@/types/proto-es/v1/user_service_pb";import {extractPlanUID,@@ -60,9 +62,19 @@ import {getSpecDisplayInfo,} from "@/utils";import { hasProjectPermissionV2 } from "@/utils/iam/permission";+import {+ enablePriorBackupOfSpec,+ sheetNameOfSpec,+ targetsOfSpec,+} from "@/utils/v1/issue/plan";import { getSheetStatement } from "@/utils/v1/sheet";import { useIssueDetailContext } from "../context/IssueDetailContext";import { isDatabaseChangeDoneRolloutComment } from "../utils/activity";+import {+ diffEntryKey,+ diffPlanSpecsForEvent,+ type SpecDiffEntry,+} from "../utils/diffPlanSpecs";function useIssueRefTransform(projectName: string | undefined) {const { t } = useTranslation();@@ -668,7 +680,7 @@ function CommentActionSentence({.href: "";const sentence =- page.issue?.approvalStatus === Issue_ApprovalStatus.APPROVED+ page.issue?.approvalStatus === ApprovalStatus.APPROVED? planUID? t("activity.sentence.review-done-rollout-created-for-plan"): t("activity.sentence.review-done-rollout-created")@@ -724,51 +736,205 @@ function CommentActionSentence({}if (- commentType === IssueCommentType.PLAN_SPEC_UPDATE &&- issueComment.event.case === "planSpecUpdate"+ commentType === IssueCommentType.PLAN_UPDATE &&+ issueComment.event.case === "planUpdate") {- const { spec, fromSheet, toSheet } = issueComment.event.value;- if (fromSheet && toSheet && page.plan) {- const specs = page.plan.specs ?? [];- const specInfo = getSpecDisplayInfo(specs, spec);- const planName = page.plan.name;- const href = router.resolve({- name: PROJECT_V1_ROUTE_PLAN_DETAIL_SPEC_DETAIL,- params: {- planId: extractPlanUID(planName),- projectId: extractProjectResourceName(planName),- specId: specInfo?.specId ?? "",- },- }).href;-- return (- <span className="wrap-break-word min-w-0 text-gray-600">- {t("activity.sentence.modified-sql-of")}{" "}- {specInfo?.specId ? (- <a- className="inline-flex items-center gap-1 hover:underline"- href={href}- >- {t("plan.spec.change")}- <span className="rounded-full bg-control-bg px-1.5 py-0.5 text-xs text-main">- #{specInfo.displayIndex}- </span>- </a>- ) : (- t("plan.spec.change")- )}{" "}- <IssueDetailStatementUpdateButton- newSheet={toSheet}- oldSheet={fromSheet}- />- </span>- );+ const entries = diffPlanSpecsForEvent(issueComment.event.value);+ if (entries.length === 0) return null;+ if (entries.length === 1) {+ return <SpecDiffRow entry={entries[0]} />;}+ return (+ <div className="flex flex-col gap-1">+ {entries.map((entry) => (+ <SpecDiffRow key={diffEntryKey(entry)} entry={entry} />+ ))}+ </div>+ );}return <span className="wrap-break-word min-w-0 text-gray-600" />;}+function SpecDiffRow({ entry }: { entry: SpecDiffEntry }) {+ const { t } = useTranslation();+ const page = useIssueDetailContext();+ const planName = page.plan?.name ?? "";++ if (entry.kind === "added") {+ return (+ <SpecChangeRow specRef={specResourceName(planName, entry.spec)}>+ {t("activity.sentence.added-spec")}+ </SpecChangeRow>+ );+ }++ if (entry.kind === "removed") {+ return (+ <SpecChangeRow specRef={specResourceName(planName, entry.spec)}>+ {t("activity.sentence.removed-spec")}+ </SpecChangeRow>+ );+ }++ // updated+ const fragments: ReactNode[] = [];+ let trailing: ReactNode = null;+ if (entry.sheetChanged) {+ const fromSheet = sheetNameOfSpec(entry.from);+ const toSheet = sheetNameOfSpec(entry.to);+ fragments.push(+ <span key="sheet">{t("activity.sentence.modified-sql-of")}</span>+ );+ trailing = (+ <IssueDetailStatementUpdateButton+ newSheet={toSheet}+ oldSheet={fromSheet}+ />+ );+ }+ if (entry.targetsChanged) {+ const fromTargets = targetsOfSpec(entry.from);+ const toTargets = targetsOfSpec(entry.to);+ const fromSet = new Set(fromTargets);+ const toSet = new Set(toTargets);+ const added = toTargets.filter((x) => !fromSet.has(x));+ const removed = fromTargets.filter((x) => !toSet.has(x));+ const diffText = [+ added.length > 0 ? `+${added.join(", ")}` : null,+ removed.length > 0 ? `-${removed.join(", ")}` : null,+ ]+ .filter(Boolean)+ .join(" ");+ fragments.push(+ <span key="targets" className="inline-flex items-center gap-1">+ {t("activity.sentence.changed-targets-of")}{" "}+ <span className="text-xs">{diffText}</span>+ </span>+ );+ }+ if (entry.priorBackupChanged) {+ const flipped = enablePriorBackupOfSpec(entry.to);+ fragments.push(+ <span key="backup">+ {flipped+ ? t("activity.sentence.enabled-prior-backup-on")+ : t("activity.sentence.disabled-prior-backup-on")}+ </span>+ );+ }+ if (fragments.length === 0 && entry.otherChanged) {+ // Unknown attribute change — generic fallback with a JSON-diff toggle.+ return (+ <SpecChangeRow specRef={specResourceName(planName, entry.to)}>+ <span>{t("common.updated")}</span>+ <details className="ml-2 text-xs">+ <summary className="cursor-pointer text-control-light">+ {t("common.detail")}+ </summary>+ <pre className="mt-1 max-h-48 overflow-auto rounded bg-control-bg p-2">+ {JSON.stringify({ from: entry.from, to: entry.to }, null, 2)}+ </pre>+ </details>+ </SpecChangeRow>+ );+ }++ return (+ <SpecChangeRow+ specRef={specResourceName(planName, entry.to)}+ trailing={trailing}+ >+ {joinFragments(fragments, t("common.and"))}+ </SpecChangeRow>+ );+}++function specResourceName(planName: string, spec: Plan_Spec): string {+ return planName ? `${planName}/specs/${spec.id}` : `specs/${spec.id}`;+}++function SpecChangeRow({+ specRef,+ children,+ trailing,+}: {+ specRef: string;+ children: ReactNode;+ trailing?: ReactNode;+}) {+ const { t } = useTranslation();+ const page = useIssueDetailContext();+ const specs = page.plan?.specs ?? [];+ const specInfo = getSpecDisplayInfo(specs, specRef);+ const specIdFromRef = specRef.match(/\/specs\/([^/]+)$/)?.[1] ?? "";+ const specId = specInfo?.specId ?? specIdFromRef;+ const specIdShort = specId.slice(0, 8);+ // Only link to specs that still exist in the live plan — otherwise the spec+ // view would silently bounce back to specs[0].+ const href = specInfo?.specId+ ? router.resolve({+ query: {+ ...router.currentRoute.value.query,+ spec: specInfo.specId,+ },+ }).href+ : null;+ const onClick = href+ ? (e: React.MouseEvent) => {+ // Allow modifier-clicks (open in new tab) to use the native href.+ if (e.metaKey || e.ctrlKey || e.shiftKey || e.altKey) return;+ e.preventDefault();+ void router.push({+ query: {+ ...router.currentRoute.value.query,+ spec: specInfo!.specId,+ },+ });+ }+ : undefined;++ const chip = (+ <span className="inline-flex items-center gap-1">+ {t("plan.spec.change")}+ {specIdShort !== "" ? (+ <span className="rounded-full bg-control-bg px-1.5 py-0.5 text-xs text-main">+ {specIdShort}+ </span>+ ) : null}+ </span>+ );++ return (+ <span className="inline-flex items-center gap-1 whitespace-nowrap text-gray-600">+ {children}{" "}+ {href != null ? (+ <a+ className="inline-flex items-center gap-1 hover:underline"+ href={href}+ onClick={onClick}+ >+ {chip}+ </a>+ ) : (+ chip+ )}+ {trailing != null ? <> {trailing}</> : null}+ </span>+ );+}++function joinFragments(fragments: ReactNode[], separator: string): ReactNode {+ if (fragments.length === 0) return null;+ if (fragments.length === 1) return fragments[0];+ return fragments.map((f, i) => (+ <Fragment key={i}>+ {i > 0 ? <span> {separator} </span> : null}+ {f}+ </Fragment>+ ));+}+function CommentActionIcon({ issueComment }: { issueComment: IssueComment }) {const page = useIssueDetailContext();const userStore = useUserStore();@@ -842,7 +1008,31 @@ function CommentActionIcon({ issueComment }: { issueComment: IssueComment }) {}}- if (commentType === IssueCommentType.PLAN_SPEC_UPDATE) {+ if (+ commentType === IssueCommentType.PLAN_UPDATE &&+ issueComment.event.case === "planUpdate"+ ) {+ const entries = diffPlanSpecsForEvent(issueComment.event.value);+ const allAdded =+ entries.length > 0 && entries.every((e) => e.kind === "added");+ const allRemoved =+ entries.length > 0 && entries.every((e) => e.kind === "removed");+ if (allAdded) {+ return (+ <CommentIconBadge+ className="bg-success text-white"+ icon={<Plus className="h-4 w-4" />}+ />+ );+ }+ if (allRemoved) {+ return (+ <CommentIconBadge+ className="bg-error text-white"+ icon={<Trash2 className="h-4 w-4" />}+ />+ );+ }return (<CommentIconBadgeclassName="bg-control-bg text-control"@@ -966,13 +1156,17 @@ function IssueDetailStatementUpdateButton({const load = async () => {setIsLoading(true);try {+ // One side may be empty when the sheet was attached (no oldSheet)+ // or cleared (no newSheet). Treat that side as empty content+ // rather than fetching by an empty resource name.+ const fetchStatement = async (sheetName: string) => {+ if (!sheetName) return "";+ const sheet = await sheetStore.getOrFetchSheetByName(sheetName);+ return sheet ? getSheetStatement(sheet) : "";+ };const [oldValue, newValue] = await Promise.all([- sheetStore- .getOrFetchSheetByName(oldSheet)- .then((sheet) => (sheet ? getSheetStatement(sheet) : "")),- sheetStore- .getOrFetchSheetByName(newSheet)- .then((sheet) => (sheet ? getSheetStatement(sheet) : "")),+ fetchStatement(oldSheet),+ fetchStatement(newSheet),]);if (!canceled) {setOldStatement(oldValue);@@ -1005,19 +1199,35 @@ function IssueDetailStatementUpdateButton({<DialogTitle>{t("common.detail")}</DialogTitle></div><div className="px-6 pb-6 pt-2">- <div className="relative h-[calc(100vh-10rem)] w-full">- {isLoading ? (- <div className="absolute inset-0 flex items-center justify-center">- <Loader2 className="h-6 w-6 animate-spin text-control-light" />- </div>- ) : (+ {(() => {+ // Fill the dialog instead of letting the editor shrink to+ // content height — short SQL diffs were leaving most of the+ // dialog blank. Cap at a sensible max so very tall viewports+ // don't get an awkwardly-stretched editor.+ const height = Math.min(+ 900,+ Math.max(400, window.innerHeight - 240)+ );+ if (isLoading) {+ return (+ <div+ className="flex w-full items-center justify-center rounded-md border"+ style={{ height }}+ >+ <Loader2 className="h-6 w-6 animate-spin text-control-light" />+ </div>+ );+ }+ return (<ReadonlyDiffMonaco- className="h-full w-full overflow-clip rounded-md border"+ className="w-full"+ max={height}+ min={height}modified={newStatement}original={oldStatement}/>- )}- </div>+ );+ })()}</div></DialogContent></Dialog>diff --git a/frontend/src/react/pages/project/issue-detail/components/IssueDetailHeader.tsx b/frontend/src/react/pages/project/issue-detail/components/IssueDetailHeader.tsxindex 1fb9a9c6a1..2992528e83 100644--- a/frontend/src/react/pages/project/issue-detail/components/IssueDetailHeader.tsx+++ b/frontend/src/react/pages/project/issue-detail/components/IssueDetailHeader.tsx@@ -2,10 +2,8 @@ import { Ban, CheckCircle2, Menu } from "lucide-react";import { useTranslation } from "react-i18next";import { Badge } from "@/react/components/ui/badge";import { Button } from "@/react/components/ui/button";-import {- Issue_ApprovalStatus,- IssueStatus,-} from "@/types/proto-es/v1/issue_service_pb";+import { ApprovalStatus } from "@/types/proto-es/v1/common_pb";+import { IssueStatus } from "@/types/proto-es/v1/issue_service_pb";import { useIssueDetailContext } from "../context/IssueDetailContext";import { IssueDetailActionBar } from "./IssueDetailActionBar";import { IssueDetailTitleInput } from "./IssueDetailTitleInput";@@ -16,11 +14,11 @@ export function IssueDetailHeader() {const showClosedTag = page.issue?.status === IssueStatus.CANCELED;const showDoneTag = page.issue?.status === IssueStatus.DONE;const doneTagLabel =- page.issue?.approvalStatus === Issue_ApprovalStatus.APPROVED+ page.issue?.approvalStatus === ApprovalStatus.APPROVED? t("common.approved"): t("common.skipped");const doneTagVariant =- page.issue?.approvalStatus === Issue_ApprovalStatus.APPROVED+ page.issue?.approvalStatus === ApprovalStatus.APPROVED? "success": "default";const showMobileSidebarButton = page.sidebarMode === "MOBILE";diff --git a/frontend/src/react/pages/project/issue-detail/utils/__tests__/diffPlanSpecs.test.ts b/frontend/src/react/pages/project/issue-detail/utils/__tests__/diffPlanSpecs.test.tsnew file mode 100644index 0000000000..855bb7fe56--- /dev/null+++ b/frontend/src/react/pages/project/issue-detail/utils/__tests__/diffPlanSpecs.test.ts@@ -0,0 +1,149 @@+import { create } from "@bufbuild/protobuf";+import { describe, expect, it } from "vitest";+import {+ Plan_ChangeDatabaseConfigSchema,+ type Plan_Spec,+ Plan_SpecSchema,+} from "@/types/proto-es/v1/plan_service_pb";+import { diffPlanSpecs, type SpecDiffEntry } from "../diffPlanSpecs";++function cdcSpec(opts: {+ id: string;+ sheet?: string;+ targets?: string[];+ enablePriorBackup?: boolean;+}): Plan_Spec {+ return create(Plan_SpecSchema, {+ id: opts.id,+ config: {+ case: "changeDatabaseConfig",+ value: create(Plan_ChangeDatabaseConfigSchema, {+ sheet: opts.sheet ?? "",+ targets: opts.targets ?? [],+ enablePriorBackup: opts.enablePriorBackup ?? false,+ }),+ },+ });+}++describe("diffPlanSpecs", () => {+ it("empty/empty -> []", () => {+ expect(diffPlanSpecs([], [])).toEqual([]);+ });++ it("one added", () => {+ const entries = diffPlanSpecs([], [cdcSpec({ id: "a", sheet: "s1" })]);+ expect(entries).toHaveLength(1);+ expect(entries[0].kind).toBe("added");+ expect(+ (entries[0] as Extract<SpecDiffEntry, { kind: "added" }>).spec.id+ ).toBe("a");+ });++ it("one removed", () => {+ const entries = diffPlanSpecs([cdcSpec({ id: "a", sheet: "s1" })], []);+ expect(entries).toHaveLength(1);+ expect(entries[0].kind).toBe("removed");+ expect(+ (entries[0] as Extract<SpecDiffEntry, { kind: "removed" }>).spec.id+ ).toBe("a");+ });++ it("sheet changed -> updated with sheetChanged", () => {+ const entries = diffPlanSpecs(+ [cdcSpec({ id: "a", sheet: "projects/p/sheets/s1" })],+ [cdcSpec({ id: "a", sheet: "projects/p/sheets/s2" })]+ );+ expect(entries).toHaveLength(1);+ expect(entries[0].kind).toBe("updated");+ const u = entries[0] as Extract<SpecDiffEntry, { kind: "updated" }>;+ expect(u.sheetChanged).toBe(true);+ expect(u.targetsChanged).toBe(false);+ expect(u.priorBackupChanged).toBe(false);+ expect(u.otherChanged).toBe(false);+ });++ it("targets changed -> updated with targetsChanged", () => {+ const entries = diffPlanSpecs(+ [cdcSpec({ id: "a", targets: ["db1"] })],+ [cdcSpec({ id: "a", targets: ["db1", "db2"] })]+ );+ expect(entries).toHaveLength(1);+ const u = entries[0] as Extract<SpecDiffEntry, { kind: "updated" }>;+ expect(u.sheetChanged).toBe(false);+ expect(u.targetsChanged).toBe(true);+ expect(u.priorBackupChanged).toBe(false);+ });++ it("prior_backup flipped -> updated with priorBackupChanged", () => {+ const entries = diffPlanSpecs(+ [cdcSpec({ id: "a", enablePriorBackup: false })],+ [cdcSpec({ id: "a", enablePriorBackup: true })]+ );+ expect(entries).toHaveLength(1);+ const u = entries[0] as Extract<SpecDiffEntry, { kind: "updated" }>;+ expect(u.priorBackupChanged).toBe(true);+ });++ it("all three changed -> one updated entry with all flags set", () => {+ const entries = diffPlanSpecs(+ [+ cdcSpec({+ id: "a",+ sheet: "projects/p/sheets/s1",+ targets: ["db1"],+ enablePriorBackup: false,+ }),+ ],+ [+ cdcSpec({+ id: "a",+ sheet: "projects/p/sheets/s2",+ targets: ["db1", "db2"],+ enablePriorBackup: true,+ }),+ ]+ );+ expect(entries).toHaveLength(1);+ const u = entries[0] as Extract<SpecDiffEntry, { kind: "updated" }>;+ expect(u.sheetChanged).toBe(true);+ expect(u.targetsChanged).toBe(true);+ expect(u.priorBackupChanged).toBe(true);+ });++ it("reorder-only -> []", () => {+ const a = cdcSpec({ id: "a", sheet: "projects/p/sheets/s1" });+ const b = cdcSpec({ id: "b", sheet: "projects/p/sheets/s2" });+ expect(diffPlanSpecs([a, b], [b, a])).toEqual([]);+ });++ it("mixed add + remove + update -> three entries, ADDED, REMOVED, UPDATED order", () => {+ const entries = diffPlanSpecs(+ [+ cdcSpec({ id: "old", sheet: "projects/p/sheets/x" }),+ cdcSpec({ id: "keep", sheet: "projects/p/sheets/v1" }),+ ],+ [+ cdcSpec({ id: "keep", sheet: "projects/p/sheets/v2" }),+ cdcSpec({ id: "new", sheet: "projects/p/sheets/y" }),+ ]+ );+ expect(entries.map((e) => e.kind)).toEqual(["added", "removed", "updated"]);+ });++ it("unchanged content -> []", () => {+ const a = cdcSpec({+ id: "a",+ sheet: "projects/p/sheets/s1",+ targets: ["db1"],+ enablePriorBackup: false,+ });+ const b = cdcSpec({+ id: "a",+ sheet: "projects/p/sheets/s1",+ targets: ["db1"],+ enablePriorBackup: false,+ });+ expect(diffPlanSpecs([a], [b])).toEqual([]);+ });+});diff --git a/frontend/src/react/pages/project/issue-detail/utils/actionRegistry.ts b/frontend/src/react/pages/project/issue-detail/utils/actionRegistry.tsindex abb186f434..2a9b3d7566 100644--- a/frontend/src/react/pages/project/issue-detail/utils/actionRegistry.ts+++ b/frontend/src/react/pages/project/issue-detail/utils/actionRegistry.ts@@ -1,10 +1,9 @@import type { TFunction } from "i18next";import { first, orderBy } from "lodash-es";import { candidatesOfApprovalStepV1, extractUserEmail } from "@/store";-import { State } from "@/types/proto-es/v1/common_pb";+import { ApprovalStatus, State } from "@/types/proto-es/v1/common_pb";import type { Issue } from "@/types/proto-es/v1/issue_service_pb";import {- Issue_ApprovalStatus,Issue_Approver_Status,Issue_Type,IssueStatus,@@ -69,7 +68,7 @@ export interface ActionContext {project: Project;planState: State;issueStatus: IssueStatus | undefined;- approvalStatus: Issue_ApprovalStatus | undefined;+ approvalStatus: ApprovalStatus | undefined;isCreating: boolean;isIssueOnly: boolean;isExportPlan: boolean;@@ -367,8 +366,8 @@ export const createIssueDetailActions = (t: TFunction): ActionDefinition[] => {priority: 30,isVisible: (ctx) =>ctx.issueStatus === IssueStatus.OPEN &&- ctx.approvalStatus !== Issue_ApprovalStatus.APPROVED &&- ctx.approvalStatus !== Issue_ApprovalStatus.SKIPPED &&+ ctx.approvalStatus !== ApprovalStatus.APPROVED &&+ ctx.approvalStatus !== ApprovalStatus.SKIPPED &&ctx.permissions.isApprovalCandidate,isDisabled: () => false,disabledReason: () => undefined,diff --git a/frontend/src/react/pages/project/issue-detail/utils/approval.ts b/frontend/src/react/pages/project/issue-detail/utils/approval.tsindex b42a8460dc..c3ed0ecf5e 100644--- a/frontend/src/react/pages/project/issue-detail/utils/approval.ts+++ b/frontend/src/react/pages/project/issue-detail/utils/approval.ts@@ -1,9 +1,9 @@+import { ApprovalStatus } from "@/types/proto-es/v1/common_pb";import type { Issue } from "@/types/proto-es/v1/issue_service_pb";-import { Issue_ApprovalStatus } from "@/types/proto-es/v1/issue_service_pb";const hasNoApprovalRequired = (issue: Issue | undefined): boolean => {if (!issue) return false;- if (issue.approvalStatus === Issue_ApprovalStatus.CHECKING) return false;+ if (issue.approvalStatus === ApprovalStatus.CHECKING) return false;const roles = issue.approvalTemplate?.flow?.roles ?? [];return roles.length === 0;};@@ -12,8 +12,8 @@ export const isApprovalCompleted = (issue: Issue | undefined): boolean => {if (!issue) return false;return (- issue.approvalStatus === Issue_ApprovalStatus.APPROVED ||- issue.approvalStatus === Issue_ApprovalStatus.SKIPPED ||+ issue.approvalStatus === ApprovalStatus.APPROVED ||+ issue.approvalStatus === ApprovalStatus.SKIPPED ||hasNoApprovalRequired(issue));};diff --git a/frontend/src/react/pages/project/issue-detail/utils/diffPlanSpecs.ts b/frontend/src/react/pages/project/issue-detail/utils/diffPlanSpecs.tsnew file mode 100644index 0000000000..040a3a3441--- /dev/null+++ b/frontend/src/react/pages/project/issue-detail/utils/diffPlanSpecs.ts@@ -0,0 +1,116 @@+import { clone, equals } from "@bufbuild/protobuf";+import { isEqual } from "lodash-es";+import {+ type Plan_Spec,+ Plan_SpecSchema,+} from "@/types/proto-es/v1/plan_service_pb";+import {+ enablePriorBackupOfSpec,+ sheetNameOfSpec,+ targetsOfSpec,+} from "@/utils/v1/issue/plan";++export type SpecDiffEntry =+ | { kind: "added"; spec: Plan_Spec }+ | { kind: "removed"; spec: Plan_Spec }+ | {+ kind: "updated";+ specId: string;+ from: Plan_Spec;+ to: Plan_Spec;+ sheetChanged: boolean;+ targetsChanged: boolean;+ priorBackupChanged: boolean;+ otherChanged: boolean;+ };++// Compares two specs ignoring the fields rendered explicitly elsewhere+// (sheet, targets, enable_prior_backup). Any residual diff surfaces as a+// generic "updated" fallback row.+function otherFieldsDiffer(a: Plan_Spec, b: Plan_Spec): boolean {+ return !equals(+ Plan_SpecSchema,+ normalizeForOtherDiff(a),+ normalizeForOtherDiff(b)+ );+}++function normalizeForOtherDiff(spec: Plan_Spec): Plan_Spec {+ const c = clone(Plan_SpecSchema, spec);+ if (c.config?.case === "changeDatabaseConfig") {+ c.config.value.sheet = "";+ c.config.value.targets = [];+ c.config.value.enablePriorBackup = false;+ } else if (c.config?.case === "exportDataConfig") {+ c.config.value.sheet = "";+ c.config.value.targets = [];+ }+ return c;+}++const planUpdateDiffCache = new WeakMap<object, SpecDiffEntry[]>();++// Returns the cached diff for a `planUpdate` event payload — the icon and the+// body both need it, so caching by object identity avoids the double pass.+export function diffPlanSpecsForEvent(eventValue: {+ fromSpecs: Plan_Spec[];+ toSpecs: Plan_Spec[];+}): SpecDiffEntry[] {+ const cached = planUpdateDiffCache.get(eventValue);+ if (cached) return cached;+ const fresh = diffPlanSpecs(eventValue.fromSpecs, eventValue.toSpecs);+ planUpdateDiffCache.set(eventValue, fresh);+ return fresh;+}++export function diffPlanSpecs(+ from: Plan_Spec[],+ to: Plan_Spec[]+): SpecDiffEntry[] {+ const fromById = new Map(from.map((s) => [s.id, s]));+ const toById = new Map(to.map((s) => [s.id, s]));+ const out: SpecDiffEntry[] = [];++ for (const s of to) {+ if (!fromById.has(s.id)) out.push({ kind: "added", spec: s });+ }+ for (const s of from) {+ if (!toById.has(s.id)) out.push({ kind: "removed", spec: s });+ }+ for (const newSpec of to) {+ const oldSpec = fromById.get(newSpec.id);+ if (!oldSpec) continue;+ const sheetChanged = sheetNameOfSpec(oldSpec) !== sheetNameOfSpec(newSpec);+ const targetsChanged = !isEqual(+ targetsOfSpec(oldSpec),+ targetsOfSpec(newSpec)+ );+ const priorBackupChanged =+ enablePriorBackupOfSpec(oldSpec) !== enablePriorBackupOfSpec(newSpec);+ const otherChanged = otherFieldsDiffer(oldSpec, newSpec);+ if (sheetChanged || targetsChanged || priorBackupChanged || otherChanged) {+ out.push({+ kind: "updated",+ specId: newSpec.id,+ from: oldSpec,+ to: newSpec,+ sheetChanged,+ targetsChanged,+ priorBackupChanged,+ otherChanged,+ });+ }+ }+ return out;+}++export function diffEntryKey(entry: SpecDiffEntry): string {+ switch (entry.kind) {+ case "added":+ return `add:${entry.spec.id}`;+ case "removed":+ return `rm:${entry.spec.id}`;+ case "updated":+ return `up:${entry.specId}`;+ }+}diff --git a/frontend/src/react/pages/project/plan-detail/components/PlanDetailApprovalFlow.test.tsx b/frontend/src/react/pages/project/plan-detail/components/PlanDetailApprovalFlow.test.tsxindex bd641317d5..0a98184a3a 100644--- a/frontend/src/react/pages/project/plan-detail/components/PlanDetailApprovalFlow.test.tsx+++ b/frontend/src/react/pages/project/plan-detail/components/PlanDetailApprovalFlow.test.tsx@@ -2,11 +2,9 @@ import type { ReactElement } from "react";import { act } from "react";import { createRoot } from "react-dom/client";import { beforeEach, describe, expect, test, vi } from "vitest";+import { ApprovalStatus } from "@/types/proto-es/v1/common_pb";import type { Issue } from "@/types/proto-es/v1/issue_service_pb";-import {- Issue_ApprovalStatus,- Issue_Approver_Status,-} from "@/types/proto-es/v1/issue_service_pb";+import { Issue_Approver_Status } from "@/types/proto-es/v1/issue_service_pb";import { PlanDetailProvider } from "../context/PlanDetailContext";import type { PlanDetailPageState } from "../hooks/usePlanDetailPage";import { PlanDetailReviewApprovalFlow } from "./PlanDetailApprovalFlow";@@ -194,7 +192,7 @@ const makeIssue = ({roles = ["roles/PROJECT_OWNER"],creator = "users/me",}: {- approvalStatus: Issue_ApprovalStatus;+ approvalStatus: ApprovalStatus;approvers?: Array<Record<string, unknown>>;roles?: string[];creator?: string;@@ -233,7 +231,7 @@ beforeEach(() => {describe("PlanDetailApprovalFlow", () => {test("renders generating row for checking approval flow", () => {const issue = makeIssue({- approvalStatus: Issue_ApprovalStatus.CHECKING,+ approvalStatus: ApprovalStatus.CHECKING,});const { container, render, unmount } = renderIntoContainer(<PlanDetailProvider value={makePageState({ issue })}>@@ -254,7 +252,7 @@ describe("PlanDetailApprovalFlow", () => {test("renders skip placeholder when approval flow is skipped", () => {const issue = makeIssue({- approvalStatus: Issue_ApprovalStatus.SKIPPED,+ approvalStatus: ApprovalStatus.SKIPPED,roles: [],});const { container, render, unmount } = renderIntoContainer(@@ -275,7 +273,7 @@ describe("PlanDetailApprovalFlow", () => {test("renders timeline header and footer link for pending approval", () => {const issue = makeIssue({- approvalStatus: Issue_ApprovalStatus.PENDING,+ approvalStatus: ApprovalStatus.PENDING,approvers: [{principal: "users/approver",@@ -330,7 +328,7 @@ describe("PlanDetailApprovalFlow", () => {},];const issue = makeIssue({- approvalStatus: Issue_ApprovalStatus.REJECTED,+ approvalStatus: ApprovalStatus.REJECTED,approvers: [{principal: "users/approver",diff --git a/frontend/src/react/pages/project/plan-detail/components/PlanDetailApprovalFlow.tsx b/frontend/src/react/pages/project/plan-detail/components/PlanDetailApprovalFlow.tsxindex d5415f2276..8a8b2bbc10 100644--- a/frontend/src/react/pages/project/plan-detail/components/PlanDetailApprovalFlow.tsx+++ b/frontend/src/react/pages/project/plan-detail/components/PlanDetailApprovalFlow.tsx@@ -32,10 +32,13 @@ import {IssueCommentType,useIssueCommentStore,} from "@/store/modules/v1/issueComment";-import { RiskLevel, State } from "@/types/proto-es/v1/common_pb";+import {+ ApprovalStatus,+ RiskLevel,+ State,+} from "@/types/proto-es/v1/common_pb";import type { Issue, IssueComment } from "@/types/proto-es/v1/issue_service_pb";import {- Issue_ApprovalStatus,Issue_Approver_Status,ListIssueCommentsRequestSchema,RequestIssueRequestSchema,@@ -122,7 +125,7 @@ function PlanDetailApprovalFlowContent({return list.length > 0 ? list : EMPTY_COMMENTS;});const lastRejection = useMemo(() => {- if (!issue || issue.approvalStatus !== Issue_ApprovalStatus.REJECTED) {+ if (!issue || issue.approvalStatus !== ApprovalStatus.REJECTED) {return undefined;}for (let i = comments.length - 1; i >= 0; i--) {@@ -159,7 +162,7 @@ function PlanDetailApprovalFlowContent({.filter(Boolean).join(" · ");- if (issue.approvalStatus === Issue_ApprovalStatus.CHECKING) {+ if (issue.approvalStatus === ApprovalStatus.CHECKING) {if (mode === "review") {return (<div className="flex flex-col">@@ -193,7 +196,7 @@ function PlanDetailApprovalFlowContent({}if (- issue.approvalStatus === Issue_ApprovalStatus.SKIPPED ||+ issue.approvalStatus === ApprovalStatus.SKIPPED ||approvalSteps.length === 0) {if (mode === "review") {@@ -266,18 +269,17 @@ function PlanDetailApprovalFlowContent({return (<div className="flex flex-col">- {issue.approvalStatus === Issue_ApprovalStatus.REJECTED &&- lastRejection && (- <div className="mx-4 mt-3 rounded-sm border border-warning bg-warning/10 px-3 py-2 text-sm text-warning">- <div className="font-medium">- {t("custom-approval.issue-review.rejected-by")}{" "}- {lastRejection.creator}- </div>- {lastRejection.comment && (- <div className="mt-1">{lastRejection.comment}</div>- )}+ {issue.approvalStatus === ApprovalStatus.REJECTED && lastRejection && (+ <div className="mx-4 mt-3 rounded-sm border border-warning bg-warning/10 px-3 py-2 text-sm text-warning">+ <div className="font-medium">+ {t("custom-approval.issue-review.rejected-by")}{" "}+ {lastRejection.creator}</div>- )}+ {lastRejection.comment && (+ <div className="mt-1">{lastRejection.comment}</div>+ )}+ </div>+ )}<div className="px-4 py-3"><div className="flex w-full flex-row flex-wrap items-center gap-2">@@ -635,19 +637,19 @@ function getStatusTag(if (approvalStepCount === 0) {return undefined;}- if (issue.approvalStatus === Issue_ApprovalStatus.APPROVED) {+ if (issue.approvalStatus === ApprovalStatus.APPROVED) {return {className: "bg-success/10 text-success",label: t("issue.table.approved"),};}- if (issue.approvalStatus === Issue_ApprovalStatus.REJECTED) {+ if (issue.approvalStatus === ApprovalStatus.REJECTED) {return {className: "bg-warning/10 text-warning",label: t("common.rejected"),};}- if (issue.approvalStatus === Issue_ApprovalStatus.PENDING) {+ if (issue.approvalStatus === ApprovalStatus.PENDING) {return {className: "bg-accent/10 text-accent",label: t("common.under-review"),diff --git a/frontend/src/react/pages/project/plan-detail/components/PlanDetailHeader.tsx b/frontend/src/react/pages/project/plan-detail/components/PlanDetailHeader.tsxindex 10766c60de..f7cc856231 100644--- a/frontend/src/react/pages/project/plan-detail/components/PlanDetailHeader.tsx+++ b/frontend/src/react/pages/project/plan-detail/components/PlanDetailHeader.tsx@@ -156,6 +156,17 @@ export function PlanDetailHeader() {return;}+ // Skip the API round-trip when nothing changed so we don't pollute the+ // issue timeline with "changed name from X to X".+ const trimmed = title.trim();+ const currentTitle = page.issue?.title ?? page.plan.title;+ if (trimmed === currentTitle) {+ setTitle(currentTitle);+ setEditingTitle(false);+ setEditing("title", false);+ return;+ }+try {setUpdating(true);if (page.issue) {diff --git a/frontend/src/react/pages/project/plan-detail/utils/sidebarStatus.test.ts b/frontend/src/react/pages/project/plan-detail/utils/sidebarStatus.test.tsindex 896d523351..da9ce410c6 100644--- a/frontend/src/react/pages/project/plan-detail/utils/sidebarStatus.test.ts+++ b/frontend/src/react/pages/project/plan-detail/utils/sidebarStatus.test.ts@@ -1,9 +1,6 @@import { describe, expect, test } from "vitest";-import { State } from "@/types/proto-es/v1/common_pb";-import {- Issue_ApprovalStatus,- IssueStatus,-} from "@/types/proto-es/v1/issue_service_pb";+import { ApprovalStatus, State } from "@/types/proto-es/v1/common_pb";+import { IssueStatus } from "@/types/proto-es/v1/issue_service_pb";import type { Rollout } from "@/types/proto-es/v1/rollout_service_pb";import { Task_Status } from "@/types/proto-es/v1/rollout_service_pb";import { getPlanDetailSidebarStatusInfo } from "./sidebarStatus";@@ -27,7 +24,7 @@ const status = ({rollout,}: {issue?: {- approvalStatus: Issue_ApprovalStatus;+ approvalStatus: ApprovalStatus;status: IssueStatus;};rollout?: Rollout;@@ -55,7 +52,7 @@ describe("plan detail sidebar status", () => {expect(status({issue: {- approvalStatus: Issue_ApprovalStatus.REJECTED,+ approvalStatus: ApprovalStatus.REJECTED,status: IssueStatus.OPEN,},})@@ -63,7 +60,7 @@ describe("plan detail sidebar status", () => {expect(status({issue: {- approvalStatus: Issue_ApprovalStatus.SKIPPED,+ approvalStatus: ApprovalStatus.SKIPPED,status: IssueStatus.OPEN,},})diff --git a/frontend/src/react/pages/project/plan-detail/utils/sidebarStatus.ts b/frontend/src/react/pages/project/plan-detail/utils/sidebarStatus.tsindex e6dd1f47c2..f9443e16c1 100644--- a/frontend/src/react/pages/project/plan-detail/utils/sidebarStatus.ts+++ b/frontend/src/react/pages/project/plan-detail/utils/sidebarStatus.ts@@ -1,9 +1,6 @@-import { State } from "@/types/proto-es/v1/common_pb";+import { ApprovalStatus, State } from "@/types/proto-es/v1/common_pb";import type { Issue } from "@/types/proto-es/v1/issue_service_pb";-import {- Issue_ApprovalStatus,- IssueStatus,-} from "@/types/proto-es/v1/issue_service_pb";+import { IssueStatus } from "@/types/proto-es/v1/issue_service_pb";import type { Rollout } from "@/types/proto-es/v1/rollout_service_pb";import { Task_Status } from "@/types/proto-es/v1/rollout_service_pb";@@ -64,10 +61,10 @@ const getReviewStatusInfo = (}switch (issue.approvalStatus) {- case Issue_ApprovalStatus.APPROVED:- case Issue_ApprovalStatus.SKIPPED:+ case ApprovalStatus.APPROVED:+ case ApprovalStatus.SKIPPED:return { dotClass: "bg-success", label: t("common.approved") };- case Issue_ApprovalStatus.REJECTED:+ case ApprovalStatus.REJECTED:return { dotClass: "bg-warning", label: t("common.rejected") };default:return { dotClass: "bg-accent", label: t("common.in-review") };diff --git a/frontend/src/react/pages/workspace/MyIssuesPage.tsx b/frontend/src/react/pages/workspace/MyIssuesPage.tsxindex 4bbecd5c50..2b0ddaa631 100644--- a/frontend/src/react/pages/workspace/MyIssuesPage.tsx+++ b/frontend/src/react/pages/workspace/MyIssuesPage.tsx@@ -14,11 +14,9 @@ import { PagedTableFooter, usePagedData } from "@/react/hooks/usePagedData";import { useVueState } from "@/react/hooks/useVueState";import { router } from "@/router";import { refreshIssueList, useCurrentUserV1, useIssueV1Store } from "@/store";+import { ApprovalStatus } from "@/types/proto-es/v1/common_pb";import type { Issue } from "@/types/proto-es/v1/issue_service_pb";-import {- Issue_ApprovalStatus,- IssueStatus,-} from "@/types/proto-es/v1/issue_service_pb";+import { IssueStatus } from "@/types/proto-es/v1/issue_service_pb";import {buildIssueFilterBySearchParams,buildSearchParamsBySearchText,@@ -40,7 +38,7 @@ export function MyIssuesPage() {{ id: "status", value: IssueStatus[IssueStatus.OPEN] },{id: "approval",- value: Issue_ApprovalStatus[Issue_ApprovalStatus.PENDING],+ value: ApprovalStatus[ApprovalStatus.PENDING],},{ id: "current-approver", value: myEmail },],diff --git a/frontend/src/store/modules/v1/issue.ts b/frontend/src/store/modules/v1/issue.tsindex 5d5a683cf8..0b2373eece 100644--- a/frontend/src/store/modules/v1/issue.ts+++ b/frontend/src/store/modules/v1/issue.ts@@ -8,11 +8,10 @@ import { ref, watch } from "vue";import { issueServiceClientConnect } from "@/connect";import { silentContextKey } from "@/connect/context-key";import { type IssueFilter } from "@/types";-import { RiskLevel } from "@/types/proto-es/v1/common_pb";+import { ApprovalStatus, RiskLevel } from "@/types/proto-es/v1/common_pb";import type { Issue } from "@/types/proto-es/v1/issue_service_pb";import {GetIssueRequestSchema,- Issue_ApprovalStatus,Issue_Type,IssueStatus,SearchIssuesRequestSchema,@@ -41,9 +40,7 @@ export const buildIssueFilter = (find: IssueFilter): string => {filter.push(`current_approver == "${find.currentApprover}"`);}if (find.approvalStatus) {- filter.push(- `approval_status == "${Issue_ApprovalStatus[find.approvalStatus]}"`- );+ filter.push(`approval_status == "${ApprovalStatus[find.approvalStatus]}"`);}if (find.statusList && find.statusList.length > 0) {filter.push(diff --git a/frontend/src/store/modules/v1/issueComment.ts b/frontend/src/store/modules/v1/issueComment.tsindex 4b9ad3a8c4..376522b749 100644--- a/frontend/src/store/modules/v1/issueComment.ts+++ b/frontend/src/store/modules/v1/issueComment.ts@@ -22,7 +22,7 @@ export enum IssueCommentType {USER_COMMENT = "USER_COMMENT",APPROVAL = "APPROVAL",ISSUE_UPDATE = "ISSUE_UPDATE",- PLAN_SPEC_UPDATE = "PLAN_SPEC_UPDATE",+ PLAN_UPDATE = "PLAN_UPDATE",}export const getIssueCommentType = (@@ -32,8 +32,8 @@ export const getIssueCommentType = (return IssueCommentType.APPROVAL;} else if (issueComment.event?.case === "issueUpdate") {return IssueCommentType.ISSUE_UPDATE;- } else if (issueComment.event?.case === "planSpecUpdate") {- return IssueCommentType.PLAN_SPEC_UPDATE;+ } else if (issueComment.event?.case === "planUpdate") {+ return IssueCommentType.PLAN_UPDATE;}return IssueCommentType.USER_COMMENT;};diff --git a/frontend/src/types/proto-es/v1/common_pb.d.ts b/frontend/src/types/proto-es/v1/common_pb.d.tsindex 2e0c55d7ab..7765dd6c14 100644--- a/frontend/src/types/proto-es/v1/common_pb.d.ts+++ b/frontend/src/types/proto-es/v1/common_pb.d.ts@@ -442,6 +442,62 @@ export enum ExportFormat {*/export declare const ExportFormatSchema: GenEnum<ExportFormat>;+/**+ * Approval workflow status for an issue or a plan.+ * Lives at the top level so both plan_service.proto and issue_service.proto+ * can reference it without a circular import.+ *+ * @generated from enum bytebase.v1.ApprovalStatus+ */+export enum ApprovalStatus {+ /**+ * Unspecified approval status.+ *+ * @generated from enum value: APPROVAL_STATUS_UNSPECIFIED = 0;+ */+ APPROVAL_STATUS_UNSPECIFIED = 0,++ /**+ * Approval checks are being evaluated.+ *+ * @generated from enum value: CHECKING = 1;+ */+ CHECKING = 1,++ /**+ * Approval is pending.+ *+ * @generated from enum value: PENDING = 2;+ */+ PENDING = 2,++ /**+ * Issue has been approved.+ *+ * @generated from enum value: APPROVED = 3;+ */+ APPROVED = 3,++ /**+ * Issue has been rejected.+ *+ * @generated from enum value: REJECTED = 4;+ */+ REJECTED = 4,++ /**+ * Approval was skipped.+ *+ * @generated from enum value: SKIPPED = 5;+ */+ SKIPPED = 5,+}++/**+ * Describes the enum bytebase.v1.ApprovalStatus.+ */+export declare const ApprovalStatusSchema: GenEnum<ApprovalStatus>;+/*** RiskLevel is the risk level.*diff --git a/frontend/src/types/proto-es/v1/common_pb.js b/frontend/src/types/proto-es/v1/common_pb.jsindex f3eafd249f..3a3f29f3d1 100644--- a/frontend/src/types/proto-es/v1/common_pb.js+++ b/frontend/src/types/proto-es/v1/common_pb.js@@ -8,7 +8,7 @@ import { enumDesc, fileDesc, messageDesc, tsEnum } from "@bufbuild/protobuf/code* Describes the file v1/common.proto.*/export const file_v1_common = /*@__PURE__*/- fileDesc("Cg92MS9jb21tb24ucHJvdG8SC2J5dGViYXNlLnYxIigKCFBvc2l0aW9uEgwKBGxpbmUYASABKAUSDgoGY29sdW1uGAIgASgFIiMKBVJhbmdlEg0KBXN0YXJ0GAEgASgFEgsKA2VuZBgCIAEoBSJZChZQZXJtaXNzaW9uRGVuaWVkRGV0YWlsEg4KBm1ldGhvZBgBIAEoCRIcChRyZXF1aXJlZF9wZXJtaXNzaW9ucxgCIAMoCRIRCglyZXNvdXJjZXMYAyADKAkqNwoFU3RhdGUSFQoRU1RBVEVfVU5TUEVDSUZJRUQQABIKCgZBQ1RJVkUQARILCgdERUxFVEVEEAIq8AIKBkVuZ2luZRIWChJFTkdJTkVfVU5TUEVDSUZJRUQQABIOCgpDTElDS0hPVVNFEAESCQoFTVlTUUwQAhIMCghQT1NUR1JFUxADEg0KCVNOT1dGTEFLRRAEEgoKBlNRTElURRAFEggKBFRJREIQBhILCgdNT05HT0RCEAcSCQoFUkVESVMQCBIKCgZPUkFDTEUQCRILCgdTUEFOTkVSEAoSCQoFTVNTUUwQCxIMCghSRURTSElGVBAMEgsKB01BUklBREIQDRINCglPQ0VBTkJBU0UQDhINCglTVEFSUk9DS1MQDxIJCgVET1JJUxAQEggKBEhJVkUQERIRCg1FTEFTVElDU0VBUkNIEBISDAoIQklHUVVFUlkQExIMCghEWU5BTU9EQhAUEg4KCkRBVEFCUklDS1MQFRIPCgtDT0NLUk9BQ0hEQhAWEgwKCENPU01PU0RCEBcSCQoFVFJJTk8QGBINCglDQVNTQU5EUkEQGSpcCgdWQ1NUeXBlEhgKFFZDU19UWVBFX1VOU1BFQ0lGSUVEEAASCgoGR0lUSFVCEAESCgoGR0lUTEFCEAISDQoJQklUQlVDS0VUEAMSEAoMQVpVUkVfREVWT1BTEAQqTAoMRXhwb3J0Rm9ybWF0EhYKEkZPUk1BVF9VTlNQRUNJRklFRBAAEgcKA0NTVhABEggKBEpTT04QAhIHCgNTUUwQAxIICgRYTFNYEAQqSAoJUmlza0xldmVsEhoKFlJJU0tfTEVWRUxfVU5TUEVDSUZJRUQQABIHCgNMT1cQARIMCghNT0RFUkFURRACEggKBEhJR0gQAyqOAQoLV2ViaG9va1R5cGUSHAoYV0VCSE9PS19UWVBFX1VOU1BFQ0lGSUVEEAASCQoFU0xBQ0sQARILCgdESVNDT1JEEAISCQoFVEVBTVMQAxIMCghESU5HVEFMSxAEEgoKBkZFSVNIVRAFEgkKBVdFQ09NEAYSCAoETEFSSxAHEg8KC0dPT0dMRV9DSEFUEAgq6wUKDVN0YXRlbWVudFR5cGUSHgoaU1RBVEVNRU5UX1RZUEVfVU5TUEVDSUZJRUQQABITCg9DUkVBVEVfREFUQUJBU0UQARIQCgxDUkVBVEVfVEFCTEUQAhIPCgtDUkVBVEVfVklFVxADEhAKDENSRUFURV9JTkRFWBAEEhMKD0NSRUFURV9TRVFVRU5DRRAFEhEKDUNSRUFURV9TQ0hFTUEQBhITCg9DUkVBVEVfRlVOQ1RJT04QBxISCg5DUkVBVEVfVFJJR0dFUhAIEhQKEENSRUFURV9QUk9DRURVUkUQCRIQCgxDUkVBVEVfRVZFTlQQChIUChBDUkVBVEVfRVhURU5TSU9OEAsSDwoLQ1JFQVRFX1RZUEUQDBIRCg1EUk9QX0RBVEFCQVNFEBQSDgoKRFJPUF9UQUJMRRAVEg0KCURST1BfVklFVxAWEg4KCkRST1BfSU5ERVgQFxIRCg1EUk9QX1NFUVVFTkNFEBgSDwoLRFJPUF9TQ0hFTUEQGRIRCg1EUk9QX0ZVTkNUSU9OEBoSEAoMRFJPUF9UUklHR0VSEBsSEgoORFJPUF9QUk9DRURVUkUQHBIOCgpEUk9QX0VWRU5UEB0SEgoORFJPUF9FWFRFTlNJT04QHhINCglEUk9QX1RZUEUQHxISCg5BTFRFUl9EQVRBQkFTRRAoEg8KC0FMVEVSX1RBQkxFECkSDgoKQUxURVJfVklFVxAqEhIKDkFMVEVSX1NFUVVFTkNFECsSDwoLQUxURVJfRVZFTlQQLBIOCgpBTFRFUl9UWVBFEC0SDwoLQUxURVJfSU5ERVgQLhIMCghUUlVOQ0FURRAyEgoKBlJFTkFNRRAzEhAKDFJFTkFNRV9JTkRFWBA0EhEKDVJFTkFNRV9TQ0hFTUEQNRITCg9SRU5BTUVfU0VRVUVOQ0UQNhILCgdDT01NRU5UEDcSCgoGSU5TRVJUEDwSCgoGVVBEQVRFED0SCgoGREVMRVRFED5CoQEKD2NvbS5ieXRlYmFzZS52MUILQ29tbW9uUHJvdG9QAVo0Z2l0aHViLmNvbS9ieXRlYmFzZS9ieXRlYmFzZS9iYWNrZW5kL2dlbmVyYXRlZC1nby92MaICA0JYWKoCC0J5dGViYXNlLlYxygILQnl0ZWJhc2VcVjHiAhdCeXRlYmFzZVxWMVxHUEJNZXRhZGF0YeoCDEJ5dGViYXNlOjpWMWIGcHJvdG8z");+ fileDesc("Cg92MS9jb21tb24ucHJvdG8SC2J5dGViYXNlLnYxIigKCFBvc2l0aW9uEgwKBGxpbmUYASABKAUSDgoGY29sdW1uGAIgASgFIiMKBVJhbmdlEg0KBXN0YXJ0GAEgASgFEgsKA2VuZBgCIAEoBSJZChZQZXJtaXNzaW9uRGVuaWVkRGV0YWlsEg4KBm1ldGhvZBgBIAEoCRIcChRyZXF1aXJlZF9wZXJtaXNzaW9ucxgCIAMoCRIRCglyZXNvdXJjZXMYAyADKAkqNwoFU3RhdGUSFQoRU1RBVEVfVU5TUEVDSUZJRUQQABIKCgZBQ1RJVkUQARILCgdERUxFVEVEEAIq8AIKBkVuZ2luZRIWChJFTkdJTkVfVU5TUEVDSUZJRUQQABIOCgpDTElDS0hPVVNFEAESCQoFTVlTUUwQAhIMCghQT1NUR1JFUxADEg0KCVNOT1dGTEFLRRAEEgoKBlNRTElURRAFEggKBFRJREIQBhILCgdNT05HT0RCEAcSCQoFUkVESVMQCBIKCgZPUkFDTEUQCRILCgdTUEFOTkVSEAoSCQoFTVNTUUwQCxIMCghSRURTSElGVBAMEgsKB01BUklBREIQDRINCglPQ0VBTkJBU0UQDhINCglTVEFSUk9DS1MQDxIJCgVET1JJUxAQEggKBEhJVkUQERIRCg1FTEFTVElDU0VBUkNIEBISDAoIQklHUVVFUlkQExIMCghEWU5BTU9EQhAUEg4KCkRBVEFCUklDS1MQFRIPCgtDT0NLUk9BQ0hEQhAWEgwKCENPU01PU0RCEBcSCQoFVFJJTk8QGBINCglDQVNTQU5EUkEQGSpcCgdWQ1NUeXBlEhgKFFZDU19UWVBFX1VOU1BFQ0lGSUVEEAASCgoGR0lUSFVCEAESCgoGR0lUTEFCEAISDQoJQklUQlVDS0VUEAMSEAoMQVpVUkVfREVWT1BTEAQqTAoMRXhwb3J0Rm9ybWF0EhYKEkZPUk1BVF9VTlNQRUNJRklFRBAAEgcKA0NTVhABEggKBEpTT04QAhIHCgNTUUwQAxIICgRYTFNYEAQqdQoOQXBwcm92YWxTdGF0dXMSHwobQVBQUk9WQUxfU1RBVFVTX1VOU1BFQ0lGSUVEEAASDAoIQ0hFQ0tJTkcQARILCgdQRU5ESU5HEAISDAoIQVBQUk9WRUQQAxIMCghSRUpFQ1RFRBAEEgsKB1NLSVBQRUQQBSpICglSaXNrTGV2ZWwSGgoWUklTS19MRVZFTF9VTlNQRUNJRklFRBAAEgcKA0xPVxABEgwKCE1PREVSQVRFEAISCAoESElHSBADKo4BCgtXZWJob29rVHlwZRIcChhXRUJIT09LX1RZUEVfVU5TUEVDSUZJRUQQABIJCgVTTEFDSxABEgsKB0RJU0NPUkQQAhIJCgVURUFNUxADEgwKCERJTkdUQUxLEAQSCgoGRkVJU0hVEAUSCQoFV0VDT00QBhIICgRMQVJLEAcSDwoLR09PR0xFX0NIQVQQCCrrBQoNU3RhdGVtZW50VHlwZRIeChpTVEFURU1FTlRfVFlQRV9VTlNQRUNJRklFRBAAEhMKD0NSRUFURV9EQVRBQkFTRRABEhAKDENSRUFURV9UQUJMRRACEg8KC0NSRUFURV9WSUVXEAMSEAoMQ1JFQVRFX0lOREVYEAQSEwoPQ1JFQVRFX1NFUVVFTkNFEAUSEQoNQ1JFQVRFX1NDSEVNQRAGEhMKD0NSRUFURV9GVU5DVElPThAHEhIKDkNSRUFURV9UUklHR0VSEAgSFAoQQ1JFQVRFX1BST0NFRFVSRRAJEhAKDENSRUFURV9FVkVOVBAKEhQKEENSRUFURV9FWFRFTlNJT04QCxIPCgtDUkVBVEVfVFlQRRAMEhEKDURST1BfREFUQUJBU0UQFBIOCgpEUk9QX1RBQkxFEBUSDQoJRFJPUF9WSUVXEBYSDgoKRFJPUF9JTkRFWBAXEhEKDURST1BfU0VRVUVOQ0UQGBIPCgtEUk9QX1NDSEVNQRAZEhEKDURST1BfRlVOQ1RJT04QGhIQCgxEUk9QX1RSSUdHRVIQGxISCg5EUk9QX1BST0NFRFVSRRAcEg4KCkRST1BfRVZFTlQQHRISCg5EUk9QX0VYVEVOU0lPThAeEg0KCURST1BfVFlQRRAfEhIKDkFMVEVSX0RBVEFCQVNFECgSDwoLQUxURVJfVEFCTEUQKRIOCgpBTFRFUl9WSUVXECoSEgoOQUxURVJfU0VRVUVOQ0UQKxIPCgtBTFRFUl9FVkVOVBAsEg4KCkFMVEVSX1RZUEUQLRIPCgtBTFRFUl9JTkRFWBAuEgwKCFRSVU5DQVRFEDISCgoGUkVOQU1FEDMSEAoMUkVOQU1FX0lOREVYEDQSEQoNUkVOQU1FX1NDSEVNQRA1EhMKD1JFTkFNRV9TRVFVRU5DRRA2EgsKB0NPTU1FTlQQNxIKCgZJTlNFUlQQPBIKCgZVUERBVEUQPRIKCgZERUxFVEUQPkKhAQoPY29tLmJ5dGViYXNlLnYxQgtDb21tb25Qcm90b1ABWjRnaXRodWIuY29tL2J5dGViYXNlL2J5dGViYXNlL2JhY2tlbmQvZ2VuZXJhdGVkLWdvL3YxogIDQlhYqgILQnl0ZWJhc2UuVjHKAgtCeXRlYmFzZVxWMeICF0J5dGViYXNlXFYxXEdQQk1ldGFkYXRh6gIMQnl0ZWJhc2U6OlYxYgZwcm90bzM");/*** Describes the message bytebase.v1.Position.@@ -87,11 +87,27 @@ export const ExportFormatSchema = /*@__PURE__*/export const ExportFormat = /*@__PURE__*/tsEnum(ExportFormatSchema);+/**+ * Describes the enum bytebase.v1.ApprovalStatus.+ */+export const ApprovalStatusSchema = /*@__PURE__*/+ enumDesc(file_v1_common, 4);++/**+ * Approval workflow status for an issue or a plan.+ * Lives at the top level so both plan_service.proto and issue_service.proto+ * can reference it without a circular import.+ *+ * @generated from enum bytebase.v1.ApprovalStatus+ */+export const ApprovalStatus = /*@__PURE__*/+ tsEnum(ApprovalStatusSchema);+/*** Describes the enum bytebase.v1.RiskLevel.*/export const RiskLevelSchema = /*@__PURE__*/- enumDesc(file_v1_common, 4);+ enumDesc(file_v1_common, 5);/*** RiskLevel is the risk level.@@ -105,7 +121,7 @@ export const RiskLevel = /*@__PURE__*/* Describes the enum bytebase.v1.WebhookType.*/export const WebhookTypeSchema = /*@__PURE__*/- enumDesc(file_v1_common, 5);+ enumDesc(file_v1_common, 6);/*** Webhook integration type.@@ -119,7 +135,7 @@ export const WebhookType = /*@__PURE__*/* Describes the enum bytebase.v1.StatementType.*/export const StatementTypeSchema = /*@__PURE__*/- enumDesc(file_v1_common, 6);+ enumDesc(file_v1_common, 7);/*** StatementType represents the type of SQL statement.diff --git a/frontend/src/types/proto-es/v1/issue_service_pb.d.ts b/frontend/src/types/proto-es/v1/issue_service_pb.d.tsindex d02f3146e6..267fc2a09e 100644--- a/frontend/src/types/proto-es/v1/issue_service_pb.d.ts+++ b/frontend/src/types/proto-es/v1/issue_service_pb.d.ts@@ -5,8 +5,9 @@import type { GenEnum, GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2";import type { Message } from "@bufbuild/protobuf";import type { Duration, FieldMask, Timestamp } from "@bufbuild/protobuf/wkt";-import type { RiskLevel } from "./common_pb";+import type { ApprovalStatus, RiskLevel } from "./common_pb";import type { Expr } from "../google/type/expr_pb";+import type { Plan_Spec } from "./plan_service_pb";/*** Describes the file v1/issue_service.proto.@@ -559,9 +560,11 @@ export declare type Issue = Message<"bytebase.v1.Issue"> & {labels: string[];/**- * @generated from field: bytebase.v1.Issue.ApprovalStatus approval_status = 18;+ * The overall approval status for the issue.+ *+ * @generated from field: bytebase.v1.ApprovalStatus approval_status = 18;*/- approvalStatus: Issue_ApprovalStatus;+ approvalStatus: ApprovalStatus;/*** The access grant associated with this issue.@@ -692,60 +695,6 @@ export enum Issue_Type {*/export declare const Issue_TypeSchema: GenEnum<Issue_Type>;-/**- * The overall approval status for the issue.- *- * @generated from enum bytebase.v1.Issue.ApprovalStatus- */-export enum Issue_ApprovalStatus {- /**- * Unspecified approval status.- *- * @generated from enum value: APPROVAL_STATUS_UNSPECIFIED = 0;- */- APPROVAL_STATUS_UNSPECIFIED = 0,-- /**- * Approval checks are being evaluated.- *- * @generated from enum value: CHECKING = 1;- */- CHECKING = 1,-- /**- * Approval is pending.- *- * @generated from enum value: PENDING = 2;- */- PENDING = 2,-- /**- * Issue has been approved.- *- * @generated from enum value: APPROVED = 3;- */- APPROVED = 3,-- /**- * Issue has been rejected.- *- * @generated from enum value: REJECTED = 4;- */- REJECTED = 4,-- /**- * Approval was skipped.- *- * @generated from enum value: SKIPPED = 5;- */- SKIPPED = 5,-}--/**- * Describes the enum bytebase.v1.Issue.ApprovalStatus.- */-export declare const Issue_ApprovalStatusSchema: GenEnum<Issue_ApprovalStatus>;-/*** @generated from message bytebase.v1.RoleGrant*/@@ -1036,12 +985,12 @@ export declare type IssueComment = Message<"bytebase.v1.IssueComment"> & {case: "issueUpdate";} | {/**- * Plan spec update event.+ * Plan update event.*- * @generated from field: bytebase.v1.IssueComment.PlanSpecUpdate plan_spec_update = 12;+ * @generated from field: bytebase.v1.IssueComment.PlanUpdate plan_update = 12;*/- value: IssueComment_PlanSpecUpdate;- case: "planSpecUpdate";+ value: IssueComment_PlanUpdate;+ case: "planUpdate";} | { case: undefined; value?: undefined };};@@ -1165,41 +1114,28 @@ export declare type IssueComment_IssueUpdate = Message<"bytebase.v1.IssueCommentexport declare const IssueComment_IssueUpdateSchema: GenMessage<IssueComment_IssueUpdate>;/**- * Plan spec update event information (tracks sheet changes to plan specs).+ * Plan update event information (snapshot of plan.config.specs before+ * and after a PlanService.UpdatePlan call that mutated specs).*- * @generated from message bytebase.v1.IssueComment.PlanSpecUpdate+ * @generated from message bytebase.v1.IssueComment.PlanUpdate*/-export declare type IssueComment_PlanSpecUpdate = Message<"bytebase.v1.IssueComment.PlanSpecUpdate"> & {+export declare type IssueComment_PlanUpdate = Message<"bytebase.v1.IssueComment.PlanUpdate"> & {/**- * The spec that was updated.- * Format: projects/{project}/plans/{plan}/specs/{spec}- *- * @generated from field: string spec = 1;+ * @generated from field: repeated bytebase.v1.Plan.Spec from_specs = 1;*/- spec: string;+ fromSpecs: Plan_Spec[];/**- * The previous sheet.- * Format: projects/{project}/sheets/{sheet}- *- * @generated from field: optional string from_sheet = 2;- */- fromSheet?: string;-- /**- * The new sheet.- * Format: projects/{project}/sheets/{sheet}- *- * @generated from field: optional string to_sheet = 3;+ * @generated from field: repeated bytebase.v1.Plan.Spec to_specs = 2;*/- toSheet?: string;+ toSpecs: Plan_Spec[];};/**- * Describes the message bytebase.v1.IssueComment.PlanSpecUpdate.- * Use `create(IssueComment_PlanSpecUpdateSchema)` to create a new message.+ * Describes the message bytebase.v1.IssueComment.PlanUpdate.+ * Use `create(IssueComment_PlanUpdateSchema)` to create a new message.*/-export declare const IssueComment_PlanSpecUpdateSchema: GenMessage<IssueComment_PlanSpecUpdate>;+export declare const IssueComment_PlanUpdateSchema: GenMessage<IssueComment_PlanUpdate>;/*** The status of an issue.diff --git a/frontend/src/types/proto-es/v1/issue_service_pb.js b/frontend/src/types/proto-es/v1/issue_service_pb.jsindex 180e0f49fa..e963f09f51 100644--- a/frontend/src/types/proto-es/v1/issue_service_pb.js+++ b/frontend/src/types/proto-es/v1/issue_service_pb.js@@ -12,12 +12,13 @@ import { file_google_protobuf_duration, file_google_protobuf_field_mask, file_goimport { file_google_type_expr } from "../google/type/expr_pb";import { file_v1_annotation } from "./annotation_pb";import { file_v1_common } from "./common_pb";+import { file_v1_plan_service } from "./plan_service_pb";/*** Describes the file v1/issue_service.proto.*/export const file_v1_issue_service = /*@__PURE__*/- fileDesc("ChZ2MS9pc3N1ZV9zZXJ2aWNlLnByb3RvEgtieXRlYmFzZS52MSJKCg9HZXRJc3N1ZVJlcXVlc3QSKAoEbmFtZRgBIAEoCUIa4EEC+kEUChJieXRlYmFzZS5jb20vSXNzdWUSDQoFZm9yY2UYAiABKAgiagoSQ3JlYXRlSXNzdWVSZXF1ZXN0EiwKBnBhcmVudBgBIAEoCUIc4EEC+kEWChRieXRlYmFzZS5jb20vUHJvamVjdBImCgVpc3N1ZRgCIAEoCzISLmJ5dGViYXNlLnYxLklzc3VlQgPgQQIimQEKEUxpc3RJc3N1ZXNSZXF1ZXN0EiwKBnBhcmVudBgBIAEoCUIc4EEC+kEWChRieXRlYmFzZS5jb20vUHJvamVjdBIRCglwYWdlX3NpemUYAiABKAUSEgoKcGFnZV90b2tlbhgDIAEoCRIOCgZmaWx0ZXIYBCABKAkSDQoFcXVlcnkYBSABKAkSEAoIb3JkZXJfYnkYBiABKAkiUQoSTGlzdElzc3Vlc1Jlc3BvbnNlEiIKBmlzc3VlcxgBIAMoCzISLmJ5dGViYXNlLnYxLklzc3VlEhcKD25leHRfcGFnZV90b2tlbhgCIAEoCSKCAQoTU2VhcmNoSXNzdWVzUmVxdWVzdBITCgZwYXJlbnQYASABKAlCA+BBAhIRCglwYWdlX3NpemUYAiABKAUSEgoKcGFnZV90b2tlbhgDIAEoCRIOCgZmaWx0ZXIYBCABKAkSDQoFcXVlcnkYBSABKAkSEAoIb3JkZXJfYnkYBiABKAkiUwoUU2VhcmNoSXNzdWVzUmVzcG9uc2USIgoGaXNzdWVzGAEgAygLMhIuYnl0ZWJhc2UudjEuSXNzdWUSFwoPbmV4dF9wYWdlX3Rva2VuGAIgASgJIqABChJVcGRhdGVJc3N1ZVJlcXVlc3QSPQoFaXNzdWUYASABKAsyEi5ieXRlYmFzZS52MS5Jc3N1ZUIa4EEC+kEUChJieXRlYmFzZS5jb20vSXNzdWUSNAoLdXBkYXRlX21hc2sYAiABKAsyGi5nb29nbGUucHJvdG9idWYuRmllbGRNYXNrQgPgQQISFQoNYWxsb3dfbWlzc2luZxgDIAEoCCKYAQoeQmF0Y2hVcGRhdGVJc3N1ZXNTdGF0dXNSZXF1ZXN0EiwKBnBhcmVudBgBIAEoCUIc4EEC+kEWChRieXRlYmFzZS5jb20vUHJvamVjdBIOCgZpc3N1ZXMYAiADKAkSKAoGc3RhdHVzGAMgASgOMhguYnl0ZWJhc2UudjEuSXNzdWVTdGF0dXMSDgoGcmVhc29uGAQgASgJIiEKH0JhdGNoVXBkYXRlSXNzdWVzU3RhdHVzUmVzcG9uc2UiUAoTQXBwcm92ZUlzc3VlUmVxdWVzdBIoCgRuYW1lGAEgASgJQhrgQQL6QRQKEmJ5dGViYXNlLmNvbS9Jc3N1ZRIPCgdjb21tZW50GAIgASgJIk8KElJlamVjdElzc3VlUmVxdWVzdBIoCgRuYW1lGAEgASgJQhrgQQL6QRQKEmJ5dGViYXNlLmNvbS9Jc3N1ZRIPCgdjb21tZW50GAIgASgJIlAKE1JlcXVlc3RJc3N1ZVJlcXVlc3QSKAoEbmFtZRgBIAEoCUIa4EEC+kEUChJieXRlYmFzZS5jb20vSXNzdWUSDwoHY29tbWVudBgCIAEoCSJFChlSZXRyeUlzc3VlQXBwcm92YWxSZXF1ZXN0EigKBG5hbWUYASABKAlCGuBBAvpBFAoSYnl0ZWJhc2UuY29tL0lzc3VlIrUICgVJc3N1ZRIMCgRuYW1lGAEgASgJEhcKBXRpdGxlGAIgASgJQgi6SAVyAxjIARIdCgtkZXNjcmlwdGlvbhgDIAEoCUIIukgFcgMYkE4SJQoEdHlwZRgEIAEoDjIXLmJ5dGViYXNlLnYxLklzc3VlLlR5cGUSKAoGc3RhdHVzGAUgASgOMhguYnl0ZWJhc2UudjEuSXNzdWVTdGF0dXMSLgoJYXBwcm92ZXJzGAYgAygLMhsuYnl0ZWJhc2UudjEuSXNzdWUuQXBwcm92ZXISOAoRYXBwcm92YWxfdGVtcGxhdGUYByABKAsyHS5ieXRlYmFzZS52MS5BcHByb3ZhbFRlbXBsYXRlEhQKB2NyZWF0b3IYCCABKAlCA+BBAxI0CgtjcmVhdGVfdGltZRgJIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXBCA+BBAxI0Cgt1cGRhdGVfdGltZRgKIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXBCA+BBAxIMCgRwbGFuGAsgASgJEioKCnJvbGVfZ3JhbnQYDSABKAsyFi5ieXRlYmFzZS52MS5Sb2xlR3JhbnQSKgoKcmlza19sZXZlbBgPIAEoDjIWLmJ5dGViYXNlLnYxLlJpc2tMZXZlbBIOCgZsYWJlbHMYESADKAkSPwoPYXBwcm92YWxfc3RhdHVzGBIgASgOMiEuYnl0ZWJhc2UudjEuSXNzdWUuQXBwcm92YWxTdGF0dXNCA+BBAxI2CgxhY2Nlc3NfZ3JhbnQYEyABKAlCIOBBA/pBGgoYYnl0ZWJhc2UuY29tL0FjY2Vzc0dyYW50GpwBCghBcHByb3ZlchIyCgZzdGF0dXMYASABKA4yIi5ieXRlYmFzZS52MS5Jc3N1ZS5BcHByb3Zlci5TdGF0dXMSEQoJcHJpbmNpcGFsGAIgASgJIkkKBlN0YXR1cxIWChJTVEFUVVNfVU5TUEVDSUZJRUQQABILCgdQRU5ESU5HEAESDAoIQVBQUk9WRUQQAhIMCghSRUpFQ1RFRBADImgKBFR5cGUSFAoQVFlQRV9VTlNQRUNJRklFRBAAEhMKD0RBVEFCQVNFX0NIQU5HRRABEg4KClJPTEVfR1JBTlQQAhITCg9EQVRBQkFTRV9FWFBPUlQQAxIQCgxBQ0NFU1NfR1JBTlQQBCJ1Cg5BcHByb3ZhbFN0YXR1cxIfChtBUFBST1ZBTF9TVEFUVVNfVU5TUEVDSUZJRUQQABIMCghDSEVDS0lORxABEgsKB1BFTkRJTkcQAhIMCghBUFBST1ZFRBADEgwKCFJFSkVDVEVEEAQSCwoHU0tJUFBFRBAFOjrqQTcKEmJ5dGViYXNlLmNvbS9Jc3N1ZRIhcHJvamVjdHMve3Byb2plY3R9L2lzc3Vlcy97aXNzdWV9InwKCVJvbGVHcmFudBIMCgRyb2xlGAEgASgJEgwKBHVzZXIYAiABKAkSJAoJY29uZGl0aW9uGAMgASgLMhEuZ29vZ2xlLnR5cGUuRXhwchItCgpleHBpcmF0aW9uGAQgASgLMhkuZ29vZ2xlLnByb3RvYnVmLkR1cmF0aW9uIl8KEEFwcHJvdmFsVGVtcGxhdGUSJwoEZmxvdxgBIAEoCzIZLmJ5dGViYXNlLnYxLkFwcHJvdmFsRmxvdxINCgV0aXRsZRgCIAEoCRITCgtkZXNjcmlwdGlvbhgDIAEoCSIdCgxBcHByb3ZhbEZsb3cSDQoFcm9sZXMYASADKAkibQoYTGlzdElzc3VlQ29tbWVudHNSZXF1ZXN0EioKBnBhcmVudBgBIAEoCUIa4EEC+kEUChJieXRlYmFzZS5jb20vSXNzdWUSEQoJcGFnZV9zaXplGAIgASgFEhIKCnBhZ2VfdG9rZW4YAyABKAkiZwoZTGlzdElzc3VlQ29tbWVudHNSZXNwb25zZRIxCg5pc3N1ZV9jb21tZW50cxgBIAMoCzIZLmJ5dGViYXNlLnYxLklzc3VlQ29tbWVudBIXCg9uZXh0X3BhZ2VfdG9rZW4YAiABKAkieQoZQ3JlYXRlSXNzdWVDb21tZW50UmVxdWVzdBIqCgZwYXJlbnQYASABKAlCGuBBAvpBFAoSYnl0ZWJhc2UuY29tL0lzc3VlEjAKDWlzc3VlX2NvbW1lbnQYAiABKAsyGS5ieXRlYmFzZS52MS5Jc3N1ZUNvbW1lbnQixgEKGVVwZGF0ZUlzc3VlQ29tbWVudFJlcXVlc3QSKgoGcGFyZW50GAEgASgJQhrgQQL6QRQKEmJ5dGViYXNlLmNvbS9Jc3N1ZRIwCg1pc3N1ZV9jb21tZW50GAIgASgLMhkuYnl0ZWJhc2UudjEuSXNzdWVDb21tZW50EjQKC3VwZGF0ZV9tYXNrGAMgASgLMhouZ29vZ2xlLnByb3RvYnVmLkZpZWxkTWFza0ID4EECEhUKDWFsbG93X21pc3NpbmcYBCABKAgi/AcKDElzc3VlQ29tbWVudBIMCgRuYW1lGAEgASgJEhoKB2NvbW1lbnQYAiABKAlCCbpIBnIEGICABBIPCgdwYXlsb2FkGAMgASgJEjQKC2NyZWF0ZV90aW1lGAQgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcEID4EEDEjQKC3VwZGF0ZV90aW1lGAUgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcEID4EEDEhQKB2NyZWF0b3IYBiABKAlCA+BBAxI2CghhcHByb3ZhbBgHIAEoCzIiLmJ5dGViYXNlLnYxLklzc3VlQ29tbWVudC5BcHByb3ZhbEgAEj0KDGlzc3VlX3VwZGF0ZRgIIAEoCzIlLmJ5dGViYXNlLnYxLklzc3VlQ29tbWVudC5Jc3N1ZVVwZGF0ZUgAEkQKEHBsYW5fc3BlY191cGRhdGUYDCABKAsyKC5ieXRlYmFzZS52MS5Jc3N1ZUNvbW1lbnQuUGxhblNwZWNVcGRhdGVIABqQAQoIQXBwcm92YWwSOQoGc3RhdHVzGAEgASgOMikuYnl0ZWJhc2UudjEuSXNzdWVDb21tZW50LkFwcHJvdmFsLlN0YXR1cyJJCgZTdGF0dXMSFgoSU1RBVFVTX1VOU1BFQ0lGSUVEEAASCwoHUEVORElORxABEgwKCEFQUFJPVkVEEAISDAoIUkVKRUNURUQQAxrpAgoLSXNzdWVVcGRhdGUSFwoKZnJvbV90aXRsZRgBIAEoCUgAiAEBEhUKCHRvX3RpdGxlGAIgASgJSAGIAQESHQoQZnJvbV9kZXNjcmlwdGlvbhgDIAEoCUgCiAEBEhsKDnRvX2Rlc2NyaXB0aW9uGAQgASgJSAOIAQESMgoLZnJvbV9zdGF0dXMYBSABKA4yGC5ieXRlYmFzZS52MS5Jc3N1ZVN0YXR1c0gEiAEBEjAKCXRvX3N0YXR1cxgGIAEoDjIYLmJ5dGViYXNlLnYxLklzc3VlU3RhdHVzSAWIAQESEwoLZnJvbV9sYWJlbHMYByADKAkSEQoJdG9fbGFiZWxzGAggAygJQg0KC19mcm9tX3RpdGxlQgsKCV90b190aXRsZUITChFfZnJvbV9kZXNjcmlwdGlvbkIRCg9fdG9fZGVzY3JpcHRpb25CDgoMX2Zyb21fc3RhdHVzQgwKCl90b19zdGF0dXMaagoOUGxhblNwZWNVcGRhdGUSDAoEc3BlYxgBIAEoCRIXCgpmcm9tX3NoZWV0GAIgASgJSACIAQESFQoIdG9fc2hlZXQYAyABKAlIAYgBAUINCgtfZnJvbV9zaGVldEILCglfdG9fc2hlZXRCBwoFZXZlbnQqTQoLSXNzdWVTdGF0dXMSHAoYSVNTVUVfU1RBVFVTX1VOU1BFQ0lGSUVEEAASCAoET1BFThABEggKBERPTkUQAhIMCghDQU5DRUxFRBADMuwQCgxJc3N1ZVNlcnZpY2USgAEKCEdldElzc3VlEhwuYnl0ZWJhc2UudjEuR2V0SXNzdWVSZXF1ZXN0GhIuYnl0ZWJhc2UudjEuSXNzdWUiQtpBBG5hbWWK6jANYmIuaXNzdWVzLmdldJDqMAGC0+STAiASHi92MS97bmFtZT1wcm9qZWN0cy8qL2lzc3Vlcy8qfRKcAQoLQ3JlYXRlSXNzdWUSHy5ieXRlYmFzZS52MS5DcmVhdGVJc3N1ZVJlcXVlc3QaEi5ieXRlYmFzZS52MS5Jc3N1ZSJY2kEMcGFyZW50LGlzc3VliuowEGJiLmlzc3Vlcy5jcmVhdGWQ6jABmOowAYLT5JMCJzoFaXNzdWUiHi92MS97cGFyZW50PXByb2plY3RzLyp9L2lzc3VlcxKUAQoKTGlzdElzc3VlcxIeLmJ5dGViYXNlLnYxLkxpc3RJc3N1ZXNSZXF1ZXN0Gh8uYnl0ZWJhc2UudjEuTGlzdElzc3Vlc1Jlc3BvbnNlIkXaQQZwYXJlbnSK6jAOYmIuaXNzdWVzLmxpc3SQ6jABgtPkkwIgEh4vdjEve3BhcmVudD1wcm9qZWN0cy8qfS9pc3N1ZXMSmgEKDFNlYXJjaElzc3VlcxIgLmJ5dGViYXNlLnYxLlNlYXJjaElzc3Vlc1JlcXVlc3QaIS5ieXRlYmFzZS52MS5TZWFyY2hJc3N1ZXNSZXNwb25zZSJFiuowDWJiLmlzc3Vlcy5nZXSQ6jACgtPkkwIqOgEqIiUvdjEve3BhcmVudD1wcm9qZWN0cy8qfS9pc3N1ZXM6c2VhcmNoEqcBCgtVcGRhdGVJc3N1ZRIfLmJ5dGViYXNlLnYxLlVwZGF0ZUlzc3VlUmVxdWVzdBoSLmJ5dGViYXNlLnYxLklzc3VlImPaQRFpc3N1ZSx1cGRhdGVfbWFza4rqMBBiYi5pc3N1ZXMudXBkYXRlkOowAZjqMAGC0+STAi06BWlzc3VlMiQvdjEve2lzc3VlLm5hbWU9cHJvamVjdHMvKi9pc3N1ZXMvKn0SwAEKEUxpc3RJc3N1ZUNvbW1lbnRzEiUuYnl0ZWJhc2UudjEuTGlzdElzc3VlQ29tbWVudHNSZXF1ZXN0GiYuYnl0ZWJhc2UudjEuTGlzdElzc3VlQ29tbWVudHNSZXNwb25zZSJc2kEGcGFyZW50iuowFWJiLmlzc3VlQ29tbWVudHMubGlzdJDqMAGC0+STAjASLi92MS97cGFyZW50PXByb2plY3RzLyovaXNzdWVzLyp9L2lzc3VlQ29tbWVudHMS0gEKEkNyZWF0ZUlzc3VlQ29tbWVudBImLmJ5dGViYXNlLnYxLkNyZWF0ZUlzc3VlQ29tbWVudFJlcXVlc3QaGS5ieXRlYmFzZS52MS5Jc3N1ZUNvbW1lbnQiedpBFHBhcmVudCxpc3N1ZV9jb21tZW50iuowF2JiLmlzc3VlQ29tbWVudHMuY3JlYXRlkOowAZjqMAGC0+STAjk6DWlzc3VlX2NvbW1lbnQiKC92MS97cGFyZW50PXByb2plY3RzLyovaXNzdWVzLyp9OmNvbW1lbnQS3wEKElVwZGF0ZUlzc3VlQ29tbWVudBImLmJ5dGViYXNlLnYxLlVwZGF0ZUlzc3VlQ29tbWVudFJlcXVlc3QaGS5ieXRlYmFzZS52MS5Jc3N1ZUNvbW1lbnQihQHaQSBwYXJlbnQsaXNzdWVfY29tbWVudCx1cGRhdGVfbWFza4rqMBdiYi5pc3N1ZUNvbW1lbnRzLnVwZGF0ZZDqMAGY6jABgtPkkwI5Og1pc3N1ZV9jb21tZW50MigvdjEve3BhcmVudD1wcm9qZWN0cy8qL2lzc3Vlcy8qfTpjb21tZW50Es0BChdCYXRjaFVwZGF0ZUlzc3Vlc1N0YXR1cxIrLmJ5dGViYXNlLnYxLkJhdGNoVXBkYXRlSXNzdWVzU3RhdHVzUmVxdWVzdBosLmJ5dGViYXNlLnYxLkJhdGNoVXBkYXRlSXNzdWVzU3RhdHVzUmVzcG9uc2UiV4rqMBBiYi5pc3N1ZXMudXBkYXRlkOowAZjqMAGC0+STAjU6ASoiMC92MS97cGFyZW50PXByb2plY3RzLyp9L2lzc3VlczpiYXRjaFVwZGF0ZVN0YXR1cxJ/CgxBcHByb3ZlSXNzdWUSIC5ieXRlYmFzZS52MS5BcHByb3ZlSXNzdWVSZXF1ZXN0GhIuYnl0ZWJhc2UudjEuSXNzdWUiOZDqMAKY6jABgtPkkwIrOgEqIiYvdjEve25hbWU9cHJvamVjdHMvKi9pc3N1ZXMvKn06YXBwcm92ZRJ8CgtSZWplY3RJc3N1ZRIfLmJ5dGViYXNlLnYxLlJlamVjdElzc3VlUmVxdWVzdBoSLmJ5dGViYXNlLnYxLklzc3VlIjiQ6jACmOowAYLT5JMCKjoBKiIlL3YxL3tuYW1lPXByb2plY3RzLyovaXNzdWVzLyp9OnJlamVjdBJ/CgxSZXF1ZXN0SXNzdWUSIC5ieXRlYmFzZS52MS5SZXF1ZXN0SXNzdWVSZXF1ZXN0GhIuYnl0ZWJhc2UudjEuSXNzdWUiOZDqMAKY6jABgtPkkwIrOgEqIiYvdjEve25hbWU9cHJvamVjdHMvKi9pc3N1ZXMvKn06cmVxdWVzdBKRAQoSUmV0cnlJc3N1ZUFwcHJvdmFsEiYuYnl0ZWJhc2UudjEuUmV0cnlJc3N1ZUFwcHJvdmFsUmVxdWVzdBoSLmJ5dGViYXNlLnYxLklzc3VlIj+Q6jACmOowAYLT5JMCMToBKiIsL3YxL3tuYW1lPXByb2plY3RzLyovaXNzdWVzLyp9OnJldHJ5QXBwcm92YWxCpwEKD2NvbS5ieXRlYmFzZS52MUIRSXNzdWVTZXJ2aWNlUHJvdG9QAVo0Z2l0aHViLmNvbS9ieXRlYmFzZS9ieXRlYmFzZS9iYWNrZW5kL2dlbmVyYXRlZC1nby92MaICA0JYWKoCC0J5dGViYXNlLlYxygILQnl0ZWJhc2VcVjHiAhdCeXRlYmFzZVxWMVxHUEJNZXRhZGF0YeoCDEJ5dGViYXNlOjpWMWIGcHJvdG8z", [file_buf_validate_validate, file_google_api_annotations, file_google_api_client, file_google_api_field_behavior, file_google_api_resource, file_google_protobuf_duration, file_google_protobuf_field_mask, file_google_protobuf_timestamp, file_google_type_expr, file_v1_annotation, file_v1_common]);+ fileDesc("ChZ2MS9pc3N1ZV9zZXJ2aWNlLnByb3RvEgtieXRlYmFzZS52MSJKCg9HZXRJc3N1ZVJlcXVlc3QSKAoEbmFtZRgBIAEoCUIa4EEC+kEUChJieXRlYmFzZS5jb20vSXNzdWUSDQoFZm9yY2UYAiABKAgiagoSQ3JlYXRlSXNzdWVSZXF1ZXN0EiwKBnBhcmVudBgBIAEoCUIc4EEC+kEWChRieXRlYmFzZS5jb20vUHJvamVjdBImCgVpc3N1ZRgCIAEoCzISLmJ5dGViYXNlLnYxLklzc3VlQgPgQQIimQEKEUxpc3RJc3N1ZXNSZXF1ZXN0EiwKBnBhcmVudBgBIAEoCUIc4EEC+kEWChRieXRlYmFzZS5jb20vUHJvamVjdBIRCglwYWdlX3NpemUYAiABKAUSEgoKcGFnZV90b2tlbhgDIAEoCRIOCgZmaWx0ZXIYBCABKAkSDQoFcXVlcnkYBSABKAkSEAoIb3JkZXJfYnkYBiABKAkiUQoSTGlzdElzc3Vlc1Jlc3BvbnNlEiIKBmlzc3VlcxgBIAMoCzISLmJ5dGViYXNlLnYxLklzc3VlEhcKD25leHRfcGFnZV90b2tlbhgCIAEoCSKCAQoTU2VhcmNoSXNzdWVzUmVxdWVzdBITCgZwYXJlbnQYASABKAlCA+BBAhIRCglwYWdlX3NpemUYAiABKAUSEgoKcGFnZV90b2tlbhgDIAEoCRIOCgZmaWx0ZXIYBCABKAkSDQoFcXVlcnkYBSABKAkSEAoIb3JkZXJfYnkYBiABKAkiUwoUU2VhcmNoSXNzdWVzUmVzcG9uc2USIgoGaXNzdWVzGAEgAygLMhIuYnl0ZWJhc2UudjEuSXNzdWUSFwoPbmV4dF9wYWdlX3Rva2VuGAIgASgJIqABChJVcGRhdGVJc3N1ZVJlcXVlc3QSPQoFaXNzdWUYASABKAsyEi5ieXRlYmFzZS52MS5Jc3N1ZUIa4EEC+kEUChJieXRlYmFzZS5jb20vSXNzdWUSNAoLdXBkYXRlX21hc2sYAiABKAsyGi5nb29nbGUucHJvdG9idWYuRmllbGRNYXNrQgPgQQISFQoNYWxsb3dfbWlzc2luZxgDIAEoCCKYAQoeQmF0Y2hVcGRhdGVJc3N1ZXNTdGF0dXNSZXF1ZXN0EiwKBnBhcmVudBgBIAEoCUIc4EEC+kEWChRieXRlYmFzZS5jb20vUHJvamVjdBIOCgZpc3N1ZXMYAiADKAkSKAoGc3RhdHVzGAMgASgOMhguYnl0ZWJhc2UudjEuSXNzdWVTdGF0dXMSDgoGcmVhc29uGAQgASgJIiEKH0JhdGNoVXBkYXRlSXNzdWVzU3RhdHVzUmVzcG9uc2UiUAoTQXBwcm92ZUlzc3VlUmVxdWVzdBIoCgRuYW1lGAEgASgJQhrgQQL6QRQKEmJ5dGViYXNlLmNvbS9Jc3N1ZRIPCgdjb21tZW50GAIgASgJIk8KElJlamVjdElzc3VlUmVxdWVzdBIoCgRuYW1lGAEgASgJQhrgQQL6QRQKEmJ5dGViYXNlLmNvbS9Jc3N1ZRIPCgdjb21tZW50GAIgASgJIlAKE1JlcXVlc3RJc3N1ZVJlcXVlc3QSKAoEbmFtZRgBIAEoCUIa4EEC+kEUChJieXRlYmFzZS5jb20vSXNzdWUSDwoHY29tbWVudBgCIAEoCSJFChlSZXRyeUlzc3VlQXBwcm92YWxSZXF1ZXN0EigKBG5hbWUYASABKAlCGuBBAvpBFAoSYnl0ZWJhc2UuY29tL0lzc3VlIrgHCgVJc3N1ZRIMCgRuYW1lGAEgASgJEhcKBXRpdGxlGAIgASgJQgi6SAVyAxjIARIdCgtkZXNjcmlwdGlvbhgDIAEoCUIIukgFcgMYkE4SJQoEdHlwZRgEIAEoDjIXLmJ5dGViYXNlLnYxLklzc3VlLlR5cGUSKAoGc3RhdHVzGAUgASgOMhguYnl0ZWJhc2UudjEuSXNzdWVTdGF0dXMSLgoJYXBwcm92ZXJzGAYgAygLMhsuYnl0ZWJhc2UudjEuSXNzdWUuQXBwcm92ZXISOAoRYXBwcm92YWxfdGVtcGxhdGUYByABKAsyHS5ieXRlYmFzZS52MS5BcHByb3ZhbFRlbXBsYXRlEhQKB2NyZWF0b3IYCCABKAlCA+BBAxI0CgtjcmVhdGVfdGltZRgJIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXBCA+BBAxI0Cgt1cGRhdGVfdGltZRgKIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXBCA+BBAxIMCgRwbGFuGAsgASgJEioKCnJvbGVfZ3JhbnQYDSABKAsyFi5ieXRlYmFzZS52MS5Sb2xlR3JhbnQSKgoKcmlza19sZXZlbBgPIAEoDjIWLmJ5dGViYXNlLnYxLlJpc2tMZXZlbBIOCgZsYWJlbHMYESADKAkSOQoPYXBwcm92YWxfc3RhdHVzGBIgASgOMhsuYnl0ZWJhc2UudjEuQXBwcm92YWxTdGF0dXNCA+BBAxI2CgxhY2Nlc3NfZ3JhbnQYEyABKAlCIOBBA/pBGgoYYnl0ZWJhc2UuY29tL0FjY2Vzc0dyYW50GpwBCghBcHByb3ZlchIyCgZzdGF0dXMYASABKA4yIi5ieXRlYmFzZS52MS5Jc3N1ZS5BcHByb3Zlci5TdGF0dXMSEQoJcHJpbmNpcGFsGAIgASgJIkkKBlN0YXR1cxIWChJTVEFUVVNfVU5TUEVDSUZJRUQQABILCgdQRU5ESU5HEAESDAoIQVBQUk9WRUQQAhIMCghSRUpFQ1RFRBADImgKBFR5cGUSFAoQVFlQRV9VTlNQRUNJRklFRBAAEhMKD0RBVEFCQVNFX0NIQU5HRRABEg4KClJPTEVfR1JBTlQQAhITCg9EQVRBQkFTRV9FWFBPUlQQAxIQCgxBQ0NFU1NfR1JBTlQQBDo66kE3ChJieXRlYmFzZS5jb20vSXNzdWUSIXByb2plY3RzL3twcm9qZWN0fS9pc3N1ZXMve2lzc3VlfSJ8CglSb2xlR3JhbnQSDAoEcm9sZRgBIAEoCRIMCgR1c2VyGAIgASgJEiQKCWNvbmRpdGlvbhgDIAEoCzIRLmdvb2dsZS50eXBlLkV4cHISLQoKZXhwaXJhdGlvbhgEIAEoCzIZLmdvb2dsZS5wcm90b2J1Zi5EdXJhdGlvbiJfChBBcHByb3ZhbFRlbXBsYXRlEicKBGZsb3cYASABKAsyGS5ieXRlYmFzZS52MS5BcHByb3ZhbEZsb3cSDQoFdGl0bGUYAiABKAkSEwoLZGVzY3JpcHRpb24YAyABKAkiHQoMQXBwcm92YWxGbG93Eg0KBXJvbGVzGAEgAygJIm0KGExpc3RJc3N1ZUNvbW1lbnRzUmVxdWVzdBIqCgZwYXJlbnQYASABKAlCGuBBAvpBFAoSYnl0ZWJhc2UuY29tL0lzc3VlEhEKCXBhZ2Vfc2l6ZRgCIAEoBRISCgpwYWdlX3Rva2VuGAMgASgJImcKGUxpc3RJc3N1ZUNvbW1lbnRzUmVzcG9uc2USMQoOaXNzdWVfY29tbWVudHMYASADKAsyGS5ieXRlYmFzZS52MS5Jc3N1ZUNvbW1lbnQSFwoPbmV4dF9wYWdlX3Rva2VuGAIgASgJInkKGUNyZWF0ZUlzc3VlQ29tbWVudFJlcXVlc3QSKgoGcGFyZW50GAEgASgJQhrgQQL6QRQKEmJ5dGViYXNlLmNvbS9Jc3N1ZRIwCg1pc3N1ZV9jb21tZW50GAIgASgLMhkuYnl0ZWJhc2UudjEuSXNzdWVDb21tZW50IsYBChlVcGRhdGVJc3N1ZUNvbW1lbnRSZXF1ZXN0EioKBnBhcmVudBgBIAEoCUIa4EEC+kEUChJieXRlYmFzZS5jb20vSXNzdWUSMAoNaXNzdWVfY29tbWVudBgCIAEoCzIZLmJ5dGViYXNlLnYxLklzc3VlQ29tbWVudBI0Cgt1cGRhdGVfbWFzaxgDIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5GaWVsZE1hc2tCA+BBAhIVCg1hbGxvd19taXNzaW5nGAQgASgIIusHCgxJc3N1ZUNvbW1lbnQSDAoEbmFtZRgBIAEoCRIaCgdjb21tZW50GAIgASgJQgm6SAZyBBiAgAQSDwoHcGF5bG9hZBgDIAEoCRI0CgtjcmVhdGVfdGltZRgEIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXBCA+BBAxI0Cgt1cGRhdGVfdGltZRgFIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXBCA+BBAxIUCgdjcmVhdG9yGAYgASgJQgPgQQMSNgoIYXBwcm92YWwYByABKAsyIi5ieXRlYmFzZS52MS5Jc3N1ZUNvbW1lbnQuQXBwcm92YWxIABI9Cgxpc3N1ZV91cGRhdGUYCCABKAsyJS5ieXRlYmFzZS52MS5Jc3N1ZUNvbW1lbnQuSXNzdWVVcGRhdGVIABI7CgtwbGFuX3VwZGF0ZRgMIAEoCzIkLmJ5dGViYXNlLnYxLklzc3VlQ29tbWVudC5QbGFuVXBkYXRlSAAakAEKCEFwcHJvdmFsEjkKBnN0YXR1cxgBIAEoDjIpLmJ5dGViYXNlLnYxLklzc3VlQ29tbWVudC5BcHByb3ZhbC5TdGF0dXMiSQoGU3RhdHVzEhYKElNUQVRVU19VTlNQRUNJRklFRBAAEgsKB1BFTkRJTkcQARIMCghBUFBST1ZFRBACEgwKCFJFSkVDVEVEEAMa6QIKC0lzc3VlVXBkYXRlEhcKCmZyb21fdGl0bGUYASABKAlIAIgBARIVCgh0b190aXRsZRgCIAEoCUgBiAEBEh0KEGZyb21fZGVzY3JpcHRpb24YAyABKAlIAogBARIbCg50b19kZXNjcmlwdGlvbhgEIAEoCUgDiAEBEjIKC2Zyb21fc3RhdHVzGAUgASgOMhguYnl0ZWJhc2UudjEuSXNzdWVTdGF0dXNIBIgBARIwCgl0b19zdGF0dXMYBiABKA4yGC5ieXRlYmFzZS52MS5Jc3N1ZVN0YXR1c0gFiAEBEhMKC2Zyb21fbGFiZWxzGAcgAygJEhEKCXRvX2xhYmVscxgIIAMoCUINCgtfZnJvbV90aXRsZUILCglfdG9fdGl0bGVCEwoRX2Zyb21fZGVzY3JpcHRpb25CEQoPX3RvX2Rlc2NyaXB0aW9uQg4KDF9mcm9tX3N0YXR1c0IMCgpfdG9fc3RhdHVzGmIKClBsYW5VcGRhdGUSKgoKZnJvbV9zcGVjcxgBIAMoCzIWLmJ5dGViYXNlLnYxLlBsYW4uU3BlYxIoCgh0b19zcGVjcxgCIAMoCzIWLmJ5dGViYXNlLnYxLlBsYW4uU3BlY0IHCgVldmVudCpNCgtJc3N1ZVN0YXR1cxIcChhJU1NVRV9TVEFUVVNfVU5TUEVDSUZJRUQQABIICgRPUEVOEAESCAoERE9ORRACEgwKCENBTkNFTEVEEAMy7BAKDElzc3VlU2VydmljZRKAAQoIR2V0SXNzdWUSHC5ieXRlYmFzZS52MS5HZXRJc3N1ZVJlcXVlc3QaEi5ieXRlYmFzZS52MS5Jc3N1ZSJC2kEEbmFtZYrqMA1iYi5pc3N1ZXMuZ2V0kOowAYLT5JMCIBIeL3YxL3tuYW1lPXByb2plY3RzLyovaXNzdWVzLyp9EpwBCgtDcmVhdGVJc3N1ZRIfLmJ5dGViYXNlLnYxLkNyZWF0ZUlzc3VlUmVxdWVzdBoSLmJ5dGViYXNlLnYxLklzc3VlIljaQQxwYXJlbnQsaXNzdWWK6jAQYmIuaXNzdWVzLmNyZWF0ZZDqMAGY6jABgtPkkwInOgVpc3N1ZSIeL3YxL3twYXJlbnQ9cHJvamVjdHMvKn0vaXNzdWVzEpQBCgpMaXN0SXNzdWVzEh4uYnl0ZWJhc2UudjEuTGlzdElzc3Vlc1JlcXVlc3QaHy5ieXRlYmFzZS52MS5MaXN0SXNzdWVzUmVzcG9uc2UiRdpBBnBhcmVudIrqMA5iYi5pc3N1ZXMubGlzdJDqMAGC0+STAiASHi92MS97cGFyZW50PXByb2plY3RzLyp9L2lzc3VlcxKaAQoMU2VhcmNoSXNzdWVzEiAuYnl0ZWJhc2UudjEuU2VhcmNoSXNzdWVzUmVxdWVzdBohLmJ5dGViYXNlLnYxLlNlYXJjaElzc3Vlc1Jlc3BvbnNlIkWK6jANYmIuaXNzdWVzLmdldJDqMAKC0+STAio6ASoiJS92MS97cGFyZW50PXByb2plY3RzLyp9L2lzc3VlczpzZWFyY2gSpwEKC1VwZGF0ZUlzc3VlEh8uYnl0ZWJhc2UudjEuVXBkYXRlSXNzdWVSZXF1ZXN0GhIuYnl0ZWJhc2UudjEuSXNzdWUiY9pBEWlzc3VlLHVwZGF0ZV9tYXNriuowEGJiLmlzc3Vlcy51cGRhdGWQ6jABmOowAYLT5JMCLToFaXNzdWUyJC92MS97aXNzdWUubmFtZT1wcm9qZWN0cy8qL2lzc3Vlcy8qfRLAAQoRTGlzdElzc3VlQ29tbWVudHMSJS5ieXRlYmFzZS52MS5MaXN0SXNzdWVDb21tZW50c1JlcXVlc3QaJi5ieXRlYmFzZS52MS5MaXN0SXNzdWVDb21tZW50c1Jlc3BvbnNlIlzaQQZwYXJlbnSK6jAVYmIuaXNzdWVDb21tZW50cy5saXN0kOowAYLT5JMCMBIuL3YxL3twYXJlbnQ9cHJvamVjdHMvKi9pc3N1ZXMvKn0vaXNzdWVDb21tZW50cxLSAQoSQ3JlYXRlSXNzdWVDb21tZW50EiYuYnl0ZWJhc2UudjEuQ3JlYXRlSXNzdWVDb21tZW50UmVxdWVzdBoZLmJ5dGViYXNlLnYxLklzc3VlQ29tbWVudCJ52kEUcGFyZW50LGlzc3VlX2NvbW1lbnSK6jAXYmIuaXNzdWVDb21tZW50cy5jcmVhdGWQ6jABmOowAYLT5JMCOToNaXNzdWVfY29tbWVudCIoL3YxL3twYXJlbnQ9cHJvamVjdHMvKi9pc3N1ZXMvKn06Y29tbWVudBLfAQoSVXBkYXRlSXNzdWVDb21tZW50EiYuYnl0ZWJhc2UudjEuVXBkYXRlSXNzdWVDb21tZW50UmVxdWVzdBoZLmJ5dGViYXNlLnYxLklzc3VlQ29tbWVudCKFAdpBIHBhcmVudCxpc3N1ZV9jb21tZW50LHVwZGF0ZV9tYXNriuowF2JiLmlzc3VlQ29tbWVudHMudXBkYXRlkOowAZjqMAGC0+STAjk6DWlzc3VlX2NvbW1lbnQyKC92MS97cGFyZW50PXByb2plY3RzLyovaXNzdWVzLyp9OmNvbW1lbnQSzQEKF0JhdGNoVXBkYXRlSXNzdWVzU3RhdHVzEisuYnl0ZWJhc2UudjEuQmF0Y2hVcGRhdGVJc3N1ZXNTdGF0dXNSZXF1ZXN0GiwuYnl0ZWJhc2UudjEuQmF0Y2hVcGRhdGVJc3N1ZXNTdGF0dXNSZXNwb25zZSJXiuowEGJiLmlzc3Vlcy51cGRhdGWQ6jABmOowAYLT5JMCNToBKiIwL3YxL3twYXJlbnQ9cHJvamVjdHMvKn0vaXNzdWVzOmJhdGNoVXBkYXRlU3RhdHVzEn8KDEFwcHJvdmVJc3N1ZRIgLmJ5dGViYXNlLnYxLkFwcHJvdmVJc3N1ZVJlcXVlc3QaEi5ieXRlYmFzZS52MS5Jc3N1ZSI5kOowApjqMAGC0+STAis6ASoiJi92MS97bmFtZT1wcm9qZWN0cy8qL2lzc3Vlcy8qfTphcHByb3ZlEnwKC1JlamVjdElzc3VlEh8uYnl0ZWJhc2UudjEuUmVqZWN0SXNzdWVSZXF1ZXN0GhIuYnl0ZWJhc2UudjEuSXNzdWUiOJDqMAKY6jABgtPkkwIqOgEqIiUvdjEve25hbWU9cHJvamVjdHMvKi9pc3N1ZXMvKn06cmVqZWN0En8KDFJlcXVlc3RJc3N1ZRIgLmJ5dGViYXNlLnYxLlJlcXVlc3RJc3N1ZVJlcXVlc3QaEi5ieXRlYmFzZS52MS5Jc3N1ZSI5kOowApjqMAGC0+STAis6ASoiJi92MS97bmFtZT1wcm9qZWN0cy8qL2lzc3Vlcy8qfTpyZXF1ZXN0EpEBChJSZXRyeUlzc3VlQXBwcm92YWwSJi5ieXRlYmFzZS52MS5SZXRyeUlzc3VlQXBwcm92YWxSZXF1ZXN0GhIuYnl0ZWJhc2UudjEuSXNzdWUiP5DqMAKY6jABgtPkkwIxOgEqIiwvdjEve25hbWU9cHJvamVjdHMvKi9pc3N1ZXMvKn06cmV0cnlBcHByb3ZhbEKnAQoPY29tLmJ5dGViYXNlLnYxQhFJc3N1ZVNlcnZpY2VQcm90b1ABWjRnaXRodWIuY29tL2J5dGViYXNlL2J5dGViYXNlL2JhY2tlbmQvZ2VuZXJhdGVkLWdvL3YxogIDQlhYqgILQnl0ZWJhc2UuVjHKAgtCeXRlYmFzZVxWMeICF0J5dGViYXNlXFYxXEdQQk1ldGFkYXRh6gIMQnl0ZWJhc2U6OlYxYgZwcm90bzM", [file_buf_validate_validate, file_google_api_annotations, file_google_api_client, file_google_api_field_behavior, file_google_api_resource, file_google_protobuf_duration, file_google_protobuf_field_mask, file_google_protobuf_timestamp, file_google_type_expr, file_v1_annotation, file_v1_common, file_v1_plan_service]);/*** Describes the message bytebase.v1.GetIssueRequest.@@ -152,20 +153,6 @@ export const Issue_TypeSchema = /*@__PURE__*/export const Issue_Type = /*@__PURE__*/tsEnum(Issue_TypeSchema);-/**- * Describes the enum bytebase.v1.Issue.ApprovalStatus.- */-export const Issue_ApprovalStatusSchema = /*@__PURE__*/- enumDesc(file_v1_issue_service, 13, 1);--/**- * The overall approval status for the issue.- *- * @generated from enum bytebase.v1.Issue.ApprovalStatus- */-export const Issue_ApprovalStatus = /*@__PURE__*/- tsEnum(Issue_ApprovalStatusSchema);-/*** Describes the message bytebase.v1.RoleGrant.* Use `create(RoleGrantSchema)` to create a new message.@@ -251,10 +238,10 @@ export const IssueComment_IssueUpdateSchema = /*@__PURE__*/messageDesc(file_v1_issue_service, 21, 1);/**- * Describes the message bytebase.v1.IssueComment.PlanSpecUpdate.- * Use `create(IssueComment_PlanSpecUpdateSchema)` to create a new message.+ * Describes the message bytebase.v1.IssueComment.PlanUpdate.+ * Use `create(IssueComment_PlanUpdateSchema)` to create a new message.*/-export const IssueComment_PlanSpecUpdateSchema = /*@__PURE__*/+export const IssueComment_PlanUpdateSchema = /*@__PURE__*/messageDesc(file_v1_issue_service, 21, 2);/**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.tsindex a43da9c543..c53518ba07 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@@ -5,8 +5,7 @@import type { GenEnum, GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2";import type { Message } from "@bufbuild/protobuf";import type { FieldMask, Timestamp } from "@bufbuild/protobuf/wkt";-import type { ExportFormat, Position, State, StatementType } from "./common_pb";-import type { Issue_ApprovalStatus } from "./issue_service_pb";+import type { ApprovalStatus, ExportFormat, Position, State, StatementType } from "./common_pb";import type { Task_Status } from "./rollout_service_pb";import type { Advice_Level } from "./sql_service_pb";@@ -278,9 +277,9 @@ export declare type Plan = Message<"bytebase.v1.Plan"> & {* The approval status of the linked issue.* Unspecified when no linked issue exists.*- * @generated from field: bytebase.v1.Issue.ApprovalStatus approval_status = 13;+ * @generated from field: bytebase.v1.ApprovalStatus approval_status = 13;*/- approvalStatus: Issue_ApprovalStatus;+ approvalStatus: ApprovalStatus;/*** Per-stage rollout status summary.diff --git a/frontend/src/types/proto-es/v1/plan_service_pb.js b/frontend/src/types/proto-es/v1/plan_service_pb.jsindex 50819d77aa..69331ce744 100644--- a/frontend/src/types/proto-es/v1/plan_service_pb.js+++ b/frontend/src/types/proto-es/v1/plan_service_pb.js@@ -11,7 +11,6 @@ import { file_google_api_resource } from "../google/api/resource_pb";import { file_google_protobuf_field_mask, file_google_protobuf_timestamp } from "@bufbuild/protobuf/wkt";import { file_v1_annotation } from "./annotation_pb";import { file_v1_common } from "./common_pb";-import { file_v1_issue_service } from "./issue_service_pb";import { file_v1_rollout_service } from "./rollout_service_pb";import { file_v1_sql_service } from "./sql_service_pb";@@ -19,7 +18,7 @@ import { file_v1_sql_service } from "./sql_service_pb";* Describes the file v1/plan_service.proto.*/export const file_v1_plan_service = /*@__PURE__*/- fileDesc("ChV2MS9wbGFuX3NlcnZpY2UucHJvdG8SC2J5dGViYXNlLnYxIjkKDkdldFBsYW5SZXF1ZXN0EicKBG5hbWUYASABKAlCGeBBAvpBEwoRYnl0ZWJhc2UuY29tL1BsYW4idwoQTGlzdFBsYW5zUmVxdWVzdBIsCgZwYXJlbnQYASABKAlCHOBBAvpBFgoUYnl0ZWJhc2UuY29tL1Byb2plY3QSEQoJcGFnZV9zaXplGAIgASgFEhIKCnBhZ2VfdG9rZW4YAyABKAkSDgoGZmlsdGVyGAQgASgJIk4KEUxpc3RQbGFuc1Jlc3BvbnNlEiAKBXBsYW5zGAEgAygLMhEuYnl0ZWJhc2UudjEuUGxhbhIXCg9uZXh0X3BhZ2VfdG9rZW4YAiABKAkiZwoRQ3JlYXRlUGxhblJlcXVlc3QSLAoGcGFyZW50GAEgASgJQhzgQQL6QRYKFGJ5dGViYXNlLmNvbS9Qcm9qZWN0EiQKBHBsYW4YAiABKAsyES5ieXRlYmFzZS52MS5QbGFuQgPgQQIihgEKEVVwZGF0ZVBsYW5SZXF1ZXN0EiQKBHBsYW4YASABKAsyES5ieXRlYmFzZS52MS5QbGFuQgPgQQISNAoLdXBkYXRlX21hc2sYAiABKAsyGi5nb29nbGUucHJvdG9idWYuRmllbGRNYXNrQgPgQQISFQoNYWxsb3dfbWlzc2luZxgDIAEoCCKjDAoEUGxhbhIMCgRuYW1lGAEgASgJEiEKBXN0YXRlGAIgASgOMhIuYnl0ZWJhc2UudjEuU3RhdGUSEgoFaXNzdWUYAyABKAlCA+BBAxIXCgV0aXRsZRgFIAEoCUIIukgFcgMYyAESHQoLZGVzY3JpcHRpb24YBiABKAlCCLpIBXIDGJBOEiUKBXNwZWNzGAcgAygLMhYuYnl0ZWJhc2UudjEuUGxhbi5TcGVjEhQKB2NyZWF0b3IYCCABKAlCA+BBAxI0CgtjcmVhdGVfdGltZRgJIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXBCA+BBAxI0Cgt1cGRhdGVfdGltZRgKIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXBCA+BBAxJYChtwbGFuX2NoZWNrX3J1bl9zdGF0dXNfY291bnQYCyADKAsyLi5ieXRlYmFzZS52MS5QbGFuLlBsYW5DaGVja1J1blN0YXR1c0NvdW50RW50cnlCA+BBAxIYCgtoYXNfcm9sbG91dBgMIAEoCEID4EEDEj8KD2FwcHJvdmFsX3N0YXR1cxgNIAEoDjIhLmJ5dGViYXNlLnYxLklzc3VlLkFwcHJvdmFsU3RhdHVzQgPgQQMSSwoXcm9sbG91dF9zdGFnZV9zdW1tYXJpZXMYDiADKAsyJS5ieXRlYmFzZS52MS5QbGFuLlJvbGxvdXRTdGFnZVN1bW1hcnlCA+BBAxryAQoEU3BlYxIKCgJpZBgBIAEoCRJIChZjcmVhdGVfZGF0YWJhc2VfY29uZmlnGAIgASgLMiYuYnl0ZWJhc2UudjEuUGxhbi5DcmVhdGVEYXRhYmFzZUNvbmZpZ0gAEkgKFmNoYW5nZV9kYXRhYmFzZV9jb25maWcYAyABKAsyJi5ieXRlYmFzZS52MS5QbGFuLkNoYW5nZURhdGFiYXNlQ29uZmlnSAASQAoSZXhwb3J0X2RhdGFfY29uZmlnGAQgASgLMiIuYnl0ZWJhc2UudjEuUGxhbi5FeHBvcnREYXRhQ29uZmlnSABCCAoGY29uZmlnGj4KHFBsYW5DaGVja1J1blN0YXR1c0NvdW50RW50cnkSCwoDa2V5GAEgASgJEg0KBXZhbHVlGAIgASgFOgI4ARrOAQoUQ3JlYXRlRGF0YWJhc2VDb25maWcSEwoGdGFyZ2V0GAEgASgJQgPgQQISFQoIZGF0YWJhc2UYAiABKAlCA+BBAhISCgV0YWJsZRgDIAEoCUID4EEBEhoKDWNoYXJhY3Rlcl9zZXQYBCABKAlCA+BBARIWCgljb2xsYXRpb24YBSABKAlCA+BBARIUCgdjbHVzdGVyGAYgASgJQgPgQQESEgoFb3duZXIYByABKAlCA+BBARIYCgtlbnZpcm9ubWVudBgJIAEoCUID4EEBGn8KFENoYW5nZURhdGFiYXNlQ29uZmlnEg8KB3RhcmdldHMYASADKAkSDQoFc2hlZXQYAiABKAkSKgoHcmVsZWFzZRgDIAEoCUIZ+kEWChRieXRlYmFzZS5jb20vUmVsZWFzZRIbChNlbmFibGVfcHJpb3JfYmFja3VwGAYgASgIGoEBChBFeHBvcnREYXRhQ29uZmlnEg8KB3RhcmdldHMYASADKAkSDQoFc2hlZXQYAiABKAkSKQoGZm9ybWF0GAMgASgOMhkuYnl0ZWJhc2UudjEuRXhwb3J0Rm9ybWF0EhUKCHBhc3N3b3JkGAQgASgJSACIAQFCCwoJX3Bhc3N3b3JkGmMKE1JvbGxvdXRTdGFnZVN1bW1hcnkSDQoFc3RhZ2UYASABKAkSPQoSdGFza19zdGF0dXNfY291bnRzGAIgAygLMiEuYnl0ZWJhc2UudjEuUGxhbi5UYXNrU3RhdHVzQ291bnQaSgoPVGFza1N0YXR1c0NvdW50EigKBnN0YXR1cxgBIAEoDjIYLmJ5dGViYXNlLnYxLlRhc2suU3RhdHVzEg0KBWNvdW50GAIgASgFOjfqQTQKEWJ5dGViYXNlLmNvbS9QbGFuEh9wcm9qZWN0cy97cHJvamVjdH0vcGxhbnMve3BsYW59IkkKFkdldFBsYW5DaGVja1J1blJlcXVlc3QSLwoEbmFtZRgBIAEoCUIh4EEC+kEbChlieXRlYmFzZS5jb20vUGxhbkNoZWNrUnVuImEKFFJ1blBsYW5DaGVja3NSZXF1ZXN0EicKBG5hbWUYASABKAlCGeBBAvpBEwoRYnl0ZWJhc2UuY29tL1BsYW4SFAoHc3BlY19pZBgCIAEoCUgAiAEBQgoKCF9zcGVjX2lkIhcKFVJ1blBsYW5DaGVja3NSZXNwb25zZSJMChlDYW5jZWxQbGFuQ2hlY2tSdW5SZXF1ZXN0Ei8KBG5hbWUYASABKAlCIeBBAvpBGwoZYnl0ZWJhc2UuY29tL1BsYW5DaGVja1J1biIcChpDYW5jZWxQbGFuQ2hlY2tSdW5SZXNwb25zZSLrBwoMUGxhbkNoZWNrUnVuEgwKBG5hbWUYASABKAkSMAoGc3RhdHVzGAMgASgOMiAuYnl0ZWJhc2UudjEuUGxhbkNoZWNrUnVuLlN0YXR1cxIxCgdyZXN1bHRzGAYgAygLMiAuYnl0ZWJhc2UudjEuUGxhbkNoZWNrUnVuLlJlc3VsdBINCgVlcnJvchgHIAEoCRI0CgtjcmVhdGVfdGltZRgIIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXBCA+BBAxqBBQoGUmVzdWx0EikKBnN0YXR1cxgBIAEoDjIZLmJ5dGViYXNlLnYxLkFkdmljZS5MZXZlbBINCgV0aXRsZRgCIAEoCRIPCgdjb250ZW50GAMgASgJEgwKBGNvZGUYBCABKAUSDgoGdGFyZ2V0GAcgASgJEjMKBHR5cGUYCCABKA4yJS5ieXRlYmFzZS52MS5QbGFuQ2hlY2tSdW4uUmVzdWx0LlR5cGUSTwoSc3FsX3N1bW1hcnlfcmVwb3J0GAUgASgLMjEuYnl0ZWJhc2UudjEuUGxhbkNoZWNrUnVuLlJlc3VsdC5TcWxTdW1tYXJ5UmVwb3J0SAASTQoRc3FsX3Jldmlld19yZXBvcnQYBiABKAsyMC5ieXRlYmFzZS52MS5QbGFuQ2hlY2tSdW4uUmVzdWx0LlNxbFJldmlld1JlcG9ydEgAGl4KEFNxbFN1bW1hcnlSZXBvcnQSMwoPc3RhdGVtZW50X3R5cGVzGAIgAygOMhouYnl0ZWJhc2UudjEuU3RhdGVtZW50VHlwZRIVCg1hZmZlY3RlZF9yb3dzGAMgASgDGm0KD1NxbFJldmlld1JlcG9ydBItCg5zdGFydF9wb3NpdGlvbhgFIAEoCzIVLmJ5dGViYXNlLnYxLlBvc2l0aW9uEisKDGVuZF9wb3NpdGlvbhgGIAEoCzIVLmJ5dGViYXNlLnYxLlBvc2l0aW9uImAKBFR5cGUSFAoQVFlQRV9VTlNQRUNJRklFRBAAEhQKEFNUQVRFTUVOVF9BRFZJU0UQARIcChhTVEFURU1FTlRfU1VNTUFSWV9SRVBPUlQQAhIOCgpHSE9TVF9TWU5DEANCCAoGcmVwb3J0IlEKBlN0YXR1cxIWChJTVEFUVVNfVU5TUEVDSUZJRUQQABILCgdSVU5OSU5HEAESCAoERE9ORRACEgoKBkZBSUxFRBADEgwKCENBTkNFTEVEEAQ6TOpBSQoZYnl0ZWJhc2UuY29tL1BsYW5DaGVja1J1bhIscHJvamVjdHMve3Byb2plY3R9L3BsYW5zL3twbGFufS9wbGFuQ2hlY2tSdW4y/ggKC1BsYW5TZXJ2aWNlEnsKB0dldFBsYW4SGy5ieXRlYmFzZS52MS5HZXRQbGFuUmVxdWVzdBoRLmJ5dGViYXNlLnYxLlBsYW4iQNpBBG5hbWWK6jAMYmIucGxhbnMuZ2V0kOowAYLT5JMCHxIdL3YxL3tuYW1lPXByb2plY3RzLyovcGxhbnMvKn0SjwEKCUxpc3RQbGFucxIdLmJ5dGViYXNlLnYxLkxpc3RQbGFuc1JlcXVlc3QaHi5ieXRlYmFzZS52MS5MaXN0UGxhbnNSZXNwb25zZSJD2kEGcGFyZW50iuowDWJiLnBsYW5zLmxpc3SQ6jABgtPkkwIfEh0vdjEve3BhcmVudD1wcm9qZWN0cy8qfS9wbGFucxKVAQoKQ3JlYXRlUGxhbhIeLmJ5dGViYXNlLnYxLkNyZWF0ZVBsYW5SZXF1ZXN0GhEuYnl0ZWJhc2UudjEuUGxhbiJU2kELcGFyZW50LHBsYW6K6jAPYmIucGxhbnMuY3JlYXRlkOowAZjqMAGC0+STAiU6BHBsYW4iHS92MS97cGFyZW50PXByb2plY3RzLyp9L3BsYW5zEp8BCgpVcGRhdGVQbGFuEh4uYnl0ZWJhc2UudjEuVXBkYXRlUGxhblJlcXVlc3QaES5ieXRlYmFzZS52MS5QbGFuIl7aQRBwbGFuLHVwZGF0ZV9tYXNriuowD2JiLnBsYW5zLnVwZGF0ZZDqMAKY6jABgtPkkwIqOgRwbGFuMiIvdjEve3BsYW4ubmFtZT1wcm9qZWN0cy8qL3BsYW5zLyp9EqgBCg9HZXRQbGFuQ2hlY2tSdW4SIy5ieXRlYmFzZS52MS5HZXRQbGFuQ2hlY2tSdW5SZXF1ZXN0GhkuYnl0ZWJhc2UudjEuUGxhbkNoZWNrUnVuIlXaQQRuYW1liuowFGJiLnBsYW5DaGVja1J1bnMuZ2V0kOowAYLT5JMCLBIqL3YxL3tuYW1lPXByb2plY3RzLyovcGxhbnMvKi9wbGFuQ2hlY2tSdW59ErEBCg1SdW5QbGFuQ2hlY2tzEiEuYnl0ZWJhc2UudjEuUnVuUGxhbkNoZWNrc1JlcXVlc3QaIi5ieXRlYmFzZS52MS5SdW5QbGFuQ2hlY2tzUmVzcG9uc2UiWdpBBG5hbWWK6jAUYmIucGxhbkNoZWNrUnVucy5ydW6Q6jABgtPkkwIwOgEqIisvdjEve25hbWU9cHJvamVjdHMvKi9wbGFucy8qfTpydW5QbGFuQ2hlY2tzEsYBChJDYW5jZWxQbGFuQ2hlY2tSdW4SJi5ieXRlYmFzZS52MS5DYW5jZWxQbGFuQ2hlY2tSdW5SZXF1ZXN0GicuYnl0ZWJhc2UudjEuQ2FuY2VsUGxhbkNoZWNrUnVuUmVzcG9uc2UiX9pBBG5hbWWK6jAUYmIucGxhbkNoZWNrUnVucy5ydW6Q6jABgtPkkwI2OgEqIjEvdjEve25hbWU9cHJvamVjdHMvKi9wbGFucy8qL3BsYW5DaGVja1J1bn06Y2FuY2VsQqYBCg9jb20uYnl0ZWJhc2UudjFCEFBsYW5TZXJ2aWNlUHJvdG9QAVo0Z2l0aHViLmNvbS9ieXRlYmFzZS9ieXRlYmFzZS9iYWNrZW5kL2dlbmVyYXRlZC1nby92MaICA0JYWKoCC0J5dGViYXNlLlYxygILQnl0ZWJhc2VcVjHiAhdCeXRlYmFzZVxWMVxHUEJNZXRhZGF0YeoCDEJ5dGViYXNlOjpWMWIGcHJvdG8z", [file_buf_validate_validate, 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_issue_service, file_v1_rollout_service, file_v1_sql_service]);+ fileDesc("ChV2MS9wbGFuX3NlcnZpY2UucHJvdG8SC2J5dGViYXNlLnYxIjkKDkdldFBsYW5SZXF1ZXN0EicKBG5hbWUYASABKAlCGeBBAvpBEwoRYnl0ZWJhc2UuY29tL1BsYW4idwoQTGlzdFBsYW5zUmVxdWVzdBIsCgZwYXJlbnQYASABKAlCHOBBAvpBFgoUYnl0ZWJhc2UuY29tL1Byb2plY3QSEQoJcGFnZV9zaXplGAIgASgFEhIKCnBhZ2VfdG9rZW4YAyABKAkSDgoGZmlsdGVyGAQgASgJIk4KEUxpc3RQbGFuc1Jlc3BvbnNlEiAKBXBsYW5zGAEgAygLMhEuYnl0ZWJhc2UudjEuUGxhbhIXCg9uZXh0X3BhZ2VfdG9rZW4YAiABKAkiZwoRQ3JlYXRlUGxhblJlcXVlc3QSLAoGcGFyZW50GAEgASgJQhzgQQL6QRYKFGJ5dGViYXNlLmNvbS9Qcm9qZWN0EiQKBHBsYW4YAiABKAsyES5ieXRlYmFzZS52MS5QbGFuQgPgQQIihgEKEVVwZGF0ZVBsYW5SZXF1ZXN0EiQKBHBsYW4YASABKAsyES5ieXRlYmFzZS52MS5QbGFuQgPgQQISNAoLdXBkYXRlX21hc2sYAiABKAsyGi5nb29nbGUucHJvdG9idWYuRmllbGRNYXNrQgPgQQISFQoNYWxsb3dfbWlzc2luZxgDIAEoCCKdDAoEUGxhbhIMCgRuYW1lGAEgASgJEiEKBXN0YXRlGAIgASgOMhIuYnl0ZWJhc2UudjEuU3RhdGUSEgoFaXNzdWUYAyABKAlCA+BBAxIXCgV0aXRsZRgFIAEoCUIIukgFcgMYyAESHQoLZGVzY3JpcHRpb24YBiABKAlCCLpIBXIDGJBOEiUKBXNwZWNzGAcgAygLMhYuYnl0ZWJhc2UudjEuUGxhbi5TcGVjEhQKB2NyZWF0b3IYCCABKAlCA+BBAxI0CgtjcmVhdGVfdGltZRgJIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXBCA+BBAxI0Cgt1cGRhdGVfdGltZRgKIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXBCA+BBAxJYChtwbGFuX2NoZWNrX3J1bl9zdGF0dXNfY291bnQYCyADKAsyLi5ieXRlYmFzZS52MS5QbGFuLlBsYW5DaGVja1J1blN0YXR1c0NvdW50RW50cnlCA+BBAxIYCgtoYXNfcm9sbG91dBgMIAEoCEID4EEDEjkKD2FwcHJvdmFsX3N0YXR1cxgNIAEoDjIbLmJ5dGViYXNlLnYxLkFwcHJvdmFsU3RhdHVzQgPgQQMSSwoXcm9sbG91dF9zdGFnZV9zdW1tYXJpZXMYDiADKAsyJS5ieXRlYmFzZS52MS5QbGFuLlJvbGxvdXRTdGFnZVN1bW1hcnlCA+BBAxryAQoEU3BlYxIKCgJpZBgBIAEoCRJIChZjcmVhdGVfZGF0YWJhc2VfY29uZmlnGAIgASgLMiYuYnl0ZWJhc2UudjEuUGxhbi5DcmVhdGVEYXRhYmFzZUNvbmZpZ0gAEkgKFmNoYW5nZV9kYXRhYmFzZV9jb25maWcYAyABKAsyJi5ieXRlYmFzZS52MS5QbGFuLkNoYW5nZURhdGFiYXNlQ29uZmlnSAASQAoSZXhwb3J0X2RhdGFfY29uZmlnGAQgASgLMiIuYnl0ZWJhc2UudjEuUGxhbi5FeHBvcnREYXRhQ29uZmlnSABCCAoGY29uZmlnGj4KHFBsYW5DaGVja1J1blN0YXR1c0NvdW50RW50cnkSCwoDa2V5GAEgASgJEg0KBXZhbHVlGAIgASgFOgI4ARrOAQoUQ3JlYXRlRGF0YWJhc2VDb25maWcSEwoGdGFyZ2V0GAEgASgJQgPgQQISFQoIZGF0YWJhc2UYAiABKAlCA+BBAhISCgV0YWJsZRgDIAEoCUID4EEBEhoKDWNoYXJhY3Rlcl9zZXQYBCABKAlCA+BBARIWCgljb2xsYXRpb24YBSABKAlCA+BBARIUCgdjbHVzdGVyGAYgASgJQgPgQQESEgoFb3duZXIYByABKAlCA+BBARIYCgtlbnZpcm9ubWVudBgJIAEoCUID4EEBGn8KFENoYW5nZURhdGFiYXNlQ29uZmlnEg8KB3RhcmdldHMYASADKAkSDQoFc2hlZXQYAiABKAkSKgoHcmVsZWFzZRgDIAEoCUIZ+kEWChRieXRlYmFzZS5jb20vUmVsZWFzZRIbChNlbmFibGVfcHJpb3JfYmFja3VwGAYgASgIGoEBChBFeHBvcnREYXRhQ29uZmlnEg8KB3RhcmdldHMYASADKAkSDQoFc2hlZXQYAiABKAkSKQoGZm9ybWF0GAMgASgOMhkuYnl0ZWJhc2UudjEuRXhwb3J0Rm9ybWF0EhUKCHBhc3N3b3JkGAQgASgJSACIAQFCCwoJX3Bhc3N3b3JkGmMKE1JvbGxvdXRTdGFnZVN1bW1hcnkSDQoFc3RhZ2UYASABKAkSPQoSdGFza19zdGF0dXNfY291bnRzGAIgAygLMiEuYnl0ZWJhc2UudjEuUGxhbi5UYXNrU3RhdHVzQ291bnQaSgoPVGFza1N0YXR1c0NvdW50EigKBnN0YXR1cxgBIAEoDjIYLmJ5dGViYXNlLnYxLlRhc2suU3RhdHVzEg0KBWNvdW50GAIgASgFOjfqQTQKEWJ5dGViYXNlLmNvbS9QbGFuEh9wcm9qZWN0cy97cHJvamVjdH0vcGxhbnMve3BsYW59IkkKFkdldFBsYW5DaGVja1J1blJlcXVlc3QSLwoEbmFtZRgBIAEoCUIh4EEC+kEbChlieXRlYmFzZS5jb20vUGxhbkNoZWNrUnVuImEKFFJ1blBsYW5DaGVja3NSZXF1ZXN0EicKBG5hbWUYASABKAlCGeBBAvpBEwoRYnl0ZWJhc2UuY29tL1BsYW4SFAoHc3BlY19pZBgCIAEoCUgAiAEBQgoKCF9zcGVjX2lkIhcKFVJ1blBsYW5DaGVja3NSZXNwb25zZSJMChlDYW5jZWxQbGFuQ2hlY2tSdW5SZXF1ZXN0Ei8KBG5hbWUYASABKAlCIeBBAvpBGwoZYnl0ZWJhc2UuY29tL1BsYW5DaGVja1J1biIcChpDYW5jZWxQbGFuQ2hlY2tSdW5SZXNwb25zZSLrBwoMUGxhbkNoZWNrUnVuEgwKBG5hbWUYASABKAkSMAoGc3RhdHVzGAMgASgOMiAuYnl0ZWJhc2UudjEuUGxhbkNoZWNrUnVuLlN0YXR1cxIxCgdyZXN1bHRzGAYgAygLMiAuYnl0ZWJhc2UudjEuUGxhbkNoZWNrUnVuLlJlc3VsdBINCgVlcnJvchgHIAEoCRI0CgtjcmVhdGVfdGltZRgIIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXBCA+BBAxqBBQoGUmVzdWx0EikKBnN0YXR1cxgBIAEoDjIZLmJ5dGViYXNlLnYxLkFkdmljZS5MZXZlbBINCgV0aXRsZRgCIAEoCRIPCgdjb250ZW50GAMgASgJEgwKBGNvZGUYBCABKAUSDgoGdGFyZ2V0GAcgASgJEjMKBHR5cGUYCCABKA4yJS5ieXRlYmFzZS52MS5QbGFuQ2hlY2tSdW4uUmVzdWx0LlR5cGUSTwoSc3FsX3N1bW1hcnlfcmVwb3J0GAUgASgLMjEuYnl0ZWJhc2UudjEuUGxhbkNoZWNrUnVuLlJlc3VsdC5TcWxTdW1tYXJ5UmVwb3J0SAASTQoRc3FsX3Jldmlld19yZXBvcnQYBiABKAsyMC5ieXRlYmFzZS52MS5QbGFuQ2hlY2tSdW4uUmVzdWx0LlNxbFJldmlld1JlcG9ydEgAGl4KEFNxbFN1bW1hcnlSZXBvcnQSMwoPc3RhdGVtZW50X3R5cGVzGAIgAygOMhouYnl0ZWJhc2UudjEuU3RhdGVtZW50VHlwZRIVCg1hZmZlY3RlZF9yb3dzGAMgASgDGm0KD1NxbFJldmlld1JlcG9ydBItCg5zdGFydF9wb3NpdGlvbhgFIAEoCzIVLmJ5dGViYXNlLnYxLlBvc2l0aW9uEisKDGVuZF9wb3NpdGlvbhgGIAEoCzIVLmJ5dGViYXNlLnYxLlBvc2l0aW9uImAKBFR5cGUSFAoQVFlQRV9VTlNQRUNJRklFRBAAEhQKEFNUQVRFTUVOVF9BRFZJU0UQARIcChhTVEFURU1FTlRfU1VNTUFSWV9SRVBPUlQQAhIOCgpHSE9TVF9TWU5DEANCCAoGcmVwb3J0IlEKBlN0YXR1cxIWChJTVEFUVVNfVU5TUEVDSUZJRUQQABILCgdSVU5OSU5HEAESCAoERE9ORRACEgoKBkZBSUxFRBADEgwKCENBTkNFTEVEEAQ6TOpBSQoZYnl0ZWJhc2UuY29tL1BsYW5DaGVja1J1bhIscHJvamVjdHMve3Byb2plY3R9L3BsYW5zL3twbGFufS9wbGFuQ2hlY2tSdW4y/ggKC1BsYW5TZXJ2aWNlEnsKB0dldFBsYW4SGy5ieXRlYmFzZS52MS5HZXRQbGFuUmVxdWVzdBoRLmJ5dGViYXNlLnYxLlBsYW4iQNpBBG5hbWWK6jAMYmIucGxhbnMuZ2V0kOowAYLT5JMCHxIdL3YxL3tuYW1lPXByb2plY3RzLyovcGxhbnMvKn0SjwEKCUxpc3RQbGFucxIdLmJ5dGViYXNlLnYxLkxpc3RQbGFuc1JlcXVlc3QaHi5ieXRlYmFzZS52MS5MaXN0UGxhbnNSZXNwb25zZSJD2kEGcGFyZW50iuowDWJiLnBsYW5zLmxpc3SQ6jABgtPkkwIfEh0vdjEve3BhcmVudD1wcm9qZWN0cy8qfS9wbGFucxKVAQoKQ3JlYXRlUGxhbhIeLmJ5dGViYXNlLnYxLkNyZWF0ZVBsYW5SZXF1ZXN0GhEuYnl0ZWJhc2UudjEuUGxhbiJU2kELcGFyZW50LHBsYW6K6jAPYmIucGxhbnMuY3JlYXRlkOowAZjqMAGC0+STAiU6BHBsYW4iHS92MS97cGFyZW50PXByb2plY3RzLyp9L3BsYW5zEp8BCgpVcGRhdGVQbGFuEh4uYnl0ZWJhc2UudjEuVXBkYXRlUGxhblJlcXVlc3QaES5ieXRlYmFzZS52MS5QbGFuIl7aQRBwbGFuLHVwZGF0ZV9tYXNriuowD2JiLnBsYW5zLnVwZGF0ZZDqMAKY6jABgtPkkwIqOgRwbGFuMiIvdjEve3BsYW4ubmFtZT1wcm9qZWN0cy8qL3BsYW5zLyp9EqgBCg9HZXRQbGFuQ2hlY2tSdW4SIy5ieXRlYmFzZS52MS5HZXRQbGFuQ2hlY2tSdW5SZXF1ZXN0GhkuYnl0ZWJhc2UudjEuUGxhbkNoZWNrUnVuIlXaQQRuYW1liuowFGJiLnBsYW5DaGVja1J1bnMuZ2V0kOowAYLT5JMCLBIqL3YxL3tuYW1lPXByb2plY3RzLyovcGxhbnMvKi9wbGFuQ2hlY2tSdW59ErEBCg1SdW5QbGFuQ2hlY2tzEiEuYnl0ZWJhc2UudjEuUnVuUGxhbkNoZWNrc1JlcXVlc3QaIi5ieXRlYmFzZS52MS5SdW5QbGFuQ2hlY2tzUmVzcG9uc2UiWdpBBG5hbWWK6jAUYmIucGxhbkNoZWNrUnVucy5ydW6Q6jABgtPkkwIwOgEqIisvdjEve25hbWU9cHJvamVjdHMvKi9wbGFucy8qfTpydW5QbGFuQ2hlY2tzEsYBChJDYW5jZWxQbGFuQ2hlY2tSdW4SJi5ieXRlYmFzZS52MS5DYW5jZWxQbGFuQ2hlY2tSdW5SZXF1ZXN0GicuYnl0ZWJhc2UudjEuQ2FuY2VsUGxhbkNoZWNrUnVuUmVzcG9uc2UiX9pBBG5hbWWK6jAUYmIucGxhbkNoZWNrUnVucy5ydW6Q6jABgtPkkwI2OgEqIjEvdjEve25hbWU9cHJvamVjdHMvKi9wbGFucy8qL3BsYW5DaGVja1J1bn06Y2FuY2VsQqYBCg9jb20uYnl0ZWJhc2UudjFCEFBsYW5TZXJ2aWNlUHJvdG9QAVo0Z2l0aHViLmNvbS9ieXRlYmFzZS9ieXRlYmFzZS9iYWNrZW5kL2dlbmVyYXRlZC1nby92MaICA0JYWKoCC0J5dGViYXNlLlYxygILQnl0ZWJhc2VcVjHiAhdCeXRlYmFzZVxWMVxHUEJNZXRhZGF0YeoCDEJ5dGViYXNlOjpWMWIGcHJvdG8z", [file_buf_validate_validate, 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_rollout_service, file_v1_sql_service]);/*** Describes the message bytebase.v1.GetPlanRequest.diff --git a/frontend/src/types/v1/issue/issue.ts b/frontend/src/types/v1/issue/issue.tsindex 857f922fd9..c0cb3bba80 100644--- a/frontend/src/types/v1/issue/issue.ts+++ b/frontend/src/types/v1/issue/issue.ts@@ -1,5 +1,5 @@+import type { ApprovalStatus } from "@/types/proto-es/v1/common_pb";import { RiskLevel } from "@/types/proto-es/v1/common_pb";-import type { Issue_ApprovalStatus } from "@/types/proto-es/v1/issue_service_pb";import { Issue_Type, IssueStatus } from "@/types/proto-es/v1/issue_service_pb";export interface IssueFilter {@@ -7,7 +7,7 @@ export interface IssueFilter {query: string;creator?: string;currentApprover?: string;- approvalStatus?: Issue_ApprovalStatus;+ approvalStatus?: ApprovalStatus;statusList?: IssueStatus[];riskLevelList?: RiskLevel[];createdTsAfter?: number;diff --git a/frontend/src/utils/accessGrant.ts b/frontend/src/utils/accessGrant.tsindex 04b51c50c3..23418bb73a 100644--- a/frontend/src/utils/accessGrant.ts+++ b/frontend/src/utils/accessGrant.ts@@ -14,11 +14,9 @@ import {type AccessGrant,AccessGrant_Status,} from "@/types/proto-es/v1/access_grant_service_pb";+import { ApprovalStatus } from "@/types/proto-es/v1/common_pb";import type { Issue } from "@/types/proto-es/v1/issue_service_pb";-import {- Issue_ApprovalStatus,- IssueStatus,-} from "@/types/proto-es/v1/issue_service_pb";+import { IssueStatus } from "@/types/proto-es/v1/issue_service_pb";import { formatAbsoluteDateTime } from "@/utils/datetime";import { getDefaultPagination } from "@/utils/pagination";import { extractDatabaseResourceName } from "@/utils/v1/database";@@ -87,7 +85,7 @@ export const getAccessGrantDisplayStatus = (switch (grant.status) {case AccessGrant_Status.PENDING:if (issue) {- if (issue.approvalStatus === Issue_ApprovalStatus.REJECTED) {+ if (issue.approvalStatus === ApprovalStatus.REJECTED) {return "REJECTED";}if (issue.status === IssueStatus.CANCELED) {diff --git a/frontend/src/utils/v1/advanced-search/issue/utils.ts b/frontend/src/utils/v1/advanced-search/issue/utils.tsindex f062588e95..3da9374c75 100644--- a/frontend/src/utils/v1/advanced-search/issue/utils.ts+++ b/frontend/src/utils/v1/advanced-search/issue/utils.ts@@ -1,11 +1,7 @@import { projectNamePrefix, userNamePrefix } from "@/store";import type { IssueFilter } from "@/types";-import { RiskLevel } from "@/types/proto-es/v1/common_pb";-import {- Issue_ApprovalStatus,- Issue_Type,- IssueStatus,-} from "@/types/proto-es/v1/issue_service_pb";+import { ApprovalStatus, RiskLevel } from "@/types/proto-es/v1/common_pb";+import { Issue_Type, IssueStatus } from "@/types/proto-es/v1/issue_service_pb";import type { SearchParams } from "../common";import {getTsRangeFromSearchParams,@@ -33,9 +29,7 @@ export const buildIssueFilterBySearchParams = (params: SearchParams) => {userNamePrefix),approvalStatus: approvalStatus- ? Issue_ApprovalStatus[- approvalStatus as keyof typeof Issue_ApprovalStatus- ]+ ? ApprovalStatus[approvalStatus as keyof typeof ApprovalStatus]: undefined,statusList: getValuesFromSearchParams(params, "status").map((status) => IssueStatus[status as keyof typeof IssueStatus]diff --git a/frontend/src/utils/v1/issue/plan.ts b/frontend/src/utils/v1/issue/plan.tsindex bc60216a9a..d829518044 100644--- a/frontend/src/utils/v1/issue/plan.ts+++ b/frontend/src/utils/v1/issue/plan.ts@@ -1,4 +1,4 @@-import { UNKNOWN_ID } from "@/types";+import { UNKNOWN_ID } from "@/types/const";import type { Plan_Spec } from "@/types/proto-es/v1/plan_service_pb";export const sheetNameOfSpec = (spec: Plan_Spec): string => {@@ -11,6 +11,22 @@ export const sheetNameOfSpec = (spec: Plan_Spec): string => {return "";};+export const targetsOfSpec = (spec: Plan_Spec): string[] => {+ if (spec.config?.case === "changeDatabaseConfig") {+ return spec.config.value.targets ?? [];+ }+ if (spec.config?.case === "exportDataConfig") {+ return spec.config.value.targets ?? [];+ }+ return [];+};++export const enablePriorBackupOfSpec = (spec: Plan_Spec): boolean => {+ return spec.config?.case === "changeDatabaseConfig"+ ? (spec.config.value.enablePriorBackup ?? false)+ : false;+};+export const extractPlanUID = (name: string) => {const pattern = /(?:^|\/)plans\/(\d+)(?:$|\/)/;const matches = name.match(pattern);diff --git a/proto/gen/grpc-doc/openapi.yaml b/proto/gen/grpc-doc/openapi.yamlindex f0256e5fc0..8d355b9395 100644--- a/proto/gen/grpc-doc/openapi.yaml+++ b/proto/gen/grpc-doc/openapi.yaml@@ -17355,6 +17355,20 @@ components:description: The roles required for approval in order.title: ApprovalFlowadditionalProperties: false+ bytebase.v1.ApprovalStatus:+ type: string+ title: ApprovalStatus+ enum:+ - APPROVAL_STATUS_UNSPECIFIED+ - CHECKING+ - PENDING+ - APPROVED+ - REJECTED+ - SKIPPED+ description: |-+ Approval workflow status for an issue or a plan.+ Lives at the top level so both plan_service.proto and issue_service.proto+ can reference it without a circular import.bytebase.v1.ApprovalTemplate:type: objectproperties:@@ -21688,8 +21702,9 @@ components:description: Labels attached to the issue for categorization and filtering.approvalStatus:title: approval_status+ description: The overall approval status for the issue.readOnly: true- $ref: '#/components/schemas/bytebase.v1.Issue.ApprovalStatus'+ $ref: '#/components/schemas/bytebase.v1.ApprovalStatus'accessGrant:type: stringtitle: access_grant@@ -21699,17 +21714,6 @@ components:readOnly: truetitle: IssueadditionalProperties: false- bytebase.v1.Issue.ApprovalStatus:- type: string- title: ApprovalStatus- enum:- - APPROVAL_STATUS_UNSPECIFIED- - CHECKING- - PENDING- - APPROVED- - REJECTED- - SKIPPED- description: The overall approval status for the issue.bytebase.v1.Issue.Approver:type: objectproperties:@@ -21794,13 +21798,13 @@ components:- issueUpdate- type: objectproperties:- planSpecUpdate:- title: plan_spec_update- description: Plan spec update event.- $ref: '#/components/schemas/bytebase.v1.IssueComment.PlanSpecUpdate'- title: plan_spec_update+ planUpdate:+ title: plan_update+ description: Plan update event.+ $ref: '#/components/schemas/bytebase.v1.IssueComment.PlanUpdate'+ title: plan_updaterequired:- - planSpecUpdate+ - planUpdatetitle: IssueCommentadditionalProperties: falsedescription: A comment on an issue.@@ -21869,34 +21873,24 @@ components:title: IssueUpdateadditionalProperties: falsedescription: Issue update event information.- bytebase.v1.IssueComment.PlanSpecUpdate:+ bytebase.v1.IssueComment.PlanUpdate:type: objectproperties:- spec:- type: string- title: spec- description: |-- The spec that was updated.- Format: projects/{project}/plans/{plan}/specs/{spec}- fromSheet:- type:- - string- - "null"- title: from_sheet- description: |-- The previous sheet.- Format: projects/{project}/sheets/{sheet}- toSheet:- type:- - string- - "null"- title: to_sheet- description: |-- The new sheet.- Format: projects/{project}/sheets/{sheet}- title: PlanSpecUpdate+ fromSpecs:+ type: array+ items:+ $ref: '#/components/schemas/bytebase.v1.Plan.Spec'+ title: from_specs+ toSpecs:+ type: array+ items:+ $ref: '#/components/schemas/bytebase.v1.Plan.Spec'+ title: to_specs+ title: PlanUpdateadditionalProperties: false- description: Plan spec update event information (tracks sheet changes to plan specs).+ description: |-+ Plan update event information (snapshot of plan.config.specs before+ and after a PlanService.UpdatePlan call that mutated specs).bytebase.v1.IssueStatus:type: stringtitle: IssueStatus@@ -23974,7 +23968,7 @@ components:The approval status of the linked issue.Unspecified when no linked issue exists.readOnly: true- $ref: '#/components/schemas/bytebase.v1.Issue.ApprovalStatus'+ $ref: '#/components/schemas/bytebase.v1.ApprovalStatus'rolloutStageSummaries:type: arrayitems:@@ -30998,6 +30992,18 @@ security: []tags:- name: AccessGrantServicedescription: AccessGrantService manages temporary access grants within projects.+ - name: RolloutService+ description: RolloutService manages the execution of deployment plans.+ - name: InstanceRoleService+ description: InstanceRoleService manages database roles within instances.+ - name: InstanceService+ description: InstanceService manages database instances and their connections.+ - name: DatabaseService+ description: DatabaseService manages databases and their schemas.+ - name: SQLService+ description: SQLService executes SQL queries and manages query operations.+ - name: PlanService+ description: PlanService manages deployment plans for database changes.- name: IssueServicedescription: IssueService manages issues for tracking database changes and tasks.- name: SettingService@@ -31018,24 +31024,12 @@ tags:description: DatabaseCatalogService manages database schema metadata and classification.- name: DatabaseGroupServicedescription: DatabaseGroupService manages database groups for organizing databases by criteria.- - name: InstanceRoleService- description: InstanceRoleService manages database roles within instances.- - name: InstanceService- description: InstanceService manages database instances and their connections.- - name: DatabaseService- description: DatabaseService manages databases and their schemas.- name: GroupServicedescription: GroupService manages user groups for organizing users and permissions.- name: IdentityProviderServicedescription: IdentityProviderService manages external identity providers for SSO authentication.- name: OrgPolicyServicedescription: OrgPolicyService manages organizational policies at various resource levels.- - name: RolloutService- description: RolloutService manages the execution of deployment plans.- - name: SQLService- description: SQLService executes SQL queries and manages query operations.- - name: PlanService- description: PlanService manages deployment plans for database changes.- name: ProjectServicedescription: ProjectService manages projects that group databases and changes.- name: ReleaseServicediff --git a/proto/gen/grpc-doc/store/README.md b/proto/gen/grpc-doc/store/README.mdindex 9c9fac420d..2776c75c18 100644--- a/proto/gen/grpc-doc/store/README.md+++ b/proto/gen/grpc-doc/store/README.md@@ -155,23 +155,23 @@- [Issue.Status](#bytebase-store-Issue-Status)- [Issue.Type](#bytebase-store-Issue-Type)+- [store/plan.proto](#store_plan-proto)+ - [PlanConfig](#bytebase-store-PlanConfig)+ - [PlanConfig.ChangeDatabaseConfig](#bytebase-store-PlanConfig-ChangeDatabaseConfig)+ - [PlanConfig.CreateDatabaseConfig](#bytebase-store-PlanConfig-CreateDatabaseConfig)+ - [PlanConfig.ExportDataConfig](#bytebase-store-PlanConfig-ExportDataConfig)+ - [PlanConfig.Spec](#bytebase-store-PlanConfig-Spec)+- [store/issue_comment.proto](#store_issue_comment-proto)- [IssueCommentPayload](#bytebase-store-IssueCommentPayload)- [IssueCommentPayload.Approval](#bytebase-store-IssueCommentPayload-Approval)- [IssueCommentPayload.IssueUpdate](#bytebase-store-IssueCommentPayload-IssueUpdate)- - [IssueCommentPayload.PlanSpecUpdate](#bytebase-store-IssueCommentPayload-PlanSpecUpdate)+ - [IssueCommentPayload.PlanUpdate](#bytebase-store-IssueCommentPayload-PlanUpdate)- [store/oauth2.proto](#store_oauth2-proto)- [OAuth2AuthorizationCodeConfig](#bytebase-store-OAuth2AuthorizationCodeConfig)- [OAuth2ClientConfig](#bytebase-store-OAuth2ClientConfig)-- [store/plan.proto](#store_plan-proto)- - [PlanConfig](#bytebase-store-PlanConfig)- - [PlanConfig.ChangeDatabaseConfig](#bytebase-store-PlanConfig-ChangeDatabaseConfig)- - [PlanConfig.CreateDatabaseConfig](#bytebase-store-PlanConfig-CreateDatabaseConfig)- - [PlanConfig.ExportDataConfig](#bytebase-store-PlanConfig-ExportDataConfig)- - [PlanConfig.Spec](#bytebase-store-PlanConfig-Spec)-- [store/plan_check_run.proto](#store_plan_check_run-proto)- [ChangedResourceDatabase](#bytebase-store-ChangedResourceDatabase)- [ChangedResourceSchema](#bytebase-store-ChangedResourceSchema)@@ -2797,238 +2797,240 @@ Type represents the category of issue.-<a name="store_issue_comment-proto"></a>+<a name="store_plan-proto"></a><p align="right"><a href="#top">Top</a></p>-## store/issue_comment.proto+## store/plan.proto-<a name="bytebase-store-IssueCommentPayload"></a>+<a name="bytebase-store-PlanConfig"></a>-### IssueCommentPayload+### PlanConfig| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| comment | [string](#string) | | |-| approval | [IssueCommentPayload.Approval](#bytebase-store-IssueCommentPayload-Approval) | | |-| issue_update | [IssueCommentPayload.IssueUpdate](#bytebase-store-IssueCommentPayload-IssueUpdate) | | |-| plan_spec_update | [IssueCommentPayload.PlanSpecUpdate](#bytebase-store-IssueCommentPayload-PlanSpecUpdate) | | |+| specs | [PlanConfig.Spec](#bytebase-store-PlanConfig-Spec) | repeated | |+| has_rollout | [bool](#bool) | | Whether the plan has started the rollout. |-<a name="bytebase-store-IssueCommentPayload-Approval"></a>+<a name="bytebase-store-PlanConfig-ChangeDatabaseConfig"></a>-### IssueCommentPayload.Approval+### PlanConfig.ChangeDatabaseConfig| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| status | [IssuePayloadApproval.Approver.Status](#bytebase-store-IssuePayloadApproval-Approver-Status) | | |+| 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_sha256 | [string](#string) | | The SHA256 hash of the sheet content (hex-encoded). |+| release | [string](#string) | | The resource name of the release. Format: projects/{project}/releases/{release} |+| 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-store-IssueCommentPayload-IssueUpdate"></a>+<a name="bytebase-store-PlanConfig-CreateDatabaseConfig"></a>-### IssueCommentPayload.IssueUpdate+### PlanConfig.CreateDatabaseConfig| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| from_title | [string](#string) | optional | |-| to_title | [string](#string) | optional | |-| from_description | [string](#string) | optional | |-| to_description | [string](#string) | optional | |-| from_status | [Issue.Status](#bytebase-store-Issue-Status) | optional | |-| to_status | [Issue.Status](#bytebase-store-Issue-Status) | optional | |-| from_labels | [string](#string) | repeated | |-| to_labels | [string](#string) | repeated | |+| 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 "ON CLUSTER <<cluster>>". |+| owner | [string](#string) | | owner is the owner of the database. This is only applicable to Postgres for "WITH OWNER <<owner>>". |+| environment | [string](#string) | | The environment resource. Format: environments/prod where prod is the environment resource ID. |-<a name="bytebase-store-IssueCommentPayload-PlanSpecUpdate"></a>+<a name="bytebase-store-PlanConfig-ExportDataConfig"></a>++### PlanConfig.ExportDataConfig-### IssueCommentPayload.PlanSpecUpdate-Plan spec update event (tracks sheet changes to plan specs)| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| spec | [string](#string) | | The spec that was updated Format: projects/{project}/plans/{plan}/specs/{spec} |-| from_sheet_sha256 | [string](#string) | optional | The SHA256 hash of the previous sheet content (hex-encoded). |-| to_sheet_sha256 | [string](#string) | optional | The SHA256 hash of the new sheet content (hex-encoded). |+| 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_sha256 | [string](#string) | | The SHA256 hash of the sheet content (hex-encoded). |+| format | [ExportFormat](#bytebase-store-ExportFormat) | | The format of the exported file. |+| password | [string](#string) | optional | The zip password provided by users. Leave it empty if there is no need to encrypt the zip file. |--+<a name="bytebase-store-PlanConfig-Spec"></a>-+### PlanConfig.Spec-+| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| id | [string](#string) | | A UUID4 string that uniquely identifies the Spec. |+| create_database_config | [PlanConfig.CreateDatabaseConfig](#bytebase-store-PlanConfig-CreateDatabaseConfig) | | |+| change_database_config | [PlanConfig.ChangeDatabaseConfig](#bytebase-store-PlanConfig-ChangeDatabaseConfig) | | |+| export_data_config | [PlanConfig.ExportDataConfig](#bytebase-store-PlanConfig-ExportDataConfig) | | |-<a name="store_oauth2-proto"></a>-<p align="right"><a href="#top">Top</a></p>-## store/oauth2.proto-<a name="bytebase-store-OAuth2AuthorizationCodeConfig"></a>+-### OAuth2AuthorizationCodeConfig+++-| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| redirect_uri | [string](#string) | | |-| code_challenge | [string](#string) | | |-| code_challenge_method | [string](#string) | | |+<a name="store_issue_comment-proto"></a>+<p align="right"><a href="#top">Top</a></p>+## store/issue_comment.proto-<a name="bytebase-store-OAuth2ClientConfig"></a>+<a name="bytebase-store-IssueCommentPayload"></a>-### OAuth2ClientConfig+### IssueCommentPayload| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| client_name | [string](#string) | | |-| redirect_uris | [string](#string) | repeated | |-| grant_types | [string](#string) | repeated | |-| token_endpoint_auth_method | [string](#string) | | |+| comment | [string](#string) | | |+| approval | [IssueCommentPayload.Approval](#bytebase-store-IssueCommentPayload-Approval) | | |+| issue_update | [IssueCommentPayload.IssueUpdate](#bytebase-store-IssueCommentPayload-IssueUpdate) | | |+| plan_update | [IssueCommentPayload.PlanUpdate](#bytebase-store-IssueCommentPayload-PlanUpdate) | | |--+<a name="bytebase-store-IssueCommentPayload-Approval"></a>-+### IssueCommentPayload.Approval-+| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| status | [IssuePayloadApproval.Approver.Status](#bytebase-store-IssuePayloadApproval-Approver-Status) | | |-<a name="store_plan-proto"></a>-<p align="right"><a href="#top">Top</a></p>-## store/plan.proto-<a name="bytebase-store-PlanConfig"></a>-### PlanConfig+<a name="bytebase-store-IssueCommentPayload-IssueUpdate"></a>++### IssueCommentPayload.IssueUpdate| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| specs | [PlanConfig.Spec](#bytebase-store-PlanConfig-Spec) | repeated | |-| has_rollout | [bool](#bool) | | Whether the plan has started the rollout. |-+| from_title | [string](#string) | optional | |+| to_title | [string](#string) | optional | |+| from_description | [string](#string) | optional | |+| to_description | [string](#string) | optional | |+| from_status | [Issue.Status](#bytebase-store-Issue-Status) | optional | |+| to_status | [Issue.Status](#bytebase-store-Issue-Status) | optional | |+| from_labels | [string](#string) | repeated | |+| to_labels | [string](#string) | repeated | |-<a name="bytebase-store-PlanConfig-ChangeDatabaseConfig"></a>-### PlanConfig.ChangeDatabaseConfig+<a name="bytebase-store-IssueCommentPayload-PlanUpdate"></a>+### IssueCommentPayload.PlanUpdate+PlanUpdate carries before/after snapshots of plan.config.specs,+emitted once per PlanService.UpdatePlan call whose specs branch+produces a non-cosmetic diff. The renderer computes per-spec+add/remove/update from the snapshot pair.| 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_sha256 | [string](#string) | | The SHA256 hash of the sheet content (hex-encoded). |-| release | [string](#string) | | The resource name of the release. Format: projects/{project}/releases/{release} |-| enable_prior_backup | [bool](#bool) | | If set, a backup of the modified data will be created automatically before any changes are applied. |+| from_specs | [PlanConfig.Spec](#bytebase-store-PlanConfig-Spec) | repeated | |+| to_specs | [PlanConfig.Spec](#bytebase-store-PlanConfig-Spec) | repeated | |+-<a name="bytebase-store-PlanConfig-CreateDatabaseConfig"></a>+-### PlanConfig.CreateDatabaseConfig++-| 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 "ON CLUSTER <<cluster>>". |-| owner | [string](#string) | | owner is the owner of the database. This is only applicable to Postgres for "WITH OWNER <<owner>>". |-| environment | [string](#string) | | The environment resource. Format: environments/prod where prod is the environment resource ID. |-+<a name="store_oauth2-proto"></a>+<p align="right"><a href="#top">Top</a></p>+## store/oauth2.proto-<a name="bytebase-store-PlanConfig-ExportDataConfig"></a>+<a name="bytebase-store-OAuth2AuthorizationCodeConfig"></a>-### PlanConfig.ExportDataConfig+### OAuth2AuthorizationCodeConfig| 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_sha256 | [string](#string) | | The SHA256 hash of the sheet content (hex-encoded). |-| format | [ExportFormat](#bytebase-store-ExportFormat) | | The format of the exported file. |-| password | [string](#string) | optional | The zip password provided by users. Leave it empty if there is no need to encrypt the zip file. |+| redirect_uri | [string](#string) | | |+| code_challenge | [string](#string) | | |+| code_challenge_method | [string](#string) | | |-<a name="bytebase-store-PlanConfig-Spec"></a>+<a name="bytebase-store-OAuth2ClientConfig"></a>-### PlanConfig.Spec+### OAuth2ClientConfig| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| id | [string](#string) | | A UUID4 string that uniquely identifies the Spec. |-| create_database_config | [PlanConfig.CreateDatabaseConfig](#bytebase-store-PlanConfig-CreateDatabaseConfig) | | |-| change_database_config | [PlanConfig.ChangeDatabaseConfig](#bytebase-store-PlanConfig-ChangeDatabaseConfig) | | |-| export_data_config | [PlanConfig.ExportDataConfig](#bytebase-store-PlanConfig-ExportDataConfig) | | |+| client_name | [string](#string) | | |+| redirect_uris | [string](#string) | repeated | |+| grant_types | [string](#string) | repeated | |+| token_endpoint_auth_method | [string](#string) | | |diff --git a/proto/gen/grpc-doc/store/index.html b/proto/gen/grpc-doc/store/index.htmlindex fa54df66ba..72177e8bf2 100644--- a/proto/gen/grpc-doc/store/index.html+++ b/proto/gen/grpc-doc/store/index.html@@ -782,23 +782,27 @@<li>- <a href="#store%2fissue_comment.proto">store/issue_comment.proto</a>+ <a href="#store%2fplan.proto">store/plan.proto</a><ul><li>- <a href="#bytebase.store.IssueCommentPayload"><span class="badge">M</span>IssueCommentPayload</a>+ <a href="#bytebase.store.PlanConfig"><span class="badge">M</span>PlanConfig</a></li><li>- <a href="#bytebase.store.IssueCommentPayload.Approval"><span class="badge">M</span>IssueCommentPayload.Approval</a>+ <a href="#bytebase.store.PlanConfig.ChangeDatabaseConfig"><span class="badge">M</span>PlanConfig.ChangeDatabaseConfig</a></li><li>- <a href="#bytebase.store.IssueCommentPayload.IssueUpdate"><span class="badge">M</span>IssueCommentPayload.IssueUpdate</a>+ <a href="#bytebase.store.PlanConfig.CreateDatabaseConfig"><span class="badge">M</span>PlanConfig.CreateDatabaseConfig</a></li><li>- <a href="#bytebase.store.IssueCommentPayload.PlanSpecUpdate"><span class="badge">M</span>IssueCommentPayload.PlanSpecUpdate</a>+ <a href="#bytebase.store.PlanConfig.ExportDataConfig"><span class="badge">M</span>PlanConfig.ExportDataConfig</a>+ </li>++ <li>+ <a href="#bytebase.store.PlanConfig.Spec"><span class="badge">M</span>PlanConfig.Spec</a></li>@@ -809,15 +813,23 @@<li>- <a href="#store%2foauth2.proto">store/oauth2.proto</a>+ <a href="#store%2fissue_comment.proto">store/issue_comment.proto</a><ul><li>- <a href="#bytebase.store.OAuth2AuthorizationCodeConfig"><span class="badge">M</span>OAuth2AuthorizationCodeConfig</a>+ <a href="#bytebase.store.IssueCommentPayload"><span class="badge">M</span>IssueCommentPayload</a></li><li>- <a href="#bytebase.store.OAuth2ClientConfig"><span class="badge">M</span>OAuth2ClientConfig</a>+ <a href="#bytebase.store.IssueCommentPayload.Approval"><span class="badge">M</span>IssueCommentPayload.Approval</a>+ </li>++ <li>+ <a href="#bytebase.store.IssueCommentPayload.IssueUpdate"><span class="badge">M</span>IssueCommentPayload.IssueUpdate</a>+ </li>++ <li>+ <a href="#bytebase.store.IssueCommentPayload.PlanUpdate"><span class="badge">M</span>IssueCommentPayload.PlanUpdate</a></li>@@ -828,27 +840,15 @@<li>- <a href="#store%2fplan.proto">store/plan.proto</a>+ <a href="#store%2foauth2.proto">store/oauth2.proto</a><ul><li>- <a href="#bytebase.store.PlanConfig"><span class="badge">M</span>PlanConfig</a>- </li>-- <li>- <a href="#bytebase.store.PlanConfig.ChangeDatabaseConfig"><span class="badge">M</span>PlanConfig.ChangeDatabaseConfig</a>- </li>-- <li>- <a href="#bytebase.store.PlanConfig.CreateDatabaseConfig"><span class="badge">M</span>PlanConfig.CreateDatabaseConfig</a>- </li>-- <li>- <a href="#bytebase.store.PlanConfig.ExportDataConfig"><span class="badge">M</span>PlanConfig.ExportDataConfig</a>+ <a href="#bytebase.store.OAuth2AuthorizationCodeConfig"><span class="badge">M</span>OAuth2AuthorizationCodeConfig</a></li><li>- <a href="#bytebase.store.PlanConfig.Spec"><span class="badge">M</span>PlanConfig.Spec</a>+ <a href="#bytebase.store.OAuth2ClientConfig"><span class="badge">M</span>OAuth2ClientConfig</a></li>@@ -8387,12 +8387,12 @@ Format: users/{email}. </p></td><div class="file-heading">- <h2 id="store/issue_comment.proto">store/issue_comment.proto</h2><a href="#title">Top</a>+ <h2 id="store/plan.proto">store/plan.proto</h2><a href="#title">Top</a></div><p></p>- <h3 id="bytebase.store.IssueCommentPayload">IssueCommentPayload</h3>+ <h3 id="bytebase.store.PlanConfig">PlanConfig</h3><p></p>@@ -8403,31 +8403,17 @@ Format: users/{email}. </p></td><tbody><tr>- <td>comment</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p> </p></td>- </tr>-- <tr>- <td>approval</td>- <td><a href="#bytebase.store.IssueCommentPayload.Approval">IssueCommentPayload.Approval</a></td>- <td></td>- <td><p> </p></td>- </tr>-- <tr>- <td>issue_update</td>- <td><a href="#bytebase.store.IssueCommentPayload.IssueUpdate">IssueCommentPayload.IssueUpdate</a></td>- <td></td>+ <td>specs</td>+ <td><a href="#bytebase.store.PlanConfig.Spec">PlanConfig.Spec</a></td>+ <td>repeated</td><td><p> </p></td></tr><tr>- <td>plan_spec_update</td>- <td><a href="#bytebase.store.IssueCommentPayload.PlanSpecUpdate">IssueCommentPayload.PlanSpecUpdate</a></td>+ <td>has_rollout</td>+ <td><a href="#bool">bool</a></td><td></td>- <td><p> </p></td>+ <td><p>Whether the plan has started the rollout. </p></td></tr></tbody>@@ -8437,7 +8423,7 @@ Format: users/{email}. </p></td>- <h3 id="bytebase.store.IssueCommentPayload.Approval">IssueCommentPayload.Approval</h3>+ <h3 id="bytebase.store.PlanConfig.ChangeDatabaseConfig">PlanConfig.ChangeDatabaseConfig</h3><p></p>@@ -8448,10 +8434,34 @@ Format: users/{email}. </p></td><tbody><tr>- <td>status</td>- <td><a href="#bytebase.store.IssuePayloadApproval.Approver.Status">IssuePayloadApproval.Approver.Status</a></td>+ <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_sha256</td>+ <td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>The SHA256 hash of the sheet content (hex-encoded). </p></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>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>@@ -8461,7 +8471,7 @@ Format: users/{email}. </p></td>- <h3 id="bytebase.store.IssueCommentPayload.IssueUpdate">IssueCommentPayload.IssueUpdate</h3>+ <h3 id="bytebase.store.PlanConfig.CreateDatabaseConfig">PlanConfig.CreateDatabaseConfig</h3><p></p>@@ -8472,98 +8482,62 @@ Format: users/{email}. </p></td><tbody><tr>- <td>from_title</td>- <td><a href="#string">string</a></td>- <td>optional</td>- <td><p> </p></td>- </tr>-- <tr>- <td>to_title</td>+ <td>target</td><td><a href="#string">string</a></td>- <td>optional</td>- <td><p> </p></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>from_description</td>+ <td>database</td><td><a href="#string">string</a></td>- <td>optional</td>- <td><p> </p></td>+ <td></td>+ <td><p>The name of the database to create. </p></td></tr><tr>- <td>to_description</td>+ <td>table</td><td><a href="#string">string</a></td>- <td>optional</td>- <td><p> </p></td>- </tr>-- <tr>- <td>from_status</td>- <td><a href="#bytebase.store.Issue.Status">Issue.Status</a></td>- <td>optional</td>- <td><p> </p></td>- </tr>-- <tr>- <td>to_status</td>- <td><a href="#bytebase.store.Issue.Status">Issue.Status</a></td>- <td>optional</td>- <td><p> </p></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>from_labels</td>+ <td>character_set</td><td><a href="#string">string</a></td>- <td>repeated</td>- <td><p> </p></td>+ <td></td>+ <td><p>character_set is the character set of the database. </p></td></tr><tr>- <td>to_labels</td>+ <td>collation</td><td><a href="#string">string</a></td>- <td>repeated</td>- <td><p> </p></td>+ <td></td>+ <td><p>collation is the collation of the database. </p></td></tr>- </tbody>- </table>------ <h3 id="bytebase.store.IssueCommentPayload.PlanSpecUpdate">IssueCommentPayload.PlanSpecUpdate</h3>- <p>Plan spec update event (tracks sheet changes to plan specs)</p>--- <table class="field-table">- <thead>- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>- </thead>- <tbody>-<tr>- <td>spec</td>+ <td>cluster</td><td><a href="#string">string</a></td><td></td>- <td><p>The spec that was updated-Format: projects/{project}/plans/{plan}/specs/{spec} </p></td>+ <td><p>cluster is the cluster of the database. This is only applicable to ClickHouse for "ON CLUSTER <<cluster>>". </p></td></tr><tr>- <td>from_sheet_sha256</td>+ <td>owner</td><td><a href="#string">string</a></td>- <td>optional</td>- <td><p>The SHA256 hash of the previous sheet content (hex-encoded). </p></td>+ <td></td>+ <td><p>owner is the owner of the database. This is only applicable to Postgres for "WITH OWNER <<owner>>". </p></td></tr><tr>- <td>to_sheet_sha256</td>+ <td>environment</td><td><a href="#string">string</a></td>- <td>optional</td>- <td><p>The SHA256 hash of the new sheet content (hex-encoded). </p></td>+ <td></td>+ <td><p>The environment resource.+Format: environments/prod where prod is the environment resource ID. </p></td></tr></tbody>@@ -8573,21 +8547,7 @@ Format: projects/{project}/plans/{plan}/specs/{spec} </p></td>--------- <div class="file-heading">- <h2 id="store/oauth2.proto">store/oauth2.proto</h2><a href="#title">Top</a>- </div>- <p></p>--- <h3 id="bytebase.store.OAuth2AuthorizationCodeConfig">OAuth2AuthorizationCodeConfig</h3>+ <h3 id="bytebase.store.PlanConfig.ExportDataConfig">PlanConfig.ExportDataConfig</h3><p></p>@@ -8598,24 +8558,34 @@ Format: projects/{project}/plans/{plan}/specs/{spec} </p></td><tbody><tr>- <td>redirect_uri</td>+ <td>targets</td><td><a href="#string">string</a></td>- <td></td>- <td><p> </p></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>code_challenge</td>+ <td>sheet_sha256</td><td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>The SHA256 hash of the sheet content (hex-encoded). </p></td></tr><tr>- <td>code_challenge_method</td>- <td><a href="#string">string</a></td>+ <td>format</td>+ <td><a href="#bytebase.store.ExportFormat">ExportFormat</a></td><td></td>- <td><p> </p></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 provided by users.+Leave it empty if there is no need to encrypt the zip file. </p></td></tr></tbody>@@ -8625,7 +8595,7 @@ Format: projects/{project}/plans/{plan}/specs/{spec} </p></td>- <h3 id="bytebase.store.OAuth2ClientConfig">OAuth2ClientConfig</h3>+ <h3 id="bytebase.store.PlanConfig.Spec">PlanConfig.Spec</h3><p></p>@@ -8636,29 +8606,29 @@ Format: projects/{project}/plans/{plan}/specs/{spec} </p></td><tbody><tr>- <td>client_name</td>+ <td>id</td><td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>A UUID4 string that uniquely identifies the Spec. </p></td></tr><tr>- <td>redirect_uris</td>- <td><a href="#string">string</a></td>- <td>repeated</td>+ <td>create_database_config</td>+ <td><a href="#bytebase.store.PlanConfig.CreateDatabaseConfig">PlanConfig.CreateDatabaseConfig</a></td>+ <td></td><td><p> </p></td></tr><tr>- <td>grant_types</td>- <td><a href="#string">string</a></td>- <td>repeated</td>+ <td>change_database_config</td>+ <td><a href="#bytebase.store.PlanConfig.ChangeDatabaseConfig">PlanConfig.ChangeDatabaseConfig</a></td>+ <td></td><td><p> </p></td></tr><tr>- <td>token_endpoint_auth_method</td>- <td><a href="#string">string</a></td>+ <td>export_data_config</td>+ <td><a href="#bytebase.store.PlanConfig.ExportDataConfig">PlanConfig.ExportDataConfig</a></td><td></td><td><p> </p></td></tr>@@ -8679,12 +8649,12 @@ Format: projects/{project}/plans/{plan}/specs/{spec} </p></td><div class="file-heading">- <h2 id="store/plan.proto">store/plan.proto</h2><a href="#title">Top</a>+ <h2 id="store/issue_comment.proto">store/issue_comment.proto</h2><a href="#title">Top</a></div><p></p>- <h3 id="bytebase.store.PlanConfig">PlanConfig</h3>+ <h3 id="bytebase.store.IssueCommentPayload">IssueCommentPayload</h3><p></p>@@ -8695,17 +8665,31 @@ Format: projects/{project}/plans/{plan}/specs/{spec} </p></td><tbody><tr>- <td>specs</td>- <td><a href="#bytebase.store.PlanConfig.Spec">PlanConfig.Spec</a></td>- <td>repeated</td>+ <td>comment</td>+ <td><a href="#string">string</a></td>+ <td></td><td><p> </p></td></tr><tr>- <td>has_rollout</td>- <td><a href="#bool">bool</a></td>+ <td>approval</td>+ <td><a href="#bytebase.store.IssueCommentPayload.Approval">IssueCommentPayload.Approval</a></td><td></td>- <td><p>Whether the plan has started the rollout. </p></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>issue_update</td>+ <td><a href="#bytebase.store.IssueCommentPayload.IssueUpdate">IssueCommentPayload.IssueUpdate</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>plan_update</td>+ <td><a href="#bytebase.store.IssueCommentPayload.PlanUpdate">IssueCommentPayload.PlanUpdate</a></td>+ <td></td>+ <td><p> </p></td></tr></tbody>@@ -8715,7 +8699,7 @@ Format: projects/{project}/plans/{plan}/specs/{spec} </p></td>- <h3 id="bytebase.store.PlanConfig.ChangeDatabaseConfig">PlanConfig.ChangeDatabaseConfig</h3>+ <h3 id="bytebase.store.IssueCommentPayload.Approval">IssueCommentPayload.Approval</h3><p></p>@@ -8726,34 +8710,10 @@ Format: projects/{project}/plans/{plan}/specs/{spec} </p></td><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_sha256</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The SHA256 hash of the sheet content (hex-encoded). </p></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>enable_prior_backup</td>- <td><a href="#bool">bool</a></td>+ <td>status</td>+ <td><a href="#bytebase.store.IssuePayloadApproval.Approver.Status">IssuePayloadApproval.Approver.Status</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>@@ -8763,7 +8723,7 @@ Format: projects/{project}/releases/{release} </p></td>- <h3 id="bytebase.store.PlanConfig.CreateDatabaseConfig">PlanConfig.CreateDatabaseConfig</h3>+ <h3 id="bytebase.store.IssueCommentPayload.IssueUpdate">IssueCommentPayload.IssueUpdate</h3><p></p>@@ -8774,62 +8734,59 @@ Format: projects/{project}/releases/{release} </p></td><tbody><tr>- <td>target</td>+ <td>from_title</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>+ <td>optional</td>+ <td><p> </p></td></tr><tr>- <td>database</td>+ <td>to_title</td><td><a href="#string">string</a></td>- <td></td>- <td><p>The name of the database to create. </p></td>+ <td>optional</td>+ <td><p> </p></td></tr><tr>- <td>table</td>+ <td>from_description</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>+ <td>optional</td>+ <td><p> </p></td></tr><tr>- <td>character_set</td>+ <td>to_description</td><td><a href="#string">string</a></td>- <td></td>- <td><p>character_set is the character set of the database. </p></td>+ <td>optional</td>+ <td><p> </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>+ <td>from_status</td>+ <td><a href="#bytebase.store.Issue.Status">Issue.Status</a></td>+ <td>optional</td>+ <td><p> </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 "ON CLUSTER <<cluster>>". </p></td>+ <td>to_status</td>+ <td><a href="#bytebase.store.Issue.Status">Issue.Status</a></td>+ <td>optional</td>+ <td><p> </p></td></tr><tr>- <td>owner</td>+ <td>from_labels</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 "WITH OWNER <<owner>>". </p></td>+ <td>repeated</td>+ <td><p> </p></td></tr><tr>- <td>environment</td>+ <td>to_labels</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>+ <td>repeated</td>+ <td><p> </p></td></tr></tbody>@@ -8839,8 +8796,8 @@ Format: environments/prod where prod is the environment resource ID. </p></td>- <h3 id="bytebase.store.PlanConfig.ExportDataConfig">PlanConfig.ExportDataConfig</h3>- <p></p>+ <h3 id="bytebase.store.IssueCommentPayload.PlanUpdate">IssueCommentPayload.PlanUpdate</h3>+ <p>PlanUpdate carries before/after snapshots of plan.config.specs,</p><p>emitted once per PlanService.UpdatePlan call whose specs branch</p><p>produces a non-cosmetic diff. The renderer computes per-spec</p><p>add/remove/update from the snapshot pair.</p><table class="field-table">@@ -8850,34 +8807,69 @@ Format: environments/prod where prod is the environment resource ID. </p></td><tbody><tr>- <td>targets</td>- <td><a href="#string">string</a></td>+ <td>from_specs</td>+ <td><a href="#bytebase.store.PlanConfig.Spec">PlanConfig.Spec</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><p> </p></td></tr><tr>- <td>sheet_sha256</td>+ <td>to_specs</td>+ <td><a href="#bytebase.store.PlanConfig.Spec">PlanConfig.Spec</a></td>+ <td>repeated</td>+ <td><p> </p></td>+ </tr>++ </tbody>+ </table>++++++++++++++ <div class="file-heading">+ <h2 id="store/oauth2.proto">store/oauth2.proto</h2><a href="#title">Top</a>+ </div>+ <p></p>+++ <h3 id="bytebase.store.OAuth2AuthorizationCodeConfig">OAuth2AuthorizationCodeConfig</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>redirect_uri</td><td><a href="#string">string</a></td><td></td>- <td><p>The SHA256 hash of the sheet content (hex-encoded). </p></td>+ <td><p> </p></td></tr><tr>- <td>format</td>- <td><a href="#bytebase.store.ExportFormat">ExportFormat</a></td>+ <td>code_challenge</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>The format of the exported file. </p></td>+ <td><p> </p></td></tr><tr>- <td>password</td>+ <td>code_challenge_method</td><td><a href="#string">string</a></td>- <td>optional</td>- <td><p>The zip password provided by users.-Leave it empty if there is no need to encrypt the zip file. </p></td>+ <td></td>+ <td><p> </p></td></tr></tbody>@@ -8887,7 +8879,7 @@ Leave it empty if there is no need to encrypt the zip file. </p></td>- <h3 id="bytebase.store.PlanConfig.Spec">PlanConfig.Spec</h3>+ <h3 id="bytebase.store.OAuth2ClientConfig">OAuth2ClientConfig</h3><p></p>@@ -8898,29 +8890,29 @@ Leave it empty if there is no need to encrypt the zip file. </p></td><tbody><tr>- <td>id</td>+ <td>client_name</td><td><a href="#string">string</a></td><td></td>- <td><p>A UUID4 string that uniquely identifies the Spec. </p></td>+ <td><p> </p></td></tr><tr>- <td>create_database_config</td>- <td><a href="#bytebase.store.PlanConfig.CreateDatabaseConfig">PlanConfig.CreateDatabaseConfig</a></td>- <td></td>+ <td>redirect_uris</td>+ <td><a href="#string">string</a></td>+ <td>repeated</td><td><p> </p></td></tr><tr>- <td>change_database_config</td>- <td><a href="#bytebase.store.PlanConfig.ChangeDatabaseConfig">PlanConfig.ChangeDatabaseConfig</a></td>- <td></td>+ <td>grant_types</td>+ <td><a href="#string">string</a></td>+ <td>repeated</td><td><p> </p></td></tr><tr>- <td>export_data_config</td>- <td><a href="#bytebase.store.PlanConfig.ExportDataConfig">PlanConfig.ExportDataConfig</a></td>+ <td>token_endpoint_auth_method</td>+ <td><a href="#string">string</a></td><td></td><td><p> </p></td></tr>diff --git a/proto/gen/grpc-doc/v1/README.md b/proto/gen/grpc-doc/v1/README.mdindex bfe00a8586..6740800cf9 100644--- a/proto/gen/grpc-doc/v1/README.md+++ b/proto/gen/grpc-doc/v1/README.md@@ -31,6 +31,7 @@- [Position](#bytebase-v1-Position)- [Range](#bytebase-v1-Range)+ - [ApprovalStatus](#bytebase-v1-ApprovalStatus)- [Engine](#bytebase-v1-Engine)- [ExportFormat](#bytebase-v1-ExportFormat)- [RiskLevel](#bytebase-v1-RiskLevel)@@ -39,6 +40,254 @@- [VCSType](#bytebase-v1-VCSType)- [WebhookType](#bytebase-v1-WebhookType)+- [v1/rollout_service.proto](#v1_rollout_service-proto)+ - [BatchCancelTaskRunsRequest](#bytebase-v1-BatchCancelTaskRunsRequest)+ - [BatchCancelTaskRunsResponse](#bytebase-v1-BatchCancelTaskRunsResponse)+ - [BatchRunTasksRequest](#bytebase-v1-BatchRunTasksRequest)+ - [BatchRunTasksResponse](#bytebase-v1-BatchRunTasksResponse)+ - [BatchSkipTasksRequest](#bytebase-v1-BatchSkipTasksRequest)+ - [BatchSkipTasksResponse](#bytebase-v1-BatchSkipTasksResponse)+ - [CreateRolloutRequest](#bytebase-v1-CreateRolloutRequest)+ - [GetRolloutRequest](#bytebase-v1-GetRolloutRequest)+ - [GetTaskRunLogRequest](#bytebase-v1-GetTaskRunLogRequest)+ - [GetTaskRunRequest](#bytebase-v1-GetTaskRunRequest)+ - [GetTaskRunSessionRequest](#bytebase-v1-GetTaskRunSessionRequest)+ - [ListRolloutsRequest](#bytebase-v1-ListRolloutsRequest)+ - [ListRolloutsResponse](#bytebase-v1-ListRolloutsResponse)+ - [ListTaskRunsRequest](#bytebase-v1-ListTaskRunsRequest)+ - [ListTaskRunsResponse](#bytebase-v1-ListTaskRunsResponse)+ - [PreviewTaskRunRollbackRequest](#bytebase-v1-PreviewTaskRunRollbackRequest)+ - [PreviewTaskRunRollbackResponse](#bytebase-v1-PreviewTaskRunRollbackResponse)+ - [Rollout](#bytebase-v1-Rollout)+ - [Stage](#bytebase-v1-Stage)+ - [Task](#bytebase-v1-Task)+ - [Task.DatabaseCreate](#bytebase-v1-Task-DatabaseCreate)+ - [Task.DatabaseDataExport](#bytebase-v1-Task-DatabaseDataExport)+ - [Task.DatabaseUpdate](#bytebase-v1-Task-DatabaseUpdate)+ - [TaskRun](#bytebase-v1-TaskRun)+ - [TaskRun.SchedulerInfo](#bytebase-v1-TaskRun-SchedulerInfo)+ - [TaskRun.SchedulerInfo.WaitingCause](#bytebase-v1-TaskRun-SchedulerInfo-WaitingCause)+ - [TaskRunLog](#bytebase-v1-TaskRunLog)+ - [TaskRunLogEntry](#bytebase-v1-TaskRunLogEntry)+ - [TaskRunLogEntry.CommandExecute](#bytebase-v1-TaskRunLogEntry-CommandExecute)+ - [TaskRunLogEntry.CommandExecute.CommandResponse](#bytebase-v1-TaskRunLogEntry-CommandExecute-CommandResponse)+ - [TaskRunLogEntry.ComputeDiff](#bytebase-v1-TaskRunLogEntry-ComputeDiff)+ - [TaskRunLogEntry.DatabaseSync](#bytebase-v1-TaskRunLogEntry-DatabaseSync)+ - [TaskRunLogEntry.GhostMigration](#bytebase-v1-TaskRunLogEntry-GhostMigration)+ - [TaskRunLogEntry.PriorBackup](#bytebase-v1-TaskRunLogEntry-PriorBackup)+ - [TaskRunLogEntry.PriorBackup.PriorBackupDetail](#bytebase-v1-TaskRunLogEntry-PriorBackup-PriorBackupDetail)+ - [TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item](#bytebase-v1-TaskRunLogEntry-PriorBackup-PriorBackupDetail-Item)+ - [TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item.Table](#bytebase-v1-TaskRunLogEntry-PriorBackup-PriorBackupDetail-Item-Table)+ - [TaskRunLogEntry.ReleaseFileExecute](#bytebase-v1-TaskRunLogEntry-ReleaseFileExecute)+ - [TaskRunLogEntry.RetryInfo](#bytebase-v1-TaskRunLogEntry-RetryInfo)+ - [TaskRunLogEntry.SchemaDump](#bytebase-v1-TaskRunLogEntry-SchemaDump)+ - [TaskRunLogEntry.TransactionControl](#bytebase-v1-TaskRunLogEntry-TransactionControl)+ - [TaskRunSession](#bytebase-v1-TaskRunSession)+ - [TaskRunSession.Postgres](#bytebase-v1-TaskRunSession-Postgres)+ - [TaskRunSession.Postgres.Session](#bytebase-v1-TaskRunSession-Postgres-Session)++ - [Task.Status](#bytebase-v1-Task-Status)+ - [Task.Type](#bytebase-v1-Task-Type)+ - [TaskRun.ExportArchiveStatus](#bytebase-v1-TaskRun-ExportArchiveStatus)+ - [TaskRun.Status](#bytebase-v1-TaskRun-Status)+ - [TaskRunLogEntry.TransactionControl.Type](#bytebase-v1-TaskRunLogEntry-TransactionControl-Type)+ - [TaskRunLogEntry.Type](#bytebase-v1-TaskRunLogEntry-Type)++ - [RolloutService](#bytebase-v1-RolloutService)++- [v1/instance_role_service.proto](#v1_instance_role_service-proto)+ - [InstanceRole](#bytebase-v1-InstanceRole)+ - [ListInstanceRolesRequest](#bytebase-v1-ListInstanceRolesRequest)+ - [ListInstanceRolesResponse](#bytebase-v1-ListInstanceRolesResponse)++ - [InstanceRoleService](#bytebase-v1-InstanceRoleService)++- [v1/instance_service.proto](#v1_instance_service-proto)+ - [AddDataSourceRequest](#bytebase-v1-AddDataSourceRequest)+ - [BatchSyncInstancesRequest](#bytebase-v1-BatchSyncInstancesRequest)+ - [BatchSyncInstancesResponse](#bytebase-v1-BatchSyncInstancesResponse)+ - [BatchUpdateInstancesRequest](#bytebase-v1-BatchUpdateInstancesRequest)+ - [BatchUpdateInstancesResponse](#bytebase-v1-BatchUpdateInstancesResponse)+ - [CreateInstanceRequest](#bytebase-v1-CreateInstanceRequest)+ - [DataSource](#bytebase-v1-DataSource)+ - [DataSource.AWSCredential](#bytebase-v1-DataSource-AWSCredential)+ - [DataSource.Address](#bytebase-v1-DataSource-Address)+ - [DataSource.AzureCredential](#bytebase-v1-DataSource-AzureCredential)+ - [DataSource.ExtraConnectionParametersEntry](#bytebase-v1-DataSource-ExtraConnectionParametersEntry)+ - [DataSource.GCPCredential](#bytebase-v1-DataSource-GCPCredential)+ - [DataSourceExternalSecret](#bytebase-v1-DataSourceExternalSecret)+ - [DataSourceExternalSecret.AppRoleAuthOption](#bytebase-v1-DataSourceExternalSecret-AppRoleAuthOption)+ - [DeleteInstanceRequest](#bytebase-v1-DeleteInstanceRequest)+ - [GetInstanceRequest](#bytebase-v1-GetInstanceRequest)+ - [Instance](#bytebase-v1-Instance)+ - [Instance.LabelsEntry](#bytebase-v1-Instance-LabelsEntry)+ - [InstanceResource](#bytebase-v1-InstanceResource)+ - [KerberosConfig](#bytebase-v1-KerberosConfig)+ - [ListInstanceDatabaseRequest](#bytebase-v1-ListInstanceDatabaseRequest)+ - [ListInstanceDatabaseResponse](#bytebase-v1-ListInstanceDatabaseResponse)+ - [ListInstancesRequest](#bytebase-v1-ListInstancesRequest)+ - [ListInstancesResponse](#bytebase-v1-ListInstancesResponse)+ - [RemoveDataSourceRequest](#bytebase-v1-RemoveDataSourceRequest)+ - [SASLConfig](#bytebase-v1-SASLConfig)+ - [SyncInstanceRequest](#bytebase-v1-SyncInstanceRequest)+ - [SyncInstanceResponse](#bytebase-v1-SyncInstanceResponse)+ - [UndeleteInstanceRequest](#bytebase-v1-UndeleteInstanceRequest)+ - [UpdateDataSourceRequest](#bytebase-v1-UpdateDataSourceRequest)+ - [UpdateInstanceRequest](#bytebase-v1-UpdateInstanceRequest)++ - [DataSource.AuthenticationType](#bytebase-v1-DataSource-AuthenticationType)+ - [DataSource.RedisType](#bytebase-v1-DataSource-RedisType)+ - [DataSourceExternalSecret.AppRoleAuthOption.SecretType](#bytebase-v1-DataSourceExternalSecret-AppRoleAuthOption-SecretType)+ - [DataSourceExternalSecret.AuthType](#bytebase-v1-DataSourceExternalSecret-AuthType)+ - [DataSourceExternalSecret.SecretType](#bytebase-v1-DataSourceExternalSecret-SecretType)+ - [DataSourceType](#bytebase-v1-DataSourceType)++ - [InstanceService](#bytebase-v1-InstanceService)++- [v1/database_service.proto](#v1_database_service-proto)+ - [BatchGetDatabasesRequest](#bytebase-v1-BatchGetDatabasesRequest)+ - [BatchGetDatabasesResponse](#bytebase-v1-BatchGetDatabasesResponse)+ - [BatchSyncDatabasesRequest](#bytebase-v1-BatchSyncDatabasesRequest)+ - [BatchSyncDatabasesResponse](#bytebase-v1-BatchSyncDatabasesResponse)+ - [BatchUpdateDatabasesRequest](#bytebase-v1-BatchUpdateDatabasesRequest)+ - [BatchUpdateDatabasesResponse](#bytebase-v1-BatchUpdateDatabasesResponse)+ - [BoundingBox](#bytebase-v1-BoundingBox)+ - [Changelog](#bytebase-v1-Changelog)+ - [CheckConstraintMetadata](#bytebase-v1-CheckConstraintMetadata)+ - [ColumnMetadata](#bytebase-v1-ColumnMetadata)+ - [Database](#bytebase-v1-Database)+ - [Database.LabelsEntry](#bytebase-v1-Database-LabelsEntry)+ - [DatabaseMetadata](#bytebase-v1-DatabaseMetadata)+ - [DatabaseSDLSchema](#bytebase-v1-DatabaseSDLSchema)+ - [DatabaseSchema](#bytebase-v1-DatabaseSchema)+ - [DependencyColumn](#bytebase-v1-DependencyColumn)+ - [DependencyTable](#bytebase-v1-DependencyTable)+ - [DiffSchemaRequest](#bytebase-v1-DiffSchemaRequest)+ - [DiffSchemaResponse](#bytebase-v1-DiffSchemaResponse)+ - [DimensionConstraint](#bytebase-v1-DimensionConstraint)+ - [DimensionalConfig](#bytebase-v1-DimensionalConfig)+ - [EnumTypeMetadata](#bytebase-v1-EnumTypeMetadata)+ - [EventMetadata](#bytebase-v1-EventMetadata)+ - [ExtensionMetadata](#bytebase-v1-ExtensionMetadata)+ - [ExternalTableMetadata](#bytebase-v1-ExternalTableMetadata)+ - [ForeignKeyMetadata](#bytebase-v1-ForeignKeyMetadata)+ - [FunctionMetadata](#bytebase-v1-FunctionMetadata)+ - [GenerationMetadata](#bytebase-v1-GenerationMetadata)+ - [GetChangelogRequest](#bytebase-v1-GetChangelogRequest)+ - [GetDatabaseMetadataRequest](#bytebase-v1-GetDatabaseMetadataRequest)+ - [GetDatabaseRequest](#bytebase-v1-GetDatabaseRequest)+ - [GetDatabaseSDLSchemaRequest](#bytebase-v1-GetDatabaseSDLSchemaRequest)+ - [GetDatabaseSchemaRequest](#bytebase-v1-GetDatabaseSchemaRequest)+ - [GetSchemaStringRequest](#bytebase-v1-GetSchemaStringRequest)+ - [GetSchemaStringResponse](#bytebase-v1-GetSchemaStringResponse)+ - [GridLevel](#bytebase-v1-GridLevel)+ - [IndexMetadata](#bytebase-v1-IndexMetadata)+ - [ListChangelogsRequest](#bytebase-v1-ListChangelogsRequest)+ - [ListChangelogsResponse](#bytebase-v1-ListChangelogsResponse)+ - [ListDatabasesRequest](#bytebase-v1-ListDatabasesRequest)+ - [ListDatabasesResponse](#bytebase-v1-ListDatabasesResponse)+ - [MaterializedViewMetadata](#bytebase-v1-MaterializedViewMetadata)+ - [PackageMetadata](#bytebase-v1-PackageMetadata)+ - [ProcedureMetadata](#bytebase-v1-ProcedureMetadata)+ - [SchemaMetadata](#bytebase-v1-SchemaMetadata)+ - [SequenceMetadata](#bytebase-v1-SequenceMetadata)+ - [SpatialIndexConfig](#bytebase-v1-SpatialIndexConfig)+ - [StorageConfig](#bytebase-v1-StorageConfig)+ - [StreamMetadata](#bytebase-v1-StreamMetadata)+ - [SyncDatabaseRequest](#bytebase-v1-SyncDatabaseRequest)+ - [SyncDatabaseResponse](#bytebase-v1-SyncDatabaseResponse)+ - [TableMetadata](#bytebase-v1-TableMetadata)+ - [TablePartitionMetadata](#bytebase-v1-TablePartitionMetadata)+ - [TaskMetadata](#bytebase-v1-TaskMetadata)+ - [TessellationConfig](#bytebase-v1-TessellationConfig)+ - [TriggerMetadata](#bytebase-v1-TriggerMetadata)+ - [UpdateDatabaseRequest](#bytebase-v1-UpdateDatabaseRequest)+ - [ViewMetadata](#bytebase-v1-ViewMetadata)++ - [Changelog.Status](#bytebase-v1-Changelog-Status)+ - [ChangelogView](#bytebase-v1-ChangelogView)+ - [ColumnMetadata.IdentityGeneration](#bytebase-v1-ColumnMetadata-IdentityGeneration)+ - [GenerationMetadata.Type](#bytebase-v1-GenerationMetadata-Type)+ - [GetDatabaseSDLSchemaRequest.SDLFormat](#bytebase-v1-GetDatabaseSDLSchemaRequest-SDLFormat)+ - [GetSchemaStringRequest.ObjectType](#bytebase-v1-GetSchemaStringRequest-ObjectType)+ - [StreamMetadata.Mode](#bytebase-v1-StreamMetadata-Mode)+ - [StreamMetadata.Type](#bytebase-v1-StreamMetadata-Type)+ - [SyncStatus](#bytebase-v1-SyncStatus)+ - [TablePartitionMetadata.Type](#bytebase-v1-TablePartitionMetadata-Type)+ - [TaskMetadata.State](#bytebase-v1-TaskMetadata-State)++ - [DatabaseService](#bytebase-v1-DatabaseService)++- [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)+ - [DiffMetadataRequest](#bytebase-v1-DiffMetadataRequest)+ - [DiffMetadataResponse](#bytebase-v1-DiffMetadataResponse)+ - [ExportRequest](#bytebase-v1-ExportRequest)+ - [ExportResponse](#bytebase-v1-ExportResponse)+ - [MaskingReason](#bytebase-v1-MaskingReason)+ - [QueryHistory](#bytebase-v1-QueryHistory)+ - [QueryOption](#bytebase-v1-QueryOption)+ - [QueryRequest](#bytebase-v1-QueryRequest)+ - [QueryResponse](#bytebase-v1-QueryResponse)+ - [QueryResult](#bytebase-v1-QueryResult)+ - [QueryResult.CommandError](#bytebase-v1-QueryResult-CommandError)+ - [QueryResult.Message](#bytebase-v1-QueryResult-Message)+ - [QueryResult.PostgresError](#bytebase-v1-QueryResult-PostgresError)+ - [QueryResult.SyntaxError](#bytebase-v1-QueryResult-SyntaxError)+ - [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)+ - [Advice.RuleType](#bytebase-v1-Advice-RuleType)+ - [QueryHistory.Type](#bytebase-v1-QueryHistory-Type)+ - [QueryOption.MSSQLExplainFormat](#bytebase-v1-QueryOption-MSSQLExplainFormat)+ - [QueryOption.RedisRunCommandsOn](#bytebase-v1-QueryOption-RedisRunCommandsOn)+ - [QueryResult.CommandError.Type](#bytebase-v1-QueryResult-CommandError-Type)+ - [QueryResult.Message.Level](#bytebase-v1-QueryResult-Message-Level)++ - [SQLService](#bytebase-v1-SQLService)++- [v1/plan_service.proto](#v1_plan_service-proto)+ - [CancelPlanCheckRunRequest](#bytebase-v1-CancelPlanCheckRunRequest)+ - [CancelPlanCheckRunResponse](#bytebase-v1-CancelPlanCheckRunResponse)+ - [CreatePlanRequest](#bytebase-v1-CreatePlanRequest)+ - [GetPlanCheckRunRequest](#bytebase-v1-GetPlanCheckRunRequest)+ - [GetPlanRequest](#bytebase-v1-GetPlanRequest)+ - [ListPlansRequest](#bytebase-v1-ListPlansRequest)+ - [ListPlansResponse](#bytebase-v1-ListPlansResponse)+ - [Plan](#bytebase-v1-Plan)+ - [Plan.ChangeDatabaseConfig](#bytebase-v1-Plan-ChangeDatabaseConfig)+ - [Plan.CreateDatabaseConfig](#bytebase-v1-Plan-CreateDatabaseConfig)+ - [Plan.ExportDataConfig](#bytebase-v1-Plan-ExportDataConfig)+ - [Plan.PlanCheckRunStatusCountEntry](#bytebase-v1-Plan-PlanCheckRunStatusCountEntry)+ - [Plan.RolloutStageSummary](#bytebase-v1-Plan-RolloutStageSummary)+ - [Plan.Spec](#bytebase-v1-Plan-Spec)+ - [Plan.TaskStatusCount](#bytebase-v1-Plan-TaskStatusCount)+ - [PlanCheckRun](#bytebase-v1-PlanCheckRun)+ - [PlanCheckRun.Result](#bytebase-v1-PlanCheckRun-Result)+ - [PlanCheckRun.Result.SqlReviewReport](#bytebase-v1-PlanCheckRun-Result-SqlReviewReport)+ - [PlanCheckRun.Result.SqlSummaryReport](#bytebase-v1-PlanCheckRun-Result-SqlSummaryReport)+ - [RunPlanChecksRequest](#bytebase-v1-RunPlanChecksRequest)+ - [RunPlanChecksResponse](#bytebase-v1-RunPlanChecksResponse)+ - [UpdatePlanRequest](#bytebase-v1-UpdatePlanRequest)++ - [PlanCheckRun.Result.Type](#bytebase-v1-PlanCheckRun-Result-Type)+ - [PlanCheckRun.Status](#bytebase-v1-PlanCheckRun-Status)++ - [PlanService](#bytebase-v1-PlanService)+- [v1/issue_service.proto](#v1_issue_service-proto)- [ApprovalFlow](#bytebase-v1-ApprovalFlow)- [ApprovalTemplate](#bytebase-v1-ApprovalTemplate)@@ -53,7 +302,7 @@- [IssueComment](#bytebase-v1-IssueComment)- [IssueComment.Approval](#bytebase-v1-IssueComment-Approval)- [IssueComment.IssueUpdate](#bytebase-v1-IssueComment-IssueUpdate)- - [IssueComment.PlanSpecUpdate](#bytebase-v1-IssueComment-PlanSpecUpdate)+ - [IssueComment.PlanUpdate](#bytebase-v1-IssueComment-PlanUpdate)- [ListIssueCommentsRequest](#bytebase-v1-ListIssueCommentsRequest)- [ListIssueCommentsResponse](#bytebase-v1-ListIssueCommentsResponse)- [ListIssuesRequest](#bytebase-v1-ListIssuesRequest)@@ -67,7 +316,6 @@- [UpdateIssueCommentRequest](#bytebase-v1-UpdateIssueCommentRequest)- [UpdateIssueRequest](#bytebase-v1-UpdateIssueRequest)- - [Issue.ApprovalStatus](#bytebase-v1-Issue-ApprovalStatus)- [Issue.Approver.Status](#bytebase-v1-Issue-Approver-Status)- [Issue.Type](#bytebase-v1-Issue-Type)- [IssueComment.Approval.Status](#bytebase-v1-IssueComment-Approval-Status)@@ -249,129 +497,6 @@- [DatabaseGroupService](#bytebase-v1-DatabaseGroupService)-- [v1/instance_role_service.proto](#v1_instance_role_service-proto)- - [InstanceRole](#bytebase-v1-InstanceRole)- - [ListInstanceRolesRequest](#bytebase-v1-ListInstanceRolesRequest)- - [ListInstanceRolesResponse](#bytebase-v1-ListInstanceRolesResponse)-- - [InstanceRoleService](#bytebase-v1-InstanceRoleService)--- [v1/instance_service.proto](#v1_instance_service-proto)- - [AddDataSourceRequest](#bytebase-v1-AddDataSourceRequest)- - [BatchSyncInstancesRequest](#bytebase-v1-BatchSyncInstancesRequest)- - [BatchSyncInstancesResponse](#bytebase-v1-BatchSyncInstancesResponse)- - [BatchUpdateInstancesRequest](#bytebase-v1-BatchUpdateInstancesRequest)- - [BatchUpdateInstancesResponse](#bytebase-v1-BatchUpdateInstancesResponse)- - [CreateInstanceRequest](#bytebase-v1-CreateInstanceRequest)- - [DataSource](#bytebase-v1-DataSource)- - [DataSource.AWSCredential](#bytebase-v1-DataSource-AWSCredential)- - [DataSource.Address](#bytebase-v1-DataSource-Address)- - [DataSource.AzureCredential](#bytebase-v1-DataSource-AzureCredential)- - [DataSource.ExtraConnectionParametersEntry](#bytebase-v1-DataSource-ExtraConnectionParametersEntry)- - [DataSource.GCPCredential](#bytebase-v1-DataSource-GCPCredential)- - [DataSourceExternalSecret](#bytebase-v1-DataSourceExternalSecret)- - [DataSourceExternalSecret.AppRoleAuthOption](#bytebase-v1-DataSourceExternalSecret-AppRoleAuthOption)- - [DeleteInstanceRequest](#bytebase-v1-DeleteInstanceRequest)- - [GetInstanceRequest](#bytebase-v1-GetInstanceRequest)- - [Instance](#bytebase-v1-Instance)- - [Instance.LabelsEntry](#bytebase-v1-Instance-LabelsEntry)- - [InstanceResource](#bytebase-v1-InstanceResource)- - [KerberosConfig](#bytebase-v1-KerberosConfig)- - [ListInstanceDatabaseRequest](#bytebase-v1-ListInstanceDatabaseRequest)- - [ListInstanceDatabaseResponse](#bytebase-v1-ListInstanceDatabaseResponse)- - [ListInstancesRequest](#bytebase-v1-ListInstancesRequest)- - [ListInstancesResponse](#bytebase-v1-ListInstancesResponse)- - [RemoveDataSourceRequest](#bytebase-v1-RemoveDataSourceRequest)- - [SASLConfig](#bytebase-v1-SASLConfig)- - [SyncInstanceRequest](#bytebase-v1-SyncInstanceRequest)- - [SyncInstanceResponse](#bytebase-v1-SyncInstanceResponse)- - [UndeleteInstanceRequest](#bytebase-v1-UndeleteInstanceRequest)- - [UpdateDataSourceRequest](#bytebase-v1-UpdateDataSourceRequest)- - [UpdateInstanceRequest](#bytebase-v1-UpdateInstanceRequest)-- - [DataSource.AuthenticationType](#bytebase-v1-DataSource-AuthenticationType)- - [DataSource.RedisType](#bytebase-v1-DataSource-RedisType)- - [DataSourceExternalSecret.AppRoleAuthOption.SecretType](#bytebase-v1-DataSourceExternalSecret-AppRoleAuthOption-SecretType)- - [DataSourceExternalSecret.AuthType](#bytebase-v1-DataSourceExternalSecret-AuthType)- - [DataSourceExternalSecret.SecretType](#bytebase-v1-DataSourceExternalSecret-SecretType)- - [DataSourceType](#bytebase-v1-DataSourceType)-- - [InstanceService](#bytebase-v1-InstanceService)--- [v1/database_service.proto](#v1_database_service-proto)- - [BatchGetDatabasesRequest](#bytebase-v1-BatchGetDatabasesRequest)- - [BatchGetDatabasesResponse](#bytebase-v1-BatchGetDatabasesResponse)- - [BatchSyncDatabasesRequest](#bytebase-v1-BatchSyncDatabasesRequest)- - [BatchSyncDatabasesResponse](#bytebase-v1-BatchSyncDatabasesResponse)- - [BatchUpdateDatabasesRequest](#bytebase-v1-BatchUpdateDatabasesRequest)- - [BatchUpdateDatabasesResponse](#bytebase-v1-BatchUpdateDatabasesResponse)- - [BoundingBox](#bytebase-v1-BoundingBox)- - [Changelog](#bytebase-v1-Changelog)- - [CheckConstraintMetadata](#bytebase-v1-CheckConstraintMetadata)- - [ColumnMetadata](#bytebase-v1-ColumnMetadata)- - [Database](#bytebase-v1-Database)- - [Database.LabelsEntry](#bytebase-v1-Database-LabelsEntry)- - [DatabaseMetadata](#bytebase-v1-DatabaseMetadata)- - [DatabaseSDLSchema](#bytebase-v1-DatabaseSDLSchema)- - [DatabaseSchema](#bytebase-v1-DatabaseSchema)- - [DependencyColumn](#bytebase-v1-DependencyColumn)- - [DependencyTable](#bytebase-v1-DependencyTable)- - [DiffSchemaRequest](#bytebase-v1-DiffSchemaRequest)- - [DiffSchemaResponse](#bytebase-v1-DiffSchemaResponse)- - [DimensionConstraint](#bytebase-v1-DimensionConstraint)- - [DimensionalConfig](#bytebase-v1-DimensionalConfig)- - [EnumTypeMetadata](#bytebase-v1-EnumTypeMetadata)- - [EventMetadata](#bytebase-v1-EventMetadata)- - [ExtensionMetadata](#bytebase-v1-ExtensionMetadata)- - [ExternalTableMetadata](#bytebase-v1-ExternalTableMetadata)- - [ForeignKeyMetadata](#bytebase-v1-ForeignKeyMetadata)- - [FunctionMetadata](#bytebase-v1-FunctionMetadata)- - [GenerationMetadata](#bytebase-v1-GenerationMetadata)- - [GetChangelogRequest](#bytebase-v1-GetChangelogRequest)- - [GetDatabaseMetadataRequest](#bytebase-v1-GetDatabaseMetadataRequest)- - [GetDatabaseRequest](#bytebase-v1-GetDatabaseRequest)- - [GetDatabaseSDLSchemaRequest](#bytebase-v1-GetDatabaseSDLSchemaRequest)- - [GetDatabaseSchemaRequest](#bytebase-v1-GetDatabaseSchemaRequest)- - [GetSchemaStringRequest](#bytebase-v1-GetSchemaStringRequest)- - [GetSchemaStringResponse](#bytebase-v1-GetSchemaStringResponse)- - [GridLevel](#bytebase-v1-GridLevel)- - [IndexMetadata](#bytebase-v1-IndexMetadata)- - [ListChangelogsRequest](#bytebase-v1-ListChangelogsRequest)- - [ListChangelogsResponse](#bytebase-v1-ListChangelogsResponse)- - [ListDatabasesRequest](#bytebase-v1-ListDatabasesRequest)- - [ListDatabasesResponse](#bytebase-v1-ListDatabasesResponse)- - [MaterializedViewMetadata](#bytebase-v1-MaterializedViewMetadata)- - [PackageMetadata](#bytebase-v1-PackageMetadata)- - [ProcedureMetadata](#bytebase-v1-ProcedureMetadata)- - [SchemaMetadata](#bytebase-v1-SchemaMetadata)- - [SequenceMetadata](#bytebase-v1-SequenceMetadata)- - [SpatialIndexConfig](#bytebase-v1-SpatialIndexConfig)- - [StorageConfig](#bytebase-v1-StorageConfig)- - [StreamMetadata](#bytebase-v1-StreamMetadata)- - [SyncDatabaseRequest](#bytebase-v1-SyncDatabaseRequest)- - [SyncDatabaseResponse](#bytebase-v1-SyncDatabaseResponse)- - [TableMetadata](#bytebase-v1-TableMetadata)- - [TablePartitionMetadata](#bytebase-v1-TablePartitionMetadata)- - [TaskMetadata](#bytebase-v1-TaskMetadata)- - [TessellationConfig](#bytebase-v1-TessellationConfig)- - [TriggerMetadata](#bytebase-v1-TriggerMetadata)- - [UpdateDatabaseRequest](#bytebase-v1-UpdateDatabaseRequest)- - [ViewMetadata](#bytebase-v1-ViewMetadata)-- - [Changelog.Status](#bytebase-v1-Changelog-Status)- - [ChangelogView](#bytebase-v1-ChangelogView)- - [ColumnMetadata.IdentityGeneration](#bytebase-v1-ColumnMetadata-IdentityGeneration)- - [GenerationMetadata.Type](#bytebase-v1-GenerationMetadata-Type)- - [GetDatabaseSDLSchemaRequest.SDLFormat](#bytebase-v1-GetDatabaseSDLSchemaRequest-SDLFormat)- - [GetSchemaStringRequest.ObjectType](#bytebase-v1-GetSchemaStringRequest-ObjectType)- - [StreamMetadata.Mode](#bytebase-v1-StreamMetadata-Mode)- - [StreamMetadata.Type](#bytebase-v1-StreamMetadata-Type)- - [SyncStatus](#bytebase-v1-SyncStatus)- - [TablePartitionMetadata.Type](#bytebase-v1-TablePartitionMetadata-Type)- - [TaskMetadata.State](#bytebase-v1-TaskMetadata-State)-- - [DatabaseService](#bytebase-v1-DatabaseService)-- [v1/group_service.proto](#v1_group_service-proto)- [BatchGetGroupsRequest](#bytebase-v1-BatchGetGroupsRequest)- [BatchGetGroupsResponse](#bytebase-v1-BatchGetGroupsResponse)@@ -436,131 +561,6 @@- [OrgPolicyService](#bytebase-v1-OrgPolicyService)-- [v1/rollout_service.proto](#v1_rollout_service-proto)- - [BatchCancelTaskRunsRequest](#bytebase-v1-BatchCancelTaskRunsRequest)- - [BatchCancelTaskRunsResponse](#bytebase-v1-BatchCancelTaskRunsResponse)- - [BatchRunTasksRequest](#bytebase-v1-BatchRunTasksRequest)- - [BatchRunTasksResponse](#bytebase-v1-BatchRunTasksResponse)- - [BatchSkipTasksRequest](#bytebase-v1-BatchSkipTasksRequest)- - [BatchSkipTasksResponse](#bytebase-v1-BatchSkipTasksResponse)- - [CreateRolloutRequest](#bytebase-v1-CreateRolloutRequest)- - [GetRolloutRequest](#bytebase-v1-GetRolloutRequest)- - [GetTaskRunLogRequest](#bytebase-v1-GetTaskRunLogRequest)- - [GetTaskRunRequest](#bytebase-v1-GetTaskRunRequest)- - [GetTaskRunSessionRequest](#bytebase-v1-GetTaskRunSessionRequest)- - [ListRolloutsRequest](#bytebase-v1-ListRolloutsRequest)- - [ListRolloutsResponse](#bytebase-v1-ListRolloutsResponse)- - [ListTaskRunsRequest](#bytebase-v1-ListTaskRunsRequest)- - [ListTaskRunsResponse](#bytebase-v1-ListTaskRunsResponse)- - [PreviewTaskRunRollbackRequest](#bytebase-v1-PreviewTaskRunRollbackRequest)- - [PreviewTaskRunRollbackResponse](#bytebase-v1-PreviewTaskRunRollbackResponse)- - [Rollout](#bytebase-v1-Rollout)- - [Stage](#bytebase-v1-Stage)- - [Task](#bytebase-v1-Task)- - [Task.DatabaseCreate](#bytebase-v1-Task-DatabaseCreate)- - [Task.DatabaseDataExport](#bytebase-v1-Task-DatabaseDataExport)- - [Task.DatabaseUpdate](#bytebase-v1-Task-DatabaseUpdate)- - [TaskRun](#bytebase-v1-TaskRun)- - [TaskRun.SchedulerInfo](#bytebase-v1-TaskRun-SchedulerInfo)- - [TaskRun.SchedulerInfo.WaitingCause](#bytebase-v1-TaskRun-SchedulerInfo-WaitingCause)- - [TaskRunLog](#bytebase-v1-TaskRunLog)- - [TaskRunLogEntry](#bytebase-v1-TaskRunLogEntry)- - [TaskRunLogEntry.CommandExecute](#bytebase-v1-TaskRunLogEntry-CommandExecute)- - [TaskRunLogEntry.CommandExecute.CommandResponse](#bytebase-v1-TaskRunLogEntry-CommandExecute-CommandResponse)- - [TaskRunLogEntry.ComputeDiff](#bytebase-v1-TaskRunLogEntry-ComputeDiff)- - [TaskRunLogEntry.DatabaseSync](#bytebase-v1-TaskRunLogEntry-DatabaseSync)- - [TaskRunLogEntry.GhostMigration](#bytebase-v1-TaskRunLogEntry-GhostMigration)- - [TaskRunLogEntry.PriorBackup](#bytebase-v1-TaskRunLogEntry-PriorBackup)- - [TaskRunLogEntry.PriorBackup.PriorBackupDetail](#bytebase-v1-TaskRunLogEntry-PriorBackup-PriorBackupDetail)- - [TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item](#bytebase-v1-TaskRunLogEntry-PriorBackup-PriorBackupDetail-Item)- - [TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item.Table](#bytebase-v1-TaskRunLogEntry-PriorBackup-PriorBackupDetail-Item-Table)- - [TaskRunLogEntry.ReleaseFileExecute](#bytebase-v1-TaskRunLogEntry-ReleaseFileExecute)- - [TaskRunLogEntry.RetryInfo](#bytebase-v1-TaskRunLogEntry-RetryInfo)- - [TaskRunLogEntry.SchemaDump](#bytebase-v1-TaskRunLogEntry-SchemaDump)- - [TaskRunLogEntry.TransactionControl](#bytebase-v1-TaskRunLogEntry-TransactionControl)- - [TaskRunSession](#bytebase-v1-TaskRunSession)- - [TaskRunSession.Postgres](#bytebase-v1-TaskRunSession-Postgres)- - [TaskRunSession.Postgres.Session](#bytebase-v1-TaskRunSession-Postgres-Session)-- - [Task.Status](#bytebase-v1-Task-Status)- - [Task.Type](#bytebase-v1-Task-Type)- - [TaskRun.ExportArchiveStatus](#bytebase-v1-TaskRun-ExportArchiveStatus)- - [TaskRun.Status](#bytebase-v1-TaskRun-Status)- - [TaskRunLogEntry.TransactionControl.Type](#bytebase-v1-TaskRunLogEntry-TransactionControl-Type)- - [TaskRunLogEntry.Type](#bytebase-v1-TaskRunLogEntry-Type)-- - [RolloutService](#bytebase-v1-RolloutService)--- [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)- - [DiffMetadataRequest](#bytebase-v1-DiffMetadataRequest)- - [DiffMetadataResponse](#bytebase-v1-DiffMetadataResponse)- - [ExportRequest](#bytebase-v1-ExportRequest)- - [ExportResponse](#bytebase-v1-ExportResponse)- - [MaskingReason](#bytebase-v1-MaskingReason)- - [QueryHistory](#bytebase-v1-QueryHistory)- - [QueryOption](#bytebase-v1-QueryOption)- - [QueryRequest](#bytebase-v1-QueryRequest)- - [QueryResponse](#bytebase-v1-QueryResponse)- - [QueryResult](#bytebase-v1-QueryResult)- - [QueryResult.CommandError](#bytebase-v1-QueryResult-CommandError)- - [QueryResult.Message](#bytebase-v1-QueryResult-Message)- - [QueryResult.PostgresError](#bytebase-v1-QueryResult-PostgresError)- - [QueryResult.SyntaxError](#bytebase-v1-QueryResult-SyntaxError)- - [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)- - [Advice.RuleType](#bytebase-v1-Advice-RuleType)- - [QueryHistory.Type](#bytebase-v1-QueryHistory-Type)- - [QueryOption.MSSQLExplainFormat](#bytebase-v1-QueryOption-MSSQLExplainFormat)- - [QueryOption.RedisRunCommandsOn](#bytebase-v1-QueryOption-RedisRunCommandsOn)- - [QueryResult.CommandError.Type](#bytebase-v1-QueryResult-CommandError-Type)- - [QueryResult.Message.Level](#bytebase-v1-QueryResult-Message-Level)-- - [SQLService](#bytebase-v1-SQLService)--- [v1/plan_service.proto](#v1_plan_service-proto)- - [CancelPlanCheckRunRequest](#bytebase-v1-CancelPlanCheckRunRequest)- - [CancelPlanCheckRunResponse](#bytebase-v1-CancelPlanCheckRunResponse)- - [CreatePlanRequest](#bytebase-v1-CreatePlanRequest)- - [GetPlanCheckRunRequest](#bytebase-v1-GetPlanCheckRunRequest)- - [GetPlanRequest](#bytebase-v1-GetPlanRequest)- - [ListPlansRequest](#bytebase-v1-ListPlansRequest)- - [ListPlansResponse](#bytebase-v1-ListPlansResponse)- - [Plan](#bytebase-v1-Plan)- - [Plan.ChangeDatabaseConfig](#bytebase-v1-Plan-ChangeDatabaseConfig)- - [Plan.CreateDatabaseConfig](#bytebase-v1-Plan-CreateDatabaseConfig)- - [Plan.ExportDataConfig](#bytebase-v1-Plan-ExportDataConfig)- - [Plan.PlanCheckRunStatusCountEntry](#bytebase-v1-Plan-PlanCheckRunStatusCountEntry)- - [Plan.RolloutStageSummary](#bytebase-v1-Plan-RolloutStageSummary)- - [Plan.Spec](#bytebase-v1-Plan-Spec)- - [Plan.TaskStatusCount](#bytebase-v1-Plan-TaskStatusCount)- - [PlanCheckRun](#bytebase-v1-PlanCheckRun)- - [PlanCheckRun.Result](#bytebase-v1-PlanCheckRun-Result)- - [PlanCheckRun.Result.SqlReviewReport](#bytebase-v1-PlanCheckRun-Result-SqlReviewReport)- - [PlanCheckRun.Result.SqlSummaryReport](#bytebase-v1-PlanCheckRun-Result-SqlSummaryReport)- - [RunPlanChecksRequest](#bytebase-v1-RunPlanChecksRequest)- - [RunPlanChecksResponse](#bytebase-v1-RunPlanChecksResponse)- - [UpdatePlanRequest](#bytebase-v1-UpdatePlanRequest)-- - [PlanCheckRun.Result.Type](#bytebase-v1-PlanCheckRun-Result-Type)- - [PlanCheckRun.Status](#bytebase-v1-PlanCheckRun-Status)-- - [PlanService](#bytebase-v1-PlanService)-- [v1/project_service.proto](#v1_project_service-proto)- [Activity](#bytebase-v1-Activity)- [AddWebhookRequest](#bytebase-v1-AddWebhookRequest)@@ -1073,6 +1073,24 @@ Check the documentation of the field using Range for specific semantics.+<a name="bytebase-v1-ApprovalStatus"></a>++### ApprovalStatus+Approval workflow status for an issue or a plan.+Lives at the top level so both plan_service.proto and issue_service.proto+can reference it without a circular import.++| Name | Number | Description |+| ---- | ------ | ----------- |+| APPROVAL_STATUS_UNSPECIFIED | 0 | Unspecified approval status. |+| CHECKING | 1 | Approval checks are being evaluated. |+| PENDING | 2 | Approval is pending. |+| APPROVED | 3 | Issue has been approved. |+| REJECTED | 4 | Issue has been rejected. |+| SKIPPED | 5 | Approval was skipped. |+++<a name="bytebase-v1-Engine"></a>### Engine@@ -1243,82 +1261,87 @@ Webhook integration type.-<a name="v1_issue_service-proto"></a>+<a name="v1_rollout_service-proto"></a><p align="right"><a href="#top">Top</a></p>-## v1/issue_service.proto+## v1/rollout_service.proto-<a name="bytebase-v1-ApprovalFlow"></a>+<a name="bytebase-v1-BatchCancelTaskRunsRequest"></a>-### ApprovalFlow+### BatchCancelTaskRunsRequest| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| roles | [string](#string) | repeated | The roles required for approval in order. |--+| parent | [string](#string) | | The task name for the taskRuns. Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task} Use `projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/-` to cancel task runs under the same stage. |+| task_runs | [string](#string) | repeated | The taskRuns to cancel. Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun} |-<a name="bytebase-v1-ApprovalTemplate"></a>-### ApprovalTemplate+<a name="bytebase-v1-BatchCancelTaskRunsResponse"></a>+### BatchCancelTaskRunsResponse-| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| flow | [ApprovalFlow](#bytebase-v1-ApprovalFlow) | | The approval flow definition. |-| title | [string](#string) | | The title of the approval template. |-| description | [string](#string) | | The description of the approval template. |-<a name="bytebase-v1-ApproveIssueRequest"></a>+<a name="bytebase-v1-BatchRunTasksRequest"></a>-### ApproveIssueRequest+### BatchRunTasksRequest| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The name of the issue to add an approver. Format: projects/{project}/issues/{issue} |-| comment | [string](#string) | | The comment explaining the approval decision. |+| parent | [string](#string) | | The stage name for the tasks. Format: projects/{project}/plans/{plan}/rollout/stages/{stage} |+| tasks | [string](#string) | repeated | The tasks to run. Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task} |+| run_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | optional | The task run should run after run_time. |+| skip_prior_backup | [bool](#bool) | | If true, skip prior backup for this run even if the task has prior backup enabled. |-<a name="bytebase-v1-BatchUpdateIssuesStatusRequest"></a>+<a name="bytebase-v1-BatchRunTasksResponse"></a>-### BatchUpdateIssuesStatusRequest+### BatchRunTasksResponse++++++++<a name="bytebase-v1-BatchSkipTasksRequest"></a>++### BatchSkipTasksRequest| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| parent | [string](#string) | | The parent resource shared by all issues being updated. Format: projects/{project} If the operation spans parents, a dash (-) may be accepted as a wildcard. We only support updating the status of databases for now. |-| issues | [string](#string) | repeated | The list of issues to update. Format: projects/{project}/issues/{issue} |-| status | [IssueStatus](#bytebase-v1-IssueStatus) | | The new status. |-| reason | [string](#string) | | The reason for the status change. |+| parent | [string](#string) | | The stage name for the tasks. Format: projects/{project}/plans/{plan}/rollout/stages/{stage} |+| tasks | [string](#string) | repeated | The tasks to skip. Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task} |+| reason | [string](#string) | | The reason for skipping the tasks. |-<a name="bytebase-v1-BatchUpdateIssuesStatusResponse"></a>+<a name="bytebase-v1-BatchSkipTasksResponse"></a>-### BatchUpdateIssuesStatusResponse+### BatchSkipTasksResponse@@ -1326,2762 +1349,2891 @@ Webhook integration type.-<a name="bytebase-v1-CreateIssueCommentRequest"></a>+<a name="bytebase-v1-CreateRolloutRequest"></a>-### CreateIssueCommentRequest+### CreateRolloutRequest| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| parent | [string](#string) | | The issue name Format: projects/{project}/issues/{issue} |-| issue_comment | [IssueComment](#bytebase-v1-IssueComment) | | The comment to create. |+| parent | [string](#string) | | The parent plan for which this rollout will be created. Format: projects/{project}/plans/{plan} |+| target | [string](#string) | optional | Create the rollout only for the specified target. Format: environments/{environment} If unspecified, all stages are created. If set to "", no stages are created. |-<a name="bytebase-v1-CreateIssueRequest"></a>+<a name="bytebase-v1-GetRolloutRequest"></a>-### CreateIssueRequest+### GetRolloutRequest| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| parent | [string](#string) | | The parent, which owns this collection of issues. Format: projects/{project} |-| issue | [Issue](#bytebase-v1-Issue) | | The issue to create. |+| name | [string](#string) | | The name of the rollout to retrieve. This is the rollout resource name, which is the plan name plus /rollout suffix. Format: projects/{project}/plans/{plan}/rollout |-<a name="bytebase-v1-GetIssueRequest"></a>+<a name="bytebase-v1-GetTaskRunLogRequest"></a>-### GetIssueRequest+### GetTaskRunLogRequest| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The name of the issue to retrieve. Format: projects/{project}/issues/{issue} |-| force | [bool](#bool) | | If set to true, bypass cache and fetch the latest data. |+| parent | [string](#string) | | Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun} |-<a name="bytebase-v1-Issue"></a>+<a name="bytebase-v1-GetTaskRunRequest"></a>-### Issue+### GetTaskRunRequest| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The name of the issue. Format: projects/{project}/issues/{issue} |-| title | [string](#string) | | The title of the issue. |-| description | [string](#string) | | The description of the issue. |-| type | [Issue.Type](#bytebase-v1-Issue-Type) | | |-| status | [IssueStatus](#bytebase-v1-IssueStatus) | | The status of the issue. |-| approvers | [Issue.Approver](#bytebase-v1-Issue-Approver) | repeated | |-| approval_template | [ApprovalTemplate](#bytebase-v1-ApprovalTemplate) | | The approval template for the issue. |-| creator | [string](#string) | | Format: users/[email protected] |-| create_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |-| update_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |-| plan | [string](#string) | | The plan associated with the issue. Can be empty. Format: projects/{project}/plans/{plan} |-| role_grant | [RoleGrant](#bytebase-v1-RoleGrant) | | Used if the issue type is ROLE_GRANT. |-| risk_level | [RiskLevel](#bytebase-v1-RiskLevel) | | The risk level of the issue. |-| labels | [string](#string) | repeated | Labels attached to the issue for categorization and filtering. |-| approval_status | [Issue.ApprovalStatus](#bytebase-v1-Issue-ApprovalStatus) | | |-| access_grant | [string](#string) | | The access grant associated with this issue. Format: projects/{project}/accessGrants/{access_grant} |+| name | [string](#string) | | Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun} |-<a name="bytebase-v1-Issue-Approver"></a>+<a name="bytebase-v1-GetTaskRunSessionRequest"></a>++### GetTaskRunSessionRequest-### Issue.Approver-Approvers and their approval status for the issue.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| status | [Issue.Approver.Status](#bytebase-v1-Issue-Approver-Status) | | The new status. |-| principal | [string](#string) | | Format: users/[email protected] |+| parent | [string](#string) | | Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun} |-<a name="bytebase-v1-IssueComment"></a>+<a name="bytebase-v1-ListRolloutsRequest"></a>++### ListRolloutsRequest-### IssueComment-A comment on an issue.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | Format: projects/{project}/issues/{issue}/issueComments/{issueComment-uid} |-| comment | [string](#string) | | The text content of the comment. |-| payload | [string](#string) | | TODO: use struct message instead. |-| create_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |-| update_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |-| creator | [string](#string) | | Format: users/{email} |-| approval | [IssueComment.Approval](#bytebase-v1-IssueComment-Approval) | | Approval event. |-| issue_update | [IssueComment.IssueUpdate](#bytebase-v1-IssueComment-IssueUpdate) | | Issue update event. |-| plan_spec_update | [IssueComment.PlanSpecUpdate](#bytebase-v1-IssueComment-PlanSpecUpdate) | | Plan spec update event. |+| parent | [string](#string) | | The parent, which owns this collection of rollouts. Format: projects/{project} Use "projects/-" to list all rollouts from all projects. |+| page_size | [int32](#int32) | | The maximum number of rollouts to return. The service may return fewer than this value. If unspecified, at most 10 rollouts 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 `ListRollouts` call. Provide this to retrieve the subsequent page.+When paginating, all other parameters provided to `ListRollouts` must match the call that provided the page token. |+| filter | [string](#string) | | Filter is used to filter rollouts returned in the list. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec+Supported filters: - update_time: rollout update time in "2006-01-02T15:04:05Z07:00" format, support ">=" or "<=" operator. - task_type: the task type, support "in" operator, check the Task.Type enum for the values.+For example: update_time >= "2025-01-02T15:04:05Z07:00" task_type in ["DATABASE_MIGRATE", "DATABASE_EXPORT"] |-<a name="bytebase-v1-IssueComment-Approval"></a>-### IssueComment.Approval-Approval event information.+++<a name="bytebase-v1-ListRolloutsResponse"></a>++### ListRolloutsResponse+| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| status | [IssueComment.Approval.Status](#bytebase-v1-IssueComment-Approval-Status) | | The approval status. |+| rollouts | [Rollout](#bytebase-v1-Rollout) | repeated | The rollouts 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-IssueComment-IssueUpdate"></a>+<a name="bytebase-v1-ListTaskRunsRequest"></a>++### ListTaskRunsRequest-### IssueComment.IssueUpdate-Issue update event information.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| from_title | [string](#string) | optional | |-| to_title | [string](#string) | optional | |-| from_description | [string](#string) | optional | |-| to_description | [string](#string) | optional | |-| from_status | [IssueStatus](#bytebase-v1-IssueStatus) | optional | |-| to_status | [IssueStatus](#bytebase-v1-IssueStatus) | optional | |-| from_labels | [string](#string) | repeated | |-| to_labels | [string](#string) | repeated | |+| parent | [string](#string) | | The parent, which owns this collection of taskRuns. Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task} Use "projects/{project}/plans/{plan}/rollout/stages/-/tasks/-" to list all taskRuns from a rollout. |++<a name="bytebase-v1-ListTaskRunsResponse"></a>-<a name="bytebase-v1-IssueComment-PlanSpecUpdate"></a>+### ListTaskRunsResponse-### IssueComment.PlanSpecUpdate-Plan spec update event information (tracks sheet changes to plan specs).| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| spec | [string](#string) | | The spec that was updated. Format: projects/{project}/plans/{plan}/specs/{spec} |-| from_sheet | [string](#string) | optional | The previous sheet. Format: projects/{project}/sheets/{sheet} |-| to_sheet | [string](#string) | optional | The new sheet. Format: projects/{project}/sheets/{sheet} |+| task_runs | [TaskRun](#bytebase-v1-TaskRun) | repeated | The taskRuns from the specified request. |-<a name="bytebase-v1-ListIssueCommentsRequest"></a>+<a name="bytebase-v1-PreviewTaskRunRollbackRequest"></a>-### ListIssueCommentsRequest+### PreviewTaskRunRollbackRequest| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| parent | [string](#string) | | Format: projects/{projects}/issues/{issue} |-| page_size | [int32](#int32) | | The maximum number of issue comments to return. The service may return fewer than this value. If unspecified, at most 10 issue comments 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 `ListIssueComments` call. Provide this to retrieve the subsequent page.--When paginating, all other parameters provided to `ListIssueComments` must match the call that provided the page token. |+| name | [string](#string) | | Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun} |-<a name="bytebase-v1-ListIssueCommentsResponse"></a>+<a name="bytebase-v1-PreviewTaskRunRollbackResponse"></a>-### ListIssueCommentsResponse+### PreviewTaskRunRollbackResponse| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| issue_comments | [IssueComment](#bytebase-v1-IssueComment) | repeated | The issue comments 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. |+| statement | [string](#string) | | The rollback SQL statement that would undo the task run. |-<a name="bytebase-v1-ListIssuesRequest"></a>+<a name="bytebase-v1-Rollout"></a>-### ListIssuesRequest+### Rollout| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| parent | [string](#string) | | The parent, which owns this collection of issues. Format: projects/{project} |-| page_size | [int32](#int32) | | The maximum number of issues to return. The service may return fewer than this value. If unspecified, at most 10 issues 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 `ListIssues` call. Provide this to retrieve the subsequent page.--When paginating, all other parameters provided to `ListIssues` must match the call that provided the page token. |-| filter | [string](#string) | | Filter is used to filter issues returned in the list. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec--Supported filters: - creator: issue creator full name in "users/{email or id}" format, support "==" operator. - status: the issue status, support "==" and "in" operator, check the IssueStatus enum for the values. - create_time: issue create time in "2006-01-02T15:04:05Z07:00" format, support ">=" or "<=" operator. - type: the issue type, support "==" and "in" operator, check the Type enum in the Issue message for the values. - labels: the issue labels, support "==" and "in" operator. - risk_level: the issue risk level, support "in" operator, check the RiskLevel enum for the values. - approval_status: issue approval status, support "==" operator. - current_approver: the issue approver, should in "users/{email} format", support "==" operator.--For example: creator == "users/[email protected]" && status in ["OPEN", "DONE"] status == "CANCELED" && type == "DATABASE_CHANGE" labels in ["label1", "label2"] risk_level in ["HIGH", "MODERATE"] create_time >= "2025-01-02T15:04:05Z07:00" |-| query | [string](#string) | | Query is the query statement. |-| order_by | [string](#string) | | The order by of issues. Support: - create_time - update_time The default sorting order is ascending. For example: - order_by = "create_time desc" - order_by = "update_time asc" |+| name | [string](#string) | | The resource name of the rollout. Format: projects/{project}/plans/{plan}/rollout |+| title | [string](#string) | | The title of the rollout, inherited from the associated plan. This field is output only and cannot be directly set. |+| stages | [Stage](#bytebase-v1-Stage) | repeated | Stages and thus tasks of the rollout. |+| create_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |+| update_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |-<a name="bytebase-v1-ListIssuesResponse"></a>+<a name="bytebase-v1-Stage"></a>-### ListIssuesResponse+### Stage| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| issues | [Issue](#bytebase-v1-Issue) | repeated | The issues 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. |+| name | [string](#string) | | Format: projects/{project}/plans/{plan}/rollout/stages/{stage} Use "-" for {stage} when the stage has no environment or deleted environment. |+| id | [string](#string) | | id is the environment id of the stage. e.g., "prod". Use "-" when the stage has no environment or deleted environment. |+| environment | [string](#string) | | environment is the environment of the stage. Format: environments/{environment} for valid environments, or "environments/-" for stages without environment or with deleted environments. |+| tasks | [Task](#bytebase-v1-Task) | repeated | The tasks within this stage. |-<a name="bytebase-v1-RejectIssueRequest"></a>+<a name="bytebase-v1-Task"></a>-### RejectIssueRequest+### Task| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The name of the issue to add a rejection. Format: projects/{project}/issues/{issue} |-| comment | [string](#string) | | The comment explaining the rejection decision. |-+| name | [string](#string) | | Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task} |+| spec_id | [string](#string) | | A UUID4 string that uniquely identifies the Spec. |+| status | [Task.Status](#bytebase-v1-Task-Status) | | Status is the status of the task. |+| skipped_reason | [string](#string) | | The reason why the task was skipped. |+| type | [Task.Type](#bytebase-v1-Task-Type) | | |+| target | [string](#string) | | Format: instances/{instance} if the task is DatabaseCreate. Format: instances/{instance}/databases/{database} |+| database_create | [Task.DatabaseCreate](#bytebase-v1-Task-DatabaseCreate) | | |+| database_update | [Task.DatabaseUpdate](#bytebase-v1-Task-DatabaseUpdate) | | |+| database_data_export | [Task.DatabaseDataExport](#bytebase-v1-Task-DatabaseDataExport) | | |+| update_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | optional | The update_time is the update time of latest task run. If there are no task runs, it will be empty. |+| run_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | optional | The run_time is the scheduled run time of latest task run. If there are no task runs or the task run is not scheduled, it will be empty. |-<a name="bytebase-v1-RequestIssueRequest"></a>-### RequestIssueRequest+<a name="bytebase-v1-Task-DatabaseCreate"></a>+### Task.DatabaseCreate+Payload for creating a new database.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The name of the issue to request a issue. Format: projects/{project}/issues/{issue} |-| comment | [string](#string) | | The comment explaining the request. |-+| sheet | [string](#string) | | Format: projects/{project}/sheets/{sheet} |-<a name="bytebase-v1-RetryIssueApprovalRequest"></a>-### RetryIssueApprovalRequest+<a name="bytebase-v1-Task-DatabaseDataExport"></a>+### Task.DatabaseDataExport+Payload for exporting database data.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The name of the issue whose approval-finding should be retried. Format: projects/{project}/issues/{issue} |-+| sheet | [string](#string) | | The resource name of the sheet. Format: projects/{project}/sheets/{sheet} |-<a name="bytebase-v1-RoleGrant"></a>-### RoleGrant+<a name="bytebase-v1-Task-DatabaseUpdate"></a>+### Task.DatabaseUpdate+Payload for updating a database schema.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| role | [string](#string) | | The requested role. Format: roles/EXPORTER. |-| user | [string](#string) | | The user to be granted. Format: users/{email}. |-| condition | [google.type.Expr](#google-type-Expr) | | The condition for the role. Same as the condition in IAM Binding message. |-| expiration | [google.protobuf.Duration](#google-protobuf-Duration) | | The duration for which the grant is valid. |+| sheet | [string](#string) | | Format: projects/{project}/sheets/{sheet} |+| release | [string](#string) | | Format: projects/{project}/releases/{release} |-<a name="bytebase-v1-SearchIssuesRequest"></a>+<a name="bytebase-v1-TaskRun"></a>-### SearchIssuesRequest+### TaskRun| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| parent | [string](#string) | | The parent, which owns this collection of issues. Format: projects/{project} Use "projects/-" to list all issues from all projects. |-| page_size | [int32](#int32) | | The maximum number of issues to return. The service may return fewer than this value. If unspecified, at most 10 issues 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 `SearchIssues` call. Provide this to retrieve the subsequent page.--When paginating, all other parameters provided to `SearchIssues` must match the call that provided the page token. |-| filter | [string](#string) | | Filter is used to filter issues returned in the list. Check the filter field in the ListIssuesRequest message. |-| query | [string](#string) | | Query is the query statement. |-| order_by | [string](#string) | | The order by of issues. Support: - create_time - update_time The default sorting order is ascending. For example: - order_by = "create_time desc" - order_by = "update_time asc" |-+| name | [string](#string) | | Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun} |+| creator | [string](#string) | | Format: users/[email protected] |+| create_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |+| update_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |+| status | [TaskRun.Status](#bytebase-v1-TaskRun-Status) | | The current execution status of the task run. |+| detail | [string](#string) | | Below are the results of a task run. Detailed information about the task run result. |+| start_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | The time when the task run started execution. |+| export_archive_status | [TaskRun.ExportArchiveStatus](#bytebase-v1-TaskRun-ExportArchiveStatus) | | The export archive status for data export tasks. |+| has_prior_backup | [bool](#bool) | | Indicates whether a prior backup was created for this task run. When true, rollback SQL can be generated via PreviewTaskRunRollback. Backup details are available in the task run logs. |+| scheduler_info | [TaskRun.SchedulerInfo](#bytebase-v1-TaskRun-SchedulerInfo) | | Scheduling information about the task run. |+| run_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | optional | The task run should run after run_time. This can only be set when creating the task run calling BatchRunTasks. |-<a name="bytebase-v1-SearchIssuesResponse"></a>-### SearchIssuesResponse+<a name="bytebase-v1-TaskRun-SchedulerInfo"></a>+### TaskRun.SchedulerInfo+Information about task run scheduling.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| issues | [Issue](#bytebase-v1-Issue) | repeated | The issues 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. |-+| report_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | The time when the scheduling info was reported. |+| waiting_cause | [TaskRun.SchedulerInfo.WaitingCause](#bytebase-v1-TaskRun-SchedulerInfo-WaitingCause) | | The cause for the task run waiting. |-<a name="bytebase-v1-UpdateIssueCommentRequest"></a>-### UpdateIssueCommentRequest+<a name="bytebase-v1-TaskRun-SchedulerInfo-WaitingCause"></a>+### TaskRun.SchedulerInfo.WaitingCause+Information about why a task run is waiting.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| parent | [string](#string) | | The issue name Format: projects/{project}/issues/{issue} |-| issue_comment | [IssueComment](#bytebase-v1-IssueComment) | | The comment to update. |-| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | The list of fields to update. |-| allow_missing | [bool](#bool) | | If set to true, and the issue comment is not found, a new issue comment will be created. In this situation, `update_mask` is ignored. |+| parallel_tasks_limit | [bool](#bool) | | Waiting due to parallel tasks limit. |-<a name="bytebase-v1-UpdateIssueRequest"></a>+<a name="bytebase-v1-TaskRunLog"></a>-### UpdateIssueRequest+### TaskRunLog| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| issue | [Issue](#bytebase-v1-Issue) | | The issue to update.--The issue's `name` field is used to identify the issue to update. Format: projects/{project}/issues/{issue} |-| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | The list of fields to update. |-| allow_missing | [bool](#bool) | | If set to true, and the issue is not found, a new issue will be created. In this situation, `update_mask` is ignored. |--+| name | [string](#string) | | Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun}/log |+| entries | [TaskRunLogEntry](#bytebase-v1-TaskRunLogEntry) | repeated | The log entries for this task run. |--<a name="bytebase-v1-Issue-ApprovalStatus"></a>-### Issue.ApprovalStatus-The overall approval status for the issue.+<a name="bytebase-v1-TaskRunLogEntry"></a>-| Name | Number | Description |-| ---- | ------ | ----------- |-| APPROVAL_STATUS_UNSPECIFIED | 0 | Unspecified approval status. |-| CHECKING | 1 | Approval checks are being evaluated. |-| PENDING | 2 | Approval is pending. |-| APPROVED | 3 | Issue has been approved. |-| REJECTED | 4 | Issue has been rejected. |-| SKIPPED | 5 | Approval was skipped. |+### TaskRunLogEntry-<a name="bytebase-v1-Issue-Approver-Status"></a>+| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| type | [TaskRunLogEntry.Type](#bytebase-v1-TaskRunLogEntry-Type) | | The type of this log entry. |+| log_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | The time when the log was recorded. |+| replica_id | [string](#string) | | The replica ID for this log entry. |+| schema_dump | [TaskRunLogEntry.SchemaDump](#bytebase-v1-TaskRunLogEntry-SchemaDump) | | Schema dump details (if type is SCHEMA_DUMP). |+| command_execute | [TaskRunLogEntry.CommandExecute](#bytebase-v1-TaskRunLogEntry-CommandExecute) | | Command execution details (if type is COMMAND_EXECUTE). |+| database_sync | [TaskRunLogEntry.DatabaseSync](#bytebase-v1-TaskRunLogEntry-DatabaseSync) | | Database sync details (if type is DATABASE_SYNC). |+| transaction_control | [TaskRunLogEntry.TransactionControl](#bytebase-v1-TaskRunLogEntry-TransactionControl) | | Transaction control details (if type is TRANSACTION_CONTROL). |+| prior_backup | [TaskRunLogEntry.PriorBackup](#bytebase-v1-TaskRunLogEntry-PriorBackup) | | Prior backup details (if type is PRIOR_BACKUP). |+| retry_info | [TaskRunLogEntry.RetryInfo](#bytebase-v1-TaskRunLogEntry-RetryInfo) | | Retry information details (if type is RETRY_INFO). |+| compute_diff | [TaskRunLogEntry.ComputeDiff](#bytebase-v1-TaskRunLogEntry-ComputeDiff) | | Compute diff details (if type is COMPUTE_DIFF). |+| release_file_execute | [TaskRunLogEntry.ReleaseFileExecute](#bytebase-v1-TaskRunLogEntry-ReleaseFileExecute) | | Release file execution details (if type is RELEASE_FILE_EXECUTE). |+| ghost_migration | [TaskRunLogEntry.GhostMigration](#bytebase-v1-TaskRunLogEntry-GhostMigration) | | gh-ost migration details (if type is GHOST_MIGRATION). |-### Issue.Approver.Status-The approval status of an approver.-| Name | Number | Description |-| ---- | ------ | ----------- |-| STATUS_UNSPECIFIED | 0 | Unspecified status. |-| PENDING | 1 | Awaiting approval. |-| APPROVED | 2 | Approved. |-| REJECTED | 3 | Rejected. |-<a name="bytebase-v1-Issue-Type"></a>-### Issue.Type-The type of issue.+<a name="bytebase-v1-TaskRunLogEntry-CommandExecute"></a>-| Name | Number | Description |-| ---- | ------ | ----------- |-| TYPE_UNSPECIFIED | 0 | Unspecified issue type. |-| DATABASE_CHANGE | 1 | Database schema or data change. |-| ROLE_GRANT | 2 | Role grant request. |-| DATABASE_EXPORT | 3 | Database data export request. |-| ACCESS_GRANT | 4 | Temporary access grant request. |+### TaskRunLogEntry.CommandExecute+Command execution details.+| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| log_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | When the command was logged. |+| range | [Range](#bytebase-v1-Range) | | The byte offset range of the executed command in the sheet. Uses byte offsets (not character indices) for efficient slicing of sheet content bytes. Example: For "SELECT 你好;" in a UTF-8 sheet, range [0, 13) represents all 13 bytes. |+| statement | [string](#string) | | The executed statement. |+| response | [TaskRunLogEntry.CommandExecute.CommandResponse](#bytebase-v1-TaskRunLogEntry-CommandExecute-CommandResponse) | | The response from executing the command. |-<a name="bytebase-v1-IssueComment-Approval-Status"></a>-### IssueComment.Approval.Status-Approval status values.-| Name | Number | Description |-| ---- | ------ | ----------- |-| STATUS_UNSPECIFIED | 0 | Unspecified status. |-| PENDING | 1 | Approval pending. |-| APPROVED | 2 | Approved. |-| REJECTED | 3 | Rejected. |-<a name="bytebase-v1-IssueStatus"></a>+<a name="bytebase-v1-TaskRunLogEntry-CommandExecute-CommandResponse"></a>-### IssueStatus-The status of an issue.+### TaskRunLogEntry.CommandExecute.CommandResponse+Command execution response.-| Name | Number | Description |-| ---- | ------ | ----------- |-| ISSUE_STATUS_UNSPECIFIED | 0 | Unspecified status. |-| OPEN | 1 | Issue is open and active. |-| DONE | 2 | Issue is completed. |-| CANCELED | 3 | Issue is canceled. |+| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| log_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | When the response was logged. |+| error | [string](#string) | | Error message if command execution failed. |+| affected_rows | [int64](#int64) | | Total affected rows. |+| all_affected_rows | [int64](#int64) | repeated | `all_affected_rows` is the affected rows of each command. `all_affected_rows` may be unavailable if the database driver doesn't support it. Caller should fallback to `affected_rows` in that case. |---<a name="bytebase-v1-IssueService"></a>-### IssueService-IssueService manages issues for tracking database changes and tasks.-| Method Name | Request Type | Response Type | Description |-| ----------- | ------------ | ------------- | ------------|-| GetIssue | [GetIssueRequest](#bytebase-v1-GetIssueRequest) | [Issue](#bytebase-v1-Issue) | Retrieves an issue by name. Permissions required: bb.issues.get |-| CreateIssue | [CreateIssueRequest](#bytebase-v1-CreateIssueRequest) | [Issue](#bytebase-v1-Issue) | Creates a new issue for database changes or tasks. Permissions required: bb.issues.create |-| ListIssues | [ListIssuesRequest](#bytebase-v1-ListIssuesRequest) | [ListIssuesResponse](#bytebase-v1-ListIssuesResponse) | Lists issues in a project. Permissions required: bb.issues.list |-| SearchIssues | [SearchIssuesRequest](#bytebase-v1-SearchIssuesRequest) | [SearchIssuesResponse](#bytebase-v1-SearchIssuesResponse) | Search for issues that the caller has the bb.issues.get permission on and also satisfy the specified filter & query. Permissions required: bb.issues.get |-| UpdateIssue | [UpdateIssueRequest](#bytebase-v1-UpdateIssueRequest) | [Issue](#bytebase-v1-Issue) | Updates an issue's properties such as title, description, or labels. Permissions required: bb.issues.update |-| ListIssueComments | [ListIssueCommentsRequest](#bytebase-v1-ListIssueCommentsRequest) | [ListIssueCommentsResponse](#bytebase-v1-ListIssueCommentsResponse) | Lists comments on an issue. Permissions required: bb.issueComments.list |-| CreateIssueComment | [CreateIssueCommentRequest](#bytebase-v1-CreateIssueCommentRequest) | [IssueComment](#bytebase-v1-IssueComment) | Adds a comment to an issue. Permissions required: bb.issueComments.create |-| UpdateIssueComment | [UpdateIssueCommentRequest](#bytebase-v1-UpdateIssueCommentRequest) | [IssueComment](#bytebase-v1-IssueComment) | Updates an existing issue comment. Permissions required: bb.issueComments.update |-| BatchUpdateIssuesStatus | [BatchUpdateIssuesStatusRequest](#bytebase-v1-BatchUpdateIssuesStatusRequest) | [BatchUpdateIssuesStatusResponse](#bytebase-v1-BatchUpdateIssuesStatusResponse) | Updates the status of multiple issues in a single operation. Permissions required: bb.issues.update |-| ApproveIssue | [ApproveIssueRequest](#bytebase-v1-ApproveIssueRequest) | [Issue](#bytebase-v1-Issue) | Approves an issue. Access determined by approval flow configuration - caller must be a designated approver for the current approval step. Permissions required: None (determined by approval flow) |-| RejectIssue | [RejectIssueRequest](#bytebase-v1-RejectIssueRequest) | [Issue](#bytebase-v1-Issue) | Rejects an issue. Access determined by approval flow configuration - caller must be a designated approver for the current approval step. Permissions required: None (determined by approval flow) |-| RequestIssue | [RequestIssueRequest](#bytebase-v1-RequestIssueRequest) | [Issue](#bytebase-v1-Issue) | Requests changes on an issue. Access determined by approval flow configuration - caller must be a designated approver for the current approval step. Permissions required: None (determined by approval flow) |-| RetryIssueApproval | [RetryIssueApprovalRequest](#bytebase-v1-RetryIssueApprovalRequest) | [Issue](#bytebase-v1-Issue) | Re-runs approval-template finding for an issue stuck in CHECKING. Useful when the synchronous post-create finding errored (e.g. against a malformed workspace approval rule) and the operator has since corrected it — without this, the issue would remain in CHECKING indefinitely because there is no other retry path for non-DATABASE_CHANGE issue types. Idempotent: returns the existing issue unchanged when approval-finding has already completed. Permissions required: None (caller must be the issue creator; mirrors RequestIssue's authorization model). |+<a name="bytebase-v1-TaskRunLogEntry-ComputeDiff"></a>-+### TaskRunLogEntry.ComputeDiff+Schema diff computation details.+| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| start_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | When diff computation started. |+| end_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | When diff computation ended. |+| error | [string](#string) | | Error message if computation failed. |-<a name="v1_setting_service-proto"></a>-<p align="right"><a href="#top">Top</a></p>-## v1/setting_service.proto-<a name="bytebase-v1-AISetting"></a>-### AISetting+<a name="bytebase-v1-TaskRunLogEntry-DatabaseSync"></a>+### TaskRunLogEntry.DatabaseSync+Database synchronization details.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| enabled | [bool](#bool) | | |-| provider | [AISetting.Provider](#bytebase-v1-AISetting-Provider) | | |-| endpoint | [string](#string) | | |-| api_key | [string](#string) | | |-| model | [string](#string) | | |-| version | [string](#string) | | |-+| start_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | When the database sync started. |+| end_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | When the database sync ended. |+| error | [string](#string) | | Error message if sync failed. |-<a name="bytebase-v1-Algorithm"></a>-### Algorithm+<a name="bytebase-v1-TaskRunLogEntry-GhostMigration"></a>+### TaskRunLogEntry.GhostMigration+gh-ost migration details.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| full_mask | [Algorithm.FullMask](#bytebase-v1-Algorithm-FullMask) | | |-| range_mask | [Algorithm.RangeMask](#bytebase-v1-Algorithm-RangeMask) | | |-| md5_mask | [Algorithm.MD5Mask](#bytebase-v1-Algorithm-MD5Mask) | | |-| inner_outer_mask | [Algorithm.InnerOuterMask](#bytebase-v1-Algorithm-InnerOuterMask) | | |-+| start_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | When the gh-ost migration started. |+| end_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | When the gh-ost migration ended. |+| error | [string](#string) | | Error message if the gh-ost migration failed. |-<a name="bytebase-v1-Algorithm-FullMask"></a>-### Algorithm.FullMask+<a name="bytebase-v1-TaskRunLogEntry-PriorBackup"></a>+### TaskRunLogEntry.PriorBackup+Prior backup operation details.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| substitution | [string](#string) | | substitution is the string used to replace the original value, the max length of the string is 16 bytes. |-+| start_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | When the backup started. |+| end_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | When the backup ended. |+| prior_backup_detail | [TaskRunLogEntry.PriorBackup.PriorBackupDetail](#bytebase-v1-TaskRunLogEntry-PriorBackup-PriorBackupDetail) | | The backup details. |+| error | [string](#string) | | Error message if the backup failed. |-<a name="bytebase-v1-Algorithm-InnerOuterMask"></a>-### Algorithm.InnerOuterMask+<a name="bytebase-v1-TaskRunLogEntry-PriorBackup-PriorBackupDetail"></a>+### TaskRunLogEntry.PriorBackup.PriorBackupDetail+Prior backup detail for rollback purposes.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| prefix_len | [int32](#int32) | | |-| suffix_len | [int32](#int32) | | |-| type | [Algorithm.InnerOuterMask.MaskType](#bytebase-v1-Algorithm-InnerOuterMask-MaskType) | | |-| substitution | [string](#string) | | |-+| items | [TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item](#bytebase-v1-TaskRunLogEntry-PriorBackup-PriorBackupDetail-Item) | repeated | The list of backed up tables. |-<a name="bytebase-v1-Algorithm-MD5Mask"></a>-### Algorithm.MD5Mask+<a name="bytebase-v1-TaskRunLogEntry-PriorBackup-PriorBackupDetail-Item"></a>+### TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item+A single backup table mapping.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| salt | [string](#string) | | salt is the salt value to generate a different hash that with the word alone. |-+| source_table | [TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item.Table](#bytebase-v1-TaskRunLogEntry-PriorBackup-PriorBackupDetail-Item-Table) | | The original table information. |+| target_table | [TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item.Table](#bytebase-v1-TaskRunLogEntry-PriorBackup-PriorBackupDetail-Item-Table) | | The target backup table information. |+| start_position | [Position](#bytebase-v1-Position) | | The start position in the SQL statement. |+| end_position | [Position](#bytebase-v1-Position) | | The end position in the SQL statement. |-<a name="bytebase-v1-Algorithm-RangeMask"></a>-### Algorithm.RangeMask+<a name="bytebase-v1-TaskRunLogEntry-PriorBackup-PriorBackupDetail-Item-Table"></a>+### TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item.Table+Table information.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| slices | [Algorithm.RangeMask.Slice](#bytebase-v1-Algorithm-RangeMask-Slice) | repeated | We store it as a repeated field to face the fact that the original value may have multiple parts should be masked. But frontend can be started with a single rule easily. |-+| database | [string](#string) | | The database information. Format: instances/{instance}/databases/{database} |+| schema | [string](#string) | | The schema name. |+| table | [string](#string) | | The table name. |-<a name="bytebase-v1-Algorithm-RangeMask-Slice"></a>-### Algorithm.RangeMask.Slice+<a name="bytebase-v1-TaskRunLogEntry-ReleaseFileExecute"></a>+### TaskRunLogEntry.ReleaseFileExecute+Release file execution details.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| start | [int32](#int32) | | start is the start character index (0-based) of the original value, should be less than end. Uses character indices (not byte offsets) for display-oriented masking. Example: For "你好world", character index 2 refers to 'w' (the 3rd character). |-| end | [int32](#int32) | | end is the end character index (exclusive) of the original value. Uses character indices (not byte offsets) for display-oriented masking. |-| substitution | [string](#string) | | substitution is the string used to replace the OriginalValue[start:end). |-+| version | [string](#string) | | The version of the file being executed (e.g., "0001"). |+| file_path | [string](#string) | | The file path within the release (e.g., "2.2/V0001_create_table.sql"). |-<a name="bytebase-v1-Announcement"></a>-### Announcement+<a name="bytebase-v1-TaskRunLogEntry-RetryInfo"></a>+### TaskRunLogEntry.RetryInfo+Retry information for failed operations.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| level | [Announcement.AlertLevel](#bytebase-v1-Announcement-AlertLevel) | | The alert level of announcement |-| text | [string](#string) | | The text of announcement |-| link | [string](#string) | | The optional link, user can follow the link to check extra details |--+| error | [string](#string) | | The error that triggered the retry. |+| retry_count | [int32](#int32) | | Current retry attempt number. |+| maximum_retries | [int32](#int32) | | Maximum number of retries allowed. |-<a name="bytebase-v1-AppIMSetting"></a>-### AppIMSetting+<a name="bytebase-v1-TaskRunLogEntry-SchemaDump"></a>++### TaskRunLogEntry.SchemaDump+Schema dump operation details.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| settings | [AppIMSetting.IMSetting](#bytebase-v1-AppIMSetting-IMSetting) | repeated | |-+| start_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | When the schema dump started. |+| end_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | When the schema dump ended. |+| error | [string](#string) | | Error message if the schema dump failed. |-<a name="bytebase-v1-AppIMSetting-DingTalk"></a>-### AppIMSetting.DingTalk+<a name="bytebase-v1-TaskRunLogEntry-TransactionControl"></a>+### TaskRunLogEntry.TransactionControl+Transaction control operation details.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| client_id | [string](#string) | | |-| client_secret | [string](#string) | | |-| robot_code | [string](#string) | | |+| type | [TaskRunLogEntry.TransactionControl.Type](#bytebase-v1-TaskRunLogEntry-TransactionControl-Type) | | The type of transaction control. |+| error | [string](#string) | | Error message if the operation failed. |-<a name="bytebase-v1-AppIMSetting-Feishu"></a>+<a name="bytebase-v1-TaskRunSession"></a>-### AppIMSetting.Feishu+### TaskRunSession| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| app_id | [string](#string) | | |-| app_secret | [string](#string) | | |-+| name | [string](#string) | | Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun}/session |+| postgres | [TaskRunSession.Postgres](#bytebase-v1-TaskRunSession-Postgres) | | PostgreSQL session information. |-<a name="bytebase-v1-AppIMSetting-IMSetting"></a>-### AppIMSetting.IMSetting+<a name="bytebase-v1-TaskRunSession-Postgres"></a>+### TaskRunSession.Postgres+PostgreSQL session information.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| type | [WebhookType](#bytebase-v1-WebhookType) | | |-| slack | [AppIMSetting.Slack](#bytebase-v1-AppIMSetting-Slack) | | |-| feishu | [AppIMSetting.Feishu](#bytebase-v1-AppIMSetting-Feishu) | | |-| wecom | [AppIMSetting.Wecom](#bytebase-v1-AppIMSetting-Wecom) | | |-| lark | [AppIMSetting.Lark](#bytebase-v1-AppIMSetting-Lark) | | |-| dingtalk | [AppIMSetting.DingTalk](#bytebase-v1-AppIMSetting-DingTalk) | | |-| teams | [AppIMSetting.Teams](#bytebase-v1-AppIMSetting-Teams) | | |-+| session | [TaskRunSession.Postgres.Session](#bytebase-v1-TaskRunSession-Postgres-Session) | | `session` is the session of the task run executing commands. |+| blocking_sessions | [TaskRunSession.Postgres.Session](#bytebase-v1-TaskRunSession-Postgres-Session) | repeated | `blocking_sessions` block `session`. |+| blocked_sessions | [TaskRunSession.Postgres.Session](#bytebase-v1-TaskRunSession-Postgres-Session) | repeated | `blocked_sessions` are blocked by `session`. |-<a name="bytebase-v1-AppIMSetting-Lark"></a>-### AppIMSetting.Lark+<a name="bytebase-v1-TaskRunSession-Postgres-Session"></a>+### TaskRunSession.Postgres.Session+PostgreSQL session information read from `pg_stat_activity`.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| app_id | [string](#string) | | |-| app_secret | [string](#string) | | |----+| pid | [string](#string) | | Process ID of the session. |+| blocked_by_pids | [string](#string) | repeated | PIDs of sessions blocking this session. |+| query | [string](#string) | | Current query being executed. |+| state | [string](#string) | optional | Session state (active, idle, etc.). |+| wait_event_type | [string](#string) | optional | Wait event type if session is waiting. |+| wait_event | [string](#string) | optional | Specific wait event if session is waiting. |+| datname | [string](#string) | optional | Database name. |+| usename | [string](#string) | optional | User name. |+| application_name | [string](#string) | | Application name. |+| client_addr | [string](#string) | optional | Client IP address. |+| client_port | [string](#string) | optional | Client port number. |+| backend_start | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | When the backend process started. |+| xact_start | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | optional | When the current transaction started. |+| query_start | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | optional | When the current query started. |-<a name="bytebase-v1-AppIMSetting-Slack"></a>-### AppIMSetting.Slack+-| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| token | [string](#string) | | |+<a name="bytebase-v1-Task-Status"></a>+### Task.Status+| Name | Number | Description |+| ---- | ------ | ----------- |+| STATUS_UNSPECIFIED | 0 | Unspecified status. |+| NOT_STARTED | 1 | Task has not started and is awaiting its turn in the deployment sequence. |+| PENDING | 2 | Task is ready to run and waiting for approval or scheduled time. |+| RUNNING | 3 | Task is currently executing. |+| DONE | 4 | Task completed successfully. |+| FAILED | 5 | Task execution failed with errors. |+| CANCELED | 6 | Task execution was canceled by a user. |+| SKIPPED | 7 | Task was skipped and will not be executed. |-<a name="bytebase-v1-AppIMSetting-Teams"></a>-### AppIMSetting.Teams+<a name="bytebase-v1-Task-Type"></a>+### Task.Type-| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| tenant_id | [string](#string) | | Azure AD tenant ID (Directory ID). |-| client_id | [string](#string) | | Azure AD application (client) ID. |-| client_secret | [string](#string) | | Azure AD client secret. |+| Name | Number | Description |+| ---- | ------ | ----------- |+| TYPE_UNSPECIFIED | 0 | Unspecified task type. |+| GENERAL | 1 | General task for miscellaneous operations. |+| DATABASE_CREATE | 2 | Database creation task that creates a new database. Use payload DatabaseCreate. |+| DATABASE_MIGRATE | 3 | Database migration task that applies versioned schema changes. Use payload DatabaseUpdate. |+| DATABASE_EXPORT | 4 | Database export task that exports query results or table data. Use payload DatabaseDataExport. |+<a name="bytebase-v1-TaskRun-ExportArchiveStatus"></a>+### TaskRun.ExportArchiveStatus-<a name="bytebase-v1-AppIMSetting-Wecom"></a>+| Name | Number | Description |+| ---- | ------ | ----------- |+| EXPORT_ARCHIVE_STATUS_UNSPECIFIED | 0 | Unspecified export archive status. |+| READY | 1 | Export archive is ready for download. |+| EXPORTED | 2 | Export archive has been downloaded by the user. |-### AppIMSetting.Wecom+<a name="bytebase-v1-TaskRun-Status"></a>-| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| corp_id | [string](#string) | | |-| agent_id | [string](#string) | | |-| secret | [string](#string) | | |+### TaskRun.Status+| Name | Number | Description |+| ---- | ------ | ----------- |+| STATUS_UNSPECIFIED | 0 | Unspecified status. |+| PENDING | 1 | Task run is queued and waiting to start execution. |+| RUNNING | 2 | Task run is currently executing. |+| DONE | 3 | Task run completed successfully. |+| FAILED | 4 | Task run execution failed with errors. |+| CANCELED | 5 | Task run execution was canceled by a user. |+| AVAILABLE | 6 | Task run is ready for immediate execution. |+<a name="bytebase-v1-TaskRunLogEntry-TransactionControl-Type"></a>-<a name="bytebase-v1-DataClassificationSetting"></a>+### TaskRunLogEntry.TransactionControl.Type+Transaction control type.-### DataClassificationSetting+| Name | Number | Description |+| ---- | ------ | ----------- |+| TYPE_UNSPECIFIED | 0 | Unspecified type. |+| BEGIN | 1 | Begin transaction. |+| COMMIT | 2 | Commit transaction. |+| ROLLBACK | 3 | Rollback transaction. |-| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| configs | [DataClassificationSetting.DataClassificationConfig](#bytebase-v1-DataClassificationSetting-DataClassificationConfig) | repeated | |+<a name="bytebase-v1-TaskRunLogEntry-Type"></a>+### TaskRunLogEntry.Type+The type of log entry.+| Name | Number | Description |+| ---- | ------ | ----------- |+| TYPE_UNSPECIFIED | 0 | Unspecified type. |+| SCHEMA_DUMP | 1 | Schema dump operation. |+| COMMAND_EXECUTE | 2 | Command execution. |+| DATABASE_SYNC | 3 | Database synchronization. |+| TRANSACTION_CONTROL | 5 | Transaction control (BEGIN, COMMIT, ROLLBACK). |+| PRIOR_BACKUP | 6 | Prior backup operation. |+| RETRY_INFO | 7 | Retry information. |+| COMPUTE_DIFF | 8 | Schema diff computation. |+| RELEASE_FILE_EXECUTE | 9 | Release file execution. |+| GHOST_MIGRATION | 10 | gh-ost online migration. |++-<a name="bytebase-v1-DataClassificationSetting-DataClassificationConfig"></a>-### DataClassificationSetting.DataClassificationConfig+<a name="bytebase-v1-RolloutService"></a>+### RolloutService+RolloutService manages the execution of deployment plans.+| Method Name | Request Type | Response Type | Description |+| ----------- | ------------ | ------------- | ------------|+| GetRollout | [GetRolloutRequest](#bytebase-v1-GetRolloutRequest) | [Rollout](#bytebase-v1-Rollout) | Retrieves a rollout by its plan name. Permissions required: bb.rollouts.get |+| ListRollouts | [ListRolloutsRequest](#bytebase-v1-ListRolloutsRequest) | [ListRolloutsResponse](#bytebase-v1-ListRolloutsResponse) | Lists rollouts in a project. Permissions required: bb.rollouts.list |+| CreateRollout | [CreateRolloutRequest](#bytebase-v1-CreateRolloutRequest) | [Rollout](#bytebase-v1-Rollout) | Creates a new rollout for a plan. Permissions required: bb.rollouts.create (or issue creator for data export issues) |+| ListTaskRuns | [ListTaskRunsRequest](#bytebase-v1-ListTaskRunsRequest) | [ListTaskRunsResponse](#bytebase-v1-ListTaskRunsResponse) | Lists task run executions for a task. Permissions required: bb.taskRuns.list |+| GetTaskRun | [GetTaskRunRequest](#bytebase-v1-GetTaskRunRequest) | [TaskRun](#bytebase-v1-TaskRun) | Retrieves a task run by name. Permissions required: bb.taskRuns.list |+| GetTaskRunLog | [GetTaskRunLogRequest](#bytebase-v1-GetTaskRunLogRequest) | [TaskRunLog](#bytebase-v1-TaskRunLog) | Retrieves execution logs for a task run. Permissions required: bb.taskRuns.list |+| GetTaskRunSession | [GetTaskRunSessionRequest](#bytebase-v1-GetTaskRunSessionRequest) | [TaskRunSession](#bytebase-v1-TaskRunSession) | Retrieves database session information for a running task. Permissions required: bb.taskRuns.list |+| BatchRunTasks | [BatchRunTasksRequest](#bytebase-v1-BatchRunTasksRequest) | [BatchRunTasksResponse](#bytebase-v1-BatchRunTasksResponse) | Executes multiple tasks in a rollout stage. Permissions required: bb.taskRuns.create (or issue creator for data export issues, or user with rollout policy role for the environment) |+| BatchSkipTasks | [BatchSkipTasksRequest](#bytebase-v1-BatchSkipTasksRequest) | [BatchSkipTasksResponse](#bytebase-v1-BatchSkipTasksResponse) | Skips multiple tasks in a rollout stage. Permissions required: bb.taskRuns.create (or issue creator for data export issues, or user with rollout policy role for the environment) |+| BatchCancelTaskRuns | [BatchCancelTaskRunsRequest](#bytebase-v1-BatchCancelTaskRunsRequest) | [BatchCancelTaskRunsResponse](#bytebase-v1-BatchCancelTaskRunsResponse) | Cancels multiple running task executions. Permissions required: bb.taskRuns.create (or issue creator for data export issues, or user with rollout policy role for the environment) |+| PreviewTaskRunRollback | [PreviewTaskRunRollbackRequest](#bytebase-v1-PreviewTaskRunRollbackRequest) | [PreviewTaskRunRollbackResponse](#bytebase-v1-PreviewTaskRunRollbackResponse) | Generates rollback SQL for a completed task run. Permissions required: bb.taskRuns.list |-| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| id | [string](#string) | | id is the uuid for classification. Each project can chose one classification config. |-| title | [string](#string) | | |-| levels | [DataClassificationSetting.DataClassificationConfig.Level](#bytebase-v1-DataClassificationSetting-DataClassificationConfig-Level) | repeated | levels is user defined level list for classification. |-| classification | [DataClassificationSetting.DataClassificationConfig.ClassificationEntry](#bytebase-v1-DataClassificationSetting-DataClassificationConfig-ClassificationEntry) | repeated | classification is the id - DataClassification map. The id should in [0-9]+-[0-9]+-[0-9]+ format. |++<a name="v1_instance_role_service-proto"></a>+<p align="right"><a href="#top">Top</a></p>+## v1/instance_role_service.proto-<a name="bytebase-v1-DataClassificationSetting-DataClassificationConfig-ClassificationEntry"></a>-### DataClassificationSetting.DataClassificationConfig.ClassificationEntry+<a name="bytebase-v1-InstanceRole"></a>+### InstanceRole+InstanceRole is the API message for instance role.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| key | [string](#string) | | |-| value | [DataClassificationSetting.DataClassificationConfig.DataClassification](#bytebase-v1-DataClassificationSetting-DataClassificationConfig-DataClassification) | | |+| name | [string](#string) | | The name of the role. Format: instances/{instance}/roles/{role} The role name is the unique name for the role. |+| role_name | [string](#string) | | The role name. It's unique within the instance. |+| password | [string](#string) | optional | The role password. |+| connection_limit | [int32](#int32) | optional | The connection count limit for this role. |+| valid_until | [string](#string) | optional | The expiration for the role's password. |+| attribute | [string](#string) | optional | The role attribute. For PostgreSQL, it contains super_user, no_inherit, create_role, create_db, can_login, replication, and bypass_rls. Docs: https://www.postgresql.org/docs/current/role-attributes.html For MySQL, it's the global privileges as GRANT statements, which means it only contains "GRANT ... ON *.* TO ...". Docs: https://dev.mysql.com/doc/refman/8.0/en/grant.html |-<a name="bytebase-v1-DataClassificationSetting-DataClassificationConfig-DataClassification"></a>+<a name="bytebase-v1-ListInstanceRolesRequest"></a>-### DataClassificationSetting.DataClassificationConfig.DataClassification+### ListInstanceRolesRequest| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| id | [string](#string) | | id is the classification id in [0-9]+-[0-9]+-[0-9]+ format. |-| title | [string](#string) | | |-| level | [int32](#int32) | optional | The sensitivity level. Maps to Level.level. |+| parent | [string](#string) | | The parent, which owns this collection of roles. Format: instances/{instance} |+| page_size | [int32](#int32) | | Not used. The maximum number of roles to return. The service may return fewer than this value. If unspecified, at most 10 roles will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. |+| page_token | [string](#string) | | Not used. A page token, received from a previous `ListInstanceRoles` call. Provide this to retrieve the subsequent page.++When paginating, all other parameters provided to `ListInstanceRoles` must match the call that provided the page token. |+| refresh | [bool](#bool) | | Refresh will refresh and return the latest data. |-<a name="bytebase-v1-DataClassificationSetting-DataClassificationConfig-Level"></a>+<a name="bytebase-v1-ListInstanceRolesResponse"></a>-### DataClassificationSetting.DataClassificationConfig.Level+### ListInstanceRolesResponse| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| title | [string](#string) | | |-| level | [int32](#int32) | | The numeric level for ordering. Higher = more sensitive. |+| roles | [InstanceRole](#bytebase-v1-InstanceRole) | repeated | The roles 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-EmailSetting"></a>+-### EmailSetting++<a name="bytebase-v1-InstanceRoleService"></a>-| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| from | [string](#string) | | |-| from_name | [string](#string) | | |-| type | [EmailSetting.Type](#bytebase-v1-EmailSetting-Type) | | |-| smtp | [EmailSetting.SMTPConfig](#bytebase-v1-EmailSetting-SMTPConfig) | | |+### InstanceRoleService+InstanceRoleService manages database roles within instances.+| Method Name | Request Type | Response Type | Description |+| ----------- | ------------ | ------------- | ------------|+| ListInstanceRoles | [ListInstanceRolesRequest](#bytebase-v1-ListInstanceRolesRequest) | [ListInstanceRolesResponse](#bytebase-v1-ListInstanceRolesResponse) | Lists all database roles in an instance. Permissions required: bb.instanceRoles.list |++<a name="v1_instance_service-proto"></a>+<p align="right"><a href="#top">Top</a></p>-<a name="bytebase-v1-EmailSetting-SMTPConfig"></a>+## v1/instance_service.proto-### EmailSetting.SMTPConfig+++<a name="bytebase-v1-AddDataSourceRequest"></a>++### AddDataSourceRequest| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| host | [string](#string) | | |-| port | [int32](#int32) | | |-| username | [string](#string) | | |-| password | [string](#string) | | |-| encryption | [EmailSetting.SMTPConfig.Encryption](#bytebase-v1-EmailSetting-SMTPConfig-Encryption) | | |-| authentication | [EmailSetting.SMTPConfig.Authentication](#bytebase-v1-EmailSetting-SMTPConfig-Authentication) | | |+| name | [string](#string) | | The name of the instance to add a data source to. Format: instances/{instance} |+| data_source | [DataSource](#bytebase-v1-DataSource) | | Identified by data source ID. Only READ_ONLY data source can be added. |+| validate_only | [bool](#bool) | | Validate only also tests the data source connection. |-<a name="bytebase-v1-EnvironmentSetting"></a>+<a name="bytebase-v1-BatchSyncInstancesRequest"></a>-### EnvironmentSetting+### BatchSyncInstancesRequest| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| environments | [EnvironmentSetting.Environment](#bytebase-v1-EnvironmentSetting-Environment) | repeated | |--+| requests | [SyncInstanceRequest](#bytebase-v1-SyncInstanceRequest) | repeated | The request message specifying the instances to sync. A maximum of 1000 instances can be synced in a batch. |-<a name="bytebase-v1-EnvironmentSetting-Environment"></a>-### EnvironmentSetting.Environment+<a name="bytebase-v1-BatchSyncInstancesResponse"></a>+### BatchSyncInstancesResponse-| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The resource name of the environment. Format: environments/{environment}. Output only. |-| id | [string](#string) | | The resource id of the environment. This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/. |-| title | [string](#string) | | The display name of the environment. |-| tags | [EnvironmentSetting.Environment.TagsEntry](#bytebase-v1-EnvironmentSetting-Environment-TagsEntry) | repeated | |-| color | [string](#string) | | |-<a name="bytebase-v1-EnvironmentSetting-Environment-TagsEntry"></a>+<a name="bytebase-v1-BatchUpdateInstancesRequest"></a>-### EnvironmentSetting.Environment.TagsEntry+### BatchUpdateInstancesRequest| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| key | [string](#string) | | |-| value | [string](#string) | | |+| requests | [UpdateInstanceRequest](#bytebase-v1-UpdateInstanceRequest) | repeated | The request message specifying the resources to update. |-<a name="bytebase-v1-GetSettingRequest"></a>+<a name="bytebase-v1-BatchUpdateInstancesResponse"></a>++### BatchUpdateInstancesResponse-### GetSettingRequest-The request message for getting a setting.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The resource name of the setting. |+| instances | [Instance](#bytebase-v1-Instance) | repeated | |-<a name="bytebase-v1-GetSettingResponse"></a>+<a name="bytebase-v1-CreateInstanceRequest"></a>++### CreateInstanceRequest-### GetSettingResponse-The response message for getting a setting.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| setting | [Setting](#bytebase-v1-Setting) | | |+| instance | [Instance](#bytebase-v1-Instance) | | The instance to create. |+| instance_id | [string](#string) | | The ID to use for the instance, which will become the final component of the instance's resource name.++This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/. |+| validate_only | [bool](#bool) | | Validate only also tests the data source connection. |-<a name="bytebase-v1-ListSettingsRequest"></a>+<a name="bytebase-v1-DataSource"></a>++### DataSource-### ListSettingsRequest+| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| id | [string](#string) | | The unique identifier for this data source. |+| type | [DataSourceType](#bytebase-v1-DataSourceType) | | The type of data source (ADMIN or READ_ONLY). |+| username | [string](#string) | | The username for database authentication. |+| password | [string](#string) | | The password for database authentication. |+| use_ssl | [bool](#bool) | | Use SSL to connect to the data source. By default, we use system default SSL configuration. |+| ssl_ca | [string](#string) | | The SSL certificate authority certificate. |+| ssl_cert | [string](#string) | | The SSL client certificate. |+| ssl_key | [string](#string) | | The SSL client private key. |+| ssl_ca_path | [string](#string) | | The local filesystem path to the SSL certificate authority certificate. |+| ssl_cert_path | [string](#string) | | The local filesystem path to the SSL client certificate. |+| ssl_key_path | [string](#string) | | The local filesystem path to the SSL client private key. |+| ssl_ca_set | [bool](#bool) | | Whether an SSL certificate authority certificate has been configured. |+| ssl_cert_set | [bool](#bool) | | Whether an SSL client certificate has been configured. |+| ssl_key_set | [bool](#bool) | | Whether an SSL client private key has been configured. |+| ssl_ca_path_set | [bool](#bool) | | Whether an SSL certificate authority path has been configured. |+| ssl_cert_path_set | [bool](#bool) | | Whether an SSL client certificate path has been configured. |+| ssl_key_path_set | [bool](#bool) | | Whether an SSL client private key path has been configured. |+| verify_tls_certificate | [bool](#bool) | | verify_tls_certificate enables TLS certificate verification for SSL connections. Default is false (no verification) for backward compatibility. Set to true for secure connections (recommended for production). Only set to false for development or when certificates cannot be properly validated (e.g., self-signed certs, VPN environments). |+| host | [string](#string) | | The hostname or IP address of the database server. |+| port | [string](#string) | | The port number of the database server. |+| database | [string](#string) | | The name of the database to connect to. |+| srv | [bool](#bool) | | srv, authentication_database and replica_set are used for MongoDB. srv is a boolean flag that indicates whether the host is a DNS SRV record. |+| authentication_database | [string](#string) | | authentication_database is the database name to authenticate against, which stores the user credentials. |+| replica_set | [string](#string) | | replica_set is used for MongoDB replica set. |+| sid | [string](#string) | | sid and service_name are used for Oracle. |+| service_name | [string](#string) | | |+| ssh_host | [string](#string) | | Connection over SSH. The hostname of the SSH server agent. Required. |+| ssh_port | [string](#string) | | The port of the SSH server agent. It's 22 typically. Required. |+| ssh_user | [string](#string) | | The user to login the server. Required. |+| ssh_password | [string](#string) | | The password to login the server. If it's empty string, no password is required. |+| ssh_private_key | [string](#string) | | The private key to login the server. If it's empty string, we will use the system default private key from os.Getenv("SSH_AUTH_SOCK"). |+| authentication_private_key | [string](#string) | | PKCS#8 private key in PEM format. If it's empty string, no private key is required. Used for authentication when connecting to the data source. |+| authentication_private_key_passphrase | [string](#string) | | Passphrase for the encrypted PKCS#8 private key. Only used when the private key is encrypted. |+| external_secret | [DataSourceExternalSecret](#bytebase-v1-DataSourceExternalSecret) | | |+| authentication_type | [DataSource.AuthenticationType](#bytebase-v1-DataSource-AuthenticationType) | | |+| azure_credential | [DataSource.AzureCredential](#bytebase-v1-DataSource-AzureCredential) | | |+| aws_credential | [DataSource.AWSCredential](#bytebase-v1-DataSource-AWSCredential) | | |+| gcp_credential | [DataSource.GCPCredential](#bytebase-v1-DataSource-GCPCredential) | | |+| sasl_config | [SASLConfig](#bytebase-v1-SASLConfig) | | |+| additional_addresses | [DataSource.Address](#bytebase-v1-DataSource-Address) | repeated | additional_addresses is used for MongoDB replica set. |+| direct_connection | [bool](#bool) | | direct_connection is used for MongoDB to dispatch all the operations to the node specified in the connection string. |+| region | [string](#string) | | region is the location of where the DB is, works for AWS RDS. For example, us-east-1. |+| warehouse_id | [string](#string) | | warehouse_id is used by Databricks. |+| master_name | [string](#string) | | master_name is the master name used by connecting redis-master via redis sentinel. |+| master_username | [string](#string) | | master_username and master_password are master credentials used by redis sentinel mode. |+| master_password | [string](#string) | | |+| redis_type | [DataSource.RedisType](#bytebase-v1-DataSource-RedisType) | | |+| cluster | [string](#string) | | Cluster is the cluster name for the data source. Used by CockroachDB. |+| extra_connection_parameters | [DataSource.ExtraConnectionParametersEntry](#bytebase-v1-DataSource-ExtraConnectionParametersEntry) | repeated | Extra connection parameters for the database connection. For PostgreSQL HA, this can be used to set target_session_attrs=read-write |+-<a name="bytebase-v1-ListSettingsResponse"></a>+<a name="bytebase-v1-DataSource-AWSCredential"></a>-### ListSettingsResponse+### DataSource.AWSCredential| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| settings | [Setting](#bytebase-v1-Setting) | repeated | The settings from the specified request. |+| access_key_id | [string](#string) | | |+| secret_access_key | [string](#string) | | |+| session_token | [string](#string) | | |+| role_arn | [string](#string) | | ARN of IAM role to assume for cross-account access. See: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html |+| external_id | [string](#string) | | Optional external ID for additional security when assuming role. See: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-user_externalid.html |-<a name="bytebase-v1-SemanticTypeSetting"></a>+<a name="bytebase-v1-DataSource-Address"></a>-### SemanticTypeSetting+### DataSource.Address| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| types | [SemanticTypeSetting.SemanticType](#bytebase-v1-SemanticTypeSetting-SemanticType) | repeated | |+| host | [string](#string) | | |+| port | [string](#string) | | |-<a name="bytebase-v1-SemanticTypeSetting-SemanticType"></a>+<a name="bytebase-v1-DataSource-AzureCredential"></a>-### SemanticTypeSetting.SemanticType+### DataSource.AzureCredential| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| id | [string](#string) | | id is the uuid for semantic type. |-| title | [string](#string) | | the title of the semantic type, it should not be empty. |-| description | [string](#string) | | the description of the semantic type, it can be empty. |-| algorithm | [Algorithm](#bytebase-v1-Algorithm) | | |-| icon | [string](#string) | | icon is the icon for semantic type, it can be emoji or base64 encoded image. |+| tenant_id | [string](#string) | | |+| client_id | [string](#string) | | |+| client_secret | [string](#string) | | |-<a name="bytebase-v1-Setting"></a>+<a name="bytebase-v1-DataSource-ExtraConnectionParametersEntry"></a>++### DataSource.ExtraConnectionParametersEntry-### Setting-The schema of setting.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The resource name of the setting. Format: settings/{setting} Example: "settings/SEMANTIC_TYPES" |-| value | [SettingValue](#bytebase-v1-SettingValue) | | The configuration value of the setting. |+| key | [string](#string) | | |+| value | [string](#string) | | |-<a name="bytebase-v1-SettingValue"></a>+<a name="bytebase-v1-DataSource-GCPCredential"></a>++### DataSource.GCPCredential-### SettingValue-The data in setting value.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| app_im | [AppIMSetting](#bytebase-v1-AppIMSetting) | | |-| workspace_profile | [WorkspaceProfileSetting](#bytebase-v1-WorkspaceProfileSetting) | | |-| workspace_approval | [WorkspaceApprovalSetting](#bytebase-v1-WorkspaceApprovalSetting) | | |-| data_classification | [DataClassificationSetting](#bytebase-v1-DataClassificationSetting) | | |-| semantic_type | [SemanticTypeSetting](#bytebase-v1-SemanticTypeSetting) | | |-| ai | [AISetting](#bytebase-v1-AISetting) | | |-| environment | [EnvironmentSetting](#bytebase-v1-EnvironmentSetting) | | |-| email | [EmailSetting](#bytebase-v1-EmailSetting) | | |+| content | [string](#string) | | |-<a name="bytebase-v1-TestEmailSettingRequest"></a>+<a name="bytebase-v1-DataSourceExternalSecret"></a>-### TestEmailSettingRequest+### DataSourceExternalSecret| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| parent | [string](#string) | | |-| email_setting | [EmailSetting](#bytebase-v1-EmailSetting) | | |-| to | [string](#string) | | |+| secret_type | [DataSourceExternalSecret.SecretType](#bytebase-v1-DataSourceExternalSecret-SecretType) | | The type of external secret store. |+| url | [string](#string) | | The URL of the external secret store. |+| auth_type | [DataSourceExternalSecret.AuthType](#bytebase-v1-DataSourceExternalSecret-AuthType) | | The authentication method for accessing the secret store. |+| app_role | [DataSourceExternalSecret.AppRoleAuthOption](#bytebase-v1-DataSourceExternalSecret-AppRoleAuthOption) | | AppRole authentication configuration. |+| token | [string](#string) | | Token for direct authentication. |+| engine_name | [string](#string) | | engine name is the name for secret engine. |+| secret_name | [string](#string) | | the secret name in the engine to store the password. |+| password_key_name | [string](#string) | | the key name for the password. |+| skip_vault_tls_verification | [bool](#bool) | | TLS configuration for connecting to Vault server. These fields are separate from the database TLS configuration in DataSource. skip_vault_tls_verification disables TLS certificate verification for Vault connections. Default is false (verification enabled) for security. Only set to true for development or when certificates cannot be properly validated. |+| vault_ssl_ca | [string](#string) | | CA certificate for Vault server verification. |+| vault_ssl_cert | [string](#string) | | Client certificate for mutual TLS authentication with Vault. |+| vault_ssl_key | [string](#string) | | Client private key for mutual TLS authentication with Vault. |-<a name="bytebase-v1-TestEmailSettingResponse"></a>+<a name="bytebase-v1-DataSourceExternalSecret-AppRoleAuthOption"></a>-### TestEmailSettingResponse+### DataSourceExternalSecret.AppRoleAuthOption| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| success | [bool](#bool) | | |-| error | [string](#string) | | |+| role_id | [string](#string) | | The role ID for Vault AppRole authentication. |+| secret_id | [string](#string) | | the secret id for the role without ttl. |+| type | [DataSourceExternalSecret.AppRoleAuthOption.SecretType](#bytebase-v1-DataSourceExternalSecret-AppRoleAuthOption-SecretType) | | The type of secret for AppRole authentication. |+| mount_path | [string](#string) | | The path where the approle auth method is mounted. |-<a name="bytebase-v1-UpdateSettingRequest"></a>+<a name="bytebase-v1-DeleteInstanceRequest"></a>++### DeleteInstanceRequest-### UpdateSettingRequest-The request message for updating or creating a setting.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| setting | [Setting](#bytebase-v1-Setting) | | The setting to update. |-| validate_only | [bool](#bool) | | validate_only is a flag to indicate whether to validate the setting value, server would not persist the setting value if it is true. |-| allow_missing | [bool](#bool) | | |-| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | |+| name | [string](#string) | | The name of the instance to delete. Format: instances/{instance} |+| force | [bool](#bool) | | If set to true, any databases and sheets from this project will also be moved to default project, and all open issues will be closed. |+| purge | [bool](#bool) | | If set to true, permanently purge the soft-deleted instance and all related resources. This operation is irreversible. Following AIP-165, this should only be used for administrative cleanup of old soft-deleted instances. The instance must already be soft-deleted for this to work. |-<a name="bytebase-v1-WorkspaceApprovalSetting"></a>+<a name="bytebase-v1-GetInstanceRequest"></a>-### WorkspaceApprovalSetting+### GetInstanceRequest| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| rules | [WorkspaceApprovalSetting.Rule](#bytebase-v1-WorkspaceApprovalSetting-Rule) | repeated | |+| name | [string](#string) | | The name of the instance to retrieve. Format: instances/{instance} |-<a name="bytebase-v1-WorkspaceApprovalSetting-Rule"></a>+<a name="bytebase-v1-Instance"></a>-### WorkspaceApprovalSetting.Rule+### Instance| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| template | [ApprovalTemplate](#bytebase-v1-ApprovalTemplate) | | |-| condition | [google.type.Expr](#google-type-Expr) | | The condition that is associated with the rule. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec+| name | [string](#string) | | The name of the instance. Format: instances/{instance} |+| state | [State](#bytebase-v1-State) | | The lifecycle state of the instance. |+| title | [string](#string) | | The display title of the instance. |+| engine | [Engine](#bytebase-v1-Engine) | | The database engine type. |+| engine_version | [string](#string) | | The version of the database engine. |+| external_link | [string](#string) | | External URL to the database instance console. |+| data_sources | [DataSource](#bytebase-v1-DataSource) | repeated | Data source configurations for connecting to the instance. |+| environment | [string](#string) | optional | The environment resource. Format: environments/prod where prod is the environment resource ID. |+| activation | [bool](#bool) | | Whether the instance is activated for use. |+| roles | [InstanceRole](#bytebase-v1-InstanceRole) | repeated | Database roles available in this instance. |+| sync_interval | [google.protobuf.Duration](#google-protobuf-Duration) | | How often the instance is synced. |+| sync_databases | [string](#string) | repeated | Enable sync for following databases. Default empty, means sync all schemas & databases. |+| last_sync_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | The last time the instance was synced. |+| labels | [Instance.LabelsEntry](#bytebase-v1-Instance-LabelsEntry) | repeated | Labels are key-value pairs that can be attached to the instance. For example, { "org_group": "infrastructure", "environment": "production" } |-The `source` field filters which rules apply. The `condition` field then evaluates with full context.-All supported variables: statement.affected_rows: affected row count in the DDL/DML, support "==", "!=", "<", "<=", ">", ">=" operations. statement.table_rows: table row count number, support "==", "!=", "<", "<=", ">", ">=" operations. resource.environment_id: the environment resource id, support "==", "!=", "in [xx]", "!(in [xx])" operations. resource.project_id: the project resource id, support "==", "!=", "in [xx]", "!(in [xx])", "contains()", "matches()", "startsWith()", "endsWith()" operations. resource.db_engine: the database engine type, support "==", "!=", "in [xx]", "!(in [xx])" operations. Check the Engine enum for values. statement.sql_type: the SQL type, support "==", "!=", "in [xx]", "!(in [xx])" operations. resource.database_name: the database name, support "==", "!=", "in [xx]", "!(in [xx])", "contains()", "matches()", "startsWith()", "endsWith()" operations. resource.schema_name: the schema name, support "==", "!=", "in [xx]", "!(in [xx])", "contains()", "matches()", "startsWith()", "endsWith()" operations. resource.table_name: the table name, support "==", "!=", "in [xx]", "!(in [xx])", "contains()", "matches()", "startsWith()", "endsWith()" operations. statement.text: the SQL statement, support "contains()", "matches()", "startsWith()", "endsWith()" operations. request.expiration_days: the role expiration days for the request, support "==", "!=", "<", "<=", ">", ">=" operations. request.role: the request role full name, support "==", "!=", "in [xx]", "!(in [xx])", "contains()", "matches()", "startsWith()", "endsWith()" operations.-When source is CHANGE_DATABASE, support: statement.*, resource.* (excluding request.*) When source is CREATE_DATABASE, support: resource.environment_id, resource.project_id, resource.db_engine, resource.database_name When source is EXPORT_DATA, support: resource.environment_id, resource.project_id, resource.db_engine, resource.database_name, resource.schema_name, resource.table_name When source is REQUEST_ROLE, support: resource.project_id, request.expiration_days, request.role When source is REQUEST_ACCESS, support: resource.environment_id, resource.project_id, request.unmask-For examples: resource.environment_id == "prod" && statement.affected_rows >= 100 resource.table_name.matches("sensitive_.*") && resource.db_engine == "MYSQL" |-| source | [WorkspaceApprovalSetting.Rule.Source](#bytebase-v1-WorkspaceApprovalSetting-Rule-Source) | | |+<a name="bytebase-v1-Instance-LabelsEntry"></a>+### Instance.LabelsEntry++++| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| key | [string](#string) | | |+| value | [string](#string) | | |-<a name="bytebase-v1-WorkspaceProfileSetting"></a>-### WorkspaceProfileSetting+++<a name="bytebase-v1-InstanceResource"></a>++### InstanceResource| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| external_url | [string](#string) | | The external URL is used for sso authentication callback. |-| disallow_signup | [bool](#bool) | | Disallow self-service signup, users can only be invited by the owner. |-| require_mfa | [bool](#bool) | | Require MFA for all users. |-| refresh_token_duration | [google.protobuf.Duration](#google-protobuf-Duration) | | The duration for refresh token. Default is 7 days. |-| announcement | [Announcement](#bytebase-v1-Announcement) | | The setting of custom announcement |-| maximum_role_expiration | [google.protobuf.Duration](#google-protobuf-Duration) | | The max duration for role expired. |-| domains | [string](#string) | repeated | The workspace domain, e.g., bytebase.com. |-| enforce_identity_domain | [bool](#bool) | | Only user and group from the domains can be created and login. |-| database_change_mode | [DatabaseChangeMode](#bytebase-v1-DatabaseChangeMode) | | The workspace database change mode. |-| disallow_password_signin | [bool](#bool) | | Whether to disallow password signin. (Except workspace admins) |-| enable_metric_collection | [bool](#bool) | | Whether to enable metric collection for the workspace. |-| inactive_session_timeout | [google.protobuf.Duration](#google-protobuf-Duration) | | The session expiration time if not activity detected for the user. Value <= 0 means no limit. |-| enable_audit_log_stdout | [bool](#bool) | | Whether to enable audit logging to stdout in structured JSON format. Requires TEAM or ENTERPRISE license. |-| watermark | [bool](#bool) | | Whether to display watermark on pages. Requires ENTERPRISE license. |-| directory_sync_token | [string](#string) | | The token for directory sync authentication. |-| password_restriction | [WorkspaceProfileSetting.PasswordRestriction](#bytebase-v1-WorkspaceProfileSetting-PasswordRestriction) | | Password restriction settings. |-| access_token_duration | [google.protobuf.Duration](#google-protobuf-Duration) | | The duration for access token. Default is 1 hour. |-| enable_debug | [bool](#bool) | | Whether debug mode is enabled. |-| sql_result_size | [int64](#int64) | | The maximum result size limit in bytes for query and export, works for the SQL Editor and Export Center. The default value is 100MB, we will use the default value if the setting not exists, or the limit <= 0. |-| query_timeout | [google.protobuf.Duration](#google-protobuf-Duration) | | The query timeout duration for query and export, works for the SQL Editor and Export Center. |-| allow_email_code_signin | [bool](#bool) | | Allow signin/signup using email + a 6-digit one-time verification code. Requires the EMAIL setting to be configured on the workspace. |+| title | [string](#string) | | The display title of the instance. |+| engine | [Engine](#bytebase-v1-Engine) | | The database engine type. |+| engine_version | [string](#string) | | The version of the database engine. |+| data_sources | [DataSource](#bytebase-v1-DataSource) | repeated | Data source configurations for the instance. |+| activation | [bool](#bool) | | Whether the instance is activated. |+| name | [string](#string) | | The name of the instance. Format: instances/{instance} |+| environment | [string](#string) | optional | The environment resource. Format: environments/prod where prod is the environment resource ID. |-<a name="bytebase-v1-WorkspaceProfileSetting-PasswordRestriction"></a>+<a name="bytebase-v1-KerberosConfig"></a>-### WorkspaceProfileSetting.PasswordRestriction+### KerberosConfig| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| min_length | [int32](#int32) | | min_length is the minimum length for password, should no less than 8. |-| require_number | [bool](#bool) | | require_number requires the password must contains at least one number. |-| require_letter | [bool](#bool) | | require_letter requires the password must contains at least one letter, regardless of upper case or lower case |-| require_uppercase_letter | [bool](#bool) | | require_uppercase_letter requires the password must contains at least one upper case letter. |-| require_special_character | [bool](#bool) | | require_special_character requires the password must contains at least one special character. |-| require_reset_password_for_first_login | [bool](#bool) | | require_reset_password_for_first_login requires users to reset their password after the 1st login. |-| password_rotation | [google.protobuf.Duration](#google-protobuf-Duration) | | password_rotation requires users to reset their password after the duration. |--+| primary | [string](#string) | | The primary component of the Kerberos principal. |+| instance | [string](#string) | | The instance component of the Kerberos principal. |+| realm | [string](#string) | | The Kerberos realm. |+| keytab | [bytes](#bytes) | | The keytab file contents for authentication. |+| kdc_host | [string](#string) | | The hostname of the Key Distribution Center (KDC). |+| kdc_port | [string](#string) | | The port of the Key Distribution Center (KDC). |+| kdc_transport_protocol | [string](#string) | | The transport protocol for KDC communication (tcp or udp). |--<a name="bytebase-v1-AISetting-Provider"></a>-### AISetting.Provider+<a name="bytebase-v1-ListInstanceDatabaseRequest"></a>+### ListInstanceDatabaseRequest-| Name | Number | Description |-| ---- | ------ | ----------- |-| PROVIDER_UNSPECIFIED | 0 | |-| OPEN_AI | 1 | |-| CLAUDE | 2 | |-| GEMINI | 3 | |-| AZURE_OPENAI | 4 | |+| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| name | [string](#string) | | The name of the instance. Format: instances/{instance} |+| instance | [Instance](#bytebase-v1-Instance) | optional | The target instance. We need to set this field if the target instance is not created yet. |-<a name="bytebase-v1-Algorithm-InnerOuterMask-MaskType"></a>-### Algorithm.InnerOuterMask.MaskType-| Name | Number | Description |-| ---- | ------ | ----------- |-| MASK_TYPE_UNSPECIFIED | 0 | |-| INNER | 1 | |-| OUTER | 2 | |+<a name="bytebase-v1-ListInstanceDatabaseResponse"></a>-<a name="bytebase-v1-Announcement-AlertLevel"></a>+### ListInstanceDatabaseResponse-### Announcement.AlertLevel-We support three levels of AlertLevel: INFO, WARNING, and ERROR.-| Name | Number | Description |-| ---- | ------ | ----------- |-| ALERT_LEVEL_UNSPECIFIED | 0 | |-| INFO | 1 | |-| WARNING | 2 | |-| CRITICAL | 3 | |+| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| databases | [string](#string) | repeated | All database name list in the instance. |-<a name="bytebase-v1-DatabaseChangeMode"></a>-### DatabaseChangeMode-| Name | Number | Description |-| ---- | ------ | ----------- |-| DATABASE_CHANGE_MODE_UNSPECIFIED | 0 | |-| PIPELINE | 1 | A more advanced database change process, including custom approval workflows and other advanced features. Default to this mode. |-| EDITOR | 2 | A simple database change process in SQL editor. Users can execute SQL directly. |+<a name="bytebase-v1-ListInstancesRequest"></a>+### ListInstancesRequest-<a name="bytebase-v1-EmailSetting-SMTPConfig-Authentication"></a>-### EmailSetting.SMTPConfig.Authentication+| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| page_size | [int32](#int32) | | The maximum number of instances to return. The service may return fewer than this value. If unspecified, at most 10 instances 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 `ListInstances` call. Provide this to retrieve the subsequent page.-| Name | Number | Description |-| ---- | ------ | ----------- |-| AUTHENTICATION_UNSPECIFIED | 0 | |-| AUTHENTICATION_NONE | 1 | |-| PLAIN | 2 | |-| LOGIN | 3 | |-| CRAM_MD5 | 4 | |+When paginating, all other parameters provided to `ListInstances` must match the call that provided the page token. |+| show_deleted | [bool](#bool) | | Show deleted instances if specified. |+| filter | [string](#string) | | Filter the instance. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec+Supported filters: - name: the instance name, support "==" and ".contains()" operator. - resource_id: the instance id, support "==" and ".contains()" operator. - environment: the environment full name in "environments/{id}" format, support "==" operator. - state: the instance state, check State enum for values, support "==" operator. - engine: the instance engine, check Engine enum for values. Support "==", "in [xx]", "!(in [xx])" operator. - host: the instance host, support "==" and ".contains()" operator. - port: the instance port, support "==" and ".contains()" operator. - project: the project full name in "projects/{id}" format, support "==" operator. - labels.{key}: the instance label, support "==" and "in" operators.+For example: name == "sample instance" name.contains("sample") resource_id == "sample-instance" resource_id.contains("sample") state == "DELETED" environment == "environments/test" environment == "" (find instances which environment is not set) engine == "MYSQL" engine in ["MYSQL", "POSTGRES"] !(engine in ["MYSQL", "POSTGRES"]) host == "127.0.0.1" host.contains("127.0") port == "54321" port.contains("543") labels.org_group == "infrastructure" labels.environment in ["prod", "production"] project == "projects/sample-project" You can combine filter conditions like: name.contains("sample") && environment == "environments/test" host == "127.0.0.1" && port == "54321" |+| order_by | [string](#string) | | The order by of instances. Support title, environment. The default sorting order is ascending. For example: - order_by = "title" - order_by = "title desc" - order_by = "title desc, environment asc" |-<a name="bytebase-v1-EmailSetting-SMTPConfig-Encryption"></a>-### EmailSetting.SMTPConfig.Encryption-| Name | Number | Description |-| ---- | ------ | ----------- |-| ENCRYPTION_UNSPECIFIED | 0 | |-| ENCRYPTION_NONE | 1 | |-| STARTTLS | 2 | |-| SSL_TLS | 3 | |+<a name="bytebase-v1-ListInstancesResponse"></a>-<a name="bytebase-v1-EmailSetting-Type"></a>+### ListInstancesResponse-### EmailSetting.Type-| Name | Number | Description |-| ---- | ------ | ----------- |-| TYPE_UNSPECIFIED | 0 | |-| SMTP | 1 | |+| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| instances | [Instance](#bytebase-v1-Instance) | repeated | The instances 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-Setting-SettingName"></a>-### Setting.SettingName-| Name | Number | Description |-| ---- | ------ | ----------- |-| SETTING_NAME_UNSPECIFIED | 0 | |-| WORKSPACE_PROFILE | 1 | |-| WORKSPACE_APPROVAL | 2 | |-| APP_IM | 3 | |-| AI | 4 | |-| DATA_CLASSIFICATION | 5 | |-| SEMANTIC_TYPES | 6 | |-| ENVIRONMENT | 7 | |-| EMAIL | 8 | |+<a name="bytebase-v1-RemoveDataSourceRequest"></a>+### RemoveDataSourceRequest-<a name="bytebase-v1-WorkspaceApprovalSetting-Rule-Source"></a>-### WorkspaceApprovalSetting.Rule.Source+| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| name | [string](#string) | | The name of the instance to remove a data source from. Format: instances/{instance} |+| data_source | [DataSource](#bytebase-v1-DataSource) | | Identified by data source ID. Only READ_ONLY data source can be removed. |-| Name | Number | Description |-| ---- | ------ | ----------- |-| SOURCE_UNSPECIFIED | 0 | |-| CHANGE_DATABASE | 1 | |-| CREATE_DATABASE | 2 | |-| EXPORT_DATA | 3 | |-| REQUEST_ROLE | 4 | |-| REQUEST_ACCESS | 5 | |--+<a name="bytebase-v1-SASLConfig"></a>-<a name="bytebase-v1-SettingService"></a>+### SASLConfig-### SettingService-SettingService manages workspace-level settings and configurations.-| Method Name | Request Type | Response Type | Description |-| ----------- | ------------ | ------------- | ------------|-| ListSettings | [ListSettingsRequest](#bytebase-v1-ListSettingsRequest) | [ListSettingsResponse](#bytebase-v1-ListSettingsResponse) | Lists all workspace settings. Permissions required: bb.settings.list |-| GetSetting | [GetSettingRequest](#bytebase-v1-GetSettingRequest) | [Setting](#bytebase-v1-Setting) | Retrieves a workspace setting by name. Permissions required: bb.settings.get |-| UpdateSetting | [UpdateSettingRequest](#bytebase-v1-UpdateSettingRequest) | [Setting](#bytebase-v1-Setting) | Updates a workspace setting. Permissions required: bb.settings.set |-| TestEmailSetting | [TestEmailSettingRequest](#bytebase-v1-TestEmailSettingRequest) | [TestEmailSettingResponse](#bytebase-v1-TestEmailSettingResponse) | Sends a test email using the provided config (without persisting). Permissions required: bb.settings.set |-+| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| krb_config | [KerberosConfig](#bytebase-v1-KerberosConfig) | | Kerberos authentication configuration. |-<a name="v1_actuator_service-proto"></a>-<p align="right"><a href="#top">Top</a></p>-## v1/actuator_service.proto+<a name="bytebase-v1-SyncInstanceRequest"></a>-<a name="bytebase-v1-ActuatorInfo"></a>+### SyncInstanceRequest-### ActuatorInfo-System information and configuration for the Bytebase instance.-Actuator concept is similar to the Spring Boot Actuator.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| version | [string](#string) | | The Bytebase server version. |-| git_commit | [string](#string) | | The git commit hash of the build. |-| readonly | [bool](#bool) | | Whether the Bytebase instance is running in read-only mode. |-| saas | [bool](#bool) | | Whether the Bytebase instance is running in SaaS mode where some features cannot be edited by users. |-| demo | [bool](#bool) | | Whether the Bytebase instance is running in demo mode. |-| host | [string](#string) | | The host address of the Bytebase instance. |-| port | [string](#string) | | The port number of the Bytebase instance. |-| external_url | [string](#string) | | The external URL where users or webhook callbacks access Bytebase. |-| last_active_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | The last time any API call was made, refreshed on each request. |-| workspace | [string](#string) | | The unique identifier for the workspace. Format: workspaces/{id} |-| unlicensed_features | [string](#string) | repeated | List of features that are not licensed. |-| docker | [bool](#bool) | | Whether the Bytebase instance is running in Docker. |-| activated_user_count | [int32](#int32) | | The number of activated users. |-| activated_instance_count | [int32](#int32) | | The number of activated database instances. |-| total_instance_count | [int32](#int32) | | The total number of database instances. |-| enable_sample | [bool](#bool) | | Whether sample data setup is enabled. |-| external_url_from_flag | [bool](#bool) | | Whether the external URL is set via command-line flag (and thus cannot be changed via UI). |-| replica_count | [int32](#int32) | | The number of active replicas (servers sharing the same database). |-| restriction | [Restriction](#bytebase-v1-Restriction) | | |-| default_project | [string](#string) | | The default project for unassigned databases. Format: projects/{id} |-| user_count_in_iam | [int32](#int32) | | The number of users in the workspace IAM (for seat limit display). |+| name | [string](#string) | | The name of instance. Format: instances/{instance} |+| enable_full_sync | [bool](#bool) | | When full sync is enabled, all databases in the instance will be synchronized. Otherwise, only the instance metadata (such as the database list) and any newly discovered databases will be synced. |-<a name="bytebase-v1-DeleteCacheRequest"></a>+<a name="bytebase-v1-SyncInstanceResponse"></a>-### DeleteCacheRequest-Request message for deleting cache.+### SyncInstanceResponse++++| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| databases | [string](#string) | repeated | All database name list in the instance. |-<a name="bytebase-v1-GetActuatorInfoRequest"></a>+<a name="bytebase-v1-UndeleteInstanceRequest"></a>++### UndeleteInstanceRequest-### GetActuatorInfoRequest-Request message for getting actuator information.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | Optional. The workspace to scope the response to. Format: workspaces/{workspace} When unset, the workspace is resolved from the request context (self-hosted) or no workspace-scoped fields are returned (SaaS). |+| name | [string](#string) | | The name of the deleted instance. Format: instances/{instance} |-<a name="bytebase-v1-Restriction"></a>+<a name="bytebase-v1-UpdateDataSourceRequest"></a>-### Restriction+### UpdateDataSourceRequest| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| disallow_signup | [bool](#bool) | | Whether self-service user signup is disabled. |-| disallow_password_signin | [bool](#bool) | | Whether password-based signin is disabled (except for workspace admins). |-| password_restriction | [WorkspaceProfileSetting.PasswordRestriction](#bytebase-v1-WorkspaceProfileSetting-PasswordRestriction) | | Password complexity and restriction requirements. |-| allow_email_code_signin | [bool](#bool) | | Whether email + 6-digit code signin is enabled for this workspace. |-| password_reset_enabled | [bool](#bool) | | Whether password reset via email is available for this workspace. True when the workspace (or deployment) has an email setting configured. |+| name | [string](#string) | | The name of the instance to update a data source. Format: instances/{instance} |+| data_source | [DataSource](#bytebase-v1-DataSource) | | Identified by data source ID. |+| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | The list of fields to update. |+| validate_only | [bool](#bool) | | Validate only also tests the data source connection. |+| allow_missing | [bool](#bool) | | If set to true, and the data source is not found, a new data source will be created. In this situation, `update_mask` is ignored. |-<a name="bytebase-v1-SetupSampleRequest"></a>+<a name="bytebase-v1-UpdateInstanceRequest"></a>++### UpdateInstanceRequest+-### SetupSampleRequest-Request message for setting up sample data.+| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| instance | [Instance](#bytebase-v1-Instance) | | The instance to update.+The instance's `name` field is used to identify the instance to update. Format: instances/{instance} |+| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | The list of fields to update. |+| allow_missing | [bool](#bool) | | If set to true, and the instance is not found, a new instance will be created. In this situation, `update_mask` is ignored. |---<a name="bytebase-v1-ActuatorService"></a>+<a name="bytebase-v1-DataSource-AuthenticationType"></a>-### ActuatorService-ActuatorService manages system health and operational information.+### DataSource.AuthenticationType-| Method Name | Request Type | Response Type | Description |-| ----------- | ------------ | ------------- | ------------|-| GetActuatorInfo | [GetActuatorInfoRequest](#bytebase-v1-GetActuatorInfoRequest) | [ActuatorInfo](#bytebase-v1-ActuatorInfo) | Gets system information and health status of the Bytebase instance. When `name` is provided (or the workspace-scoped binding is used), the response includes workspace-scoped fields for that workspace. Permissions required: None |-| SetupSample | [SetupSampleRequest](#bytebase-v1-SetupSampleRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | Sets up sample data for demonstration and testing purposes. Permissions required: bb.projects.create |-| DeleteCache | [DeleteCacheRequest](#bytebase-v1-DeleteCacheRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | Clears the system cache to force data refresh. Permissions required: None |-+| Name | Number | Description |+| ---- | ------ | ----------- |+| AUTHENTICATION_UNSPECIFIED | 0 | |+| PASSWORD | 1 | |+| GOOGLE_CLOUD_SQL_IAM | 2 | |+| AWS_RDS_IAM | 3 | |+| AZURE_IAM | 4 | |-<a name="v1_ai_service-proto"></a>-<p align="right"><a href="#top">Top</a></p>+<a name="bytebase-v1-DataSource-RedisType"></a>-## v1/ai_service.proto+### DataSource.RedisType+| Name | Number | Description |+| ---- | ------ | ----------- |+| REDIS_TYPE_UNSPECIFIED | 0 | |+| STANDALONE | 1 | |+| SENTINEL | 2 | |+| CLUSTER | 3 | |-<a name="bytebase-v1-AIChatMessage"></a>-### AIChatMessage-A single message in the conversation.+<a name="bytebase-v1-DataSourceExternalSecret-AppRoleAuthOption-SecretType"></a>-| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| role | [AIChatMessageRole](#bytebase-v1-AIChatMessageRole) | | The role of the message sender. |-| content | [string](#string) | optional | The text content of the message. Optional for assistant messages that only contain tool calls. |-| tool_calls | [AIChatToolCall](#bytebase-v1-AIChatToolCall) | repeated | Tool calls made by the assistant. Only present in assistant messages. |-| tool_call_id | [string](#string) | optional | The ID of the tool call this message is responding to. Only present in tool messages. |+### DataSourceExternalSecret.AppRoleAuthOption.SecretType+| Name | Number | Description |+| ---- | ------ | ----------- |+| SECRET_TYPE_UNSPECIFIED | 0 | Unspecified secret type. |+| PLAIN | 1 | Plain text secret. |+| ENVIRONMENT | 2 | Secret from environment variable. |+<a name="bytebase-v1-DataSourceExternalSecret-AuthType"></a>-<a name="bytebase-v1-AIChatRequest"></a>+### DataSourceExternalSecret.AuthType-### AIChatRequest-Request message for AIService.Chat.+| Name | Number | Description |+| ---- | ------ | ----------- |+| AUTH_TYPE_UNSPECIFIED | 0 | Unspecified authentication type. |+| TOKEN | 1 | ref: https://developer.hashicorp.com/vault/docs/auth/token |+| VAULT_APP_ROLE | 2 | ref: https://developer.hashicorp.com/vault/docs/auth/approle |-| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| messages | [AIChatMessage](#bytebase-v1-AIChatMessage) | repeated | The conversation messages. |-| tool_definitions | [AIChatToolDefinition](#bytebase-v1-AIChatToolDefinition) | repeated | The tool definitions available to the AI. |+<a name="bytebase-v1-DataSourceExternalSecret-SecretType"></a>++### DataSourceExternalSecret.SecretType+++| Name | Number | Description |+| ---- | ------ | ----------- |+| SECRET_TYPE_UNSPECIFIED | 0 | Unspecified secret type. |+| VAULT_KV_V2 | 1 | ref: https://developer.hashicorp.com/vault/api-docs/secret/kv/kv-v2 |+| AWS_SECRETS_MANAGER | 2 | ref: https://docs.aws.amazon.com/secretsmanager/latest/userguide/intro.html |+| GCP_SECRET_MANAGER | 3 | ref: https://cloud.google.com/secret-manager/docs |+| AZURE_KEY_VAULT | 4 | ref: https://learn.microsoft.com/en-us/azure/key-vault/secrets/about-secrets |+<a name="bytebase-v1-DataSourceType"></a>-<a name="bytebase-v1-AIChatResponse"></a>+### DataSourceType-### AIChatResponse-Response message for AIService.Chat.+| Name | Number | Description |+| ---- | ------ | ----------- |+| DATA_SOURCE_UNSPECIFIED | 0 | Unspecified data source type. |+| ADMIN | 1 | Admin data source with write permissions. |+| READ_ONLY | 2 | Read-only data source for query operations. |-| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| content | [string](#string) | optional | The text content of the AI response. Optional when the response only contains tool calls. |-| tool_calls | [AIChatToolCall](#bytebase-v1-AIChatToolCall) | repeated | Tool calls the AI wants to make. |-| usage | [AIChatUsage](#bytebase-v1-AIChatUsage) | optional | Token usage for this provider call, when available. |+++<a name="bytebase-v1-InstanceService"></a>+### InstanceService+InstanceService manages database instances and their connections.-<a name="bytebase-v1-AIChatToolCall"></a>+| Method Name | Request Type | Response Type | Description |+| ----------- | ------------ | ------------- | ------------|+| GetInstance | [GetInstanceRequest](#bytebase-v1-GetInstanceRequest) | [Instance](#bytebase-v1-Instance) | Gets a database instance by name. Permissions required: bb.instances.get |+| ListInstances | [ListInstancesRequest](#bytebase-v1-ListInstancesRequest) | [ListInstancesResponse](#bytebase-v1-ListInstancesResponse) | Lists all database instances. Permissions required: bb.instances.list |+| CreateInstance | [CreateInstanceRequest](#bytebase-v1-CreateInstanceRequest) | [Instance](#bytebase-v1-Instance) | Creates a new database instance. Permissions required: bb.instances.create |+| UpdateInstance | [UpdateInstanceRequest](#bytebase-v1-UpdateInstanceRequest) | [Instance](#bytebase-v1-Instance) | Updates a database instance. Permissions required: bb.instances.update |+| DeleteInstance | [DeleteInstanceRequest](#bytebase-v1-DeleteInstanceRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | Deletes or soft-deletes a database instance. Permissions required: bb.instances.delete |+| UndeleteInstance | [UndeleteInstanceRequest](#bytebase-v1-UndeleteInstanceRequest) | [Instance](#bytebase-v1-Instance) | Restores a soft-deleted database instance. Permissions required: bb.instances.undelete |+| SyncInstance | [SyncInstanceRequest](#bytebase-v1-SyncInstanceRequest) | [SyncInstanceResponse](#bytebase-v1-SyncInstanceResponse) | Syncs database schemas and metadata from an instance. Permissions required: bb.instances.sync |+| ListInstanceDatabase | [ListInstanceDatabaseRequest](#bytebase-v1-ListInstanceDatabaseRequest) | [ListInstanceDatabaseResponse](#bytebase-v1-ListInstanceDatabaseResponse) | Lists all databases within an instance without creating them. Permissions required: bb.instances.get |+| BatchSyncInstances | [BatchSyncInstancesRequest](#bytebase-v1-BatchSyncInstancesRequest) | [BatchSyncInstancesResponse](#bytebase-v1-BatchSyncInstancesResponse) | Syncs multiple instances in a single request. Permissions required: bb.instances.sync |+| BatchUpdateInstances | [BatchUpdateInstancesRequest](#bytebase-v1-BatchUpdateInstancesRequest) | [BatchUpdateInstancesResponse](#bytebase-v1-BatchUpdateInstancesResponse) | Updates multiple instances in a single request. Permissions required: bb.instances.update |+| AddDataSource | [AddDataSourceRequest](#bytebase-v1-AddDataSourceRequest) | [Instance](#bytebase-v1-Instance) | Adds a read-only data source to an instance. Permissions required: bb.instances.update |+| RemoveDataSource | [RemoveDataSourceRequest](#bytebase-v1-RemoveDataSourceRequest) | [Instance](#bytebase-v1-Instance) | Removes a read-only data source from an instance. Permissions required: bb.instances.update |+| UpdateDataSource | [UpdateDataSourceRequest](#bytebase-v1-UpdateDataSourceRequest) | [Instance](#bytebase-v1-Instance) | Updates a data source configuration. Permissions required: bb.instances.update |-### AIChatToolCall-A tool call made by the AI.+-| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| id | [string](#string) | | The unique ID of this tool call. |-| name | [string](#string) | | The name of the tool to call. |-| arguments | [string](#string) | | The JSON-encoded arguments to pass to the tool. |-| metadata | [string](#string) | optional | Opaque provider-specific metadata (e.g., Gemini thought_signature). Frontend must echo this back unchanged when sending tool results. |+<a name="v1_database_service-proto"></a>+<p align="right"><a href="#top">Top</a></p>+## v1/database_service.proto+<a name="bytebase-v1-BatchGetDatabasesRequest"></a>-<a name="bytebase-v1-AIChatToolDefinition"></a>+### BatchGetDatabasesRequest-### AIChatToolDefinition-A tool definition that the AI can invoke.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The name of the tool. |-| description | [string](#string) | | A description of what the tool does. |-| parameters_schema | [string](#string) | | The JSON Schema describing the tool's parameters. |+| parent | [string](#string) | | The parent resource shared by all databases being retrieved. - projects/{project}: batch get databases in a project; - instances/{instances}: batch get databases in a instance; Use "-" as wildcard to batch get databases across parent. |+| names | [string](#string) | repeated | The list of database names to retrieve. |-<a name="bytebase-v1-AIChatUsage"></a>+<a name="bytebase-v1-BatchGetDatabasesResponse"></a>++### BatchGetDatabasesResponse-### AIChatUsage-Token usage for a single AI provider call.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| total_tokens | [int32](#int32) | | Total tokens used by the provider call. |+| databases | [Database](#bytebase-v1-Database) | repeated | The databases from the specified request. |-+<a name="bytebase-v1-BatchSyncDatabasesRequest"></a>-<a name="bytebase-v1-AIChatMessageRole"></a>+### BatchSyncDatabasesRequest-### AIChatMessageRole-Role of a chat message.-| Name | Number | Description |-| ---- | ------ | ----------- |-| AI_CHAT_MESSAGE_ROLE_UNSPECIFIED | 0 | Unspecified role. |-| AI_CHAT_MESSAGE_ROLE_SYSTEM | 1 | System message providing instructions. |-| AI_CHAT_MESSAGE_ROLE_USER | 2 | User message. |-| AI_CHAT_MESSAGE_ROLE_ASSISTANT | 3 | Assistant (AI) message. |-| AI_CHAT_MESSAGE_ROLE_TOOL | 4 | Tool result message. |+| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| parent | [string](#string) | | The parent resource shared by all databases being updated. Format: instances/{instance} If the operation spans parents, a dash (-) may be accepted as a wildcard. |+| names | [string](#string) | repeated | The list of database names to sync. |---<a name="bytebase-v1-AIService"></a>-### AIService-AIService provides AI chat capabilities for the page agent.-| Method Name | Request Type | Response Type | Description |-| ----------- | ------------ | ------------- | ------------|-| Chat | [AIChatRequest](#bytebase-v1-AIChatRequest) | [AIChatResponse](#bytebase-v1-AIChatResponse) | Chat sends a conversation with tool definitions to the configured AI provider and returns the AI response. |+<a name="bytebase-v1-BatchSyncDatabasesResponse"></a>-+### BatchSyncDatabasesResponse-<a name="v1_iam_policy-proto"></a>-<p align="right"><a href="#top">Top</a></p>-## v1/iam_policy.proto-<a name="bytebase-v1-Binding"></a>+<a name="bytebase-v1-BatchUpdateDatabasesRequest"></a>++### BatchUpdateDatabasesRequest-### Binding-Binding associates members with a role and optional conditions.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| role | [string](#string) | | The role that is assigned to the members. Format: roles/{role} |-| members | [string](#string) | repeated | Specifies the principals requesting access for a Bytebase resource. For users, the member should be: user:{email} For groups, the member should be: group:{email} For service accounts, the member should be: serviceAccount:{email} For workload identities, the member should be: workloadIdentity:{email} |-| condition | [google.type.Expr](#google-type-Expr) | | The condition that is associated with this binding, only used in the project IAM policy. If the condition evaluates to true, then this binding applies to the current request. If the condition evaluates to false, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec--Support variables: resource.database: the database full name in "instances/{instance}/databases/{database}" format, used by the "roles/sqlEditorUser" and "roles/sqlEditorReadUser" roles, support "==" operator. resource.schema_name: the schema name, used by the "roles/sqlEditorUser" and "roles/sqlEditorReadUser" roles, support "==" operator. resource.table_name: the table name, used by the "roles/sqlEditorUser" and "roles/sqlEditorReadUser" roles, support "==" operator. resource.environment_id: the environment to allow the DDL/DML operation in the SQL Editor, only works for the role with bb.sql.ddl or bb.sql.dml permissions. Support "in" operator. request.time: the expiration. Only support "<" operation in `request.time < timestamp("{ISO datetime string format}")`.+| parent | [string](#string) | | The parent resource shared by all databases being updated. Format: instances/{instance} If the operation spans parents, a dash (-) may be accepted as a wildcard. We only support updating the project of databases for now. |+| requests | [UpdateDatabaseRequest](#bytebase-v1-UpdateDatabaseRequest) | repeated | The request message specifying the resources to update. A maximum of 1000 databases can be modified in a batch. |-For example: resource.database == "instances/local-pg/databases/postgres" && resource.schema_name in ["public","another_schema"] resource.database == "instances/local-pg/databases/bytebase" && resource.schema_name == "public" && resource.table_name in ["audit_log"] resource.database == "instances/local-pg/databases/postgres" && resource.environment_id in ["test"] request.time < timestamp("2025-04-26T11:24:48.655Z") |-| parsed_expr | [google.api.expr.v1alpha1.Expr](#google-api-expr-v1alpha1-Expr) | | The parsed expression of the condition. |+<a name="bytebase-v1-BatchUpdateDatabasesResponse"></a>-<a name="bytebase-v1-BindingDelta"></a>+### BatchUpdateDatabasesResponse-### BindingDelta-A single change to a binding.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| action | [BindingDelta.Action](#bytebase-v1-BindingDelta-Action) | | The action that was performed on a Binding. |-| role | [string](#string) | | Role that is assigned to `members`. For example, `roles/projectOwner`. |-| member | [string](#string) | | Follows the same format of Binding.members. |-| condition | [google.type.Expr](#google-type-Expr) | | The condition that is associated with this binding. |+| databases | [Database](#bytebase-v1-Database) | repeated | Databases updated. |-<a name="bytebase-v1-GetIamPolicyRequest"></a>+<a name="bytebase-v1-BoundingBox"></a>-### GetIamPolicyRequest-Request message for getting an IAM policy.+### BoundingBox+BoundingBox defines the spatial bounds for GEOMETRY spatial indexes.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| resource | [string](#string) | | The name of the resource to get the IAM policy. Format: projects/{project} Format: workspaces/{workspace} |+| xmin | [double](#double) | | Minimum X coordinate |+| ymin | [double](#double) | | Minimum Y coordinate |+| xmax | [double](#double) | | Maximum X coordinate |+| ymax | [double](#double) | | Maximum Y coordinate |-<a name="bytebase-v1-IamPolicy"></a>+<a name="bytebase-v1-Changelog"></a>++### Changelog-### IamPolicy-IAM policy that binds members to roles.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| bindings | [Binding](#bytebase-v1-Binding) | repeated | Collection of binding. A binding binds one or more project members to a single project role. |-| etag | [string](#string) | | The current etag of the policy. If an etag is provided and does not match the current etag of the policy, the call will be blocked and an ABORTED error will be returned. |+| name | [string](#string) | | Format: instances/{instance}/databases/{database}/changelogs/{changelog} |+| create_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |+| status | [Changelog.Status](#bytebase-v1-Changelog-Status) | | |+| schema | [string](#string) | | |+| schema_size | [int64](#int64) | | |+| task_run | [string](#string) | | Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun} |+| plan_title | [string](#string) | | The title of the plan associated with this changelog's task run. This field is populated by deriving the plan from task_run for display purposes. |-<a name="bytebase-v1-PolicyDelta"></a>+<a name="bytebase-v1-CheckConstraintMetadata"></a>-### PolicyDelta-Describes changes between two IAM policies.+### CheckConstraintMetadata+CheckConstraintMetadata is the metadata for check constraints.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| binding_deltas | [BindingDelta](#bytebase-v1-BindingDelta) | repeated | The delta for Bindings between two policies. |+| name | [string](#string) | | The name is the name of a check constraint. |+| expression | [string](#string) | | The expression is the expression of a check constraint. |-<a name="bytebase-v1-SetIamPolicyRequest"></a>+<a name="bytebase-v1-ColumnMetadata"></a>-### SetIamPolicyRequest-Request message for setting an IAM policy.+### ColumnMetadata+ColumnMetadata is the metadata for columns.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| resource | [string](#string) | | The name of the resource to set the IAM policy. Format: projects/{project} Format: workspaces/{workspace} |-| policy | [IamPolicy](#bytebase-v1-IamPolicy) | | |-| etag | [string](#string) | | The current etag of the policy. |+| name | [string](#string) | | The name is the name of a column. |+| position | [int32](#int32) | | The position is the position in columns. |+| has_default | [bool](#bool) | | |+| default | [string](#string) | | The default value of column. |+| default_on_null | [bool](#bool) | | Oracle specific metadata. The default_on_null is the default on null of a column. |+| on_update | [string](#string) | | The on_update is the on update action of a column. For MySQL like databases, it's only supported for TIMESTAMP columns with CURRENT_TIMESTAMP as on update value. |+| nullable | [bool](#bool) | | The nullable is the nullable of a column. |+| type | [string](#string) | | The type is the type of a column. |+| character_set | [string](#string) | | The character_set is the character_set of a column. |+| collation | [string](#string) | | The collation is the collation of a column. |+| comment | [string](#string) | | The comment is the comment of a column. |+| generation | [GenerationMetadata](#bytebase-v1-GenerationMetadata) | | The generation is the generation of a column. |+| is_identity | [bool](#bool) | | |+| identity_generation | [ColumnMetadata.IdentityGeneration](#bytebase-v1-ColumnMetadata-IdentityGeneration) | | The identity_generation is for identity columns, PG only. |+| identity_seed | [int64](#int64) | | The identity_seed is for identity columns, MSSQL only. |+| identity_increment | [int64](#int64) | | The identity_increment is for identity columns, MSSQL only. |+| default_constraint_name | [string](#string) | | The default_constraint_name is the name of the default constraint, MSSQL only. In MSSQL, default values are implemented as named constraints. When modifying or dropping a column's default value, you must reference the constraint by name. This field stores the actual constraint name from the database.+Example: A column definition like: CREATE TABLE employees ( status NVARCHAR(20) DEFAULT 'active' )+Will create a constraint with an auto-generated name like 'DF__employees__statu__3B75D760' or a user-defined name if specified: ALTER TABLE employees ADD CONSTRAINT DF_employees_status DEFAULT 'active' FOR status+To modify the default, you must first drop the existing constraint by name: ALTER TABLE employees DROP CONSTRAINT DF__employees__statu__3B75D760 ALTER TABLE employees ADD CONSTRAINT DF_employees_status DEFAULT 'inactive' FOR status+This field is populated when syncing from the database. When empty (e.g., when parsing from SQL files), the system cannot automatically drop the constraint. |--<a name="bytebase-v1-BindingDelta-Action"></a>-### BindingDelta.Action-Type of action performed on a binding.-| Name | Number | Description |-| ---- | ------ | ----------- |-| ACTION_UNSPECIFIED | 0 | Unspecified action. |-| ADD | 1 | Add a binding. |-| REMOVE | 2 | Remove a binding. |+<a name="bytebase-v1-Database"></a>-+### Database--+| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| name | [string](#string) | | The name of the database. Format: instances/{instance}/databases/{database} {database} is the database name in the instance. |+| state | [State](#bytebase-v1-State) | | The existence of a database. |+| successful_sync_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | The latest synchronization time. |+| project | [string](#string) | | The project for a database. Format: projects/{project} |+| release | [string](#string) | | The release that was last applied to this database. Format: projects/{project}/releases/{release_id} Example: projects/my-project/releases/release_20260115-RC00 |+| environment | [string](#string) | optional | The environment resource. Format: environments/prod where prod is the environment resource ID. |+| effective_environment | [string](#string) | optional | The effective environment based on environment tag above and environment tag on the instance. Inheritance follows https://cloud.google.com/resource-manager/docs/tags/tags-overview. |+| labels | [Database.LabelsEntry](#bytebase-v1-Database-LabelsEntry) | repeated | Labels will be used for deployment and policy control. |+| instance_resource | [InstanceResource](#bytebase-v1-InstanceResource) | | The instance resource. |+| backup_available | [bool](#bool) | | The database is available for DML prior backup. |+| sync_status | [SyncStatus](#bytebase-v1-SyncStatus) | | The sync status of the database. |+| sync_error | [string](#string) | | The error message if sync failed. |-<a name="v1_audit_log_service-proto"></a>-<p align="right"><a href="#top">Top</a></p>-## v1/audit_log_service.proto-<a name="bytebase-v1-AuditData"></a>+<a name="bytebase-v1-Database-LabelsEntry"></a>++### Database.LabelsEntry-### AuditData-Additional audit data specific to certain operations.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| policy_delta | [PolicyDelta](#bytebase-v1-PolicyDelta) | | Changes to IAM policies. |+| key | [string](#string) | | |+| value | [string](#string) | | |-<a name="bytebase-v1-AuditLog"></a>+<a name="bytebase-v1-DatabaseMetadata"></a>-### AuditLog-Audit log entry recording system activity or API call.+### DatabaseMetadata+DatabaseMetadata is the metadata for databases.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The name of the log. Formats: - projects/{project}/auditLogs/{uid} - workspaces/{workspace}/auditLogs/{uid} |-| create_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | The timestamp when the audit log was created. |-| user | [string](#string) | | The user who performed the action. Format: users/{email} |-| method | [string](#string) | | The method or action being audited. For example: /bytebase.v1.SQLService/Query or bb.project.repository.push |-| severity | [AuditLog.Severity](#bytebase-v1-AuditLog-Severity) | | The severity level of this audit log entry. |-| resource | [string](#string) | | The resource associated with this audit log. |-| request | [string](#string) | | The request payload in JSON format. |-| response | [string](#string) | | The response payload in JSON format. Some fields may be omitted if they are too large or contain sensitive information. |-| status | [google.rpc.Status](#google-rpc-Status) | | The status of the operation. |-| latency | [google.protobuf.Duration](#google-protobuf-Duration) | | The duration of the operation. |-| service_data | [google.protobuf.Any](#google-protobuf-Any) | | Service-specific metadata about the request, response, and activities. |-| request_metadata | [RequestMetadata](#bytebase-v1-RequestMetadata) | | Metadata about the request context. |+| name | [string](#string) | | The database metadata name.++Format: instances/{instance}/databases/{database}/metadata |+| schemas | [SchemaMetadata](#bytebase-v1-SchemaMetadata) | repeated | The schemas is the list of schemas in a database. |+| character_set | [string](#string) | | The character_set is the character set of a database. |+| collation | [string](#string) | | The collation is the collation of a database. |+| extensions | [ExtensionMetadata](#bytebase-v1-ExtensionMetadata) | repeated | The extensions is the list of extensions in a database. |+| owner | [string](#string) | | The owner of the database. |+| search_path | [string](#string) | | The search_path is the search path of a PostgreSQL database. |-<a name="bytebase-v1-ExportAuditLogsRequest"></a>+<a name="bytebase-v1-DatabaseSDLSchema"></a>-### ExportAuditLogsRequest-Request message for exporting audit logs.+### DatabaseSDLSchema+DatabaseSDLSchema contains the schema in SDL format.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| parent | [string](#string) | | |-| filter | [string](#string) | | The filter of the log. It should be a valid CEL expression. Check the filter field in the SearchAuditLogsRequest message. |-| order_by | [string](#string) | | The order by of the log. Only support order by create_time. The default sorting order is ascending. For example: - order_by = "create_time asc" - order_by = "create_time desc" |-| format | [ExportFormat](#bytebase-v1-ExportFormat) | | The export format. |-| page_size | [int32](#int32) | | The maximum number of logs to return. The service may return fewer than this value. If unspecified, at most 10 log entries will be returned. The maximum value is 5000; values above 5000 will be coerced to 5000. |-| page_token | [string](#string) | | A page token, received from a previous `ExportAuditLogs` call. Provide this to retrieve the subsequent page. |+| schema | [bytes](#bytes) | | The SDL schema content. - For SINGLE_FILE format: contains the complete SDL schema as a text string. - For MULTI_FILE format: contains the ZIP archive as binary data. |+| content_type | [string](#string) | | The MIME type of the schema content. Indicates how the client should interpret the schema field. Examples: - "text/plain; charset=utf-8" for SINGLE_FILE format - "application/zip" for MULTI_FILE format |-<a name="bytebase-v1-ExportAuditLogsResponse"></a>+<a name="bytebase-v1-DatabaseSchema"></a>-### ExportAuditLogsResponse-Response message for exporting audit logs.+### DatabaseSchema+DatabaseSchema is the metadata for databases.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| content | [bytes](#bytes) | | The exported audit log content in the requested format. |-| next_page_token | [string](#string) | | A token to retrieve next page of log entities. Pass this value in the page_token field in the subsequent call to retrieve the next page of log entities. |+| schema | [string](#string) | | The schema dump from database. |-<a name="bytebase-v1-RequestMetadata"></a>+<a name="bytebase-v1-DependencyColumn"></a>-### RequestMetadata-Metadata about the incoming request.+### DependencyColumn+DependencyColumn is the metadata for dependency columns.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| caller_ip | [string](#string) | | The IP address of the request originator. |-| caller_supplied_user_agent | [string](#string) | | The user agent string provided by the caller. This is supplied by the client and is not authenticated. |+| schema | [string](#string) | | The schema is the schema of a reference column. |+| table | [string](#string) | | The table is the table of a reference column. |+| column | [string](#string) | | The column is the name of a reference column. |-<a name="bytebase-v1-SearchAuditLogsRequest"></a>+<a name="bytebase-v1-DependencyTable"></a>++### DependencyTable-### SearchAuditLogsRequest-Request message for searching audit logs.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| parent | [string](#string) | | |-| filter | [string](#string) | | The filter of the log. It should be a valid CEL expression. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec--Supported filter: - method: the API name, can be found in the docs, should start with "/bytebase.v1." prefix. For example "/bytebase.v1.UserService/CreateUser". Support "==" operator. - severity: support "==" operator, check Severity enum in AuditLog message for values. - user: the actor, should in "users/{email}" format, support "==" operator. - create_time: support ">=" and "<=" operator.+| schema | [string](#string) | | The schema is the schema of a reference table. |+| table | [string](#string) | | The table is the name of a reference table. |-For example: - filter = "method == '/bytebase.v1.SQLService/Query'" - filter = "method == '/bytebase.v1.SQLService/Query' && severity == 'ERROR'" - filter = "method == '/bytebase.v1.SQLService/Query' && severity == 'ERROR' && user == 'users/[email protected]'" - filter = "method == '/bytebase.v1.SQLService/Query' && severity == 'ERROR' && create_time <= '2021-01-01T00:00:00Z' && create_time >= '2020-01-01T00:00:00Z'" |-| order_by | [string](#string) | | The order by of the log. Only support order by create_time. The default sorting order is ascending. For example: - order_by = "create_time asc" - order_by = "create_time desc" |-| page_size | [int32](#int32) | | The maximum number of logs to return. The service may return fewer than this value. If unspecified, at most 10 log entries will be returned. The maximum value is 5000; values above 5000 will be coerced to 5000. |-| page_token | [string](#string) | | A page token, received from a previous `SearchLogs` call. Provide this to retrieve the subsequent page. |+<a name="bytebase-v1-DiffSchemaRequest"></a>-<a name="bytebase-v1-SearchAuditLogsResponse"></a>+### DiffSchemaRequest-### SearchAuditLogsResponse-Response message for searching audit logs.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| audit_logs | [AuditLog](#bytebase-v1-AuditLog) | repeated | |-| next_page_token | [string](#string) | | A token to retrieve next page of log entities. Pass this value in the page_token field in the subsequent call to retrieve the next page of log entities. |+| name | [string](#string) | | The name of the database or changelog. Format: database: instances/{instance}/databases/{database} changelog: instances/{instance}/databases/{database}/changelogs/{changelog} |+| schema | [string](#string) | | The target schema. |+| changelog | [string](#string) | | The resource name of the changelog Format: instances/{instance}/databases/{database}/changelogs/{changelog} |-+<a name="bytebase-v1-DiffSchemaResponse"></a>-<a name="bytebase-v1-AuditLog-Severity"></a>+### DiffSchemaResponse-### AuditLog.Severity-Severity level for audit log entries.-| Name | Number | Description |-| ---- | ------ | ----------- |-| SEVERITY_UNSPECIFIED | 0 | Unspecified severity level. |-| DEBUG | 1 | Debug-level information. |-| INFO | 2 | Informational messages. |-| NOTICE | 3 | Notable events. |-| WARNING | 4 | Warning conditions. |-| ERROR | 5 | Error conditions. |-| CRITICAL | 6 | Critical conditions. |-| ALERT | 7 | Action must be taken immediately. |-| EMERGENCY | 8 | System is unusable. |+| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| diff | [string](#string) | | |---<a name="bytebase-v1-AuditLogService"></a>-### AuditLogService-AuditLogService manages audit logs for system activities and API calls.-| Method Name | Request Type | Response Type | Description |-| ----------- | ------------ | ------------- | ------------|-| SearchAuditLogs | [SearchAuditLogsRequest](#bytebase-v1-SearchAuditLogsRequest) | [SearchAuditLogsResponse](#bytebase-v1-SearchAuditLogsResponse) | Searches audit logs with optional filtering and pagination. Permissions required: bb.auditLogs.search |-| ExportAuditLogs | [ExportAuditLogsRequest](#bytebase-v1-ExportAuditLogsRequest) | [ExportAuditLogsResponse](#bytebase-v1-ExportAuditLogsResponse) | Exports audit logs in a specified format for external analysis. Permissions required: bb.auditLogs.export |+<a name="bytebase-v1-DimensionConstraint"></a>-+### DimensionConstraint+DimensionConstraint defines constraints for a spatial dimension.+| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| dimension | [string](#string) | | Dimension name/type (X, Y, Z, M, etc.) |+| min_value | [double](#double) | | Minimum value for this dimension |+| max_value | [double](#double) | | Maximum value for this dimension |+| tolerance | [double](#double) | | Tolerance for this dimension |-<a name="v1_user_service-proto"></a>-<p align="right"><a href="#top">Top</a></p>-## v1/user_service.proto-<a name="bytebase-v1-BatchGetUsersRequest"></a>-### BatchGetUsersRequest+<a name="bytebase-v1-DimensionalConfig"></a>+### DimensionalConfig+DimensionalConfig defines dimensional and constraint parameters for spatial indexes.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| names | [string](#string) | repeated | The user names to retrieve. Format: users/{email} |+| dimensions | [int32](#int32) | | Number of dimensions (2-4, default 2) |+| data_type | [string](#string) | | Spatial data type (GEOMETRY, GEOGRAPHY, POINT, POLYGON, etc.) |+| srid | [int32](#int32) | | Spatial reference system identifier (SRID) |+| constraints | [DimensionConstraint](#bytebase-v1-DimensionConstraint) | repeated | Coordinate system constraints |-<a name="bytebase-v1-BatchGetUsersResponse"></a>+<a name="bytebase-v1-EnumTypeMetadata"></a>-### BatchGetUsersResponse+### EnumTypeMetadata| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| users | [User](#bytebase-v1-User) | repeated | The users from the specified request. |+| name | [string](#string) | | The name of a type. |+| values | [string](#string) | repeated | The enum values of a type. |+| comment | [string](#string) | | The comment describing the enum type. |+| skip_dump | [bool](#bool) | | Whether to skip this enum type during schema dump operations. |-<a name="bytebase-v1-CreateUserRequest"></a>+<a name="bytebase-v1-EventMetadata"></a>-### CreateUserRequest+### EventMetadata| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| user | [User](#bytebase-v1-User) | | The user to create. |-+| name | [string](#string) | | The name of the event. |+| definition | [string](#string) | | The schedule of the event. |+| time_zone | [string](#string) | | The time zone of the event. |+| sql_mode | [string](#string) | | The SQL mode setting for the event. |+| character_set_client | [string](#string) | | The character set used by the client creating the event. |+| collation_connection | [string](#string) | | The collation used for the connection when creating the event. |+| comment | [string](#string) | | The comment is the comment of an event. |-<a name="bytebase-v1-DeleteUserRequest"></a>-### DeleteUserRequest+<a name="bytebase-v1-ExtensionMetadata"></a>+### ExtensionMetadata+ExtensionMetadata is the metadata for extensions.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The name of the user to delete. Format: users/{email} |+| name | [string](#string) | | The name is the name of an extension. |+| schema | [string](#string) | | The schema is the extension that is installed to. But the extension usage is not limited to the schema. |+| version | [string](#string) | | The version is the version of an extension. |+| description | [string](#string) | | The description is the description of an extension. |-<a name="bytebase-v1-GetUserRequest"></a>+<a name="bytebase-v1-ExternalTableMetadata"></a>-### GetUserRequest+### ExternalTableMetadata| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The name of the user to retrieve. Format: users/{email} |-+| name | [string](#string) | | The name is the name of a external table. |+| external_server_name | [string](#string) | | The external_server_name is the name of the external server. |+| external_database_name | [string](#string) | | The external_database_name is the name of the external database. |+| columns | [ColumnMetadata](#bytebase-v1-ColumnMetadata) | repeated | The columns is the ordered list of columns in a foreign table. |-<a name="bytebase-v1-ListUsersRequest"></a>-### ListUsersRequest+<a name="bytebase-v1-ForeignKeyMetadata"></a>+### ForeignKeyMetadata+ForeignKeyMetadata is the metadata for foreign keys.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| page_size | [int32](#int32) | | The maximum number of users to return. The service may return fewer than this value. If unspecified, at most 10 users 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 `ListUsers` call. Provide this to retrieve the subsequent page.--When paginating, all other parameters provided to `ListUsers` must match the call that provided the page token. |-| show_deleted | [bool](#bool) | | Show deleted users if specified. |-| filter | [string](#string) | | Filter is used to filter users returned in the list. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec--Supported filter: - name: the user name, support "==" and ".contains()" operator. - email: the user email, support "==" and ".contains()" operator. - state: check State enum for values, support "==" operator. - project: the project full name in "projects/{id}" format, support "==" operator.--For example: name == "ed" name.contains("ed") email == "[email protected]" email.contains("ed") state == "DELETED" project == "projects/sample-project" You can combine filter conditions like: name.contains("ed") && project == "projects/sample-project" (name == "ed" || email == "[email protected]") && project == "projects/sample-project" |-+| name | [string](#string) | | The name is the name of a foreign key. |+| columns | [string](#string) | repeated | The columns are the ordered referencing columns of a foreign key. |+| referenced_schema | [string](#string) | | The referenced_schema is the referenced schema name of a foreign key. It is an empty string for databases without such concept such as MySQL. |+| referenced_table | [string](#string) | | The referenced_table is the referenced table name of a foreign key. |+| referenced_columns | [string](#string) | repeated | The referenced_columns are the ordered referenced columns of a foreign key. |+| on_delete | [string](#string) | | The on_delete is the on delete action of a foreign key. |+| on_update | [string](#string) | | The on_update is the on update action of a foreign key. |+| match_type | [string](#string) | | The match_type is the match type of a foreign key. The match_type is the PostgreSQL specific field. It's empty string for other databases. |-<a name="bytebase-v1-ListUsersResponse"></a>-### ListUsersResponse+<a name="bytebase-v1-FunctionMetadata"></a>+### FunctionMetadata+FunctionMetadata is the metadata for functions.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| users | [User](#bytebase-v1-User) | repeated | The users 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. |--+| name | [string](#string) | | The name is the name of a function. |+| definition | [string](#string) | | The definition is the definition of a function. |+| signature | [string](#string) | | The signature is the name with the number and type of input arguments the function takes. |+| character_set_client | [string](#string) | | MySQL specific metadata. |+| collation_connection | [string](#string) | | |+| database_collation | [string](#string) | | |+| sql_mode | [string](#string) | | |+| comment | [string](#string) | | |+| dependency_tables | [DependencyTable](#bytebase-v1-DependencyTable) | repeated | The dependency_tables is the list of dependency tables of a function. For PostgreSQL, it's the list of tables that the function depends on the return type definition. |+| skip_dump | [bool](#bool) | | |-<a name="bytebase-v1-UndeleteUserRequest"></a>-### UndeleteUserRequest++<a name="bytebase-v1-GenerationMetadata"></a>++### GenerationMetadata| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The name of the deleted user. Format: users/{email} |+| type | [GenerationMetadata.Type](#bytebase-v1-GenerationMetadata-Type) | | |+| expression | [string](#string) | | |-<a name="bytebase-v1-UpdateEmailRequest"></a>+<a name="bytebase-v1-GetChangelogRequest"></a>-### UpdateEmailRequest+### GetChangelogRequest| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The name of the user whose email to update. Format: users/{email} Note: This is the current (old) email address. The new email is specified in the 'email' field. |-| email | [string](#string) | | The new email address. |+| name | [string](#string) | | The name of the changelog to retrieve. Format: instances/{instance}/databases/{database}/changelogs/{changelog} |+| view | [ChangelogView](#bytebase-v1-ChangelogView) | | |-<a name="bytebase-v1-UpdateUserRequest"></a>+<a name="bytebase-v1-GetDatabaseMetadataRequest"></a>-### UpdateUserRequest+### GetDatabaseMetadataRequest| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| user | [User](#bytebase-v1-User) | | The user to update.+| name | [string](#string) | | The name of the database to retrieve metadata. Format: instances/{instance}/databases/{database}/metadata |+| filter | [string](#string) | | Filter is used to filter databases returned in the list. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec-The user's `name` field is used to identify the user to update. Format: users/{email} |-| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | The list of fields to update. |-| otp_code | [string](#string) | optional | The otp_code is used to verify the user's identity by MFA. |-| regenerate_temp_mfa_secret | [bool](#bool) | | The regenerate_temp_mfa_secret flag means to regenerate temporary MFA secret for user. This is used for MFA setup. The temporary MFA secret and recovery codes will be returned in the response. |-| regenerate_recovery_codes | [bool](#bool) | | The regenerate_recovery_codes flag means to regenerate recovery codes for user. |-| allow_missing | [bool](#bool) | | If set to true, and the user is not found, a new user will be created. In this situation, `update_mask` is ignored. |+Supported filter: - schema: the schema name, support "==" operator. - table: the table name, support "==" and ".contains()" operator.+For example: schema == "schema-a" table == "table-a" table.contains("table-a") schema == "schema-a" && table.contains("sample") The filter is used to search for tables containing "sample" in the schema "schemas/schema-a". The column masking level will only be returned when a table filter is used. |+| limit | [int32](#int32) | | Limit the response size of returned table metadata per schema. For example, if the database has 3 schemas, and each schema has 100 tables, if limit is 20, then only 20 tables will be returned for each schema, total 60 tables. Default 0, means no limit. |-<a name="bytebase-v1-User"></a>-### User+<a name="bytebase-v1-GetDatabaseRequest"></a>++### GetDatabaseRequest| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The name of the user. Format: users/{email} |-| state | [State](#bytebase-v1-State) | | The lifecycle state of the user account. |-| email | [string](#string) | | The email address of the user, used for login and notifications. |-| title | [string](#string) | | The display title or full name of the user. |-| password | [string](#string) | | The password for authentication. Only used during user creation or password updates. |-| service_key | [string](#string) | | The service key for service account authentication. |-| mfa_enabled | [bool](#bool) | | The mfa_enabled flag means if the user has enabled MFA. |-| temp_otp_secret | [string](#string) | | Temporary OTP secret used during MFA setup and regeneration. |-| temp_recovery_codes | [string](#string) | repeated | Temporary recovery codes used during MFA setup and regeneration. |-| temp_otp_secret_created_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | Timestamp when temp_otp_secret was created. Used by frontend to show countdown timer. |-| phone | [string](#string) | | Should be a valid E.164 compliant phone number. Could be empty. |-| profile | [User.Profile](#bytebase-v1-User-Profile) | | User profile metadata. |-| groups | [string](#string) | repeated | The groups for the user. Format: groups/{email} |-| workspace | [string](#string) | | The current workspace. Format: workspaces/{id} |+| name | [string](#string) | | The name of the database to retrieve. Format: instances/{instance}/databases/{database} |-<a name="bytebase-v1-User-Profile"></a>+<a name="bytebase-v1-GetDatabaseSDLSchemaRequest"></a>-### User.Profile+### GetDatabaseSDLSchemaRequest| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| last_login_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | The last time the user successfully logged in. |-| last_change_password_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | The last time the user changed their password. |-| source | [string](#string) | | source means where the user comes from. For now we support Entra ID SCIM sync, so the source could be Entra ID. |---+| name | [string](#string) | | The name of the database to retrieve SDL schema. Format: instances/{instance}/databases/{database}/sdlSchema |+| format | [GetDatabaseSDLSchemaRequest.SDLFormat](#bytebase-v1-GetDatabaseSDLSchemaRequest-SDLFormat) | | The format of the SDL schema output. |----<a name="bytebase-v1-UserService"></a>+<a name="bytebase-v1-GetDatabaseSchemaRequest"></a>-### UserService-UserService manages user accounts and authentication.+### GetDatabaseSchemaRequest-| Method Name | Request Type | Response Type | Description |-| ----------- | ------------ | ------------- | ------------|-| GetUser | [GetUserRequest](#bytebase-v1-GetUserRequest) | [User](#bytebase-v1-User) | Get the user. Any authenticated user can get the user. Permissions required: bb.users.get |-| BatchGetUsers | [BatchGetUsersRequest](#bytebase-v1-BatchGetUsersRequest) | [BatchGetUsersResponse](#bytebase-v1-BatchGetUsersResponse) | Get the users in batch. Any authenticated user can batch get users. Permissions required: bb.users.get |-| GetCurrentUser | [.google.protobuf.Empty](#google-protobuf-Empty) | [User](#bytebase-v1-User) | Get the current authenticated user. Permissions required: None |-| ListUsers | [ListUsersRequest](#bytebase-v1-ListUsersRequest) | [ListUsersResponse](#bytebase-v1-ListUsersResponse) | List all users. Any authenticated user can list users. Permissions required: bb.users.list |-| CreateUser | [CreateUserRequest](#bytebase-v1-CreateUserRequest) | [User](#bytebase-v1-User) | Creates a user in the caller's workspace (admin action, self-hosted only). In SaaS mode, admins should add users via workspace IAM policy instead. Permissions required: bb.users.create |-| UpdateUser | [UpdateUserRequest](#bytebase-v1-UpdateUserRequest) | [User](#bytebase-v1-User) | Updates a user. Users can update their own profile, or users with bb.users.update permission can update any user. Note: Email updates are not supported through this API. Use UpdateEmail instead. Permissions required: bb.users.update (or self) |-| DeleteUser | [DeleteUserRequest](#bytebase-v1-DeleteUserRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | Deletes a user. Requires bb.users.delete permission with additional validation: the last remaining workspace admin cannot be deleted. Permissions required: bb.users.delete |-| UndeleteUser | [UndeleteUserRequest](#bytebase-v1-UndeleteUserRequest) | [User](#bytebase-v1-User) | Restores a deleted user. Permissions required: bb.users.undelete |-| UpdateEmail | [UpdateEmailRequest](#bytebase-v1-UpdateEmailRequest) | [User](#bytebase-v1-User) | Updates a user's email address. Permissions required: bb.users.updateEmail |-+| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| name | [string](#string) | | The name of the database to retrieve schema. Format: instances/{instance}/databases/{database}/schema |-<a name="v1_auth_service-proto"></a>-<p align="right"><a href="#top">Top</a></p>-## v1/auth_service.proto-<a name="bytebase-v1-ExchangeTokenRequest"></a>+<a name="bytebase-v1-GetSchemaStringRequest"></a>-### ExchangeTokenRequest+### GetSchemaStringRequest| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| token | [string](#string) | | External OIDC token (JWT) from CI/CD platform. |-| email | [string](#string) | | Workload Identity email for identifying which identity to authenticate as. Format: {name}@workload.bytebase.com |+| name | [string](#string) | | The name of the database. Format: instances/{instance}/databases/{database} |+| type | [GetSchemaStringRequest.ObjectType](#bytebase-v1-GetSchemaStringRequest-ObjectType) | | |+| schema | [string](#string) | | It's empty for DATABASE. |+| object | [string](#string) | | It's empty for DATABASE and SCHEMA. |+| metadata | [DatabaseMetadata](#bytebase-v1-DatabaseMetadata) | | If use the metadata to generate the schema string, the type is OBJECT_TYPE_UNSPECIFIED. Also the schema and object are empty. |-<a name="bytebase-v1-ExchangeTokenResponse"></a>+<a name="bytebase-v1-GetSchemaStringResponse"></a>-### ExchangeTokenResponse+### GetSchemaStringResponse| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| access_token | [string](#string) | | Bytebase access token. |+| schema_string | [string](#string) | | |-<a name="bytebase-v1-IdentityProviderContext"></a>+<a name="bytebase-v1-GridLevel"></a>-### IdentityProviderContext-Context for identity provider authentication.+### GridLevel+GridLevel defines a tessellation grid level with its density.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| oauth2_context | [OAuth2IdentityProviderContext](#bytebase-v1-OAuth2IdentityProviderContext) | | OAuth2 authentication context. |-| oidc_context | [OIDCIdentityProviderContext](#bytebase-v1-OIDCIdentityProviderContext) | | OpenID Connect authentication context. |-+| level | [int32](#int32) | | Grid level number (1-4 for SQL Server) |+| density | [string](#string) | | Grid density (LOW, MEDIUM, HIGH) |-<a name="bytebase-v1-LoginRequest"></a>-### LoginRequest+<a name="bytebase-v1-IndexMetadata"></a>+### IndexMetadata+IndexMetadata is the metadata for indexes.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| email | [string](#string) | | User's email address. |-| password | [string](#string) | | User's password for authentication. |-| web | [bool](#bool) | | If true, sets access token and refresh token as HTTP-only cookies instead of returning the token in the response body. Use for browser-based clients. |-| idp_name | [string](#string) | | The name of the identity provider. Format: idps/{idp} |-| idp_context | [IdentityProviderContext](#bytebase-v1-IdentityProviderContext) | | The idp_context is used to get the user information from identity provider. |-| otp_code | [string](#string) | optional | The otp_code is used to verify the user's identity by MFA. |-| recovery_code | [string](#string) | optional | The recovery_code is used to recovery the user's identity with MFA. |-| mfa_temp_token | [string](#string) | optional | The mfa_temp_token is used to verify the user's identity by MFA. |-| email_code | [string](#string) | optional | 6-digit code from email for passwordless login/signup. Pairs with `email`. Mutually exclusive with `password` and `idp_name`. |-| workspace | [string](#string) | optional | Preferred workspace to land in after login. If the user is a member of this workspace, the token is issued for it; otherwise falls back to the default resolution (last login workspace → first membership). Typically populated from the ?workspace= query parameter in invite links. Format: workspaces/{workspace} |+| name | [string](#string) | | The name is the name of an index. |+| expressions | [string](#string) | repeated | The expressions are the ordered columns or expressions of an index. This could refer to a column or an expression. |+| key_length | [int64](#int64) | repeated | The key_lengths are the ordered key lengths of an index. If the key length is not specified, it's -1. |+| descending | [bool](#bool) | repeated | The descending is the ordered descending of an index. |+| type | [string](#string) | | The type is the type of an index. |+| unique | [bool](#bool) | | The unique is whether the index is unique. |+| primary | [bool](#bool) | | The primary is whether the index is a primary key index. |+| visible | [bool](#bool) | | The visible is whether the index is visible. |+| comment | [string](#string) | | The comment is the comment of an index. |+| definition | [string](#string) | | The definition of an index. |+| parent_index_schema | [string](#string) | | The schema name of the parent index. |+| parent_index_name | [string](#string) | | The index name of the parent index. |+| granularity | [int64](#int64) | | The number of granules in the block. It's a ClickHouse specific field. |+| is_constraint | [bool](#bool) | | It's a PostgreSQL specific field. The unique constraint and unique index are not the same thing in PostgreSQL. |+| spatial_config | [SpatialIndexConfig](#bytebase-v1-SpatialIndexConfig) | | Spatial index configuration for spatial databases like SQL Server, PostgreSQL with PostGIS, etc. |+| opclass_names | [string](#string) | repeated | https://www.postgresql.org/docs/current/catalog-pg-opclass.html Name of the operator class for each column. (PostgreSQL specific). |+| opclass_defaults | [bool](#bool) | repeated | True if the operator class is the default. (PostgreSQL specific). |-<a name="bytebase-v1-LoginResponse"></a>+<a name="bytebase-v1-ListChangelogsRequest"></a>-### LoginResponse+### ListChangelogsRequest| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| token | [string](#string) | | Access token for authenticated requests. Only returned when web=false. For web=true, the token is set as an HTTP-only cookie. |-| mfa_temp_token | [string](#string) | optional | Temporary token for MFA verification. |-| require_reset_password | [bool](#bool) | | Whether user must reset password before continuing. |-| user | [User](#bytebase-v1-User) | | The user from the successful login. |---+| parent | [string](#string) | | The parent of the changelogs. Format: instances/{instance}/databases/{database} |+| page_size | [int32](#int32) | | The maximum number of changelogs to return. The service may return fewer than this value. If unspecified, at most 10 changelogs 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 the previous call. Provide this to retrieve the subsequent page.+When paginating, all other parameters provided must match the call that provided the page token. |+| view | [ChangelogView](#bytebase-v1-ChangelogView) | | |+| filter | [string](#string) | | Filter is used to filter changelogs returned in the list. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec+Supported filter: - status: the changelog status, support "==" operation. check Changelog.Status for available values. - create_time: the changelog create time in "2006-01-02T15:04:05Z07:00" format, support ">=" or "<=" operator.-<a name="bytebase-v1-LogoutRequest"></a>+Example: status == "DONE" status == "FAILED" && type == "SDL" create_time >= "2024-01-01T00:00:00Z" && create_time <= "2024-01-02T00:00:00Z" |-### LogoutRequest-Request to logout current user session.+<a name="bytebase-v1-ListChangelogsResponse"></a>-<a name="bytebase-v1-OAuth2IdentityProviderContext"></a>+### ListChangelogsResponse-### OAuth2IdentityProviderContext-OAuth2 authentication context.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| code | [string](#string) | | Authorization code from OAuth2 provider. |+| changelogs | [Changelog](#bytebase-v1-Changelog) | repeated | The list of changelogs. |+| 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-OIDCIdentityProviderContext"></a>+<a name="bytebase-v1-ListDatabasesRequest"></a>++### ListDatabasesRequest-### OIDCIdentityProviderContext-OpenID Connect authentication context.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| code | [string](#string) | | Authorization code from OIDC provider. |-+| parent | [string](#string) | | - projects/{project}: list databases in a project, require "bb.projects.get" permission. - workspaces/{id}: list databases in the workspace, require "bb.databases.list" permission. - instances/{instances}: list databases in a instance, require "bb.instances.get" permission |+| page_size | [int32](#int32) | | The maximum number of databases to return. The service may return fewer than this value. If unspecified, at most 10 databases 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 `ListDatabases` call. Provide this to retrieve the subsequent page.+When paginating, all other parameters provided to `ListDatabases` must match the call that provided the page token. |+| filter | [string](#string) | | Filter is used to filter databases returned in the list. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec+Supported filter: - environment: the environment full name in "environments/{id}" format, support "==" operator. - name: the database name, support ".contains()" operator. - project: the project full name in "projects/{id}" format, support "==" operator. - instance: the instance full name in "instances/{id}" format, support "==" operator. - engine: the database engine, check Engine enum for values. Support "==", "in [xx]", "!(in [xx])" operator. - exclude_unassigned: should be "true" or "false", will not show unassigned databases if it's true, support "==" operator. - table: filter by the database table, support "==" and ".contains()" operator. - labels.{key}: the database label, support "==" and "in" operators.+For example: environment == "environments/{environment resource id}" environment == "" (find databases which environment is not set) project == "projects/{project resource id}" instance == "instances/{instance resource id}" name.contains("database name") engine == "MYSQL" engine in ["MYSQL", "POSTGRES"] !(engine in ["MYSQL", "POSTGRES"]) exclude_unassigned == true table == "sample" table.contains("sam") labels.environment == "production" labels.region == "asia" labels.region in ["asia", "europe"]+You can combine filter conditions like: environment == "environments/prod" && name.contains("employee") |+| show_deleted | [bool](#bool) | | Show deleted database if specified. |+| order_by | [string](#string) | | The order by of databases. Support name, project, instance. The default sorting order is ascending. For example: - order_by = "name" - order by name ascending - order_by = "name desc" - order_by = "name desc, project asc" |-<a name="bytebase-v1-RefreshRequest"></a>-### RefreshRequest-Request to refresh the access token.+<a name="bytebase-v1-ListDatabasesResponse"></a>+### ListDatabasesResponse-<a name="bytebase-v1-RefreshResponse"></a>-### RefreshResponse-Response from refreshing the access token.+| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| databases | [Database](#bytebase-v1-Database) | repeated | The databases 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-RequestPasswordResetRequest"></a>-### RequestPasswordResetRequest+<a name="bytebase-v1-MaterializedViewMetadata"></a>+### MaterializedViewMetadata+MaterializedViewMetadata is the metadata for materialized views.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| email | [string](#string) | | The email address of the account to reset. |-| workspace | [string](#string) | optional | Optional workspace context captured at send time, used to locate the EMAIL setting, and later (at verify time) for signup gate checks and workspace assignment. Unset for SaaS brand-new signup (no workspace exists yet). Format: workspaces/{workspace} |-+| name | [string](#string) | | The name is the name of a materialized view. |+| definition | [string](#string) | | The definition is the definition of a materialized view. |+| comment | [string](#string) | | The comment is the comment of a materialized view. |+| dependency_columns | [DependencyColumn](#bytebase-v1-DependencyColumn) | repeated | The dependency_columns is the list of dependency columns of a materialized view. |+| triggers | [TriggerMetadata](#bytebase-v1-TriggerMetadata) | repeated | The columns is the ordered list of columns in a table. |+| indexes | [IndexMetadata](#bytebase-v1-IndexMetadata) | repeated | The indexes is the list of indexes in a table. |+| skip_dump | [bool](#bool) | | |-<a name="bytebase-v1-ResetPasswordRequest"></a>-### ResetPasswordRequest+<a name="bytebase-v1-PackageMetadata"></a>+### PackageMetadata+PackageMetadata is the metadata for packages.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| email | [string](#string) | | The email address of the account. |-| code | [string](#string) | | The 6-digit code from the reset email. |-| new_password | [string](#string) | | The new password to set. |-+| name | [string](#string) | | The name is the name of a package. |+| definition | [string](#string) | | The definition is the definition of a package. |-<a name="bytebase-v1-SendEmailLoginCodeRequest"></a>-### SendEmailLoginCodeRequest+<a name="bytebase-v1-ProcedureMetadata"></a>+### ProcedureMetadata+ProcedureMetadata is the metadata for procedures.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| email | [string](#string) | | The email address to send the code to. |-| workspace | [string](#string) | optional | Optional workspace context captured at send time, used to locate the EMAIL setting, and later (at verify time) for signup gate checks and workspace assignment. Unset for SaaS brand-new signup (no workspace exists yet). Format: workspaces/{workspace} |--+| name | [string](#string) | | The name is the name of a procedure. |+| definition | [string](#string) | | The definition is the definition of a procedure. |+| signature | [string](#string) | | The signature is the name with the number and type of input arguments the procedure takes. |+| character_set_client | [string](#string) | | MySQL specific metadata. |+| collation_connection | [string](#string) | | |+| database_collation | [string](#string) | | |+| sql_mode | [string](#string) | | |+| comment | [string](#string) | | The comment is the comment of a procedure. |+| skip_dump | [bool](#bool) | | |-<a name="bytebase-v1-SignupRequest"></a>-### SignupRequest+<a name="bytebase-v1-SchemaMetadata"></a>++### SchemaMetadata+SchemaMetadata is the metadata for schemas.+This is the concept of schema in Postgres, but it's a no-op for MySQL.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| email | [string](#string) | | The email for the new account. |-| password | [string](#string) | | The password for the new account. |-| title | [string](#string) | | The display name of the user. |+| name | [string](#string) | | The name is the schema name. It is an empty string for databases without such concept such as MySQL. |+| tables | [TableMetadata](#bytebase-v1-TableMetadata) | repeated | The tables is the list of tables in a schema. |+| external_tables | [ExternalTableMetadata](#bytebase-v1-ExternalTableMetadata) | repeated | The external_tables is the list of external tables in a schema. |+| views | [ViewMetadata](#bytebase-v1-ViewMetadata) | repeated | The views is the list of views in a schema. |+| functions | [FunctionMetadata](#bytebase-v1-FunctionMetadata) | repeated | The functions is the list of functions in a schema. |+| procedures | [ProcedureMetadata](#bytebase-v1-ProcedureMetadata) | repeated | The procedures is the list of procedures in a schema. |+| streams | [StreamMetadata](#bytebase-v1-StreamMetadata) | repeated | The streams is the list of streams in a schema, currently, only used for Snowflake. |+| tasks | [TaskMetadata](#bytebase-v1-TaskMetadata) | repeated | The routines is the list of routines in a schema, currently, only used for Snowflake. |+| materialized_views | [MaterializedViewMetadata](#bytebase-v1-MaterializedViewMetadata) | repeated | The materialized_views is the list of materialized views in a schema. |+| packages | [PackageMetadata](#bytebase-v1-PackageMetadata) | repeated | The packages is the list of packages in a schema. |+| owner | [string](#string) | | The owner of the schema. |+| sequences | [SequenceMetadata](#bytebase-v1-SequenceMetadata) | repeated | The sequences is the list of sequences in a schema, sorted by name. |+| events | [EventMetadata](#bytebase-v1-EventMetadata) | repeated | The events is the list of scheduled events in a schema. |+| enum_types | [EnumTypeMetadata](#bytebase-v1-EnumTypeMetadata) | repeated | The enum_types is the list of user-defined enum types in a schema. |+| skip_dump | [bool](#bool) | | Whether to skip this schema during schema dump operations. |+| comment | [string](#string) | | The comment is the comment of a schema. |-<a name="bytebase-v1-SwitchWorkspaceRequest"></a>+<a name="bytebase-v1-SequenceMetadata"></a>-### SwitchWorkspaceRequest+### SequenceMetadata| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| workspace | [string](#string) | | The target workspace to switch to. Format: workspaces/{workspace} |-| web | [bool](#bool) | | If true, sets tokens as HTTP-only cookies (browser clients). |-| otp_code | [string](#string) | optional | OTP code for MFA verification. Required if the target workspace enforces MFA. |-| recovery_code | [string](#string) | optional | Recovery code for MFA verification (alternative to otp_code). |-| mfa_temp_token | [string](#string) | optional | Temporary MFA token from a previous SwitchWorkspace call that returned mfa_temp_token. |----+| name | [string](#string) | | The name of a sequence. |+| data_type | [string](#string) | | The data type of a sequence. |+| start | [string](#string) | | The start value of a sequence. |+| min_value | [string](#string) | | The minimum value of a sequence. |+| max_value | [string](#string) | | The maximum value of a sequence. |+| increment | [string](#string) | | Increment value of a sequence. |+| cycle | [bool](#bool) | | Cycle is whether the sequence cycles. |+| cache_size | [string](#string) | | Cache size of a sequence. |+| last_value | [string](#string) | | Last value of a sequence. |+| owner_table | [string](#string) | | The owner table of the sequence. |+| owner_column | [string](#string) | | The owner column of the sequence. |+| comment | [string](#string) | | The comment describing the sequence. |+| skip_dump | [bool](#bool) | | Whether to skip this sequence during schema dump operations. |----<a name="bytebase-v1-AuthService"></a>-### AuthService-AuthService handles user authentication operations.+<a name="bytebase-v1-SpatialIndexConfig"></a>-| Method Name | Request Type | Response Type | Description |-| ----------- | ------------ | ------------- | ------------|-| Login | [LoginRequest](#bytebase-v1-LoginRequest) | [LoginResponse](#bytebase-v1-LoginResponse) | Authenticates a user and returns access tokens. Permissions required: None |-| Logout | [LogoutRequest](#bytebase-v1-LogoutRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | Logs out the current user session. Permissions required: None |-| ExchangeToken | [ExchangeTokenRequest](#bytebase-v1-ExchangeTokenRequest) | [ExchangeTokenResponse](#bytebase-v1-ExchangeTokenResponse) | Exchanges an external OIDC token for a Bytebase access token. Used by CI/CD pipelines with Workload Identity Federation. Permissions required: None (validates via OIDC token) |-| Signup | [SignupRequest](#bytebase-v1-SignupRequest) | [LoginResponse](#bytebase-v1-LoginResponse) | Registers a new user account. Creates a principal and assigns a workspace: - If the user's email was pre-invited to a workspace, joins that workspace. - Otherwise, creates a new workspace with the user as admin. Returns access tokens so the user is logged in immediately after signup. |-| Refresh | [RefreshRequest](#bytebase-v1-RefreshRequest) | [RefreshResponse](#bytebase-v1-RefreshResponse) | Refreshes the access token using the refresh token cookie. Permissions required: None (validates via refresh token cookie) |-| SwitchWorkspace | [SwitchWorkspaceRequest](#bytebase-v1-SwitchWorkspaceRequest) | [LoginResponse](#bytebase-v1-LoginResponse) | Switches the current user's active workspace and issues new tokens. The user must be a member of the target workspace. |-| RequestPasswordReset | [RequestPasswordResetRequest](#bytebase-v1-RequestPasswordResetRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | Requests a password reset email for the given email address. Always returns success to avoid leaking whether the email exists. Permissions required: None |-| ResetPassword | [ResetPasswordRequest](#bytebase-v1-ResetPasswordRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | Resets the user's password using a password reset token from email. Permissions required: None (validates via token) |-| SendEmailLoginCode | [SendEmailLoginCodeRequest](#bytebase-v1-SendEmailLoginCodeRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | Sends a 6-digit verification code to the email for login/signup. Always returns success (no email enumeration). Enforces 60-sec resend cooldown. Permissions required: None |+### SpatialIndexConfig+SpatialIndexConfig defines the spatial index configuration for spatial databases.-+| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| method | [string](#string) | | Spatial indexing method (e.g., "SPATIAL", "R-TREE", "GIST") |+| tessellation | [TessellationConfig](#bytebase-v1-TessellationConfig) | | Tessellation configuration for grid-based spatial indexes |+| storage | [StorageConfig](#bytebase-v1-StorageConfig) | | Storage and performance configuration |+| dimensional | [DimensionalConfig](#bytebase-v1-DimensionalConfig) | | Dimensional configuration |-<a name="v1_cel_service-proto"></a>-<p align="right"><a href="#top">Top</a></p>-## v1/cel_service.proto-<a name="bytebase-v1-BatchDeparseRequest"></a>+<a name="bytebase-v1-StorageConfig"></a>-### BatchDeparseRequest-Request message for batch deparsing CEL expressions.+### StorageConfig+StorageConfig defines storage and performance parameters for spatial indexes.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| expressions | [google.api.expr.v1alpha1.Expr](#google-api-expr-v1alpha1-Expr) | repeated | The CEL expression ASTs to deparse. |+| fillfactor | [int32](#int32) | | Fill factor percentage (1-100) |+| buffering | [string](#string) | | Buffering mode for PostgreSQL (auto, on, off) |+| tablespace | [string](#string) | | Tablespace configuration for Oracle |+| work_tablespace | [string](#string) | | |+| sdo_level | [int32](#int32) | | |+| commit_interval | [int32](#int32) | | |+| pad_index | [bool](#bool) | | SQL Server specific parameters |+| sort_in_tempdb | [string](#string) | | ON, OFF |+| drop_existing | [bool](#bool) | | |+| online | [bool](#bool) | | |+| allow_row_locks | [bool](#bool) | | |+| allow_page_locks | [bool](#bool) | | |+| maxdop | [int32](#int32) | | |+| data_compression | [string](#string) | | NONE, ROW, PAGE |-<a name="bytebase-v1-BatchDeparseResponse"></a>+<a name="bytebase-v1-StreamMetadata"></a>++### StreamMetadata-### BatchDeparseResponse-Response message for batch deparsing CEL expressions.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| expressions | [string](#string) | repeated | The deparsed CEL expressions as strings. |+| name | [string](#string) | | The name is the name of a stream. |+| table_name | [string](#string) | | The table_name is the name of the table/view that the stream is created on. |+| owner | [string](#string) | | The owner of the stream. |+| comment | [string](#string) | | The comment of the stream. |+| type | [StreamMetadata.Type](#bytebase-v1-StreamMetadata-Type) | | The type of the stream. |+| stale | [bool](#bool) | | Indicates whether the stream was last read before the `stale_after` time. |+| mode | [StreamMetadata.Mode](#bytebase-v1-StreamMetadata-Mode) | | The mode of the stream. |+| definition | [string](#string) | | The definition of the stream. |-<a name="bytebase-v1-BatchParseRequest"></a>+<a name="bytebase-v1-SyncDatabaseRequest"></a>++### SyncDatabaseRequest-### BatchParseRequest-Request message for batch parsing CEL expressions.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| expressions | [string](#string) | repeated | The CEL expression strings to parse. |-----+| name | [string](#string) | | The name of the database to sync. Format: instances/{instance}/databases/{database} |-<a name="bytebase-v1-BatchParseResponse"></a>-### BatchParseResponse-Response message for batch parsing CEL expressions.-| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| expressions | [google.api.expr.v1alpha1.Expr](#google-api-expr-v1alpha1-Expr) | repeated | The parsed CEL expressions as AST. |+<a name="bytebase-v1-SyncDatabaseResponse"></a>+### SyncDatabaseResponse----<a name="bytebase-v1-CelService"></a>-### CelService-CelService manages CEL (Common Expression Language) parsing and formatting operations.+<a name="bytebase-v1-TableMetadata"></a>-| Method Name | Request Type | Response Type | Description |-| ----------- | ------------ | ------------- | ------------|-| BatchParse | [BatchParseRequest](#bytebase-v1-BatchParseRequest) | [BatchParseResponse](#bytebase-v1-BatchParseResponse) | Parses multiple CEL expression strings into AST representations. Permissions required: None |-| BatchDeparse | [BatchDeparseRequest](#bytebase-v1-BatchDeparseRequest) | [BatchDeparseResponse](#bytebase-v1-BatchDeparseResponse) | Converts multiple CEL AST representations back into expression strings. Permissions required: None |+### TableMetadata+TableMetadata is the metadata for tables.-+| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| name | [string](#string) | | The name is the name of a table. |+| columns | [ColumnMetadata](#bytebase-v1-ColumnMetadata) | repeated | The columns is the ordered list of columns in a table. |+| indexes | [IndexMetadata](#bytebase-v1-IndexMetadata) | repeated | The indexes is the list of indexes in a table. |+| engine | [string](#string) | | The engine is the engine of a table. |+| collation | [string](#string) | | The collation is the collation of a table. |+| charset | [string](#string) | | The character set of table. |+| row_count | [int64](#int64) | | The row_count is the estimated number of rows of a table. |+| data_size | [int64](#int64) | | The data_size is the estimated data size of a table. |+| index_size | [int64](#int64) | | The index_size is the estimated index size of a table. |+| data_free | [int64](#int64) | | The data_free is the estimated free data size of a table. |+| create_options | [string](#string) | | The create_options is the create option of a table. |+| comment | [string](#string) | | The comment is the comment of a table. |+| foreign_keys | [ForeignKeyMetadata](#bytebase-v1-ForeignKeyMetadata) | repeated | The foreign_keys is the list of foreign keys in a table. |+| partitions | [TablePartitionMetadata](#bytebase-v1-TablePartitionMetadata) | repeated | The partitions is the list of partitions in a table. |+| check_constraints | [CheckConstraintMetadata](#bytebase-v1-CheckConstraintMetadata) | repeated | The check_constraints is the list of check constraints in a table. |+| owner | [string](#string) | | The owner of the table. |+| sorting_keys | [string](#string) | repeated | The sorting_keys is a tuple of column names or arbitrary expressions. ClickHouse specific field. Reference: https://clickhouse.com/docs/en/engines/table-engines/mergetree-family/mergetree#order_by |+| triggers | [TriggerMetadata](#bytebase-v1-TriggerMetadata) | repeated | The triggers is the list of triggers associated with the table. |+| skip_dump | [bool](#bool) | | Whether to skip this table during schema dump operations. |+| sharding_info | [string](#string) | | https://docs.pingcap.com/tidb/stable/information-schema-tables/ |+| primary_key_type | [string](#string) | | https://docs.pingcap.com/tidb/stable/clustered-indexes/#clustered-indexes CLUSTERED or NONCLUSTERED. |-<a name="v1_database_catalog_service-proto"></a>-<p align="right"><a href="#top">Top</a></p>-## v1/database_catalog_service.proto-<a name="bytebase-v1-ColumnCatalog"></a>+<a name="bytebase-v1-TablePartitionMetadata"></a>-### ColumnCatalog-Column metadata within a table.+### TablePartitionMetadata+TablePartitionMetadata is the metadata for table partitions.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The column name. |-| semantic_type | [string](#string) | | The semantic type describing the data purpose. |-| labels | [ColumnCatalog.LabelsEntry](#bytebase-v1-ColumnCatalog-LabelsEntry) | repeated | User-defined labels for this column. |-| classification | [string](#string) | | The data classification level for this column. |-| object_schema | [ObjectSchema](#bytebase-v1-ObjectSchema) | optional | Object schema for complex column types like JSON. |+| name | [string](#string) | | The name is the name of a table partition. |+| type | [TablePartitionMetadata.Type](#bytebase-v1-TablePartitionMetadata-Type) | | The type of a table partition. |+| expression | [string](#string) | | The expression is the expression of a table partition. For PostgreSQL, the expression is the text of {FOR VALUES partition_bound_spec}, see https://www.postgresql.org/docs/current/sql-createtable.html. For MySQL, the expression is the `expr` or `column_list` of the following syntax. PARTITION BY { [LINEAR] HASH(expr) | [LINEAR] KEY [ALGORITHM={1 | 2}] (column_list) | RANGE{(expr) | COLUMNS(column_list)} | LIST{(expr) | COLUMNS(column_list)} }. |+| value | [string](#string) | | The value is the value of a table partition. For MySQL, the value is for RANGE and LIST partition types, - For a RANGE partition, it contains the value set in the partition's VALUES LESS THAN clause, which can be either an integer or MAXVALUE. - For a LIST partition, this column contains the values defined in the partition's VALUES IN clause, which is a list of comma-separated integer values. - For others, it's an empty string. |+| use_default | [string](#string) | | The use_default is whether the users use the default partition, it stores the different value for different database engines. For MySQL, it's [INT] type, 0 means not use default partition, otherwise, it's equals to number in syntax [SUB]PARTITION {number}. |+| subpartitions | [TablePartitionMetadata](#bytebase-v1-TablePartitionMetadata) | repeated | The subpartitions is the list of subpartitions in a table partition. |+| indexes | [IndexMetadata](#bytebase-v1-IndexMetadata) | repeated | |+| check_constraints | [CheckConstraintMetadata](#bytebase-v1-CheckConstraintMetadata) | repeated | |-<a name="bytebase-v1-ColumnCatalog-LabelsEntry"></a>+<a name="bytebase-v1-TaskMetadata"></a>-### ColumnCatalog.LabelsEntry+### TaskMetadata| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| key | [string](#string) | | |-| value | [string](#string) | | |+| name | [string](#string) | | The name is the name of a task. |+| id | [string](#string) | | The id is the snowflake-generated id of a task. Example: 01ad32a0-1bb6-5e93-0000-000000000001 |+| owner | [string](#string) | | The owner of the task. |+| comment | [string](#string) | | The comment of the task. |+| warehouse | [string](#string) | | The warehouse of the task. |+| schedule | [string](#string) | | The schedule interval of the task. |+| predecessors | [string](#string) | repeated | The predecessor tasks of the task. |+| state | [TaskMetadata.State](#bytebase-v1-TaskMetadata-State) | | The state of the task. |+| condition | [string](#string) | | The condition of the task. |+| definition | [string](#string) | | The definition of the task. |-<a name="bytebase-v1-DatabaseCatalog"></a>+<a name="bytebase-v1-TessellationConfig"></a>-### DatabaseCatalog-Catalog metadata for a database including schemas, tables, and columns.+### TessellationConfig+TessellationConfig defines tessellation parameters for spatial indexes.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The name of the database catalog. Format: instances/{instance}/databases/{database}/catalog |-| schemas | [SchemaCatalog](#bytebase-v1-SchemaCatalog) | repeated | The schemas in the database. |+| scheme | [string](#string) | | Tessellation scheme (e.g., "GEOMETRY_GRID", "GEOGRAPHY_GRID", "GEOMETRY_AUTO_GRID") |+| grid_levels | [GridLevel](#bytebase-v1-GridLevel) | repeated | Grid levels and densities for multi-level tessellation |+| cells_per_object | [int32](#int32) | | Number of cells per object (1-8192 for SQL Server) |+| bounding_box | [BoundingBox](#bytebase-v1-BoundingBox) | | Bounding box for GEOMETRY tessellation (not used for GEOGRAPHY) |-<a name="bytebase-v1-GetDatabaseCatalogRequest"></a>+<a name="bytebase-v1-TriggerMetadata"></a>++### TriggerMetadata-### GetDatabaseCatalogRequest-Request message for getting a database catalog.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The name of the database catalog to retrieve. Format: instances/{instance}/databases/{database}/catalog |+| name | [string](#string) | | The name is the name of the trigger. |+| event | [string](#string) | | The event is the event of the trigger, such as INSERT, UPDATE, DELETE, TRUNCATE. |+| timing | [string](#string) | | The timing is the timing of the trigger, such as BEFORE, AFTER. |+| body | [string](#string) | | The body is the body of the trigger. |+| sql_mode | [string](#string) | | The SQL mode setting for the trigger. |+| character_set_client | [string](#string) | | The character set used by the client creating the trigger. |+| collation_connection | [string](#string) | | The collation used for the connection when creating the trigger. |+| comment | [string](#string) | | The comment describing the trigger. |+| skip_dump | [bool](#bool) | | Whether to skip this trigger during schema dump operations. |-<a name="bytebase-v1-ObjectSchema"></a>+<a name="bytebase-v1-UpdateDatabaseRequest"></a>++### UpdateDatabaseRequest-### ObjectSchema-Schema definition for object-type columns.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| type | [ObjectSchema.Type](#bytebase-v1-ObjectSchema-Type) | | The data type of this object. |-| struct_kind | [ObjectSchema.StructKind](#bytebase-v1-ObjectSchema-StructKind) | | Struct schema. |-| array_kind | [ObjectSchema.ArrayKind](#bytebase-v1-ObjectSchema-ArrayKind) | | Array schema. |-| semantic_type | [string](#string) | | The semantic type of this object. |+| database | [Database](#bytebase-v1-Database) | | The database to update.++The database's `name` field is used to identify the database to update. Format: instances/{instance}/databases/{database} |+| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | The list of fields to update. |+| allow_missing | [bool](#bool) | | If set to true, and the database is not found, a new database will be created. In this situation, `update_mask` is ignored. |-<a name="bytebase-v1-ObjectSchema-ArrayKind"></a>+<a name="bytebase-v1-ViewMetadata"></a>-### ObjectSchema.ArrayKind-Array type with element schema.+### ViewMetadata+ViewMetadata is the metadata for views.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| kind | [ObjectSchema](#bytebase-v1-ObjectSchema) | | The schema of array elements. |+| name | [string](#string) | | The name is the name of a view. |+| definition | [string](#string) | | The definition is the definition of a view. |+| comment | [string](#string) | | The comment is the comment of a view. |+| dependency_columns | [DependencyColumn](#bytebase-v1-DependencyColumn) | repeated | The dependency_columns is the list of dependency columns of a view. |+| columns | [ColumnMetadata](#bytebase-v1-ColumnMetadata) | repeated | The columns is the ordered list of columns in a table. |+| triggers | [TriggerMetadata](#bytebase-v1-TriggerMetadata) | repeated | The triggers is the list of triggers in a view. |+| skip_dump | [bool](#bool) | | |+-<a name="bytebase-v1-ObjectSchema-StructKind"></a>-### ObjectSchema.StructKind-Structure type with named properties.+<a name="bytebase-v1-Changelog-Status"></a>+### Changelog.Status-| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| properties | [ObjectSchema.StructKind.PropertiesEntry](#bytebase-v1-ObjectSchema-StructKind-PropertiesEntry) | repeated | Properties of the struct. |+| Name | Number | Description |+| ---- | ------ | ----------- |+| STATUS_UNSPECIFIED | 0 | |+| PENDING | 1 | |+| DONE | 2 | |+| FAILED | 3 | |+<a name="bytebase-v1-ChangelogView"></a>+### ChangelogView-<a name="bytebase-v1-ObjectSchema-StructKind-PropertiesEntry"></a>-### ObjectSchema.StructKind.PropertiesEntry+| Name | Number | Description |+| ---- | ------ | ----------- |+| CHANGELOG_VIEW_UNSPECIFIED | 0 | The default / unset value. The API will default to the BASIC view. |+| CHANGELOG_VIEW_BASIC | 1 | |+| CHANGELOG_VIEW_FULL | 2 | |-| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| key | [string](#string) | | |-| value | [ObjectSchema](#bytebase-v1-ObjectSchema) | | |+<a name="bytebase-v1-ColumnMetadata-IdentityGeneration"></a>+### ColumnMetadata.IdentityGeneration+| Name | Number | Description |+| ---- | ------ | ----------- |+| IDENTITY_GENERATION_UNSPECIFIED | 0 | |+| ALWAYS | 1 | |+| BY_DEFAULT | 2 | |-<a name="bytebase-v1-SchemaCatalog"></a>+<a name="bytebase-v1-GenerationMetadata-Type"></a>-### SchemaCatalog-Schema metadata within a database.+### GenerationMetadata.Type-| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The schema name. |-| tables | [TableCatalog](#bytebase-v1-TableCatalog) | repeated | The tables in the schema. |+| Name | Number | Description |+| ---- | ------ | ----------- |+| TYPE_UNSPECIFIED | 0 | |+| VIRTUAL | 1 | |+| STORED | 2 | |+<a name="bytebase-v1-GetDatabaseSDLSchemaRequest-SDLFormat"></a>+### GetDatabaseSDLSchemaRequest.SDLFormat+SDLFormat specifies the output format for SDL schema.+| Name | Number | Description |+| ---- | ------ | ----------- |+| SDL_FORMAT_UNSPECIFIED | 0 | Unspecified format. Defaults to SINGLE_FILE. |+| SINGLE_FILE | 1 | Single file format: returns the complete SDL schema as a single file. |+| MULTI_FILE | 2 | Multi-file format: returns the SDL schema as a ZIP archive containing multiple files organized by schema objects (tables, views, functions, etc.). |-<a name="bytebase-v1-TableCatalog"></a>-### TableCatalog-Table metadata within a schema.+<a name="bytebase-v1-GetSchemaStringRequest-ObjectType"></a>-| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The table name. |-| columns | [TableCatalog.Columns](#bytebase-v1-TableCatalog-Columns) | | Regular table columns. |-| object_schema | [ObjectSchema](#bytebase-v1-ObjectSchema) | | Object schema for JSON/XML columns. |-| classification | [string](#string) | | The data classification level for this table. |+### GetSchemaStringRequest.ObjectType+| Name | Number | Description |+| ---- | ------ | ----------- |+| OBJECT_TYPE_UNSPECIFIED | 0 | |+| DATABASE | 1 | |+| SCHEMA | 2 | |+| TABLE | 3 | |+| VIEW | 4 | |+| MATERIALIZED_VIEW | 5 | |+| FUNCTION | 6 | |+| PROCEDURE | 7 | |+| SEQUENCE | 8 | |+<a name="bytebase-v1-StreamMetadata-Mode"></a>-<a name="bytebase-v1-TableCatalog-Columns"></a>+### StreamMetadata.Mode-### TableCatalog.Columns-Column list for regular tables.+| Name | Number | Description |+| ---- | ------ | ----------- |+| MODE_UNSPECIFIED | 0 | |+| DEFAULT | 1 | |+| APPEND_ONLY | 2 | |+| INSERT_ONLY | 3 | |-| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| columns | [ColumnCatalog](#bytebase-v1-ColumnCatalog) | repeated | The columns in the table. |+<a name="bytebase-v1-StreamMetadata-Type"></a>+### StreamMetadata.Type+| Name | Number | Description |+| ---- | ------ | ----------- |+| TYPE_UNSPECIFIED | 0 | |+| DELTA | 1 | |-<a name="bytebase-v1-UpdateDatabaseCatalogRequest"></a>-### UpdateDatabaseCatalogRequest-Request message for updating a database catalog.+<a name="bytebase-v1-SyncStatus"></a>-| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| catalog | [DatabaseCatalog](#bytebase-v1-DatabaseCatalog) | | The database catalog to update.+### SyncStatus+SyncStatus is the status of the database sync operation.-The catalog's `name` field is used to identify the database catalog to update. Format: instances/{instance}/databases/{database}/catalog |-| allow_missing | [bool](#bool) | | If set to true, and the database catalog is not found, a new database catalog will be created. In this situation, `update_mask` is ignored. |+| Name | Number | Description |+| ---- | ------ | ----------- |+| SYNC_STATUS_UNSPECIFIED | 0 | |+| OK | 1 | The database was synced successfully. |+| FAILED | 2 | The database sync failed. |+<a name="bytebase-v1-TablePartitionMetadata-Type"></a>+### TablePartitionMetadata.Type+Type is the type of a table partition, some database engines may not+support all types. Only avilable for the following database engines now:+MySQL: RANGE, RANGE COLUMNS, LIST, LIST COLUMNS, HASH, LINEAR HASH, KEY,+LINEAR_KEY+(https://dev.mysql.com/doc/refman/8.0/en/partitioning-types.html) TiDB:+RANGE, RANGE COLUMNS, LIST, LIST COLUMNS, HASH, KEY PostgreSQL: RANGE,+LIST, HASH (https://www.postgresql.org/docs/current/ddl-partitioning.html)-+| Name | Number | Description |+| ---- | ------ | ----------- |+| TYPE_UNSPECIFIED | 0 | |+| RANGE | 1 | |+| RANGE_COLUMNS | 2 | |+| LIST | 3 | |+| LIST_COLUMNS | 4 | |+| HASH | 5 | |+| LINEAR_HASH | 6 | |+| KEY | 7 | |+| LINEAR_KEY | 8 | |-<a name="bytebase-v1-ObjectSchema-Type"></a>-### ObjectSchema.Type-Object schema data types.+<a name="bytebase-v1-TaskMetadata-State"></a>++### TaskMetadata.State+| Name | Number | Description || ---- | ------ | ----------- |-| TYPE_UNSPECIFIED | 0 | Unspecified type. |-| STRING | 1 | String type. |-| NUMBER | 2 | Number type. |-| BOOLEAN | 3 | Boolean type. |-| OBJECT | 4 | Object/struct type. |-| ARRAY | 5 | Array type. |+| STATE_UNSPECIFIED | 0 | |+| STARTED | 1 | |+| SUSPENDED | 2 | |@@ -4089,754 +4241,801 @@ Object schema data types.-<a name="bytebase-v1-DatabaseCatalogService"></a>+<a name="bytebase-v1-DatabaseService"></a>-### DatabaseCatalogService-DatabaseCatalogService manages database schema metadata and classification.+### DatabaseService+DatabaseService manages databases and their schemas.| Method Name | Request Type | Response Type | Description || ----------- | ------------ | ------------- | ------------|-| GetDatabaseCatalog | [GetDatabaseCatalogRequest](#bytebase-v1-GetDatabaseCatalogRequest) | [DatabaseCatalog](#bytebase-v1-DatabaseCatalog) | Gets the catalog metadata for a database. Permissions required: bb.databaseCatalogs.get |-| UpdateDatabaseCatalog | [UpdateDatabaseCatalogRequest](#bytebase-v1-UpdateDatabaseCatalogRequest) | [DatabaseCatalog](#bytebase-v1-DatabaseCatalog) | Updates catalog metadata such as classifications and labels. Permissions required: bb.databaseCatalogs.update |+| GetDatabase | [GetDatabaseRequest](#bytebase-v1-GetDatabaseRequest) | [Database](#bytebase-v1-Database) | Retrieves a database by name. Permissions required: bb.databases.get |+| BatchGetDatabases | [BatchGetDatabasesRequest](#bytebase-v1-BatchGetDatabasesRequest) | [BatchGetDatabasesResponse](#bytebase-v1-BatchGetDatabasesResponse) | Retrieves multiple databases by their names. Permissions required: bb.databases.get |+| ListDatabases | [ListDatabasesRequest](#bytebase-v1-ListDatabasesRequest) | [ListDatabasesResponse](#bytebase-v1-ListDatabasesResponse) | Lists databases in a project, instance, or workspace. Permissions required: bb.projects.get (for project parent), bb.databases.list (for workspace parent), or bb.instances.get (for instance parent) |+| UpdateDatabase | [UpdateDatabaseRequest](#bytebase-v1-UpdateDatabaseRequest) | [Database](#bytebase-v1-Database) | Updates database properties such as labels and project assignment. Permissions required: bb.databases.update |+| BatchUpdateDatabases | [BatchUpdateDatabasesRequest](#bytebase-v1-BatchUpdateDatabasesRequest) | [BatchUpdateDatabasesResponse](#bytebase-v1-BatchUpdateDatabasesResponse) | Updates multiple databases in a single batch operation. Permissions required: bb.databases.update |+| SyncDatabase | [SyncDatabaseRequest](#bytebase-v1-SyncDatabaseRequest) | [SyncDatabaseResponse](#bytebase-v1-SyncDatabaseResponse) | Synchronizes database schema from the instance. Permissions required: bb.databases.sync |+| BatchSyncDatabases | [BatchSyncDatabasesRequest](#bytebase-v1-BatchSyncDatabasesRequest) | [BatchSyncDatabasesResponse](#bytebase-v1-BatchSyncDatabasesResponse) | Synchronizes multiple databases in a single batch operation. Permissions required: bb.databases.sync |+| GetDatabaseMetadata | [GetDatabaseMetadataRequest](#bytebase-v1-GetDatabaseMetadataRequest) | [DatabaseMetadata](#bytebase-v1-DatabaseMetadata) | Retrieves database metadata including tables, columns, and indexes. Permissions required: bb.databases.getSchema |+| GetDatabaseSchema | [GetDatabaseSchemaRequest](#bytebase-v1-GetDatabaseSchemaRequest) | [DatabaseSchema](#bytebase-v1-DatabaseSchema) | Retrieves database schema as DDL statements. Permissions required: bb.databases.getSchema |+| GetDatabaseSDLSchema | [GetDatabaseSDLSchemaRequest](#bytebase-v1-GetDatabaseSDLSchemaRequest) | [DatabaseSDLSchema](#bytebase-v1-DatabaseSDLSchema) | Retrieves database schema in SDL (Schema Definition Language) format. Permissions required: bb.databases.getSchema |+| DiffSchema | [DiffSchemaRequest](#bytebase-v1-DiffSchemaRequest) | [DiffSchemaResponse](#bytebase-v1-DiffSchemaResponse) | Compares and generates migration statements between two schemas. Permissions required: bb.databases.get |+| ListChangelogs | [ListChangelogsRequest](#bytebase-v1-ListChangelogsRequest) | [ListChangelogsResponse](#bytebase-v1-ListChangelogsResponse) | Lists migration history for a database. Permissions required: bb.changelogs.list |+| GetChangelog | [GetChangelogRequest](#bytebase-v1-GetChangelogRequest) | [Changelog](#bytebase-v1-Changelog) | Retrieves a specific changelog entry. Permissions required: bb.changelogs.get |+| GetSchemaString | [GetSchemaStringRequest](#bytebase-v1-GetSchemaStringRequest) | [GetSchemaStringResponse](#bytebase-v1-GetSchemaStringResponse) | Generates schema DDL for a database object. Permissions required: bb.databases.getSchema |-<a name="v1_database_group_service-proto"></a>+<a name="v1_sql_service-proto"></a><p align="right"><a href="#top">Top</a></p>-## v1/database_group_service.proto+## v1/sql_service.proto-<a name="bytebase-v1-CreateDatabaseGroupRequest"></a>+<a name="bytebase-v1-AICompletionRequest"></a>++### AICompletionRequest-### CreateDatabaseGroupRequest-Request message for creating a database group.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| parent | [string](#string) | | The parent resource where this database group will be created. Format: projects/{project} |-| database_group | [DatabaseGroup](#bytebase-v1-DatabaseGroup) | | The database group to create. |-| database_group_id | [string](#string) | | The ID to use for the database group, which will become the final component of the database group's resource name.+| messages | [AICompletionRequest.Message](#bytebase-v1-AICompletionRequest-Message) | repeated | |-This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/. |-| validate_only | [bool](#bool) | | If set, validate the create request and preview the full database group response, but do not actually create it. |+<a name="bytebase-v1-AICompletionRequest-Message"></a>-<a name="bytebase-v1-DatabaseGroup"></a>+### AICompletionRequest.Message-### DatabaseGroup-A group of databases matched by expressions.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The name of the database group. Format: projects/{project}/databaseGroups/{databaseGroup} |-| title | [string](#string) | | The short name used in actual databases specified by users. |-| database_expr | [google.type.Expr](#google-type-Expr) | | The condition that is associated with this database group. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec--Support variables: resource.environment_id: the environment resource id. Support "==", "!=", "in [XX]", "!(in [xx])" operations. resource.instance_id: the instance resource id. Support "==", "!=", "in [XX]", "!(in [xx])", "contains", "matches", "startsWith", "endsWith" operations. resource.database_name: the database name. Support "==", "!=", "in [XX]", "!(in [xx])", "contains", "matches", "startsWith", "endsWith" operations. resource.database_labels: the database labels. Support map access operations. All variables should join with "&&" condition.+| role | [string](#string) | | |+| content | [string](#string) | | |-For example: resource.environment_id == "test" && resource.database_name.startsWith("sample_") resource.database_labels["tenant"] == "tenant1" |-| matched_databases | [DatabaseGroup.Database](#bytebase-v1-DatabaseGroup-Database) | repeated | The list of databases that match the database group condition. |+<a name="bytebase-v1-AICompletionResponse"></a>-<a name="bytebase-v1-DatabaseGroup-Database"></a>+### AICompletionResponse-### DatabaseGroup.Database-A database within a database group.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The resource name of the database. Format: instances/{instance}/databases/{database} |+| 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-DeleteDatabaseGroupRequest"></a>+<a name="bytebase-v1-AICompletionResponse-Candidate"></a>++### AICompletionResponse.Candidate-### DeleteDatabaseGroupRequest-Request message for deleting a database group.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The name of the database group to delete. Format: projects/{project}/databaseGroups/{databaseGroup} |+| content | [AICompletionResponse.Candidate.Content](#bytebase-v1-AICompletionResponse-Candidate-Content) | | |-<a name="bytebase-v1-GetDatabaseGroupRequest"></a>+<a name="bytebase-v1-AICompletionResponse-Candidate-Content"></a>++### AICompletionResponse.Candidate.Content-### GetDatabaseGroupRequest-Request message for getting a database group.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The name of the database group to retrieve. Format: projects/{project}/databaseGroups/{databaseGroup} |-| view | [DatabaseGroupView](#bytebase-v1-DatabaseGroupView) | | The view to return. Defaults to DATABASE_GROUP_VIEW_BASIC. |+| 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-ListDatabaseGroupsRequest"></a>+<a name="bytebase-v1-AICompletionResponse-Candidate-Content-Part"></a>++### AICompletionResponse.Candidate.Content.Part-### ListDatabaseGroupsRequest-Request message for listing database groups.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| parent | [string](#string) | | The parent resource whose database groups are to be listed. Format: projects/{project} |-| view | [DatabaseGroupView](#bytebase-v1-DatabaseGroupView) | | The view to return. Defaults to DATABASE_GROUP_VIEW_BASIC. |+| text | [string](#string) | | |-<a name="bytebase-v1-ListDatabaseGroupsResponse"></a>+<a name="bytebase-v1-AdminExecuteRequest"></a>++### AdminExecuteRequest-### ListDatabaseGroupsResponse-Response message for listing database groups.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| database_groups | [DatabaseGroup](#bytebase-v1-DatabaseGroup) | repeated | The database groups from the specified request. |+| 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-UpdateDatabaseGroupRequest"></a>+<a name="bytebase-v1-AdminExecuteResponse"></a>++### AdminExecuteResponse-### UpdateDatabaseGroupRequest-Request message for updating a database group.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| database_group | [DatabaseGroup](#bytebase-v1-DatabaseGroup) | | The database group to update.+| results | [QueryResult](#bytebase-v1-QueryResult) | repeated | The query results. |-The database group's `name` field is used to identify the database group to update. Format: projects/{project}/databaseGroups/{databaseGroup} |-| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | The list of fields to update. |-| allow_missing | [bool](#bool) | | If set to true, and the database group is not found, a new database group will be created. In this situation, `update_mask` is ignored. |-+<a name="bytebase-v1-Advice"></a>+### Advice-<a name="bytebase-v1-DatabaseGroupView"></a>-### DatabaseGroupView-View options for database group responses.-| Name | Number | Description |-| ---- | ------ | ----------- |-| DATABASE_GROUP_VIEW_UNSPECIFIED | 0 | The default / unset value. The API will default to the BASIC view. |-| DATABASE_GROUP_VIEW_BASIC | 1 | Include basic information about the database group, but exclude the list of matched databases and unmatched databases. |-| DATABASE_GROUP_VIEW_FULL | 2 | Include everything. |+| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| 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) | | |+| rule_type | [Advice.RuleType](#bytebase-v1-Advice-RuleType) | | The type of linting rule that generated this advice. |---<a name="bytebase-v1-DatabaseGroupService"></a>-### DatabaseGroupService-DatabaseGroupService manages database groups for organizing databases by criteria.+<a name="bytebase-v1-DiffMetadataRequest"></a>++### DiffMetadataRequest-| Method Name | Request Type | Response Type | Description |-| ----------- | ------------ | ------------- | ------------|-| ListDatabaseGroups | [ListDatabaseGroupsRequest](#bytebase-v1-ListDatabaseGroupsRequest) | [ListDatabaseGroupsResponse](#bytebase-v1-ListDatabaseGroupsResponse) | Lists database groups in a project. Permissions required: bb.databaseGroups.list |-| GetDatabaseGroup | [GetDatabaseGroupRequest](#bytebase-v1-GetDatabaseGroupRequest) | [DatabaseGroup](#bytebase-v1-DatabaseGroup) | Gets a database group by name. Permissions required: bb.databaseGroups.get |-| CreateDatabaseGroup | [CreateDatabaseGroupRequest](#bytebase-v1-CreateDatabaseGroupRequest) | [DatabaseGroup](#bytebase-v1-DatabaseGroup) | Creates a new database group. Permissions required: bb.databaseGroups.create |-| UpdateDatabaseGroup | [UpdateDatabaseGroupRequest](#bytebase-v1-UpdateDatabaseGroupRequest) | [DatabaseGroup](#bytebase-v1-DatabaseGroup) | Updates a database group. Permissions required: bb.databaseGroups.update When allow_missing=true, also requires: bb.databaseGroups.create |-| DeleteDatabaseGroup | [DeleteDatabaseGroupRequest](#bytebase-v1-DeleteDatabaseGroupRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | Deletes a database group. Permissions required: bb.databaseGroups.delete |-+| 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. |+| engine | [Engine](#bytebase-v1-Engine) | | The database engine of the schema. |-<a name="v1_instance_role_service-proto"></a>-<p align="right"><a href="#top">Top</a></p>-## v1/instance_role_service.proto-<a name="bytebase-v1-InstanceRole"></a>+<a name="bytebase-v1-DiffMetadataResponse"></a>++### DiffMetadataResponse-### InstanceRole-InstanceRole is the API message for instance role.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The name of the role. Format: instances/{instance}/roles/{role} The role name is the unique name for the role. |-| role_name | [string](#string) | | The role name. It's unique within the instance. |-| password | [string](#string) | optional | The role password. |-| connection_limit | [int32](#int32) | optional | The connection count limit for this role. |-| valid_until | [string](#string) | optional | The expiration for the role's password. |-| attribute | [string](#string) | optional | The role attribute. For PostgreSQL, it contains super_user, no_inherit, create_role, create_db, can_login, replication, and bypass_rls. Docs: https://www.postgresql.org/docs/current/role-attributes.html For MySQL, it's the global privileges as GRANT statements, which means it only contains "GRANT ... ON *.* TO ...". Docs: https://dev.mysql.com/doc/refman/8.0/en/grant.html |+| diff | [string](#string) | | The diff of the metadata. |-<a name="bytebase-v1-ListInstanceRolesRequest"></a>+<a name="bytebase-v1-ExportRequest"></a>-### ListInstanceRolesRequest+### ExportRequest| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| parent | [string](#string) | | The parent, which owns this collection of roles. Format: instances/{instance} |-| page_size | [int32](#int32) | | Not used. The maximum number of roles to return. The service may return fewer than this value. If unspecified, at most 10 roles will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. |-| page_token | [string](#string) | | Not used. A page token, received from a previous `ListInstanceRoles` call. Provide this to retrieve the subsequent page.--When paginating, all other parameters provided to `ListInstanceRoles` must match the call that provided the page token. |-| refresh | [bool](#bool) | | Refresh will refresh and return the latest data. |+| 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}/plans/{plan}/rollout Format: projects/{project}/plans/{plan}/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. If omitted, Export resolves the data source server-side by using the single read-only data source when exactly one exists, or the admin data source otherwise. It can also be set explicitly to export from the admin data source or 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-ListInstanceRolesResponse"></a>+<a name="bytebase-v1-ExportResponse"></a>-### ListInstanceRolesResponse+### ExportResponse| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| roles | [InstanceRole](#bytebase-v1-InstanceRole) | repeated | The roles 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. |+| content | [bytes](#bytes) | | The export file content. |--+<a name="bytebase-v1-MaskingReason"></a>-+### MaskingReason-<a name="bytebase-v1-InstanceRoleService"></a>-### InstanceRoleService-InstanceRoleService manages database roles within instances.+| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| semantic_type_id | [string](#string) | | The semantic type that triggered masking (e.g., "SSN", "email", "phone"). |+| 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., "Matched global rule: PII Protection"). |+| classification_level | [int32](#int32) | | The classification level that triggered masking. |+| semantic_type_icon | [string](#string) | | Icon associated with the semantic type (if any). |-| Method Name | Request Type | Response Type | Description |-| ----------- | ------------ | ------------- | ------------|-| ListInstanceRoles | [ListInstanceRolesRequest](#bytebase-v1-ListInstanceRolesRequest) | [ListInstanceRolesResponse](#bytebase-v1-ListInstanceRolesResponse) | Lists all database roles in an instance. Permissions required: bb.instanceRoles.list |--<a name="v1_instance_service-proto"></a>-<p align="right"><a href="#top">Top</a></p>-## v1/instance_service.proto+<a name="bytebase-v1-QueryHistory"></a>++### QueryHistory++++| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| name | [string](#string) | | The name for the query history. Format: projects/{project}/queryHistories/{id} |+| 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-AddDataSourceRequest"></a>-### AddDataSourceRequest+++<a name="bytebase-v1-QueryOption"></a>++### QueryOption| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The name of the instance to add a data source to. Format: instances/{instance} |-| data_source | [DataSource](#bytebase-v1-DataSource) | | Identified by data source ID. Only READ_ONLY data source can be added. |-| validate_only | [bool](#bool) | | Validate only also tests the data source connection. |+| redis_run_commands_on | [QueryOption.RedisRunCommandsOn](#bytebase-v1-QueryOption-RedisRunCommandsOn) | | |+| mssql_explain_format | [QueryOption.MSSQLExplainFormat](#bytebase-v1-QueryOption-MSSQLExplainFormat) | | |-<a name="bytebase-v1-BatchSyncInstancesRequest"></a>+<a name="bytebase-v1-QueryRequest"></a>-### BatchSyncInstancesRequest+### QueryRequest| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| requests | [SyncInstanceRequest](#bytebase-v1-SyncInstanceRequest) | repeated | The request message specifying the instances to sync. A maximum of 1000 instances can be synced in a batch. |+| 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. If omitted, Query resolves the data source server-side by using the single read-only data source when exactly one exists, or the admin data source otherwise. It can also be set explicitly to query the admin data source or 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-BatchSyncInstancesResponse"></a>+<a name="bytebase-v1-QueryResponse"></a>-### BatchSyncInstancesResponse+### QueryResponse+| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| results | [QueryResult](#bytebase-v1-QueryResult) | repeated | The query results. |-<a name="bytebase-v1-BatchUpdateInstancesRequest"></a>-### BatchUpdateInstancesRequest++<a name="bytebase-v1-QueryResult"></a>++### QueryResult| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| requests | [UpdateInstanceRequest](#bytebase-v1-UpdateInstanceRequest) | repeated | The request message specifying the resources to update. |-+| 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) | | |+| syntax_error | [QueryResult.SyntaxError](#bytebase-v1-QueryResult-SyntaxError) | | |+| permission_denied | [PermissionDeniedDetail](#bytebase-v1-PermissionDeniedDetail) | | |+| command_error | [QueryResult.CommandError](#bytebase-v1-QueryResult-CommandError) | | |+| messages | [QueryResult.Message](#bytebase-v1-QueryResult-Message) | repeated | Informational or debug messages returned by the database engine during query execution. Examples include PostgreSQL's RAISE NOTICE, MSSQL's PRINT, or Oracle'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-BatchUpdateInstancesResponse"></a>-### BatchUpdateInstancesResponse+<a name="bytebase-v1-QueryResult-CommandError"></a>+### QueryResult.CommandError+Permission denied with resource information or disallowed command_type.+Either resources or command_type is available.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| instances | [Instance](#bytebase-v1-Instance) | repeated | |+| command_type | [QueryResult.CommandError.Type](#bytebase-v1-QueryResult-CommandError-Type) | | Disallowed command_type. |-<a name="bytebase-v1-CreateInstanceRequest"></a>+<a name="bytebase-v1-QueryResult-Message"></a>-### CreateInstanceRequest+### QueryResult.Message| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| instance | [Instance](#bytebase-v1-Instance) | | The instance to create. |-| instance_id | [string](#string) | | The ID to use for the instance, which will become the final component of the instance's resource name.+| level | [QueryResult.Message.Level](#bytebase-v1-QueryResult-Message-Level) | | |+| content | [string](#string) | | |-This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/. |-| validate_only | [bool](#bool) | | Validate only also tests the data source connection. |+<a name="bytebase-v1-QueryResult-PostgresError"></a>-<a name="bytebase-v1-DataSource"></a>+### 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) | | |-### DataSource+++<a name="bytebase-v1-QueryResult-SyntaxError"></a>++### QueryResult.SyntaxError+Syntax error with position information for editor highlighting++| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| id | [string](#string) | | The unique identifier for this data source. |-| type | [DataSourceType](#bytebase-v1-DataSourceType) | | The type of data source (ADMIN or READ_ONLY). |-| username | [string](#string) | | The username for database authentication. |-| password | [string](#string) | | The password for database authentication. |-| use_ssl | [bool](#bool) | | Use SSL to connect to the data source. By default, we use system default SSL configuration. |-| ssl_ca | [string](#string) | | The SSL certificate authority certificate. |-| ssl_cert | [string](#string) | | The SSL client certificate. |-| ssl_key | [string](#string) | | The SSL client private key. |-| ssl_ca_path | [string](#string) | | The local filesystem path to the SSL certificate authority certificate. |-| ssl_cert_path | [string](#string) | | The local filesystem path to the SSL client certificate. |-| ssl_key_path | [string](#string) | | The local filesystem path to the SSL client private key. |-| ssl_ca_set | [bool](#bool) | | Whether an SSL certificate authority certificate has been configured. |-| ssl_cert_set | [bool](#bool) | | Whether an SSL client certificate has been configured. |-| ssl_key_set | [bool](#bool) | | Whether an SSL client private key has been configured. |-| ssl_ca_path_set | [bool](#bool) | | Whether an SSL certificate authority path has been configured. |-| ssl_cert_path_set | [bool](#bool) | | Whether an SSL client certificate path has been configured. |-| ssl_key_path_set | [bool](#bool) | | Whether an SSL client private key path has been configured. |-| verify_tls_certificate | [bool](#bool) | | verify_tls_certificate enables TLS certificate verification for SSL connections. Default is false (no verification) for backward compatibility. Set to true for secure connections (recommended for production). Only set to false for development or when certificates cannot be properly validated (e.g., self-signed certs, VPN environments). |-| host | [string](#string) | | The hostname or IP address of the database server. |-| port | [string](#string) | | The port number of the database server. |-| database | [string](#string) | | The name of the database to connect to. |-| srv | [bool](#bool) | | srv, authentication_database and replica_set are used for MongoDB. srv is a boolean flag that indicates whether the host is a DNS SRV record. |-| authentication_database | [string](#string) | | authentication_database is the database name to authenticate against, which stores the user credentials. |-| replica_set | [string](#string) | | replica_set is used for MongoDB replica set. |-| sid | [string](#string) | | sid and service_name are used for Oracle. |-| service_name | [string](#string) | | |-| ssh_host | [string](#string) | | Connection over SSH. The hostname of the SSH server agent. Required. |-| ssh_port | [string](#string) | | The port of the SSH server agent. It's 22 typically. Required. |-| ssh_user | [string](#string) | | The user to login the server. Required. |-| ssh_password | [string](#string) | | The password to login the server. If it's empty string, no password is required. |-| ssh_private_key | [string](#string) | | The private key to login the server. If it's empty string, we will use the system default private key from os.Getenv("SSH_AUTH_SOCK"). |-| authentication_private_key | [string](#string) | | PKCS#8 private key in PEM format. If it's empty string, no private key is required. Used for authentication when connecting to the data source. |-| authentication_private_key_passphrase | [string](#string) | | Passphrase for the encrypted PKCS#8 private key. Only used when the private key is encrypted. |-| external_secret | [DataSourceExternalSecret](#bytebase-v1-DataSourceExternalSecret) | | |-| authentication_type | [DataSource.AuthenticationType](#bytebase-v1-DataSource-AuthenticationType) | | |-| azure_credential | [DataSource.AzureCredential](#bytebase-v1-DataSource-AzureCredential) | | |-| aws_credential | [DataSource.AWSCredential](#bytebase-v1-DataSource-AWSCredential) | | |-| gcp_credential | [DataSource.GCPCredential](#bytebase-v1-DataSource-GCPCredential) | | |-| sasl_config | [SASLConfig](#bytebase-v1-SASLConfig) | | |-| additional_addresses | [DataSource.Address](#bytebase-v1-DataSource-Address) | repeated | additional_addresses is used for MongoDB replica set. |-| direct_connection | [bool](#bool) | | direct_connection is used for MongoDB to dispatch all the operations to the node specified in the connection string. |-| region | [string](#string) | | region is the location of where the DB is, works for AWS RDS. For example, us-east-1. |-| warehouse_id | [string](#string) | | warehouse_id is used by Databricks. |-| master_name | [string](#string) | | master_name is the master name used by connecting redis-master via redis sentinel. |-| master_username | [string](#string) | | master_username and master_password are master credentials used by redis sentinel mode. |-| master_password | [string](#string) | | |-| redis_type | [DataSource.RedisType](#bytebase-v1-DataSource-RedisType) | | |-| cluster | [string](#string) | | Cluster is the cluster name for the data source. Used by CockroachDB. |-| extra_connection_parameters | [DataSource.ExtraConnectionParametersEntry](#bytebase-v1-DataSource-ExtraConnectionParametersEntry) | repeated | Extra connection parameters for the database connection. For PostgreSQL HA, this can be used to set target_session_attrs=read-write |+| start_position | [Position](#bytebase-v1-Position) | | Position information for highlighting in editor |-<a name="bytebase-v1-DataSource-AWSCredential"></a>+<a name="bytebase-v1-QueryRow"></a>-### DataSource.AWSCredential+### QueryRow| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| access_key_id | [string](#string) | | |-| secret_access_key | [string](#string) | | |-| session_token | [string](#string) | | |-| role_arn | [string](#string) | | ARN of IAM role to assume for cross-account access. See: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html |-| external_id | [string](#string) | | Optional external ID for additional security when assuming role. See: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-user_externalid.html |+| values | [RowValue](#bytebase-v1-RowValue) | repeated | Row values of the query result. |-<a name="bytebase-v1-DataSource-Address"></a>+<a name="bytebase-v1-RowValue"></a>-### DataSource.Address+### RowValue| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| host | [string](#string) | | |-| port | [string](#string) | | |+| 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. |-<a name="bytebase-v1-DataSource-AzureCredential"></a>+<a name="bytebase-v1-RowValue-Timestamp"></a>-### DataSource.AzureCredential+### RowValue.Timestamp| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| tenant_id | [string](#string) | | |-| client_id | [string](#string) | | |-| client_secret | [string](#string) | | |+| google_timestamp | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |+| accuracy | [int32](#int32) | | The accuracy is the number of digits after the decimal point. |-<a name="bytebase-v1-DataSource-ExtraConnectionParametersEntry"></a>+<a name="bytebase-v1-RowValue-TimestampTZ"></a>-### DataSource.ExtraConnectionParametersEntry+### RowValue.TimestampTZ| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| key | [string](#string) | | |-| value | [string](#string) | | |+| google_timestamp | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |+| zone | [string](#string) | | Zone is the time zone abbreviations in timezone database such as "PDT", "PST". 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="bytebase-v1-DataSource-GCPCredential"></a>+<a name="bytebase-v1-SearchQueryHistoriesRequest"></a>-### DataSource.GCPCredential+### SearchQueryHistoriesRequest| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| content | [string](#string) | | |+| 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 "projects/{id}" format, support "==" operator. - database: the database full name in "instances/{id}/databases/{name}" format, support "==" operator. - instance: the instance full name in "instances/{id}" format, support "==" operator. - type: the type, should be "QUERY" or "EXPORT", support "==" operator. - statement: the SQL statement, support ".contains()" operator.+For example: project == "projects/{project}" database == "instances/{instance}/databases/{database}" instance == "instances/{instance}" type == "QUERY" type == "EXPORT" statement.contains("select") type == "QUERY" && statement.contains("select") |-<a name="bytebase-v1-DataSourceExternalSecret"></a>-### DataSourceExternalSecret+<a name="bytebase-v1-SearchQueryHistoriesResponse"></a>++### SearchQueryHistoriesResponse| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| secret_type | [DataSourceExternalSecret.SecretType](#bytebase-v1-DataSourceExternalSecret-SecretType) | | The type of external secret store. |-| url | [string](#string) | | The URL of the external secret store. |-| auth_type | [DataSourceExternalSecret.AuthType](#bytebase-v1-DataSourceExternalSecret-AuthType) | | The authentication method for accessing the secret store. |-| app_role | [DataSourceExternalSecret.AppRoleAuthOption](#bytebase-v1-DataSourceExternalSecret-AppRoleAuthOption) | | AppRole authentication configuration. |-| token | [string](#string) | | Token for direct authentication. |-| engine_name | [string](#string) | | engine name is the name for secret engine. |-| secret_name | [string](#string) | | the secret name in the engine to store the password. |-| password_key_name | [string](#string) | | the key name for the password. |-| skip_vault_tls_verification | [bool](#bool) | | TLS configuration for connecting to Vault server. These fields are separate from the database TLS configuration in DataSource. skip_vault_tls_verification disables TLS certificate verification for Vault connections. Default is false (verification enabled) for security. Only set to true for development or when certificates cannot be properly validated. |-| vault_ssl_ca | [string](#string) | | CA certificate for Vault server verification. |-| vault_ssl_cert | [string](#string) | | Client certificate for mutual TLS authentication with Vault. |-| vault_ssl_key | [string](#string) | | Client private key for mutual TLS authentication with Vault. |+| 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-DataSourceExternalSecret-AppRoleAuthOption"></a>-### DataSourceExternalSecret.AppRoleAuthOption+<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 |-| ----- | ---- | ----- | ----------- |-| role_id | [string](#string) | | The role ID for Vault AppRole authentication. |-| secret_id | [string](#string) | | the secret id for the role without ttl. |-| type | [DataSourceExternalSecret.AppRoleAuthOption.SecretType](#bytebase-v1-DataSourceExternalSecret-AppRoleAuthOption-SecretType) | | The type of secret for AppRole authentication. |-| mount_path | [string](#string) | | The path where the approle auth method is mounted. |+<a name="bytebase-v1-Advice-RuleType"></a>+### Advice.RuleType+RuleType indicates the source of the linting rule.+| Name | Number | Description |+| ---- | ------ | ----------- |+| RULE_TYPE_UNSPECIFIED | 0 | Unspecified rule type. |+| PARSER_BASED | 1 | Parser-based rule enforced by the built-in SQL parser. These are non-configurable, mandatory checks for schema health. |+| AI_POWERED | 2 | AI-powered rule defined by user in natural language. These are custom, flexible checks powered by AI models. |-<a name="bytebase-v1-DeleteInstanceRequest"></a>-### DeleteInstanceRequest+<a name="bytebase-v1-QueryHistory-Type"></a>+### QueryHistory.Type-| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The name of the instance to delete. Format: instances/{instance} |-| force | [bool](#bool) | | If set to true, any databases and sheets from this project will also be moved to default project, and all open issues will be closed. |-| purge | [bool](#bool) | | If set to true, permanently purge the soft-deleted instance and all related resources. This operation is irreversible. Following AIP-165, this should only be used for administrative cleanup of old soft-deleted instances. The instance must already be soft-deleted for this to work. |+| 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-MSSQLExplainFormat"></a>+### QueryOption.MSSQLExplainFormat-<a name="bytebase-v1-GetInstanceRequest"></a>+| Name | Number | Description |+| ---- | ------ | ----------- |+| MSSQL_EXPLAIN_FORMAT_UNSPECIFIED | 0 | defaults to SHOWPLAN_ALL |+| MSSQL_EXPLAIN_FORMAT_ALL | 1 | SHOWPLAN_ALL |+| MSSQL_EXPLAIN_FORMAT_XML | 2 | SHOWPLAN_XML |-### GetInstanceRequest+<a name="bytebase-v1-QueryOption-RedisRunCommandsOn"></a>-| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The name of the instance to retrieve. Format: instances/{instance} |+### QueryOption.RedisRunCommandsOn+| 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. |++<a name="bytebase-v1-QueryResult-CommandError-Type"></a>+### QueryResult.CommandError.Type-<a name="bytebase-v1-Instance"></a>-### Instance+| Name | Number | Description |+| ---- | ------ | ----------- |+| TYPE_UNSPECIFIED | 0 | |+| DDL | 1 | |+| DML | 2 | |+| NON_READ_ONLY | 3 | |-| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The name of the instance. Format: instances/{instance} |-| state | [State](#bytebase-v1-State) | | The lifecycle state of the instance. |-| title | [string](#string) | | The display title of the instance. |-| engine | [Engine](#bytebase-v1-Engine) | | The database engine type. |-| engine_version | [string](#string) | | The version of the database engine. |-| external_link | [string](#string) | | External URL to the database instance console. |-| data_sources | [DataSource](#bytebase-v1-DataSource) | repeated | Data source configurations for connecting to the instance. |-| environment | [string](#string) | optional | The environment resource. Format: environments/prod where prod is the environment resource ID. |-| activation | [bool](#bool) | | Whether the instance is activated for use. |-| roles | [InstanceRole](#bytebase-v1-InstanceRole) | repeated | Database roles available in this instance. |-| sync_interval | [google.protobuf.Duration](#google-protobuf-Duration) | | How often the instance is synced. |-| sync_databases | [string](#string) | repeated | Enable sync for following databases. Default empty, means sync all schemas & databases. |-| last_sync_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | The last time the instance was synced. |-| labels | [Instance.LabelsEntry](#bytebase-v1-Instance-LabelsEntry) | repeated | Labels are key-value pairs that can be attached to the instance. For example, { "org_group": "infrastructure", "environment": "production" } |+<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-Instance-LabelsEntry"></a>+<a name="bytebase-v1-SQLService"></a>-### Instance.LabelsEntry+### 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'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 |+| 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) |+-| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| key | [string](#string) | | |-| value | [string](#string) | | |+<a name="v1_plan_service-proto"></a>+<p align="right"><a href="#top">Top</a></p>+## v1/plan_service.proto-<a name="bytebase-v1-InstanceResource"></a>+<a name="bytebase-v1-CancelPlanCheckRunRequest"></a>-### InstanceResource+### CancelPlanCheckRunRequest| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| title | [string](#string) | | The display title of the instance. |-| engine | [Engine](#bytebase-v1-Engine) | | The database engine type. |-| engine_version | [string](#string) | | The version of the database engine. |-| data_sources | [DataSource](#bytebase-v1-DataSource) | repeated | Data source configurations for the instance. |-| activation | [bool](#bool) | | Whether the instance is activated. |-| name | [string](#string) | | The name of the instance. Format: instances/{instance} |-| environment | [string](#string) | optional | The environment resource. Format: environments/prod where prod is the environment resource ID. |+| name | [string](#string) | | The name of the plan check run to cancel. Format: projects/{project}/plans/{plan}/planCheckRun |-<a name="bytebase-v1-KerberosConfig"></a>+<a name="bytebase-v1-CancelPlanCheckRunResponse"></a>++### CancelPlanCheckRunResponse+++++-### KerberosConfig++<a name="bytebase-v1-CreatePlanRequest"></a>++### CreatePlanRequest| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| primary | [string](#string) | | The primary component of the Kerberos principal. |-| instance | [string](#string) | | The instance component of the Kerberos principal. |-| realm | [string](#string) | | The Kerberos realm. |-| keytab | [bytes](#bytes) | | The keytab file contents for authentication. |-| kdc_host | [string](#string) | | The hostname of the Key Distribution Center (KDC). |-| kdc_port | [string](#string) | | The port of the Key Distribution Center (KDC). |-| kdc_transport_protocol | [string](#string) | | The transport protocol for KDC communication (tcp or udp). |+| 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-ListInstanceDatabaseRequest"></a>+<a name="bytebase-v1-GetPlanCheckRunRequest"></a>-### ListInstanceDatabaseRequest+### GetPlanCheckRunRequest| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The name of the instance. Format: instances/{instance} |-| instance | [Instance](#bytebase-v1-Instance) | optional | The target instance. We need to set this field if the target instance is not created yet. |+| name | [string](#string) | | The name of the plan check run to retrieve. Format: projects/{project}/plans/{plan}/planCheckRun |-<a name="bytebase-v1-ListInstanceDatabaseResponse"></a>+<a name="bytebase-v1-GetPlanRequest"></a>-### ListInstanceDatabaseResponse+### GetPlanRequest| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| databases | [string](#string) | repeated | All database name list in the instance. |+| name | [string](#string) | | The name of the plan to retrieve. Format: projects/{project}/plans/{plan} |-<a name="bytebase-v1-ListInstancesRequest"></a>+<a name="bytebase-v1-ListPlansRequest"></a>-### ListInstancesRequest+### ListPlansRequest| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| page_size | [int32](#int32) | | The maximum number of instances to return. The service may return fewer than this value. If unspecified, at most 10 instances 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 `ListInstances` call. Provide this to retrieve the subsequent page.+| parent | [string](#string) | | The parent, which owns this collection of plans. Format: projects/{project} Use "projects/-" 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 `ListInstances` must match the call that provided the page token. |-| show_deleted | [bool](#bool) | | Show deleted instances if specified. |-| filter | [string](#string) | | Filter the instance. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec+When paginating, all other parameters provided to `ListPlans` 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: - name: the instance name, support "==" and ".contains()" operator. - resource_id: the instance id, support "==" and ".contains()" operator. - environment: the environment full name in "environments/{id}" format, support "==" operator. - state: the instance state, check State enum for values, support "==" operator. - engine: the instance engine, check Engine enum for values. Support "==", "in [xx]", "!(in [xx])" operator. - host: the instance host, support "==" and ".contains()" operator. - port: the instance port, support "==" and ".contains()" operator. - project: the project full name in "projects/{id}" format, support "==" operator. - labels.{key}: the instance label, support "==" and "in" operators.+Supported filters: - creator: the plan creator full name in "users/{email or id}" format, support "==" operator. - create_time: the plan create time in "2006-01-02T15:04:05Z07:00" format, support ">=" or "<=" operator. - has_rollout: whether the plan has rollout, support "==" operator, the value should be "true" or "false". - has_issue: the plan has issue or not, support "==" operator, the value should be "true" or "false". - title: the plan title, support "==" operator for exact match and ".contains()" operator for case-insensitive substring match. - spec_type: the plan spec config type, support "==" operator, the value should be "create_database_config", "change_database_config", or "export_data_config". - state: the plan state, support "==" operator, the value should be "ACTIVE" or "DELETED".-For example: name == "sample instance" name.contains("sample") resource_id == "sample-instance" resource_id.contains("sample") state == "DELETED" environment == "environments/test" environment == "" (find instances which environment is not set) engine == "MYSQL" engine in ["MYSQL", "POSTGRES"] !(engine in ["MYSQL", "POSTGRES"]) host == "127.0.0.1" host.contains("127.0") port == "54321" port.contains("543") labels.org_group == "infrastructure" labels.environment in ["prod", "production"] project == "projects/sample-project" You can combine filter conditions like: name.contains("sample") && environment == "environments/test" host == "127.0.0.1" && port == "54321" |-| order_by | [string](#string) | | The order by of instances. Support title, environment. The default sorting order is ascending. For example: - order_by = "title" - order_by = "title desc" - order_by = "title desc, environment asc" |+For example: creator == "users/[email protected]" && create_time >= "2025-01-02T15:04:05Z07:00" has_rollout == false && has_issue == true title == "My Plan" title.contains("database migration") spec_type == "change_database_config" state == "ACTIVE" |-<a name="bytebase-v1-ListInstancesResponse"></a>+<a name="bytebase-v1-ListPlansResponse"></a>-### ListInstancesResponse+### ListPlansResponse| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| instances | [Instance](#bytebase-v1-Instance) | repeated | The instances from the specified request. |+| 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. |@@ -4844,2153 +5043,2001 @@ For example: name == "sample instance" name.contains("sample") r-<a name="bytebase-v1-RemoveDataSourceRequest"></a>+<a name="bytebase-v1-Plan"></a>-### RemoveDataSourceRequest+### Plan| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The name of the instance to remove a data source from. Format: instances/{instance} |-| data_source | [DataSource](#bytebase-v1-DataSource) | | Identified by data source ID. Only READ_ONLY data source can be removed. |+| 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} |+| 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 |+| has_rollout | [bool](#bool) | | Whether the plan has started the rollout. |+| approval_status | [ApprovalStatus](#bytebase-v1-ApprovalStatus) | | The approval status of the linked issue. Unspecified when no linked issue exists. |+| rollout_stage_summaries | [Plan.RolloutStageSummary](#bytebase-v1-Plan-RolloutStageSummary) | repeated | Per-stage rollout status summary. Ordered by environment deployment order. Empty when no rollout exists. |-<a name="bytebase-v1-SASLConfig"></a>+<a name="bytebase-v1-Plan-ChangeDatabaseConfig"></a>-### SASLConfig+### Plan.ChangeDatabaseConfig| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| krb_config | [KerberosConfig](#bytebase-v1-KerberosConfig) | | Kerberos authentication configuration. |+| 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} |+| 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-SyncInstanceRequest"></a>+<a name="bytebase-v1-Plan-CreateDatabaseConfig"></a>-### SyncInstanceRequest+### Plan.CreateDatabaseConfig| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The name of instance. Format: instances/{instance} |-| enable_full_sync | [bool](#bool) | | When full sync is enabled, all databases in the instance will be synchronized. Otherwise, only the instance metadata (such as the database list) and any newly discovered databases will be synced. |+| 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 "ON CLUSTER <<cluster>>". |+| owner | [string](#string) | | owner is the owner of the database. This is only applicable to Postgres for "WITH OWNER <<owner>>". |+| environment | [string](#string) | | The environment resource. Format: environments/prod where prod is the environment resource ID. |-<a name="bytebase-v1-SyncInstanceResponse"></a>+<a name="bytebase-v1-Plan-ExportDataConfig"></a>-### SyncInstanceResponse+### Plan.ExportDataConfig| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| databases | [string](#string) | repeated | All database name list in the instance. |+| 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-UndeleteInstanceRequest"></a>+<a name="bytebase-v1-Plan-PlanCheckRunStatusCountEntry"></a>-### UndeleteInstanceRequest+### Plan.PlanCheckRunStatusCountEntry| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The name of the deleted instance. Format: instances/{instance} |+| key | [string](#string) | | |+| value | [int32](#int32) | | |-<a name="bytebase-v1-UpdateDataSourceRequest"></a>+<a name="bytebase-v1-Plan-RolloutStageSummary"></a>-### UpdateDataSourceRequest+### Plan.RolloutStageSummary| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The name of the instance to update a data source. Format: instances/{instance} |-| data_source | [DataSource](#bytebase-v1-DataSource) | | Identified by data source ID. |-| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | The list of fields to update. |-| validate_only | [bool](#bool) | | Validate only also tests the data source connection. |-| allow_missing | [bool](#bool) | | If set to true, and the data source is not found, a new data source will be created. In this situation, `update_mask` is ignored. |+| stage | [string](#string) | | The stage resource name. Format: projects/{project}/plans/{plan}/rollout/stages/{stage} |+| task_status_counts | [Plan.TaskStatusCount](#bytebase-v1-Plan-TaskStatusCount) | repeated | Task status counts for this stage. |-<a name="bytebase-v1-UpdateInstanceRequest"></a>+<a name="bytebase-v1-Plan-Spec"></a>-### UpdateInstanceRequest+### Plan.Spec| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| instance | [Instance](#bytebase-v1-Instance) | | The instance to update.+| 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) | | |-The instance's `name` field is used to identify the instance to update. Format: instances/{instance} |-| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | The list of fields to update. |-| allow_missing | [bool](#bool) | | If set to true, and the instance is not found, a new instance will be created. In this situation, `update_mask` is ignored. |-+<a name="bytebase-v1-Plan-TaskStatusCount"></a>+### Plan.TaskStatusCount-<a name="bytebase-v1-DataSource-AuthenticationType"></a>-### DataSource.AuthenticationType+| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| status | [Task.Status](#bytebase-v1-Task-Status) | | The task status. |+| count | [int32](#int32) | | The number of tasks in the status. |-| Name | Number | Description |-| ---- | ------ | ----------- |-| AUTHENTICATION_UNSPECIFIED | 0 | |-| PASSWORD | 1 | |-| GOOGLE_CLOUD_SQL_IAM | 2 | |-| AWS_RDS_IAM | 3 | |-| AZURE_IAM | 4 | |-<a name="bytebase-v1-DataSource-RedisType"></a>-### DataSource.RedisType+<a name="bytebase-v1-PlanCheckRun"></a>-| Name | Number | Description |-| ---- | ------ | ----------- |-| REDIS_TYPE_UNSPECIFIED | 0 | |-| STANDALONE | 1 | |-| SENTINEL | 2 | |-| CLUSTER | 3 | |+### PlanCheckRun-<a name="bytebase-v1-DataSourceExternalSecret-AppRoleAuthOption-SecretType"></a>+| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| name | [string](#string) | | Format: projects/{project}/plans/{plan}/planCheckRun |+| status | [PlanCheckRun.Status](#bytebase-v1-PlanCheckRun-Status) | | |+| 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) | | |-### DataSourceExternalSecret.AppRoleAuthOption.SecretType-| Name | Number | Description |-| ---- | ------ | ----------- |-| SECRET_TYPE_UNSPECIFIED | 0 | Unspecified secret type. |-| PLAIN | 1 | Plain text secret. |-| ENVIRONMENT | 2 | Secret from environment variable. |-<a name="bytebase-v1-DataSourceExternalSecret-AuthType"></a>+<a name="bytebase-v1-PlanCheckRun-Result"></a>-### DataSourceExternalSecret.AuthType+### PlanCheckRun.Result-| Name | Number | Description |-| ---- | ------ | ----------- |-| AUTH_TYPE_UNSPECIFIED | 0 | Unspecified authentication type. |-| TOKEN | 1 | ref: https://developer.hashicorp.com/vault/docs/auth/token |-| VAULT_APP_ROLE | 2 | ref: https://developer.hashicorp.com/vault/docs/auth/approle |+| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| status | [Advice.Level](#bytebase-v1-Advice-Level) | | |+| title | [string](#string) | | |+| content | [string](#string) | | |+| code | [int32](#int32) | | |+| target | [string](#string) | | Target identification for consolidated results. Format: instances/{instance}/databases/{database} |+| type | [PlanCheckRun.Result.Type](#bytebase-v1-PlanCheckRun-Result-Type) | | |+| sql_summary_report | [PlanCheckRun.Result.SqlSummaryReport](#bytebase-v1-PlanCheckRun-Result-SqlSummaryReport) | | |+| sql_review_report | [PlanCheckRun.Result.SqlReviewReport](#bytebase-v1-PlanCheckRun-Result-SqlReviewReport) | | |-<a name="bytebase-v1-DataSourceExternalSecret-SecretType"></a>-### DataSourceExternalSecret.SecretType-| Name | Number | Description |-| ---- | ------ | ----------- |-| SECRET_TYPE_UNSPECIFIED | 0 | Unspecified secret type. |-| VAULT_KV_V2 | 1 | ref: https://developer.hashicorp.com/vault/api-docs/secret/kv/kv-v2 |-| AWS_SECRETS_MANAGER | 2 | ref: https://docs.aws.amazon.com/secretsmanager/latest/userguide/intro.html |-| GCP_SECRET_MANAGER | 3 | ref: https://cloud.google.com/secret-manager/docs |-| AZURE_KEY_VAULT | 4 | ref: https://learn.microsoft.com/en-us/azure/key-vault/secrets/about-secrets |+<a name="bytebase-v1-PlanCheckRun-Result-SqlReviewReport"></a>+### PlanCheckRun.Result.SqlReviewReport-<a name="bytebase-v1-DataSourceType"></a>-### DataSourceType+| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| start_position | [Position](#bytebase-v1-Position) | | Position of the SQL statement. |+| end_position | [Position](#bytebase-v1-Position) | | |-| Name | Number | Description |-| ---- | ------ | ----------- |-| DATA_SOURCE_UNSPECIFIED | 0 | Unspecified data source type. |-| ADMIN | 1 | Admin data source with write permissions. |-| READ_ONLY | 2 | Read-only data source for query operations. |---<a name="bytebase-v1-InstanceService"></a>+<a name="bytebase-v1-PlanCheckRun-Result-SqlSummaryReport"></a>-### InstanceService-InstanceService manages database instances and their connections.+### PlanCheckRun.Result.SqlSummaryReport-| Method Name | Request Type | Response Type | Description |-| ----------- | ------------ | ------------- | ------------|-| GetInstance | [GetInstanceRequest](#bytebase-v1-GetInstanceRequest) | [Instance](#bytebase-v1-Instance) | Gets a database instance by name. Permissions required: bb.instances.get |-| ListInstances | [ListInstancesRequest](#bytebase-v1-ListInstancesRequest) | [ListInstancesResponse](#bytebase-v1-ListInstancesResponse) | Lists all database instances. Permissions required: bb.instances.list |-| CreateInstance | [CreateInstanceRequest](#bytebase-v1-CreateInstanceRequest) | [Instance](#bytebase-v1-Instance) | Creates a new database instance. Permissions required: bb.instances.create |-| UpdateInstance | [UpdateInstanceRequest](#bytebase-v1-UpdateInstanceRequest) | [Instance](#bytebase-v1-Instance) | Updates a database instance. Permissions required: bb.instances.update |-| DeleteInstance | [DeleteInstanceRequest](#bytebase-v1-DeleteInstanceRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | Deletes or soft-deletes a database instance. Permissions required: bb.instances.delete |-| UndeleteInstance | [UndeleteInstanceRequest](#bytebase-v1-UndeleteInstanceRequest) | [Instance](#bytebase-v1-Instance) | Restores a soft-deleted database instance. Permissions required: bb.instances.undelete |-| SyncInstance | [SyncInstanceRequest](#bytebase-v1-SyncInstanceRequest) | [SyncInstanceResponse](#bytebase-v1-SyncInstanceResponse) | Syncs database schemas and metadata from an instance. Permissions required: bb.instances.sync |-| ListInstanceDatabase | [ListInstanceDatabaseRequest](#bytebase-v1-ListInstanceDatabaseRequest) | [ListInstanceDatabaseResponse](#bytebase-v1-ListInstanceDatabaseResponse) | Lists all databases within an instance without creating them. Permissions required: bb.instances.get |-| BatchSyncInstances | [BatchSyncInstancesRequest](#bytebase-v1-BatchSyncInstancesRequest) | [BatchSyncInstancesResponse](#bytebase-v1-BatchSyncInstancesResponse) | Syncs multiple instances in a single request. Permissions required: bb.instances.sync |-| BatchUpdateInstances | [BatchUpdateInstancesRequest](#bytebase-v1-BatchUpdateInstancesRequest) | [BatchUpdateInstancesResponse](#bytebase-v1-BatchUpdateInstancesResponse) | Updates multiple instances in a single request. Permissions required: bb.instances.update |-| AddDataSource | [AddDataSourceRequest](#bytebase-v1-AddDataSourceRequest) | [Instance](#bytebase-v1-Instance) | Adds a read-only data source to an instance. Permissions required: bb.instances.update |-| RemoveDataSource | [RemoveDataSourceRequest](#bytebase-v1-RemoveDataSourceRequest) | [Instance](#bytebase-v1-Instance) | Removes a read-only data source from an instance. Permissions required: bb.instances.update |-| UpdateDataSource | [UpdateDataSourceRequest](#bytebase-v1-UpdateDataSourceRequest) | [Instance](#bytebase-v1-Instance) | Updates a data source configuration. Permissions required: bb.instances.update |-+| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| statement_types | [StatementType](#bytebase-v1-StatementType) | repeated | statement_types are the types of statements that are found in the sql. |+| affected_rows | [int64](#int64) | | |-<a name="v1_database_service-proto"></a>-<p align="right"><a href="#top">Top</a></p>-## v1/database_service.proto-<a name="bytebase-v1-BatchGetDatabasesRequest"></a>+<a name="bytebase-v1-RunPlanChecksRequest"></a>-### BatchGetDatabasesRequest+### RunPlanChecksRequest| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| parent | [string](#string) | | The parent resource shared by all databases being retrieved. - projects/{project}: batch get databases in a project; - instances/{instances}: batch get databases in a instance; Use "-" as wildcard to batch get databases across parent. |-| names | [string](#string) | repeated | The list of database names to retrieve. |--+| 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-BatchGetDatabasesResponse"></a>-### BatchGetDatabasesResponse+<a name="bytebase-v1-RunPlanChecksResponse"></a>+### RunPlanChecksResponse-| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| databases | [Database](#bytebase-v1-Database) | repeated | The databases from the specified request. |-<a name="bytebase-v1-BatchSyncDatabasesRequest"></a>+<a name="bytebase-v1-UpdatePlanRequest"></a>-### BatchSyncDatabasesRequest+### UpdatePlanRequest| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| parent | [string](#string) | | The parent resource shared by all databases being updated. Format: instances/{instance} If the operation spans parents, a dash (-) may be accepted as a wildcard. |-| names | [string](#string) | repeated | The list of database names to sync. |-+| plan | [Plan](#bytebase-v1-Plan) | | The plan to update.+The plan'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-BatchSyncDatabasesResponse"></a>-### BatchSyncDatabasesResponse++<a name="bytebase-v1-PlanCheckRun-Result-Type"></a>+### PlanCheckRun.Result.Type+| Name | Number | Description |+| ---- | ------ | ----------- |+| TYPE_UNSPECIFIED | 0 | |+| STATEMENT_ADVISE | 1 | |+| STATEMENT_SUMMARY_REPORT | 2 | |+| GHOST_SYNC | 3 | |-<a name="bytebase-v1-BatchUpdateDatabasesRequest"></a>-### BatchUpdateDatabasesRequest+<a name="bytebase-v1-PlanCheckRun-Status"></a>+### PlanCheckRun.Status-| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| parent | [string](#string) | | The parent resource shared by all databases being updated. Format: instances/{instance} If the operation spans parents, a dash (-) may be accepted as a wildcard. We only support updating the project of databases for now. |-| requests | [UpdateDatabaseRequest](#bytebase-v1-UpdateDatabaseRequest) | repeated | The request message specifying the resources to update. A maximum of 1000 databases can be modified in a batch. |+| Name | Number | Description |+| ---- | ------ | ----------- |+| STATUS_UNSPECIFIED | 0 | |+| RUNNING | 1 | |+| DONE | 2 | |+| FAILED | 3 | |+| CANCELED | 4 | |+++<a name="bytebase-v1-PlanService"></a>-<a name="bytebase-v1-BatchUpdateDatabasesResponse"></a>+### PlanService+PlanService manages deployment plans for database changes.-### BatchUpdateDatabasesResponse+| 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 |+| 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) |+| GetPlanCheckRun | [GetPlanCheckRunRequest](#bytebase-v1-GetPlanCheckRunRequest) | [PlanCheckRun](#bytebase-v1-PlanCheckRun) | Gets the plan check run for a deployment plan. Permissions required: bb.planCheckRuns.get |+| RunPlanChecks | [RunPlanChecksRequest](#bytebase-v1-RunPlanChecksRequest) | [RunPlanChecksResponse](#bytebase-v1-RunPlanChecksResponse) | Executes validation checks on a deployment plan. Permissions required: bb.planCheckRuns.run |+| CancelPlanCheckRun | [CancelPlanCheckRunRequest](#bytebase-v1-CancelPlanCheckRunRequest) | [CancelPlanCheckRunResponse](#bytebase-v1-CancelPlanCheckRunResponse) | Cancels the plan check run for a deployment plan. Permissions required: bb.planCheckRuns.run |+-| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| databases | [Database](#bytebase-v1-Database) | repeated | Databases updated. |+<a name="v1_issue_service-proto"></a>+<p align="right"><a href="#top">Top</a></p>+## v1/issue_service.proto+<a name="bytebase-v1-ApprovalFlow"></a>-<a name="bytebase-v1-BoundingBox"></a>+### ApprovalFlow-### BoundingBox-BoundingBox defines the spatial bounds for GEOMETRY spatial indexes.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| xmin | [double](#double) | | Minimum X coordinate |-| ymin | [double](#double) | | Minimum Y coordinate |-| xmax | [double](#double) | | Maximum X coordinate |-| ymax | [double](#double) | | Maximum Y coordinate |+| roles | [string](#string) | repeated | The roles required for approval in order. |-<a name="bytebase-v1-Changelog"></a>+<a name="bytebase-v1-ApprovalTemplate"></a>-### Changelog+### ApprovalTemplate| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | Format: instances/{instance}/databases/{database}/changelogs/{changelog} |-| create_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |-| status | [Changelog.Status](#bytebase-v1-Changelog-Status) | | |-| schema | [string](#string) | | |-| schema_size | [int64](#int64) | | |-| task_run | [string](#string) | | Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun} |-| plan_title | [string](#string) | | The title of the plan associated with this changelog's task run. This field is populated by deriving the plan from task_run for display purposes. |+| flow | [ApprovalFlow](#bytebase-v1-ApprovalFlow) | | The approval flow definition. |+| title | [string](#string) | | The title of the approval template. |+| description | [string](#string) | | The description of the approval template. |-<a name="bytebase-v1-CheckConstraintMetadata"></a>+<a name="bytebase-v1-ApproveIssueRequest"></a>++### ApproveIssueRequest-### CheckConstraintMetadata-CheckConstraintMetadata is the metadata for check constraints.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The name is the name of a check constraint. |-| expression | [string](#string) | | The expression is the expression of a check constraint. |+| name | [string](#string) | | The name of the issue to add an approver. Format: projects/{project}/issues/{issue} |+| comment | [string](#string) | | The comment explaining the approval decision. |-<a name="bytebase-v1-ColumnMetadata"></a>+<a name="bytebase-v1-BatchUpdateIssuesStatusRequest"></a>++### BatchUpdateIssuesStatusRequest-### ColumnMetadata-ColumnMetadata is the metadata for columns.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The name is the name of a column. |-| position | [int32](#int32) | | The position is the position in columns. |-| has_default | [bool](#bool) | | |-| default | [string](#string) | | The default value of column. |-| default_on_null | [bool](#bool) | | Oracle specific metadata. The default_on_null is the default on null of a column. |-| on_update | [string](#string) | | The on_update is the on update action of a column. For MySQL like databases, it's only supported for TIMESTAMP columns with CURRENT_TIMESTAMP as on update value. |-| nullable | [bool](#bool) | | The nullable is the nullable of a column. |-| type | [string](#string) | | The type is the type of a column. |-| character_set | [string](#string) | | The character_set is the character_set of a column. |-| collation | [string](#string) | | The collation is the collation of a column. |-| comment | [string](#string) | | The comment is the comment of a column. |-| generation | [GenerationMetadata](#bytebase-v1-GenerationMetadata) | | The generation is the generation of a column. |-| is_identity | [bool](#bool) | | |-| identity_generation | [ColumnMetadata.IdentityGeneration](#bytebase-v1-ColumnMetadata-IdentityGeneration) | | The identity_generation is for identity columns, PG only. |-| identity_seed | [int64](#int64) | | The identity_seed is for identity columns, MSSQL only. |-| identity_increment | [int64](#int64) | | The identity_increment is for identity columns, MSSQL only. |-| default_constraint_name | [string](#string) | | The default_constraint_name is the name of the default constraint, MSSQL only. In MSSQL, default values are implemented as named constraints. When modifying or dropping a column's default value, you must reference the constraint by name. This field stores the actual constraint name from the database.+| parent | [string](#string) | | The parent resource shared by all issues being updated. Format: projects/{project} If the operation spans parents, a dash (-) may be accepted as a wildcard. We only support updating the status of databases for now. |+| issues | [string](#string) | repeated | The list of issues to update. Format: projects/{project}/issues/{issue} |+| status | [IssueStatus](#bytebase-v1-IssueStatus) | | The new status. |+| reason | [string](#string) | | The reason for the status change. |-Example: A column definition like: CREATE TABLE employees ( status NVARCHAR(20) DEFAULT 'active' )-Will create a constraint with an auto-generated name like 'DF__employees__statu__3B75D760' or a user-defined name if specified: ALTER TABLE employees ADD CONSTRAINT DF_employees_status DEFAULT 'active' FOR status-To modify the default, you must first drop the existing constraint by name: ALTER TABLE employees DROP CONSTRAINT DF__employees__statu__3B75D760 ALTER TABLE employees ADD CONSTRAINT DF_employees_status DEFAULT 'inactive' FOR status-This field is populated when syncing from the database. When empty (e.g., when parsing from SQL files), the system cannot automatically drop the constraint. |+<a name="bytebase-v1-BatchUpdateIssuesStatusResponse"></a>+### BatchUpdateIssuesStatusResponse-<a name="bytebase-v1-Database"></a>-### Database++++<a name="bytebase-v1-CreateIssueCommentRequest"></a>++### CreateIssueCommentRequest| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The name of the database. Format: instances/{instance}/databases/{database} {database} is the database name in the instance. |-| state | [State](#bytebase-v1-State) | | The existence of a database. |-| successful_sync_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | The latest synchronization time. |-| project | [string](#string) | | The project for a database. Format: projects/{project} |-| release | [string](#string) | | The release that was last applied to this database. Format: projects/{project}/releases/{release_id} Example: projects/my-project/releases/release_20260115-RC00 |-| environment | [string](#string) | optional | The environment resource. Format: environments/prod where prod is the environment resource ID. |-| effective_environment | [string](#string) | optional | The effective environment based on environment tag above and environment tag on the instance. Inheritance follows https://cloud.google.com/resource-manager/docs/tags/tags-overview. |-| labels | [Database.LabelsEntry](#bytebase-v1-Database-LabelsEntry) | repeated | Labels will be used for deployment and policy control. |-| instance_resource | [InstanceResource](#bytebase-v1-InstanceResource) | | The instance resource. |-| backup_available | [bool](#bool) | | The database is available for DML prior backup. |-| sync_status | [SyncStatus](#bytebase-v1-SyncStatus) | | The sync status of the database. |-| sync_error | [string](#string) | | The error message if sync failed. |+| parent | [string](#string) | | The issue name Format: projects/{project}/issues/{issue} |+| issue_comment | [IssueComment](#bytebase-v1-IssueComment) | | The comment to create. |-<a name="bytebase-v1-Database-LabelsEntry"></a>+<a name="bytebase-v1-CreateIssueRequest"></a>-### Database.LabelsEntry+### CreateIssueRequest| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| key | [string](#string) | | |-| value | [string](#string) | | |+| parent | [string](#string) | | The parent, which owns this collection of issues. Format: projects/{project} |+| issue | [Issue](#bytebase-v1-Issue) | | The issue to create. |-<a name="bytebase-v1-DatabaseMetadata"></a>+<a name="bytebase-v1-GetIssueRequest"></a>++### GetIssueRequest-### DatabaseMetadata-DatabaseMetadata is the metadata for databases.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The database metadata name.+| name | [string](#string) | | The name of the issue to retrieve. Format: projects/{project}/issues/{issue} |+| force | [bool](#bool) | | If set to true, bypass cache and fetch the latest data. |-Format: instances/{instance}/databases/{database}/metadata |-| schemas | [SchemaMetadata](#bytebase-v1-SchemaMetadata) | repeated | The schemas is the list of schemas in a database. |-| character_set | [string](#string) | | The character_set is the character set of a database. |-| collation | [string](#string) | | The collation is the collation of a database. |-| extensions | [ExtensionMetadata](#bytebase-v1-ExtensionMetadata) | repeated | The extensions is the list of extensions in a database. |-| owner | [string](#string) | | The owner of the database. |-| search_path | [string](#string) | | The search_path is the search path of a PostgreSQL database. |+<a name="bytebase-v1-Issue"></a>-<a name="bytebase-v1-DatabaseSDLSchema"></a>+### Issue-### DatabaseSDLSchema-DatabaseSDLSchema contains the schema in SDL format.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| schema | [bytes](#bytes) | | The SDL schema content. - For SINGLE_FILE format: contains the complete SDL schema as a text string. - For MULTI_FILE format: contains the ZIP archive as binary data. |-| content_type | [string](#string) | | The MIME type of the schema content. Indicates how the client should interpret the schema field. Examples: - "text/plain; charset=utf-8" for SINGLE_FILE format - "application/zip" for MULTI_FILE format |+| name | [string](#string) | | The name of the issue. Format: projects/{project}/issues/{issue} |+| title | [string](#string) | | The title of the issue. |+| description | [string](#string) | | The description of the issue. |+| type | [Issue.Type](#bytebase-v1-Issue-Type) | | |+| status | [IssueStatus](#bytebase-v1-IssueStatus) | | The status of the issue. |+| approvers | [Issue.Approver](#bytebase-v1-Issue-Approver) | repeated | |+| approval_template | [ApprovalTemplate](#bytebase-v1-ApprovalTemplate) | | The approval template for the issue. |+| creator | [string](#string) | | Format: users/[email protected] |+| create_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |+| update_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |+| plan | [string](#string) | | The plan associated with the issue. Can be empty. Format: projects/{project}/plans/{plan} |+| role_grant | [RoleGrant](#bytebase-v1-RoleGrant) | | Used if the issue type is ROLE_GRANT. |+| risk_level | [RiskLevel](#bytebase-v1-RiskLevel) | | The risk level of the issue. |+| labels | [string](#string) | repeated | Labels attached to the issue for categorization and filtering. |+| approval_status | [ApprovalStatus](#bytebase-v1-ApprovalStatus) | | The overall approval status for the issue. |+| access_grant | [string](#string) | | The access grant associated with this issue. Format: projects/{project}/accessGrants/{access_grant} |-<a name="bytebase-v1-DatabaseSchema"></a>+<a name="bytebase-v1-Issue-Approver"></a>-### DatabaseSchema-DatabaseSchema is the metadata for databases.+### Issue.Approver+Approvers and their approval status for the issue.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| schema | [string](#string) | | The schema dump from database. |+| status | [Issue.Approver.Status](#bytebase-v1-Issue-Approver-Status) | | The new status. |+| principal | [string](#string) | | Format: users/[email protected] |-<a name="bytebase-v1-DependencyColumn"></a>+<a name="bytebase-v1-IssueComment"></a>-### DependencyColumn-DependencyColumn is the metadata for dependency columns.+### IssueComment+A comment on an issue.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| schema | [string](#string) | | The schema is the schema of a reference column. |-| table | [string](#string) | | The table is the table of a reference column. |-| column | [string](#string) | | The column is the name of a reference column. |-+| name | [string](#string) | | Format: projects/{project}/issues/{issue}/issueComments/{issueComment-uid} |+| comment | [string](#string) | | The text content of the comment. |+| payload | [string](#string) | | TODO: use struct message instead. |+| create_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |+| update_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |+| creator | [string](#string) | | Format: users/{email} |+| approval | [IssueComment.Approval](#bytebase-v1-IssueComment-Approval) | | Approval event. |+| issue_update | [IssueComment.IssueUpdate](#bytebase-v1-IssueComment-IssueUpdate) | | Issue update event. |+| plan_update | [IssueComment.PlanUpdate](#bytebase-v1-IssueComment-PlanUpdate) | | Plan update event. |-<a name="bytebase-v1-DependencyTable"></a>-### DependencyTable+<a name="bytebase-v1-IssueComment-Approval"></a>+### IssueComment.Approval+Approval event information.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| schema | [string](#string) | | The schema is the schema of a reference table. |-| table | [string](#string) | | The table is the name of a reference table. |-+| status | [IssueComment.Approval.Status](#bytebase-v1-IssueComment-Approval-Status) | | The approval status. |-<a name="bytebase-v1-DiffSchemaRequest"></a>-### DiffSchemaRequest+<a name="bytebase-v1-IssueComment-IssueUpdate"></a>+### IssueComment.IssueUpdate+Issue update event information.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The name of the database or changelog. Format: database: instances/{instance}/databases/{database} changelog: instances/{instance}/databases/{database}/changelogs/{changelog} |-| schema | [string](#string) | | The target schema. |-| changelog | [string](#string) | | The resource name of the changelog Format: instances/{instance}/databases/{database}/changelogs/{changelog} |-+| from_title | [string](#string) | optional | |+| to_title | [string](#string) | optional | |+| from_description | [string](#string) | optional | |+| to_description | [string](#string) | optional | |+| from_status | [IssueStatus](#bytebase-v1-IssueStatus) | optional | |+| to_status | [IssueStatus](#bytebase-v1-IssueStatus) | optional | |+| from_labels | [string](#string) | repeated | |+| to_labels | [string](#string) | repeated | |-<a name="bytebase-v1-DiffSchemaResponse"></a>-### DiffSchemaResponse+<a name="bytebase-v1-IssueComment-PlanUpdate"></a>+### IssueComment.PlanUpdate+Plan update event information (snapshot of plan.config.specs before+and after a PlanService.UpdatePlan call that mutated specs).| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| diff | [string](#string) | | |--+| from_specs | [Plan.Spec](#bytebase-v1-Plan-Spec) | repeated | |+| to_specs | [Plan.Spec](#bytebase-v1-Plan-Spec) | repeated | |-<a name="bytebase-v1-DimensionConstraint"></a>--### DimensionConstraint-DimensionConstraint defines constraints for a spatial dimension.---| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| dimension | [string](#string) | | Dimension name/type (X, Y, Z, M, etc.) |-| min_value | [double](#double) | | Minimum value for this dimension |-| max_value | [double](#double) | | Maximum value for this dimension |-| tolerance | [double](#double) | | Tolerance for this dimension |---+<a name="bytebase-v1-ListIssueCommentsRequest"></a>-<a name="bytebase-v1-DimensionalConfig"></a>+### ListIssueCommentsRequest-### DimensionalConfig-DimensionalConfig defines dimensional and constraint parameters for spatial indexes.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| dimensions | [int32](#int32) | | Number of dimensions (2-4, default 2) |-| data_type | [string](#string) | | Spatial data type (GEOMETRY, GEOGRAPHY, POINT, POLYGON, etc.) |-| srid | [int32](#int32) | | Spatial reference system identifier (SRID) |-| constraints | [DimensionConstraint](#bytebase-v1-DimensionConstraint) | repeated | Coordinate system constraints |+| parent | [string](#string) | | Format: projects/{projects}/issues/{issue} |+| page_size | [int32](#int32) | | The maximum number of issue comments to return. The service may return fewer than this value. If unspecified, at most 10 issue comments 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 `ListIssueComments` call. Provide this to retrieve the subsequent page.++When paginating, all other parameters provided to `ListIssueComments` must match the call that provided the page token. |-<a name="bytebase-v1-EnumTypeMetadata"></a>+<a name="bytebase-v1-ListIssueCommentsResponse"></a>-### EnumTypeMetadata+### ListIssueCommentsResponse| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The name of a type. |-| values | [string](#string) | repeated | The enum values of a type. |-| comment | [string](#string) | | The comment describing the enum type. |-| skip_dump | [bool](#bool) | | Whether to skip this enum type during schema dump operations. |+| issue_comments | [IssueComment](#bytebase-v1-IssueComment) | repeated | The issue comments 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-EventMetadata"></a>+<a name="bytebase-v1-ListIssuesRequest"></a>-### EventMetadata+### ListIssuesRequest| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The name of the event. |-| definition | [string](#string) | | The schedule of the event. |-| time_zone | [string](#string) | | The time zone of the event. |-| sql_mode | [string](#string) | | The SQL mode setting for the event. |-| character_set_client | [string](#string) | | The character set used by the client creating the event. |-| collation_connection | [string](#string) | | The collation used for the connection when creating the event. |-| comment | [string](#string) | | The comment is the comment of an event. |-------<a name="bytebase-v1-ExtensionMetadata"></a>+| parent | [string](#string) | | The parent, which owns this collection of issues. Format: projects/{project} |+| page_size | [int32](#int32) | | The maximum number of issues to return. The service may return fewer than this value. If unspecified, at most 10 issues 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 `ListIssues` call. Provide this to retrieve the subsequent page.-### ExtensionMetadata-ExtensionMetadata is the metadata for extensions.+When paginating, all other parameters provided to `ListIssues` must match the call that provided the page token. |+| filter | [string](#string) | | Filter is used to filter issues returned in the list. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec+Supported filters: - creator: issue creator full name in "users/{email or id}" format, support "==" operator. - status: the issue status, support "==" and "in" operator, check the IssueStatus enum for the values. - create_time: issue create time in "2006-01-02T15:04:05Z07:00" format, support ">=" or "<=" operator. - type: the issue type, support "==" and "in" operator, check the Type enum in the Issue message for the values. - labels: the issue labels, support "==" and "in" operator. - risk_level: the issue risk level, support "in" operator, check the RiskLevel enum for the values. - approval_status: issue approval status, support "==" operator. - current_approver: the issue approver, should in "users/{email} format", support "==" operator.-| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The name is the name of an extension. |-| schema | [string](#string) | | The schema is the extension that is installed to. But the extension usage is not limited to the schema. |-| version | [string](#string) | | The version is the version of an extension. |-| description | [string](#string) | | The description is the description of an extension. |+For example: creator == "users/[email protected]" && status in ["OPEN", "DONE"] status == "CANCELED" && type == "DATABASE_CHANGE" labels in ["label1", "label2"] risk_level in ["HIGH", "MODERATE"] create_time >= "2025-01-02T15:04:05Z07:00" |+| query | [string](#string) | | Query is the query statement. |+| order_by | [string](#string) | | The order by of issues. Support: - create_time - update_time The default sorting order is ascending. For example: - order_by = "create_time desc" - order_by = "update_time asc" |-<a name="bytebase-v1-ExternalTableMetadata"></a>+<a name="bytebase-v1-ListIssuesResponse"></a>-### ExternalTableMetadata+### ListIssuesResponse| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The name is the name of a external table. |-| external_server_name | [string](#string) | | The external_server_name is the name of the external server. |-| external_database_name | [string](#string) | | The external_database_name is the name of the external database. |-| columns | [ColumnMetadata](#bytebase-v1-ColumnMetadata) | repeated | The columns is the ordered list of columns in a foreign table. |+| issues | [Issue](#bytebase-v1-Issue) | repeated | The issues 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-ForeignKeyMetadata"></a>+<a name="bytebase-v1-RejectIssueRequest"></a>++### RejectIssueRequest-### ForeignKeyMetadata-ForeignKeyMetadata is the metadata for foreign keys.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The name is the name of a foreign key. |-| columns | [string](#string) | repeated | The columns are the ordered referencing columns of a foreign key. |-| referenced_schema | [string](#string) | | The referenced_schema is the referenced schema name of a foreign key. It is an empty string for databases without such concept such as MySQL. |-| referenced_table | [string](#string) | | The referenced_table is the referenced table name of a foreign key. |-| referenced_columns | [string](#string) | repeated | The referenced_columns are the ordered referenced columns of a foreign key. |-| on_delete | [string](#string) | | The on_delete is the on delete action of a foreign key. |-| on_update | [string](#string) | | The on_update is the on update action of a foreign key. |-| match_type | [string](#string) | | The match_type is the match type of a foreign key. The match_type is the PostgreSQL specific field. It's empty string for other databases. |+| name | [string](#string) | | The name of the issue to add a rejection. Format: projects/{project}/issues/{issue} |+| comment | [string](#string) | | The comment explaining the rejection decision. |-<a name="bytebase-v1-FunctionMetadata"></a>+<a name="bytebase-v1-RequestIssueRequest"></a>++### RequestIssueRequest-### FunctionMetadata-FunctionMetadata is the metadata for functions.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The name is the name of a function. |-| definition | [string](#string) | | The definition is the definition of a function. |-| signature | [string](#string) | | The signature is the name with the number and type of input arguments the function takes. |-| character_set_client | [string](#string) | | MySQL specific metadata. |-| collation_connection | [string](#string) | | |-| database_collation | [string](#string) | | |-| sql_mode | [string](#string) | | |-| comment | [string](#string) | | |-| dependency_tables | [DependencyTable](#bytebase-v1-DependencyTable) | repeated | The dependency_tables is the list of dependency tables of a function. For PostgreSQL, it's the list of tables that the function depends on the return type definition. |-| skip_dump | [bool](#bool) | | |+| name | [string](#string) | | The name of the issue to request a issue. Format: projects/{project}/issues/{issue} |+| comment | [string](#string) | | The comment explaining the request. |-<a name="bytebase-v1-GenerationMetadata"></a>+<a name="bytebase-v1-RetryIssueApprovalRequest"></a>-### GenerationMetadata+### RetryIssueApprovalRequest| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| type | [GenerationMetadata.Type](#bytebase-v1-GenerationMetadata-Type) | | |-| expression | [string](#string) | | |+| name | [string](#string) | | The name of the issue whose approval-finding should be retried. Format: projects/{project}/issues/{issue} |-<a name="bytebase-v1-GetChangelogRequest"></a>+<a name="bytebase-v1-RoleGrant"></a>-### GetChangelogRequest+### RoleGrant| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The name of the changelog to retrieve. Format: instances/{instance}/databases/{database}/changelogs/{changelog} |-| view | [ChangelogView](#bytebase-v1-ChangelogView) | | |+| role | [string](#string) | | The requested role. Format: roles/EXPORTER. |+| user | [string](#string) | | The user to be granted. Format: users/{email}. |+| condition | [google.type.Expr](#google-type-Expr) | | The condition for the role. Same as the condition in IAM Binding message. |+| expiration | [google.protobuf.Duration](#google-protobuf-Duration) | | The duration for which the grant is valid. |-<a name="bytebase-v1-GetDatabaseMetadataRequest"></a>+<a name="bytebase-v1-SearchIssuesRequest"></a>-### GetDatabaseMetadataRequest+### SearchIssuesRequest| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The name of the database to retrieve metadata. Format: instances/{instance}/databases/{database}/metadata |-| filter | [string](#string) | | Filter is used to filter databases returned in the list. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec--Supported filter: - schema: the schema name, support "==" operator. - table: the table name, support "==" and ".contains()" operator.+| parent | [string](#string) | | The parent, which owns this collection of issues. Format: projects/{project} Use "projects/-" to list all issues from all projects. |+| page_size | [int32](#int32) | | The maximum number of issues to return. The service may return fewer than this value. If unspecified, at most 10 issues 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 `SearchIssues` call. Provide this to retrieve the subsequent page.-For example: schema == "schema-a" table == "table-a" table.contains("table-a") schema == "schema-a" && table.contains("sample") The filter is used to search for tables containing "sample" in the schema "schemas/schema-a". The column masking level will only be returned when a table filter is used. |-| limit | [int32](#int32) | | Limit the response size of returned table metadata per schema. For example, if the database has 3 schemas, and each schema has 100 tables, if limit is 20, then only 20 tables will be returned for each schema, total 60 tables. Default 0, means no limit. |+When paginating, all other parameters provided to `SearchIssues` must match the call that provided the page token. |+| filter | [string](#string) | | Filter is used to filter issues returned in the list. Check the filter field in the ListIssuesRequest message. |+| query | [string](#string) | | Query is the query statement. |+| order_by | [string](#string) | | The order by of issues. Support: - create_time - update_time The default sorting order is ascending. For example: - order_by = "create_time desc" - order_by = "update_time asc" |-<a name="bytebase-v1-GetDatabaseRequest"></a>+<a name="bytebase-v1-SearchIssuesResponse"></a>-### GetDatabaseRequest+### SearchIssuesResponse| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The name of the database to retrieve. Format: instances/{instance}/databases/{database} |+| issues | [Issue](#bytebase-v1-Issue) | repeated | The issues 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-GetDatabaseSDLSchemaRequest"></a>+<a name="bytebase-v1-UpdateIssueCommentRequest"></a>-### GetDatabaseSDLSchemaRequest+### UpdateIssueCommentRequest| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The name of the database to retrieve SDL schema. Format: instances/{instance}/databases/{database}/sdlSchema |-| format | [GetDatabaseSDLSchemaRequest.SDLFormat](#bytebase-v1-GetDatabaseSDLSchemaRequest-SDLFormat) | | The format of the SDL schema output. |+| parent | [string](#string) | | The issue name Format: projects/{project}/issues/{issue} |+| issue_comment | [IssueComment](#bytebase-v1-IssueComment) | | The comment to update. |+| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | The list of fields to update. |+| allow_missing | [bool](#bool) | | If set to true, and the issue comment is not found, a new issue comment will be created. In this situation, `update_mask` is ignored. |-<a name="bytebase-v1-GetDatabaseSchemaRequest"></a>+<a name="bytebase-v1-UpdateIssueRequest"></a>-### GetDatabaseSchemaRequest+### UpdateIssueRequest| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The name of the database to retrieve schema. Format: instances/{instance}/databases/{database}/schema |+| issue | [Issue](#bytebase-v1-Issue) | | The issue to update.+The issue's `name` field is used to identify the issue to update. Format: projects/{project}/issues/{issue} |+| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | The list of fields to update. |+| allow_missing | [bool](#bool) | | If set to true, and the issue is not found, a new issue will be created. In this situation, `update_mask` is ignored. |-<a name="bytebase-v1-GetSchemaStringRequest"></a>+-### GetSchemaStringRequest+<a name="bytebase-v1-Issue-Approver-Status"></a>+### Issue.Approver.Status+The approval status of an approver.-| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The name of the database. Format: instances/{instance}/databases/{database} |-| type | [GetSchemaStringRequest.ObjectType](#bytebase-v1-GetSchemaStringRequest-ObjectType) | | |-| schema | [string](#string) | | It's empty for DATABASE. |-| object | [string](#string) | | It's empty for DATABASE and SCHEMA. |-| metadata | [DatabaseMetadata](#bytebase-v1-DatabaseMetadata) | | If use the metadata to generate the schema string, the type is OBJECT_TYPE_UNSPECIFIED. Also the schema and object are empty. |+| Name | Number | Description |+| ---- | ------ | ----------- |+| STATUS_UNSPECIFIED | 0 | Unspecified status. |+| PENDING | 1 | Awaiting approval. |+| APPROVED | 2 | Approved. |+| REJECTED | 3 | Rejected. |+<a name="bytebase-v1-Issue-Type"></a>+### Issue.Type+The type of issue.+| Name | Number | Description |+| ---- | ------ | ----------- |+| TYPE_UNSPECIFIED | 0 | Unspecified issue type. |+| DATABASE_CHANGE | 1 | Database schema or data change. |+| ROLE_GRANT | 2 | Role grant request. |+| DATABASE_EXPORT | 3 | Database data export request. |+| ACCESS_GRANT | 4 | Temporary access grant request. |-<a name="bytebase-v1-GetSchemaStringResponse"></a>-### GetSchemaStringResponse+<a name="bytebase-v1-IssueComment-Approval-Status"></a>+### IssueComment.Approval.Status+Approval status values.-| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| schema_string | [string](#string) | | |+| Name | Number | Description |+| ---- | ------ | ----------- |+| STATUS_UNSPECIFIED | 0 | Unspecified status. |+| PENDING | 1 | Approval pending. |+| APPROVED | 2 | Approved. |+| REJECTED | 3 | Rejected. |+<a name="bytebase-v1-IssueStatus"></a>+### IssueStatus+The status of an issue.+| Name | Number | Description |+| ---- | ------ | ----------- |+| ISSUE_STATUS_UNSPECIFIED | 0 | Unspecified status. |+| OPEN | 1 | Issue is open and active. |+| DONE | 2 | Issue is completed. |+| CANCELED | 3 | Issue is canceled. |-<a name="bytebase-v1-GridLevel"></a>-### GridLevel-GridLevel defines a tessellation grid level with its density.++-| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| level | [int32](#int32) | | Grid level number (1-4 for SQL Server) |-| density | [string](#string) | | Grid density (LOW, MEDIUM, HIGH) |+<a name="bytebase-v1-IssueService"></a>+### IssueService+IssueService manages issues for tracking database changes and tasks.++| Method Name | Request Type | Response Type | Description |+| ----------- | ------------ | ------------- | ------------|+| GetIssue | [GetIssueRequest](#bytebase-v1-GetIssueRequest) | [Issue](#bytebase-v1-Issue) | Retrieves an issue by name. Permissions required: bb.issues.get |+| CreateIssue | [CreateIssueRequest](#bytebase-v1-CreateIssueRequest) | [Issue](#bytebase-v1-Issue) | Creates a new issue for database changes or tasks. Permissions required: bb.issues.create |+| ListIssues | [ListIssuesRequest](#bytebase-v1-ListIssuesRequest) | [ListIssuesResponse](#bytebase-v1-ListIssuesResponse) | Lists issues in a project. Permissions required: bb.issues.list |+| SearchIssues | [SearchIssuesRequest](#bytebase-v1-SearchIssuesRequest) | [SearchIssuesResponse](#bytebase-v1-SearchIssuesResponse) | Search for issues that the caller has the bb.issues.get permission on and also satisfy the specified filter & query. Permissions required: bb.issues.get |+| UpdateIssue | [UpdateIssueRequest](#bytebase-v1-UpdateIssueRequest) | [Issue](#bytebase-v1-Issue) | Updates an issue's properties such as title, description, or labels. Permissions required: bb.issues.update |+| ListIssueComments | [ListIssueCommentsRequest](#bytebase-v1-ListIssueCommentsRequest) | [ListIssueCommentsResponse](#bytebase-v1-ListIssueCommentsResponse) | Lists comments on an issue. Permissions required: bb.issueComments.list |+| CreateIssueComment | [CreateIssueCommentRequest](#bytebase-v1-CreateIssueCommentRequest) | [IssueComment](#bytebase-v1-IssueComment) | Adds a comment to an issue. Permissions required: bb.issueComments.create |+| UpdateIssueComment | [UpdateIssueCommentRequest](#bytebase-v1-UpdateIssueCommentRequest) | [IssueComment](#bytebase-v1-IssueComment) | Updates an existing issue comment. Permissions required: bb.issueComments.update |+| BatchUpdateIssuesStatus | [BatchUpdateIssuesStatusRequest](#bytebase-v1-BatchUpdateIssuesStatusRequest) | [BatchUpdateIssuesStatusResponse](#bytebase-v1-BatchUpdateIssuesStatusResponse) | Updates the status of multiple issues in a single operation. Permissions required: bb.issues.update |+| ApproveIssue | [ApproveIssueRequest](#bytebase-v1-ApproveIssueRequest) | [Issue](#bytebase-v1-Issue) | Approves an issue. Access determined by approval flow configuration - caller must be a designated approver for the current approval step. Permissions required: None (determined by approval flow) |+| RejectIssue | [RejectIssueRequest](#bytebase-v1-RejectIssueRequest) | [Issue](#bytebase-v1-Issue) | Rejects an issue. Access determined by approval flow configuration - caller must be a designated approver for the current approval step. Permissions required: None (determined by approval flow) |+| RequestIssue | [RequestIssueRequest](#bytebase-v1-RequestIssueRequest) | [Issue](#bytebase-v1-Issue) | Requests changes on an issue. Access determined by approval flow configuration - caller must be a designated approver for the current approval step. Permissions required: None (determined by approval flow) |+| RetryIssueApproval | [RetryIssueApprovalRequest](#bytebase-v1-RetryIssueApprovalRequest) | [Issue](#bytebase-v1-Issue) | Re-runs approval-template finding for an issue stuck in CHECKING. Useful when the synchronous post-create finding errored (e.g. against a malformed workspace approval rule) and the operator has since corrected it — without this, the issue would remain in CHECKING indefinitely because there is no other retry path for non-DATABASE_CHANGE issue types. Idempotent: returns the existing issue unchanged when approval-finding has already completed. Permissions required: None (caller must be the issue creator; mirrors RequestIssue's authorization model). |+-<a name="bytebase-v1-IndexMetadata"></a>+<a name="v1_setting_service-proto"></a>+<p align="right"><a href="#top">Top</a></p>++## v1/setting_service.proto++++<a name="bytebase-v1-AISetting"></a>++### AISetting-### IndexMetadata-IndexMetadata is the metadata for indexes.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The name is the name of an index. |-| expressions | [string](#string) | repeated | The expressions are the ordered columns or expressions of an index. This could refer to a column or an expression. |-| key_length | [int64](#int64) | repeated | The key_lengths are the ordered key lengths of an index. If the key length is not specified, it's -1. |-| descending | [bool](#bool) | repeated | The descending is the ordered descending of an index. |-| type | [string](#string) | | The type is the type of an index. |-| unique | [bool](#bool) | | The unique is whether the index is unique. |-| primary | [bool](#bool) | | The primary is whether the index is a primary key index. |-| visible | [bool](#bool) | | The visible is whether the index is visible. |-| comment | [string](#string) | | The comment is the comment of an index. |-| definition | [string](#string) | | The definition of an index. |-| parent_index_schema | [string](#string) | | The schema name of the parent index. |-| parent_index_name | [string](#string) | | The index name of the parent index. |-| granularity | [int64](#int64) | | The number of granules in the block. It's a ClickHouse specific field. |-| is_constraint | [bool](#bool) | | It's a PostgreSQL specific field. The unique constraint and unique index are not the same thing in PostgreSQL. |-| spatial_config | [SpatialIndexConfig](#bytebase-v1-SpatialIndexConfig) | | Spatial index configuration for spatial databases like SQL Server, PostgreSQL with PostGIS, etc. |-| opclass_names | [string](#string) | repeated | https://www.postgresql.org/docs/current/catalog-pg-opclass.html Name of the operator class for each column. (PostgreSQL specific). |-| opclass_defaults | [bool](#bool) | repeated | True if the operator class is the default. (PostgreSQL specific). |+| enabled | [bool](#bool) | | |+| provider | [AISetting.Provider](#bytebase-v1-AISetting-Provider) | | |+| endpoint | [string](#string) | | |+| api_key | [string](#string) | | |+| model | [string](#string) | | |+| version | [string](#string) | | |-<a name="bytebase-v1-ListChangelogsRequest"></a>+<a name="bytebase-v1-Algorithm"></a>-### ListChangelogsRequest+### Algorithm| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| parent | [string](#string) | | The parent of the changelogs. Format: instances/{instance}/databases/{database} |-| page_size | [int32](#int32) | | The maximum number of changelogs to return. The service may return fewer than this value. If unspecified, at most 10 changelogs 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 the previous call. Provide this to retrieve the subsequent page.--When paginating, all other parameters provided must match the call that provided the page token. |-| view | [ChangelogView](#bytebase-v1-ChangelogView) | | |-| filter | [string](#string) | | Filter is used to filter changelogs returned in the list. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec--Supported filter: - status: the changelog status, support "==" operation. check Changelog.Status for available values. - create_time: the changelog create time in "2006-01-02T15:04:05Z07:00" format, support ">=" or "<=" operator.--Example: status == "DONE" status == "FAILED" && type == "SDL" create_time >= "2024-01-01T00:00:00Z" && create_time <= "2024-01-02T00:00:00Z" |+| full_mask | [Algorithm.FullMask](#bytebase-v1-Algorithm-FullMask) | | |+| range_mask | [Algorithm.RangeMask](#bytebase-v1-Algorithm-RangeMask) | | |+| md5_mask | [Algorithm.MD5Mask](#bytebase-v1-Algorithm-MD5Mask) | | |+| inner_outer_mask | [Algorithm.InnerOuterMask](#bytebase-v1-Algorithm-InnerOuterMask) | | |-<a name="bytebase-v1-ListChangelogsResponse"></a>+<a name="bytebase-v1-Algorithm-FullMask"></a>-### ListChangelogsResponse+### Algorithm.FullMask| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| changelogs | [Changelog](#bytebase-v1-Changelog) | repeated | The list of changelogs. |-| 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. |+| substitution | [string](#string) | | substitution is the string used to replace the original value, the max length of the string is 16 bytes. |-<a name="bytebase-v1-ListDatabasesRequest"></a>+<a name="bytebase-v1-Algorithm-InnerOuterMask"></a>-### ListDatabasesRequest+### Algorithm.InnerOuterMask| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| parent | [string](#string) | | - projects/{project}: list databases in a project, require "bb.projects.get" permission. - workspaces/{id}: list databases in the workspace, require "bb.databases.list" permission. - instances/{instances}: list databases in a instance, require "bb.instances.get" permission |-| page_size | [int32](#int32) | | The maximum number of databases to return. The service may return fewer than this value. If unspecified, at most 10 databases 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 `ListDatabases` call. Provide this to retrieve the subsequent page.--When paginating, all other parameters provided to `ListDatabases` must match the call that provided the page token. |-| filter | [string](#string) | | Filter is used to filter databases returned in the list. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec--Supported filter: - environment: the environment full name in "environments/{id}" format, support "==" operator. - name: the database name, support ".contains()" operator. - project: the project full name in "projects/{id}" format, support "==" operator. - instance: the instance full name in "instances/{id}" format, support "==" operator. - engine: the database engine, check Engine enum for values. Support "==", "in [xx]", "!(in [xx])" operator. - exclude_unassigned: should be "true" or "false", will not show unassigned databases if it's true, support "==" operator. - table: filter by the database table, support "==" and ".contains()" operator. - labels.{key}: the database label, support "==" and "in" operators.--For example: environment == "environments/{environment resource id}" environment == "" (find databases which environment is not set) project == "projects/{project resource id}" instance == "instances/{instance resource id}" name.contains("database name") engine == "MYSQL" engine in ["MYSQL", "POSTGRES"] !(engine in ["MYSQL", "POSTGRES"]) exclude_unassigned == true table == "sample" table.contains("sam") labels.environment == "production" labels.region == "asia" labels.region in ["asia", "europe"]--You can combine filter conditions like: environment == "environments/prod" && name.contains("employee") |-| show_deleted | [bool](#bool) | | Show deleted database if specified. |-| order_by | [string](#string) | | The order by of databases. Support name, project, instance. The default sorting order is ascending. For example: - order_by = "name" - order by name ascending - order_by = "name desc" - order_by = "name desc, project asc" |+| prefix_len | [int32](#int32) | | |+| suffix_len | [int32](#int32) | | |+| type | [Algorithm.InnerOuterMask.MaskType](#bytebase-v1-Algorithm-InnerOuterMask-MaskType) | | |+| substitution | [string](#string) | | |-<a name="bytebase-v1-ListDatabasesResponse"></a>+<a name="bytebase-v1-Algorithm-MD5Mask"></a>-### ListDatabasesResponse+### Algorithm.MD5Mask| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| databases | [Database](#bytebase-v1-Database) | repeated | The databases 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. |+| salt | [string](#string) | | salt is the salt value to generate a different hash that with the word alone. |-<a name="bytebase-v1-MaterializedViewMetadata"></a>+<a name="bytebase-v1-Algorithm-RangeMask"></a>++### Algorithm.RangeMask-### MaterializedViewMetadata-MaterializedViewMetadata is the metadata for materialized views.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The name is the name of a materialized view. |-| definition | [string](#string) | | The definition is the definition of a materialized view. |-| comment | [string](#string) | | The comment is the comment of a materialized view. |-| dependency_columns | [DependencyColumn](#bytebase-v1-DependencyColumn) | repeated | The dependency_columns is the list of dependency columns of a materialized view. |-| triggers | [TriggerMetadata](#bytebase-v1-TriggerMetadata) | repeated | The columns is the ordered list of columns in a table. |-| indexes | [IndexMetadata](#bytebase-v1-IndexMetadata) | repeated | The indexes is the list of indexes in a table. |-| skip_dump | [bool](#bool) | | |+| slices | [Algorithm.RangeMask.Slice](#bytebase-v1-Algorithm-RangeMask-Slice) | repeated | We store it as a repeated field to face the fact that the original value may have multiple parts should be masked. But frontend can be started with a single rule easily. |-<a name="bytebase-v1-PackageMetadata"></a>+<a name="bytebase-v1-Algorithm-RangeMask-Slice"></a>++### Algorithm.RangeMask.Slice-### PackageMetadata-PackageMetadata is the metadata for packages.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The name is the name of a package. |-| definition | [string](#string) | | The definition is the definition of a package. |+| start | [int32](#int32) | | start is the start character index (0-based) of the original value, should be less than end. Uses character indices (not byte offsets) for display-oriented masking. Example: For "你好world", character index 2 refers to 'w' (the 3rd character). |+| end | [int32](#int32) | | end is the end character index (exclusive) of the original value. Uses character indices (not byte offsets) for display-oriented masking. |+| substitution | [string](#string) | | substitution is the string used to replace the OriginalValue[start:end). |-<a name="bytebase-v1-ProcedureMetadata"></a>+<a name="bytebase-v1-Announcement"></a>++### Announcement-### ProcedureMetadata-ProcedureMetadata is the metadata for procedures.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The name is the name of a procedure. |-| definition | [string](#string) | | The definition is the definition of a procedure. |-| signature | [string](#string) | | The signature is the name with the number and type of input arguments the procedure takes. |-| character_set_client | [string](#string) | | MySQL specific metadata. |-| collation_connection | [string](#string) | | |-| database_collation | [string](#string) | | |-| sql_mode | [string](#string) | | |-| comment | [string](#string) | | The comment is the comment of a procedure. |-| skip_dump | [bool](#bool) | | |+| level | [Announcement.AlertLevel](#bytebase-v1-Announcement-AlertLevel) | | The alert level of announcement |+| text | [string](#string) | | The text of announcement |+| link | [string](#string) | | The optional link, user can follow the link to check extra details |-<a name="bytebase-v1-SchemaMetadata"></a>+<a name="bytebase-v1-AppIMSetting"></a>++### AppIMSetting-### SchemaMetadata-SchemaMetadata is the metadata for schemas.-This is the concept of schema in Postgres, but it's a no-op for MySQL.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The name is the schema name. It is an empty string for databases without such concept such as MySQL. |-| tables | [TableMetadata](#bytebase-v1-TableMetadata) | repeated | The tables is the list of tables in a schema. |-| external_tables | [ExternalTableMetadata](#bytebase-v1-ExternalTableMetadata) | repeated | The external_tables is the list of external tables in a schema. |-| views | [ViewMetadata](#bytebase-v1-ViewMetadata) | repeated | The views is the list of views in a schema. |-| functions | [FunctionMetadata](#bytebase-v1-FunctionMetadata) | repeated | The functions is the list of functions in a schema. |-| procedures | [ProcedureMetadata](#bytebase-v1-ProcedureMetadata) | repeated | The procedures is the list of procedures in a schema. |-| streams | [StreamMetadata](#bytebase-v1-StreamMetadata) | repeated | The streams is the list of streams in a schema, currently, only used for Snowflake. |-| tasks | [TaskMetadata](#bytebase-v1-TaskMetadata) | repeated | The routines is the list of routines in a schema, currently, only used for Snowflake. |-| materialized_views | [MaterializedViewMetadata](#bytebase-v1-MaterializedViewMetadata) | repeated | The materialized_views is the list of materialized views in a schema. |-| packages | [PackageMetadata](#bytebase-v1-PackageMetadata) | repeated | The packages is the list of packages in a schema. |-| owner | [string](#string) | | The owner of the schema. |-| sequences | [SequenceMetadata](#bytebase-v1-SequenceMetadata) | repeated | The sequences is the list of sequences in a schema, sorted by name. |-| events | [EventMetadata](#bytebase-v1-EventMetadata) | repeated | The events is the list of scheduled events in a schema. |-| enum_types | [EnumTypeMetadata](#bytebase-v1-EnumTypeMetadata) | repeated | The enum_types is the list of user-defined enum types in a schema. |-| skip_dump | [bool](#bool) | | Whether to skip this schema during schema dump operations. |-| comment | [string](#string) | | The comment is the comment of a schema. |+| settings | [AppIMSetting.IMSetting](#bytebase-v1-AppIMSetting-IMSetting) | repeated | |-<a name="bytebase-v1-SequenceMetadata"></a>+<a name="bytebase-v1-AppIMSetting-DingTalk"></a>-### SequenceMetadata+### AppIMSetting.DingTalk| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The name of a sequence. |-| data_type | [string](#string) | | The data type of a sequence. |-| start | [string](#string) | | The start value of a sequence. |-| min_value | [string](#string) | | The minimum value of a sequence. |-| max_value | [string](#string) | | The maximum value of a sequence. |-| increment | [string](#string) | | Increment value of a sequence. |-| cycle | [bool](#bool) | | Cycle is whether the sequence cycles. |-| cache_size | [string](#string) | | Cache size of a sequence. |-| last_value | [string](#string) | | Last value of a sequence. |-| owner_table | [string](#string) | | The owner table of the sequence. |-| owner_column | [string](#string) | | The owner column of the sequence. |-| comment | [string](#string) | | The comment describing the sequence. |-| skip_dump | [bool](#bool) | | Whether to skip this sequence during schema dump operations. |+| client_id | [string](#string) | | |+| client_secret | [string](#string) | | |+| robot_code | [string](#string) | | |-<a name="bytebase-v1-SpatialIndexConfig"></a>+<a name="bytebase-v1-AppIMSetting-Feishu"></a>++### AppIMSetting.Feishu-### SpatialIndexConfig-SpatialIndexConfig defines the spatial index configuration for spatial databases.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| method | [string](#string) | | Spatial indexing method (e.g., "SPATIAL", "R-TREE", "GIST") |-| tessellation | [TessellationConfig](#bytebase-v1-TessellationConfig) | | Tessellation configuration for grid-based spatial indexes |-| storage | [StorageConfig](#bytebase-v1-StorageConfig) | | Storage and performance configuration |-| dimensional | [DimensionalConfig](#bytebase-v1-DimensionalConfig) | | Dimensional configuration |+| app_id | [string](#string) | | |+| app_secret | [string](#string) | | |-<a name="bytebase-v1-StorageConfig"></a>+<a name="bytebase-v1-AppIMSetting-IMSetting"></a>++### AppIMSetting.IMSetting-### StorageConfig-StorageConfig defines storage and performance parameters for spatial indexes.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| fillfactor | [int32](#int32) | | Fill factor percentage (1-100) |-| buffering | [string](#string) | | Buffering mode for PostgreSQL (auto, on, off) |-| tablespace | [string](#string) | | Tablespace configuration for Oracle |-| work_tablespace | [string](#string) | | |-| sdo_level | [int32](#int32) | | |-| commit_interval | [int32](#int32) | | |-| pad_index | [bool](#bool) | | SQL Server specific parameters |-| sort_in_tempdb | [string](#string) | | ON, OFF |-| drop_existing | [bool](#bool) | | |-| online | [bool](#bool) | | |-| allow_row_locks | [bool](#bool) | | |-| allow_page_locks | [bool](#bool) | | |-| maxdop | [int32](#int32) | | |-| data_compression | [string](#string) | | NONE, ROW, PAGE |+| type | [WebhookType](#bytebase-v1-WebhookType) | | |+| slack | [AppIMSetting.Slack](#bytebase-v1-AppIMSetting-Slack) | | |+| feishu | [AppIMSetting.Feishu](#bytebase-v1-AppIMSetting-Feishu) | | |+| wecom | [AppIMSetting.Wecom](#bytebase-v1-AppIMSetting-Wecom) | | |+| lark | [AppIMSetting.Lark](#bytebase-v1-AppIMSetting-Lark) | | |+| dingtalk | [AppIMSetting.DingTalk](#bytebase-v1-AppIMSetting-DingTalk) | | |+| teams | [AppIMSetting.Teams](#bytebase-v1-AppIMSetting-Teams) | | |-<a name="bytebase-v1-StreamMetadata"></a>+<a name="bytebase-v1-AppIMSetting-Lark"></a>-### StreamMetadata+### AppIMSetting.Lark| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The name is the name of a stream. |-| table_name | [string](#string) | | The table_name is the name of the table/view that the stream is created on. |-| owner | [string](#string) | | The owner of the stream. |-| comment | [string](#string) | | The comment of the stream. |-| type | [StreamMetadata.Type](#bytebase-v1-StreamMetadata-Type) | | The type of the stream. |-| stale | [bool](#bool) | | Indicates whether the stream was last read before the `stale_after` time. |-| mode | [StreamMetadata.Mode](#bytebase-v1-StreamMetadata-Mode) | | The mode of the stream. |-| definition | [string](#string) | | The definition of the stream. |+| app_id | [string](#string) | | |+| app_secret | [string](#string) | | |-<a name="bytebase-v1-SyncDatabaseRequest"></a>+<a name="bytebase-v1-AppIMSetting-Slack"></a>-### SyncDatabaseRequest+### AppIMSetting.Slack| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The name of the database to sync. Format: instances/{instance}/databases/{database} |+| token | [string](#string) | | |-<a name="bytebase-v1-SyncDatabaseResponse"></a>+<a name="bytebase-v1-AppIMSetting-Teams"></a>-### SyncDatabaseResponse+### AppIMSetting.Teams+| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| tenant_id | [string](#string) | | Azure AD tenant ID (Directory ID). |+| client_id | [string](#string) | | Azure AD application (client) ID. |+| client_secret | [string](#string) | | Azure AD client secret. |++-<a name="bytebase-v1-TableMetadata"></a>+<a name="bytebase-v1-AppIMSetting-Wecom"></a>++### AppIMSetting.Wecom-### TableMetadata-TableMetadata is the metadata for tables.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The name is the name of a table. |-| columns | [ColumnMetadata](#bytebase-v1-ColumnMetadata) | repeated | The columns is the ordered list of columns in a table. |-| indexes | [IndexMetadata](#bytebase-v1-IndexMetadata) | repeated | The indexes is the list of indexes in a table. |-| engine | [string](#string) | | The engine is the engine of a table. |-| collation | [string](#string) | | The collation is the collation of a table. |-| charset | [string](#string) | | The character set of table. |-| row_count | [int64](#int64) | | The row_count is the estimated number of rows of a table. |-| data_size | [int64](#int64) | | The data_size is the estimated data size of a table. |-| index_size | [int64](#int64) | | The index_size is the estimated index size of a table. |-| data_free | [int64](#int64) | | The data_free is the estimated free data size of a table. |-| create_options | [string](#string) | | The create_options is the create option of a table. |-| comment | [string](#string) | | The comment is the comment of a table. |-| foreign_keys | [ForeignKeyMetadata](#bytebase-v1-ForeignKeyMetadata) | repeated | The foreign_keys is the list of foreign keys in a table. |-| partitions | [TablePartitionMetadata](#bytebase-v1-TablePartitionMetadata) | repeated | The partitions is the list of partitions in a table. |-| check_constraints | [CheckConstraintMetadata](#bytebase-v1-CheckConstraintMetadata) | repeated | The check_constraints is the list of check constraints in a table. |-| owner | [string](#string) | | The owner of the table. |-| sorting_keys | [string](#string) | repeated | The sorting_keys is a tuple of column names or arbitrary expressions. ClickHouse specific field. Reference: https://clickhouse.com/docs/en/engines/table-engines/mergetree-family/mergetree#order_by |-| triggers | [TriggerMetadata](#bytebase-v1-TriggerMetadata) | repeated | The triggers is the list of triggers associated with the table. |-| skip_dump | [bool](#bool) | | Whether to skip this table during schema dump operations. |-| sharding_info | [string](#string) | | https://docs.pingcap.com/tidb/stable/information-schema-tables/ |-| primary_key_type | [string](#string) | | https://docs.pingcap.com/tidb/stable/clustered-indexes/#clustered-indexes CLUSTERED or NONCLUSTERED. |+| corp_id | [string](#string) | | |+| agent_id | [string](#string) | | |+| secret | [string](#string) | | |-<a name="bytebase-v1-TablePartitionMetadata"></a>+<a name="bytebase-v1-DataClassificationSetting"></a>++### DataClassificationSetting-### TablePartitionMetadata-TablePartitionMetadata is the metadata for table partitions.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The name is the name of a table partition. |-| type | [TablePartitionMetadata.Type](#bytebase-v1-TablePartitionMetadata-Type) | | The type of a table partition. |-| expression | [string](#string) | | The expression is the expression of a table partition. For PostgreSQL, the expression is the text of {FOR VALUES partition_bound_spec}, see https://www.postgresql.org/docs/current/sql-createtable.html. For MySQL, the expression is the `expr` or `column_list` of the following syntax. PARTITION BY { [LINEAR] HASH(expr) | [LINEAR] KEY [ALGORITHM={1 | 2}] (column_list) | RANGE{(expr) | COLUMNS(column_list)} | LIST{(expr) | COLUMNS(column_list)} }. |-| value | [string](#string) | | The value is the value of a table partition. For MySQL, the value is for RANGE and LIST partition types, - For a RANGE partition, it contains the value set in the partition's VALUES LESS THAN clause, which can be either an integer or MAXVALUE. - For a LIST partition, this column contains the values defined in the partition's VALUES IN clause, which is a list of comma-separated integer values. - For others, it's an empty string. |-| use_default | [string](#string) | | The use_default is whether the users use the default partition, it stores the different value for different database engines. For MySQL, it's [INT] type, 0 means not use default partition, otherwise, it's equals to number in syntax [SUB]PARTITION {number}. |-| subpartitions | [TablePartitionMetadata](#bytebase-v1-TablePartitionMetadata) | repeated | The subpartitions is the list of subpartitions in a table partition. |-| indexes | [IndexMetadata](#bytebase-v1-IndexMetadata) | repeated | |-| check_constraints | [CheckConstraintMetadata](#bytebase-v1-CheckConstraintMetadata) | repeated | |+| configs | [DataClassificationSetting.DataClassificationConfig](#bytebase-v1-DataClassificationSetting-DataClassificationConfig) | repeated | |-<a name="bytebase-v1-TaskMetadata"></a>+<a name="bytebase-v1-DataClassificationSetting-DataClassificationConfig"></a>-### TaskMetadata+### DataClassificationSetting.DataClassificationConfig| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The name is the name of a task. |-| id | [string](#string) | | The id is the snowflake-generated id of a task. Example: 01ad32a0-1bb6-5e93-0000-000000000001 |-| owner | [string](#string) | | The owner of the task. |-| comment | [string](#string) | | The comment of the task. |-| warehouse | [string](#string) | | The warehouse of the task. |-| schedule | [string](#string) | | The schedule interval of the task. |-| predecessors | [string](#string) | repeated | The predecessor tasks of the task. |-| state | [TaskMetadata.State](#bytebase-v1-TaskMetadata-State) | | The state of the task. |-| condition | [string](#string) | | The condition of the task. |-| definition | [string](#string) | | The definition of the task. |+| id | [string](#string) | | id is the uuid for classification. Each project can chose one classification config. |+| title | [string](#string) | | |+| levels | [DataClassificationSetting.DataClassificationConfig.Level](#bytebase-v1-DataClassificationSetting-DataClassificationConfig-Level) | repeated | levels is user defined level list for classification. |+| classification | [DataClassificationSetting.DataClassificationConfig.ClassificationEntry](#bytebase-v1-DataClassificationSetting-DataClassificationConfig-ClassificationEntry) | repeated | classification is the id - DataClassification map. The id should in [0-9]+-[0-9]+-[0-9]+ format. |-<a name="bytebase-v1-TessellationConfig"></a>+<a name="bytebase-v1-DataClassificationSetting-DataClassificationConfig-ClassificationEntry"></a>++### DataClassificationSetting.DataClassificationConfig.ClassificationEntry-### TessellationConfig-TessellationConfig defines tessellation parameters for spatial indexes.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| scheme | [string](#string) | | Tessellation scheme (e.g., "GEOMETRY_GRID", "GEOGRAPHY_GRID", "GEOMETRY_AUTO_GRID") |-| grid_levels | [GridLevel](#bytebase-v1-GridLevel) | repeated | Grid levels and densities for multi-level tessellation |-| cells_per_object | [int32](#int32) | | Number of cells per object (1-8192 for SQL Server) |-| bounding_box | [BoundingBox](#bytebase-v1-BoundingBox) | | Bounding box for GEOMETRY tessellation (not used for GEOGRAPHY) |+| key | [string](#string) | | |+| value | [DataClassificationSetting.DataClassificationConfig.DataClassification](#bytebase-v1-DataClassificationSetting-DataClassificationConfig-DataClassification) | | |-<a name="bytebase-v1-TriggerMetadata"></a>+<a name="bytebase-v1-DataClassificationSetting-DataClassificationConfig-DataClassification"></a>-### TriggerMetadata+### DataClassificationSetting.DataClassificationConfig.DataClassification| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The name is the name of the trigger. |-| event | [string](#string) | | The event is the event of the trigger, such as INSERT, UPDATE, DELETE, TRUNCATE. |-| timing | [string](#string) | | The timing is the timing of the trigger, such as BEFORE, AFTER. |-| body | [string](#string) | | The body is the body of the trigger. |-| sql_mode | [string](#string) | | The SQL mode setting for the trigger. |-| character_set_client | [string](#string) | | The character set used by the client creating the trigger. |-| collation_connection | [string](#string) | | The collation used for the connection when creating the trigger. |-| comment | [string](#string) | | The comment describing the trigger. |-| skip_dump | [bool](#bool) | | Whether to skip this trigger during schema dump operations. |+| id | [string](#string) | | id is the classification id in [0-9]+-[0-9]+-[0-9]+ format. |+| title | [string](#string) | | |+| level | [int32](#int32) | optional | The sensitivity level. Maps to Level.level. |-<a name="bytebase-v1-UpdateDatabaseRequest"></a>+<a name="bytebase-v1-DataClassificationSetting-DataClassificationConfig-Level"></a>-### UpdateDatabaseRequest+### DataClassificationSetting.DataClassificationConfig.Level| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| database | [Database](#bytebase-v1-Database) | | The database to update.+| title | [string](#string) | | |+| level | [int32](#int32) | | The numeric level for ordering. Higher = more sensitive. |-The database's `name` field is used to identify the database to update. Format: instances/{instance}/databases/{database} |-| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | The list of fields to update. |-| allow_missing | [bool](#bool) | | If set to true, and the database is not found, a new database will be created. In this situation, `update_mask` is ignored. |+<a name="bytebase-v1-EmailSetting"></a>-<a name="bytebase-v1-ViewMetadata"></a>+### EmailSetting-### ViewMetadata-ViewMetadata is the metadata for views.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The name is the name of a view. |-| definition | [string](#string) | | The definition is the definition of a view. |-| comment | [string](#string) | | The comment is the comment of a view. |-| dependency_columns | [DependencyColumn](#bytebase-v1-DependencyColumn) | repeated | The dependency_columns is the list of dependency columns of a view. |-| columns | [ColumnMetadata](#bytebase-v1-ColumnMetadata) | repeated | The columns is the ordered list of columns in a table. |-| triggers | [TriggerMetadata](#bytebase-v1-TriggerMetadata) | repeated | The triggers is the list of triggers in a view. |-| skip_dump | [bool](#bool) | | |+| from | [string](#string) | | |+| from_name | [string](#string) | | |+| type | [EmailSetting.Type](#bytebase-v1-EmailSetting-Type) | | |+| smtp | [EmailSetting.SMTPConfig](#bytebase-v1-EmailSetting-SMTPConfig) | | |-+<a name="bytebase-v1-EmailSetting-SMTPConfig"></a>-<a name="bytebase-v1-Changelog-Status"></a>+### EmailSetting.SMTPConfig-### Changelog.Status-| Name | Number | Description |-| ---- | ------ | ----------- |-| STATUS_UNSPECIFIED | 0 | |-| PENDING | 1 | |-| DONE | 2 | |-| FAILED | 3 | |+| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| host | [string](#string) | | |+| port | [int32](#int32) | | |+| username | [string](#string) | | |+| password | [string](#string) | | |+| encryption | [EmailSetting.SMTPConfig.Encryption](#bytebase-v1-EmailSetting-SMTPConfig-Encryption) | | |+| authentication | [EmailSetting.SMTPConfig.Authentication](#bytebase-v1-EmailSetting-SMTPConfig-Authentication) | | |-<a name="bytebase-v1-ChangelogView"></a>-### ChangelogView-| Name | Number | Description |-| ---- | ------ | ----------- |-| CHANGELOG_VIEW_UNSPECIFIED | 0 | The default / unset value. The API will default to the BASIC view. |-| CHANGELOG_VIEW_BASIC | 1 | |-| CHANGELOG_VIEW_FULL | 2 | |+<a name="bytebase-v1-EnvironmentSetting"></a>+### EnvironmentSetting-<a name="bytebase-v1-ColumnMetadata-IdentityGeneration"></a>-### ColumnMetadata.IdentityGeneration+| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| environments | [EnvironmentSetting.Environment](#bytebase-v1-EnvironmentSetting-Environment) | repeated | |-| Name | Number | Description |-| ---- | ------ | ----------- |-| IDENTITY_GENERATION_UNSPECIFIED | 0 | |-| ALWAYS | 1 | |-| BY_DEFAULT | 2 | |-<a name="bytebase-v1-GenerationMetadata-Type"></a>-### GenerationMetadata.Type+<a name="bytebase-v1-EnvironmentSetting-Environment"></a>+### EnvironmentSetting.Environment-| Name | Number | Description |-| ---- | ------ | ----------- |-| TYPE_UNSPECIFIED | 0 | |-| VIRTUAL | 1 | |-| STORED | 2 | |+| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| name | [string](#string) | | The resource name of the environment. Format: environments/{environment}. Output only. |+| id | [string](#string) | | The resource id of the environment. This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/. |+| title | [string](#string) | | The display name of the environment. |+| tags | [EnvironmentSetting.Environment.TagsEntry](#bytebase-v1-EnvironmentSetting-Environment-TagsEntry) | repeated | |+| color | [string](#string) | | |-<a name="bytebase-v1-GetDatabaseSDLSchemaRequest-SDLFormat"></a>-### GetDatabaseSDLSchemaRequest.SDLFormat-SDLFormat specifies the output format for SDL schema.-| Name | Number | Description |-| ---- | ------ | ----------- |-| SDL_FORMAT_UNSPECIFIED | 0 | Unspecified format. Defaults to SINGLE_FILE. |-| SINGLE_FILE | 1 | Single file format: returns the complete SDL schema as a single file. |-| MULTI_FILE | 2 | Multi-file format: returns the SDL schema as a ZIP archive containing multiple files organized by schema objects (tables, views, functions, etc.). |-<a name="bytebase-v1-GetSchemaStringRequest-ObjectType"></a>+<a name="bytebase-v1-EnvironmentSetting-Environment-TagsEntry"></a>-### GetSchemaStringRequest.ObjectType+### EnvironmentSetting.Environment.TagsEntry-| Name | Number | Description |-| ---- | ------ | ----------- |-| OBJECT_TYPE_UNSPECIFIED | 0 | |-| DATABASE | 1 | |-| SCHEMA | 2 | |-| TABLE | 3 | |-| VIEW | 4 | |-| MATERIALIZED_VIEW | 5 | |-| FUNCTION | 6 | |-| PROCEDURE | 7 | |-| SEQUENCE | 8 | |+| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| key | [string](#string) | | |+| value | [string](#string) | | |-<a name="bytebase-v1-StreamMetadata-Mode"></a>-### StreamMetadata.Mode-| Name | Number | Description |-| ---- | ------ | ----------- |-| MODE_UNSPECIFIED | 0 | |-| DEFAULT | 1 | |-| APPEND_ONLY | 2 | |-| INSERT_ONLY | 3 | |+<a name="bytebase-v1-GetSettingRequest"></a>+### GetSettingRequest+The request message for getting a setting.-<a name="bytebase-v1-StreamMetadata-Type"></a>-### StreamMetadata.Type+| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| name | [string](#string) | | The resource name of the setting. |-| Name | Number | Description |-| ---- | ------ | ----------- |-| TYPE_UNSPECIFIED | 0 | |-| DELTA | 1 | |-<a name="bytebase-v1-SyncStatus"></a>-### SyncStatus-SyncStatus is the status of the database sync operation.+<a name="bytebase-v1-GetSettingResponse"></a>-| Name | Number | Description |-| ---- | ------ | ----------- |-| SYNC_STATUS_UNSPECIFIED | 0 | |-| OK | 1 | The database was synced successfully. |-| FAILED | 2 | The database sync failed. |+### GetSettingResponse+The response message for getting a setting.+| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| setting | [Setting](#bytebase-v1-Setting) | | |-<a name="bytebase-v1-TablePartitionMetadata-Type"></a>-### TablePartitionMetadata.Type-Type is the type of a table partition, some database engines may not-support all types. Only avilable for the following database engines now:-MySQL: RANGE, RANGE COLUMNS, LIST, LIST COLUMNS, HASH, LINEAR HASH, KEY,-LINEAR_KEY-(https://dev.mysql.com/doc/refman/8.0/en/partitioning-types.html) TiDB:-RANGE, RANGE COLUMNS, LIST, LIST COLUMNS, HASH, KEY PostgreSQL: RANGE,-LIST, HASH (https://www.postgresql.org/docs/current/ddl-partitioning.html)-| Name | Number | Description |-| ---- | ------ | ----------- |-| TYPE_UNSPECIFIED | 0 | |-| RANGE | 1 | |-| RANGE_COLUMNS | 2 | |-| LIST | 3 | |-| LIST_COLUMNS | 4 | |-| HASH | 5 | |-| LINEAR_HASH | 6 | |-| KEY | 7 | |-| LINEAR_KEY | 8 | |----<a name="bytebase-v1-TaskMetadata-State"></a>--### TaskMetadata.State-| Name | Number | Description |-| ---- | ------ | ----------- |-| STATE_UNSPECIFIED | 0 | |-| STARTED | 1 | |-| SUSPENDED | 2 | |--------<a name="bytebase-v1-DatabaseService"></a>-### DatabaseService-DatabaseService manages databases and their schemas.+<a name="bytebase-v1-ListSettingsRequest"></a>-| Method Name | Request Type | Response Type | Description |-| ----------- | ------------ | ------------- | ------------|-| GetDatabase | [GetDatabaseRequest](#bytebase-v1-GetDatabaseRequest) | [Database](#bytebase-v1-Database) | Retrieves a database by name. Permissions required: bb.databases.get |-| BatchGetDatabases | [BatchGetDatabasesRequest](#bytebase-v1-BatchGetDatabasesRequest) | [BatchGetDatabasesResponse](#bytebase-v1-BatchGetDatabasesResponse) | Retrieves multiple databases by their names. Permissions required: bb.databases.get |-| ListDatabases | [ListDatabasesRequest](#bytebase-v1-ListDatabasesRequest) | [ListDatabasesResponse](#bytebase-v1-ListDatabasesResponse) | Lists databases in a project, instance, or workspace. Permissions required: bb.projects.get (for project parent), bb.databases.list (for workspace parent), or bb.instances.get (for instance parent) |-| UpdateDatabase | [UpdateDatabaseRequest](#bytebase-v1-UpdateDatabaseRequest) | [Database](#bytebase-v1-Database) | Updates database properties such as labels and project assignment. Permissions required: bb.databases.update |-| BatchUpdateDatabases | [BatchUpdateDatabasesRequest](#bytebase-v1-BatchUpdateDatabasesRequest) | [BatchUpdateDatabasesResponse](#bytebase-v1-BatchUpdateDatabasesResponse) | Updates multiple databases in a single batch operation. Permissions required: bb.databases.update |-| SyncDatabase | [SyncDatabaseRequest](#bytebase-v1-SyncDatabaseRequest) | [SyncDatabaseResponse](#bytebase-v1-SyncDatabaseResponse) | Synchronizes database schema from the instance. Permissions required: bb.databases.sync |-| BatchSyncDatabases | [BatchSyncDatabasesRequest](#bytebase-v1-BatchSyncDatabasesRequest) | [BatchSyncDatabasesResponse](#bytebase-v1-BatchSyncDatabasesResponse) | Synchronizes multiple databases in a single batch operation. Permissions required: bb.databases.sync |-| GetDatabaseMetadata | [GetDatabaseMetadataRequest](#bytebase-v1-GetDatabaseMetadataRequest) | [DatabaseMetadata](#bytebase-v1-DatabaseMetadata) | Retrieves database metadata including tables, columns, and indexes. Permissions required: bb.databases.getSchema |-| GetDatabaseSchema | [GetDatabaseSchemaRequest](#bytebase-v1-GetDatabaseSchemaRequest) | [DatabaseSchema](#bytebase-v1-DatabaseSchema) | Retrieves database schema as DDL statements. Permissions required: bb.databases.getSchema |-| GetDatabaseSDLSchema | [GetDatabaseSDLSchemaRequest](#bytebase-v1-GetDatabaseSDLSchemaRequest) | [DatabaseSDLSchema](#bytebase-v1-DatabaseSDLSchema) | Retrieves database schema in SDL (Schema Definition Language) format. Permissions required: bb.databases.getSchema |-| DiffSchema | [DiffSchemaRequest](#bytebase-v1-DiffSchemaRequest) | [DiffSchemaResponse](#bytebase-v1-DiffSchemaResponse) | Compares and generates migration statements between two schemas. Permissions required: bb.databases.get |-| ListChangelogs | [ListChangelogsRequest](#bytebase-v1-ListChangelogsRequest) | [ListChangelogsResponse](#bytebase-v1-ListChangelogsResponse) | Lists migration history for a database. Permissions required: bb.changelogs.list |-| GetChangelog | [GetChangelogRequest](#bytebase-v1-GetChangelogRequest) | [Changelog](#bytebase-v1-Changelog) | Retrieves a specific changelog entry. Permissions required: bb.changelogs.get |-| GetSchemaString | [GetSchemaStringRequest](#bytebase-v1-GetSchemaStringRequest) | [GetSchemaStringResponse](#bytebase-v1-GetSchemaStringResponse) | Generates schema DDL for a database object. Permissions required: bb.databases.getSchema |+### ListSettingsRequest--<a name="v1_group_service-proto"></a>-<p align="right"><a href="#top">Top</a></p>-## v1/group_service.proto+<a name="bytebase-v1-ListSettingsResponse"></a>-<a name="bytebase-v1-BatchGetGroupsRequest"></a>+### ListSettingsResponse-### BatchGetGroupsRequest-Request message for batch getting groups.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| names | [string](#string) | repeated | The group names to retrieve. Format: groups/{email} |+| settings | [Setting](#bytebase-v1-Setting) | repeated | The settings from the specified request. |-<a name="bytebase-v1-BatchGetGroupsResponse"></a>+<a name="bytebase-v1-SemanticTypeSetting"></a>++### SemanticTypeSetting-### BatchGetGroupsResponse-Response message for batch getting groups.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| groups | [Group](#bytebase-v1-Group) | repeated | The groups from the specified request. |+| types | [SemanticTypeSetting.SemanticType](#bytebase-v1-SemanticTypeSetting-SemanticType) | repeated | |-<a name="bytebase-v1-CreateGroupRequest"></a>+<a name="bytebase-v1-SemanticTypeSetting-SemanticType"></a>++### SemanticTypeSetting.SemanticType-### CreateGroupRequest-Request message for creating a group.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| group | [Group](#bytebase-v1-Group) | | The group to create. |-| group_email | [string](#string) | | The email to use for the group, which will become the final component of the group's resource name. |+| id | [string](#string) | | id is the uuid for semantic type. |+| title | [string](#string) | | the title of the semantic type, it should not be empty. |+| description | [string](#string) | | the description of the semantic type, it can be empty. |+| algorithm | [Algorithm](#bytebase-v1-Algorithm) | | |+| icon | [string](#string) | | icon is the icon for semantic type, it can be emoji or base64 encoded image. |-<a name="bytebase-v1-DeleteGroupRequest"></a>+<a name="bytebase-v1-Setting"></a>-### DeleteGroupRequest-Request message for deleting a group.+### Setting+The schema of setting.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The name of the group to delete. Format: groups/{email} |+| name | [string](#string) | | The resource name of the setting. Format: settings/{setting} Example: "settings/SEMANTIC_TYPES" |+| value | [SettingValue](#bytebase-v1-SettingValue) | | The configuration value of the setting. |-<a name="bytebase-v1-GetGroupRequest"></a>+<a name="bytebase-v1-SettingValue"></a>-### GetGroupRequest-Request message for getting a group.+### SettingValue+The data in setting value.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The name of the group to retrieve. Format: groups/{email} |+| app_im | [AppIMSetting](#bytebase-v1-AppIMSetting) | | |+| workspace_profile | [WorkspaceProfileSetting](#bytebase-v1-WorkspaceProfileSetting) | | |+| workspace_approval | [WorkspaceApprovalSetting](#bytebase-v1-WorkspaceApprovalSetting) | | |+| data_classification | [DataClassificationSetting](#bytebase-v1-DataClassificationSetting) | | |+| semantic_type | [SemanticTypeSetting](#bytebase-v1-SemanticTypeSetting) | | |+| ai | [AISetting](#bytebase-v1-AISetting) | | |+| environment | [EnvironmentSetting](#bytebase-v1-EnvironmentSetting) | | |+| email | [EmailSetting](#bytebase-v1-EmailSetting) | | |-<a name="bytebase-v1-Group"></a>+<a name="bytebase-v1-TestEmailSettingRequest"></a>++### TestEmailSettingRequest-### Group-A group of users within the workspace.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The name of the group to retrieve. Format: groups/{group}, the group should be email or uuid. |-| title | [string](#string) | | The display title of the group. |-| description | [string](#string) | | The description of the group. |-| members | [GroupMember](#bytebase-v1-GroupMember) | repeated | The members of the group. |-| source | [string](#string) | | The source system where the group originated (e.g., Entra ID for SCIM sync). |-| email | [string](#string) | | The unique email for the group. |+| parent | [string](#string) | | |+| email_setting | [EmailSetting](#bytebase-v1-EmailSetting) | | |+| to | [string](#string) | | |-<a name="bytebase-v1-GroupMember"></a>+<a name="bytebase-v1-TestEmailSettingResponse"></a>++### TestEmailSettingResponse-### GroupMember-A member of a group with a role.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| member | [string](#string) | | Member is the principal who belong to this group.--Format: users/[email protected] |-| role | [GroupMember.Role](#bytebase-v1-GroupMember-Role) | | The member's role in the group. |+| success | [bool](#bool) | | |+| error | [string](#string) | | |-<a name="bytebase-v1-ListGroupsRequest"></a>+<a name="bytebase-v1-UpdateSettingRequest"></a>-### ListGroupsRequest-Request message for listing groups.+### UpdateSettingRequest+The request message for updating or creating a setting.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| page_size | [int32](#int32) | | The maximum number of groups to return. The service may return fewer than this value. If unspecified, at most 10 groups 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 `ListGroups` call. Provide this to retrieve the subsequent page.--When paginating, all other parameters provided to `ListGroups` must match the call that provided the page token. |-| filter | [string](#string) | | Filter is used to filter groups returned in the list. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec--Supported filter: - title: the group title, support "==" and ".contains()" operator. - email: the group email, support "==" and ".contains()" operator. - project: the project full name in "projects/{id}" format, support "==" operator.+| setting | [Setting](#bytebase-v1-Setting) | | The setting to update. |+| validate_only | [bool](#bool) | | validate_only is a flag to indicate whether to validate the setting value, server would not persist the setting value if it is true. |+| allow_missing | [bool](#bool) | | |+| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | |-For example: title == "dba" email == "[email protected]" title.contains("dba") email.contains("dba") project == "projects/sample-project" You can combine filter conditions like: title.contains("dba") || email.contains("dba") |+<a name="bytebase-v1-WorkspaceApprovalSetting"></a>-<a name="bytebase-v1-ListGroupsResponse"></a>+### WorkspaceApprovalSetting-### ListGroupsResponse-Response message for listing groups.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| groups | [Group](#bytebase-v1-Group) | repeated | The groups 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. |+| rules | [WorkspaceApprovalSetting.Rule](#bytebase-v1-WorkspaceApprovalSetting-Rule) | repeated | |-<a name="bytebase-v1-UpdateGroupRequest"></a>+<a name="bytebase-v1-WorkspaceApprovalSetting-Rule"></a>++### WorkspaceApprovalSetting.Rule-### UpdateGroupRequest-Request message for updating a group.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| group | [Group](#bytebase-v1-Group) | | The group to update.+| template | [ApprovalTemplate](#bytebase-v1-ApprovalTemplate) | | |+| condition | [google.type.Expr](#google-type-Expr) | | The condition that is associated with the rule. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec-The group's `name` field is used to identify the group to update. Format: groups/{email} |-| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | The list of fields to update. |-| allow_missing | [bool](#bool) | | If set to true, and the group is not found, a new group will be created. In this situation, `update_mask` is ignored. |+The `source` field filters which rules apply. The `condition` field then evaluates with full context.+All supported variables: statement.affected_rows: affected row count in the DDL/DML, support "==", "!=", "<", "<=", ">", ">=" operations. statement.table_rows: table row count number, support "==", "!=", "<", "<=", ">", ">=" operations. resource.environment_id: the environment resource id, support "==", "!=", "in [xx]", "!(in [xx])" operations. resource.project_id: the project resource id, support "==", "!=", "in [xx]", "!(in [xx])", "contains()", "matches()", "startsWith()", "endsWith()" operations. resource.db_engine: the database engine type, support "==", "!=", "in [xx]", "!(in [xx])" operations. Check the Engine enum for values. statement.sql_type: the SQL type, support "==", "!=", "in [xx]", "!(in [xx])" operations. resource.database_name: the database name, support "==", "!=", "in [xx]", "!(in [xx])", "contains()", "matches()", "startsWith()", "endsWith()" operations. resource.schema_name: the schema name, support "==", "!=", "in [xx]", "!(in [xx])", "contains()", "matches()", "startsWith()", "endsWith()" operations. resource.table_name: the table name, support "==", "!=", "in [xx]", "!(in [xx])", "contains()", "matches()", "startsWith()", "endsWith()" operations. statement.text: the SQL statement, support "contains()", "matches()", "startsWith()", "endsWith()" operations. request.expiration_days: the role expiration days for the request, support "==", "!=", "<", "<=", ">", ">=" operations. request.role: the request role full name, support "==", "!=", "in [xx]", "!(in [xx])", "contains()", "matches()", "startsWith()", "endsWith()" operations.+When source is CHANGE_DATABASE, support: statement.*, resource.* (excluding request.*) When source is CREATE_DATABASE, support: resource.environment_id, resource.project_id, resource.db_engine, resource.database_name When source is EXPORT_DATA, support: resource.environment_id, resource.project_id, resource.db_engine, resource.database_name, resource.schema_name, resource.table_name When source is REQUEST_ROLE, support: resource.project_id, request.expiration_days, request.role When source is REQUEST_ACCESS, support: resource.environment_id, resource.project_id, request.unmask+For examples: resource.environment_id == "prod" && statement.affected_rows >= 100 resource.table_name.matches("sensitive_.*") && resource.db_engine == "MYSQL" |+| source | [WorkspaceApprovalSetting.Rule.Source](#bytebase-v1-WorkspaceApprovalSetting-Rule-Source) | | |--<a name="bytebase-v1-GroupMember-Role"></a>-### GroupMember.Role-The role of a group member.-| Name | Number | Description |-| ---- | ------ | ----------- |-| ROLE_UNSPECIFIED | 0 | Unspecified role. |-| OWNER | 1 | Group owner. |-| MEMBER | 2 | Group member. |+<a name="bytebase-v1-WorkspaceProfileSetting"></a>+### WorkspaceProfileSetting--++| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| external_url | [string](#string) | | The external URL is used for sso authentication callback. |+| disallow_signup | [bool](#bool) | | Disallow self-service signup, users can only be invited by the owner. |+| require_mfa | [bool](#bool) | | Require MFA for all users. |+| refresh_token_duration | [google.protobuf.Duration](#google-protobuf-Duration) | | The duration for refresh token. Default is 7 days. |+| announcement | [Announcement](#bytebase-v1-Announcement) | | The setting of custom announcement |+| maximum_role_expiration | [google.protobuf.Duration](#google-protobuf-Duration) | | The max duration for role expired. |+| domains | [string](#string) | repeated | The workspace domain, e.g., bytebase.com. |+| enforce_identity_domain | [bool](#bool) | | Only user and group from the domains can be created and login. |+| database_change_mode | [DatabaseChangeMode](#bytebase-v1-DatabaseChangeMode) | | The workspace database change mode. |+| disallow_password_signin | [bool](#bool) | | Whether to disallow password signin. (Except workspace admins) |+| enable_metric_collection | [bool](#bool) | | Whether to enable metric collection for the workspace. |+| inactive_session_timeout | [google.protobuf.Duration](#google-protobuf-Duration) | | The session expiration time if not activity detected for the user. Value <= 0 means no limit. |+| enable_audit_log_stdout | [bool](#bool) | | Whether to enable audit logging to stdout in structured JSON format. Requires TEAM or ENTERPRISE license. |+| watermark | [bool](#bool) | | Whether to display watermark on pages. Requires ENTERPRISE license. |+| directory_sync_token | [string](#string) | | The token for directory sync authentication. |+| password_restriction | [WorkspaceProfileSetting.PasswordRestriction](#bytebase-v1-WorkspaceProfileSetting-PasswordRestriction) | | Password restriction settings. |+| access_token_duration | [google.protobuf.Duration](#google-protobuf-Duration) | | The duration for access token. Default is 1 hour. |+| enable_debug | [bool](#bool) | | Whether debug mode is enabled. |+| sql_result_size | [int64](#int64) | | The maximum result size limit in bytes for query and export, works for the SQL Editor and Export Center. The default value is 100MB, we will use the default value if the setting not exists, or the limit <= 0. |+| query_timeout | [google.protobuf.Duration](#google-protobuf-Duration) | | The query timeout duration for query and export, works for the SQL Editor and Export Center. |+| allow_email_code_signin | [bool](#bool) | | Allow signin/signup using email + a 6-digit one-time verification code. Requires the EMAIL setting to be configured on the workspace. |-<a name="bytebase-v1-GroupService"></a>-### GroupService-GroupService manages user groups for organizing users and permissions.-| Method Name | Request Type | Response Type | Description |-| ----------- | ------------ | ------------- | ------------|-| GetGroup | [GetGroupRequest](#bytebase-v1-GetGroupRequest) | [Group](#bytebase-v1-Group) | Gets a group by name. Group members or users with bb.groups.get permission can get the group. Permissions required: bb.groups.get OR caller is the group member |-| BatchGetGroups | [BatchGetGroupsRequest](#bytebase-v1-BatchGetGroupsRequest) | [BatchGetGroupsResponse](#bytebase-v1-BatchGetGroupsResponse) | Gets multiple groups in a single request. Group members or users with bb.groups.get permission can get the group. Permissions required: bb.groups.get OR caller is the group member |-| ListGroups | [ListGroupsRequest](#bytebase-v1-ListGroupsRequest) | [ListGroupsResponse](#bytebase-v1-ListGroupsResponse) | Lists all groups in the workspace. Permissions required: bb.groups.list |-| CreateGroup | [CreateGroupRequest](#bytebase-v1-CreateGroupRequest) | [Group](#bytebase-v1-Group) | Creates a new group. Permissions required: bb.groups.create |-| UpdateGroup | [UpdateGroupRequest](#bytebase-v1-UpdateGroupRequest) | [Group](#bytebase-v1-Group) | Updates a group. Group owners or users with bb.groups.update permission can update. Permissions required: bb.groups.update OR caller is group owner When allow_missing=true, also requires: bb.groups.create |-| DeleteGroup | [DeleteGroupRequest](#bytebase-v1-DeleteGroupRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | Deletes a group. Group owners or users with bb.groups.delete permission can delete. Permissions required: bb.groups.delete OR caller is group owner |-+<a name="bytebase-v1-WorkspaceProfileSetting-PasswordRestriction"></a>+### WorkspaceProfileSetting.PasswordRestriction-<a name="v1_idp_service-proto"></a>-<p align="right"><a href="#top">Top</a></p>-## v1/idp_service.proto+| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| min_length | [int32](#int32) | | min_length is the minimum length for password, should no less than 8. |+| require_number | [bool](#bool) | | require_number requires the password must contains at least one number. |+| require_letter | [bool](#bool) | | require_letter requires the password must contains at least one letter, regardless of upper case or lower case |+| require_uppercase_letter | [bool](#bool) | | require_uppercase_letter requires the password must contains at least one upper case letter. |+| require_special_character | [bool](#bool) | | require_special_character requires the password must contains at least one special character. |+| require_reset_password_for_first_login | [bool](#bool) | | require_reset_password_for_first_login requires users to reset their password after the 1st login. |+| password_rotation | [google.protobuf.Duration](#google-protobuf-Duration) | | password_rotation requires users to reset their password after the duration. |-<a name="bytebase-v1-CreateIdentityProviderRequest"></a>-### CreateIdentityProviderRequest+-| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| identity_provider | [IdentityProvider](#bytebase-v1-IdentityProvider) | | The identity provider to create. |-| identity_provider_id | [string](#string) | | The ID to use for the identity provider, which will become the final component of the identity provider's resource name.-This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/. |-| validate_only | [bool](#bool) | | If set to true, the request will be validated without actually creating the identity provider. |+<a name="bytebase-v1-AISetting-Provider"></a>+### AISetting.Provider+| Name | Number | Description |+| ---- | ------ | ----------- |+| PROVIDER_UNSPECIFIED | 0 | |+| OPEN_AI | 1 | |+| CLAUDE | 2 | |+| GEMINI | 3 | |+| AZURE_OPENAI | 4 | |-<a name="bytebase-v1-DeleteIdentityProviderRequest"></a>+<a name="bytebase-v1-Algorithm-InnerOuterMask-MaskType"></a>-### DeleteIdentityProviderRequest+### Algorithm.InnerOuterMask.MaskType+| Name | Number | Description |+| ---- | ------ | ----------- |+| MASK_TYPE_UNSPECIFIED | 0 | |+| INNER | 1 | |+| OUTER | 2 | |-| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The name of the identity provider to delete. Format: idps/{identity_provider} |+<a name="bytebase-v1-Announcement-AlertLevel"></a>+### Announcement.AlertLevel+We support three levels of AlertLevel: INFO, WARNING, and ERROR.+| Name | Number | Description |+| ---- | ------ | ----------- |+| ALERT_LEVEL_UNSPECIFIED | 0 | |+| INFO | 1 | |+| WARNING | 2 | |+| CRITICAL | 3 | |-<a name="bytebase-v1-FieldMapping"></a>-### FieldMapping-FieldMapping saves the field names from user info API of identity provider.-As we save all raw json string of user info response data into `principal.idp_user_info`,-we can extract the relevant data based with `FieldMapping`.+<a name="bytebase-v1-DatabaseChangeMode"></a>+### DatabaseChangeMode-| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| identifier | [string](#string) | | Identifier is the field name of the unique identifier in 3rd-party idp user info. Required. |-| display_name | [string](#string) | | DisplayName is the field name of display name in 3rd-party idp user info. Optional. |-| phone | [string](#string) | | Phone is the field name of primary phone in 3rd-party idp user info. Optional. |-| groups | [string](#string) | | Groups is the field name of groups in 3rd-party idp user info. Optional. Mainly used for OIDC: https://developer.okta.com/docs/guides/customize-tokens-groups-claim/main/ |+| Name | Number | Description |+| ---- | ------ | ----------- |+| DATABASE_CHANGE_MODE_UNSPECIFIED | 0 | |+| PIPELINE | 1 | A more advanced database change process, including custom approval workflows and other advanced features. Default to this mode. |+| EDITOR | 2 | A simple database change process in SQL editor. Users can execute SQL directly. |+<a name="bytebase-v1-EmailSetting-SMTPConfig-Authentication"></a>+### EmailSetting.SMTPConfig.Authentication-<a name="bytebase-v1-GetIdentityProviderRequest"></a>-### GetIdentityProviderRequest+| Name | Number | Description |+| ---- | ------ | ----------- |+| AUTHENTICATION_UNSPECIFIED | 0 | |+| AUTHENTICATION_NONE | 1 | |+| PLAIN | 2 | |+| LOGIN | 3 | |+| CRAM_MD5 | 4 | |-| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The name of the identity provider to retrieve. Format: idps/{idp} |+<a name="bytebase-v1-EmailSetting-SMTPConfig-Encryption"></a>+### EmailSetting.SMTPConfig.Encryption+| Name | Number | Description |+| ---- | ------ | ----------- |+| ENCRYPTION_UNSPECIFIED | 0 | |+| ENCRYPTION_NONE | 1 | |+| STARTTLS | 2 | |+| SSL_TLS | 3 | |-<a name="bytebase-v1-IdentityProvider"></a>+<a name="bytebase-v1-EmailSetting-Type"></a>-### IdentityProvider+### EmailSetting.Type+| Name | Number | Description |+| ---- | ------ | ----------- |+| TYPE_UNSPECIFIED | 0 | |+| SMTP | 1 | |-| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The name of the identity provider. Format: idps/{idp} |-| title | [string](#string) | | The display title of the identity provider. |-| domain | [string](#string) | | The domain for email matching when using this identity provider. |-| type | [IdentityProviderType](#bytebase-v1-IdentityProviderType) | | The type of identity provider protocol. |-| config | [IdentityProviderConfig](#bytebase-v1-IdentityProviderConfig) | | The configuration details for the identity provider. |+<a name="bytebase-v1-Setting-SettingName"></a>+### Setting.SettingName+| Name | Number | Description |+| ---- | ------ | ----------- |+| SETTING_NAME_UNSPECIFIED | 0 | |+| WORKSPACE_PROFILE | 1 | |+| WORKSPACE_APPROVAL | 2 | |+| APP_IM | 3 | |+| AI | 4 | |+| DATA_CLASSIFICATION | 5 | |+| SEMANTIC_TYPES | 6 | |+| ENVIRONMENT | 7 | |+| EMAIL | 8 | |-<a name="bytebase-v1-IdentityProviderConfig"></a>-### IdentityProviderConfig+<a name="bytebase-v1-WorkspaceApprovalSetting-Rule-Source"></a>+### WorkspaceApprovalSetting.Rule.Source-| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| oauth2_config | [OAuth2IdentityProviderConfig](#bytebase-v1-OAuth2IdentityProviderConfig) | | OAuth2 protocol configuration. |-| oidc_config | [OIDCIdentityProviderConfig](#bytebase-v1-OIDCIdentityProviderConfig) | | OIDC protocol configuration. |-| ldap_config | [LDAPIdentityProviderConfig](#bytebase-v1-LDAPIdentityProviderConfig) | | LDAP protocol configuration. |+| Name | Number | Description |+| ---- | ------ | ----------- |+| SOURCE_UNSPECIFIED | 0 | |+| CHANGE_DATABASE | 1 | |+| CREATE_DATABASE | 2 | |+| EXPORT_DATA | 3 | |+| REQUEST_ROLE | 4 | |+| REQUEST_ACCESS | 5 | |++-<a name="bytebase-v1-LDAPIdentityProviderConfig"></a>+<a name="bytebase-v1-SettingService"></a>-### LDAPIdentityProviderConfig-LDAPIdentityProviderConfig is the structure for LDAP identity provider config.+### SettingService+SettingService manages workspace-level settings and configurations.+| Method Name | Request Type | Response Type | Description |+| ----------- | ------------ | ------------- | ------------|+| ListSettings | [ListSettingsRequest](#bytebase-v1-ListSettingsRequest) | [ListSettingsResponse](#bytebase-v1-ListSettingsResponse) | Lists all workspace settings. Permissions required: bb.settings.list |+| GetSetting | [GetSettingRequest](#bytebase-v1-GetSettingRequest) | [Setting](#bytebase-v1-Setting) | Retrieves a workspace setting by name. Permissions required: bb.settings.get |+| UpdateSetting | [UpdateSettingRequest](#bytebase-v1-UpdateSettingRequest) | [Setting](#bytebase-v1-Setting) | Updates a workspace setting. Permissions required: bb.settings.set |+| TestEmailSetting | [TestEmailSettingRequest](#bytebase-v1-TestEmailSettingRequest) | [TestEmailSettingResponse](#bytebase-v1-TestEmailSettingResponse) | Sends a test email using the provided config (without persisting). Permissions required: bb.settings.set |-| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| host | [string](#string) | | Host is the hostname or IP address of the LDAP server, e.g., "ldap.example.com". |-| port | [int32](#int32) | | Port is the port number of the LDAP server, e.g., 389. When not set, the default port of the corresponding security protocol will be used, i.e. 389 for StartTLS and 636 for LDAPS. |-| skip_tls_verify | [bool](#bool) | | SkipTLSVerify controls whether to skip TLS certificate verification. |-| bind_dn | [string](#string) | | BindDN is the DN of the user to bind as a service account to perform search requests. |-| bind_password | [string](#string) | | BindPassword is the password of the user to bind as a service account. |-| base_dn | [string](#string) | | BaseDN is the base DN to search for users, e.g., "ou=users,dc=example,dc=com". |-| user_filter | [string](#string) | | UserFilter is the filter to search for users, e.g., "(uid=%s)". |-| security_protocol | [LDAPIdentityProviderConfig.SecurityProtocol](#bytebase-v1-LDAPIdentityProviderConfig-SecurityProtocol) | | SecurityProtocol is the security protocol to be used for establishing connections with the LDAP server. |-| field_mapping | [FieldMapping](#bytebase-v1-FieldMapping) | | FieldMapping is the mapping of the user attributes returned by the LDAP server. |++<a name="v1_actuator_service-proto"></a>+<p align="right"><a href="#top">Top</a></p>+## v1/actuator_service.proto-<a name="bytebase-v1-ListIdentityProvidersRequest"></a>-### ListIdentityProvidersRequest+<a name="bytebase-v1-ActuatorInfo"></a>+### ActuatorInfo+System information and configuration for the Bytebase instance.+Actuator concept is similar to the Spring Boot Actuator.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| parent | [string](#string) | | The parent workspace whose identity providers should be listed. Format: workspaces/{workspace} When unset, the workspace is resolved from the request context. |---+| version | [string](#string) | | The Bytebase server version. |+| git_commit | [string](#string) | | The git commit hash of the build. |+| readonly | [bool](#bool) | | Whether the Bytebase instance is running in read-only mode. |+| saas | [bool](#bool) | | Whether the Bytebase instance is running in SaaS mode where some features cannot be edited by users. |+| demo | [bool](#bool) | | Whether the Bytebase instance is running in demo mode. |+| host | [string](#string) | | The host address of the Bytebase instance. |+| port | [string](#string) | | The port number of the Bytebase instance. |+| external_url | [string](#string) | | The external URL where users or webhook callbacks access Bytebase. |+| last_active_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | The last time any API call was made, refreshed on each request. |+| workspace | [string](#string) | | The unique identifier for the workspace. Format: workspaces/{id} |+| unlicensed_features | [string](#string) | repeated | List of features that are not licensed. |+| docker | [bool](#bool) | | Whether the Bytebase instance is running in Docker. |+| activated_user_count | [int32](#int32) | | The number of activated users. |+| activated_instance_count | [int32](#int32) | | The number of activated database instances. |+| total_instance_count | [int32](#int32) | | The total number of database instances. |+| enable_sample | [bool](#bool) | | Whether sample data setup is enabled. |+| external_url_from_flag | [bool](#bool) | | Whether the external URL is set via command-line flag (and thus cannot be changed via UI). |+| replica_count | [int32](#int32) | | The number of active replicas (servers sharing the same database). |+| restriction | [Restriction](#bytebase-v1-Restriction) | | |+| default_project | [string](#string) | | The default project for unassigned databases. Format: projects/{id} |+| user_count_in_iam | [int32](#int32) | | The number of users in the workspace IAM (for seat limit display). |-<a name="bytebase-v1-ListIdentityProvidersResponse"></a>-### ListIdentityProvidersResponse+<a name="bytebase-v1-DeleteCacheRequest"></a>-| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| identity_providers | [IdentityProvider](#bytebase-v1-IdentityProvider) | repeated | The identity providers from the specified request. |+### DeleteCacheRequest+Request message for deleting cache.-<a name="bytebase-v1-OAuth2IdentityProviderConfig"></a>+<a name="bytebase-v1-GetActuatorInfoRequest"></a>-### OAuth2IdentityProviderConfig-OAuth2IdentityProviderConfig is the structure for OAuth2 identity provider config.+### GetActuatorInfoRequest+Request message for getting actuator information.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| auth_url | [string](#string) | | The authorization endpoint URL for OAuth2 flow. |-| token_url | [string](#string) | | The token endpoint URL for exchanging authorization code. |-| user_info_url | [string](#string) | | The user information endpoint URL. |-| client_id | [string](#string) | | The OAuth2 client identifier. |-| client_secret | [string](#string) | | The OAuth2 client secret for authentication. |-| scopes | [string](#string) | repeated | The list of OAuth2 scopes to request. |-| field_mapping | [FieldMapping](#bytebase-v1-FieldMapping) | | Mapping configuration for user attributes from OAuth2 response. |-| skip_tls_verify | [bool](#bool) | | Whether to skip TLS certificate verification. |-| auth_style | [OAuth2AuthStyle](#bytebase-v1-OAuth2AuthStyle) | | The authentication style for client credentials. |+| name | [string](#string) | | Optional. The workspace to scope the response to. Format: workspaces/{workspace} When unset, the workspace is resolved from the request context (self-hosted) or no workspace-scoped fields are returned (SaaS). |-<a name="bytebase-v1-OAuth2IdentityProviderTestRequestContext"></a>+<a name="bytebase-v1-Restriction"></a>-### OAuth2IdentityProviderTestRequestContext+### Restriction| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| code | [string](#string) | | Authorize code from website. |+| disallow_signup | [bool](#bool) | | Whether self-service user signup is disabled. |+| disallow_password_signin | [bool](#bool) | | Whether password-based signin is disabled (except for workspace admins). |+| password_restriction | [WorkspaceProfileSetting.PasswordRestriction](#bytebase-v1-WorkspaceProfileSetting-PasswordRestriction) | | Password complexity and restriction requirements. |+| allow_email_code_signin | [bool](#bool) | | Whether email + 6-digit code signin is enabled for this workspace. |+| password_reset_enabled | [bool](#bool) | | Whether password reset via email is available for this workspace. True when the workspace (or deployment) has an email setting configured. |-<a name="bytebase-v1-OIDCIdentityProviderConfig"></a>+<a name="bytebase-v1-SetupSampleRequest"></a>-### OIDCIdentityProviderConfig-OIDCIdentityProviderConfig is the structure for OIDC identity provider config.+### SetupSampleRequest+Request message for setting up sample data.-| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| issuer | [string](#string) | | The OIDC issuer URL for the identity provider. |-| client_id | [string](#string) | | The OIDC client identifier. |-| client_secret | [string](#string) | | The OIDC client secret for authentication. |-| scopes | [string](#string) | repeated | The scopes that the OIDC provider supports. Should be fetched from the well-known configuration file of the OIDC provider. |-| field_mapping | [FieldMapping](#bytebase-v1-FieldMapping) | | Mapping configuration for user attributes from OIDC claims. |-| skip_tls_verify | [bool](#bool) | | Whether to skip TLS certificate verification. |-| auth_style | [OAuth2AuthStyle](#bytebase-v1-OAuth2AuthStyle) | | The authentication style for client credentials. |-| auth_endpoint | [string](#string) | | The authorization endpoint of the OIDC provider. Should be fetched from the well-known configuration file of the OIDC provider. |+++-<a name="bytebase-v1-OIDCIdentityProviderTestRequestContext"></a>-### OIDCIdentityProviderTestRequestContext+<a name="bytebase-v1-ActuatorService"></a>+### ActuatorService+ActuatorService manages system health and operational information.+| Method Name | Request Type | Response Type | Description |+| ----------- | ------------ | ------------- | ------------|+| GetActuatorInfo | [GetActuatorInfoRequest](#bytebase-v1-GetActuatorInfoRequest) | [ActuatorInfo](#bytebase-v1-ActuatorInfo) | Gets system information and health status of the Bytebase instance. When `name` is provided (or the workspace-scoped binding is used), the response includes workspace-scoped fields for that workspace. Permissions required: None |+| SetupSample | [SetupSampleRequest](#bytebase-v1-SetupSampleRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | Sets up sample data for demonstration and testing purposes. Permissions required: bb.projects.create |+| DeleteCache | [DeleteCacheRequest](#bytebase-v1-DeleteCacheRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | Clears the system cache to force data refresh. Permissions required: None |-| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| code | [string](#string) | | Authorize code from OIDC provider. |++<a name="v1_ai_service-proto"></a>+<p align="right"><a href="#top">Top</a></p>+## v1/ai_service.proto-<a name="bytebase-v1-TestIdentityProviderRequest"></a>-### TestIdentityProviderRequest+<a name="bytebase-v1-AIChatMessage"></a>+### AIChatMessage+A single message in the conversation.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| identity_provider | [IdentityProvider](#bytebase-v1-IdentityProvider) | | The identity provider to test connection including uncreated. |-| oauth2_context | [OAuth2IdentityProviderTestRequestContext](#bytebase-v1-OAuth2IdentityProviderTestRequestContext) | | |-| oidc_context | [OIDCIdentityProviderTestRequestContext](#bytebase-v1-OIDCIdentityProviderTestRequestContext) | | OIDC authentication context for test connection. |-+| role | [AIChatMessageRole](#bytebase-v1-AIChatMessageRole) | | The role of the message sender. |+| content | [string](#string) | optional | The text content of the message. Optional for assistant messages that only contain tool calls. |+| tool_calls | [AIChatToolCall](#bytebase-v1-AIChatToolCall) | repeated | Tool calls made by the assistant. Only present in assistant messages. |+| tool_call_id | [string](#string) | optional | The ID of the tool call this message is responding to. Only present in tool messages. |-<a name="bytebase-v1-TestIdentityProviderResponse"></a>-### TestIdentityProviderResponse+<a name="bytebase-v1-AIChatRequest"></a>+### AIChatRequest+Request message for AIService.Chat.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| claims | [TestIdentityProviderResponse.ClaimsEntry](#bytebase-v1-TestIdentityProviderResponse-ClaimsEntry) | repeated | The map of claims returned by the identity provider. |-| user_info | [TestIdentityProviderResponse.UserInfoEntry](#bytebase-v1-TestIdentityProviderResponse-UserInfoEntry) | repeated | The matched user info from the claims. |-+| messages | [AIChatMessage](#bytebase-v1-AIChatMessage) | repeated | The conversation messages. |+| tool_definitions | [AIChatToolDefinition](#bytebase-v1-AIChatToolDefinition) | repeated | The tool definitions available to the AI. |-<a name="bytebase-v1-TestIdentityProviderResponse-ClaimsEntry"></a>-### TestIdentityProviderResponse.ClaimsEntry+<a name="bytebase-v1-AIChatResponse"></a>+### AIChatResponse+Response message for AIService.Chat.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| key | [string](#string) | | |-| value | [string](#string) | | |-+| content | [string](#string) | optional | The text content of the AI response. Optional when the response only contains tool calls. |+| tool_calls | [AIChatToolCall](#bytebase-v1-AIChatToolCall) | repeated | Tool calls the AI wants to make. |+| usage | [AIChatUsage](#bytebase-v1-AIChatUsage) | optional | Token usage for this provider call, when available. |-<a name="bytebase-v1-TestIdentityProviderResponse-UserInfoEntry"></a>-### TestIdentityProviderResponse.UserInfoEntry+<a name="bytebase-v1-AIChatToolCall"></a>+### AIChatToolCall+A tool call made by the AI.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| key | [string](#string) | | |-| value | [string](#string) | | |-+| id | [string](#string) | | The unique ID of this tool call. |+| name | [string](#string) | | The name of the tool to call. |+| arguments | [string](#string) | | The JSON-encoded arguments to pass to the tool. |+| metadata | [string](#string) | optional | Opaque provider-specific metadata (e.g., Gemini thought_signature). Frontend must echo this back unchanged when sending tool results. |-<a name="bytebase-v1-UpdateIdentityProviderRequest"></a>-### UpdateIdentityProviderRequest+<a name="bytebase-v1-AIChatToolDefinition"></a>+### AIChatToolDefinition+A tool definition that the AI can invoke.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| identity_provider | [IdentityProvider](#bytebase-v1-IdentityProvider) | | The identity provider to update.--The identity provider's `name` field is used to identify the identity provider to update. Format: idps/{identity_provider} |-| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | The list of fields to update. |-| allow_missing | [bool](#bool) | | If set to true, and the identity provider is not found, a new identity provider will be created. In this situation, `update_mask` is ignored. |----+| name | [string](#string) | | The name of the tool. |+| description | [string](#string) | | A description of what the tool does. |+| parameters_schema | [string](#string) | | The JSON Schema describing the tool's parameters. |--<a name="bytebase-v1-IdentityProviderType"></a>-### IdentityProviderType-| Name | Number | Description |-| ---- | ------ | ----------- |-| IDENTITY_PROVIDER_TYPE_UNSPECIFIED | 0 | Unspecified identity provider type. |-| OAUTH2 | 1 | OAuth 2.0 authentication protocol. |-| OIDC | 2 | OpenID Connect authentication protocol. |-| LDAP | 3 | LDAP directory service authentication. |+<a name="bytebase-v1-AIChatUsage"></a>+### AIChatUsage+Token usage for a single AI provider call.-<a name="bytebase-v1-LDAPIdentityProviderConfig-SecurityProtocol"></a>+| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| total_tokens | [int32](#int32) | | Total tokens used by the provider call. |-### LDAPIdentityProviderConfig.SecurityProtocol-| Name | Number | Description |-| ---- | ------ | ----------- |-| SECURITY_PROTOCOL_UNSPECIFIED | 0 | |-| START_TLS | 1 | StartTLS is the security protocol that starts with an unencrypted connection and then upgrades to TLS. |-| LDAPS | 2 | LDAPS is the security protocol that uses TLS from the beginning. |+-<a name="bytebase-v1-OAuth2AuthStyle"></a>-### OAuth2AuthStyle+<a name="bytebase-v1-AIChatMessageRole"></a>+### AIChatMessageRole+Role of a chat message.| Name | Number | Description || ---- | ------ | ----------- |-| OAUTH2_AUTH_STYLE_UNSPECIFIED | 0 | |-| IN_PARAMS | 1 | IN_PARAMS sends the "client_id" and "client_secret" in the POST body as application/x-www-form-urlencoded parameters. |-| IN_HEADER | 2 | IN_HEADER sends the client_id and client_password using HTTP Basic Authorization. This is an optional style described in the OAuth2 RFC 6749 section 2.3.1. |+| AI_CHAT_MESSAGE_ROLE_UNSPECIFIED | 0 | Unspecified role. |+| AI_CHAT_MESSAGE_ROLE_SYSTEM | 1 | System message providing instructions. |+| AI_CHAT_MESSAGE_ROLE_USER | 2 | User message. |+| AI_CHAT_MESSAGE_ROLE_ASSISTANT | 3 | Assistant (AI) message. |+| AI_CHAT_MESSAGE_ROLE_TOOL | 4 | Tool result message. |@@ -6998,1192 +7045,1150 @@ The identity provider's `name` field is used to identify the identity provid-<a name="bytebase-v1-IdentityProviderService"></a>+<a name="bytebase-v1-AIService"></a>-### IdentityProviderService-IdentityProviderService manages external identity providers for SSO authentication.+### AIService+AIService provides AI chat capabilities for the page agent.| Method Name | Request Type | Response Type | Description || ----------- | ------------ | ------------- | ------------|-| GetIdentityProvider | [GetIdentityProviderRequest](#bytebase-v1-GetIdentityProviderRequest) | [IdentityProvider](#bytebase-v1-IdentityProvider) | Gets an identity provider by name. Permissions required: bb.identityProviders.get |-| ListIdentityProviders | [ListIdentityProvidersRequest](#bytebase-v1-ListIdentityProvidersRequest) | [ListIdentityProvidersResponse](#bytebase-v1-ListIdentityProvidersResponse) | Lists all configured identity providers (public endpoint for login page). Permissions required: None |-| CreateIdentityProvider | [CreateIdentityProviderRequest](#bytebase-v1-CreateIdentityProviderRequest) | [IdentityProvider](#bytebase-v1-IdentityProvider) | Creates a new identity provider. Permissions required: bb.identityProviders.create |-| UpdateIdentityProvider | [UpdateIdentityProviderRequest](#bytebase-v1-UpdateIdentityProviderRequest) | [IdentityProvider](#bytebase-v1-IdentityProvider) | Updates an identity provider. Permissions required: bb.identityProviders.update When allow_missing=true, also requires: bb.identityProviders.create |-| DeleteIdentityProvider | [DeleteIdentityProviderRequest](#bytebase-v1-DeleteIdentityProviderRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | Deletes an identity provider. Permissions required: bb.identityProviders.delete |-| TestIdentityProvider | [TestIdentityProviderRequest](#bytebase-v1-TestIdentityProviderRequest) | [TestIdentityProviderResponse](#bytebase-v1-TestIdentityProviderResponse) | Tests the connection and configuration of an identity provider. Permissions required: bb.identityProviders.update |+| Chat | [AIChatRequest](#bytebase-v1-AIChatRequest) | [AIChatResponse](#bytebase-v1-AIChatResponse) | Chat sends a conversation with tool definitions to the configured AI provider and returns the AI response. |-<a name="v1_org_policy_service-proto"></a>+<a name="v1_iam_policy-proto"></a><p align="right"><a href="#top">Top</a></p>-## v1/org_policy_service.proto----<a name="bytebase-v1-CreatePolicyRequest"></a>--### CreatePolicyRequest----| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| parent | [string](#string) | | The parent resource where this instance will be created. Workspace resource name: workspaces/{workspace-id}. Environment resource name: environments/environment-id. Instance resource name: instances/instance-id. Database resource name: instances/instance-id/databases/database-name. |-| policy | [Policy](#bytebase-v1-Policy) | | The policy to create. |-| type | [PolicyType](#bytebase-v1-PolicyType) | | The type of policy to create. |-------<a name="bytebase-v1-DeletePolicyRequest"></a>--### DeletePolicyRequest----| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The policy's `name` field is used to identify the instance to update. Format: {resource name}/policies/{policy type} Workspace resource name: workspaces/{workspace-id}. Environment resource name: environments/environment-id. Instance resource name: instances/instance-id. Database resource name: instances/instance-id/databases/database-name. |----+## v1/iam_policy.proto-<a name="bytebase-v1-GetPolicyRequest"></a>-### GetPolicyRequest+<a name="bytebase-v1-Binding"></a>+### Binding+Binding associates members with a role and optional conditions.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The name of the policy to retrieve. Format: {resource type}/{resource id}/policies/{policy type} |-------<a name="bytebase-v1-ListPoliciesRequest"></a>--### ListPoliciesRequest--+| role | [string](#string) | | The role that is assigned to the members. Format: roles/{role} |+| members | [string](#string) | repeated | Specifies the principals requesting access for a Bytebase resource. For users, the member should be: user:{email} For groups, the member should be: group:{email} For service accounts, the member should be: serviceAccount:{email} For workload identities, the member should be: workloadIdentity:{email} |+| condition | [google.type.Expr](#google-type-Expr) | | The condition that is associated with this binding, only used in the project IAM policy. If the condition evaluates to true, then this binding applies to the current request. If the condition evaluates to false, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec-| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| parent | [string](#string) | | The parent, which owns this collection of policies. Format: {resource type}/{resource id} |-| policy_type | [PolicyType](#bytebase-v1-PolicyType) | optional | Filter by specific policy type. |-| show_deleted | [bool](#bool) | | Show deleted policies if specified. |+Support variables: resource.database: the database full name in "instances/{instance}/databases/{database}" format, used by the "roles/sqlEditorUser" and "roles/sqlEditorReadUser" roles, support "==" operator. resource.schema_name: the schema name, used by the "roles/sqlEditorUser" and "roles/sqlEditorReadUser" roles, support "==" operator. resource.table_name: the table name, used by the "roles/sqlEditorUser" and "roles/sqlEditorReadUser" roles, support "==" operator. resource.environment_id: the environment to allow the DDL/DML operation in the SQL Editor, only works for the role with bb.sql.ddl or bb.sql.dml permissions. Support "in" operator. request.time: the expiration. Only support "<" operation in `request.time < timestamp("{ISO datetime string format}")`.+For example: resource.database == "instances/local-pg/databases/postgres" && resource.schema_name in ["public","another_schema"] resource.database == "instances/local-pg/databases/bytebase" && resource.schema_name == "public" && resource.table_name in ["audit_log"] resource.database == "instances/local-pg/databases/postgres" && resource.environment_id in ["test"] request.time < timestamp("2025-04-26T11:24:48.655Z") |+| parsed_expr | [google.api.expr.v1alpha1.Expr](#google-api-expr-v1alpha1-Expr) | | The parsed expression of the condition. |-<a name="bytebase-v1-ListPoliciesResponse"></a>-### ListPoliciesResponse+<a name="bytebase-v1-BindingDelta"></a>+### BindingDelta+A single change to a binding.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| policies | [Policy](#bytebase-v1-Policy) | repeated | The policies from the specified request. |+| action | [BindingDelta.Action](#bytebase-v1-BindingDelta-Action) | | The action that was performed on a Binding. |+| role | [string](#string) | | Role that is assigned to `members`. For example, `roles/projectOwner`. |+| member | [string](#string) | | Follows the same format of Binding.members. |+| condition | [google.type.Expr](#google-type-Expr) | | The condition that is associated with this binding. |-<a name="bytebase-v1-MaskingExemptionPolicy"></a>+<a name="bytebase-v1-GetIamPolicyRequest"></a>-### MaskingExemptionPolicy-MaskingExemptionPolicy is the allowlist of users who can access sensitive data.+### GetIamPolicyRequest+Request message for getting an IAM policy.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| exemptions | [MaskingExemptionPolicy.Exemption](#bytebase-v1-MaskingExemptionPolicy-Exemption) | repeated | |-+| resource | [string](#string) | | The name of the resource to get the IAM policy. Format: projects/{project} Format: workspaces/{workspace} |-<a name="bytebase-v1-MaskingExemptionPolicy-Exemption"></a>-### MaskingExemptionPolicy.Exemption+<a name="bytebase-v1-IamPolicy"></a>+### IamPolicy+IAM policy that binds members to roles.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| members | [string](#string) | repeated | Specifies the principals who are exempt from masking. For users, the member should be: user:{email} For groups, the member should be: group:{email} For service accounts, the member should be: serviceAccount:{email} For workload identities, the member should be: workloadIdentity:{email} |-| condition | [google.type.Expr](#google-type-Expr) | | The condition that is associated with this exception policy instance. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec If the condition is empty, means the user can access all databases without expiration.--Support variables: resource.instance_id: the instance resource id. Only support "==" operation. resource.database_name: the database name. Only support "==" operation. resource.schema_name: the schema name. Only support "==" operation. resource.table_name: the table name. Only support "==" operation. resource.column_name: the column name. Only support "==" operation. request.time: the expiration. Only support "<" operation in `request.time < timestamp("{ISO datetime string format}")` All variables should join with "&&" condition.--For example: resource.instance_id == "local" && resource.database_name == "employee" && request.time < timestamp("2025-04-30T11:10:39.000Z") resource.instance_id == "local" && resource.database_name == "employee" |+| bindings | [Binding](#bytebase-v1-Binding) | repeated | Collection of binding. A binding binds one or more project members to a single project role. |+| etag | [string](#string) | | The current etag of the policy. If an etag is provided and does not match the current etag of the policy, the call will be blocked and an ABORTED error will be returned. |-<a name="bytebase-v1-MaskingRulePolicy"></a>+<a name="bytebase-v1-PolicyDelta"></a>-### MaskingRulePolicy-Policy for configuring data masking rules.+### PolicyDelta+Describes changes between two IAM policies.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| rules | [MaskingRulePolicy.MaskingRule](#bytebase-v1-MaskingRulePolicy-MaskingRule) | repeated | The list of masking rules. |+| binding_deltas | [BindingDelta](#bytebase-v1-BindingDelta) | repeated | The delta for Bindings between two policies. |-<a name="bytebase-v1-MaskingRulePolicy-MaskingRule"></a>+<a name="bytebase-v1-SetIamPolicyRequest"></a>-### MaskingRulePolicy.MaskingRule-A rule that defines when and how to mask data.+### SetIamPolicyRequest+Request message for setting an IAM policy.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| id | [string](#string) | | A unique identifier for the rule in UUID format. |-| condition | [google.type.Expr](#google-type-Expr) | | The condition for the masking rule. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec+| resource | [string](#string) | | The name of the resource to set the IAM policy. Format: projects/{project} Format: workspaces/{workspace} |+| policy | [IamPolicy](#bytebase-v1-IamPolicy) | | |+| etag | [string](#string) | | The current etag of the policy. |-Support variables: resource.environment_id: the environment resource id. resource.project_id: the project resource id. resource.instance_id: the instance resource id. resource.database_name: the database name. resource.table_name: the table name. resource.column_name: the column name. resource.classification_level: the classification level (integer).-Each variable support following operations: ==: the value equals the target. !=: the value not equals the target. in: the value matches one of the targets. !(in): the value not matches any of the targets. <, <=, >, >=: numeric comparison (classification_level only).-For example: resource.environment_id == "test" && resource.project_id == "sample-project" resource.instance_id == "sample-instance" && resource.database_name == "employee" && resource.table_name in ["table1", "table2"] resource.environment_id != "test" || !(resource.project_id in ["poject1", "prject2"]) resource.instance_id == "sample-instance" && (resource.database_name == "db1" || resource.database_name == "db2") |-| semantic_type | [string](#string) | | The semantic type of data to mask (e.g., "SSN", "EMAIL"). |++<a name="bytebase-v1-BindingDelta-Action"></a>+### BindingDelta.Action+Type of action performed on a binding.-<a name="bytebase-v1-Policy"></a>+| Name | Number | Description |+| ---- | ------ | ----------- |+| ACTION_UNSPECIFIED | 0 | Unspecified action. |+| ADD | 1 | Add a binding. |+| REMOVE | 2 | Remove a binding. |-### Policy++-| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The name of the policy. Format: {resource name}/policies/{policy type} Workspace resource name: workspaces/{workspace-id}. Environment resource name: environments/environment-id. Instance resource name: instances/instance-id. Database resource name: instances/instance-id/databases/database-name. |-| inherit_from_parent | [bool](#bool) | | Whether this policy inherits from its parent resource. |-| type | [PolicyType](#bytebase-v1-PolicyType) | | The type of policy. |-| rollout_policy | [RolloutPolicy](#bytebase-v1-RolloutPolicy) | | |-| masking_rule_policy | [MaskingRulePolicy](#bytebase-v1-MaskingRulePolicy) | | |-| masking_exemption_policy | [MaskingExemptionPolicy](#bytebase-v1-MaskingExemptionPolicy) | | |-| tag_policy | [TagPolicy](#bytebase-v1-TagPolicy) | | |-| query_data_policy | [QueryDataPolicy](#bytebase-v1-QueryDataPolicy) | | |-| enforce | [bool](#bool) | | Whether the policy is enforced. |-| resource_type | [PolicyResourceType](#bytebase-v1-PolicyResourceType) | | The resource type for the policy. |++<a name="v1_audit_log_service-proto"></a>+<p align="right"><a href="#top">Top</a></p>+## v1/audit_log_service.proto-<a name="bytebase-v1-QueryDataPolicy"></a>-### QueryDataPolicy-QueryDataPolicy is the policy configuration for querying data in the SQL Editor.+<a name="bytebase-v1-AuditData"></a>++### AuditData+Additional audit data specific to certain operations.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| maximum_result_rows | [int32](#int32) | | Support both project-level and workspace-level. The maximum number of rows to return in the SQL editor. The default value <= 0, means no limit. |-| disable_export | [bool](#bool) | | workspace-level policy Disable data export in the SQL editor. |-| disable_copy_data | [bool](#bool) | | workspace-level policy Disable copying query results in the SQL editor. |-| allow_admin_data_source | [bool](#bool) | | workspace-level policy Allow using the admin data source to query in the SQL editor. If true, users can select the admin data source or read-only data source If false, 1. when read-only data source is configured, users're force to use the read-only data source 2. otherwise fallback to use the admin data source. |+| policy_delta | [PolicyDelta](#bytebase-v1-PolicyDelta) | | Changes to IAM policies. |-<a name="bytebase-v1-RolloutPolicy"></a>+<a name="bytebase-v1-AuditLog"></a>-### RolloutPolicy-Rollout policy configuration.+### AuditLog+Audit log entry recording system activity or API call.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| automatic | [bool](#bool) | | Whether rollout is automatic without manual approval. |-| roles | [string](#string) | repeated | The roles that can approve rollout execution. |+| name | [string](#string) | | The name of the log. Formats: - projects/{project}/auditLogs/{uid} - workspaces/{workspace}/auditLogs/{uid} |+| create_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | The timestamp when the audit log was created. |+| user | [string](#string) | | The user who performed the action. Format: users/{email} |+| method | [string](#string) | | The method or action being audited. For example: /bytebase.v1.SQLService/Query or bb.project.repository.push |+| severity | [AuditLog.Severity](#bytebase-v1-AuditLog-Severity) | | The severity level of this audit log entry. |+| resource | [string](#string) | | The resource associated with this audit log. |+| request | [string](#string) | | The request payload in JSON format. |+| response | [string](#string) | | The response payload in JSON format. Some fields may be omitted if they are too large or contain sensitive information. |+| status | [google.rpc.Status](#google-rpc-Status) | | The status of the operation. |+| latency | [google.protobuf.Duration](#google-protobuf-Duration) | | The duration of the operation. |+| service_data | [google.protobuf.Any](#google-protobuf-Any) | | Service-specific metadata about the request, response, and activities. |+| request_metadata | [RequestMetadata](#bytebase-v1-RequestMetadata) | | Metadata about the request context. |-<a name="bytebase-v1-TagPolicy"></a>+<a name="bytebase-v1-ExportAuditLogsRequest"></a>-### TagPolicy-Policy for tagging resources with metadata.+### ExportAuditLogsRequest+Request message for exporting audit logs.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| tags | [TagPolicy.TagsEntry](#bytebase-v1-TagPolicy-TagsEntry) | repeated | tags is the key - value map for resources. for example, the environment resource can have the sql review config tag, like "bb.tag.review_config": "reviewConfigs/{review config resource id}" |-+| parent | [string](#string) | | |+| filter | [string](#string) | | The filter of the log. It should be a valid CEL expression. Check the filter field in the SearchAuditLogsRequest message. |+| order_by | [string](#string) | | The order by of the log. Only support order by create_time. The default sorting order is ascending. For example: - order_by = "create_time asc" - order_by = "create_time desc" |+| format | [ExportFormat](#bytebase-v1-ExportFormat) | | The export format. |+| page_size | [int32](#int32) | | The maximum number of logs to return. The service may return fewer than this value. If unspecified, at most 10 log entries will be returned. The maximum value is 5000; values above 5000 will be coerced to 5000. |+| page_token | [string](#string) | | A page token, received from a previous `ExportAuditLogs` call. Provide this to retrieve the subsequent page. |-<a name="bytebase-v1-TagPolicy-TagsEntry"></a>-### TagPolicy.TagsEntry+<a name="bytebase-v1-ExportAuditLogsResponse"></a>+### ExportAuditLogsResponse+Response message for exporting audit logs.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| key | [string](#string) | | |-| value | [string](#string) | | |-+| content | [bytes](#bytes) | | The exported audit log content in the requested format. |+| next_page_token | [string](#string) | | A token to retrieve next page of log entities. Pass this value in the page_token field in the subsequent call to retrieve the next page of log entities. |-<a name="bytebase-v1-UpdatePolicyRequest"></a>-### UpdatePolicyRequest+<a name="bytebase-v1-RequestMetadata"></a>+### RequestMetadata+Metadata about the incoming request.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| policy | [Policy](#bytebase-v1-Policy) | | The policy to update.--The policy's `name` field is used to identify the instance to update. Format: {resource name}/policies/{policy type} Workspace resource name: workspaces/{workspace-id}. Environment resource name: environments/environment-id. Instance resource name: instances/instance-id. Database resource name: instances/instance-id/databases/database-name. |-| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | The list of fields to update. |-| allow_missing | [bool](#bool) | | If set to true, and the policy is not found, a new policy will be created. In this situation, `update_mask` is ignored. |---+| caller_ip | [string](#string) | | The IP address of the request originator. |+| caller_supplied_user_agent | [string](#string) | | The user agent string provided by the caller. This is supplied by the client and is not authenticated. |--<a name="bytebase-v1-PolicyResourceType"></a>-### PolicyResourceType-The resource type that a policy can be attached to.-| Name | Number | Description |-| ---- | ------ | ----------- |-| RESOURCE_TYPE_UNSPECIFIED | 0 | Unspecified resource type. |-| WORKSPACE | 1 | Workspace-level policy. |-| ENVIRONMENT | 2 | Environment-level policy. |-| PROJECT | 3 | Project-level policy. |+<a name="bytebase-v1-SearchAuditLogsRequest"></a>+### SearchAuditLogsRequest+Request message for searching audit logs.-<a name="bytebase-v1-PolicyType"></a>+| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| parent | [string](#string) | | |+| filter | [string](#string) | | The filter of the log. It should be a valid CEL expression. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec-### PolicyType-The type of organizational policy.+Supported filter: - method: the API name, can be found in the docs, should start with "/bytebase.v1." prefix. For example "/bytebase.v1.UserService/CreateUser". Support "==" operator. - severity: support "==" operator, check Severity enum in AuditLog message for values. - user: the actor, should in "users/{email}" format, support "==" operator. - create_time: support ">=" and "<=" operator.-| Name | Number | Description |-| ---- | ------ | ----------- |-| POLICY_TYPE_UNSPECIFIED | 0 | Unspecified policy type. |-| MASKING_RULE | 1 | Data masking rule policy. |-| MASKING_EXEMPTION | 2 | Data masking exemption policy. |-| ROLLOUT_POLICY | 3 | Rollout deployment policy. |-| TAG | 4 | Resource tag policy. |-| DATA_QUERY | 6 | Query data access policy. |+For example: - filter = "method == '/bytebase.v1.SQLService/Query'" - filter = "method == '/bytebase.v1.SQLService/Query' && severity == 'ERROR'" - filter = "method == '/bytebase.v1.SQLService/Query' && severity == 'ERROR' && user == 'users/[email protected]'" - filter = "method == '/bytebase.v1.SQLService/Query' && severity == 'ERROR' && create_time <= '2021-01-01T00:00:00Z' && create_time >= '2020-01-01T00:00:00Z'" |+| order_by | [string](#string) | | The order by of the log. Only support order by create_time. The default sorting order is ascending. For example: - order_by = "create_time asc" - order_by = "create_time desc" |+| page_size | [int32](#int32) | | The maximum number of logs to return. The service may return fewer than this value. If unspecified, at most 10 log entries will be returned. The maximum value is 5000; values above 5000 will be coerced to 5000. |+| page_token | [string](#string) | | A page token, received from a previous `SearchLogs` call. Provide this to retrieve the subsequent page. |---<a name="bytebase-v1-OrgPolicyService"></a>-### OrgPolicyService-OrgPolicyService manages organizational policies at various resource levels.+<a name="bytebase-v1-SearchAuditLogsResponse"></a>-| Method Name | Request Type | Response Type | Description |-| ----------- | ------------ | ------------- | ------------|-| GetPolicy | [GetPolicyRequest](#bytebase-v1-GetPolicyRequest) | [Policy](#bytebase-v1-Policy) | Retrieves a policy by name. Permissions required: bb.policies.get |-| ListPolicies | [ListPoliciesRequest](#bytebase-v1-ListPoliciesRequest) | [ListPoliciesResponse](#bytebase-v1-ListPoliciesResponse) | Lists policies at a specified resource level. Permissions required: bb.policies.list |-| CreatePolicy | [CreatePolicyRequest](#bytebase-v1-CreatePolicyRequest) | [Policy](#bytebase-v1-Policy) | Creates a new organizational policy. Permissions required: bb.policies.create |-| UpdatePolicy | [UpdatePolicyRequest](#bytebase-v1-UpdatePolicyRequest) | [Policy](#bytebase-v1-Policy) | Updates an existing organizational policy. Permissions required: bb.policies.update |-| DeletePolicy | [DeletePolicyRequest](#bytebase-v1-DeletePolicyRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | Deletes an organizational policy. Permissions required: bb.policies.delete |+### SearchAuditLogsResponse+Response message for searching audit logs.-+| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| audit_logs | [AuditLog](#bytebase-v1-AuditLog) | repeated | |+| next_page_token | [string](#string) | | A token to retrieve next page of log entities. Pass this value in the page_token field in the subsequent call to retrieve the next page of log entities. |-<a name="v1_rollout_service-proto"></a>-<p align="right"><a href="#top">Top</a></p>-## v1/rollout_service.proto+-<a name="bytebase-v1-BatchCancelTaskRunsRequest"></a>-### BatchCancelTaskRunsRequest+<a name="bytebase-v1-AuditLog-Severity"></a>+### AuditLog.Severity+Severity level for audit log entries.+| Name | Number | Description |+| ---- | ------ | ----------- |+| SEVERITY_UNSPECIFIED | 0 | Unspecified severity level. |+| DEBUG | 1 | Debug-level information. |+| INFO | 2 | Informational messages. |+| NOTICE | 3 | Notable events. |+| WARNING | 4 | Warning conditions. |+| ERROR | 5 | Error conditions. |+| CRITICAL | 6 | Critical conditions. |+| ALERT | 7 | Action must be taken immediately. |+| EMERGENCY | 8 | System is unusable. |-| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| parent | [string](#string) | | The task name for the taskRuns. Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task} Use `projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/-` to cancel task runs under the same stage. |-| task_runs | [string](#string) | repeated | The taskRuns to cancel. Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun} |+++<a name="bytebase-v1-AuditLogService"></a>+### AuditLogService+AuditLogService manages audit logs for system activities and API calls.-<a name="bytebase-v1-BatchCancelTaskRunsResponse"></a>+| Method Name | Request Type | Response Type | Description |+| ----------- | ------------ | ------------- | ------------|+| SearchAuditLogs | [SearchAuditLogsRequest](#bytebase-v1-SearchAuditLogsRequest) | [SearchAuditLogsResponse](#bytebase-v1-SearchAuditLogsResponse) | Searches audit logs with optional filtering and pagination. Permissions required: bb.auditLogs.search |+| ExportAuditLogs | [ExportAuditLogsRequest](#bytebase-v1-ExportAuditLogsRequest) | [ExportAuditLogsResponse](#bytebase-v1-ExportAuditLogsResponse) | Exports audit logs in a specified format for external analysis. Permissions required: bb.auditLogs.export |-### BatchCancelTaskRunsResponse++<a name="v1_user_service-proto"></a>+<p align="right"><a href="#top">Top</a></p>+## v1/user_service.proto-<a name="bytebase-v1-BatchRunTasksRequest"></a>+<a name="bytebase-v1-BatchGetUsersRequest"></a>-### BatchRunTasksRequest+### BatchGetUsersRequest| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| parent | [string](#string) | | The stage name for the tasks. Format: projects/{project}/plans/{plan}/rollout/stages/{stage} |-| tasks | [string](#string) | repeated | The tasks to run. Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task} |-| run_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | optional | The task run should run after run_time. |-| skip_prior_backup | [bool](#bool) | | If true, skip prior backup for this run even if the task has prior backup enabled. |+| ----- | ---- | ----- | ----------- |+| names | [string](#string) | repeated | The user names to retrieve. Format: users/{email} |-<a name="bytebase-v1-BatchRunTasksResponse"></a>+<a name="bytebase-v1-BatchGetUsersResponse"></a>++### BatchGetUsersResponse+-### BatchRunTasksResponse+| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| users | [User](#bytebase-v1-User) | repeated | The users from the specified request. |-<a name="bytebase-v1-BatchSkipTasksRequest"></a>+<a name="bytebase-v1-CreateUserRequest"></a>-### BatchSkipTasksRequest+### CreateUserRequest| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| parent | [string](#string) | | The stage name for the tasks. Format: projects/{project}/plans/{plan}/rollout/stages/{stage} |-| tasks | [string](#string) | repeated | The tasks to skip. Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task} |-| reason | [string](#string) | | The reason for skipping the tasks. |+| user | [User](#bytebase-v1-User) | | The user to create. |-<a name="bytebase-v1-BatchSkipTasksResponse"></a>+<a name="bytebase-v1-DeleteUserRequest"></a>++### DeleteUserRequest-### BatchSkipTasksResponse+| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| name | [string](#string) | | The name of the user to delete. Format: users/{email} |-<a name="bytebase-v1-CreateRolloutRequest"></a>-### CreateRolloutRequest+<a name="bytebase-v1-GetUserRequest"></a>++### GetUserRequest| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| parent | [string](#string) | | The parent plan for which this rollout will be created. Format: projects/{project}/plans/{plan} |-| target | [string](#string) | optional | Create the rollout only for the specified target. Format: environments/{environment} If unspecified, all stages are created. If set to "", no stages are created. |+| name | [string](#string) | | The name of the user to retrieve. Format: users/{email} |-<a name="bytebase-v1-GetRolloutRequest"></a>+<a name="bytebase-v1-ListUsersRequest"></a>-### GetRolloutRequest+### ListUsersRequest| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The name of the rollout to retrieve. This is the rollout resource name, which is the plan name plus /rollout suffix. Format: projects/{project}/plans/{plan}/rollout |+| page_size | [int32](#int32) | | The maximum number of users to return. The service may return fewer than this value. If unspecified, at most 10 users 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 `ListUsers` call. Provide this to retrieve the subsequent page.+When paginating, all other parameters provided to `ListUsers` must match the call that provided the page token. |+| show_deleted | [bool](#bool) | | Show deleted users if specified. |+| filter | [string](#string) | | Filter is used to filter users returned in the list. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec+Supported filter: - name: the user name, support "==" and ".contains()" operator. - email: the user email, support "==" and ".contains()" operator. - state: check State enum for values, support "==" operator. - project: the project full name in "projects/{id}" format, support "==" operator.+For example: name == "ed" name.contains("ed") email == "[email protected]" email.contains("ed") state == "DELETED" project == "projects/sample-project" You can combine filter conditions like: name.contains("ed") && project == "projects/sample-project" (name == "ed" || email == "[email protected]") && project == "projects/sample-project" |-<a name="bytebase-v1-GetTaskRunLogRequest"></a>-### GetTaskRunLogRequest+++<a name="bytebase-v1-ListUsersResponse"></a>++### ListUsersResponse| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| parent | [string](#string) | | Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun} |+| users | [User](#bytebase-v1-User) | repeated | The users 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-GetTaskRunRequest"></a>+<a name="bytebase-v1-UndeleteUserRequest"></a>-### GetTaskRunRequest+### UndeleteUserRequest| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun} |+| name | [string](#string) | | The name of the deleted user. Format: users/{email} |-<a name="bytebase-v1-GetTaskRunSessionRequest"></a>+<a name="bytebase-v1-UpdateEmailRequest"></a>-### GetTaskRunSessionRequest+### UpdateEmailRequest| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| parent | [string](#string) | | Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun} |+| name | [string](#string) | | The name of the user whose email to update. Format: users/{email} Note: This is the current (old) email address. The new email is specified in the 'email' field. |+| email | [string](#string) | | The new email address. |-<a name="bytebase-v1-ListRolloutsRequest"></a>+<a name="bytebase-v1-UpdateUserRequest"></a>-### ListRolloutsRequest+### UpdateUserRequest| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| parent | [string](#string) | | The parent, which owns this collection of rollouts. Format: projects/{project} Use "projects/-" to list all rollouts from all projects. |-| page_size | [int32](#int32) | | The maximum number of rollouts to return. The service may return fewer than this value. If unspecified, at most 10 rollouts 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 `ListRollouts` call. Provide this to retrieve the subsequent page.--When paginating, all other parameters provided to `ListRollouts` must match the call that provided the page token. |-| filter | [string](#string) | | Filter is used to filter rollouts returned in the list. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec--Supported filters: - update_time: rollout update time in "2006-01-02T15:04:05Z07:00" format, support ">=" or "<=" operator. - task_type: the task type, support "in" operator, check the Task.Type enum for the values.+| user | [User](#bytebase-v1-User) | | The user to update.-For example: update_time >= "2025-01-02T15:04:05Z07:00" task_type in ["DATABASE_MIGRATE", "DATABASE_EXPORT"] |+The user's `name` field is used to identify the user to update. Format: users/{email} |+| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | The list of fields to update. |+| otp_code | [string](#string) | optional | The otp_code is used to verify the user's identity by MFA. |+| regenerate_temp_mfa_secret | [bool](#bool) | | The regenerate_temp_mfa_secret flag means to regenerate temporary MFA secret for user. This is used for MFA setup. The temporary MFA secret and recovery codes will be returned in the response. |+| regenerate_recovery_codes | [bool](#bool) | | The regenerate_recovery_codes flag means to regenerate recovery codes for user. |+| allow_missing | [bool](#bool) | | If set to true, and the user is not found, a new user will be created. In this situation, `update_mask` is ignored. |-<a name="bytebase-v1-ListRolloutsResponse"></a>+<a name="bytebase-v1-User"></a>-### ListRolloutsResponse+### User| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| rollouts | [Rollout](#bytebase-v1-Rollout) | repeated | The rollouts 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. |+| name | [string](#string) | | The name of the user. Format: users/{email} |+| state | [State](#bytebase-v1-State) | | The lifecycle state of the user account. |+| email | [string](#string) | | The email address of the user, used for login and notifications. |+| title | [string](#string) | | The display title or full name of the user. |+| password | [string](#string) | | The password for authentication. Only used during user creation or password updates. |+| service_key | [string](#string) | | The service key for service account authentication. |+| mfa_enabled | [bool](#bool) | | The mfa_enabled flag means if the user has enabled MFA. |+| temp_otp_secret | [string](#string) | | Temporary OTP secret used during MFA setup and regeneration. |+| temp_recovery_codes | [string](#string) | repeated | Temporary recovery codes used during MFA setup and regeneration. |+| temp_otp_secret_created_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | Timestamp when temp_otp_secret was created. Used by frontend to show countdown timer. |+| phone | [string](#string) | | Should be a valid E.164 compliant phone number. Could be empty. |+| profile | [User.Profile](#bytebase-v1-User-Profile) | | User profile metadata. |+| groups | [string](#string) | repeated | The groups for the user. Format: groups/{email} |+| workspace | [string](#string) | | The current workspace. Format: workspaces/{id} |-<a name="bytebase-v1-ListTaskRunsRequest"></a>+<a name="bytebase-v1-User-Profile"></a>-### ListTaskRunsRequest+### User.Profile| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| parent | [string](#string) | | The parent, which owns this collection of taskRuns. Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task} Use "projects/{project}/plans/{plan}/rollout/stages/-/tasks/-" to list all taskRuns from a rollout. |+| last_login_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | The last time the user successfully logged in. |+| last_change_password_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | The last time the user changed their password. |+| source | [string](#string) | | source means where the user comes from. For now we support Entra ID SCIM sync, so the source could be Entra ID. |+-<a name="bytebase-v1-ListTaskRunsResponse"></a>+-### ListTaskRunsResponse++<a name="bytebase-v1-UserService"></a>-| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| task_runs | [TaskRun](#bytebase-v1-TaskRun) | repeated | The taskRuns from the specified request. |+### UserService+UserService manages user accounts and authentication.+| Method Name | Request Type | Response Type | Description |+| ----------- | ------------ | ------------- | ------------|+| GetUser | [GetUserRequest](#bytebase-v1-GetUserRequest) | [User](#bytebase-v1-User) | Get the user. Any authenticated user can get the user. Permissions required: bb.users.get |+| BatchGetUsers | [BatchGetUsersRequest](#bytebase-v1-BatchGetUsersRequest) | [BatchGetUsersResponse](#bytebase-v1-BatchGetUsersResponse) | Get the users in batch. Any authenticated user can batch get users. Permissions required: bb.users.get |+| GetCurrentUser | [.google.protobuf.Empty](#google-protobuf-Empty) | [User](#bytebase-v1-User) | Get the current authenticated user. Permissions required: None |+| ListUsers | [ListUsersRequest](#bytebase-v1-ListUsersRequest) | [ListUsersResponse](#bytebase-v1-ListUsersResponse) | List all users. Any authenticated user can list users. Permissions required: bb.users.list |+| CreateUser | [CreateUserRequest](#bytebase-v1-CreateUserRequest) | [User](#bytebase-v1-User) | Creates a user in the caller's workspace (admin action, self-hosted only). In SaaS mode, admins should add users via workspace IAM policy instead. Permissions required: bb.users.create |+| UpdateUser | [UpdateUserRequest](#bytebase-v1-UpdateUserRequest) | [User](#bytebase-v1-User) | Updates a user. Users can update their own profile, or users with bb.users.update permission can update any user. Note: Email updates are not supported through this API. Use UpdateEmail instead. Permissions required: bb.users.update (or self) |+| DeleteUser | [DeleteUserRequest](#bytebase-v1-DeleteUserRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | Deletes a user. Requires bb.users.delete permission with additional validation: the last remaining workspace admin cannot be deleted. Permissions required: bb.users.delete |+| UndeleteUser | [UndeleteUserRequest](#bytebase-v1-UndeleteUserRequest) | [User](#bytebase-v1-User) | Restores a deleted user. Permissions required: bb.users.undelete |+| UpdateEmail | [UpdateEmailRequest](#bytebase-v1-UpdateEmailRequest) | [User](#bytebase-v1-User) | Updates a user's email address. Permissions required: bb.users.updateEmail |++<a name="v1_auth_service-proto"></a>+<p align="right"><a href="#top">Top</a></p>-<a name="bytebase-v1-PreviewTaskRunRollbackRequest"></a>+## v1/auth_service.proto-### PreviewTaskRunRollbackRequest+++<a name="bytebase-v1-ExchangeTokenRequest"></a>++### ExchangeTokenRequest| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun} |+| token | [string](#string) | | External OIDC token (JWT) from CI/CD platform. |+| email | [string](#string) | | Workload Identity email for identifying which identity to authenticate as. Format: {name}@workload.bytebase.com |-<a name="bytebase-v1-PreviewTaskRunRollbackResponse"></a>+<a name="bytebase-v1-ExchangeTokenResponse"></a>-### PreviewTaskRunRollbackResponse+### ExchangeTokenResponse| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| statement | [string](#string) | | The rollback SQL statement that would undo the task run. |-+| access_token | [string](#string) | | Bytebase access token. |-<a name="bytebase-v1-Rollout"></a>-### Rollout+<a name="bytebase-v1-IdentityProviderContext"></a>+### IdentityProviderContext+Context for identity provider authentication.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The resource name of the rollout. Format: projects/{project}/plans/{plan}/rollout |-| title | [string](#string) | | The title of the rollout, inherited from the associated plan. This field is output only and cannot be directly set. |-| stages | [Stage](#bytebase-v1-Stage) | repeated | Stages and thus tasks of the rollout. |-| create_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |-| update_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |+| oauth2_context | [OAuth2IdentityProviderContext](#bytebase-v1-OAuth2IdentityProviderContext) | | OAuth2 authentication context. |+| oidc_context | [OIDCIdentityProviderContext](#bytebase-v1-OIDCIdentityProviderContext) | | OpenID Connect authentication context. |-<a name="bytebase-v1-Stage"></a>+<a name="bytebase-v1-LoginRequest"></a>-### Stage+### LoginRequest| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | Format: projects/{project}/plans/{plan}/rollout/stages/{stage} Use "-" for {stage} when the stage has no environment or deleted environment. |-| id | [string](#string) | | id is the environment id of the stage. e.g., "prod". Use "-" when the stage has no environment or deleted environment. |-| environment | [string](#string) | | environment is the environment of the stage. Format: environments/{environment} for valid environments, or "environments/-" for stages without environment or with deleted environments. |-| tasks | [Task](#bytebase-v1-Task) | repeated | The tasks within this stage. |+| email | [string](#string) | | User's email address. |+| password | [string](#string) | | User's password for authentication. |+| web | [bool](#bool) | | If true, sets access token and refresh token as HTTP-only cookies instead of returning the token in the response body. Use for browser-based clients. |+| idp_name | [string](#string) | | The name of the identity provider. Format: idps/{idp} |+| idp_context | [IdentityProviderContext](#bytebase-v1-IdentityProviderContext) | | The idp_context is used to get the user information from identity provider. |+| otp_code | [string](#string) | optional | The otp_code is used to verify the user's identity by MFA. |+| recovery_code | [string](#string) | optional | The recovery_code is used to recovery the user's identity with MFA. |+| mfa_temp_token | [string](#string) | optional | The mfa_temp_token is used to verify the user's identity by MFA. |+| email_code | [string](#string) | optional | 6-digit code from email for passwordless login/signup. Pairs with `email`. Mutually exclusive with `password` and `idp_name`. |+| workspace | [string](#string) | optional | Preferred workspace to land in after login. If the user is a member of this workspace, the token is issued for it; otherwise falls back to the default resolution (last login workspace → first membership). Typically populated from the ?workspace= query parameter in invite links. Format: workspaces/{workspace} |-<a name="bytebase-v1-Task"></a>+<a name="bytebase-v1-LoginResponse"></a>-### Task+### LoginResponse| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task} |-| spec_id | [string](#string) | | A UUID4 string that uniquely identifies the Spec. |-| status | [Task.Status](#bytebase-v1-Task-Status) | | Status is the status of the task. |-| skipped_reason | [string](#string) | | The reason why the task was skipped. |-| type | [Task.Type](#bytebase-v1-Task-Type) | | |-| target | [string](#string) | | Format: instances/{instance} if the task is DatabaseCreate. Format: instances/{instance}/databases/{database} |-| database_create | [Task.DatabaseCreate](#bytebase-v1-Task-DatabaseCreate) | | |-| database_update | [Task.DatabaseUpdate](#bytebase-v1-Task-DatabaseUpdate) | | |-| database_data_export | [Task.DatabaseDataExport](#bytebase-v1-Task-DatabaseDataExport) | | |-| update_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | optional | The update_time is the update time of latest task run. If there are no task runs, it will be empty. |-| run_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | optional | The run_time is the scheduled run time of latest task run. If there are no task runs or the task run is not scheduled, it will be empty. |--+| token | [string](#string) | | Access token for authenticated requests. Only returned when web=false. For web=true, the token is set as an HTTP-only cookie. |+| mfa_temp_token | [string](#string) | optional | Temporary token for MFA verification. |+| require_reset_password | [bool](#bool) | | Whether user must reset password before continuing. |+| user | [User](#bytebase-v1-User) | | The user from the successful login. |-<a name="bytebase-v1-Task-DatabaseCreate"></a>-### Task.DatabaseCreate-Payload for creating a new database.+<a name="bytebase-v1-LogoutRequest"></a>-| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| sheet | [string](#string) | | Format: projects/{project}/sheets/{sheet} |+### LogoutRequest+Request to logout current user session.-<a name="bytebase-v1-Task-DatabaseDataExport"></a>+<a name="bytebase-v1-OAuth2IdentityProviderContext"></a>-### Task.DatabaseDataExport-Payload for exporting database data.+### OAuth2IdentityProviderContext+OAuth2 authentication context.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| sheet | [string](#string) | | The resource name of the sheet. Format: projects/{project}/sheets/{sheet} |+| code | [string](#string) | | Authorization code from OAuth2 provider. |-<a name="bytebase-v1-Task-DatabaseUpdate"></a>+<a name="bytebase-v1-OIDCIdentityProviderContext"></a>-### Task.DatabaseUpdate-Payload for updating a database schema.+### OIDCIdentityProviderContext+OpenID Connect authentication context.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| sheet | [string](#string) | | Format: projects/{project}/sheets/{sheet} |-| release | [string](#string) | | Format: projects/{project}/releases/{release} |+| code | [string](#string) | | Authorization code from OIDC provider. |-<a name="bytebase-v1-TaskRun"></a>+<a name="bytebase-v1-RefreshRequest"></a>-### TaskRun+### RefreshRequest+Request to refresh the access token.-| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| name | [string](#string) | | Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun} |-| creator | [string](#string) | | Format: users/[email protected] |-| create_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |-| update_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |-| status | [TaskRun.Status](#bytebase-v1-TaskRun-Status) | | The current execution status of the task run. |-| detail | [string](#string) | | Below are the results of a task run. Detailed information about the task run result. |-| start_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | The time when the task run started execution. |-| export_archive_status | [TaskRun.ExportArchiveStatus](#bytebase-v1-TaskRun-ExportArchiveStatus) | | The export archive status for data export tasks. |-| has_prior_backup | [bool](#bool) | | Indicates whether a prior backup was created for this task run. When true, rollback SQL can be generated via PreviewTaskRunRollback. Backup details are available in the task run logs. |-| scheduler_info | [TaskRun.SchedulerInfo](#bytebase-v1-TaskRun-SchedulerInfo) | | Scheduling information about the task run. |-| run_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | optional | The task run should run after run_time. This can only be set when creating the task run calling BatchRunTasks. |+<a name="bytebase-v1-RefreshResponse"></a>++### RefreshResponse+Response from refreshing the access token.+-<a name="bytebase-v1-TaskRun-SchedulerInfo"></a>-### TaskRun.SchedulerInfo-Information about task run scheduling.++<a name="bytebase-v1-RequestPasswordResetRequest"></a>++### RequestPasswordResetRequest+| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| report_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | The time when the scheduling info was reported. |-| waiting_cause | [TaskRun.SchedulerInfo.WaitingCause](#bytebase-v1-TaskRun-SchedulerInfo-WaitingCause) | | The cause for the task run waiting. |+| email | [string](#string) | | The email address of the account to reset. |+| workspace | [string](#string) | optional | Optional workspace context captured at send time, used to locate the EMAIL setting, and later (at verify time) for signup gate checks and workspace assignment. Unset for SaaS brand-new signup (no workspace exists yet). Format: workspaces/{workspace} |-<a name="bytebase-v1-TaskRun-SchedulerInfo-WaitingCause"></a>+<a name="bytebase-v1-ResetPasswordRequest"></a>++### ResetPasswordRequest-### TaskRun.SchedulerInfo.WaitingCause-Information about why a task run is waiting.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| parallel_tasks_limit | [bool](#bool) | | Waiting due to parallel tasks limit. |+| email | [string](#string) | | The email address of the account. |+| code | [string](#string) | | The 6-digit code from the reset email. |+| new_password | [string](#string) | | The new password to set. |-<a name="bytebase-v1-TaskRunLog"></a>+<a name="bytebase-v1-SendEmailLoginCodeRequest"></a>-### TaskRunLog+### SendEmailLoginCodeRequest| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun}/log |-| entries | [TaskRunLogEntry](#bytebase-v1-TaskRunLogEntry) | repeated | The log entries for this task run. |+| email | [string](#string) | | The email address to send the code to. |+| workspace | [string](#string) | optional | Optional workspace context captured at send time, used to locate the EMAIL setting, and later (at verify time) for signup gate checks and workspace assignment. Unset for SaaS brand-new signup (no workspace exists yet). Format: workspaces/{workspace} |-<a name="bytebase-v1-TaskRunLogEntry"></a>+<a name="bytebase-v1-SignupRequest"></a>-### TaskRunLogEntry+### SignupRequest| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| type | [TaskRunLogEntry.Type](#bytebase-v1-TaskRunLogEntry-Type) | | The type of this log entry. |-| log_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | The time when the log was recorded. |-| replica_id | [string](#string) | | The replica ID for this log entry. |-| schema_dump | [TaskRunLogEntry.SchemaDump](#bytebase-v1-TaskRunLogEntry-SchemaDump) | | Schema dump details (if type is SCHEMA_DUMP). |-| command_execute | [TaskRunLogEntry.CommandExecute](#bytebase-v1-TaskRunLogEntry-CommandExecute) | | Command execution details (if type is COMMAND_EXECUTE). |-| database_sync | [TaskRunLogEntry.DatabaseSync](#bytebase-v1-TaskRunLogEntry-DatabaseSync) | | Database sync details (if type is DATABASE_SYNC). |-| transaction_control | [TaskRunLogEntry.TransactionControl](#bytebase-v1-TaskRunLogEntry-TransactionControl) | | Transaction control details (if type is TRANSACTION_CONTROL). |-| prior_backup | [TaskRunLogEntry.PriorBackup](#bytebase-v1-TaskRunLogEntry-PriorBackup) | | Prior backup details (if type is PRIOR_BACKUP). |-| retry_info | [TaskRunLogEntry.RetryInfo](#bytebase-v1-TaskRunLogEntry-RetryInfo) | | Retry information details (if type is RETRY_INFO). |-| compute_diff | [TaskRunLogEntry.ComputeDiff](#bytebase-v1-TaskRunLogEntry-ComputeDiff) | | Compute diff details (if type is COMPUTE_DIFF). |-| release_file_execute | [TaskRunLogEntry.ReleaseFileExecute](#bytebase-v1-TaskRunLogEntry-ReleaseFileExecute) | | Release file execution details (if type is RELEASE_FILE_EXECUTE). |-| ghost_migration | [TaskRunLogEntry.GhostMigration](#bytebase-v1-TaskRunLogEntry-GhostMigration) | | gh-ost migration details (if type is GHOST_MIGRATION). |+| email | [string](#string) | | The email for the new account. |+| password | [string](#string) | | The password for the new account. |+| title | [string](#string) | | The display name of the user. |-<a name="bytebase-v1-TaskRunLogEntry-CommandExecute"></a>+<a name="bytebase-v1-SwitchWorkspaceRequest"></a>++### SwitchWorkspaceRequest-### TaskRunLogEntry.CommandExecute-Command execution details.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| log_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | When the command was logged. |-| range | [Range](#bytebase-v1-Range) | | The byte offset range of the executed command in the sheet. Uses byte offsets (not character indices) for efficient slicing of sheet content bytes. Example: For "SELECT 你好;" in a UTF-8 sheet, range [0, 13) represents all 13 bytes. |-| statement | [string](#string) | | The executed statement. |-| response | [TaskRunLogEntry.CommandExecute.CommandResponse](#bytebase-v1-TaskRunLogEntry-CommandExecute-CommandResponse) | | The response from executing the command. |+| workspace | [string](#string) | | The target workspace to switch to. Format: workspaces/{workspace} |+| web | [bool](#bool) | | If true, sets tokens as HTTP-only cookies (browser clients). |+| otp_code | [string](#string) | optional | OTP code for MFA verification. Required if the target workspace enforces MFA. |+| recovery_code | [string](#string) | optional | Recovery code for MFA verification (alternative to otp_code). |+| mfa_temp_token | [string](#string) | optional | Temporary MFA token from a previous SwitchWorkspace call that returned mfa_temp_token. |+-<a name="bytebase-v1-TaskRunLogEntry-CommandExecute-CommandResponse"></a>+-### TaskRunLogEntry.CommandExecute.CommandResponse-Command execution response.+-| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| log_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | When the response was logged. |-| error | [string](#string) | | Error message if command execution failed. |-| affected_rows | [int64](#int64) | | Total affected rows. |-| all_affected_rows | [int64](#int64) | repeated | `all_affected_rows` is the affected rows of each command. `all_affected_rows` may be unavailable if the database driver doesn't support it. Caller should fallback to `affected_rows` in that case. |+<a name="bytebase-v1-AuthService"></a>++### AuthService+AuthService handles user authentication operations.++| Method Name | Request Type | Response Type | Description |+| ----------- | ------------ | ------------- | ------------|+| Login | [LoginRequest](#bytebase-v1-LoginRequest) | [LoginResponse](#bytebase-v1-LoginResponse) | Authenticates a user and returns access tokens. Permissions required: None |+| Logout | [LogoutRequest](#bytebase-v1-LogoutRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | Logs out the current user session. Permissions required: None |+| ExchangeToken | [ExchangeTokenRequest](#bytebase-v1-ExchangeTokenRequest) | [ExchangeTokenResponse](#bytebase-v1-ExchangeTokenResponse) | Exchanges an external OIDC token for a Bytebase access token. Used by CI/CD pipelines with Workload Identity Federation. Permissions required: None (validates via OIDC token) |+| Signup | [SignupRequest](#bytebase-v1-SignupRequest) | [LoginResponse](#bytebase-v1-LoginResponse) | Registers a new user account. Creates a principal and assigns a workspace: - If the user's email was pre-invited to a workspace, joins that workspace. - Otherwise, creates a new workspace with the user as admin. Returns access tokens so the user is logged in immediately after signup. |+| Refresh | [RefreshRequest](#bytebase-v1-RefreshRequest) | [RefreshResponse](#bytebase-v1-RefreshResponse) | Refreshes the access token using the refresh token cookie. Permissions required: None (validates via refresh token cookie) |+| SwitchWorkspace | [SwitchWorkspaceRequest](#bytebase-v1-SwitchWorkspaceRequest) | [LoginResponse](#bytebase-v1-LoginResponse) | Switches the current user's active workspace and issues new tokens. The user must be a member of the target workspace. |+| RequestPasswordReset | [RequestPasswordResetRequest](#bytebase-v1-RequestPasswordResetRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | Requests a password reset email for the given email address. Always returns success to avoid leaking whether the email exists. Permissions required: None |+| ResetPassword | [ResetPasswordRequest](#bytebase-v1-ResetPasswordRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | Resets the user's password using a password reset token from email. Permissions required: None (validates via token) |+| SendEmailLoginCode | [SendEmailLoginCodeRequest](#bytebase-v1-SendEmailLoginCodeRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | Sends a 6-digit verification code to the email for login/signup. Always returns success (no email enumeration). Enforces 60-sec resend cooldown. Permissions required: None |++<a name="v1_cel_service-proto"></a>+<p align="right"><a href="#top">Top</a></p>+## v1/cel_service.proto-<a name="bytebase-v1-TaskRunLogEntry-ComputeDiff"></a>-### TaskRunLogEntry.ComputeDiff-Schema diff computation details.++<a name="bytebase-v1-BatchDeparseRequest"></a>++### BatchDeparseRequest+Request message for batch deparsing CEL expressions.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| start_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | When diff computation started. |-| end_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | When diff computation ended. |-| error | [string](#string) | | Error message if computation failed. |+| expressions | [google.api.expr.v1alpha1.Expr](#google-api-expr-v1alpha1-Expr) | repeated | The CEL expression ASTs to deparse. |-<a name="bytebase-v1-TaskRunLogEntry-DatabaseSync"></a>+<a name="bytebase-v1-BatchDeparseResponse"></a>-### TaskRunLogEntry.DatabaseSync-Database synchronization details.+### BatchDeparseResponse+Response message for batch deparsing CEL expressions.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| start_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | When the database sync started. |-| end_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | When the database sync ended. |-| error | [string](#string) | | Error message if sync failed. |+| expressions | [string](#string) | repeated | The deparsed CEL expressions as strings. |-<a name="bytebase-v1-TaskRunLogEntry-GhostMigration"></a>+<a name="bytebase-v1-BatchParseRequest"></a>-### TaskRunLogEntry.GhostMigration-gh-ost migration details.+### BatchParseRequest+Request message for batch parsing CEL expressions.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| start_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | When the gh-ost migration started. |-| end_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | When the gh-ost migration ended. |-| error | [string](#string) | | Error message if the gh-ost migration failed. |+| expressions | [string](#string) | repeated | The CEL expression strings to parse. |-<a name="bytebase-v1-TaskRunLogEntry-PriorBackup"></a>+<a name="bytebase-v1-BatchParseResponse"></a>-### TaskRunLogEntry.PriorBackup-Prior backup operation details.+### BatchParseResponse+Response message for batch parsing CEL expressions.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| start_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | When the backup started. |-| end_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | When the backup ended. |-| prior_backup_detail | [TaskRunLogEntry.PriorBackup.PriorBackupDetail](#bytebase-v1-TaskRunLogEntry-PriorBackup-PriorBackupDetail) | | The backup details. |-| error | [string](#string) | | Error message if the backup failed. |+| expressions | [google.api.expr.v1alpha1.Expr](#google-api-expr-v1alpha1-Expr) | repeated | The parsed CEL expressions as AST. |+-<a name="bytebase-v1-TaskRunLogEntry-PriorBackup-PriorBackupDetail"></a>+-### TaskRunLogEntry.PriorBackup.PriorBackupDetail-Prior backup detail for rollback purposes.+-| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| items | [TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item](#bytebase-v1-TaskRunLogEntry-PriorBackup-PriorBackupDetail-Item) | repeated | The list of backed up tables. |+<a name="bytebase-v1-CelService"></a>++### CelService+CelService manages CEL (Common Expression Language) parsing and formatting operations.++| Method Name | Request Type | Response Type | Description |+| ----------- | ------------ | ------------- | ------------|+| BatchParse | [BatchParseRequest](#bytebase-v1-BatchParseRequest) | [BatchParseResponse](#bytebase-v1-BatchParseResponse) | Parses multiple CEL expression strings into AST representations. Permissions required: None |+| BatchDeparse | [BatchDeparseRequest](#bytebase-v1-BatchDeparseRequest) | [BatchDeparseResponse](#bytebase-v1-BatchDeparseResponse) | Converts multiple CEL AST representations back into expression strings. Permissions required: None |++<a name="v1_database_catalog_service-proto"></a>+<p align="right"><a href="#top">Top</a></p>+## v1/database_catalog_service.proto-<a name="bytebase-v1-TaskRunLogEntry-PriorBackup-PriorBackupDetail-Item"></a>-### TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item-A single backup table mapping.++<a name="bytebase-v1-ColumnCatalog"></a>++### ColumnCatalog+Column metadata within a table.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| source_table | [TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item.Table](#bytebase-v1-TaskRunLogEntry-PriorBackup-PriorBackupDetail-Item-Table) | | The original table information. |-| target_table | [TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item.Table](#bytebase-v1-TaskRunLogEntry-PriorBackup-PriorBackupDetail-Item-Table) | | The target backup table information. |-| start_position | [Position](#bytebase-v1-Position) | | The start position in the SQL statement. |-| end_position | [Position](#bytebase-v1-Position) | | The end position in the SQL statement. |+| name | [string](#string) | | The column name. |+| semantic_type | [string](#string) | | The semantic type describing the data purpose. |+| labels | [ColumnCatalog.LabelsEntry](#bytebase-v1-ColumnCatalog-LabelsEntry) | repeated | User-defined labels for this column. |+| classification | [string](#string) | | The data classification level for this column. |+| object_schema | [ObjectSchema](#bytebase-v1-ObjectSchema) | optional | Object schema for complex column types like JSON. |-<a name="bytebase-v1-TaskRunLogEntry-PriorBackup-PriorBackupDetail-Item-Table"></a>+<a name="bytebase-v1-ColumnCatalog-LabelsEntry"></a>++### ColumnCatalog.LabelsEntry-### TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item.Table-Table information.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| database | [string](#string) | | The database information. Format: instances/{instance}/databases/{database} |-| schema | [string](#string) | | The schema name. |-| table | [string](#string) | | The table name. |+| key | [string](#string) | | |+| value | [string](#string) | | |-<a name="bytebase-v1-TaskRunLogEntry-ReleaseFileExecute"></a>+<a name="bytebase-v1-DatabaseCatalog"></a>-### TaskRunLogEntry.ReleaseFileExecute-Release file execution details.+### DatabaseCatalog+Catalog metadata for a database including schemas, tables, and columns.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| version | [string](#string) | | The version of the file being executed (e.g., "0001"). |-| file_path | [string](#string) | | The file path within the release (e.g., "2.2/V0001_create_table.sql"). |+| name | [string](#string) | | The name of the database catalog. Format: instances/{instance}/databases/{database}/catalog |+| schemas | [SchemaCatalog](#bytebase-v1-SchemaCatalog) | repeated | The schemas in the database. |-<a name="bytebase-v1-TaskRunLogEntry-RetryInfo"></a>+<a name="bytebase-v1-GetDatabaseCatalogRequest"></a>-### TaskRunLogEntry.RetryInfo-Retry information for failed operations.+### GetDatabaseCatalogRequest+Request message for getting a database catalog.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| error | [string](#string) | | The error that triggered the retry. |-| retry_count | [int32](#int32) | | Current retry attempt number. |-| maximum_retries | [int32](#int32) | | Maximum number of retries allowed. |+| name | [string](#string) | | The name of the database catalog to retrieve. Format: instances/{instance}/databases/{database}/catalog |-<a name="bytebase-v1-TaskRunLogEntry-SchemaDump"></a>+<a name="bytebase-v1-ObjectSchema"></a>-### TaskRunLogEntry.SchemaDump-Schema dump operation details.+### ObjectSchema+Schema definition for object-type columns.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| start_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | When the schema dump started. |-| end_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | When the schema dump ended. |-| error | [string](#string) | | Error message if the schema dump failed. |+| type | [ObjectSchema.Type](#bytebase-v1-ObjectSchema-Type) | | The data type of this object. |+| struct_kind | [ObjectSchema.StructKind](#bytebase-v1-ObjectSchema-StructKind) | | Struct schema. |+| array_kind | [ObjectSchema.ArrayKind](#bytebase-v1-ObjectSchema-ArrayKind) | | Array schema. |+| semantic_type | [string](#string) | | The semantic type of this object. |-<a name="bytebase-v1-TaskRunLogEntry-TransactionControl"></a>+<a name="bytebase-v1-ObjectSchema-ArrayKind"></a>-### TaskRunLogEntry.TransactionControl-Transaction control operation details.+### ObjectSchema.ArrayKind+Array type with element schema.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| type | [TaskRunLogEntry.TransactionControl.Type](#bytebase-v1-TaskRunLogEntry-TransactionControl-Type) | | The type of transaction control. |-| error | [string](#string) | | Error message if the operation failed. |-+| kind | [ObjectSchema](#bytebase-v1-ObjectSchema) | | The schema of array elements. |-<a name="bytebase-v1-TaskRunSession"></a>-### TaskRunSession+<a name="bytebase-v1-ObjectSchema-StructKind"></a>+### ObjectSchema.StructKind+Structure type with named properties.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun}/session |-| postgres | [TaskRunSession.Postgres](#bytebase-v1-TaskRunSession-Postgres) | | PostgreSQL session information. |+| properties | [ObjectSchema.StructKind.PropertiesEntry](#bytebase-v1-ObjectSchema-StructKind-PropertiesEntry) | repeated | Properties of the struct. |-<a name="bytebase-v1-TaskRunSession-Postgres"></a>+<a name="bytebase-v1-ObjectSchema-StructKind-PropertiesEntry"></a>++### ObjectSchema.StructKind.PropertiesEntry-### TaskRunSession.Postgres-PostgreSQL session information.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| session | [TaskRunSession.Postgres.Session](#bytebase-v1-TaskRunSession-Postgres-Session) | | `session` is the session of the task run executing commands. |-| blocking_sessions | [TaskRunSession.Postgres.Session](#bytebase-v1-TaskRunSession-Postgres-Session) | repeated | `blocking_sessions` block `session`. |-| blocked_sessions | [TaskRunSession.Postgres.Session](#bytebase-v1-TaskRunSession-Postgres-Session) | repeated | `blocked_sessions` are blocked by `session`. |+| key | [string](#string) | | |+| value | [ObjectSchema](#bytebase-v1-ObjectSchema) | | |-<a name="bytebase-v1-TaskRunSession-Postgres-Session"></a>+<a name="bytebase-v1-SchemaCatalog"></a>-### TaskRunSession.Postgres.Session-PostgreSQL session information read from `pg_stat_activity`.+### SchemaCatalog+Schema metadata within a database.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| pid | [string](#string) | | Process ID of the session. |-| blocked_by_pids | [string](#string) | repeated | PIDs of sessions blocking this session. |-| query | [string](#string) | | Current query being executed. |-| state | [string](#string) | optional | Session state (active, idle, etc.). |-| wait_event_type | [string](#string) | optional | Wait event type if session is waiting. |-| wait_event | [string](#string) | optional | Specific wait event if session is waiting. |-| datname | [string](#string) | optional | Database name. |-| usename | [string](#string) | optional | User name. |-| application_name | [string](#string) | | Application name. |-| client_addr | [string](#string) | optional | Client IP address. |-| client_port | [string](#string) | optional | Client port number. |-| backend_start | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | When the backend process started. |-| xact_start | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | optional | When the current transaction started. |-| query_start | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | optional | When the current query started. |-+| name | [string](#string) | | The schema name. |+| tables | [TableCatalog](#bytebase-v1-TableCatalog) | repeated | The tables in the schema. |--<a name="bytebase-v1-Task-Status"></a>+<a name="bytebase-v1-TableCatalog"></a>-### Task.Status+### TableCatalog+Table metadata within a schema.-| Name | Number | Description |-| ---- | ------ | ----------- |-| STATUS_UNSPECIFIED | 0 | Unspecified status. |-| NOT_STARTED | 1 | Task has not started and is awaiting its turn in the deployment sequence. |-| PENDING | 2 | Task is ready to run and waiting for approval or scheduled time. |-| RUNNING | 3 | Task is currently executing. |-| DONE | 4 | Task completed successfully. |-| FAILED | 5 | Task execution failed with errors. |-| CANCELED | 6 | Task execution was canceled by a user. |-| SKIPPED | 7 | Task was skipped and will not be executed. |+| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| name | [string](#string) | | The table name. |+| columns | [TableCatalog.Columns](#bytebase-v1-TableCatalog-Columns) | | Regular table columns. |+| object_schema | [ObjectSchema](#bytebase-v1-ObjectSchema) | | Object schema for JSON/XML columns. |+| classification | [string](#string) | | The data classification level for this table. |-<a name="bytebase-v1-Task-Type"></a>-### Task.Type-| Name | Number | Description |-| ---- | ------ | ----------- |-| TYPE_UNSPECIFIED | 0 | Unspecified task type. |-| GENERAL | 1 | General task for miscellaneous operations. |-| DATABASE_CREATE | 2 | Database creation task that creates a new database. Use payload DatabaseCreate. |-| DATABASE_MIGRATE | 3 | Database migration task that applies versioned schema changes. Use payload DatabaseUpdate. |-| DATABASE_EXPORT | 4 | Database export task that exports query results or table data. Use payload DatabaseDataExport. |+<a name="bytebase-v1-TableCatalog-Columns"></a>+### TableCatalog.Columns+Column list for regular tables.-<a name="bytebase-v1-TaskRun-ExportArchiveStatus"></a>+| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| columns | [ColumnCatalog](#bytebase-v1-ColumnCatalog) | repeated | The columns in the table. |-### TaskRun.ExportArchiveStatus-| Name | Number | Description |-| ---- | ------ | ----------- |-| EXPORT_ARCHIVE_STATUS_UNSPECIFIED | 0 | Unspecified export archive status. |-| READY | 1 | Export archive is ready for download. |-| EXPORTED | 2 | Export archive has been downloaded by the user. |-<a name="bytebase-v1-TaskRun-Status"></a>+<a name="bytebase-v1-UpdateDatabaseCatalogRequest"></a>-### TaskRun.Status+### UpdateDatabaseCatalogRequest+Request message for updating a database catalog.-| Name | Number | Description |-| ---- | ------ | ----------- |-| STATUS_UNSPECIFIED | 0 | Unspecified status. |-| PENDING | 1 | Task run is queued and waiting to start execution. |-| RUNNING | 2 | Task run is currently executing. |-| DONE | 3 | Task run completed successfully. |-| FAILED | 4 | Task run execution failed with errors. |-| CANCELED | 5 | Task run execution was canceled by a user. |-| AVAILABLE | 6 | Task run is ready for immediate execution. |+| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| catalog | [DatabaseCatalog](#bytebase-v1-DatabaseCatalog) | | The database catalog to update.+The catalog's `name` field is used to identify the database catalog to update. Format: instances/{instance}/databases/{database}/catalog |+| allow_missing | [bool](#bool) | | If set to true, and the database catalog is not found, a new database catalog will be created. In this situation, `update_mask` is ignored. |-<a name="bytebase-v1-TaskRunLogEntry-TransactionControl-Type"></a>-### TaskRunLogEntry.TransactionControl.Type-Transaction control type.-| Name | Number | Description |-| ---- | ------ | ----------- |-| TYPE_UNSPECIFIED | 0 | Unspecified type. |-| BEGIN | 1 | Begin transaction. |-| COMMIT | 2 | Commit transaction. |-| ROLLBACK | 3 | Rollback transaction. |+-<a name="bytebase-v1-TaskRunLogEntry-Type"></a>+<a name="bytebase-v1-ObjectSchema-Type"></a>-### TaskRunLogEntry.Type-The type of log entry.+### ObjectSchema.Type+Object schema data types.| Name | Number | Description || ---- | ------ | ----------- || TYPE_UNSPECIFIED | 0 | Unspecified type. |-| SCHEMA_DUMP | 1 | Schema dump operation. |-| COMMAND_EXECUTE | 2 | Command execution. |-| DATABASE_SYNC | 3 | Database synchronization. |-| TRANSACTION_CONTROL | 5 | Transaction control (BEGIN, COMMIT, ROLLBACK). |-| PRIOR_BACKUP | 6 | Prior backup operation. |-| RETRY_INFO | 7 | Retry information. |-| COMPUTE_DIFF | 8 | Schema diff computation. |-| RELEASE_FILE_EXECUTE | 9 | Release file execution. |-| GHOST_MIGRATION | 10 | gh-ost online migration. |+| STRING | 1 | String type. |+| NUMBER | 2 | Number type. |+| BOOLEAN | 3 | Boolean type. |+| OBJECT | 4 | Object/struct type. |+| ARRAY | 5 | Array type. |@@ -8191,1068 +8196,1066 @@ The type of log entry.-<a name="bytebase-v1-RolloutService"></a>+<a name="bytebase-v1-DatabaseCatalogService"></a>-### RolloutService-RolloutService manages the execution of deployment plans.+### DatabaseCatalogService+DatabaseCatalogService manages database schema metadata and classification.| Method Name | Request Type | Response Type | Description || ----------- | ------------ | ------------- | ------------|-| GetRollout | [GetRolloutRequest](#bytebase-v1-GetRolloutRequest) | [Rollout](#bytebase-v1-Rollout) | Retrieves a rollout by its plan name. Permissions required: bb.rollouts.get |-| ListRollouts | [ListRolloutsRequest](#bytebase-v1-ListRolloutsRequest) | [ListRolloutsResponse](#bytebase-v1-ListRolloutsResponse) | Lists rollouts in a project. Permissions required: bb.rollouts.list |-| CreateRollout | [CreateRolloutRequest](#bytebase-v1-CreateRolloutRequest) | [Rollout](#bytebase-v1-Rollout) | Creates a new rollout for a plan. Permissions required: bb.rollouts.create (or issue creator for data export issues) |-| ListTaskRuns | [ListTaskRunsRequest](#bytebase-v1-ListTaskRunsRequest) | [ListTaskRunsResponse](#bytebase-v1-ListTaskRunsResponse) | Lists task run executions for a task. Permissions required: bb.taskRuns.list |-| GetTaskRun | [GetTaskRunRequest](#bytebase-v1-GetTaskRunRequest) | [TaskRun](#bytebase-v1-TaskRun) | Retrieves a task run by name. Permissions required: bb.taskRuns.list |-| GetTaskRunLog | [GetTaskRunLogRequest](#bytebase-v1-GetTaskRunLogRequest) | [TaskRunLog](#bytebase-v1-TaskRunLog) | Retrieves execution logs for a task run. Permissions required: bb.taskRuns.list |-| GetTaskRunSession | [GetTaskRunSessionRequest](#bytebase-v1-GetTaskRunSessionRequest) | [TaskRunSession](#bytebase-v1-TaskRunSession) | Retrieves database session information for a running task. Permissions required: bb.taskRuns.list |-| BatchRunTasks | [BatchRunTasksRequest](#bytebase-v1-BatchRunTasksRequest) | [BatchRunTasksResponse](#bytebase-v1-BatchRunTasksResponse) | Executes multiple tasks in a rollout stage. Permissions required: bb.taskRuns.create (or issue creator for data export issues, or user with rollout policy role for the environment) |-| BatchSkipTasks | [BatchSkipTasksRequest](#bytebase-v1-BatchSkipTasksRequest) | [BatchSkipTasksResponse](#bytebase-v1-BatchSkipTasksResponse) | Skips multiple tasks in a rollout stage. Permissions required: bb.taskRuns.create (or issue creator for data export issues, or user with rollout policy role for the environment) |-| BatchCancelTaskRuns | [BatchCancelTaskRunsRequest](#bytebase-v1-BatchCancelTaskRunsRequest) | [BatchCancelTaskRunsResponse](#bytebase-v1-BatchCancelTaskRunsResponse) | Cancels multiple running task executions. Permissions required: bb.taskRuns.create (or issue creator for data export issues, or user with rollout policy role for the environment) |-| PreviewTaskRunRollback | [PreviewTaskRunRollbackRequest](#bytebase-v1-PreviewTaskRunRollbackRequest) | [PreviewTaskRunRollbackResponse](#bytebase-v1-PreviewTaskRunRollbackResponse) | Generates rollback SQL for a completed task run. Permissions required: bb.taskRuns.list |+| GetDatabaseCatalog | [GetDatabaseCatalogRequest](#bytebase-v1-GetDatabaseCatalogRequest) | [DatabaseCatalog](#bytebase-v1-DatabaseCatalog) | Gets the catalog metadata for a database. Permissions required: bb.databaseCatalogs.get |+| UpdateDatabaseCatalog | [UpdateDatabaseCatalogRequest](#bytebase-v1-UpdateDatabaseCatalogRequest) | [DatabaseCatalog](#bytebase-v1-DatabaseCatalog) | Updates catalog metadata such as classifications and labels. Permissions required: bb.databaseCatalogs.update |-<a name="v1_sql_service-proto"></a>+<a name="v1_database_group_service-proto"></a><p align="right"><a href="#top">Top</a></p>-## v1/sql_service.proto-+## v1/database_group_service.proto-<a name="bytebase-v1-AICompletionRequest"></a>-### AICompletionRequest+<a name="bytebase-v1-CreateDatabaseGroupRequest"></a>+### CreateDatabaseGroupRequest+Request message for creating a database group.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| messages | [AICompletionRequest.Message](#bytebase-v1-AICompletionRequest-Message) | repeated | |+| parent | [string](#string) | | The parent resource where this database group will be created. Format: projects/{project} |+| database_group | [DatabaseGroup](#bytebase-v1-DatabaseGroup) | | The database group to create. |+| database_group_id | [string](#string) | | The ID to use for the database group, which will become the final component of the database group's resource name.+This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/. |+| validate_only | [bool](#bool) | | If set, validate the create request and preview the full database group response, but do not actually create it. |-<a name="bytebase-v1-AICompletionRequest-Message"></a>-### AICompletionRequest.Message+<a name="bytebase-v1-DatabaseGroup"></a>+### DatabaseGroup+A group of databases matched by expressions.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| role | [string](#string) | | |-| content | [string](#string) | | |+| name | [string](#string) | | The name of the database group. Format: projects/{project}/databaseGroups/{databaseGroup} |+| title | [string](#string) | | The short name used in actual databases specified by users. |+| database_expr | [google.type.Expr](#google-type-Expr) | | The condition that is associated with this database group. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec++Support variables: resource.environment_id: the environment resource id. Support "==", "!=", "in [XX]", "!(in [xx])" operations. resource.instance_id: the instance resource id. Support "==", "!=", "in [XX]", "!(in [xx])", "contains", "matches", "startsWith", "endsWith" operations. resource.database_name: the database name. Support "==", "!=", "in [XX]", "!(in [xx])", "contains", "matches", "startsWith", "endsWith" operations. resource.database_labels: the database labels. Support map access operations. All variables should join with "&&" condition.+For example: resource.environment_id == "test" && resource.database_name.startsWith("sample_") resource.database_labels["tenant"] == "tenant1" |+| matched_databases | [DatabaseGroup.Database](#bytebase-v1-DatabaseGroup-Database) | repeated | The list of databases that match the database group condition. |-<a name="bytebase-v1-AICompletionResponse"></a>-### AICompletionResponse+<a name="bytebase-v1-DatabaseGroup-Database"></a>+### DatabaseGroup.Database+A database within a database group.| 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. |-+| name | [string](#string) | | The resource name of the database. Format: instances/{instance}/databases/{database} |-<a name="bytebase-v1-AICompletionResponse-Candidate"></a>-### AICompletionResponse.Candidate+<a name="bytebase-v1-DeleteDatabaseGroupRequest"></a>+### DeleteDatabaseGroupRequest+Request message for deleting a database group.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| content | [AICompletionResponse.Candidate.Content](#bytebase-v1-AICompletionResponse-Candidate-Content) | | |-+| name | [string](#string) | | The name of the database group to delete. Format: projects/{project}/databaseGroups/{databaseGroup} |-<a name="bytebase-v1-AICompletionResponse-Candidate-Content"></a>-### AICompletionResponse.Candidate.Content+<a name="bytebase-v1-GetDatabaseGroupRequest"></a>+### GetDatabaseGroupRequest+Request message for getting a database group.| 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. |-+| name | [string](#string) | | The name of the database group to retrieve. Format: projects/{project}/databaseGroups/{databaseGroup} |+| view | [DatabaseGroupView](#bytebase-v1-DatabaseGroupView) | | The view to return. Defaults to DATABASE_GROUP_VIEW_BASIC. |-<a name="bytebase-v1-AICompletionResponse-Candidate-Content-Part"></a>-### AICompletionResponse.Candidate.Content.Part+<a name="bytebase-v1-ListDatabaseGroupsRequest"></a>+### ListDatabaseGroupsRequest+Request message for listing database groups.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| text | [string](#string) | | |-+| parent | [string](#string) | | The parent resource whose database groups are to be listed. Format: projects/{project} |+| view | [DatabaseGroupView](#bytebase-v1-DatabaseGroupView) | | The view to return. Defaults to DATABASE_GROUP_VIEW_BASIC. |-<a name="bytebase-v1-AdminExecuteRequest"></a>-### AdminExecuteRequest+<a name="bytebase-v1-ListDatabaseGroupsResponse"></a>+### ListDatabaseGroupsResponse+Response message for listing database groups.| 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. |-+| database_groups | [DatabaseGroup](#bytebase-v1-DatabaseGroup) | repeated | The database groups from the specified request. |-<a name="bytebase-v1-AdminExecuteResponse"></a>-### AdminExecuteResponse+<a name="bytebase-v1-UpdateDatabaseGroupRequest"></a>+### UpdateDatabaseGroupRequest+Request message for updating a database group.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| results | [QueryResult](#bytebase-v1-QueryResult) | repeated | The query results. |+| database_group | [DatabaseGroup](#bytebase-v1-DatabaseGroup) | | The database group to update.+The database group's `name` field is used to identify the database group to update. Format: projects/{project}/databaseGroups/{databaseGroup} |+| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | The list of fields to update. |+| allow_missing | [bool](#bool) | | If set to true, and the database group is not found, a new database group will be created. In this situation, `update_mask` is ignored. |-<a name="bytebase-v1-Advice"></a>+-### Advice+<a name="bytebase-v1-DatabaseGroupView"></a>+### DatabaseGroupView+View options for database group responses.-| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| 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) | | |-| rule_type | [Advice.RuleType](#bytebase-v1-Advice-RuleType) | | The type of linting rule that generated this advice. |+| Name | Number | Description |+| ---- | ------ | ----------- |+| DATABASE_GROUP_VIEW_UNSPECIFIED | 0 | The default / unset value. The API will default to the BASIC view. |+| DATABASE_GROUP_VIEW_BASIC | 1 | Include basic information about the database group, but exclude the list of matched databases and unmatched databases. |+| DATABASE_GROUP_VIEW_FULL | 2 | Include everything. |++++++++<a name="bytebase-v1-DatabaseGroupService"></a>++### DatabaseGroupService+DatabaseGroupService manages database groups for organizing databases by criteria.++| Method Name | Request Type | Response Type | Description |+| ----------- | ------------ | ------------- | ------------|+| ListDatabaseGroups | [ListDatabaseGroupsRequest](#bytebase-v1-ListDatabaseGroupsRequest) | [ListDatabaseGroupsResponse](#bytebase-v1-ListDatabaseGroupsResponse) | Lists database groups in a project. Permissions required: bb.databaseGroups.list |+| GetDatabaseGroup | [GetDatabaseGroupRequest](#bytebase-v1-GetDatabaseGroupRequest) | [DatabaseGroup](#bytebase-v1-DatabaseGroup) | Gets a database group by name. Permissions required: bb.databaseGroups.get |+| CreateDatabaseGroup | [CreateDatabaseGroupRequest](#bytebase-v1-CreateDatabaseGroupRequest) | [DatabaseGroup](#bytebase-v1-DatabaseGroup) | Creates a new database group. Permissions required: bb.databaseGroups.create |+| UpdateDatabaseGroup | [UpdateDatabaseGroupRequest](#bytebase-v1-UpdateDatabaseGroupRequest) | [DatabaseGroup](#bytebase-v1-DatabaseGroup) | Updates a database group. Permissions required: bb.databaseGroups.update When allow_missing=true, also requires: bb.databaseGroups.create |+| DeleteDatabaseGroup | [DeleteDatabaseGroupRequest](#bytebase-v1-DeleteDatabaseGroupRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | Deletes a database group. Permissions required: bb.databaseGroups.delete |+++<a name="v1_group_service-proto"></a>+<p align="right"><a href="#top">Top</a></p>+## v1/group_service.proto-<a name="bytebase-v1-DiffMetadataRequest"></a>-### DiffMetadataRequest+<a name="bytebase-v1-BatchGetGroupsRequest"></a>+### BatchGetGroupsRequest+Request message for batch getting groups.| 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. |-| engine | [Engine](#bytebase-v1-Engine) | | The database engine of the schema. |-+| names | [string](#string) | repeated | The group names to retrieve. Format: groups/{email} |-<a name="bytebase-v1-DiffMetadataResponse"></a>-### DiffMetadataResponse+<a name="bytebase-v1-BatchGetGroupsResponse"></a>+### BatchGetGroupsResponse+Response message for batch getting groups.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| diff | [string](#string) | | The diff of the metadata. |-+| groups | [Group](#bytebase-v1-Group) | repeated | The groups from the specified request. |-<a name="bytebase-v1-ExportRequest"></a>-### ExportRequest+<a name="bytebase-v1-CreateGroupRequest"></a>+### CreateGroupRequest+Request message for creating a group.| 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}/plans/{plan}/rollout Format: projects/{project}/plans/{plan}/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. If omitted, Export resolves the data source server-side by using the single read-only data source when exactly one exists, or the admin data source otherwise. It can also be set explicitly to export from the admin data source or 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. |-+| group | [Group](#bytebase-v1-Group) | | The group to create. |+| group_email | [string](#string) | | The email to use for the group, which will become the final component of the group's resource name. |-<a name="bytebase-v1-ExportResponse"></a>-### ExportResponse+<a name="bytebase-v1-DeleteGroupRequest"></a>+### DeleteGroupRequest+Request message for deleting a group.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| content | [bytes](#bytes) | | The export file content. |-+| name | [string](#string) | | The name of the group to delete. Format: groups/{email} |-<a name="bytebase-v1-MaskingReason"></a>-### MaskingReason+<a name="bytebase-v1-GetGroupRequest"></a>+### GetGroupRequest+Request message for getting a group.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| semantic_type_id | [string](#string) | | The semantic type that triggered masking (e.g., "SSN", "email", "phone"). |-| 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., "Matched global rule: PII Protection"). |-| classification_level | [int32](#int32) | | The classification level that triggered masking. |-| semantic_type_icon | [string](#string) | | Icon associated with the semantic type (if any). |-+| name | [string](#string) | | The name of the group to retrieve. Format: groups/{email} |-<a name="bytebase-v1-QueryHistory"></a>-### QueryHistory+<a name="bytebase-v1-Group"></a>+### Group+A group of users within the workspace.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The name for the query history. Format: projects/{project}/queryHistories/{id} |-| 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) | | |-+| name | [string](#string) | | The name of the group to retrieve. Format: groups/{group}, the group should be email or uuid. |+| title | [string](#string) | | The display title of the group. |+| description | [string](#string) | | The description of the group. |+| members | [GroupMember](#bytebase-v1-GroupMember) | repeated | The members of the group. |+| source | [string](#string) | | The source system where the group originated (e.g., Entra ID for SCIM sync). |+| email | [string](#string) | | The unique email for the group. |-<a name="bytebase-v1-QueryOption"></a>-### QueryOption+<a name="bytebase-v1-GroupMember"></a>+### GroupMember+A member of a group with a role.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| redis_run_commands_on | [QueryOption.RedisRunCommandsOn](#bytebase-v1-QueryOption-RedisRunCommandsOn) | | |-| mssql_explain_format | [QueryOption.MSSQLExplainFormat](#bytebase-v1-QueryOption-MSSQLExplainFormat) | | |+| member | [string](#string) | | Member is the principal who belong to this group.+Format: users/[email protected] |+| role | [GroupMember.Role](#bytebase-v1-GroupMember-Role) | | The member's role in the group. |-<a name="bytebase-v1-QueryRequest"></a>-### QueryRequest+<a name="bytebase-v1-ListGroupsRequest"></a>+### ListGroupsRequest+Request message for listing groups.| 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. If omitted, Query resolves the data source server-side by using the single read-only data source when exactly one exists, or the admin data source otherwise. It can also be set explicitly to query the admin data source or 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. |+| page_size | [int32](#int32) | | The maximum number of groups to return. The service may return fewer than this value. If unspecified, at most 10 groups 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 `ListGroups` call. Provide this to retrieve the subsequent page.++When paginating, all other parameters provided to `ListGroups` must match the call that provided the page token. |+| filter | [string](#string) | | Filter is used to filter groups returned in the list. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec+Supported filter: - title: the group title, support "==" and ".contains()" operator. - email: the group email, support "==" and ".contains()" operator. - project: the project full name in "projects/{id}" format, support "==" operator.+For example: title == "dba" email == "[email protected]" title.contains("dba") email.contains("dba") project == "projects/sample-project" You can combine filter conditions like: title.contains("dba") || email.contains("dba") |-<a name="bytebase-v1-QueryResponse"></a>-### QueryResponse+<a name="bytebase-v1-ListGroupsResponse"></a>++### ListGroupsResponse+Response message for listing groups.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| results | [QueryResult](#bytebase-v1-QueryResult) | repeated | The query results. |-+| groups | [Group](#bytebase-v1-Group) | repeated | The groups 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-QueryResult"></a>-### QueryResult+<a name="bytebase-v1-UpdateGroupRequest"></a>+### UpdateGroupRequest+Request message for updating a group.| 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) | | |-| syntax_error | [QueryResult.SyntaxError](#bytebase-v1-QueryResult-SyntaxError) | | |-| permission_denied | [PermissionDeniedDetail](#bytebase-v1-PermissionDeniedDetail) | | |-| command_error | [QueryResult.CommandError](#bytebase-v1-QueryResult-CommandError) | | |-| messages | [QueryResult.Message](#bytebase-v1-QueryResult-Message) | repeated | Informational or debug messages returned by the database engine during query execution. Examples include PostgreSQL's RAISE NOTICE, MSSQL's PRINT, or Oracle's DBMS_OUTPUT.PUT_LINE. |-| masked | [MaskingReason](#bytebase-v1-MaskingReason) | repeated | Masking reasons for each column (empty for non-masked columns). |+| group | [Group](#bytebase-v1-Group) | | The group to update.+The group's `name` field is used to identify the group to update. Format: groups/{email} |+| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | The list of fields to update. |+| allow_missing | [bool](#bool) | | If set to true, and the group is not found, a new group will be created. In this situation, `update_mask` is ignored. |-<a name="bytebase-v1-QueryResult-CommandError"></a>+-### QueryResult.CommandError-Permission denied with resource information or disallowed command_type.-Either resources or command_type is available.+<a name="bytebase-v1-GroupMember-Role"></a>-| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| command_type | [QueryResult.CommandError.Type](#bytebase-v1-QueryResult-CommandError-Type) | | Disallowed command_type. |+### GroupMember.Role+The role of a group member.+| Name | Number | Description |+| ---- | ------ | ----------- |+| ROLE_UNSPECIFIED | 0 | Unspecified role. |+| OWNER | 1 | Group owner. |+| MEMBER | 2 | Group member. |++-<a name="bytebase-v1-QueryResult-Message"></a>+<a name="bytebase-v1-GroupService"></a>-### QueryResult.Message+### GroupService+GroupService manages user groups for organizing users and permissions.+| Method Name | Request Type | Response Type | Description |+| ----------- | ------------ | ------------- | ------------|+| GetGroup | [GetGroupRequest](#bytebase-v1-GetGroupRequest) | [Group](#bytebase-v1-Group) | Gets a group by name. Group members or users with bb.groups.get permission can get the group. Permissions required: bb.groups.get OR caller is the group member |+| BatchGetGroups | [BatchGetGroupsRequest](#bytebase-v1-BatchGetGroupsRequest) | [BatchGetGroupsResponse](#bytebase-v1-BatchGetGroupsResponse) | Gets multiple groups in a single request. Group members or users with bb.groups.get permission can get the group. Permissions required: bb.groups.get OR caller is the group member |+| ListGroups | [ListGroupsRequest](#bytebase-v1-ListGroupsRequest) | [ListGroupsResponse](#bytebase-v1-ListGroupsResponse) | Lists all groups in the workspace. Permissions required: bb.groups.list |+| CreateGroup | [CreateGroupRequest](#bytebase-v1-CreateGroupRequest) | [Group](#bytebase-v1-Group) | Creates a new group. Permissions required: bb.groups.create |+| UpdateGroup | [UpdateGroupRequest](#bytebase-v1-UpdateGroupRequest) | [Group](#bytebase-v1-Group) | Updates a group. Group owners or users with bb.groups.update permission can update. Permissions required: bb.groups.update OR caller is group owner When allow_missing=true, also requires: bb.groups.create |+| DeleteGroup | [DeleteGroupRequest](#bytebase-v1-DeleteGroupRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | Deletes a group. Group owners or users with bb.groups.delete permission can delete. Permissions required: bb.groups.delete OR caller is group owner |+-| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| level | [QueryResult.Message.Level](#bytebase-v1-QueryResult-Message-Level) | | |-| content | [string](#string) | | |+<a name="v1_idp_service-proto"></a>+<p align="right"><a href="#top">Top</a></p>+## v1/idp_service.proto-<a name="bytebase-v1-QueryResult-PostgresError"></a>+<a name="bytebase-v1-CreateIdentityProviderRequest"></a>++### CreateIdentityProviderRequest-### 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) | | |+| identity_provider | [IdentityProvider](#bytebase-v1-IdentityProvider) | | The identity provider to create. |+| identity_provider_id | [string](#string) | | The ID to use for the identity provider, which will become the final component of the identity provider's resource name.+This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/. |+| validate_only | [bool](#bool) | | If set to true, the request will be validated without actually creating the identity provider. |-<a name="bytebase-v1-QueryResult-SyntaxError"></a>-### QueryResult.SyntaxError-Syntax error with position information for editor highlighting+<a name="bytebase-v1-DeleteIdentityProviderRequest"></a>++### DeleteIdentityProviderRequest+| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| start_position | [Position](#bytebase-v1-Position) | | Position information for highlighting in editor |-+| name | [string](#string) | | The name of the identity provider to delete. Format: idps/{identity_provider} |-<a name="bytebase-v1-QueryRow"></a>-### QueryRow+<a name="bytebase-v1-FieldMapping"></a>+### FieldMapping+FieldMapping saves the field names from user info API of identity provider.+As we save all raw json string of user info response data into `principal.idp_user_info`,+we can extract the relevant data based with `FieldMapping`.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| values | [RowValue](#bytebase-v1-RowValue) | repeated | Row values of the query result. |-+| identifier | [string](#string) | | Identifier is the field name of the unique identifier in 3rd-party idp user info. Required. |+| display_name | [string](#string) | | DisplayName is the field name of display name in 3rd-party idp user info. Optional. |+| phone | [string](#string) | | Phone is the field name of primary phone in 3rd-party idp user info. Optional. |+| groups | [string](#string) | | Groups is the field name of groups in 3rd-party idp user info. Optional. Mainly used for OIDC: https://developer.okta.com/docs/guides/customize-tokens-groups-claim/main/ |-<a name="bytebase-v1-RowValue"></a>-### RowValue+<a name="bytebase-v1-GetIdentityProviderRequest"></a>+### GetIdentityProviderRequest-| 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. |+| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| name | [string](#string) | | The name of the identity provider to retrieve. Format: idps/{idp} |-<a name="bytebase-v1-RowValue-Timestamp"></a>-### RowValue.Timestamp+<a name="bytebase-v1-IdentityProvider"></a>++### IdentityProvider| 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. |+| name | [string](#string) | | The name of the identity provider. Format: idps/{idp} |+| title | [string](#string) | | The display title of the identity provider. |+| domain | [string](#string) | | The domain for email matching when using this identity provider. |+| type | [IdentityProviderType](#bytebase-v1-IdentityProviderType) | | The type of identity provider protocol. |+| config | [IdentityProviderConfig](#bytebase-v1-IdentityProviderConfig) | | The configuration details for the identity provider. |-<a name="bytebase-v1-RowValue-TimestampTZ"></a>+<a name="bytebase-v1-IdentityProviderConfig"></a>-### RowValue.TimestampTZ+### IdentityProviderConfig| 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 "PDT", "PST". 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) | | |-+| oauth2_config | [OAuth2IdentityProviderConfig](#bytebase-v1-OAuth2IdentityProviderConfig) | | OAuth2 protocol configuration. |+| oidc_config | [OIDCIdentityProviderConfig](#bytebase-v1-OIDCIdentityProviderConfig) | | OIDC protocol configuration. |+| ldap_config | [LDAPIdentityProviderConfig](#bytebase-v1-LDAPIdentityProviderConfig) | | LDAP protocol configuration. |-<a name="bytebase-v1-SearchQueryHistoriesRequest"></a>-### SearchQueryHistoriesRequest+<a name="bytebase-v1-LDAPIdentityProviderConfig"></a>+### LDAPIdentityProviderConfig+LDAPIdentityProviderConfig is the structure for LDAP identity provider config.| 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 "projects/{id}" format, support "==" operator. - database: the database full name in "instances/{id}/databases/{name}" format, support "==" operator. - instance: the instance full name in "instances/{id}" format, support "==" operator. - type: the type, should be "QUERY" or "EXPORT", support "==" operator. - statement: the SQL statement, support ".contains()" operator.--For example: project == "projects/{project}" database == "instances/{instance}/databases/{database}" instance == "instances/{instance}" type == "QUERY" type == "EXPORT" statement.contains("select") type == "QUERY" && statement.contains("select") |+| host | [string](#string) | | Host is the hostname or IP address of the LDAP server, e.g., "ldap.example.com". |+| port | [int32](#int32) | | Port is the port number of the LDAP server, e.g., 389. When not set, the default port of the corresponding security protocol will be used, i.e. 389 for StartTLS and 636 for LDAPS. |+| skip_tls_verify | [bool](#bool) | | SkipTLSVerify controls whether to skip TLS certificate verification. |+| bind_dn | [string](#string) | | BindDN is the DN of the user to bind as a service account to perform search requests. |+| bind_password | [string](#string) | | BindPassword is the password of the user to bind as a service account. |+| base_dn | [string](#string) | | BaseDN is the base DN to search for users, e.g., "ou=users,dc=example,dc=com". |+| user_filter | [string](#string) | | UserFilter is the filter to search for users, e.g., "(uid=%s)". |+| security_protocol | [LDAPIdentityProviderConfig.SecurityProtocol](#bytebase-v1-LDAPIdentityProviderConfig-SecurityProtocol) | | SecurityProtocol is the security protocol to be used for establishing connections with the LDAP server. |+| field_mapping | [FieldMapping](#bytebase-v1-FieldMapping) | | FieldMapping is the mapping of the user attributes returned by the LDAP server. |-<a name="bytebase-v1-SearchQueryHistoriesResponse"></a>+<a name="bytebase-v1-ListIdentityProvidersRequest"></a>-### SearchQueryHistoriesResponse+### ListIdentityProvidersRequest| 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. |+| parent | [string](#string) | | The parent workspace whose identity providers should be listed. Format: workspaces/{workspace} When unset, the workspace is resolved from the request context. |-+<a name="bytebase-v1-ListIdentityProvidersResponse"></a>-<a name="bytebase-v1-Advice-Level"></a>+### ListIdentityProvidersResponse-### 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 |+| ----- | ---- | ----- | ----------- |+| identity_providers | [IdentityProvider](#bytebase-v1-IdentityProvider) | repeated | The identity providers from the specified request. |-<a name="bytebase-v1-Advice-RuleType"></a>-### Advice.RuleType-RuleType indicates the source of the linting rule.-| Name | Number | Description |-| ---- | ------ | ----------- |-| RULE_TYPE_UNSPECIFIED | 0 | Unspecified rule type. |-| PARSER_BASED | 1 | Parser-based rule enforced by the built-in SQL parser. These are non-configurable, mandatory checks for schema health. |-| AI_POWERED | 2 | AI-powered rule defined by user in natural language. These are custom, flexible checks powered by AI models. |+<a name="bytebase-v1-OAuth2IdentityProviderConfig"></a>-<a name="bytebase-v1-QueryHistory-Type"></a>+### OAuth2IdentityProviderConfig+OAuth2IdentityProviderConfig is the structure for OAuth2 identity provider config.-### QueryHistory.Type+| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| auth_url | [string](#string) | | The authorization endpoint URL for OAuth2 flow. |+| token_url | [string](#string) | | The token endpoint URL for exchanging authorization code. |+| user_info_url | [string](#string) | | The user information endpoint URL. |+| client_id | [string](#string) | | The OAuth2 client identifier. |+| client_secret | [string](#string) | | The OAuth2 client secret for authentication. |+| scopes | [string](#string) | repeated | The list of OAuth2 scopes to request. |+| field_mapping | [FieldMapping](#bytebase-v1-FieldMapping) | | Mapping configuration for user attributes from OAuth2 response. |+| skip_tls_verify | [bool](#bool) | | Whether to skip TLS certificate verification. |+| auth_style | [OAuth2AuthStyle](#bytebase-v1-OAuth2AuthStyle) | | The authentication style for client credentials. |-| 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-MSSQLExplainFormat"></a>-### QueryOption.MSSQLExplainFormat+<a name="bytebase-v1-OAuth2IdentityProviderTestRequestContext"></a>-| Name | Number | Description |-| ---- | ------ | ----------- |-| MSSQL_EXPLAIN_FORMAT_UNSPECIFIED | 0 | defaults to SHOWPLAN_ALL |-| MSSQL_EXPLAIN_FORMAT_ALL | 1 | SHOWPLAN_ALL |-| MSSQL_EXPLAIN_FORMAT_XML | 2 | SHOWPLAN_XML |+### OAuth2IdentityProviderTestRequestContext-<a name="bytebase-v1-QueryOption-RedisRunCommandsOn"></a>+| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| code | [string](#string) | | Authorize code from website. |-### QueryOption.RedisRunCommandsOn-| 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. |-<a name="bytebase-v1-QueryResult-CommandError-Type"></a>+<a name="bytebase-v1-OIDCIdentityProviderConfig"></a>-### QueryResult.CommandError.Type+### OIDCIdentityProviderConfig+OIDCIdentityProviderConfig is the structure for OIDC identity provider config.-| Name | Number | Description |-| ---- | ------ | ----------- |-| TYPE_UNSPECIFIED | 0 | |-| DDL | 1 | |-| DML | 2 | |-| NON_READ_ONLY | 3 | |+| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| issuer | [string](#string) | | The OIDC issuer URL for the identity provider. |+| client_id | [string](#string) | | The OIDC client identifier. |+| client_secret | [string](#string) | | The OIDC client secret for authentication. |+| scopes | [string](#string) | repeated | The scopes that the OIDC provider supports. Should be fetched from the well-known configuration file of the OIDC provider. |+| field_mapping | [FieldMapping](#bytebase-v1-FieldMapping) | | Mapping configuration for user attributes from OIDC claims. |+| skip_tls_verify | [bool](#bool) | | Whether to skip TLS certificate verification. |+| auth_style | [OAuth2AuthStyle](#bytebase-v1-OAuth2AuthStyle) | | The authentication style for client credentials. |+| auth_endpoint | [string](#string) | | The authorization endpoint of the OIDC provider. Should be fetched from the well-known configuration file of the OIDC provider. |-<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-OIDCIdentityProviderTestRequestContext"></a>+### OIDCIdentityProviderTestRequestContext--+| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| code | [string](#string) | | Authorize code from OIDC provider. |-<a name="bytebase-v1-SQLService"></a>-### 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'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 |-| 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="bytebase-v1-TestIdentityProviderRequest"></a>-<a name="v1_plan_service-proto"></a>-<p align="right"><a href="#top">Top</a></p>+### TestIdentityProviderRequest++++| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| identity_provider | [IdentityProvider](#bytebase-v1-IdentityProvider) | | The identity provider to test connection including uncreated. |+| oauth2_context | [OAuth2IdentityProviderTestRequestContext](#bytebase-v1-OAuth2IdentityProviderTestRequestContext) | | |+| oidc_context | [OIDCIdentityProviderTestRequestContext](#bytebase-v1-OIDCIdentityProviderTestRequestContext) | | OIDC authentication context for test connection. |-## v1/plan_service.proto-<a name="bytebase-v1-CancelPlanCheckRunRequest"></a>-### CancelPlanCheckRunRequest++<a name="bytebase-v1-TestIdentityProviderResponse"></a>++### TestIdentityProviderResponse| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The name of the plan check run to cancel. Format: projects/{project}/plans/{plan}/planCheckRun |+| claims | [TestIdentityProviderResponse.ClaimsEntry](#bytebase-v1-TestIdentityProviderResponse-ClaimsEntry) | repeated | The map of claims returned by the identity provider. |+| user_info | [TestIdentityProviderResponse.UserInfoEntry](#bytebase-v1-TestIdentityProviderResponse-UserInfoEntry) | repeated | The matched user info from the claims. |-<a name="bytebase-v1-CancelPlanCheckRunResponse"></a>+<a name="bytebase-v1-TestIdentityProviderResponse-ClaimsEntry"></a>-### CancelPlanCheckRunResponse+### TestIdentityProviderResponse.ClaimsEntry+| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| key | [string](#string) | | |+| value | [string](#string) | | |-<a name="bytebase-v1-CreatePlanRequest"></a>-### CreatePlanRequest++<a name="bytebase-v1-TestIdentityProviderResponse-UserInfoEntry"></a>++### TestIdentityProviderResponse.UserInfoEntry| 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. |+| key | [string](#string) | | |+| value | [string](#string) | | |-<a name="bytebase-v1-GetPlanCheckRunRequest"></a>+<a name="bytebase-v1-UpdateIdentityProviderRequest"></a>-### GetPlanCheckRunRequest+### UpdateIdentityProviderRequest| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The name of the plan check run to retrieve. Format: projects/{project}/plans/{plan}/planCheckRun |-+| identity_provider | [IdentityProvider](#bytebase-v1-IdentityProvider) | | The identity provider to update.+The identity provider's `name` field is used to identify the identity provider to update. Format: idps/{identity_provider} |+| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | The list of fields to update. |+| allow_missing | [bool](#bool) | | If set to true, and the identity provider is not found, a new identity provider will be created. In this situation, `update_mask` is ignored. |-<a name="bytebase-v1-GetPlanRequest"></a>-### GetPlanRequest++<a name="bytebase-v1-IdentityProviderType"></a>-| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The name of the plan to retrieve. Format: projects/{project}/plans/{plan} |+### IdentityProviderType+| Name | Number | Description |+| ---- | ------ | ----------- |+| IDENTITY_PROVIDER_TYPE_UNSPECIFIED | 0 | Unspecified identity provider type. |+| OAUTH2 | 1 | OAuth 2.0 authentication protocol. |+| OIDC | 2 | OpenID Connect authentication protocol. |+| LDAP | 3 | LDAP directory service authentication. |+<a name="bytebase-v1-LDAPIdentityProviderConfig-SecurityProtocol"></a>-<a name="bytebase-v1-ListPlansRequest"></a>+### LDAPIdentityProviderConfig.SecurityProtocol-### ListPlansRequest+| Name | Number | Description |+| ---- | ------ | ----------- |+| SECURITY_PROTOCOL_UNSPECIFIED | 0 | |+| START_TLS | 1 | StartTLS is the security protocol that starts with an unencrypted connection and then upgrades to TLS. |+| LDAPS | 2 | LDAPS is the security protocol that uses TLS from the beginning. |-| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| parent | [string](#string) | | The parent, which owns this collection of plans. Format: projects/{project} Use "projects/-" 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. |-| 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+<a name="bytebase-v1-OAuth2AuthStyle"></a>-Supported filters: - creator: the plan creator full name in "users/{email or id}" format, support "==" operator. - create_time: the plan create time in "2006-01-02T15:04:05Z07:00" format, support ">=" or "<=" operator. - has_rollout: whether the plan has rollout, support "==" operator, the value should be "true" or "false". - has_issue: the plan has issue or not, support "==" operator, the value should be "true" or "false". - title: the plan title, support "==" operator for exact match and ".contains()" operator for case-insensitive substring match. - spec_type: the plan spec config type, support "==" operator, the value should be "create_database_config", "change_database_config", or "export_data_config". - state: the plan state, support "==" operator, the value should be "ACTIVE" or "DELETED".+### OAuth2AuthStyle-For example: creator == "users/[email protected]" && create_time >= "2025-01-02T15:04:05Z07:00" has_rollout == false && has_issue == true title == "My Plan" title.contains("database migration") spec_type == "change_database_config" state == "ACTIVE" |+| Name | Number | Description |+| ---- | ------ | ----------- |+| OAUTH2_AUTH_STYLE_UNSPECIFIED | 0 | |+| IN_PARAMS | 1 | IN_PARAMS sends the "client_id" and "client_secret" in the POST body as application/x-www-form-urlencoded parameters. |+| IN_HEADER | 2 | IN_HEADER sends the client_id and client_password using HTTP Basic Authorization. This is an optional style described in the OAuth2 RFC 6749 section 2.3.1. |++-<a name="bytebase-v1-ListPlansResponse"></a>+<a name="bytebase-v1-IdentityProviderService"></a>-### ListPlansResponse+### IdentityProviderService+IdentityProviderService manages external identity providers for SSO authentication.+| Method Name | Request Type | Response Type | Description |+| ----------- | ------------ | ------------- | ------------|+| GetIdentityProvider | [GetIdentityProviderRequest](#bytebase-v1-GetIdentityProviderRequest) | [IdentityProvider](#bytebase-v1-IdentityProvider) | Gets an identity provider by name. Permissions required: bb.identityProviders.get |+| ListIdentityProviders | [ListIdentityProvidersRequest](#bytebase-v1-ListIdentityProvidersRequest) | [ListIdentityProvidersResponse](#bytebase-v1-ListIdentityProvidersResponse) | Lists all configured identity providers (public endpoint for login page). Permissions required: None |+| CreateIdentityProvider | [CreateIdentityProviderRequest](#bytebase-v1-CreateIdentityProviderRequest) | [IdentityProvider](#bytebase-v1-IdentityProvider) | Creates a new identity provider. Permissions required: bb.identityProviders.create |+| UpdateIdentityProvider | [UpdateIdentityProviderRequest](#bytebase-v1-UpdateIdentityProviderRequest) | [IdentityProvider](#bytebase-v1-IdentityProvider) | Updates an identity provider. Permissions required: bb.identityProviders.update When allow_missing=true, also requires: bb.identityProviders.create |+| DeleteIdentityProvider | [DeleteIdentityProviderRequest](#bytebase-v1-DeleteIdentityProviderRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | Deletes an identity provider. Permissions required: bb.identityProviders.delete |+| TestIdentityProvider | [TestIdentityProviderRequest](#bytebase-v1-TestIdentityProviderRequest) | [TestIdentityProviderResponse](#bytebase-v1-TestIdentityProviderResponse) | Tests the connection and configuration of an identity provider. Permissions required: bb.identityProviders.update |+-| 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. |+<a name="v1_org_policy_service-proto"></a>+<p align="right"><a href="#top">Top</a></p>+## v1/org_policy_service.proto-<a name="bytebase-v1-Plan"></a>+<a name="bytebase-v1-CreatePolicyRequest"></a>-### Plan+### CreatePolicyRequest| 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} |-| 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 |-| has_rollout | [bool](#bool) | | Whether the plan has started the rollout. |-| approval_status | [Issue.ApprovalStatus](#bytebase-v1-Issue-ApprovalStatus) | | The approval status of the linked issue. Unspecified when no linked issue exists. |-| rollout_stage_summaries | [Plan.RolloutStageSummary](#bytebase-v1-Plan-RolloutStageSummary) | repeated | Per-stage rollout status summary. Ordered by environment deployment order. Empty when no rollout exists. |+| parent | [string](#string) | | The parent resource where this instance will be created. Workspace resource name: workspaces/{workspace-id}. Environment resource name: environments/environment-id. Instance resource name: instances/instance-id. Database resource name: instances/instance-id/databases/database-name. |+| policy | [Policy](#bytebase-v1-Policy) | | The policy to create. |+| type | [PolicyType](#bytebase-v1-PolicyType) | | The type of policy to create. |-<a name="bytebase-v1-Plan-ChangeDatabaseConfig"></a>+<a name="bytebase-v1-DeletePolicyRequest"></a>-### Plan.ChangeDatabaseConfig+### DeletePolicyRequest| 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} |-| 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 policy's `name` field is used to identify the instance to update. Format: {resource name}/policies/{policy type} Workspace resource name: workspaces/{workspace-id}. Environment resource name: environments/environment-id. Instance resource name: instances/instance-id. Database resource name: instances/instance-id/databases/database-name. |-<a name="bytebase-v1-Plan-CreateDatabaseConfig"></a>+<a name="bytebase-v1-GetPolicyRequest"></a>-### Plan.CreateDatabaseConfig+### GetPolicyRequest| 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 "ON CLUSTER <<cluster>>". |-| owner | [string](#string) | | owner is the owner of the database. This is only applicable to Postgres for "WITH OWNER <<owner>>". |-| environment | [string](#string) | | The environment resource. Format: environments/prod where prod is the environment resource ID. |+| name | [string](#string) | | The name of the policy to retrieve. Format: {resource type}/{resource id}/policies/{policy type} |-<a name="bytebase-v1-Plan-ExportDataConfig"></a>+<a name="bytebase-v1-ListPoliciesRequest"></a>-### Plan.ExportDataConfig+### ListPoliciesRequest| 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. |+| parent | [string](#string) | | The parent, which owns this collection of policies. Format: {resource type}/{resource id} |+| policy_type | [PolicyType](#bytebase-v1-PolicyType) | optional | Filter by specific policy type. |+| show_deleted | [bool](#bool) | | Show deleted policies if specified. |-<a name="bytebase-v1-Plan-PlanCheckRunStatusCountEntry"></a>+<a name="bytebase-v1-ListPoliciesResponse"></a>-### Plan.PlanCheckRunStatusCountEntry+### ListPoliciesResponse| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| key | [string](#string) | | |-| value | [int32](#int32) | | |-+| policies | [Policy](#bytebase-v1-Policy) | repeated | The policies from the specified request. |-<a name="bytebase-v1-Plan-RolloutStageSummary"></a>-### Plan.RolloutStageSummary+<a name="bytebase-v1-MaskingExemptionPolicy"></a>+### MaskingExemptionPolicy+MaskingExemptionPolicy is the allowlist of users who can access sensitive data.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| stage | [string](#string) | | The stage resource name. Format: projects/{project}/plans/{plan}/rollout/stages/{stage} |-| task_status_counts | [Plan.TaskStatusCount](#bytebase-v1-Plan-TaskStatusCount) | repeated | Task status counts for this stage. |+| exemptions | [MaskingExemptionPolicy.Exemption](#bytebase-v1-MaskingExemptionPolicy-Exemption) | repeated | |-<a name="bytebase-v1-Plan-Spec"></a>+<a name="bytebase-v1-MaskingExemptionPolicy-Exemption"></a>-### Plan.Spec+### MaskingExemptionPolicy.Exemption| 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) | | |+| members | [string](#string) | repeated | Specifies the principals who are exempt from masking. For users, the member should be: user:{email} For groups, the member should be: group:{email} For service accounts, the member should be: serviceAccount:{email} For workload identities, the member should be: workloadIdentity:{email} |+| condition | [google.type.Expr](#google-type-Expr) | | The condition that is associated with this exception policy instance. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec If the condition is empty, means the user can access all databases without expiration.++Support variables: resource.instance_id: the instance resource id. Only support "==" operation. resource.database_name: the database name. Only support "==" operation. resource.schema_name: the schema name. Only support "==" operation. resource.table_name: the table name. Only support "==" operation. resource.column_name: the column name. Only support "==" operation. request.time: the expiration. Only support "<" operation in `request.time < timestamp("{ISO datetime string format}")` All variables should join with "&&" condition.+For example: resource.instance_id == "local" && resource.database_name == "employee" && request.time < timestamp("2025-04-30T11:10:39.000Z") resource.instance_id == "local" && resource.database_name == "employee" |-<a name="bytebase-v1-Plan-TaskStatusCount"></a>-### Plan.TaskStatusCount+<a name="bytebase-v1-MaskingRulePolicy"></a>+### MaskingRulePolicy+Policy for configuring data masking rules.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| status | [Task.Status](#bytebase-v1-Task-Status) | | The task status. |-| count | [int32](#int32) | | The number of tasks in the status. |-+| rules | [MaskingRulePolicy.MaskingRule](#bytebase-v1-MaskingRulePolicy-MaskingRule) | repeated | The list of masking rules. |-<a name="bytebase-v1-PlanCheckRun"></a>-### PlanCheckRun+<a name="bytebase-v1-MaskingRulePolicy-MaskingRule"></a>+### MaskingRulePolicy.MaskingRule+A rule that defines when and how to mask data.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | Format: projects/{project}/plans/{plan}/planCheckRun |-| status | [PlanCheckRun.Status](#bytebase-v1-PlanCheckRun-Status) | | |-| 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) | | |+| id | [string](#string) | | A unique identifier for the rule in UUID format. |+| condition | [google.type.Expr](#google-type-Expr) | | The condition for the masking rule. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec++Support variables: resource.environment_id: the environment resource id. resource.project_id: the project resource id. resource.instance_id: the instance resource id. resource.database_name: the database name. resource.table_name: the table name. resource.column_name: the column name. resource.classification_level: the classification level (integer).++Each variable support following operations: ==: the value equals the target. !=: the value not equals the target. in: the value matches one of the targets. !(in): the value not matches any of the targets. <, <=, >, >=: numeric comparison (classification_level only).+For example: resource.environment_id == "test" && resource.project_id == "sample-project" resource.instance_id == "sample-instance" && resource.database_name == "employee" && resource.table_name in ["table1", "table2"] resource.environment_id != "test" || !(resource.project_id in ["poject1", "prject2"]) resource.instance_id == "sample-instance" && (resource.database_name == "db1" || resource.database_name == "db2") |+| semantic_type | [string](#string) | | The semantic type of data to mask (e.g., "SSN", "EMAIL"). |-<a name="bytebase-v1-PlanCheckRun-Result"></a>-### PlanCheckRun.Result+<a name="bytebase-v1-Policy"></a>++### Policy| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| status | [Advice.Level](#bytebase-v1-Advice-Level) | | |-| title | [string](#string) | | |-| content | [string](#string) | | |-| code | [int32](#int32) | | |-| target | [string](#string) | | Target identification for consolidated results. Format: instances/{instance}/databases/{database} |-| type | [PlanCheckRun.Result.Type](#bytebase-v1-PlanCheckRun-Result-Type) | | |-| 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 of the policy. Format: {resource name}/policies/{policy type} Workspace resource name: workspaces/{workspace-id}. Environment resource name: environments/environment-id. Instance resource name: instances/instance-id. Database resource name: instances/instance-id/databases/database-name. |+| inherit_from_parent | [bool](#bool) | | Whether this policy inherits from its parent resource. |+| type | [PolicyType](#bytebase-v1-PolicyType) | | The type of policy. |+| rollout_policy | [RolloutPolicy](#bytebase-v1-RolloutPolicy) | | |+| masking_rule_policy | [MaskingRulePolicy](#bytebase-v1-MaskingRulePolicy) | | |+| masking_exemption_policy | [MaskingExemptionPolicy](#bytebase-v1-MaskingExemptionPolicy) | | |+| tag_policy | [TagPolicy](#bytebase-v1-TagPolicy) | | |+| query_data_policy | [QueryDataPolicy](#bytebase-v1-QueryDataPolicy) | | |+| enforce | [bool](#bool) | | Whether the policy is enforced. |+| resource_type | [PolicyResourceType](#bytebase-v1-PolicyResourceType) | | The resource type for the policy. |-<a name="bytebase-v1-PlanCheckRun-Result-SqlReviewReport"></a>-### PlanCheckRun.Result.SqlReviewReport+<a name="bytebase-v1-QueryDataPolicy"></a>+### QueryDataPolicy+QueryDataPolicy is the policy configuration for querying data in the SQL Editor.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| start_position | [Position](#bytebase-v1-Position) | | Position of the SQL statement. |-| end_position | [Position](#bytebase-v1-Position) | | |-+| maximum_result_rows | [int32](#int32) | | Support both project-level and workspace-level. The maximum number of rows to return in the SQL editor. The default value <= 0, means no limit. |+| disable_export | [bool](#bool) | | workspace-level policy Disable data export in the SQL editor. |+| disable_copy_data | [bool](#bool) | | workspace-level policy Disable copying query results in the SQL editor. |+| allow_admin_data_source | [bool](#bool) | | workspace-level policy Allow using the admin data source to query in the SQL editor. If true, users can select the admin data source or read-only data source If false, 1. when read-only data source is configured, users're force to use the read-only data source 2. otherwise fallback to use the admin data source. |-<a name="bytebase-v1-PlanCheckRun-Result-SqlSummaryReport"></a>-### PlanCheckRun.Result.SqlSummaryReport+<a name="bytebase-v1-RolloutPolicy"></a>+### RolloutPolicy+Rollout policy configuration.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| statement_types | [StatementType](#bytebase-v1-StatementType) | repeated | statement_types are the types of statements that are found in the sql. |-| affected_rows | [int64](#int64) | | |-+| automatic | [bool](#bool) | | Whether rollout is automatic without manual approval. |+| roles | [string](#string) | repeated | The roles that can approve rollout execution. |-<a name="bytebase-v1-RunPlanChecksRequest"></a>-### RunPlanChecksRequest+<a name="bytebase-v1-TagPolicy"></a>+### TagPolicy+Policy for tagging resources with metadata.| 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. |+| tags | [TagPolicy.TagsEntry](#bytebase-v1-TagPolicy-TagsEntry) | repeated | tags is the key - value map for resources. for example, the environment resource can have the sql review config tag, like "bb.tag.review_config": "reviewConfigs/{review config resource id}" |-<a name="bytebase-v1-RunPlanChecksResponse"></a>+<a name="bytebase-v1-TagPolicy-TagsEntry"></a>++### TagPolicy.TagsEntry-### RunPlanChecksResponse+| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| key | [string](#string) | | |+| value | [string](#string) | | |-<a name="bytebase-v1-UpdatePlanRequest"></a>-### UpdatePlanRequest+<a name="bytebase-v1-UpdatePolicyRequest"></a>++### UpdatePolicyRequest| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| plan | [Plan](#bytebase-v1-Plan) | | The plan to update.+| policy | [Policy](#bytebase-v1-Policy) | | The policy to update.-The plan's `name` field is used to identify the plan to update. Format: projects/{project}/plans/{plan} |+The policy's `name` field is used to identify the instance to update. Format: {resource name}/policies/{policy type} Workspace resource name: workspaces/{workspace-id}. Environment resource name: environments/environment-id. Instance resource name: instances/instance-id. Database resource name: instances/instance-id/databases/database-name. || 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. |+| allow_missing | [bool](#bool) | | If set to true, and the policy is not found, a new policy will be created. In this situation, `update_mask` is ignored. |@@ -9261,32 +9264,33 @@ The plan's `name` field is used to identify the plan to update. Format: proj-<a name="bytebase-v1-PlanCheckRun-Result-Type"></a>--### PlanCheckRun.Result.Type+<a name="bytebase-v1-PolicyResourceType"></a>+### PolicyResourceType+The resource type that a policy can be attached to.| Name | Number | Description || ---- | ------ | ----------- |-| TYPE_UNSPECIFIED | 0 | |-| STATEMENT_ADVISE | 1 | |-| STATEMENT_SUMMARY_REPORT | 2 | |-| GHOST_SYNC | 3 | |-+| RESOURCE_TYPE_UNSPECIFIED | 0 | Unspecified resource type. |+| WORKSPACE | 1 | Workspace-level policy. |+| ENVIRONMENT | 2 | Environment-level policy. |+| PROJECT | 3 | Project-level policy. |-<a name="bytebase-v1-PlanCheckRun-Status"></a>-### PlanCheckRun.Status+<a name="bytebase-v1-PolicyType"></a>+### PolicyType+The type of organizational policy.| Name | Number | Description || ---- | ------ | ----------- |-| STATUS_UNSPECIFIED | 0 | |-| RUNNING | 1 | |-| DONE | 2 | |-| FAILED | 3 | |-| CANCELED | 4 | |+| POLICY_TYPE_UNSPECIFIED | 0 | Unspecified policy type. |+| MASKING_RULE | 1 | Data masking rule policy. |+| MASKING_EXEMPTION | 2 | Data masking exemption policy. |+| ROLLOUT_POLICY | 3 | Rollout deployment policy. |+| TAG | 4 | Resource tag policy. |+| DATA_QUERY | 6 | Query data access policy. |@@ -9294,20 +9298,18 @@ The plan's `name` field is used to identify the plan to update. Format: proj-<a name="bytebase-v1-PlanService"></a>+<a name="bytebase-v1-OrgPolicyService"></a>-### PlanService-PlanService manages deployment plans for database changes.+### OrgPolicyService+OrgPolicyService manages organizational policies at various resource levels.| 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 |-| 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) |-| GetPlanCheckRun | [GetPlanCheckRunRequest](#bytebase-v1-GetPlanCheckRunRequest) | [PlanCheckRun](#bytebase-v1-PlanCheckRun) | Gets the plan check run for a deployment plan. Permissions required: bb.planCheckRuns.get |-| RunPlanChecks | [RunPlanChecksRequest](#bytebase-v1-RunPlanChecksRequest) | [RunPlanChecksResponse](#bytebase-v1-RunPlanChecksResponse) | Executes validation checks on a deployment plan. Permissions required: bb.planCheckRuns.run |-| CancelPlanCheckRun | [CancelPlanCheckRunRequest](#bytebase-v1-CancelPlanCheckRunRequest) | [CancelPlanCheckRunResponse](#bytebase-v1-CancelPlanCheckRunResponse) | Cancels the plan check run for a deployment plan. Permissions required: bb.planCheckRuns.run |+| GetPolicy | [GetPolicyRequest](#bytebase-v1-GetPolicyRequest) | [Policy](#bytebase-v1-Policy) | Retrieves a policy by name. Permissions required: bb.policies.get |+| ListPolicies | [ListPoliciesRequest](#bytebase-v1-ListPoliciesRequest) | [ListPoliciesResponse](#bytebase-v1-ListPoliciesResponse) | Lists policies at a specified resource level. Permissions required: bb.policies.list |+| CreatePolicy | [CreatePolicyRequest](#bytebase-v1-CreatePolicyRequest) | [Policy](#bytebase-v1-Policy) | Creates a new organizational policy. Permissions required: bb.policies.create |+| UpdatePolicy | [UpdatePolicyRequest](#bytebase-v1-UpdatePolicyRequest) | [Policy](#bytebase-v1-Policy) | Updates an existing organizational policy. Permissions required: bb.policies.update |+| DeletePolicy | [DeletePolicyRequest](#bytebase-v1-DeletePolicyRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | Deletes an organizational policy. Permissions required: bb.policies.delete |diff --git a/proto/gen/grpc-doc/v1/index.html b/proto/gen/grpc-doc/v1/index.htmlindex 6a5beaa24c..87602ef42f 100644--- a/proto/gen/grpc-doc/v1/index.html+++ b/proto/gen/grpc-doc/v1/index.html@@ -277,6 +277,10 @@</li>+ <li>+ <a href="#bytebase.v1.ApprovalStatus"><span class="badge">E</span>ApprovalStatus</a>+ </li>+<li><a href="#bytebase.v1.Engine"><span class="badge">E</span>Engine</a></li>@@ -312,388 +316,404 @@<li>- <a href="#v1%2fissue_service.proto">v1/issue_service.proto</a>+ <a href="#v1%2frollout_service.proto">v1/rollout_service.proto</a><ul><li>- <a href="#bytebase.v1.ApprovalFlow"><span class="badge">M</span>ApprovalFlow</a>+ <a href="#bytebase.v1.BatchCancelTaskRunsRequest"><span class="badge">M</span>BatchCancelTaskRunsRequest</a></li><li>- <a href="#bytebase.v1.ApprovalTemplate"><span class="badge">M</span>ApprovalTemplate</a>+ <a href="#bytebase.v1.BatchCancelTaskRunsResponse"><span class="badge">M</span>BatchCancelTaskRunsResponse</a></li><li>- <a href="#bytebase.v1.ApproveIssueRequest"><span class="badge">M</span>ApproveIssueRequest</a>+ <a href="#bytebase.v1.BatchRunTasksRequest"><span class="badge">M</span>BatchRunTasksRequest</a></li><li>- <a href="#bytebase.v1.BatchUpdateIssuesStatusRequest"><span class="badge">M</span>BatchUpdateIssuesStatusRequest</a>+ <a href="#bytebase.v1.BatchRunTasksResponse"><span class="badge">M</span>BatchRunTasksResponse</a></li><li>- <a href="#bytebase.v1.BatchUpdateIssuesStatusResponse"><span class="badge">M</span>BatchUpdateIssuesStatusResponse</a>+ <a href="#bytebase.v1.BatchSkipTasksRequest"><span class="badge">M</span>BatchSkipTasksRequest</a></li><li>- <a href="#bytebase.v1.CreateIssueCommentRequest"><span class="badge">M</span>CreateIssueCommentRequest</a>+ <a href="#bytebase.v1.BatchSkipTasksResponse"><span class="badge">M</span>BatchSkipTasksResponse</a></li><li>- <a href="#bytebase.v1.CreateIssueRequest"><span class="badge">M</span>CreateIssueRequest</a>+ <a href="#bytebase.v1.CreateRolloutRequest"><span class="badge">M</span>CreateRolloutRequest</a></li><li>- <a href="#bytebase.v1.GetIssueRequest"><span class="badge">M</span>GetIssueRequest</a>+ <a href="#bytebase.v1.GetRolloutRequest"><span class="badge">M</span>GetRolloutRequest</a></li><li>- <a href="#bytebase.v1.Issue"><span class="badge">M</span>Issue</a>+ <a href="#bytebase.v1.GetTaskRunLogRequest"><span class="badge">M</span>GetTaskRunLogRequest</a></li><li>- <a href="#bytebase.v1.Issue.Approver"><span class="badge">M</span>Issue.Approver</a>+ <a href="#bytebase.v1.GetTaskRunRequest"><span class="badge">M</span>GetTaskRunRequest</a></li><li>- <a href="#bytebase.v1.IssueComment"><span class="badge">M</span>IssueComment</a>+ <a href="#bytebase.v1.GetTaskRunSessionRequest"><span class="badge">M</span>GetTaskRunSessionRequest</a></li><li>- <a href="#bytebase.v1.IssueComment.Approval"><span class="badge">M</span>IssueComment.Approval</a>+ <a href="#bytebase.v1.ListRolloutsRequest"><span class="badge">M</span>ListRolloutsRequest</a></li><li>- <a href="#bytebase.v1.IssueComment.IssueUpdate"><span class="badge">M</span>IssueComment.IssueUpdate</a>+ <a href="#bytebase.v1.ListRolloutsResponse"><span class="badge">M</span>ListRolloutsResponse</a></li><li>- <a href="#bytebase.v1.IssueComment.PlanSpecUpdate"><span class="badge">M</span>IssueComment.PlanSpecUpdate</a>+ <a href="#bytebase.v1.ListTaskRunsRequest"><span class="badge">M</span>ListTaskRunsRequest</a></li><li>- <a href="#bytebase.v1.ListIssueCommentsRequest"><span class="badge">M</span>ListIssueCommentsRequest</a>+ <a href="#bytebase.v1.ListTaskRunsResponse"><span class="badge">M</span>ListTaskRunsResponse</a></li><li>- <a href="#bytebase.v1.ListIssueCommentsResponse"><span class="badge">M</span>ListIssueCommentsResponse</a>+ <a href="#bytebase.v1.PreviewTaskRunRollbackRequest"><span class="badge">M</span>PreviewTaskRunRollbackRequest</a></li><li>- <a href="#bytebase.v1.ListIssuesRequest"><span class="badge">M</span>ListIssuesRequest</a>+ <a href="#bytebase.v1.PreviewTaskRunRollbackResponse"><span class="badge">M</span>PreviewTaskRunRollbackResponse</a></li><li>- <a href="#bytebase.v1.ListIssuesResponse"><span class="badge">M</span>ListIssuesResponse</a>+ <a href="#bytebase.v1.Rollout"><span class="badge">M</span>Rollout</a></li><li>- <a href="#bytebase.v1.RejectIssueRequest"><span class="badge">M</span>RejectIssueRequest</a>+ <a href="#bytebase.v1.Stage"><span class="badge">M</span>Stage</a></li><li>- <a href="#bytebase.v1.RequestIssueRequest"><span class="badge">M</span>RequestIssueRequest</a>+ <a href="#bytebase.v1.Task"><span class="badge">M</span>Task</a></li><li>- <a href="#bytebase.v1.RetryIssueApprovalRequest"><span class="badge">M</span>RetryIssueApprovalRequest</a>+ <a href="#bytebase.v1.Task.DatabaseCreate"><span class="badge">M</span>Task.DatabaseCreate</a></li><li>- <a href="#bytebase.v1.RoleGrant"><span class="badge">M</span>RoleGrant</a>+ <a href="#bytebase.v1.Task.DatabaseDataExport"><span class="badge">M</span>Task.DatabaseDataExport</a></li><li>- <a href="#bytebase.v1.SearchIssuesRequest"><span class="badge">M</span>SearchIssuesRequest</a>+ <a href="#bytebase.v1.Task.DatabaseUpdate"><span class="badge">M</span>Task.DatabaseUpdate</a></li><li>- <a href="#bytebase.v1.SearchIssuesResponse"><span class="badge">M</span>SearchIssuesResponse</a>+ <a href="#bytebase.v1.TaskRun"><span class="badge">M</span>TaskRun</a></li><li>- <a href="#bytebase.v1.UpdateIssueCommentRequest"><span class="badge">M</span>UpdateIssueCommentRequest</a>+ <a href="#bytebase.v1.TaskRun.SchedulerInfo"><span class="badge">M</span>TaskRun.SchedulerInfo</a></li><li>- <a href="#bytebase.v1.UpdateIssueRequest"><span class="badge">M</span>UpdateIssueRequest</a>+ <a href="#bytebase.v1.TaskRun.SchedulerInfo.WaitingCause"><span class="badge">M</span>TaskRun.SchedulerInfo.WaitingCause</a></li>-<li>- <a href="#bytebase.v1.Issue.ApprovalStatus"><span class="badge">E</span>Issue.ApprovalStatus</a>+ <a href="#bytebase.v1.TaskRunLog"><span class="badge">M</span>TaskRunLog</a></li><li>- <a href="#bytebase.v1.Issue.Approver.Status"><span class="badge">E</span>Issue.Approver.Status</a>+ <a href="#bytebase.v1.TaskRunLogEntry"><span class="badge">M</span>TaskRunLogEntry</a></li><li>- <a href="#bytebase.v1.Issue.Type"><span class="badge">E</span>Issue.Type</a>+ <a href="#bytebase.v1.TaskRunLogEntry.CommandExecute"><span class="badge">M</span>TaskRunLogEntry.CommandExecute</a></li><li>- <a href="#bytebase.v1.IssueComment.Approval.Status"><span class="badge">E</span>IssueComment.Approval.Status</a>+ <a href="#bytebase.v1.TaskRunLogEntry.CommandExecute.CommandResponse"><span class="badge">M</span>TaskRunLogEntry.CommandExecute.CommandResponse</a></li><li>- <a href="#bytebase.v1.IssueStatus"><span class="badge">E</span>IssueStatus</a>+ <a href="#bytebase.v1.TaskRunLogEntry.ComputeDiff"><span class="badge">M</span>TaskRunLogEntry.ComputeDiff</a></li>--<li>- <a href="#bytebase.v1.IssueService"><span class="badge">S</span>IssueService</a>+ <a href="#bytebase.v1.TaskRunLogEntry.DatabaseSync"><span class="badge">M</span>TaskRunLogEntry.DatabaseSync</a></li>- </ul>- </li>--- <li>- <a href="#v1%2fsetting_service.proto">v1/setting_service.proto</a>- <ul>-<li>- <a href="#bytebase.v1.AISetting"><span class="badge">M</span>AISetting</a>+ <a href="#bytebase.v1.TaskRunLogEntry.GhostMigration"><span class="badge">M</span>TaskRunLogEntry.GhostMigration</a></li><li>- <a href="#bytebase.v1.Algorithm"><span class="badge">M</span>Algorithm</a>+ <a href="#bytebase.v1.TaskRunLogEntry.PriorBackup"><span class="badge">M</span>TaskRunLogEntry.PriorBackup</a></li><li>- <a href="#bytebase.v1.Algorithm.FullMask"><span class="badge">M</span>Algorithm.FullMask</a>+ <a href="#bytebase.v1.TaskRunLogEntry.PriorBackup.PriorBackupDetail"><span class="badge">M</span>TaskRunLogEntry.PriorBackup.PriorBackupDetail</a></li><li>- <a href="#bytebase.v1.Algorithm.InnerOuterMask"><span class="badge">M</span>Algorithm.InnerOuterMask</a>+ <a href="#bytebase.v1.TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item"><span class="badge">M</span>TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item</a></li><li>- <a href="#bytebase.v1.Algorithm.MD5Mask"><span class="badge">M</span>Algorithm.MD5Mask</a>+ <a href="#bytebase.v1.TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item.Table"><span class="badge">M</span>TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item.Table</a></li><li>- <a href="#bytebase.v1.Algorithm.RangeMask"><span class="badge">M</span>Algorithm.RangeMask</a>+ <a href="#bytebase.v1.TaskRunLogEntry.ReleaseFileExecute"><span class="badge">M</span>TaskRunLogEntry.ReleaseFileExecute</a></li><li>- <a href="#bytebase.v1.Algorithm.RangeMask.Slice"><span class="badge">M</span>Algorithm.RangeMask.Slice</a>+ <a href="#bytebase.v1.TaskRunLogEntry.RetryInfo"><span class="badge">M</span>TaskRunLogEntry.RetryInfo</a></li><li>- <a href="#bytebase.v1.Announcement"><span class="badge">M</span>Announcement</a>+ <a href="#bytebase.v1.TaskRunLogEntry.SchemaDump"><span class="badge">M</span>TaskRunLogEntry.SchemaDump</a></li><li>- <a href="#bytebase.v1.AppIMSetting"><span class="badge">M</span>AppIMSetting</a>+ <a href="#bytebase.v1.TaskRunLogEntry.TransactionControl"><span class="badge">M</span>TaskRunLogEntry.TransactionControl</a></li><li>- <a href="#bytebase.v1.AppIMSetting.DingTalk"><span class="badge">M</span>AppIMSetting.DingTalk</a>+ <a href="#bytebase.v1.TaskRunSession"><span class="badge">M</span>TaskRunSession</a></li><li>- <a href="#bytebase.v1.AppIMSetting.Feishu"><span class="badge">M</span>AppIMSetting.Feishu</a>+ <a href="#bytebase.v1.TaskRunSession.Postgres"><span class="badge">M</span>TaskRunSession.Postgres</a></li><li>- <a href="#bytebase.v1.AppIMSetting.IMSetting"><span class="badge">M</span>AppIMSetting.IMSetting</a>+ <a href="#bytebase.v1.TaskRunSession.Postgres.Session"><span class="badge">M</span>TaskRunSession.Postgres.Session</a></li>+<li>- <a href="#bytebase.v1.AppIMSetting.Lark"><span class="badge">M</span>AppIMSetting.Lark</a>+ <a href="#bytebase.v1.Task.Status"><span class="badge">E</span>Task.Status</a></li><li>- <a href="#bytebase.v1.AppIMSetting.Slack"><span class="badge">M</span>AppIMSetting.Slack</a>+ <a href="#bytebase.v1.Task.Type"><span class="badge">E</span>Task.Type</a></li><li>- <a href="#bytebase.v1.AppIMSetting.Teams"><span class="badge">M</span>AppIMSetting.Teams</a>+ <a href="#bytebase.v1.TaskRun.ExportArchiveStatus"><span class="badge">E</span>TaskRun.ExportArchiveStatus</a></li><li>- <a href="#bytebase.v1.AppIMSetting.Wecom"><span class="badge">M</span>AppIMSetting.Wecom</a>+ <a href="#bytebase.v1.TaskRun.Status"><span class="badge">E</span>TaskRun.Status</a></li><li>- <a href="#bytebase.v1.DataClassificationSetting"><span class="badge">M</span>DataClassificationSetting</a>+ <a href="#bytebase.v1.TaskRunLogEntry.TransactionControl.Type"><span class="badge">E</span>TaskRunLogEntry.TransactionControl.Type</a></li><li>- <a href="#bytebase.v1.DataClassificationSetting.DataClassificationConfig"><span class="badge">M</span>DataClassificationSetting.DataClassificationConfig</a>+ <a href="#bytebase.v1.TaskRunLogEntry.Type"><span class="badge">E</span>TaskRunLogEntry.Type</a></li>++<li>- <a href="#bytebase.v1.DataClassificationSetting.DataClassificationConfig.ClassificationEntry"><span class="badge">M</span>DataClassificationSetting.DataClassificationConfig.ClassificationEntry</a>+ <a href="#bytebase.v1.RolloutService"><span class="badge">S</span>RolloutService</a></li>+ </ul>+ </li>+++ <li>+ <a href="#v1%2finstance_role_service.proto">v1/instance_role_service.proto</a>+ <ul>+<li>- <a href="#bytebase.v1.DataClassificationSetting.DataClassificationConfig.DataClassification"><span class="badge">M</span>DataClassificationSetting.DataClassificationConfig.DataClassification</a>+ <a href="#bytebase.v1.InstanceRole"><span class="badge">M</span>InstanceRole</a></li><li>- <a href="#bytebase.v1.DataClassificationSetting.DataClassificationConfig.Level"><span class="badge">M</span>DataClassificationSetting.DataClassificationConfig.Level</a>+ <a href="#bytebase.v1.ListInstanceRolesRequest"><span class="badge">M</span>ListInstanceRolesRequest</a></li><li>- <a href="#bytebase.v1.EmailSetting"><span class="badge">M</span>EmailSetting</a>+ <a href="#bytebase.v1.ListInstanceRolesResponse"><span class="badge">M</span>ListInstanceRolesResponse</a></li>+++<li>- <a href="#bytebase.v1.EmailSetting.SMTPConfig"><span class="badge">M</span>EmailSetting.SMTPConfig</a>+ <a href="#bytebase.v1.InstanceRoleService"><span class="badge">S</span>InstanceRoleService</a></li>+ </ul>+ </li>+++ <li>+ <a href="#v1%2finstance_service.proto">v1/instance_service.proto</a>+ <ul>+<li>- <a href="#bytebase.v1.EnvironmentSetting"><span class="badge">M</span>EnvironmentSetting</a>+ <a href="#bytebase.v1.AddDataSourceRequest"><span class="badge">M</span>AddDataSourceRequest</a></li><li>- <a href="#bytebase.v1.EnvironmentSetting.Environment"><span class="badge">M</span>EnvironmentSetting.Environment</a>+ <a href="#bytebase.v1.BatchSyncInstancesRequest"><span class="badge">M</span>BatchSyncInstancesRequest</a></li><li>- <a href="#bytebase.v1.EnvironmentSetting.Environment.TagsEntry"><span class="badge">M</span>EnvironmentSetting.Environment.TagsEntry</a>+ <a href="#bytebase.v1.BatchSyncInstancesResponse"><span class="badge">M</span>BatchSyncInstancesResponse</a></li><li>- <a href="#bytebase.v1.GetSettingRequest"><span class="badge">M</span>GetSettingRequest</a>+ <a href="#bytebase.v1.BatchUpdateInstancesRequest"><span class="badge">M</span>BatchUpdateInstancesRequest</a></li><li>- <a href="#bytebase.v1.GetSettingResponse"><span class="badge">M</span>GetSettingResponse</a>+ <a href="#bytebase.v1.BatchUpdateInstancesResponse"><span class="badge">M</span>BatchUpdateInstancesResponse</a></li><li>- <a href="#bytebase.v1.ListSettingsRequest"><span class="badge">M</span>ListSettingsRequest</a>+ <a href="#bytebase.v1.CreateInstanceRequest"><span class="badge">M</span>CreateInstanceRequest</a></li><li>- <a href="#bytebase.v1.ListSettingsResponse"><span class="badge">M</span>ListSettingsResponse</a>+ <a href="#bytebase.v1.DataSource"><span class="badge">M</span>DataSource</a></li><li>- <a href="#bytebase.v1.SemanticTypeSetting"><span class="badge">M</span>SemanticTypeSetting</a>+ <a href="#bytebase.v1.DataSource.AWSCredential"><span class="badge">M</span>DataSource.AWSCredential</a></li><li>- <a href="#bytebase.v1.SemanticTypeSetting.SemanticType"><span class="badge">M</span>SemanticTypeSetting.SemanticType</a>+ <a href="#bytebase.v1.DataSource.Address"><span class="badge">M</span>DataSource.Address</a></li><li>- <a href="#bytebase.v1.Setting"><span class="badge">M</span>Setting</a>+ <a href="#bytebase.v1.DataSource.AzureCredential"><span class="badge">M</span>DataSource.AzureCredential</a></li><li>- <a href="#bytebase.v1.SettingValue"><span class="badge">M</span>SettingValue</a>+ <a href="#bytebase.v1.DataSource.ExtraConnectionParametersEntry"><span class="badge">M</span>DataSource.ExtraConnectionParametersEntry</a></li><li>- <a href="#bytebase.v1.TestEmailSettingRequest"><span class="badge">M</span>TestEmailSettingRequest</a>+ <a href="#bytebase.v1.DataSource.GCPCredential"><span class="badge">M</span>DataSource.GCPCredential</a></li><li>- <a href="#bytebase.v1.TestEmailSettingResponse"><span class="badge">M</span>TestEmailSettingResponse</a>+ <a href="#bytebase.v1.DataSourceExternalSecret"><span class="badge">M</span>DataSourceExternalSecret</a></li><li>- <a href="#bytebase.v1.UpdateSettingRequest"><span class="badge">M</span>UpdateSettingRequest</a>+ <a href="#bytebase.v1.DataSourceExternalSecret.AppRoleAuthOption"><span class="badge">M</span>DataSourceExternalSecret.AppRoleAuthOption</a></li><li>- <a href="#bytebase.v1.WorkspaceApprovalSetting"><span class="badge">M</span>WorkspaceApprovalSetting</a>+ <a href="#bytebase.v1.DeleteInstanceRequest"><span class="badge">M</span>DeleteInstanceRequest</a></li><li>- <a href="#bytebase.v1.WorkspaceApprovalSetting.Rule"><span class="badge">M</span>WorkspaceApprovalSetting.Rule</a>+ <a href="#bytebase.v1.GetInstanceRequest"><span class="badge">M</span>GetInstanceRequest</a></li><li>- <a href="#bytebase.v1.WorkspaceProfileSetting"><span class="badge">M</span>WorkspaceProfileSetting</a>+ <a href="#bytebase.v1.Instance"><span class="badge">M</span>Instance</a></li><li>- <a href="#bytebase.v1.WorkspaceProfileSetting.PasswordRestriction"><span class="badge">M</span>WorkspaceProfileSetting.PasswordRestriction</a>+ <a href="#bytebase.v1.Instance.LabelsEntry"><span class="badge">M</span>Instance.LabelsEntry</a></li>+ <li>+ <a href="#bytebase.v1.InstanceResource"><span class="badge">M</span>InstanceResource</a>+ </li><li>- <a href="#bytebase.v1.AISetting.Provider"><span class="badge">E</span>AISetting.Provider</a>+ <a href="#bytebase.v1.KerberosConfig"><span class="badge">M</span>KerberosConfig</a></li><li>- <a href="#bytebase.v1.Algorithm.InnerOuterMask.MaskType"><span class="badge">E</span>Algorithm.InnerOuterMask.MaskType</a>+ <a href="#bytebase.v1.ListInstanceDatabaseRequest"><span class="badge">M</span>ListInstanceDatabaseRequest</a></li><li>- <a href="#bytebase.v1.Announcement.AlertLevel"><span class="badge">E</span>Announcement.AlertLevel</a>+ <a href="#bytebase.v1.ListInstanceDatabaseResponse"><span class="badge">M</span>ListInstanceDatabaseResponse</a></li><li>- <a href="#bytebase.v1.DatabaseChangeMode"><span class="badge">E</span>DatabaseChangeMode</a>+ <a href="#bytebase.v1.ListInstancesRequest"><span class="badge">M</span>ListInstancesRequest</a></li><li>- <a href="#bytebase.v1.EmailSetting.SMTPConfig.Authentication"><span class="badge">E</span>EmailSetting.SMTPConfig.Authentication</a>+ <a href="#bytebase.v1.ListInstancesResponse"><span class="badge">M</span>ListInstancesResponse</a></li><li>- <a href="#bytebase.v1.EmailSetting.SMTPConfig.Encryption"><span class="badge">E</span>EmailSetting.SMTPConfig.Encryption</a>+ <a href="#bytebase.v1.RemoveDataSourceRequest"><span class="badge">M</span>RemoveDataSourceRequest</a></li><li>- <a href="#bytebase.v1.EmailSetting.Type"><span class="badge">E</span>EmailSetting.Type</a>+ <a href="#bytebase.v1.SASLConfig"><span class="badge">M</span>SASLConfig</a></li><li>- <a href="#bytebase.v1.Setting.SettingName"><span class="badge">E</span>Setting.SettingName</a>+ <a href="#bytebase.v1.SyncInstanceRequest"><span class="badge">M</span>SyncInstanceRequest</a></li><li>- <a href="#bytebase.v1.WorkspaceApprovalSetting.Rule.Source"><span class="badge">E</span>WorkspaceApprovalSetting.Rule.Source</a>+ <a href="#bytebase.v1.SyncInstanceResponse"><span class="badge">M</span>SyncInstanceResponse</a></li>+ <li>+ <a href="#bytebase.v1.UndeleteInstanceRequest"><span class="badge">M</span>UndeleteInstanceRequest</a>+ </li>+ <li>+ <a href="#bytebase.v1.UpdateDataSourceRequest"><span class="badge">M</span>UpdateDataSourceRequest</a>+ </li><li>- <a href="#bytebase.v1.SettingService"><span class="badge">S</span>SettingService</a>+ <a href="#bytebase.v1.UpdateInstanceRequest"><span class="badge">M</span>UpdateInstanceRequest</a></li>- </ul>- </li>--- <li>- <a href="#v1%2factuator_service.proto">v1/actuator_service.proto</a>- <ul><li>- <a href="#bytebase.v1.ActuatorInfo"><span class="badge">M</span>ActuatorInfo</a>+ <a href="#bytebase.v1.DataSource.AuthenticationType"><span class="badge">E</span>DataSource.AuthenticationType</a></li><li>- <a href="#bytebase.v1.DeleteCacheRequest"><span class="badge">M</span>DeleteCacheRequest</a>+ <a href="#bytebase.v1.DataSource.RedisType"><span class="badge">E</span>DataSource.RedisType</a></li><li>- <a href="#bytebase.v1.GetActuatorInfoRequest"><span class="badge">M</span>GetActuatorInfoRequest</a>+ <a href="#bytebase.v1.DataSourceExternalSecret.AppRoleAuthOption.SecretType"><span class="badge">E</span>DataSourceExternalSecret.AppRoleAuthOption.SecretType</a></li><li>- <a href="#bytebase.v1.Restriction"><span class="badge">M</span>Restriction</a>+ <a href="#bytebase.v1.DataSourceExternalSecret.AuthType"><span class="badge">E</span>DataSourceExternalSecret.AuthType</a></li><li>- <a href="#bytebase.v1.SetupSampleRequest"><span class="badge">M</span>SetupSampleRequest</a>+ <a href="#bytebase.v1.DataSourceExternalSecret.SecretType"><span class="badge">E</span>DataSourceExternalSecret.SecretType</a></li>+ <li>+ <a href="#bytebase.v1.DataSourceType"><span class="badge">E</span>DataSourceType</a>+ </li><li>- <a href="#bytebase.v1.ActuatorService"><span class="badge">S</span>ActuatorService</a>+ <a href="#bytebase.v1.InstanceService"><span class="badge">S</span>InstanceService</a></li></ul>@@ -701,297 +721,290 @@<li>- <a href="#v1%2fai_service.proto">v1/ai_service.proto</a>+ <a href="#v1%2fdatabase_service.proto">v1/database_service.proto</a><ul><li>- <a href="#bytebase.v1.AIChatMessage"><span class="badge">M</span>AIChatMessage</a>+ <a href="#bytebase.v1.BatchGetDatabasesRequest"><span class="badge">M</span>BatchGetDatabasesRequest</a></li><li>- <a href="#bytebase.v1.AIChatRequest"><span class="badge">M</span>AIChatRequest</a>+ <a href="#bytebase.v1.BatchGetDatabasesResponse"><span class="badge">M</span>BatchGetDatabasesResponse</a></li><li>- <a href="#bytebase.v1.AIChatResponse"><span class="badge">M</span>AIChatResponse</a>+ <a href="#bytebase.v1.BatchSyncDatabasesRequest"><span class="badge">M</span>BatchSyncDatabasesRequest</a></li><li>- <a href="#bytebase.v1.AIChatToolCall"><span class="badge">M</span>AIChatToolCall</a>+ <a href="#bytebase.v1.BatchSyncDatabasesResponse"><span class="badge">M</span>BatchSyncDatabasesResponse</a></li><li>- <a href="#bytebase.v1.AIChatToolDefinition"><span class="badge">M</span>AIChatToolDefinition</a>+ <a href="#bytebase.v1.BatchUpdateDatabasesRequest"><span class="badge">M</span>BatchUpdateDatabasesRequest</a></li><li>- <a href="#bytebase.v1.AIChatUsage"><span class="badge">M</span>AIChatUsage</a>+ <a href="#bytebase.v1.BatchUpdateDatabasesResponse"><span class="badge">M</span>BatchUpdateDatabasesResponse</a></li>-<li>- <a href="#bytebase.v1.AIChatMessageRole"><span class="badge">E</span>AIChatMessageRole</a>+ <a href="#bytebase.v1.BoundingBox"><span class="badge">M</span>BoundingBox</a></li>-+ <li>+ <a href="#bytebase.v1.Changelog"><span class="badge">M</span>Changelog</a>+ </li><li>- <a href="#bytebase.v1.AIService"><span class="badge">S</span>AIService</a>+ <a href="#bytebase.v1.CheckConstraintMetadata"><span class="badge">M</span>CheckConstraintMetadata</a></li>- </ul>- </li>--- <li>- <a href="#v1%2fiam_policy.proto">v1/iam_policy.proto</a>- <ul>-<li>- <a href="#bytebase.v1.Binding"><span class="badge">M</span>Binding</a>+ <a href="#bytebase.v1.ColumnMetadata"><span class="badge">M</span>ColumnMetadata</a></li><li>- <a href="#bytebase.v1.BindingDelta"><span class="badge">M</span>BindingDelta</a>+ <a href="#bytebase.v1.Database"><span class="badge">M</span>Database</a></li><li>- <a href="#bytebase.v1.GetIamPolicyRequest"><span class="badge">M</span>GetIamPolicyRequest</a>+ <a href="#bytebase.v1.Database.LabelsEntry"><span class="badge">M</span>Database.LabelsEntry</a></li><li>- <a href="#bytebase.v1.IamPolicy"><span class="badge">M</span>IamPolicy</a>+ <a href="#bytebase.v1.DatabaseMetadata"><span class="badge">M</span>DatabaseMetadata</a></li><li>- <a href="#bytebase.v1.PolicyDelta"><span class="badge">M</span>PolicyDelta</a>+ <a href="#bytebase.v1.DatabaseSDLSchema"><span class="badge">M</span>DatabaseSDLSchema</a></li><li>- <a href="#bytebase.v1.SetIamPolicyRequest"><span class="badge">M</span>SetIamPolicyRequest</a>+ <a href="#bytebase.v1.DatabaseSchema"><span class="badge">M</span>DatabaseSchema</a></li>-<li>- <a href="#bytebase.v1.BindingDelta.Action"><span class="badge">E</span>BindingDelta.Action</a>+ <a href="#bytebase.v1.DependencyColumn"><span class="badge">M</span>DependencyColumn</a></li>--- </ul>- </li>--- <li>- <a href="#v1%2faudit_log_service.proto">v1/audit_log_service.proto</a>- <ul>-<li>- <a href="#bytebase.v1.AuditData"><span class="badge">M</span>AuditData</a>+ <a href="#bytebase.v1.DependencyTable"><span class="badge">M</span>DependencyTable</a></li><li>- <a href="#bytebase.v1.AuditLog"><span class="badge">M</span>AuditLog</a>+ <a href="#bytebase.v1.DiffSchemaRequest"><span class="badge">M</span>DiffSchemaRequest</a></li><li>- <a href="#bytebase.v1.ExportAuditLogsRequest"><span class="badge">M</span>ExportAuditLogsRequest</a>+ <a href="#bytebase.v1.DiffSchemaResponse"><span class="badge">M</span>DiffSchemaResponse</a></li><li>- <a href="#bytebase.v1.ExportAuditLogsResponse"><span class="badge">M</span>ExportAuditLogsResponse</a>+ <a href="#bytebase.v1.DimensionConstraint"><span class="badge">M</span>DimensionConstraint</a></li><li>- <a href="#bytebase.v1.RequestMetadata"><span class="badge">M</span>RequestMetadata</a>+ <a href="#bytebase.v1.DimensionalConfig"><span class="badge">M</span>DimensionalConfig</a></li><li>- <a href="#bytebase.v1.SearchAuditLogsRequest"><span class="badge">M</span>SearchAuditLogsRequest</a>+ <a href="#bytebase.v1.EnumTypeMetadata"><span class="badge">M</span>EnumTypeMetadata</a></li><li>- <a href="#bytebase.v1.SearchAuditLogsResponse"><span class="badge">M</span>SearchAuditLogsResponse</a>+ <a href="#bytebase.v1.EventMetadata"><span class="badge">M</span>EventMetadata</a></li>-<li>- <a href="#bytebase.v1.AuditLog.Severity"><span class="badge">E</span>AuditLog.Severity</a>+ <a href="#bytebase.v1.ExtensionMetadata"><span class="badge">M</span>ExtensionMetadata</a></li>-+ <li>+ <a href="#bytebase.v1.ExternalTableMetadata"><span class="badge">M</span>ExternalTableMetadata</a>+ </li><li>- <a href="#bytebase.v1.AuditLogService"><span class="badge">S</span>AuditLogService</a>+ <a href="#bytebase.v1.ForeignKeyMetadata"><span class="badge">M</span>ForeignKeyMetadata</a></li>- </ul>- </li>--- <li>- <a href="#v1%2fuser_service.proto">v1/user_service.proto</a>- <ul>+ <li>+ <a href="#bytebase.v1.FunctionMetadata"><span class="badge">M</span>FunctionMetadata</a>+ </li><li>- <a href="#bytebase.v1.BatchGetUsersRequest"><span class="badge">M</span>BatchGetUsersRequest</a>+ <a href="#bytebase.v1.GenerationMetadata"><span class="badge">M</span>GenerationMetadata</a></li><li>- <a href="#bytebase.v1.BatchGetUsersResponse"><span class="badge">M</span>BatchGetUsersResponse</a>+ <a href="#bytebase.v1.GetChangelogRequest"><span class="badge">M</span>GetChangelogRequest</a></li><li>- <a href="#bytebase.v1.CreateUserRequest"><span class="badge">M</span>CreateUserRequest</a>+ <a href="#bytebase.v1.GetDatabaseMetadataRequest"><span class="badge">M</span>GetDatabaseMetadataRequest</a></li><li>- <a href="#bytebase.v1.DeleteUserRequest"><span class="badge">M</span>DeleteUserRequest</a>+ <a href="#bytebase.v1.GetDatabaseRequest"><span class="badge">M</span>GetDatabaseRequest</a></li><li>- <a href="#bytebase.v1.GetUserRequest"><span class="badge">M</span>GetUserRequest</a>+ <a href="#bytebase.v1.GetDatabaseSDLSchemaRequest"><span class="badge">M</span>GetDatabaseSDLSchemaRequest</a></li><li>- <a href="#bytebase.v1.ListUsersRequest"><span class="badge">M</span>ListUsersRequest</a>+ <a href="#bytebase.v1.GetDatabaseSchemaRequest"><span class="badge">M</span>GetDatabaseSchemaRequest</a></li><li>- <a href="#bytebase.v1.ListUsersResponse"><span class="badge">M</span>ListUsersResponse</a>+ <a href="#bytebase.v1.GetSchemaStringRequest"><span class="badge">M</span>GetSchemaStringRequest</a></li><li>- <a href="#bytebase.v1.UndeleteUserRequest"><span class="badge">M</span>UndeleteUserRequest</a>+ <a href="#bytebase.v1.GetSchemaStringResponse"><span class="badge">M</span>GetSchemaStringResponse</a></li><li>- <a href="#bytebase.v1.UpdateEmailRequest"><span class="badge">M</span>UpdateEmailRequest</a>+ <a href="#bytebase.v1.GridLevel"><span class="badge">M</span>GridLevel</a></li><li>- <a href="#bytebase.v1.UpdateUserRequest"><span class="badge">M</span>UpdateUserRequest</a>+ <a href="#bytebase.v1.IndexMetadata"><span class="badge">M</span>IndexMetadata</a></li><li>- <a href="#bytebase.v1.User"><span class="badge">M</span>User</a>+ <a href="#bytebase.v1.ListChangelogsRequest"><span class="badge">M</span>ListChangelogsRequest</a></li><li>- <a href="#bytebase.v1.User.Profile"><span class="badge">M</span>User.Profile</a>+ <a href="#bytebase.v1.ListChangelogsResponse"><span class="badge">M</span>ListChangelogsResponse</a></li>+ <li>+ <a href="#bytebase.v1.ListDatabasesRequest"><span class="badge">M</span>ListDatabasesRequest</a>+ </li>+ <li>+ <a href="#bytebase.v1.ListDatabasesResponse"><span class="badge">M</span>ListDatabasesResponse</a>+ </li>+ <li>+ <a href="#bytebase.v1.MaterializedViewMetadata"><span class="badge">M</span>MaterializedViewMetadata</a>+ </li><li>- <a href="#bytebase.v1.UserService"><span class="badge">S</span>UserService</a>+ <a href="#bytebase.v1.PackageMetadata"><span class="badge">M</span>PackageMetadata</a></li>- </ul>- </li>--- <li>- <a href="#v1%2fauth_service.proto">v1/auth_service.proto</a>- <ul>+ <li>+ <a href="#bytebase.v1.ProcedureMetadata"><span class="badge">M</span>ProcedureMetadata</a>+ </li><li>- <a href="#bytebase.v1.ExchangeTokenRequest"><span class="badge">M</span>ExchangeTokenRequest</a>+ <a href="#bytebase.v1.SchemaMetadata"><span class="badge">M</span>SchemaMetadata</a></li><li>- <a href="#bytebase.v1.ExchangeTokenResponse"><span class="badge">M</span>ExchangeTokenResponse</a>+ <a href="#bytebase.v1.SequenceMetadata"><span class="badge">M</span>SequenceMetadata</a></li><li>- <a href="#bytebase.v1.IdentityProviderContext"><span class="badge">M</span>IdentityProviderContext</a>+ <a href="#bytebase.v1.SpatialIndexConfig"><span class="badge">M</span>SpatialIndexConfig</a></li><li>- <a href="#bytebase.v1.LoginRequest"><span class="badge">M</span>LoginRequest</a>+ <a href="#bytebase.v1.StorageConfig"><span class="badge">M</span>StorageConfig</a></li><li>- <a href="#bytebase.v1.LoginResponse"><span class="badge">M</span>LoginResponse</a>+ <a href="#bytebase.v1.StreamMetadata"><span class="badge">M</span>StreamMetadata</a></li><li>- <a href="#bytebase.v1.LogoutRequest"><span class="badge">M</span>LogoutRequest</a>+ <a href="#bytebase.v1.SyncDatabaseRequest"><span class="badge">M</span>SyncDatabaseRequest</a></li><li>- <a href="#bytebase.v1.OAuth2IdentityProviderContext"><span class="badge">M</span>OAuth2IdentityProviderContext</a>+ <a href="#bytebase.v1.SyncDatabaseResponse"><span class="badge">M</span>SyncDatabaseResponse</a></li><li>- <a href="#bytebase.v1.OIDCIdentityProviderContext"><span class="badge">M</span>OIDCIdentityProviderContext</a>+ <a href="#bytebase.v1.TableMetadata"><span class="badge">M</span>TableMetadata</a></li><li>- <a href="#bytebase.v1.RefreshRequest"><span class="badge">M</span>RefreshRequest</a>+ <a href="#bytebase.v1.TablePartitionMetadata"><span class="badge">M</span>TablePartitionMetadata</a></li><li>- <a href="#bytebase.v1.RefreshResponse"><span class="badge">M</span>RefreshResponse</a>+ <a href="#bytebase.v1.TaskMetadata"><span class="badge">M</span>TaskMetadata</a></li><li>- <a href="#bytebase.v1.RequestPasswordResetRequest"><span class="badge">M</span>RequestPasswordResetRequest</a>+ <a href="#bytebase.v1.TessellationConfig"><span class="badge">M</span>TessellationConfig</a></li><li>- <a href="#bytebase.v1.ResetPasswordRequest"><span class="badge">M</span>ResetPasswordRequest</a>+ <a href="#bytebase.v1.TriggerMetadata"><span class="badge">M</span>TriggerMetadata</a></li><li>- <a href="#bytebase.v1.SendEmailLoginCodeRequest"><span class="badge">M</span>SendEmailLoginCodeRequest</a>+ <a href="#bytebase.v1.UpdateDatabaseRequest"><span class="badge">M</span>UpdateDatabaseRequest</a></li><li>- <a href="#bytebase.v1.SignupRequest"><span class="badge">M</span>SignupRequest</a>+ <a href="#bytebase.v1.ViewMetadata"><span class="badge">M</span>ViewMetadata</a></li>+<li>- <a href="#bytebase.v1.SwitchWorkspaceRequest"><span class="badge">M</span>SwitchWorkspaceRequest</a>+ <a href="#bytebase.v1.Changelog.Status"><span class="badge">E</span>Changelog.Status</a></li>+ <li>+ <a href="#bytebase.v1.ChangelogView"><span class="badge">E</span>ChangelogView</a>+ </li>+ <li>+ <a href="#bytebase.v1.ColumnMetadata.IdentityGeneration"><span class="badge">E</span>ColumnMetadata.IdentityGeneration</a>+ </li>+ <li>+ <a href="#bytebase.v1.GenerationMetadata.Type"><span class="badge">E</span>GenerationMetadata.Type</a>+ </li><li>- <a href="#bytebase.v1.AuthService"><span class="badge">S</span>AuthService</a>+ <a href="#bytebase.v1.GetDatabaseSDLSchemaRequest.SDLFormat"><span class="badge">E</span>GetDatabaseSDLSchemaRequest.SDLFormat</a></li>- </ul>- </li>--- <li>- <a href="#v1%2fcel_service.proto">v1/cel_service.proto</a>- <ul>+ <li>+ <a href="#bytebase.v1.GetSchemaStringRequest.ObjectType"><span class="badge">E</span>GetSchemaStringRequest.ObjectType</a>+ </li><li>- <a href="#bytebase.v1.BatchDeparseRequest"><span class="badge">M</span>BatchDeparseRequest</a>+ <a href="#bytebase.v1.StreamMetadata.Mode"><span class="badge">E</span>StreamMetadata.Mode</a></li><li>- <a href="#bytebase.v1.BatchDeparseResponse"><span class="badge">M</span>BatchDeparseResponse</a>+ <a href="#bytebase.v1.StreamMetadata.Type"><span class="badge">E</span>StreamMetadata.Type</a></li><li>- <a href="#bytebase.v1.BatchParseRequest"><span class="badge">M</span>BatchParseRequest</a>+ <a href="#bytebase.v1.SyncStatus"><span class="badge">E</span>SyncStatus</a></li><li>- <a href="#bytebase.v1.BatchParseResponse"><span class="badge">M</span>BatchParseResponse</a>+ <a href="#bytebase.v1.TablePartitionMetadata.Type"><span class="badge">E</span>TablePartitionMetadata.Type</a></li>+ <li>+ <a href="#bytebase.v1.TaskMetadata.State"><span class="badge">E</span>TaskMetadata.State</a>+ </li><li>- <a href="#bytebase.v1.CelService"><span class="badge">S</span>CelService</a>+ <a href="#bytebase.v1.DatabaseService"><span class="badge">S</span>DatabaseService</a></li></ul>@@ -999,307 +1012,269 @@<li>- <a href="#v1%2fdatabase_catalog_service.proto">v1/database_catalog_service.proto</a>+ <a href="#v1%2fsql_service.proto">v1/sql_service.proto</a><ul><li>- <a href="#bytebase.v1.ColumnCatalog"><span class="badge">M</span>ColumnCatalog</a>+ <a href="#bytebase.v1.AICompletionRequest"><span class="badge">M</span>AICompletionRequest</a></li><li>- <a href="#bytebase.v1.ColumnCatalog.LabelsEntry"><span class="badge">M</span>ColumnCatalog.LabelsEntry</a>+ <a href="#bytebase.v1.AICompletionRequest.Message"><span class="badge">M</span>AICompletionRequest.Message</a></li><li>- <a href="#bytebase.v1.DatabaseCatalog"><span class="badge">M</span>DatabaseCatalog</a>+ <a href="#bytebase.v1.AICompletionResponse"><span class="badge">M</span>AICompletionResponse</a></li><li>- <a href="#bytebase.v1.GetDatabaseCatalogRequest"><span class="badge">M</span>GetDatabaseCatalogRequest</a>+ <a href="#bytebase.v1.AICompletionResponse.Candidate"><span class="badge">M</span>AICompletionResponse.Candidate</a></li><li>- <a href="#bytebase.v1.ObjectSchema"><span class="badge">M</span>ObjectSchema</a>+ <a href="#bytebase.v1.AICompletionResponse.Candidate.Content"><span class="badge">M</span>AICompletionResponse.Candidate.Content</a></li><li>- <a href="#bytebase.v1.ObjectSchema.ArrayKind"><span class="badge">M</span>ObjectSchema.ArrayKind</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.ObjectSchema.StructKind"><span class="badge">M</span>ObjectSchema.StructKind</a>+ <a href="#bytebase.v1.AdminExecuteRequest"><span class="badge">M</span>AdminExecuteRequest</a></li><li>- <a href="#bytebase.v1.ObjectSchema.StructKind.PropertiesEntry"><span class="badge">M</span>ObjectSchema.StructKind.PropertiesEntry</a>+ <a href="#bytebase.v1.AdminExecuteResponse"><span class="badge">M</span>AdminExecuteResponse</a></li><li>- <a href="#bytebase.v1.SchemaCatalog"><span class="badge">M</span>SchemaCatalog</a>+ <a href="#bytebase.v1.Advice"><span class="badge">M</span>Advice</a></li><li>- <a href="#bytebase.v1.TableCatalog"><span class="badge">M</span>TableCatalog</a>+ <a href="#bytebase.v1.DiffMetadataRequest"><span class="badge">M</span>DiffMetadataRequest</a></li><li>- <a href="#bytebase.v1.TableCatalog.Columns"><span class="badge">M</span>TableCatalog.Columns</a>+ <a href="#bytebase.v1.DiffMetadataResponse"><span class="badge">M</span>DiffMetadataResponse</a></li><li>- <a href="#bytebase.v1.UpdateDatabaseCatalogRequest"><span class="badge">M</span>UpdateDatabaseCatalogRequest</a>+ <a href="#bytebase.v1.ExportRequest"><span class="badge">M</span>ExportRequest</a></li>-<li>- <a href="#bytebase.v1.ObjectSchema.Type"><span class="badge">E</span>ObjectSchema.Type</a>+ <a href="#bytebase.v1.ExportResponse"><span class="badge">M</span>ExportResponse</a></li>--<li>- <a href="#bytebase.v1.DatabaseCatalogService"><span class="badge">S</span>DatabaseCatalogService</a>+ <a href="#bytebase.v1.MaskingReason"><span class="badge">M</span>MaskingReason</a></li>- </ul>- </li>--- <li>- <a href="#v1%2fdatabase_group_service.proto">v1/database_group_service.proto</a>- <ul>-<li>- <a href="#bytebase.v1.CreateDatabaseGroupRequest"><span class="badge">M</span>CreateDatabaseGroupRequest</a>+ <a href="#bytebase.v1.QueryHistory"><span class="badge">M</span>QueryHistory</a></li><li>- <a href="#bytebase.v1.DatabaseGroup"><span class="badge">M</span>DatabaseGroup</a>+ <a href="#bytebase.v1.QueryOption"><span class="badge">M</span>QueryOption</a></li><li>- <a href="#bytebase.v1.DatabaseGroup.Database"><span class="badge">M</span>DatabaseGroup.Database</a>+ <a href="#bytebase.v1.QueryRequest"><span class="badge">M</span>QueryRequest</a></li><li>- <a href="#bytebase.v1.DeleteDatabaseGroupRequest"><span class="badge">M</span>DeleteDatabaseGroupRequest</a>+ <a href="#bytebase.v1.QueryResponse"><span class="badge">M</span>QueryResponse</a></li><li>- <a href="#bytebase.v1.GetDatabaseGroupRequest"><span class="badge">M</span>GetDatabaseGroupRequest</a>+ <a href="#bytebase.v1.QueryResult"><span class="badge">M</span>QueryResult</a></li><li>- <a href="#bytebase.v1.ListDatabaseGroupsRequest"><span class="badge">M</span>ListDatabaseGroupsRequest</a>+ <a href="#bytebase.v1.QueryResult.CommandError"><span class="badge">M</span>QueryResult.CommandError</a></li><li>- <a href="#bytebase.v1.ListDatabaseGroupsResponse"><span class="badge">M</span>ListDatabaseGroupsResponse</a>+ <a href="#bytebase.v1.QueryResult.Message"><span class="badge">M</span>QueryResult.Message</a></li><li>- <a href="#bytebase.v1.UpdateDatabaseGroupRequest"><span class="badge">M</span>UpdateDatabaseGroupRequest</a>+ <a href="#bytebase.v1.QueryResult.PostgresError"><span class="badge">M</span>QueryResult.PostgresError</a></li>-<li>- <a href="#bytebase.v1.DatabaseGroupView"><span class="badge">E</span>DatabaseGroupView</a>+ <a href="#bytebase.v1.QueryResult.SyntaxError"><span class="badge">M</span>QueryResult.SyntaxError</a></li>--<li>- <a href="#bytebase.v1.DatabaseGroupService"><span class="badge">S</span>DatabaseGroupService</a>+ <a href="#bytebase.v1.QueryRow"><span class="badge">M</span>QueryRow</a></li>- </ul>- </li>--- <li>- <a href="#v1%2finstance_role_service.proto">v1/instance_role_service.proto</a>- <ul>+ <li>+ <a href="#bytebase.v1.RowValue"><span class="badge">M</span>RowValue</a>+ </li><li>- <a href="#bytebase.v1.InstanceRole"><span class="badge">M</span>InstanceRole</a>+ <a href="#bytebase.v1.RowValue.Timestamp"><span class="badge">M</span>RowValue.Timestamp</a></li><li>- <a href="#bytebase.v1.ListInstanceRolesRequest"><span class="badge">M</span>ListInstanceRolesRequest</a>+ <a href="#bytebase.v1.RowValue.TimestampTZ"><span class="badge">M</span>RowValue.TimestampTZ</a></li><li>- <a href="#bytebase.v1.ListInstanceRolesResponse"><span class="badge">M</span>ListInstanceRolesResponse</a>+ <a href="#bytebase.v1.SearchQueryHistoriesRequest"><span class="badge">M</span>SearchQueryHistoriesRequest</a></li>---<li>- <a href="#bytebase.v1.InstanceRoleService"><span class="badge">S</span>InstanceRoleService</a>+ <a href="#bytebase.v1.SearchQueryHistoriesResponse"><span class="badge">M</span>SearchQueryHistoriesResponse</a></li>- </ul>- </li>--- <li>- <a href="#v1%2finstance_service.proto">v1/instance_service.proto</a>- <ul>-- <li>- <a href="#bytebase.v1.AddDataSourceRequest"><span class="badge">M</span>AddDataSourceRequest</a>- </li><li>- <a href="#bytebase.v1.BatchSyncInstancesRequest"><span class="badge">M</span>BatchSyncInstancesRequest</a>+ <a href="#bytebase.v1.Advice.Level"><span class="badge">E</span>Advice.Level</a></li><li>- <a href="#bytebase.v1.BatchSyncInstancesResponse"><span class="badge">M</span>BatchSyncInstancesResponse</a>+ <a href="#bytebase.v1.Advice.RuleType"><span class="badge">E</span>Advice.RuleType</a></li><li>- <a href="#bytebase.v1.BatchUpdateInstancesRequest"><span class="badge">M</span>BatchUpdateInstancesRequest</a>+ <a href="#bytebase.v1.QueryHistory.Type"><span class="badge">E</span>QueryHistory.Type</a></li><li>- <a href="#bytebase.v1.BatchUpdateInstancesResponse"><span class="badge">M</span>BatchUpdateInstancesResponse</a>+ <a href="#bytebase.v1.QueryOption.MSSQLExplainFormat"><span class="badge">E</span>QueryOption.MSSQLExplainFormat</a></li><li>- <a href="#bytebase.v1.CreateInstanceRequest"><span class="badge">M</span>CreateInstanceRequest</a>+ <a href="#bytebase.v1.QueryOption.RedisRunCommandsOn"><span class="badge">E</span>QueryOption.RedisRunCommandsOn</a></li><li>- <a href="#bytebase.v1.DataSource"><span class="badge">M</span>DataSource</a>+ <a href="#bytebase.v1.QueryResult.CommandError.Type"><span class="badge">E</span>QueryResult.CommandError.Type</a></li><li>- <a href="#bytebase.v1.DataSource.AWSCredential"><span class="badge">M</span>DataSource.AWSCredential</a>+ <a href="#bytebase.v1.QueryResult.Message.Level"><span class="badge">E</span>QueryResult.Message.Level</a></li>- <li>- <a href="#bytebase.v1.DataSource.Address"><span class="badge">M</span>DataSource.Address</a>- </li>- <li>- <a href="#bytebase.v1.DataSource.AzureCredential"><span class="badge">M</span>DataSource.AzureCredential</a>- </li><li>- <a href="#bytebase.v1.DataSource.ExtraConnectionParametersEntry"><span class="badge">M</span>DataSource.ExtraConnectionParametersEntry</a>+ <a href="#bytebase.v1.SQLService"><span class="badge">S</span>SQLService</a></li>- <li>- <a href="#bytebase.v1.DataSource.GCPCredential"><span class="badge">M</span>DataSource.GCPCredential</a>- </li>+ </ul>+ </li>+++ <li>+ <a href="#v1%2fplan_service.proto">v1/plan_service.proto</a>+ <ul><li>- <a href="#bytebase.v1.DataSourceExternalSecret"><span class="badge">M</span>DataSourceExternalSecret</a>+ <a href="#bytebase.v1.CancelPlanCheckRunRequest"><span class="badge">M</span>CancelPlanCheckRunRequest</a></li><li>- <a href="#bytebase.v1.DataSourceExternalSecret.AppRoleAuthOption"><span class="badge">M</span>DataSourceExternalSecret.AppRoleAuthOption</a>+ <a href="#bytebase.v1.CancelPlanCheckRunResponse"><span class="badge">M</span>CancelPlanCheckRunResponse</a></li><li>- <a href="#bytebase.v1.DeleteInstanceRequest"><span class="badge">M</span>DeleteInstanceRequest</a>+ <a href="#bytebase.v1.CreatePlanRequest"><span class="badge">M</span>CreatePlanRequest</a></li><li>- <a href="#bytebase.v1.GetInstanceRequest"><span class="badge">M</span>GetInstanceRequest</a>+ <a href="#bytebase.v1.GetPlanCheckRunRequest"><span class="badge">M</span>GetPlanCheckRunRequest</a></li><li>- <a href="#bytebase.v1.Instance"><span class="badge">M</span>Instance</a>+ <a href="#bytebase.v1.GetPlanRequest"><span class="badge">M</span>GetPlanRequest</a></li><li>- <a href="#bytebase.v1.Instance.LabelsEntry"><span class="badge">M</span>Instance.LabelsEntry</a>+ <a href="#bytebase.v1.ListPlansRequest"><span class="badge">M</span>ListPlansRequest</a></li><li>- <a href="#bytebase.v1.InstanceResource"><span class="badge">M</span>InstanceResource</a>+ <a href="#bytebase.v1.ListPlansResponse"><span class="badge">M</span>ListPlansResponse</a></li><li>- <a href="#bytebase.v1.KerberosConfig"><span class="badge">M</span>KerberosConfig</a>+ <a href="#bytebase.v1.Plan"><span class="badge">M</span>Plan</a></li><li>- <a href="#bytebase.v1.ListInstanceDatabaseRequest"><span class="badge">M</span>ListInstanceDatabaseRequest</a>+ <a href="#bytebase.v1.Plan.ChangeDatabaseConfig"><span class="badge">M</span>Plan.ChangeDatabaseConfig</a></li><li>- <a href="#bytebase.v1.ListInstanceDatabaseResponse"><span class="badge">M</span>ListInstanceDatabaseResponse</a>+ <a href="#bytebase.v1.Plan.CreateDatabaseConfig"><span class="badge">M</span>Plan.CreateDatabaseConfig</a></li><li>- <a href="#bytebase.v1.ListInstancesRequest"><span class="badge">M</span>ListInstancesRequest</a>+ <a href="#bytebase.v1.Plan.ExportDataConfig"><span class="badge">M</span>Plan.ExportDataConfig</a></li><li>- <a href="#bytebase.v1.ListInstancesResponse"><span class="badge">M</span>ListInstancesResponse</a>+ <a href="#bytebase.v1.Plan.PlanCheckRunStatusCountEntry"><span class="badge">M</span>Plan.PlanCheckRunStatusCountEntry</a></li><li>- <a href="#bytebase.v1.RemoveDataSourceRequest"><span class="badge">M</span>RemoveDataSourceRequest</a>+ <a href="#bytebase.v1.Plan.RolloutStageSummary"><span class="badge">M</span>Plan.RolloutStageSummary</a></li><li>- <a href="#bytebase.v1.SASLConfig"><span class="badge">M</span>SASLConfig</a>+ <a href="#bytebase.v1.Plan.Spec"><span class="badge">M</span>Plan.Spec</a></li><li>- <a href="#bytebase.v1.SyncInstanceRequest"><span class="badge">M</span>SyncInstanceRequest</a>+ <a href="#bytebase.v1.Plan.TaskStatusCount"><span class="badge">M</span>Plan.TaskStatusCount</a></li><li>- <a href="#bytebase.v1.SyncInstanceResponse"><span class="badge">M</span>SyncInstanceResponse</a>+ <a href="#bytebase.v1.PlanCheckRun"><span class="badge">M</span>PlanCheckRun</a></li><li>- <a href="#bytebase.v1.UndeleteInstanceRequest"><span class="badge">M</span>UndeleteInstanceRequest</a>+ <a href="#bytebase.v1.PlanCheckRun.Result"><span class="badge">M</span>PlanCheckRun.Result</a></li><li>- <a href="#bytebase.v1.UpdateDataSourceRequest"><span class="badge">M</span>UpdateDataSourceRequest</a>+ <a href="#bytebase.v1.PlanCheckRun.Result.SqlReviewReport"><span class="badge">M</span>PlanCheckRun.Result.SqlReviewReport</a></li><li>- <a href="#bytebase.v1.UpdateInstanceRequest"><span class="badge">M</span>UpdateInstanceRequest</a>+ <a href="#bytebase.v1.PlanCheckRun.Result.SqlSummaryReport"><span class="badge">M</span>PlanCheckRun.Result.SqlSummaryReport</a></li>-<li>- <a href="#bytebase.v1.DataSource.AuthenticationType"><span class="badge">E</span>DataSource.AuthenticationType</a>+ <a href="#bytebase.v1.RunPlanChecksRequest"><span class="badge">M</span>RunPlanChecksRequest</a></li><li>- <a href="#bytebase.v1.DataSource.RedisType"><span class="badge">E</span>DataSource.RedisType</a>+ <a href="#bytebase.v1.RunPlanChecksResponse"><span class="badge">M</span>RunPlanChecksResponse</a></li><li>- <a href="#bytebase.v1.DataSourceExternalSecret.AppRoleAuthOption.SecretType"><span class="badge">E</span>DataSourceExternalSecret.AppRoleAuthOption.SecretType</a>+ <a href="#bytebase.v1.UpdatePlanRequest"><span class="badge">M</span>UpdatePlanRequest</a></li>- <li>- <a href="#bytebase.v1.DataSourceExternalSecret.AuthType"><span class="badge">E</span>DataSourceExternalSecret.AuthType</a>- </li><li>- <a href="#bytebase.v1.DataSourceExternalSecret.SecretType"><span class="badge">E</span>DataSourceExternalSecret.SecretType</a>+ <a href="#bytebase.v1.PlanCheckRun.Result.Type"><span class="badge">E</span>PlanCheckRun.Result.Type</a></li><li>- <a href="#bytebase.v1.DataSourceType"><span class="badge">E</span>DataSourceType</a>+ <a href="#bytebase.v1.PlanCheckRun.Status"><span class="badge">E</span>PlanCheckRun.Status</a></li><li>- <a href="#bytebase.v1.InstanceService"><span class="badge">S</span>InstanceService</a>+ <a href="#bytebase.v1.PlanService"><span class="badge">S</span>PlanService</a></li></ul>@@ -1307,349 +1282,349 @@<li>- <a href="#v1%2fdatabase_service.proto">v1/database_service.proto</a>+ <a href="#v1%2fissue_service.proto">v1/issue_service.proto</a><ul><li>- <a href="#bytebase.v1.BatchGetDatabasesRequest"><span class="badge">M</span>BatchGetDatabasesRequest</a>+ <a href="#bytebase.v1.ApprovalFlow"><span class="badge">M</span>ApprovalFlow</a></li><li>- <a href="#bytebase.v1.BatchGetDatabasesResponse"><span class="badge">M</span>BatchGetDatabasesResponse</a>+ <a href="#bytebase.v1.ApprovalTemplate"><span class="badge">M</span>ApprovalTemplate</a></li><li>- <a href="#bytebase.v1.BatchSyncDatabasesRequest"><span class="badge">M</span>BatchSyncDatabasesRequest</a>+ <a href="#bytebase.v1.ApproveIssueRequest"><span class="badge">M</span>ApproveIssueRequest</a></li><li>- <a href="#bytebase.v1.BatchSyncDatabasesResponse"><span class="badge">M</span>BatchSyncDatabasesResponse</a>+ <a href="#bytebase.v1.BatchUpdateIssuesStatusRequest"><span class="badge">M</span>BatchUpdateIssuesStatusRequest</a></li><li>- <a href="#bytebase.v1.BatchUpdateDatabasesRequest"><span class="badge">M</span>BatchUpdateDatabasesRequest</a>+ <a href="#bytebase.v1.BatchUpdateIssuesStatusResponse"><span class="badge">M</span>BatchUpdateIssuesStatusResponse</a></li><li>- <a href="#bytebase.v1.BatchUpdateDatabasesResponse"><span class="badge">M</span>BatchUpdateDatabasesResponse</a>+ <a href="#bytebase.v1.CreateIssueCommentRequest"><span class="badge">M</span>CreateIssueCommentRequest</a></li><li>- <a href="#bytebase.v1.BoundingBox"><span class="badge">M</span>BoundingBox</a>+ <a href="#bytebase.v1.CreateIssueRequest"><span class="badge">M</span>CreateIssueRequest</a></li><li>- <a href="#bytebase.v1.Changelog"><span class="badge">M</span>Changelog</a>+ <a href="#bytebase.v1.GetIssueRequest"><span class="badge">M</span>GetIssueRequest</a></li><li>- <a href="#bytebase.v1.CheckConstraintMetadata"><span class="badge">M</span>CheckConstraintMetadata</a>+ <a href="#bytebase.v1.Issue"><span class="badge">M</span>Issue</a></li><li>- <a href="#bytebase.v1.ColumnMetadata"><span class="badge">M</span>ColumnMetadata</a>+ <a href="#bytebase.v1.Issue.Approver"><span class="badge">M</span>Issue.Approver</a></li><li>- <a href="#bytebase.v1.Database"><span class="badge">M</span>Database</a>+ <a href="#bytebase.v1.IssueComment"><span class="badge">M</span>IssueComment</a></li><li>- <a href="#bytebase.v1.Database.LabelsEntry"><span class="badge">M</span>Database.LabelsEntry</a>+ <a href="#bytebase.v1.IssueComment.Approval"><span class="badge">M</span>IssueComment.Approval</a></li><li>- <a href="#bytebase.v1.DatabaseMetadata"><span class="badge">M</span>DatabaseMetadata</a>+ <a href="#bytebase.v1.IssueComment.IssueUpdate"><span class="badge">M</span>IssueComment.IssueUpdate</a></li><li>- <a href="#bytebase.v1.DatabaseSDLSchema"><span class="badge">M</span>DatabaseSDLSchema</a>+ <a href="#bytebase.v1.IssueComment.PlanUpdate"><span class="badge">M</span>IssueComment.PlanUpdate</a></li><li>- <a href="#bytebase.v1.DatabaseSchema"><span class="badge">M</span>DatabaseSchema</a>+ <a href="#bytebase.v1.ListIssueCommentsRequest"><span class="badge">M</span>ListIssueCommentsRequest</a></li><li>- <a href="#bytebase.v1.DependencyColumn"><span class="badge">M</span>DependencyColumn</a>+ <a href="#bytebase.v1.ListIssueCommentsResponse"><span class="badge">M</span>ListIssueCommentsResponse</a></li><li>- <a href="#bytebase.v1.DependencyTable"><span class="badge">M</span>DependencyTable</a>+ <a href="#bytebase.v1.ListIssuesRequest"><span class="badge">M</span>ListIssuesRequest</a></li><li>- <a href="#bytebase.v1.DiffSchemaRequest"><span class="badge">M</span>DiffSchemaRequest</a>+ <a href="#bytebase.v1.ListIssuesResponse"><span class="badge">M</span>ListIssuesResponse</a></li><li>- <a href="#bytebase.v1.DiffSchemaResponse"><span class="badge">M</span>DiffSchemaResponse</a>+ <a href="#bytebase.v1.RejectIssueRequest"><span class="badge">M</span>RejectIssueRequest</a></li><li>- <a href="#bytebase.v1.DimensionConstraint"><span class="badge">M</span>DimensionConstraint</a>+ <a href="#bytebase.v1.RequestIssueRequest"><span class="badge">M</span>RequestIssueRequest</a></li><li>- <a href="#bytebase.v1.DimensionalConfig"><span class="badge">M</span>DimensionalConfig</a>+ <a href="#bytebase.v1.RetryIssueApprovalRequest"><span class="badge">M</span>RetryIssueApprovalRequest</a></li><li>- <a href="#bytebase.v1.EnumTypeMetadata"><span class="badge">M</span>EnumTypeMetadata</a>+ <a href="#bytebase.v1.RoleGrant"><span class="badge">M</span>RoleGrant</a></li><li>- <a href="#bytebase.v1.EventMetadata"><span class="badge">M</span>EventMetadata</a>+ <a href="#bytebase.v1.SearchIssuesRequest"><span class="badge">M</span>SearchIssuesRequest</a></li><li>- <a href="#bytebase.v1.ExtensionMetadata"><span class="badge">M</span>ExtensionMetadata</a>+ <a href="#bytebase.v1.SearchIssuesResponse"><span class="badge">M</span>SearchIssuesResponse</a></li><li>- <a href="#bytebase.v1.ExternalTableMetadata"><span class="badge">M</span>ExternalTableMetadata</a>+ <a href="#bytebase.v1.UpdateIssueCommentRequest"><span class="badge">M</span>UpdateIssueCommentRequest</a></li><li>- <a href="#bytebase.v1.ForeignKeyMetadata"><span class="badge">M</span>ForeignKeyMetadata</a>+ <a href="#bytebase.v1.UpdateIssueRequest"><span class="badge">M</span>UpdateIssueRequest</a></li>+<li>- <a href="#bytebase.v1.FunctionMetadata"><span class="badge">M</span>FunctionMetadata</a>+ <a href="#bytebase.v1.Issue.Approver.Status"><span class="badge">E</span>Issue.Approver.Status</a></li><li>- <a href="#bytebase.v1.GenerationMetadata"><span class="badge">M</span>GenerationMetadata</a>+ <a href="#bytebase.v1.Issue.Type"><span class="badge">E</span>Issue.Type</a></li><li>- <a href="#bytebase.v1.GetChangelogRequest"><span class="badge">M</span>GetChangelogRequest</a>+ <a href="#bytebase.v1.IssueComment.Approval.Status"><span class="badge">E</span>IssueComment.Approval.Status</a></li><li>- <a href="#bytebase.v1.GetDatabaseMetadataRequest"><span class="badge">M</span>GetDatabaseMetadataRequest</a>+ <a href="#bytebase.v1.IssueStatus"><span class="badge">E</span>IssueStatus</a></li>++<li>- <a href="#bytebase.v1.GetDatabaseRequest"><span class="badge">M</span>GetDatabaseRequest</a>+ <a href="#bytebase.v1.IssueService"><span class="badge">S</span>IssueService</a></li>+ </ul>+ </li>+++ <li>+ <a href="#v1%2fsetting_service.proto">v1/setting_service.proto</a>+ <ul>+<li>- <a href="#bytebase.v1.GetDatabaseSDLSchemaRequest"><span class="badge">M</span>GetDatabaseSDLSchemaRequest</a>+ <a href="#bytebase.v1.AISetting"><span class="badge">M</span>AISetting</a></li><li>- <a href="#bytebase.v1.GetDatabaseSchemaRequest"><span class="badge">M</span>GetDatabaseSchemaRequest</a>+ <a href="#bytebase.v1.Algorithm"><span class="badge">M</span>Algorithm</a></li><li>- <a href="#bytebase.v1.GetSchemaStringRequest"><span class="badge">M</span>GetSchemaStringRequest</a>+ <a href="#bytebase.v1.Algorithm.FullMask"><span class="badge">M</span>Algorithm.FullMask</a></li><li>- <a href="#bytebase.v1.GetSchemaStringResponse"><span class="badge">M</span>GetSchemaStringResponse</a>+ <a href="#bytebase.v1.Algorithm.InnerOuterMask"><span class="badge">M</span>Algorithm.InnerOuterMask</a></li><li>- <a href="#bytebase.v1.GridLevel"><span class="badge">M</span>GridLevel</a>+ <a href="#bytebase.v1.Algorithm.MD5Mask"><span class="badge">M</span>Algorithm.MD5Mask</a></li><li>- <a href="#bytebase.v1.IndexMetadata"><span class="badge">M</span>IndexMetadata</a>+ <a href="#bytebase.v1.Algorithm.RangeMask"><span class="badge">M</span>Algorithm.RangeMask</a></li><li>- <a href="#bytebase.v1.ListChangelogsRequest"><span class="badge">M</span>ListChangelogsRequest</a>+ <a href="#bytebase.v1.Algorithm.RangeMask.Slice"><span class="badge">M</span>Algorithm.RangeMask.Slice</a></li><li>- <a href="#bytebase.v1.ListChangelogsResponse"><span class="badge">M</span>ListChangelogsResponse</a>+ <a href="#bytebase.v1.Announcement"><span class="badge">M</span>Announcement</a></li><li>- <a href="#bytebase.v1.ListDatabasesRequest"><span class="badge">M</span>ListDatabasesRequest</a>+ <a href="#bytebase.v1.AppIMSetting"><span class="badge">M</span>AppIMSetting</a></li><li>- <a href="#bytebase.v1.ListDatabasesResponse"><span class="badge">M</span>ListDatabasesResponse</a>+ <a href="#bytebase.v1.AppIMSetting.DingTalk"><span class="badge">M</span>AppIMSetting.DingTalk</a></li><li>- <a href="#bytebase.v1.MaterializedViewMetadata"><span class="badge">M</span>MaterializedViewMetadata</a>+ <a href="#bytebase.v1.AppIMSetting.Feishu"><span class="badge">M</span>AppIMSetting.Feishu</a></li><li>- <a href="#bytebase.v1.PackageMetadata"><span class="badge">M</span>PackageMetadata</a>+ <a href="#bytebase.v1.AppIMSetting.IMSetting"><span class="badge">M</span>AppIMSetting.IMSetting</a></li><li>- <a href="#bytebase.v1.ProcedureMetadata"><span class="badge">M</span>ProcedureMetadata</a>+ <a href="#bytebase.v1.AppIMSetting.Lark"><span class="badge">M</span>AppIMSetting.Lark</a></li><li>- <a href="#bytebase.v1.SchemaMetadata"><span class="badge">M</span>SchemaMetadata</a>+ <a href="#bytebase.v1.AppIMSetting.Slack"><span class="badge">M</span>AppIMSetting.Slack</a></li><li>- <a href="#bytebase.v1.SequenceMetadata"><span class="badge">M</span>SequenceMetadata</a>+ <a href="#bytebase.v1.AppIMSetting.Teams"><span class="badge">M</span>AppIMSetting.Teams</a></li><li>- <a href="#bytebase.v1.SpatialIndexConfig"><span class="badge">M</span>SpatialIndexConfig</a>+ <a href="#bytebase.v1.AppIMSetting.Wecom"><span class="badge">M</span>AppIMSetting.Wecom</a></li><li>- <a href="#bytebase.v1.StorageConfig"><span class="badge">M</span>StorageConfig</a>+ <a href="#bytebase.v1.DataClassificationSetting"><span class="badge">M</span>DataClassificationSetting</a></li><li>- <a href="#bytebase.v1.StreamMetadata"><span class="badge">M</span>StreamMetadata</a>+ <a href="#bytebase.v1.DataClassificationSetting.DataClassificationConfig"><span class="badge">M</span>DataClassificationSetting.DataClassificationConfig</a></li><li>- <a href="#bytebase.v1.SyncDatabaseRequest"><span class="badge">M</span>SyncDatabaseRequest</a>+ <a href="#bytebase.v1.DataClassificationSetting.DataClassificationConfig.ClassificationEntry"><span class="badge">M</span>DataClassificationSetting.DataClassificationConfig.ClassificationEntry</a></li><li>- <a href="#bytebase.v1.SyncDatabaseResponse"><span class="badge">M</span>SyncDatabaseResponse</a>+ <a href="#bytebase.v1.DataClassificationSetting.DataClassificationConfig.DataClassification"><span class="badge">M</span>DataClassificationSetting.DataClassificationConfig.DataClassification</a></li><li>- <a href="#bytebase.v1.TableMetadata"><span class="badge">M</span>TableMetadata</a>+ <a href="#bytebase.v1.DataClassificationSetting.DataClassificationConfig.Level"><span class="badge">M</span>DataClassificationSetting.DataClassificationConfig.Level</a></li><li>- <a href="#bytebase.v1.TablePartitionMetadata"><span class="badge">M</span>TablePartitionMetadata</a>+ <a href="#bytebase.v1.EmailSetting"><span class="badge">M</span>EmailSetting</a></li><li>- <a href="#bytebase.v1.TaskMetadata"><span class="badge">M</span>TaskMetadata</a>+ <a href="#bytebase.v1.EmailSetting.SMTPConfig"><span class="badge">M</span>EmailSetting.SMTPConfig</a></li><li>- <a href="#bytebase.v1.TessellationConfig"><span class="badge">M</span>TessellationConfig</a>+ <a href="#bytebase.v1.EnvironmentSetting"><span class="badge">M</span>EnvironmentSetting</a></li><li>- <a href="#bytebase.v1.TriggerMetadata"><span class="badge">M</span>TriggerMetadata</a>+ <a href="#bytebase.v1.EnvironmentSetting.Environment"><span class="badge">M</span>EnvironmentSetting.Environment</a></li><li>- <a href="#bytebase.v1.UpdateDatabaseRequest"><span class="badge">M</span>UpdateDatabaseRequest</a>+ <a href="#bytebase.v1.EnvironmentSetting.Environment.TagsEntry"><span class="badge">M</span>EnvironmentSetting.Environment.TagsEntry</a></li><li>- <a href="#bytebase.v1.ViewMetadata"><span class="badge">M</span>ViewMetadata</a>+ <a href="#bytebase.v1.GetSettingRequest"><span class="badge">M</span>GetSettingRequest</a></li>-<li>- <a href="#bytebase.v1.Changelog.Status"><span class="badge">E</span>Changelog.Status</a>+ <a href="#bytebase.v1.GetSettingResponse"><span class="badge">M</span>GetSettingResponse</a></li><li>- <a href="#bytebase.v1.ChangelogView"><span class="badge">E</span>ChangelogView</a>+ <a href="#bytebase.v1.ListSettingsRequest"><span class="badge">M</span>ListSettingsRequest</a></li><li>- <a href="#bytebase.v1.ColumnMetadata.IdentityGeneration"><span class="badge">E</span>ColumnMetadata.IdentityGeneration</a>+ <a href="#bytebase.v1.ListSettingsResponse"><span class="badge">M</span>ListSettingsResponse</a></li><li>- <a href="#bytebase.v1.GenerationMetadata.Type"><span class="badge">E</span>GenerationMetadata.Type</a>+ <a href="#bytebase.v1.SemanticTypeSetting"><span class="badge">M</span>SemanticTypeSetting</a></li><li>- <a href="#bytebase.v1.GetDatabaseSDLSchemaRequest.SDLFormat"><span class="badge">E</span>GetDatabaseSDLSchemaRequest.SDLFormat</a>+ <a href="#bytebase.v1.SemanticTypeSetting.SemanticType"><span class="badge">M</span>SemanticTypeSetting.SemanticType</a></li><li>- <a href="#bytebase.v1.GetSchemaStringRequest.ObjectType"><span class="badge">E</span>GetSchemaStringRequest.ObjectType</a>+ <a href="#bytebase.v1.Setting"><span class="badge">M</span>Setting</a></li><li>- <a href="#bytebase.v1.StreamMetadata.Mode"><span class="badge">E</span>StreamMetadata.Mode</a>+ <a href="#bytebase.v1.SettingValue"><span class="badge">M</span>SettingValue</a></li><li>- <a href="#bytebase.v1.StreamMetadata.Type"><span class="badge">E</span>StreamMetadata.Type</a>+ <a href="#bytebase.v1.TestEmailSettingRequest"><span class="badge">M</span>TestEmailSettingRequest</a></li><li>- <a href="#bytebase.v1.SyncStatus"><span class="badge">E</span>SyncStatus</a>+ <a href="#bytebase.v1.TestEmailSettingResponse"><span class="badge">M</span>TestEmailSettingResponse</a></li><li>- <a href="#bytebase.v1.TablePartitionMetadata.Type"><span class="badge">E</span>TablePartitionMetadata.Type</a>+ <a href="#bytebase.v1.UpdateSettingRequest"><span class="badge">M</span>UpdateSettingRequest</a></li><li>- <a href="#bytebase.v1.TaskMetadata.State"><span class="badge">E</span>TaskMetadata.State</a>+ <a href="#bytebase.v1.WorkspaceApprovalSetting"><span class="badge">M</span>WorkspaceApprovalSetting</a></li>--<li>- <a href="#bytebase.v1.DatabaseService"><span class="badge">S</span>DatabaseService</a>+ <a href="#bytebase.v1.WorkspaceApprovalSetting.Rule"><span class="badge">M</span>WorkspaceApprovalSetting.Rule</a></li>- </ul>- </li>--- <li>- <a href="#v1%2fgroup_service.proto">v1/group_service.proto</a>- <ul>-<li>- <a href="#bytebase.v1.BatchGetGroupsRequest"><span class="badge">M</span>BatchGetGroupsRequest</a>+ <a href="#bytebase.v1.WorkspaceProfileSetting"><span class="badge">M</span>WorkspaceProfileSetting</a></li><li>- <a href="#bytebase.v1.BatchGetGroupsResponse"><span class="badge">M</span>BatchGetGroupsResponse</a>+ <a href="#bytebase.v1.WorkspaceProfileSetting.PasswordRestriction"><span class="badge">M</span>WorkspaceProfileSetting.PasswordRestriction</a></li>+<li>- <a href="#bytebase.v1.CreateGroupRequest"><span class="badge">M</span>CreateGroupRequest</a>+ <a href="#bytebase.v1.AISetting.Provider"><span class="badge">E</span>AISetting.Provider</a></li><li>- <a href="#bytebase.v1.DeleteGroupRequest"><span class="badge">M</span>DeleteGroupRequest</a>+ <a href="#bytebase.v1.Algorithm.InnerOuterMask.MaskType"><span class="badge">E</span>Algorithm.InnerOuterMask.MaskType</a></li><li>- <a href="#bytebase.v1.GetGroupRequest"><span class="badge">M</span>GetGroupRequest</a>+ <a href="#bytebase.v1.Announcement.AlertLevel"><span class="badge">E</span>Announcement.AlertLevel</a></li><li>- <a href="#bytebase.v1.Group"><span class="badge">M</span>Group</a>+ <a href="#bytebase.v1.DatabaseChangeMode"><span class="badge">E</span>DatabaseChangeMode</a></li><li>- <a href="#bytebase.v1.GroupMember"><span class="badge">M</span>GroupMember</a>+ <a href="#bytebase.v1.EmailSetting.SMTPConfig.Authentication"><span class="badge">E</span>EmailSetting.SMTPConfig.Authentication</a></li><li>- <a href="#bytebase.v1.ListGroupsRequest"><span class="badge">M</span>ListGroupsRequest</a>+ <a href="#bytebase.v1.EmailSetting.SMTPConfig.Encryption"><span class="badge">E</span>EmailSetting.SMTPConfig.Encryption</a></li><li>- <a href="#bytebase.v1.ListGroupsResponse"><span class="badge">M</span>ListGroupsResponse</a>+ <a href="#bytebase.v1.EmailSetting.Type"><span class="badge">E</span>EmailSetting.Type</a></li><li>- <a href="#bytebase.v1.UpdateGroupRequest"><span class="badge">M</span>UpdateGroupRequest</a>+ <a href="#bytebase.v1.Setting.SettingName"><span class="badge">E</span>Setting.SettingName</a></li>-<li>- <a href="#bytebase.v1.GroupMember.Role"><span class="badge">E</span>GroupMember.Role</a>+ <a href="#bytebase.v1.WorkspaceApprovalSetting.Rule.Source"><span class="badge">E</span>WorkspaceApprovalSetting.Rule.Source</a></li><li>- <a href="#bytebase.v1.GroupService"><span class="badge">S</span>GroupService</a>+ <a href="#bytebase.v1.SettingService"><span class="badge">S</span>SettingService</a></li></ul>@@ -1657,181 +1632,226 @@<li>- <a href="#v1%2fidp_service.proto">v1/idp_service.proto</a>+ <a href="#v1%2factuator_service.proto">v1/actuator_service.proto</a><ul><li>- <a href="#bytebase.v1.CreateIdentityProviderRequest"><span class="badge">M</span>CreateIdentityProviderRequest</a>+ <a href="#bytebase.v1.ActuatorInfo"><span class="badge">M</span>ActuatorInfo</a></li><li>- <a href="#bytebase.v1.DeleteIdentityProviderRequest"><span class="badge">M</span>DeleteIdentityProviderRequest</a>+ <a href="#bytebase.v1.DeleteCacheRequest"><span class="badge">M</span>DeleteCacheRequest</a></li><li>- <a href="#bytebase.v1.FieldMapping"><span class="badge">M</span>FieldMapping</a>+ <a href="#bytebase.v1.GetActuatorInfoRequest"><span class="badge">M</span>GetActuatorInfoRequest</a></li><li>- <a href="#bytebase.v1.GetIdentityProviderRequest"><span class="badge">M</span>GetIdentityProviderRequest</a>+ <a href="#bytebase.v1.Restriction"><span class="badge">M</span>Restriction</a></li><li>- <a href="#bytebase.v1.IdentityProvider"><span class="badge">M</span>IdentityProvider</a>+ <a href="#bytebase.v1.SetupSampleRequest"><span class="badge">M</span>SetupSampleRequest</a></li>- <li>- <a href="#bytebase.v1.IdentityProviderConfig"><span class="badge">M</span>IdentityProviderConfig</a>- </li>++<li>- <a href="#bytebase.v1.LDAPIdentityProviderConfig"><span class="badge">M</span>LDAPIdentityProviderConfig</a>+ <a href="#bytebase.v1.ActuatorService"><span class="badge">S</span>ActuatorService</a></li>+ </ul>+ </li>+++ <li>+ <a href="#v1%2fai_service.proto">v1/ai_service.proto</a>+ <ul>+<li>- <a href="#bytebase.v1.ListIdentityProvidersRequest"><span class="badge">M</span>ListIdentityProvidersRequest</a>+ <a href="#bytebase.v1.AIChatMessage"><span class="badge">M</span>AIChatMessage</a></li><li>- <a href="#bytebase.v1.ListIdentityProvidersResponse"><span class="badge">M</span>ListIdentityProvidersResponse</a>+ <a href="#bytebase.v1.AIChatRequest"><span class="badge">M</span>AIChatRequest</a></li><li>- <a href="#bytebase.v1.OAuth2IdentityProviderConfig"><span class="badge">M</span>OAuth2IdentityProviderConfig</a>+ <a href="#bytebase.v1.AIChatResponse"><span class="badge">M</span>AIChatResponse</a></li><li>- <a href="#bytebase.v1.OAuth2IdentityProviderTestRequestContext"><span class="badge">M</span>OAuth2IdentityProviderTestRequestContext</a>+ <a href="#bytebase.v1.AIChatToolCall"><span class="badge">M</span>AIChatToolCall</a></li><li>- <a href="#bytebase.v1.OIDCIdentityProviderConfig"><span class="badge">M</span>OIDCIdentityProviderConfig</a>+ <a href="#bytebase.v1.AIChatToolDefinition"><span class="badge">M</span>AIChatToolDefinition</a></li><li>- <a href="#bytebase.v1.OIDCIdentityProviderTestRequestContext"><span class="badge">M</span>OIDCIdentityProviderTestRequestContext</a>+ <a href="#bytebase.v1.AIChatUsage"><span class="badge">M</span>AIChatUsage</a></li>+<li>- <a href="#bytebase.v1.TestIdentityProviderRequest"><span class="badge">M</span>TestIdentityProviderRequest</a>+ <a href="#bytebase.v1.AIChatMessageRole"><span class="badge">E</span>AIChatMessageRole</a></li>++<li>- <a href="#bytebase.v1.TestIdentityProviderResponse"><span class="badge">M</span>TestIdentityProviderResponse</a>+ <a href="#bytebase.v1.AIService"><span class="badge">S</span>AIService</a></li>+ </ul>+ </li>+++ <li>+ <a href="#v1%2fiam_policy.proto">v1/iam_policy.proto</a>+ <ul>+<li>- <a href="#bytebase.v1.TestIdentityProviderResponse.ClaimsEntry"><span class="badge">M</span>TestIdentityProviderResponse.ClaimsEntry</a>+ <a href="#bytebase.v1.Binding"><span class="badge">M</span>Binding</a></li><li>- <a href="#bytebase.v1.TestIdentityProviderResponse.UserInfoEntry"><span class="badge">M</span>TestIdentityProviderResponse.UserInfoEntry</a>+ <a href="#bytebase.v1.BindingDelta"><span class="badge">M</span>BindingDelta</a></li><li>- <a href="#bytebase.v1.UpdateIdentityProviderRequest"><span class="badge">M</span>UpdateIdentityProviderRequest</a>+ <a href="#bytebase.v1.GetIamPolicyRequest"><span class="badge">M</span>GetIamPolicyRequest</a></li>-<li>- <a href="#bytebase.v1.IdentityProviderType"><span class="badge">E</span>IdentityProviderType</a>+ <a href="#bytebase.v1.IamPolicy"><span class="badge">M</span>IamPolicy</a></li><li>- <a href="#bytebase.v1.LDAPIdentityProviderConfig.SecurityProtocol"><span class="badge">E</span>LDAPIdentityProviderConfig.SecurityProtocol</a>+ <a href="#bytebase.v1.PolicyDelta"><span class="badge">M</span>PolicyDelta</a></li><li>- <a href="#bytebase.v1.OAuth2AuthStyle"><span class="badge">E</span>OAuth2AuthStyle</a>+ <a href="#bytebase.v1.SetIamPolicyRequest"><span class="badge">M</span>SetIamPolicyRequest</a></li>-<li>- <a href="#bytebase.v1.IdentityProviderService"><span class="badge">S</span>IdentityProviderService</a>+ <a href="#bytebase.v1.BindingDelta.Action"><span class="badge">E</span>BindingDelta.Action</a></li>++</ul></li><li>- <a href="#v1%2forg_policy_service.proto">v1/org_policy_service.proto</a>+ <a href="#v1%2faudit_log_service.proto">v1/audit_log_service.proto</a><ul><li>- <a href="#bytebase.v1.CreatePolicyRequest"><span class="badge">M</span>CreatePolicyRequest</a>+ <a href="#bytebase.v1.AuditData"><span class="badge">M</span>AuditData</a></li><li>- <a href="#bytebase.v1.DeletePolicyRequest"><span class="badge">M</span>DeletePolicyRequest</a>+ <a href="#bytebase.v1.AuditLog"><span class="badge">M</span>AuditLog</a></li><li>- <a href="#bytebase.v1.GetPolicyRequest"><span class="badge">M</span>GetPolicyRequest</a>+ <a href="#bytebase.v1.ExportAuditLogsRequest"><span class="badge">M</span>ExportAuditLogsRequest</a></li><li>- <a href="#bytebase.v1.ListPoliciesRequest"><span class="badge">M</span>ListPoliciesRequest</a>+ <a href="#bytebase.v1.ExportAuditLogsResponse"><span class="badge">M</span>ExportAuditLogsResponse</a></li><li>- <a href="#bytebase.v1.ListPoliciesResponse"><span class="badge">M</span>ListPoliciesResponse</a>+ <a href="#bytebase.v1.RequestMetadata"><span class="badge">M</span>RequestMetadata</a></li><li>- <a href="#bytebase.v1.MaskingExemptionPolicy"><span class="badge">M</span>MaskingExemptionPolicy</a>+ <a href="#bytebase.v1.SearchAuditLogsRequest"><span class="badge">M</span>SearchAuditLogsRequest</a></li><li>- <a href="#bytebase.v1.MaskingExemptionPolicy.Exemption"><span class="badge">M</span>MaskingExemptionPolicy.Exemption</a>+ <a href="#bytebase.v1.SearchAuditLogsResponse"><span class="badge">M</span>SearchAuditLogsResponse</a></li>+<li>- <a href="#bytebase.v1.MaskingRulePolicy"><span class="badge">M</span>MaskingRulePolicy</a>+ <a href="#bytebase.v1.AuditLog.Severity"><span class="badge">E</span>AuditLog.Severity</a>+ </li>++++ <li>+ <a href="#bytebase.v1.AuditLogService"><span class="badge">S</span>AuditLogService</a></li>+ </ul>+ </li>+++ <li>+ <a href="#v1%2fuser_service.proto">v1/user_service.proto</a>+ <ul>+<li>- <a href="#bytebase.v1.MaskingRulePolicy.MaskingRule"><span class="badge">M</span>MaskingRulePolicy.MaskingRule</a>+ <a href="#bytebase.v1.BatchGetUsersRequest"><span class="badge">M</span>BatchGetUsersRequest</a></li><li>- <a href="#bytebase.v1.Policy"><span class="badge">M</span>Policy</a>+ <a href="#bytebase.v1.BatchGetUsersResponse"><span class="badge">M</span>BatchGetUsersResponse</a></li><li>- <a href="#bytebase.v1.QueryDataPolicy"><span class="badge">M</span>QueryDataPolicy</a>+ <a href="#bytebase.v1.CreateUserRequest"><span class="badge">M</span>CreateUserRequest</a></li><li>- <a href="#bytebase.v1.RolloutPolicy"><span class="badge">M</span>RolloutPolicy</a>+ <a href="#bytebase.v1.DeleteUserRequest"><span class="badge">M</span>DeleteUserRequest</a></li><li>- <a href="#bytebase.v1.TagPolicy"><span class="badge">M</span>TagPolicy</a>+ <a href="#bytebase.v1.GetUserRequest"><span class="badge">M</span>GetUserRequest</a></li><li>- <a href="#bytebase.v1.TagPolicy.TagsEntry"><span class="badge">M</span>TagPolicy.TagsEntry</a>+ <a href="#bytebase.v1.ListUsersRequest"><span class="badge">M</span>ListUsersRequest</a></li><li>- <a href="#bytebase.v1.UpdatePolicyRequest"><span class="badge">M</span>UpdatePolicyRequest</a>+ <a href="#bytebase.v1.ListUsersResponse"><span class="badge">M</span>ListUsersResponse</a></li>+ <li>+ <a href="#bytebase.v1.UndeleteUserRequest"><span class="badge">M</span>UndeleteUserRequest</a>+ </li><li>- <a href="#bytebase.v1.PolicyResourceType"><span class="badge">E</span>PolicyResourceType</a>+ <a href="#bytebase.v1.UpdateEmailRequest"><span class="badge">M</span>UpdateEmailRequest</a></li><li>- <a href="#bytebase.v1.PolicyType"><span class="badge">E</span>PolicyType</a>+ <a href="#bytebase.v1.UpdateUserRequest"><span class="badge">M</span>UpdateUserRequest</a>+ </li>++ <li>+ <a href="#bytebase.v1.User"><span class="badge">M</span>User</a>+ </li>++ <li>+ <a href="#bytebase.v1.User.Profile"><span class="badge">M</span>User.Profile</a></li>+<li>- <a href="#bytebase.v1.OrgPolicyService"><span class="badge">S</span>OrgPolicyService</a>+ <a href="#bytebase.v1.UserService"><span class="badge">S</span>UserService</a></li></ul>@@ -1839,214 +1859,223 @@<li>- <a href="#v1%2frollout_service.proto">v1/rollout_service.proto</a>+ <a href="#v1%2fauth_service.proto">v1/auth_service.proto</a><ul><li>- <a href="#bytebase.v1.BatchCancelTaskRunsRequest"><span class="badge">M</span>BatchCancelTaskRunsRequest</a>+ <a href="#bytebase.v1.ExchangeTokenRequest"><span class="badge">M</span>ExchangeTokenRequest</a></li><li>- <a href="#bytebase.v1.BatchCancelTaskRunsResponse"><span class="badge">M</span>BatchCancelTaskRunsResponse</a>+ <a href="#bytebase.v1.ExchangeTokenResponse"><span class="badge">M</span>ExchangeTokenResponse</a></li><li>- <a href="#bytebase.v1.BatchRunTasksRequest"><span class="badge">M</span>BatchRunTasksRequest</a>+ <a href="#bytebase.v1.IdentityProviderContext"><span class="badge">M</span>IdentityProviderContext</a></li><li>- <a href="#bytebase.v1.BatchRunTasksResponse"><span class="badge">M</span>BatchRunTasksResponse</a>+ <a href="#bytebase.v1.LoginRequest"><span class="badge">M</span>LoginRequest</a></li><li>- <a href="#bytebase.v1.BatchSkipTasksRequest"><span class="badge">M</span>BatchSkipTasksRequest</a>+ <a href="#bytebase.v1.LoginResponse"><span class="badge">M</span>LoginResponse</a></li><li>- <a href="#bytebase.v1.BatchSkipTasksResponse"><span class="badge">M</span>BatchSkipTasksResponse</a>+ <a href="#bytebase.v1.LogoutRequest"><span class="badge">M</span>LogoutRequest</a></li><li>- <a href="#bytebase.v1.CreateRolloutRequest"><span class="badge">M</span>CreateRolloutRequest</a>+ <a href="#bytebase.v1.OAuth2IdentityProviderContext"><span class="badge">M</span>OAuth2IdentityProviderContext</a></li><li>- <a href="#bytebase.v1.GetRolloutRequest"><span class="badge">M</span>GetRolloutRequest</a>+ <a href="#bytebase.v1.OIDCIdentityProviderContext"><span class="badge">M</span>OIDCIdentityProviderContext</a></li><li>- <a href="#bytebase.v1.GetTaskRunLogRequest"><span class="badge">M</span>GetTaskRunLogRequest</a>+ <a href="#bytebase.v1.RefreshRequest"><span class="badge">M</span>RefreshRequest</a></li><li>- <a href="#bytebase.v1.GetTaskRunRequest"><span class="badge">M</span>GetTaskRunRequest</a>+ <a href="#bytebase.v1.RefreshResponse"><span class="badge">M</span>RefreshResponse</a></li><li>- <a href="#bytebase.v1.GetTaskRunSessionRequest"><span class="badge">M</span>GetTaskRunSessionRequest</a>+ <a href="#bytebase.v1.RequestPasswordResetRequest"><span class="badge">M</span>RequestPasswordResetRequest</a></li><li>- <a href="#bytebase.v1.ListRolloutsRequest"><span class="badge">M</span>ListRolloutsRequest</a>+ <a href="#bytebase.v1.ResetPasswordRequest"><span class="badge">M</span>ResetPasswordRequest</a></li><li>- <a href="#bytebase.v1.ListRolloutsResponse"><span class="badge">M</span>ListRolloutsResponse</a>+ <a href="#bytebase.v1.SendEmailLoginCodeRequest"><span class="badge">M</span>SendEmailLoginCodeRequest</a></li><li>- <a href="#bytebase.v1.ListTaskRunsRequest"><span class="badge">M</span>ListTaskRunsRequest</a>+ <a href="#bytebase.v1.SignupRequest"><span class="badge">M</span>SignupRequest</a></li><li>- <a href="#bytebase.v1.ListTaskRunsResponse"><span class="badge">M</span>ListTaskRunsResponse</a>+ <a href="#bytebase.v1.SwitchWorkspaceRequest"><span class="badge">M</span>SwitchWorkspaceRequest</a></li>+++<li>- <a href="#bytebase.v1.PreviewTaskRunRollbackRequest"><span class="badge">M</span>PreviewTaskRunRollbackRequest</a>+ <a href="#bytebase.v1.AuthService"><span class="badge">S</span>AuthService</a></li>+ </ul>+ </li>+++ <li>+ <a href="#v1%2fcel_service.proto">v1/cel_service.proto</a>+ <ul>+<li>- <a href="#bytebase.v1.PreviewTaskRunRollbackResponse"><span class="badge">M</span>PreviewTaskRunRollbackResponse</a>+ <a href="#bytebase.v1.BatchDeparseRequest"><span class="badge">M</span>BatchDeparseRequest</a></li><li>- <a href="#bytebase.v1.Rollout"><span class="badge">M</span>Rollout</a>+ <a href="#bytebase.v1.BatchDeparseResponse"><span class="badge">M</span>BatchDeparseResponse</a></li><li>- <a href="#bytebase.v1.Stage"><span class="badge">M</span>Stage</a>+ <a href="#bytebase.v1.BatchParseRequest"><span class="badge">M</span>BatchParseRequest</a></li><li>- <a href="#bytebase.v1.Task"><span class="badge">M</span>Task</a>+ <a href="#bytebase.v1.BatchParseResponse"><span class="badge">M</span>BatchParseResponse</a></li>+++<li>- <a href="#bytebase.v1.Task.DatabaseCreate"><span class="badge">M</span>Task.DatabaseCreate</a>+ <a href="#bytebase.v1.CelService"><span class="badge">S</span>CelService</a></li>+ </ul>+ </li>+++ <li>+ <a href="#v1%2fdatabase_catalog_service.proto">v1/database_catalog_service.proto</a>+ <ul>+<li>- <a href="#bytebase.v1.Task.DatabaseDataExport"><span class="badge">M</span>Task.DatabaseDataExport</a>+ <a href="#bytebase.v1.ColumnCatalog"><span class="badge">M</span>ColumnCatalog</a></li><li>- <a href="#bytebase.v1.Task.DatabaseUpdate"><span class="badge">M</span>Task.DatabaseUpdate</a>+ <a href="#bytebase.v1.ColumnCatalog.LabelsEntry"><span class="badge">M</span>ColumnCatalog.LabelsEntry</a></li><li>- <a href="#bytebase.v1.TaskRun"><span class="badge">M</span>TaskRun</a>+ <a href="#bytebase.v1.DatabaseCatalog"><span class="badge">M</span>DatabaseCatalog</a></li><li>- <a href="#bytebase.v1.TaskRun.SchedulerInfo"><span class="badge">M</span>TaskRun.SchedulerInfo</a>+ <a href="#bytebase.v1.GetDatabaseCatalogRequest"><span class="badge">M</span>GetDatabaseCatalogRequest</a></li><li>- <a href="#bytebase.v1.TaskRun.SchedulerInfo.WaitingCause"><span class="badge">M</span>TaskRun.SchedulerInfo.WaitingCause</a>+ <a href="#bytebase.v1.ObjectSchema"><span class="badge">M</span>ObjectSchema</a></li><li>- <a href="#bytebase.v1.TaskRunLog"><span class="badge">M</span>TaskRunLog</a>+ <a href="#bytebase.v1.ObjectSchema.ArrayKind"><span class="badge">M</span>ObjectSchema.ArrayKind</a></li><li>- <a href="#bytebase.v1.TaskRunLogEntry"><span class="badge">M</span>TaskRunLogEntry</a>+ <a href="#bytebase.v1.ObjectSchema.StructKind"><span class="badge">M</span>ObjectSchema.StructKind</a></li><li>- <a href="#bytebase.v1.TaskRunLogEntry.CommandExecute"><span class="badge">M</span>TaskRunLogEntry.CommandExecute</a>+ <a href="#bytebase.v1.ObjectSchema.StructKind.PropertiesEntry"><span class="badge">M</span>ObjectSchema.StructKind.PropertiesEntry</a></li><li>- <a href="#bytebase.v1.TaskRunLogEntry.CommandExecute.CommandResponse"><span class="badge">M</span>TaskRunLogEntry.CommandExecute.CommandResponse</a>+ <a href="#bytebase.v1.SchemaCatalog"><span class="badge">M</span>SchemaCatalog</a></li><li>- <a href="#bytebase.v1.TaskRunLogEntry.ComputeDiff"><span class="badge">M</span>TaskRunLogEntry.ComputeDiff</a>- </li>-- <li>- <a href="#bytebase.v1.TaskRunLogEntry.DatabaseSync"><span class="badge">M</span>TaskRunLogEntry.DatabaseSync</a>+ <a href="#bytebase.v1.TableCatalog"><span class="badge">M</span>TableCatalog</a></li><li>- <a href="#bytebase.v1.TaskRunLogEntry.GhostMigration"><span class="badge">M</span>TaskRunLogEntry.GhostMigration</a>+ <a href="#bytebase.v1.TableCatalog.Columns"><span class="badge">M</span>TableCatalog.Columns</a></li><li>- <a href="#bytebase.v1.TaskRunLogEntry.PriorBackup"><span class="badge">M</span>TaskRunLogEntry.PriorBackup</a>+ <a href="#bytebase.v1.UpdateDatabaseCatalogRequest"><span class="badge">M</span>UpdateDatabaseCatalogRequest</a></li>- <li>- <a href="#bytebase.v1.TaskRunLogEntry.PriorBackup.PriorBackupDetail"><span class="badge">M</span>TaskRunLogEntry.PriorBackup.PriorBackupDetail</a>- </li><li>- <a href="#bytebase.v1.TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item"><span class="badge">M</span>TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item</a>+ <a href="#bytebase.v1.ObjectSchema.Type"><span class="badge">E</span>ObjectSchema.Type</a></li>- <li>- <a href="#bytebase.v1.TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item.Table"><span class="badge">M</span>TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item.Table</a>- </li>- <li>- <a href="#bytebase.v1.TaskRunLogEntry.ReleaseFileExecute"><span class="badge">M</span>TaskRunLogEntry.ReleaseFileExecute</a>- </li><li>- <a href="#bytebase.v1.TaskRunLogEntry.RetryInfo"><span class="badge">M</span>TaskRunLogEntry.RetryInfo</a>+ <a href="#bytebase.v1.DatabaseCatalogService"><span class="badge">S</span>DatabaseCatalogService</a></li>- <li>- <a href="#bytebase.v1.TaskRunLogEntry.SchemaDump"><span class="badge">M</span>TaskRunLogEntry.SchemaDump</a>- </li>+ </ul>+ </li>+++ <li>+ <a href="#v1%2fdatabase_group_service.proto">v1/database_group_service.proto</a>+ <ul><li>- <a href="#bytebase.v1.TaskRunLogEntry.TransactionControl"><span class="badge">M</span>TaskRunLogEntry.TransactionControl</a>+ <a href="#bytebase.v1.CreateDatabaseGroupRequest"><span class="badge">M</span>CreateDatabaseGroupRequest</a></li><li>- <a href="#bytebase.v1.TaskRunSession"><span class="badge">M</span>TaskRunSession</a>+ <a href="#bytebase.v1.DatabaseGroup"><span class="badge">M</span>DatabaseGroup</a></li><li>- <a href="#bytebase.v1.TaskRunSession.Postgres"><span class="badge">M</span>TaskRunSession.Postgres</a>+ <a href="#bytebase.v1.DatabaseGroup.Database"><span class="badge">M</span>DatabaseGroup.Database</a></li><li>- <a href="#bytebase.v1.TaskRunSession.Postgres.Session"><span class="badge">M</span>TaskRunSession.Postgres.Session</a>+ <a href="#bytebase.v1.DeleteDatabaseGroupRequest"><span class="badge">M</span>DeleteDatabaseGroupRequest</a></li>-<li>- <a href="#bytebase.v1.Task.Status"><span class="badge">E</span>Task.Status</a>+ <a href="#bytebase.v1.GetDatabaseGroupRequest"><span class="badge">M</span>GetDatabaseGroupRequest</a></li><li>- <a href="#bytebase.v1.Task.Type"><span class="badge">E</span>Task.Type</a>+ <a href="#bytebase.v1.ListDatabaseGroupsRequest"><span class="badge">M</span>ListDatabaseGroupsRequest</a></li><li>- <a href="#bytebase.v1.TaskRun.ExportArchiveStatus"><span class="badge">E</span>TaskRun.ExportArchiveStatus</a>+ <a href="#bytebase.v1.ListDatabaseGroupsResponse"><span class="badge">M</span>ListDatabaseGroupsResponse</a></li><li>- <a href="#bytebase.v1.TaskRun.Status"><span class="badge">E</span>TaskRun.Status</a>+ <a href="#bytebase.v1.UpdateDatabaseGroupRequest"><span class="badge">M</span>UpdateDatabaseGroupRequest</a></li>- <li>- <a href="#bytebase.v1.TaskRunLogEntry.TransactionControl.Type"><span class="badge">E</span>TaskRunLogEntry.TransactionControl.Type</a>- </li><li>- <a href="#bytebase.v1.TaskRunLogEntry.Type"><span class="badge">E</span>TaskRunLogEntry.Type</a>+ <a href="#bytebase.v1.DatabaseGroupView"><span class="badge">E</span>DatabaseGroupView</a></li><li>- <a href="#bytebase.v1.RolloutService"><span class="badge">S</span>RolloutService</a>+ <a href="#bytebase.v1.DatabaseGroupService"><span class="badge">S</span>DatabaseGroupService</a></li></ul>@@ -2054,158 +2083,157 @@<li>- <a href="#v1%2fsql_service.proto">v1/sql_service.proto</a>+ <a href="#v1%2fgroup_service.proto">v1/group_service.proto</a><ul><li>- <a href="#bytebase.v1.AICompletionRequest"><span class="badge">M</span>AICompletionRequest</a>+ <a href="#bytebase.v1.BatchGetGroupsRequest"><span class="badge">M</span>BatchGetGroupsRequest</a></li><li>- <a href="#bytebase.v1.AICompletionRequest.Message"><span class="badge">M</span>AICompletionRequest.Message</a>+ <a href="#bytebase.v1.BatchGetGroupsResponse"><span class="badge">M</span>BatchGetGroupsResponse</a></li><li>- <a href="#bytebase.v1.AICompletionResponse"><span class="badge">M</span>AICompletionResponse</a>+ <a href="#bytebase.v1.CreateGroupRequest"><span class="badge">M</span>CreateGroupRequest</a></li><li>- <a href="#bytebase.v1.AICompletionResponse.Candidate"><span class="badge">M</span>AICompletionResponse.Candidate</a>+ <a href="#bytebase.v1.DeleteGroupRequest"><span class="badge">M</span>DeleteGroupRequest</a></li><li>- <a href="#bytebase.v1.AICompletionResponse.Candidate.Content"><span class="badge">M</span>AICompletionResponse.Candidate.Content</a>+ <a href="#bytebase.v1.GetGroupRequest"><span class="badge">M</span>GetGroupRequest</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.Group"><span class="badge">M</span>Group</a></li><li>- <a href="#bytebase.v1.AdminExecuteRequest"><span class="badge">M</span>AdminExecuteRequest</a>+ <a href="#bytebase.v1.GroupMember"><span class="badge">M</span>GroupMember</a></li><li>- <a href="#bytebase.v1.AdminExecuteResponse"><span class="badge">M</span>AdminExecuteResponse</a>+ <a href="#bytebase.v1.ListGroupsRequest"><span class="badge">M</span>ListGroupsRequest</a></li><li>- <a href="#bytebase.v1.Advice"><span class="badge">M</span>Advice</a>+ <a href="#bytebase.v1.ListGroupsResponse"><span class="badge">M</span>ListGroupsResponse</a></li><li>- <a href="#bytebase.v1.DiffMetadataRequest"><span class="badge">M</span>DiffMetadataRequest</a>+ <a href="#bytebase.v1.UpdateGroupRequest"><span class="badge">M</span>UpdateGroupRequest</a></li>- <li>- <a href="#bytebase.v1.DiffMetadataResponse"><span class="badge">M</span>DiffMetadataResponse</a>- </li><li>- <a href="#bytebase.v1.ExportRequest"><span class="badge">M</span>ExportRequest</a>+ <a href="#bytebase.v1.GroupMember.Role"><span class="badge">E</span>GroupMember.Role</a></li>- <li>- <a href="#bytebase.v1.ExportResponse"><span class="badge">M</span>ExportResponse</a>- </li>- <li>- <a href="#bytebase.v1.MaskingReason"><span class="badge">M</span>MaskingReason</a>- </li><li>- <a href="#bytebase.v1.QueryHistory"><span class="badge">M</span>QueryHistory</a>+ <a href="#bytebase.v1.GroupService"><span class="badge">S</span>GroupService</a></li>+ </ul>+ </li>+++ <li>+ <a href="#v1%2fidp_service.proto">v1/idp_service.proto</a>+ <ul>+<li>- <a href="#bytebase.v1.QueryOption"><span class="badge">M</span>QueryOption</a>+ <a href="#bytebase.v1.CreateIdentityProviderRequest"><span class="badge">M</span>CreateIdentityProviderRequest</a></li><li>- <a href="#bytebase.v1.QueryRequest"><span class="badge">M</span>QueryRequest</a>+ <a href="#bytebase.v1.DeleteIdentityProviderRequest"><span class="badge">M</span>DeleteIdentityProviderRequest</a></li><li>- <a href="#bytebase.v1.QueryResponse"><span class="badge">M</span>QueryResponse</a>+ <a href="#bytebase.v1.FieldMapping"><span class="badge">M</span>FieldMapping</a></li><li>- <a href="#bytebase.v1.QueryResult"><span class="badge">M</span>QueryResult</a>+ <a href="#bytebase.v1.GetIdentityProviderRequest"><span class="badge">M</span>GetIdentityProviderRequest</a></li><li>- <a href="#bytebase.v1.QueryResult.CommandError"><span class="badge">M</span>QueryResult.CommandError</a>+ <a href="#bytebase.v1.IdentityProvider"><span class="badge">M</span>IdentityProvider</a></li><li>- <a href="#bytebase.v1.QueryResult.Message"><span class="badge">M</span>QueryResult.Message</a>+ <a href="#bytebase.v1.IdentityProviderConfig"><span class="badge">M</span>IdentityProviderConfig</a></li><li>- <a href="#bytebase.v1.QueryResult.PostgresError"><span class="badge">M</span>QueryResult.PostgresError</a>+ <a href="#bytebase.v1.LDAPIdentityProviderConfig"><span class="badge">M</span>LDAPIdentityProviderConfig</a></li><li>- <a href="#bytebase.v1.QueryResult.SyntaxError"><span class="badge">M</span>QueryResult.SyntaxError</a>+ <a href="#bytebase.v1.ListIdentityProvidersRequest"><span class="badge">M</span>ListIdentityProvidersRequest</a></li><li>- <a href="#bytebase.v1.QueryRow"><span class="badge">M</span>QueryRow</a>+ <a href="#bytebase.v1.ListIdentityProvidersResponse"><span class="badge">M</span>ListIdentityProvidersResponse</a></li><li>- <a href="#bytebase.v1.RowValue"><span class="badge">M</span>RowValue</a>+ <a href="#bytebase.v1.OAuth2IdentityProviderConfig"><span class="badge">M</span>OAuth2IdentityProviderConfig</a></li><li>- <a href="#bytebase.v1.RowValue.Timestamp"><span class="badge">M</span>RowValue.Timestamp</a>+ <a href="#bytebase.v1.OAuth2IdentityProviderTestRequestContext"><span class="badge">M</span>OAuth2IdentityProviderTestRequestContext</a></li><li>- <a href="#bytebase.v1.RowValue.TimestampTZ"><span class="badge">M</span>RowValue.TimestampTZ</a>+ <a href="#bytebase.v1.OIDCIdentityProviderConfig"><span class="badge">M</span>OIDCIdentityProviderConfig</a></li><li>- <a href="#bytebase.v1.SearchQueryHistoriesRequest"><span class="badge">M</span>SearchQueryHistoriesRequest</a>+ <a href="#bytebase.v1.OIDCIdentityProviderTestRequestContext"><span class="badge">M</span>OIDCIdentityProviderTestRequestContext</a></li><li>- <a href="#bytebase.v1.SearchQueryHistoriesResponse"><span class="badge">M</span>SearchQueryHistoriesResponse</a>+ <a href="#bytebase.v1.TestIdentityProviderRequest"><span class="badge">M</span>TestIdentityProviderRequest</a></li>-<li>- <a href="#bytebase.v1.Advice.Level"><span class="badge">E</span>Advice.Level</a>+ <a href="#bytebase.v1.TestIdentityProviderResponse"><span class="badge">M</span>TestIdentityProviderResponse</a></li><li>- <a href="#bytebase.v1.Advice.RuleType"><span class="badge">E</span>Advice.RuleType</a>+ <a href="#bytebase.v1.TestIdentityProviderResponse.ClaimsEntry"><span class="badge">M</span>TestIdentityProviderResponse.ClaimsEntry</a></li><li>- <a href="#bytebase.v1.QueryHistory.Type"><span class="badge">E</span>QueryHistory.Type</a>+ <a href="#bytebase.v1.TestIdentityProviderResponse.UserInfoEntry"><span class="badge">M</span>TestIdentityProviderResponse.UserInfoEntry</a></li><li>- <a href="#bytebase.v1.QueryOption.MSSQLExplainFormat"><span class="badge">E</span>QueryOption.MSSQLExplainFormat</a>+ <a href="#bytebase.v1.UpdateIdentityProviderRequest"><span class="badge">M</span>UpdateIdentityProviderRequest</a></li>+<li>- <a href="#bytebase.v1.QueryOption.RedisRunCommandsOn"><span class="badge">E</span>QueryOption.RedisRunCommandsOn</a>+ <a href="#bytebase.v1.IdentityProviderType"><span class="badge">E</span>IdentityProviderType</a></li><li>- <a href="#bytebase.v1.QueryResult.CommandError.Type"><span class="badge">E</span>QueryResult.CommandError.Type</a>+ <a href="#bytebase.v1.LDAPIdentityProviderConfig.SecurityProtocol"><span class="badge">E</span>LDAPIdentityProviderConfig.SecurityProtocol</a></li><li>- <a href="#bytebase.v1.QueryResult.Message.Level"><span class="badge">E</span>QueryResult.Message.Level</a>+ <a href="#bytebase.v1.OAuth2AuthStyle"><span class="badge">E</span>OAuth2AuthStyle</a></li><li>- <a href="#bytebase.v1.SQLService"><span class="badge">S</span>SQLService</a>+ <a href="#bytebase.v1.IdentityProviderService"><span class="badge">S</span>IdentityProviderService</a></li></ul>@@ -2213,110 +2241,82 @@<li>- <a href="#v1%2fplan_service.proto">v1/plan_service.proto</a>+ <a href="#v1%2forg_policy_service.proto">v1/org_policy_service.proto</a><ul><li>- <a href="#bytebase.v1.CancelPlanCheckRunRequest"><span class="badge">M</span>CancelPlanCheckRunRequest</a>- </li>-- <li>- <a href="#bytebase.v1.CancelPlanCheckRunResponse"><span class="badge">M</span>CancelPlanCheckRunResponse</a>- </li>-- <li>- <a href="#bytebase.v1.CreatePlanRequest"><span class="badge">M</span>CreatePlanRequest</a>- </li>-- <li>- <a href="#bytebase.v1.GetPlanCheckRunRequest"><span class="badge">M</span>GetPlanCheckRunRequest</a>- </li>-- <li>- <a href="#bytebase.v1.GetPlanRequest"><span class="badge">M</span>GetPlanRequest</a>- </li>-- <li>- <a href="#bytebase.v1.ListPlansRequest"><span class="badge">M</span>ListPlansRequest</a>- </li>-- <li>- <a href="#bytebase.v1.ListPlansResponse"><span class="badge">M</span>ListPlansResponse</a>- </li>-- <li>- <a href="#bytebase.v1.Plan"><span class="badge">M</span>Plan</a>+ <a href="#bytebase.v1.CreatePolicyRequest"><span class="badge">M</span>CreatePolicyRequest</a></li><li>- <a href="#bytebase.v1.Plan.ChangeDatabaseConfig"><span class="badge">M</span>Plan.ChangeDatabaseConfig</a>+ <a href="#bytebase.v1.DeletePolicyRequest"><span class="badge">M</span>DeletePolicyRequest</a></li><li>- <a href="#bytebase.v1.Plan.CreateDatabaseConfig"><span class="badge">M</span>Plan.CreateDatabaseConfig</a>+ <a href="#bytebase.v1.GetPolicyRequest"><span class="badge">M</span>GetPolicyRequest</a></li><li>- <a href="#bytebase.v1.Plan.ExportDataConfig"><span class="badge">M</span>Plan.ExportDataConfig</a>+ <a href="#bytebase.v1.ListPoliciesRequest"><span class="badge">M</span>ListPoliciesRequest</a></li><li>- <a href="#bytebase.v1.Plan.PlanCheckRunStatusCountEntry"><span class="badge">M</span>Plan.PlanCheckRunStatusCountEntry</a>+ <a href="#bytebase.v1.ListPoliciesResponse"><span class="badge">M</span>ListPoliciesResponse</a></li><li>- <a href="#bytebase.v1.Plan.RolloutStageSummary"><span class="badge">M</span>Plan.RolloutStageSummary</a>+ <a href="#bytebase.v1.MaskingExemptionPolicy"><span class="badge">M</span>MaskingExemptionPolicy</a></li><li>- <a href="#bytebase.v1.Plan.Spec"><span class="badge">M</span>Plan.Spec</a>+ <a href="#bytebase.v1.MaskingExemptionPolicy.Exemption"><span class="badge">M</span>MaskingExemptionPolicy.Exemption</a></li><li>- <a href="#bytebase.v1.Plan.TaskStatusCount"><span class="badge">M</span>Plan.TaskStatusCount</a>+ <a href="#bytebase.v1.MaskingRulePolicy"><span class="badge">M</span>MaskingRulePolicy</a></li><li>- <a href="#bytebase.v1.PlanCheckRun"><span class="badge">M</span>PlanCheckRun</a>+ <a href="#bytebase.v1.MaskingRulePolicy.MaskingRule"><span class="badge">M</span>MaskingRulePolicy.MaskingRule</a></li><li>- <a href="#bytebase.v1.PlanCheckRun.Result"><span class="badge">M</span>PlanCheckRun.Result</a>+ <a href="#bytebase.v1.Policy"><span class="badge">M</span>Policy</a></li><li>- <a href="#bytebase.v1.PlanCheckRun.Result.SqlReviewReport"><span class="badge">M</span>PlanCheckRun.Result.SqlReviewReport</a>+ <a href="#bytebase.v1.QueryDataPolicy"><span class="badge">M</span>QueryDataPolicy</a></li><li>- <a href="#bytebase.v1.PlanCheckRun.Result.SqlSummaryReport"><span class="badge">M</span>PlanCheckRun.Result.SqlSummaryReport</a>+ <a href="#bytebase.v1.RolloutPolicy"><span class="badge">M</span>RolloutPolicy</a></li><li>- <a href="#bytebase.v1.RunPlanChecksRequest"><span class="badge">M</span>RunPlanChecksRequest</a>+ <a href="#bytebase.v1.TagPolicy"><span class="badge">M</span>TagPolicy</a></li><li>- <a href="#bytebase.v1.RunPlanChecksResponse"><span class="badge">M</span>RunPlanChecksResponse</a>+ <a href="#bytebase.v1.TagPolicy.TagsEntry"><span class="badge">M</span>TagPolicy.TagsEntry</a></li><li>- <a href="#bytebase.v1.UpdatePlanRequest"><span class="badge">M</span>UpdatePlanRequest</a>+ <a href="#bytebase.v1.UpdatePolicyRequest"><span class="badge">M</span>UpdatePolicyRequest</a></li><li>- <a href="#bytebase.v1.PlanCheckRun.Result.Type"><span class="badge">E</span>PlanCheckRun.Result.Type</a>+ <a href="#bytebase.v1.PolicyResourceType"><span class="badge">E</span>PolicyResourceType</a></li><li>- <a href="#bytebase.v1.PlanCheckRun.Status"><span class="badge">E</span>PlanCheckRun.Status</a>+ <a href="#bytebase.v1.PolicyType"><span class="badge">E</span>PolicyType</a></li><li>- <a href="#bytebase.v1.PlanService"><span class="badge">S</span>PlanService</a>+ <a href="#bytebase.v1.OrgPolicyService"><span class="badge">S</span>OrgPolicyService</a></li></ul>@@ -3837,8 +3837,8 @@ Examples:- <h3 id="bytebase.v1.Engine">Engine</h3>- <p>Database engine type.</p>+ <h3 id="bytebase.v1.ApprovalStatus">ApprovalStatus</h3>+ <p>Approval workflow status for an issue or a plan.</p><p>Lives at the top level so both plan_service.proto and issue_service.proto</p><p>can reference it without a circular import.</p><table class="enum-table"><thead><tr><td>Name</td><td>Number</td><td>Description</td></tr>@@ -3846,49 +3846,96 @@ Examples:<tbody><tr>- <td>ENGINE_UNSPECIFIED</td>+ <td>APPROVAL_STATUS_UNSPECIFIED</td><td>0</td>- <td><p>Unspecified database engine.</p></td>+ <td><p>Unspecified approval status.</p></td></tr><tr>- <td>CLICKHOUSE</td>+ <td>CHECKING</td><td>1</td>- <td><p>ClickHouse columnar database.</p></td>+ <td><p>Approval checks are being evaluated.</p></td></tr><tr>- <td>MYSQL</td>+ <td>PENDING</td><td>2</td>- <td><p>MySQL relational database.</p></td>+ <td><p>Approval is pending.</p></td></tr><tr>- <td>POSTGRES</td>+ <td>APPROVED</td><td>3</td>- <td><p>PostgreSQL relational database.</p></td>+ <td><p>Issue has been approved.</p></td></tr><tr>- <td>SNOWFLAKE</td>+ <td>REJECTED</td><td>4</td>- <td><p>Snowflake cloud data warehouse.</p></td>+ <td><p>Issue has been rejected.</p></td></tr><tr>- <td>SQLITE</td>+ <td>SKIPPED</td><td>5</td>- <td><p>SQLite embedded database.</p></td>+ <td><p>Approval was skipped.</p></td></tr>+ </tbody>+ </table>++ <h3 id="bytebase.v1.Engine">Engine</h3>+ <p>Database engine type.</p>+ <table class="enum-table">+ <thead>+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>+ </thead>+ <tbody>+<tr>- <td>TIDB</td>- <td>6</td>- <td><p>TiDB distributed SQL database.</p></td>+ <td>ENGINE_UNSPECIFIED</td>+ <td>0</td>+ <td><p>Unspecified database engine.</p></td></tr><tr>- <td>MONGODB</td>+ <td>CLICKHOUSE</td>+ <td>1</td>+ <td><p>ClickHouse columnar database.</p></td>+ </tr>++ <tr>+ <td>MYSQL</td>+ <td>2</td>+ <td><p>MySQL relational database.</p></td>+ </tr>++ <tr>+ <td>POSTGRES</td>+ <td>3</td>+ <td><p>PostgreSQL relational database.</p></td>+ </tr>++ <tr>+ <td>SNOWFLAKE</td>+ <td>4</td>+ <td><p>Snowflake cloud data warehouse.</p></td>+ </tr>++ <tr>+ <td>SQLITE</td>+ <td>5</td>+ <td><p>SQLite embedded database.</p></td>+ </tr>++ <tr>+ <td>TIDB</td>+ <td>6</td>+ <td><p>TiDB distributed SQL database.</p></td>+ </tr>++ <tr>+ <td>MONGODB</td><td>7</td><td><p>MongoDB document database.</p></td></tr>@@ -4479,12 +4526,12 @@ Examples:<div class="file-heading">- <h2 id="v1/issue_service.proto">v1/issue_service.proto</h2><a href="#title">Top</a>+ <h2 id="v1/rollout_service.proto">v1/rollout_service.proto</h2><a href="#title">Top</a></div><p></p>- <h3 id="bytebase.v1.ApprovalFlow">ApprovalFlow</h3>+ <h3 id="bytebase.v1.BatchCancelTaskRunsRequest">BatchCancelTaskRunsRequest</h3><p></p>@@ -4495,10 +4542,20 @@ Examples:<tbody><tr>- <td>roles</td>+ <td>parent</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The task name for the taskRuns.+Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}+Use `projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/-` to cancel task runs under the same stage. </p></td>+ </tr>++ <tr>+ <td>task_runs</td><td><a href="#string">string</a></td><td>repeated</td>- <td><p>The roles required for approval in order. </p></td>+ <td><p>The taskRuns to cancel.+Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun} </p></td></tr></tbody>@@ -4508,7 +4565,14 @@ Examples:- <h3 id="bytebase.v1.ApprovalTemplate">ApprovalTemplate</h3>+ <h3 id="bytebase.v1.BatchCancelTaskRunsResponse">BatchCancelTaskRunsResponse</h3>+ <p></p>++++++ <h3 id="bytebase.v1.BatchRunTasksRequest">BatchRunTasksRequest</h3><p></p>@@ -4519,24 +4583,33 @@ Examples:<tbody><tr>- <td>flow</td>- <td><a href="#bytebase.v1.ApprovalFlow">ApprovalFlow</a></td>+ <td>parent</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>The approval flow definition. </p></td>+ <td><p>The stage name for the tasks.+Format: projects/{project}/plans/{plan}/rollout/stages/{stage} </p></td></tr><tr>- <td>title</td>+ <td>tasks</td><td><a href="#string">string</a></td>- <td></td>- <td><p>The title of the approval template. </p></td>+ <td>repeated</td>+ <td><p>The tasks to run.+Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task} </p></td></tr><tr>- <td>description</td>- <td><a href="#string">string</a></td>+ <td>run_time</td>+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>+ <td>optional</td>+ <td><p>The task run should run after run_time. </p></td>+ </tr>++ <tr>+ <td>skip_prior_backup</td>+ <td><a href="#bool">bool</a></td><td></td>- <td><p>The description of the approval template. </p></td>+ <td><p>If true, skip prior backup for this run even if the task has prior backup enabled. </p></td></tr></tbody>@@ -4546,7 +4619,14 @@ Examples:- <h3 id="bytebase.v1.ApproveIssueRequest">ApproveIssueRequest</h3>+ <h3 id="bytebase.v1.BatchRunTasksResponse">BatchRunTasksResponse</h3>+ <p></p>++++++ <h3 id="bytebase.v1.BatchSkipTasksRequest">BatchSkipTasksRequest</h3><p></p>@@ -4557,18 +4637,26 @@ Examples:<tbody><tr>- <td>name</td>+ <td>parent</td><td><a href="#string">string</a></td><td></td>- <td><p>The name of the issue to add an approver.-Format: projects/{project}/issues/{issue} </p></td>+ <td><p>The stage name for the tasks.+Format: projects/{project}/plans/{plan}/rollout/stages/{stage} </p></td></tr><tr>- <td>comment</td>+ <td>tasks</td>+ <td><a href="#string">string</a></td>+ <td>repeated</td>+ <td><p>The tasks to skip.+Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task} </p></td>+ </tr>++ <tr>+ <td>reason</td><td><a href="#string">string</a></td><td></td>- <td><p>The comment explaining the approval decision. </p></td>+ <td><p>The reason for skipping the tasks. </p></td></tr></tbody>@@ -4578,7 +4666,14 @@ Format: projects/{project}/issues/{issue} </p></td>- <h3 id="bytebase.v1.BatchUpdateIssuesStatusRequest">BatchUpdateIssuesStatusRequest</h3>+ <h3 id="bytebase.v1.BatchSkipTasksResponse">BatchSkipTasksResponse</h3>+ <p></p>++++++ <h3 id="bytebase.v1.CreateRolloutRequest">CreateRolloutRequest</h3><p></p>@@ -4592,32 +4687,18 @@ Format: projects/{project}/issues/{issue} </p></td><td>parent</td><td><a href="#string">string</a></td><td></td>- <td><p>The parent resource shared by all issues being updated.-Format: projects/{project}-If the operation spans parents, a dash (-) may be accepted as a wildcard.-We only support updating the status of databases for now. </p></td>- </tr>-- <tr>- <td>issues</td>- <td><a href="#string">string</a></td>- <td>repeated</td>- <td><p>The list of issues to update.-Format: projects/{project}/issues/{issue} </p></td>- </tr>-- <tr>- <td>status</td>- <td><a href="#bytebase.v1.IssueStatus">IssueStatus</a></td>- <td></td>- <td><p>The new status. </p></td>+ <td><p>The parent plan for which this rollout will be created.+Format: projects/{project}/plans/{plan} </p></td></tr><tr>- <td>reason</td>+ <td>target</td><td><a href="#string">string</a></td>- <td></td>- <td><p>The reason for the status change. </p></td>+ <td>optional</td>+ <td><p>Create the rollout only for the specified target.+Format: environments/{environment}+If unspecified, all stages are created.+If set to "", no stages are created. </p></td></tr></tbody>@@ -4627,14 +4708,33 @@ Format: projects/{project}/issues/{issue} </p></td>- <h3 id="bytebase.v1.BatchUpdateIssuesStatusResponse">BatchUpdateIssuesStatusResponse</h3>+ <h3 id="bytebase.v1.GetRolloutRequest">GetRolloutRequest</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 rollout to retrieve.+This is the rollout resource name, which is the plan name plus /rollout suffix.+Format: projects/{project}/plans/{plan}/rollout </p></td>+ </tr>++ </tbody>+ </table>++- <h3 id="bytebase.v1.CreateIssueCommentRequest">CreateIssueCommentRequest</h3>+ <h3 id="bytebase.v1.GetTaskRunLogRequest">GetTaskRunLogRequest</h3><p></p>@@ -4648,15 +4748,7 @@ Format: projects/{project}/issues/{issue} </p></td><td>parent</td><td><a href="#string">string</a></td><td></td>- <td><p>The issue name-Format: projects/{project}/issues/{issue} </p></td>- </tr>-- <tr>- <td>issue_comment</td>- <td><a href="#bytebase.v1.IssueComment">IssueComment</a></td>- <td></td>- <td><p>The comment to create. </p></td>+ <td><p>Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun} </p></td></tr></tbody>@@ -4666,7 +4758,7 @@ Format: projects/{project}/issues/{issue} </p></td>- <h3 id="bytebase.v1.CreateIssueRequest">CreateIssueRequest</h3>+ <h3 id="bytebase.v1.GetTaskRunRequest">GetTaskRunRequest</h3><p></p>@@ -4677,18 +4769,10 @@ Format: projects/{project}/issues/{issue} </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 issues.-Format: projects/{project} </p></td>- </tr>-- <tr>- <td>issue</td>- <td><a href="#bytebase.v1.Issue">Issue</a></td>- <td></td>- <td><p>The issue to create. </p></td>+ <td><p>Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun} </p></td></tr></tbody>@@ -4698,7 +4782,7 @@ Format: projects/{project} </p></td>- <h3 id="bytebase.v1.GetIssueRequest">GetIssueRequest</h3>+ <h3 id="bytebase.v1.GetTaskRunSessionRequest">GetTaskRunSessionRequest</h3><p></p>@@ -4709,18 +4793,10 @@ Format: projects/{project} </p></td><tbody><tr>- <td>name</td>+ <td>parent</td><td><a href="#string">string</a></td><td></td>- <td><p>The name of the issue to retrieve.-Format: projects/{project}/issues/{issue} </p></td>- </tr>-- <tr>- <td>force</td>- <td><a href="#bool">bool</a></td>- <td></td>- <td><p>If set to true, bypass cache and fetch the latest data. </p></td>+ <td><p>Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun} </p></td></tr></tbody>@@ -4730,7 +4806,7 @@ Format: projects/{project}/issues/{issue} </p></td>- <h3 id="bytebase.v1.Issue">Issue</h3>+ <h3 id="bytebase.v1.ListRolloutsRequest">ListRolloutsRequest</h3><p></p>@@ -4741,119 +4817,155 @@ Format: projects/{project}/issues/{issue} </p></td><tbody><tr>- <td>name</td>+ <td>parent</td><td><a href="#string">string</a></td><td></td>- <td><p>The name of the issue.-Format: projects/{project}/issues/{issue} </p></td>+ <td><p>The parent, which owns this collection of rollouts.+Format: projects/{project}+Use "projects/-" to list all rollouts from all projects. </p></td></tr><tr>- <td>title</td>- <td><a href="#string">string</a></td>+ <td>page_size</td>+ <td><a href="#int32">int32</a></td><td></td>- <td><p>The title of the issue. </p></td>+ <td><p>The maximum number of rollouts to return. The service may return fewer than+this value.+If unspecified, at most 10 rollouts will be returned.+The maximum value is 1000; values above 1000 will be coerced to 1000. </p></td></tr><tr>- <td>description</td>+ <td>page_token</td><td><a href="#string">string</a></td><td></td>- <td><p>The description of the issue. </p></td>- </tr>-- <tr>- <td>type</td>- <td><a href="#bytebase.v1.Issue.Type">Issue.Type</a></td>- <td></td>- <td><p> </p></td>+ <td><p>A page token, received from a previous `ListRollouts` call.+Provide this to retrieve the subsequent page.++When paginating, all other parameters provided to `ListRollouts` must match+the call that provided the page token. </p></td></tr><tr>- <td>status</td>- <td><a href="#bytebase.v1.IssueStatus">IssueStatus</a></td>+ <td>filter</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>The status of the issue. </p></td>+ <td><p>Filter is used to filter rollouts returned in the list.+The syntax and semantics of CEL are documented at https://github.com/google/cel-spec++Supported filters:+- update_time: rollout update time in "2006-01-02T15:04:05Z07:00" format, support ">=" or "<=" operator.+- task_type: the task type, support "in" operator, check the Task.Type enum for the values.++For example:+update_time >= "2025-01-02T15:04:05Z07:00"+task_type in ["DATABASE_MIGRATE", "DATABASE_EXPORT"] </p></td></tr>- <tr>- <td>approvers</td>- <td><a href="#bytebase.v1.Issue.Approver">Issue.Approver</a></td>- <td>repeated</td>- <td><p> </p></td>- </tr>+ </tbody>+ </table>++++++ <h3 id="bytebase.v1.ListRolloutsResponse">ListRolloutsResponse</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>approval_template</td>- <td><a href="#bytebase.v1.ApprovalTemplate">ApprovalTemplate</a></td>- <td></td>- <td><p>The approval template for the issue. </p></td>+ <td>rollouts</td>+ <td><a href="#bytebase.v1.Rollout">Rollout</a></td>+ <td>repeated</td>+ <td><p>The rollouts from the specified request. </p></td></tr><tr>- <td>creator</td>+ <td>next_page_token</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>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>- <tr>- <td>update_time</td>- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>- <td></td>- <td><p> </p></td>- </tr>+ </tbody>+ </table>++++++ <h3 id="bytebase.v1.ListTaskRunsRequest">ListTaskRunsRequest</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</td>+ <td>parent</td><td><a href="#string">string</a></td><td></td>- <td><p>The plan associated with the issue.-Can be empty.-Format: projects/{project}/plans/{plan} </p></td>- </tr>-- <tr>- <td>role_grant</td>- <td><a href="#bytebase.v1.RoleGrant">RoleGrant</a></td>- <td></td>- <td><p>Used if the issue type is ROLE_GRANT. </p></td>+ <td><p>The parent, which owns this collection of taskRuns.+Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}+Use "projects/{project}/plans/{plan}/rollout/stages/-/tasks/-" to list all taskRuns from a rollout. </p></td></tr>- <tr>- <td>risk_level</td>- <td><a href="#bytebase.v1.RiskLevel">RiskLevel</a></td>- <td></td>- <td><p>The risk level of the issue. </p></td>- </tr>+ </tbody>+ </table>++++++ <h3 id="bytebase.v1.ListTaskRunsResponse">ListTaskRunsResponse</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>labels</td>- <td><a href="#string">string</a></td>+ <td>task_runs</td>+ <td><a href="#bytebase.v1.TaskRun">TaskRun</a></td><td>repeated</td>- <td><p>Labels attached to the issue for categorization and filtering. </p></td>+ <td><p>The taskRuns from the specified request. </p></td></tr>- <tr>- <td>approval_status</td>- <td><a href="#bytebase.v1.Issue.ApprovalStatus">Issue.ApprovalStatus</a></td>- <td></td>- <td><p> </p></td>- </tr>+ </tbody>+ </table>++++++ <h3 id="bytebase.v1.PreviewTaskRunRollbackRequest">PreviewTaskRunRollbackRequest</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>access_grant</td>+ <td>name</td><td><a href="#string">string</a></td><td></td>- <td><p>The access grant associated with this issue.-Format: projects/{project}/accessGrants/{access_grant} </p></td>+ <td><p>Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun} </p></td></tr></tbody>@@ -4863,8 +4975,8 @@ Format: projects/{project}/accessGrants/{access_grant} </p></td>- <h3 id="bytebase.v1.Issue.Approver">Issue.Approver</h3>- <p>Approvers and their approval status for the issue.</p>+ <h3 id="bytebase.v1.PreviewTaskRunRollbackResponse">PreviewTaskRunRollbackResponse</h3>+ <p></p><table class="field-table">@@ -4874,17 +4986,10 @@ Format: projects/{project}/accessGrants/{access_grant} </p></td><tbody><tr>- <td>status</td>- <td><a href="#bytebase.v1.Issue.Approver.Status">Issue.Approver.Status</a></td>- <td></td>- <td><p>The new status. </p></td>- </tr>-- <tr>- <td>principal</td>+ <td>statement</td><td><a href="#string">string</a></td><td></td>- <td><p>Format: users/[email protected] </p></td>+ <td><p>The rollback SQL statement that would undo the task run. </p></td></tr></tbody>@@ -4894,8 +4999,8 @@ Format: projects/{project}/accessGrants/{access_grant} </p></td>- <h3 id="bytebase.v1.IssueComment">IssueComment</h3>- <p>A comment on an issue.</p>+ <h3 id="bytebase.v1.Rollout">Rollout</h3>+ <p></p><table class="field-table">@@ -4908,21 +5013,23 @@ Format: projects/{project}/accessGrants/{access_grant} </p></td><td>name</td><td><a href="#string">string</a></td><td></td>- <td><p>Format: projects/{project}/issues/{issue}/issueComments/{issueComment-uid} </p></td>+ <td><p>The resource name of the rollout.+Format: projects/{project}/plans/{plan}/rollout </p></td></tr><tr>- <td>comment</td>+ <td>title</td><td><a href="#string">string</a></td><td></td>- <td><p>The text content of the comment. </p></td>+ <td><p>The title of the rollout, inherited from the associated plan.+This field is output only and cannot be directly set. </p></td></tr><tr>- <td>payload</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>TODO: use struct message instead. </p></td>+ <td>stages</td>+ <td><a href="#bytebase.v1.Stage">Stage</a></td>+ <td>repeated</td>+ <td><p>Stages and thus tasks of the rollout. </p></td></tr><tr>@@ -4939,34 +5046,6 @@ Format: projects/{project}/accessGrants/{access_grant} </p></td><td><p> </p></td></tr>- <tr>- <td>creator</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>Format: users/{email} </p></td>- </tr>-- <tr>- <td>approval</td>- <td><a href="#bytebase.v1.IssueComment.Approval">IssueComment.Approval</a></td>- <td></td>- <td><p>Approval event. </p></td>- </tr>-- <tr>- <td>issue_update</td>- <td><a href="#bytebase.v1.IssueComment.IssueUpdate">IssueComment.IssueUpdate</a></td>- <td></td>- <td><p>Issue update event. </p></td>- </tr>-- <tr>- <td>plan_spec_update</td>- <td><a href="#bytebase.v1.IssueComment.PlanSpecUpdate">IssueComment.PlanSpecUpdate</a></td>- <td></td>- <td><p>Plan spec update event. </p></td>- </tr>-</tbody></table>@@ -4974,8 +5053,8 @@ Format: projects/{project}/accessGrants/{access_grant} </p></td>- <h3 id="bytebase.v1.IssueComment.Approval">IssueComment.Approval</h3>- <p>Approval event information.</p>+ <h3 id="bytebase.v1.Stage">Stage</h3>+ <p></p><table class="field-table">@@ -4985,10 +5064,35 @@ Format: projects/{project}/accessGrants/{access_grant} </p></td><tbody><tr>- <td>status</td>- <td><a href="#bytebase.v1.IssueComment.Approval.Status">IssueComment.Approval.Status</a></td>+ <td>name</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>The approval status. </p></td>+ <td><p>Format: projects/{project}/plans/{plan}/rollout/stages/{stage}+Use "-" for {stage} when the stage has no environment or deleted environment. </p></td>+ </tr>++ <tr>+ <td>id</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>id is the environment id of the stage.+e.g., "prod".+Use "-" when the stage has no environment or deleted environment. </p></td>+ </tr>++ <tr>+ <td>environment</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>environment is the environment of the stage.+Format: environments/{environment} for valid environments, or "environments/-" for stages without environment or with deleted environments. </p></td>+ </tr>++ <tr>+ <td>tasks</td>+ <td><a href="#bytebase.v1.Task">Task</a></td>+ <td>repeated</td>+ <td><p>The tasks within this stage. </p></td></tr></tbody>@@ -4998,8 +5102,8 @@ Format: projects/{project}/accessGrants/{access_grant} </p></td>- <h3 id="bytebase.v1.IssueComment.IssueUpdate">IssueComment.IssueUpdate</h3>- <p>Issue update event information.</p>+ <h3 id="bytebase.v1.Task">Task</h3>+ <p></p><table class="field-table">@@ -5009,61 +5113,85 @@ Format: projects/{project}/accessGrants/{access_grant} </p></td><tbody><tr>- <td>from_title</td>+ <td>name</td><td><a href="#string">string</a></td>- <td>optional</td>- <td><p> </p></td>+ <td></td>+ <td><p>Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task} </p></td></tr><tr>- <td>to_title</td>+ <td>spec_id</td><td><a href="#string">string</a></td>- <td>optional</td>- <td><p> </p></td>+ <td></td>+ <td><p>A UUID4 string that uniquely identifies the Spec. </p></td></tr><tr>- <td>from_description</td>- <td><a href="#string">string</a></td>- <td>optional</td>- <td><p> </p></td>+ <td>status</td>+ <td><a href="#bytebase.v1.Task.Status">Task.Status</a></td>+ <td></td>+ <td><p>Status is the status of the task. </p></td></tr><tr>- <td>to_description</td>+ <td>skipped_reason</td><td><a href="#string">string</a></td>- <td>optional</td>- <td><p> </p></td>+ <td></td>+ <td><p>The reason why the task was skipped. </p></td></tr><tr>- <td>from_status</td>- <td><a href="#bytebase.v1.IssueStatus">IssueStatus</a></td>- <td>optional</td>+ <td>type</td>+ <td><a href="#bytebase.v1.Task.Type">Task.Type</a></td>+ <td></td><td><p> </p></td></tr><tr>- <td>to_status</td>- <td><a href="#bytebase.v1.IssueStatus">IssueStatus</a></td>- <td>optional</td>+ <td>target</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>Format: instances/{instance} if the task is DatabaseCreate.+Format: instances/{instance}/databases/{database} </p></td>+ </tr>++ <tr>+ <td>database_create</td>+ <td><a href="#bytebase.v1.Task.DatabaseCreate">Task.DatabaseCreate</a></td>+ <td></td><td><p> </p></td></tr><tr>- <td>from_labels</td>- <td><a href="#string">string</a></td>- <td>repeated</td>+ <td>database_update</td>+ <td><a href="#bytebase.v1.Task.DatabaseUpdate">Task.DatabaseUpdate</a></td>+ <td></td><td><p> </p></td></tr><tr>- <td>to_labels</td>- <td><a href="#string">string</a></td>- <td>repeated</td>+ <td>database_data_export</td>+ <td><a href="#bytebase.v1.Task.DatabaseDataExport">Task.DatabaseDataExport</a></td>+ <td></td><td><p> </p></td></tr>+ <tr>+ <td>update_time</td>+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>+ <td>optional</td>+ <td><p>The update_time is the update time of latest task run.+If there are no task runs, it will be empty. </p></td>+ </tr>++ <tr>+ <td>run_time</td>+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>+ <td>optional</td>+ <td><p>The run_time is the scheduled run time of latest task run.+If there are no task runs or the task run is not scheduled, it will be empty. </p></td>+ </tr>+</tbody></table>@@ -5071,8 +5199,8 @@ Format: projects/{project}/accessGrants/{access_grant} </p></td>- <h3 id="bytebase.v1.IssueComment.PlanSpecUpdate">IssueComment.PlanSpecUpdate</h3>- <p>Plan spec update event information (tracks sheet changes to plan specs).</p>+ <h3 id="bytebase.v1.Task.DatabaseCreate">Task.DatabaseCreate</h3>+ <p>Payload for creating a new database.</p><table class="field-table">@@ -5082,27 +5210,10 @@ Format: projects/{project}/accessGrants/{access_grant} </p></td><tbody><tr>- <td>spec</td>+ <td>sheet</td><td><a href="#string">string</a></td><td></td>- <td><p>The spec that was updated.-Format: projects/{project}/plans/{plan}/specs/{spec} </p></td>- </tr>-- <tr>- <td>from_sheet</td>- <td><a href="#string">string</a></td>- <td>optional</td>- <td><p>The previous sheet.-Format: projects/{project}/sheets/{sheet} </p></td>- </tr>-- <tr>- <td>to_sheet</td>- <td><a href="#string">string</a></td>- <td>optional</td>- <td><p>The new sheet.-Format: projects/{project}/sheets/{sheet} </p></td>+ <td><p>Format: projects/{project}/sheets/{sheet} </p></td></tr></tbody>@@ -5112,8 +5223,8 @@ Format: projects/{project}/sheets/{sheet} </p></td>- <h3 id="bytebase.v1.ListIssueCommentsRequest">ListIssueCommentsRequest</h3>- <p></p>+ <h3 id="bytebase.v1.Task.DatabaseDataExport">Task.DatabaseDataExport</h3>+ <p>Payload for exporting database data.</p><table class="field-table">@@ -5123,31 +5234,11 @@ Format: projects/{project}/sheets/{sheet} </p></td><tbody><tr>- <td>parent</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>Format: projects/{projects}/issues/{issue} </p></td>- </tr>-- <tr>- <td>page_size</td>- <td><a href="#int32">int32</a></td>- <td></td>- <td><p>The maximum number of issue comments to return. The service may return fewer than-this value.-If unspecified, at most 10 issue comments 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>sheet</td><td><a href="#string">string</a></td><td></td>- <td><p>A page token, received from a previous `ListIssueComments` call.-Provide this to retrieve the subsequent page.--When paginating, all other parameters provided to `ListIssueComments` must match-the call that provided the page token. </p></td>+ <td><p>The resource name of the sheet.+Format: projects/{project}/sheets/{sheet} </p></td></tr></tbody>@@ -5157,8 +5248,8 @@ the call that provided the page token. </p></td>- <h3 id="bytebase.v1.ListIssueCommentsResponse">ListIssueCommentsResponse</h3>- <p></p>+ <h3 id="bytebase.v1.Task.DatabaseUpdate">Task.DatabaseUpdate</h3>+ <p>Payload for updating a database schema.</p><table class="field-table">@@ -5168,18 +5259,17 @@ the call that provided the page token. </p></td><tbody><tr>- <td>issue_comments</td>- <td><a href="#bytebase.v1.IssueComment">IssueComment</a></td>- <td>repeated</td>- <td><p>The issue comments from the specified request. </p></td>+ <td>sheet</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>Format: projects/{project}/sheets/{sheet} </p></td></tr><tr>- <td>next_page_token</td>+ <td>release</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>Format: projects/{project}/releases/{release} </p></td></tr></tbody>@@ -5189,7 +5279,7 @@ If this field is omitted, there are no subsequent pages. </p></td>- <h3 id="bytebase.v1.ListIssuesRequest">ListIssuesRequest</h3>+ <h3 id="bytebase.v1.TaskRun">TaskRun</h3><p></p>@@ -5200,78 +5290,84 @@ 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 issues.-Format: projects/{project} </p></td>+ <td><p>Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun} </p></td></tr><tr>- <td>page_size</td>- <td><a href="#int32">int32</a></td>+ <td>creator</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>The maximum number of issues to return. The service may return fewer than-this value.-If unspecified, at most 10 issues will be returned.-The maximum value is 1000; values above 1000 will be coerced to 1000. </p></td>+ <td><p>Format: users/[email protected] </p></td></tr><tr>- <td>page_token</td>- <td><a href="#string">string</a></td>+ <td>create_time</td>+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td><td></td>- <td><p>A page token, received from a previous `ListIssues` call.-Provide this to retrieve the subsequent page.--When paginating, all other parameters provided to `ListIssues` must match-the call that provided the page token. </p></td>+ <td><p> </p></td></tr><tr>- <td>filter</td>- <td><a href="#string">string</a></td>+ <td>update_time</td>+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td><td></td>- <td><p>Filter is used to filter issues returned in the list.-The syntax and semantics of CEL are documented at https://github.com/google/cel-spec--Supported filters:-- creator: issue creator full name in "users/{email or id}" format, support "==" operator.-- status: the issue status, support "==" and "in" operator, check the IssueStatus enum for the values.-- create_time: issue create time in "2006-01-02T15:04:05Z07:00" format, support ">=" or "<=" operator.-- type: the issue type, support "==" and "in" operator, check the Type enum in the Issue message for the values.-- labels: the issue labels, support "==" and "in" operator.-- risk_level: the issue risk level, support "in" operator, check the RiskLevel enum for the values.-- approval_status: issue approval status, support "==" operator.-- current_approver: the issue approver, should in "users/{email} format", support "==" operator.--For example:-creator == "users/[email protected]" && status in ["OPEN", "DONE"]-status == "CANCELED" && type == "DATABASE_CHANGE"-labels in ["label1", "label2"]-risk_level in ["HIGH", "MODERATE"]-create_time >= "2025-01-02T15:04:05Z07:00" </p></td>+ <td><p> </p></td></tr><tr>- <td>query</td>- <td><a href="#string">string</a></td>+ <td>status</td>+ <td><a href="#bytebase.v1.TaskRun.Status">TaskRun.Status</a></td><td></td>- <td><p>Query is the query statement. </p></td>+ <td><p>The current execution status of the task run. </p></td></tr><tr>- <td>order_by</td>+ <td>detail</td><td><a href="#string">string</a></td><td></td>- <td><p>The order by of issues.-Support:-- create_time-- update_time-The default sorting order is ascending.-For example:-- order_by = "create_time desc"-- order_by = "update_time asc" </p></td>+ <td><p>Below are the results of a task run.+Detailed information about the task run result. </p></td>+ </tr>++ <tr>+ <td>start_time</td>+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>+ <td></td>+ <td><p>The time when the task run started execution. </p></td>+ </tr>++ <tr>+ <td>export_archive_status</td>+ <td><a href="#bytebase.v1.TaskRun.ExportArchiveStatus">TaskRun.ExportArchiveStatus</a></td>+ <td></td>+ <td><p>The export archive status for data export tasks. </p></td>+ </tr>++ <tr>+ <td>has_prior_backup</td>+ <td><a href="#bool">bool</a></td>+ <td></td>+ <td><p>Indicates whether a prior backup was created for this task run.+When true, rollback SQL can be generated via PreviewTaskRunRollback.+Backup details are available in the task run logs. </p></td>+ </tr>++ <tr>+ <td>scheduler_info</td>+ <td><a href="#bytebase.v1.TaskRun.SchedulerInfo">TaskRun.SchedulerInfo</a></td>+ <td></td>+ <td><p>Scheduling information about the task run. </p></td>+ </tr>++ <tr>+ <td>run_time</td>+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>+ <td>optional</td>+ <td><p>The task run should run after run_time.+This can only be set when creating the task run calling BatchRunTasks. </p></td></tr></tbody>@@ -5281,8 +5377,8 @@ For example:- <h3 id="bytebase.v1.ListIssuesResponse">ListIssuesResponse</h3>- <p></p>+ <h3 id="bytebase.v1.TaskRun.SchedulerInfo">TaskRun.SchedulerInfo</h3>+ <p>Information about task run scheduling.</p><table class="field-table">@@ -5292,18 +5388,17 @@ For example:<tbody><tr>- <td>issues</td>- <td><a href="#bytebase.v1.Issue">Issue</a></td>- <td>repeated</td>- <td><p>The issues from the specified request. </p></td>+ <td>report_time</td>+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>+ <td></td>+ <td><p>The time when the scheduling info was reported. </p></td></tr><tr>- <td>next_page_token</td>- <td><a href="#string">string</a></td>+ <td>waiting_cause</td>+ <td><a href="#bytebase.v1.TaskRun.SchedulerInfo.WaitingCause">TaskRun.SchedulerInfo.WaitingCause</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 cause for the task run waiting. </p></td></tr></tbody>@@ -5313,8 +5408,8 @@ If this field is omitted, there are no subsequent pages. </p></td>- <h3 id="bytebase.v1.RejectIssueRequest">RejectIssueRequest</h3>- <p></p>+ <h3 id="bytebase.v1.TaskRun.SchedulerInfo.WaitingCause">TaskRun.SchedulerInfo.WaitingCause</h3>+ <p>Information about why a task run is waiting.</p><table class="field-table">@@ -5324,18 +5419,10 @@ 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>parallel_tasks_limit</td>+ <td><a href="#bool">bool</a></td><td></td>- <td><p>The name of the issue to add a rejection.-Format: projects/{project}/issues/{issue} </p></td>- </tr>-- <tr>- <td>comment</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The comment explaining the rejection decision. </p></td>+ <td><p>Waiting due to parallel tasks limit. </p></td></tr></tbody>@@ -5345,7 +5432,7 @@ Format: projects/{project}/issues/{issue} </p></td>- <h3 id="bytebase.v1.RequestIssueRequest">RequestIssueRequest</h3>+ <h3 id="bytebase.v1.TaskRunLog">TaskRunLog</h3><p></p>@@ -5359,15 +5446,14 @@ Format: projects/{project}/issues/{issue} </p></td><td>name</td><td><a href="#string">string</a></td><td></td>- <td><p>The name of the issue to request a issue.-Format: projects/{project}/issues/{issue} </p></td>+ <td><p>Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun}/log </p></td></tr><tr>- <td>comment</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The comment explaining the request. </p></td>+ <td>entries</td>+ <td><a href="#bytebase.v1.TaskRunLogEntry">TaskRunLogEntry</a></td>+ <td>repeated</td>+ <td><p>The log entries for this task run. </p></td></tr></tbody>@@ -5377,7 +5463,7 @@ Format: projects/{project}/issues/{issue} </p></td>- <h3 id="bytebase.v1.RetryIssueApprovalRequest">RetryIssueApprovalRequest</h3>+ <h3 id="bytebase.v1.TaskRunLogEntry">TaskRunLogEntry</h3><p></p>@@ -5388,134 +5474,87 @@ Format: projects/{project}/issues/{issue} </p></td><tbody><tr>- <td>name</td>- <td><a href="#string">string</a></td>+ <td>type</td>+ <td><a href="#bytebase.v1.TaskRunLogEntry.Type">TaskRunLogEntry.Type</a></td><td></td>- <td><p>The name of the issue whose approval-finding should be retried.-Format: projects/{project}/issues/{issue} </p></td>+ <td><p>The type of this log entry. </p></td></tr>- </tbody>- </table>------ <h3 id="bytebase.v1.RoleGrant">RoleGrant</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>role</td>- <td><a href="#string">string</a></td>+ <td>log_time</td>+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td><td></td>- <td><p>The requested role.-Format: roles/EXPORTER. </p></td>+ <td><p>The time when the log was recorded. </p></td></tr><tr>- <td>user</td>+ <td>replica_id</td><td><a href="#string">string</a></td><td></td>- <td><p>The user to be granted.-Format: users/{email}. </p></td>+ <td><p>The replica ID for this log entry. </p></td></tr><tr>- <td>condition</td>- <td><a href="#google.type.Expr">google.type.Expr</a></td>+ <td>schema_dump</td>+ <td><a href="#bytebase.v1.TaskRunLogEntry.SchemaDump">TaskRunLogEntry.SchemaDump</a></td><td></td>- <td><p>The condition for the role. Same as the condition in IAM Binding message. </p></td>+ <td><p>Schema dump details (if type is SCHEMA_DUMP). </p></td></tr><tr>- <td>expiration</td>- <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>+ <td>command_execute</td>+ <td><a href="#bytebase.v1.TaskRunLogEntry.CommandExecute">TaskRunLogEntry.CommandExecute</a></td><td></td>- <td><p>The duration for which the grant is valid. </p></td>+ <td><p>Command execution details (if type is COMMAND_EXECUTE). </p></td></tr>- </tbody>- </table>------ <h3 id="bytebase.v1.SearchIssuesRequest">SearchIssuesRequest</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_sync</td>+ <td><a href="#bytebase.v1.TaskRunLogEntry.DatabaseSync">TaskRunLogEntry.DatabaseSync</a></td>+ <td></td>+ <td><p>Database sync details (if type is DATABASE_SYNC). </p></td>+ </tr><tr>- <td>parent</td>- <td><a href="#string">string</a></td>+ <td>transaction_control</td>+ <td><a href="#bytebase.v1.TaskRunLogEntry.TransactionControl">TaskRunLogEntry.TransactionControl</a></td><td></td>- <td><p>The parent, which owns this collection of issues.-Format: projects/{project}-Use "projects/-" to list all issues from all projects. </p></td>+ <td><p>Transaction control details (if type is TRANSACTION_CONTROL). </p></td></tr><tr>- <td>page_size</td>- <td><a href="#int32">int32</a></td>+ <td>prior_backup</td>+ <td><a href="#bytebase.v1.TaskRunLogEntry.PriorBackup">TaskRunLogEntry.PriorBackup</a></td><td></td>- <td><p>The maximum number of issues to return. The service may return fewer than-this value.-If unspecified, at most 10 issues will be returned.-The maximum value is 1000; values above 1000 will be coerced to 1000. </p></td>+ <td><p>Prior backup details (if type is PRIOR_BACKUP). </p></td></tr><tr>- <td>page_token</td>- <td><a href="#string">string</a></td>+ <td>retry_info</td>+ <td><a href="#bytebase.v1.TaskRunLogEntry.RetryInfo">TaskRunLogEntry.RetryInfo</a></td><td></td>- <td><p>A page token, received from a previous `SearchIssues` call.-Provide this to retrieve the subsequent page.--When paginating, all other parameters provided to `SearchIssues` must match-the call that provided the page token. </p></td>+ <td><p>Retry information details (if type is RETRY_INFO). </p></td></tr><tr>- <td>filter</td>- <td><a href="#string">string</a></td>+ <td>compute_diff</td>+ <td><a href="#bytebase.v1.TaskRunLogEntry.ComputeDiff">TaskRunLogEntry.ComputeDiff</a></td><td></td>- <td><p>Filter is used to filter issues returned in the list.-Check the filter field in the ListIssuesRequest message. </p></td>+ <td><p>Compute diff details (if type is COMPUTE_DIFF). </p></td></tr><tr>- <td>query</td>- <td><a href="#string">string</a></td>+ <td>release_file_execute</td>+ <td><a href="#bytebase.v1.TaskRunLogEntry.ReleaseFileExecute">TaskRunLogEntry.ReleaseFileExecute</a></td><td></td>- <td><p>Query is the query statement. </p></td>+ <td><p>Release file execution details (if type is RELEASE_FILE_EXECUTE). </p></td></tr><tr>- <td>order_by</td>- <td><a href="#string">string</a></td>+ <td>ghost_migration</td>+ <td><a href="#bytebase.v1.TaskRunLogEntry.GhostMigration">TaskRunLogEntry.GhostMigration</a></td><td></td>- <td><p>The order by of issues.-Support:-- create_time-- update_time-The default sorting order is ascending.-For example:-- order_by = "create_time desc"-- order_by = "update_time asc" </p></td>+ <td><p>gh-ost migration details (if type is GHOST_MIGRATION). </p></td></tr></tbody>@@ -5525,8 +5564,8 @@ For example:- <h3 id="bytebase.v1.SearchIssuesResponse">SearchIssuesResponse</h3>- <p></p>+ <h3 id="bytebase.v1.TaskRunLogEntry.CommandExecute">TaskRunLogEntry.CommandExecute</h3>+ <p>Command execution details.</p><table class="field-table">@@ -5536,18 +5575,33 @@ For example:<tbody><tr>- <td>issues</td>- <td><a href="#bytebase.v1.Issue">Issue</a></td>- <td>repeated</td>- <td><p>The issues from the specified request. </p></td>+ <td>log_time</td>+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>+ <td></td>+ <td><p>When the command was logged. </p></td></tr><tr>- <td>next_page_token</td>+ <td>range</td>+ <td><a href="#bytebase.v1.Range">Range</a></td>+ <td></td>+ <td><p>The byte offset range of the executed command in the sheet.+Uses byte offsets (not character indices) for efficient slicing of sheet content bytes.+Example: For "SELECT 你好;" in a UTF-8 sheet, range [0, 13) represents all 13 bytes. </p></td>+ </tr>++ <tr>+ <td>statement</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 executed statement. </p></td>+ </tr>++ <tr>+ <td>response</td>+ <td><a href="#bytebase.v1.TaskRunLogEntry.CommandExecute.CommandResponse">TaskRunLogEntry.CommandExecute.CommandResponse</a></td>+ <td></td>+ <td><p>The response from executing the command. </p></td></tr></tbody>@@ -5557,8 +5611,8 @@ If this field is omitted, there are no subsequent pages. </p></td>- <h3 id="bytebase.v1.UpdateIssueCommentRequest">UpdateIssueCommentRequest</h3>- <p></p>+ <h3 id="bytebase.v1.TaskRunLogEntry.CommandExecute.CommandResponse">TaskRunLogEntry.CommandExecute.CommandResponse</h3>+ <p>Command execution response.</p><table class="field-table">@@ -5568,33 +5622,32 @@ If this field is omitted, there are no subsequent pages. </p></td><tbody><tr>- <td>parent</td>- <td><a href="#string">string</a></td>+ <td>log_time</td>+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td><td></td>- <td><p>The issue name-Format: projects/{project}/issues/{issue} </p></td>+ <td><p>When the response was logged. </p></td></tr><tr>- <td>issue_comment</td>- <td><a href="#bytebase.v1.IssueComment">IssueComment</a></td>+ <td>error</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>The comment to update. </p></td>+ <td><p>Error message if command execution failed. </p></td></tr><tr>- <td>update_mask</td>- <td><a href="#google.protobuf.FieldMask">google.protobuf.FieldMask</a></td>+ <td>affected_rows</td>+ <td><a href="#int64">int64</a></td><td></td>- <td><p>The list of fields to update. </p></td>+ <td><p>Total affected rows. </p></td></tr><tr>- <td>allow_missing</td>- <td><a href="#bool">bool</a></td>- <td></td>- <td><p>If set to true, and the issue comment is not found, a new issue comment will be created.-In this situation, `update_mask` is ignored. </p></td>+ <td>all_affected_rows</td>+ <td><a href="#int64">int64</a></td>+ <td>repeated</td>+ <td><p>`all_affected_rows` is the affected rows of each command.+`all_affected_rows` may be unavailable if the database driver doesn't support it. Caller should fallback to `affected_rows` in that case. </p></td></tr></tbody>@@ -5604,8 +5657,8 @@ In this situation, `update_mask` is ignored. </p></td>- <h3 id="bytebase.v1.UpdateIssueRequest">UpdateIssueRequest</h3>- <p></p>+ <h3 id="bytebase.v1.TaskRunLogEntry.ComputeDiff">TaskRunLogEntry.ComputeDiff</h3>+ <p>Schema diff computation details.</p><table class="field-table">@@ -5615,28 +5668,24 @@ In this situation, `update_mask` is ignored. </p></td><tbody><tr>- <td>issue</td>- <td><a href="#bytebase.v1.Issue">Issue</a></td>+ <td>start_time</td>+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td><td></td>- <td><p>The issue to update.--The issue's `name` field is used to identify the issue to update.-Format: projects/{project}/issues/{issue} </p></td>+ <td><p>When diff computation started. </p></td></tr><tr>- <td>update_mask</td>- <td><a href="#google.protobuf.FieldMask">google.protobuf.FieldMask</a></td>+ <td>end_time</td>+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td><td></td>- <td><p>The list of fields to update. </p></td>+ <td><p>When diff computation ended. </p></td></tr><tr>- <td>allow_missing</td>- <td><a href="#bool">bool</a></td>+ <td>error</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>If set to true, and the issue is not found, a new issue will be created.-In this situation, `update_mask` is ignored. </p></td>+ <td><p>Error message if computation failed. </p></td></tr></tbody>@@ -5646,486 +5695,46 @@ In this situation, `update_mask` is ignored. </p></td>--- <h3 id="bytebase.v1.Issue.ApprovalStatus">Issue.ApprovalStatus</h3>- <p>The overall approval status for the issue.</p>- <table class="enum-table">- <thead>- <tr><td>Name</td><td>Number</td><td>Description</td></tr>- </thead>- <tbody>-- <tr>- <td>APPROVAL_STATUS_UNSPECIFIED</td>- <td>0</td>- <td><p>Unspecified approval status.</p></td>- </tr>-- <tr>- <td>CHECKING</td>- <td>1</td>- <td><p>Approval checks are being evaluated.</p></td>- </tr>-- <tr>- <td>PENDING</td>- <td>2</td>- <td><p>Approval is pending.</p></td>- </tr>-- <tr>- <td>APPROVED</td>- <td>3</td>- <td><p>Issue has been approved.</p></td>- </tr>-- <tr>- <td>REJECTED</td>- <td>4</td>- <td><p>Issue has been rejected.</p></td>- </tr>-- <tr>- <td>SKIPPED</td>- <td>5</td>- <td><p>Approval was skipped.</p></td>- </tr>-- </tbody>- </table>-- <h3 id="bytebase.v1.Issue.Approver.Status">Issue.Approver.Status</h3>- <p>The approval status of an approver.</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>Unspecified status.</p></td>- </tr>-- <tr>- <td>PENDING</td>- <td>1</td>- <td><p>Awaiting approval.</p></td>- </tr>-- <tr>- <td>APPROVED</td>- <td>2</td>- <td><p>Approved.</p></td>- </tr>-- <tr>- <td>REJECTED</td>- <td>3</td>- <td><p>Rejected.</p></td>- </tr>-- </tbody>- </table>-- <h3 id="bytebase.v1.Issue.Type">Issue.Type</h3>- <p>The type of issue.</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 issue type.</p></td>- </tr>-- <tr>- <td>DATABASE_CHANGE</td>- <td>1</td>- <td><p>Database schema or data change.</p></td>- </tr>-- <tr>- <td>ROLE_GRANT</td>- <td>2</td>- <td><p>Role grant request.</p></td>- </tr>-- <tr>- <td>DATABASE_EXPORT</td>- <td>3</td>- <td><p>Database data export request.</p></td>- </tr>-- <tr>- <td>ACCESS_GRANT</td>- <td>4</td>- <td><p>Temporary access grant request.</p></td>- </tr>-- </tbody>- </table>-- <h3 id="bytebase.v1.IssueComment.Approval.Status">IssueComment.Approval.Status</h3>- <p>Approval status values.</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>Unspecified status.</p></td>- </tr>-- <tr>- <td>PENDING</td>- <td>1</td>- <td><p>Approval pending.</p></td>- </tr>-- <tr>- <td>APPROVED</td>- <td>2</td>- <td><p>Approved.</p></td>- </tr>-- <tr>- <td>REJECTED</td>- <td>3</td>- <td><p>Rejected.</p></td>- </tr>-- </tbody>- </table>-- <h3 id="bytebase.v1.IssueStatus">IssueStatus</h3>- <p>The status of an issue.</p>- <table class="enum-table">- <thead>- <tr><td>Name</td><td>Number</td><td>Description</td></tr>- </thead>- <tbody>-- <tr>- <td>ISSUE_STATUS_UNSPECIFIED</td>- <td>0</td>- <td><p>Unspecified status.</p></td>- </tr>-- <tr>- <td>OPEN</td>- <td>1</td>- <td><p>Issue is open and active.</p></td>- </tr>-- <tr>- <td>DONE</td>- <td>2</td>- <td><p>Issue is completed.</p></td>- </tr>-- <tr>- <td>CANCELED</td>- <td>3</td>- <td><p>Issue is canceled.</p></td>- </tr>-- </tbody>- </table>------ <h3 id="bytebase.v1.IssueService">IssueService</h3>- <p>IssueService manages issues for tracking database changes and tasks.</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>GetIssue</td>- <td><a href="#bytebase.v1.GetIssueRequest">GetIssueRequest</a></td>- <td><a href="#bytebase.v1.Issue">Issue</a></td>- <td><p>Retrieves an issue by name.-Permissions required: bb.issues.get</p></td>- </tr>-- <tr>- <td>CreateIssue</td>- <td><a href="#bytebase.v1.CreateIssueRequest">CreateIssueRequest</a></td>- <td><a href="#bytebase.v1.Issue">Issue</a></td>- <td><p>Creates a new issue for database changes or tasks.-Permissions required: bb.issues.create</p></td>- </tr>-- <tr>- <td>ListIssues</td>- <td><a href="#bytebase.v1.ListIssuesRequest">ListIssuesRequest</a></td>- <td><a href="#bytebase.v1.ListIssuesResponse">ListIssuesResponse</a></td>- <td><p>Lists issues in a project.-Permissions required: bb.issues.list</p></td>- </tr>-- <tr>- <td>SearchIssues</td>- <td><a href="#bytebase.v1.SearchIssuesRequest">SearchIssuesRequest</a></td>- <td><a href="#bytebase.v1.SearchIssuesResponse">SearchIssuesResponse</a></td>- <td><p>Search for issues that the caller has the bb.issues.get permission on and also satisfy the specified filter & query.-Permissions required: bb.issues.get</p></td>- </tr>-- <tr>- <td>UpdateIssue</td>- <td><a href="#bytebase.v1.UpdateIssueRequest">UpdateIssueRequest</a></td>- <td><a href="#bytebase.v1.Issue">Issue</a></td>- <td><p>Updates an issue's properties such as title, description, or labels.-Permissions required: bb.issues.update</p></td>- </tr>-- <tr>- <td>ListIssueComments</td>- <td><a href="#bytebase.v1.ListIssueCommentsRequest">ListIssueCommentsRequest</a></td>- <td><a href="#bytebase.v1.ListIssueCommentsResponse">ListIssueCommentsResponse</a></td>- <td><p>Lists comments on an issue.-Permissions required: bb.issueComments.list</p></td>- </tr>-- <tr>- <td>CreateIssueComment</td>- <td><a href="#bytebase.v1.CreateIssueCommentRequest">CreateIssueCommentRequest</a></td>- <td><a href="#bytebase.v1.IssueComment">IssueComment</a></td>- <td><p>Adds a comment to an issue.-Permissions required: bb.issueComments.create</p></td>- </tr>-- <tr>- <td>UpdateIssueComment</td>- <td><a href="#bytebase.v1.UpdateIssueCommentRequest">UpdateIssueCommentRequest</a></td>- <td><a href="#bytebase.v1.IssueComment">IssueComment</a></td>- <td><p>Updates an existing issue comment.-Permissions required: bb.issueComments.update</p></td>- </tr>-- <tr>- <td>BatchUpdateIssuesStatus</td>- <td><a href="#bytebase.v1.BatchUpdateIssuesStatusRequest">BatchUpdateIssuesStatusRequest</a></td>- <td><a href="#bytebase.v1.BatchUpdateIssuesStatusResponse">BatchUpdateIssuesStatusResponse</a></td>- <td><p>Updates the status of multiple issues in a single operation.-Permissions required: bb.issues.update</p></td>- </tr>-- <tr>- <td>ApproveIssue</td>- <td><a href="#bytebase.v1.ApproveIssueRequest">ApproveIssueRequest</a></td>- <td><a href="#bytebase.v1.Issue">Issue</a></td>- <td><p>Approves an issue. Access determined by approval flow configuration - caller must be a designated approver for the current approval step.-Permissions required: None (determined by approval flow)</p></td>- </tr>-- <tr>- <td>RejectIssue</td>- <td><a href="#bytebase.v1.RejectIssueRequest">RejectIssueRequest</a></td>- <td><a href="#bytebase.v1.Issue">Issue</a></td>- <td><p>Rejects an issue. Access determined by approval flow configuration - caller must be a designated approver for the current approval step.-Permissions required: None (determined by approval flow)</p></td>- </tr>-- <tr>- <td>RequestIssue</td>- <td><a href="#bytebase.v1.RequestIssueRequest">RequestIssueRequest</a></td>- <td><a href="#bytebase.v1.Issue">Issue</a></td>- <td><p>Requests changes on an issue. Access determined by approval flow configuration - caller must be a designated approver for the current approval step.-Permissions required: None (determined by approval flow)</p></td>- </tr>-- <tr>- <td>RetryIssueApproval</td>- <td><a href="#bytebase.v1.RetryIssueApprovalRequest">RetryIssueApprovalRequest</a></td>- <td><a href="#bytebase.v1.Issue">Issue</a></td>- <td><p>Re-runs approval-template finding for an issue stuck in CHECKING.-Useful when the synchronous post-create finding errored (e.g. against-a malformed workspace approval rule) and the operator has since-corrected it — without this, the issue would remain in CHECKING-indefinitely because there is no other retry path for non-DATABASE_CHANGE-issue types. Idempotent: returns the existing issue unchanged when-approval-finding has already completed.-Permissions required: None (caller must be the issue creator;-mirrors RequestIssue's authorization model).</p></td>- </tr>-- </tbody>- </table>+ <h3 id="bytebase.v1.TaskRunLogEntry.DatabaseSync">TaskRunLogEntry.DatabaseSync</h3>+ <p>Database synchronization details.</p>--- <h4>Methods with HTTP bindings</h4>- <table>+ <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>GetIssue</td>- <td>GET</td>- <td>/v1/{name=projects/*/issues/*}</td>- <td></td>- </tr>----- <tr>- <td>CreateIssue</td>- <td>POST</td>- <td>/v1/{parent=projects/*}/issues</td>- <td>issue</td>- </tr>----- <tr>- <td>ListIssues</td>- <td>GET</td>- <td>/v1/{parent=projects/*}/issues</td>- <td></td>- </tr>----- <tr>- <td>SearchIssues</td>- <td>POST</td>- <td>/v1/{parent=projects/*}/issues:search</td>- <td>*</td>- </tr>----- <tr>- <td>UpdateIssue</td>- <td>PATCH</td>- <td>/v1/{issue.name=projects/*/issues/*}</td>- <td>issue</td>- </tr>--+ <tr>+ <td>start_time</td>+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>+ <td></td>+ <td><p>When the database sync started. </p></td>+ </tr>- <tr>- <td>ListIssueComments</td>- <td>GET</td>- <td>/v1/{parent=projects/*/issues/*}/issueComments</td>- <td></td>- </tr>----- <tr>- <td>CreateIssueComment</td>- <td>POST</td>- <td>/v1/{parent=projects/*/issues/*}:comment</td>- <td>issue_comment</td>- </tr>----- <tr>- <td>UpdateIssueComment</td>- <td>PATCH</td>- <td>/v1/{parent=projects/*/issues/*}:comment</td>- <td>issue_comment</td>- </tr>----- <tr>- <td>BatchUpdateIssuesStatus</td>- <td>POST</td>- <td>/v1/{parent=projects/*}/issues:batchUpdateStatus</td>- <td>*</td>- </tr>----- <tr>- <td>ApproveIssue</td>- <td>POST</td>- <td>/v1/{name=projects/*/issues/*}:approve</td>- <td>*</td>- </tr>----- <tr>- <td>RejectIssue</td>- <td>POST</td>- <td>/v1/{name=projects/*/issues/*}:reject</td>- <td>*</td>- </tr>----- <tr>- <td>RequestIssue</td>- <td>POST</td>- <td>/v1/{name=projects/*/issues/*}:request</td>- <td>*</td>- </tr>---+ <tr>+ <td>end_time</td>+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>+ <td></td>+ <td><p>When the database sync ended. </p></td>+ </tr>- <tr>- <td>RetryIssueApproval</td>- <td>POST</td>- <td>/v1/{name=projects/*/issues/*}:retryApproval</td>- <td>*</td>- </tr>+ <tr>+ <td>error</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>Error message if sync failed. </p></td>+ </tr>-</tbody></table>+---- <div class="file-heading">- <h2 id="v1/setting_service.proto">v1/setting_service.proto</h2><a href="#title">Top</a>- </div>- <p></p>+- <h3 id="bytebase.v1.AISetting">AISetting</h3>- <p></p>+ <h3 id="bytebase.v1.TaskRunLogEntry.GhostMigration">TaskRunLogEntry.GhostMigration</h3>+ <p>gh-ost migration details.</p><table class="field-table">@@ -6135,45 +5744,24 @@ mirrors RequestIssue's authorization model).</p></td><tbody><tr>- <td>enabled</td>- <td><a href="#bool">bool</a></td>- <td></td>- <td><p> </p></td>- </tr>-- <tr>- <td>provider</td>- <td><a href="#bytebase.v1.AISetting.Provider">AISetting.Provider</a></td>- <td></td>- <td><p> </p></td>- </tr>-- <tr>- <td>endpoint</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p> </p></td>- </tr>-- <tr>- <td>api_key</td>- <td><a href="#string">string</a></td>+ <td>start_time</td>+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td><td></td>- <td><p> </p></td>+ <td><p>When the gh-ost migration started. </p></td></tr><tr>- <td>model</td>- <td><a href="#string">string</a></td>+ <td>end_time</td>+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td><td></td>- <td><p> </p></td>+ <td><p>When the gh-ost migration ended. </p></td></tr><tr>- <td>version</td>+ <td>error</td><td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>Error message if the gh-ost migration failed. </p></td></tr></tbody>@@ -6183,8 +5771,8 @@ mirrors RequestIssue's authorization model).</p></td>- <h3 id="bytebase.v1.Algorithm">Algorithm</h3>- <p></p>+ <h3 id="bytebase.v1.TaskRunLogEntry.PriorBackup">TaskRunLogEntry.PriorBackup</h3>+ <p>Prior backup operation details.</p><table class="field-table">@@ -6194,31 +5782,31 @@ mirrors RequestIssue's authorization model).</p></td><tbody><tr>- <td>full_mask</td>- <td><a href="#bytebase.v1.Algorithm.FullMask">Algorithm.FullMask</a></td>+ <td>start_time</td>+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td><td></td>- <td><p> </p></td>+ <td><p>When the backup started. </p></td></tr><tr>- <td>range_mask</td>- <td><a href="#bytebase.v1.Algorithm.RangeMask">Algorithm.RangeMask</a></td>+ <td>end_time</td>+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td><td></td>- <td><p> </p></td>+ <td><p>When the backup ended. </p></td></tr><tr>- <td>md5_mask</td>- <td><a href="#bytebase.v1.Algorithm.MD5Mask">Algorithm.MD5Mask</a></td>+ <td>prior_backup_detail</td>+ <td><a href="#bytebase.v1.TaskRunLogEntry.PriorBackup.PriorBackupDetail">TaskRunLogEntry.PriorBackup.PriorBackupDetail</a></td><td></td>- <td><p> </p></td>+ <td><p>The backup details. </p></td></tr><tr>- <td>inner_outer_mask</td>- <td><a href="#bytebase.v1.Algorithm.InnerOuterMask">Algorithm.InnerOuterMask</a></td>+ <td>error</td>+ <td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>Error message if the backup failed. </p></td></tr></tbody>@@ -6228,8 +5816,8 @@ mirrors RequestIssue's authorization model).</p></td>- <h3 id="bytebase.v1.Algorithm.FullMask">Algorithm.FullMask</h3>- <p></p>+ <h3 id="bytebase.v1.TaskRunLogEntry.PriorBackup.PriorBackupDetail">TaskRunLogEntry.PriorBackup.PriorBackupDetail</h3>+ <p>Prior backup detail for rollback purposes.</p><table class="field-table">@@ -6239,11 +5827,10 @@ mirrors RequestIssue's authorization model).</p></td><tbody><tr>- <td>substitution</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>substitution is the string used to replace the original value, the-max length of the string is 16 bytes. </p></td>+ <td>items</td>+ <td><a href="#bytebase.v1.TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item">TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item</a></td>+ <td>repeated</td>+ <td><p>The list of backed up tables. </p></td></tr></tbody>@@ -6253,8 +5840,8 @@ max length of the string is 16 bytes. </p></td>- <h3 id="bytebase.v1.Algorithm.InnerOuterMask">Algorithm.InnerOuterMask</h3>- <p></p>+ <h3 id="bytebase.v1.TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item">TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item</h3>+ <p>A single backup table mapping.</p><table class="field-table">@@ -6264,31 +5851,31 @@ max length of the string is 16 bytes. </p></td><tbody><tr>- <td>prefix_len</td>- <td><a href="#int32">int32</a></td>+ <td>source_table</td>+ <td><a href="#bytebase.v1.TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item.Table">TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item.Table</a></td><td></td>- <td><p> </p></td>+ <td><p>The original table information. </p></td></tr><tr>- <td>suffix_len</td>- <td><a href="#int32">int32</a></td>+ <td>target_table</td>+ <td><a href="#bytebase.v1.TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item.Table">TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item.Table</a></td><td></td>- <td><p> </p></td>+ <td><p>The target backup table information. </p></td></tr><tr>- <td>type</td>- <td><a href="#bytebase.v1.Algorithm.InnerOuterMask.MaskType">Algorithm.InnerOuterMask.MaskType</a></td>+ <td>start_position</td>+ <td><a href="#bytebase.v1.Position">Position</a></td><td></td>- <td><p> </p></td>+ <td><p>The start position in the SQL statement. </p></td></tr><tr>- <td>substitution</td>- <td><a href="#string">string</a></td>+ <td>end_position</td>+ <td><a href="#bytebase.v1.Position">Position</a></td><td></td>- <td><p> </p></td>+ <td><p>The end position in the SQL statement. </p></td></tr></tbody>@@ -6298,8 +5885,8 @@ max length of the string is 16 bytes. </p></td>- <h3 id="bytebase.v1.Algorithm.MD5Mask">Algorithm.MD5Mask</h3>- <p></p>+ <h3 id="bytebase.v1.TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item.Table">TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item.Table</h3>+ <p>Table information.</p><table class="field-table">@@ -6309,10 +5896,25 @@ max length of the string is 16 bytes. </p></td><tbody><tr>- <td>salt</td>+ <td>database</td><td><a href="#string">string</a></td><td></td>- <td><p>salt is the salt value to generate a different hash that with the word alone. </p></td>+ <td><p>The database information.+Format: instances/{instance}/databases/{database} </p></td>+ </tr>++ <tr>+ <td>schema</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The schema name. </p></td>+ </tr>++ <tr>+ <td>table</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The table name. </p></td></tr></tbody>@@ -6322,8 +5924,8 @@ max length of the string is 16 bytes. </p></td>- <h3 id="bytebase.v1.Algorithm.RangeMask">Algorithm.RangeMask</h3>- <p></p>+ <h3 id="bytebase.v1.TaskRunLogEntry.ReleaseFileExecute">TaskRunLogEntry.ReleaseFileExecute</h3>+ <p>Release file execution details.</p><table class="field-table">@@ -6333,11 +5935,17 @@ max length of the string is 16 bytes. </p></td><tbody><tr>- <td>slices</td>- <td><a href="#bytebase.v1.Algorithm.RangeMask.Slice">Algorithm.RangeMask.Slice</a></td>- <td>repeated</td>- <td><p>We store it as a repeated field to face the fact that the original value may have multiple parts should be masked.-But frontend can be started with a single rule easily. </p></td>+ <td>version</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The version of the file being executed (e.g., "0001"). </p></td>+ </tr>++ <tr>+ <td>file_path</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The file path within the release (e.g., "2.2/V0001_create_table.sql"). </p></td></tr></tbody>@@ -6347,8 +5955,8 @@ But frontend can be started with a single rule easily. </p></td>- <h3 id="bytebase.v1.Algorithm.RangeMask.Slice">Algorithm.RangeMask.Slice</h3>- <p></p>+ <h3 id="bytebase.v1.TaskRunLogEntry.RetryInfo">TaskRunLogEntry.RetryInfo</h3>+ <p>Retry information for failed operations.</p><table class="field-table">@@ -6358,27 +5966,24 @@ But frontend can be started with a single rule easily. </p></td><tbody><tr>- <td>start</td>- <td><a href="#int32">int32</a></td>+ <td>error</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>start is the start character index (0-based) of the original value, should be less than end.-Uses character indices (not byte offsets) for display-oriented masking.-Example: For "你好world", character index 2 refers to 'w' (the 3rd character). </p></td>+ <td><p>The error that triggered the retry. </p></td></tr><tr>- <td>end</td>+ <td>retry_count</td><td><a href="#int32">int32</a></td><td></td>- <td><p>end is the end character index (exclusive) of the original value.-Uses character indices (not byte offsets) for display-oriented masking. </p></td>+ <td><p>Current retry attempt number. </p></td></tr><tr>- <td>substitution</td>- <td><a href="#string">string</a></td>+ <td>maximum_retries</td>+ <td><a href="#int32">int32</a></td><td></td>- <td><p>substitution is the string used to replace the OriginalValue[start:end). </p></td>+ <td><p>Maximum number of retries allowed. </p></td></tr></tbody>@@ -6388,8 +5993,8 @@ Uses character indices (not byte offsets) for display-oriented masking. </p></td- <h3 id="bytebase.v1.Announcement">Announcement</h3>- <p></p>+ <h3 id="bytebase.v1.TaskRunLogEntry.SchemaDump">TaskRunLogEntry.SchemaDump</h3>+ <p>Schema dump operation details.</p><table class="field-table">@@ -6399,24 +6004,24 @@ Uses character indices (not byte offsets) for display-oriented masking. </p></td<tbody><tr>- <td>level</td>- <td><a href="#bytebase.v1.Announcement.AlertLevel">Announcement.AlertLevel</a></td>+ <td>start_time</td>+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td><td></td>- <td><p>The alert level of announcement </p></td>+ <td><p>When the schema dump started. </p></td></tr><tr>- <td>text</td>- <td><a href="#string">string</a></td>+ <td>end_time</td>+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td><td></td>- <td><p>The text of announcement </p></td>+ <td><p>When the schema dump ended. </p></td></tr><tr>- <td>link</td>+ <td>error</td><td><a href="#string">string</a></td><td></td>- <td><p>The optional link, user can follow the link to check extra details </p></td>+ <td><p>Error message if the schema dump failed. </p></td></tr></tbody>@@ -6426,8 +6031,8 @@ Uses character indices (not byte offsets) for display-oriented masking. </p></td- <h3 id="bytebase.v1.AppIMSetting">AppIMSetting</h3>- <p></p>+ <h3 id="bytebase.v1.TaskRunLogEntry.TransactionControl">TaskRunLogEntry.TransactionControl</h3>+ <p>Transaction control operation details.</p><table class="field-table">@@ -6437,10 +6042,17 @@ Uses character indices (not byte offsets) for display-oriented masking. </p></td<tbody><tr>- <td>settings</td>- <td><a href="#bytebase.v1.AppIMSetting.IMSetting">AppIMSetting.IMSetting</a></td>- <td>repeated</td>- <td><p> </p></td>+ <td>type</td>+ <td><a href="#bytebase.v1.TaskRunLogEntry.TransactionControl.Type">TaskRunLogEntry.TransactionControl.Type</a></td>+ <td></td>+ <td><p>The type of transaction control. </p></td>+ </tr>++ <tr>+ <td>error</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>Error message if the operation failed. </p></td></tr></tbody>@@ -6450,7 +6062,7 @@ Uses character indices (not byte offsets) for display-oriented masking. </p></td- <h3 id="bytebase.v1.AppIMSetting.DingTalk">AppIMSetting.DingTalk</h3>+ <h3 id="bytebase.v1.TaskRunSession">TaskRunSession</h3><p></p>@@ -6461,24 +6073,17 @@ Uses character indices (not byte offsets) for display-oriented masking. </p></td<tbody><tr>- <td>client_id</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p> </p></td>- </tr>-- <tr>- <td>client_secret</td>+ <td>name</td><td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun}/session </p></td></tr><tr>- <td>robot_code</td>- <td><a href="#string">string</a></td>+ <td>postgres</td>+ <td><a href="#bytebase.v1.TaskRunSession.Postgres">TaskRunSession.Postgres</a></td><td></td>- <td><p> </p></td>+ <td><p>PostgreSQL session information. </p></td></tr></tbody>@@ -6488,8 +6093,8 @@ Uses character indices (not byte offsets) for display-oriented masking. </p></td- <h3 id="bytebase.v1.AppIMSetting.Feishu">AppIMSetting.Feishu</h3>- <p></p>+ <h3 id="bytebase.v1.TaskRunSession.Postgres">TaskRunSession.Postgres</h3>+ <p>PostgreSQL session information.</p><table class="field-table">@@ -6499,17 +6104,24 @@ Uses character indices (not byte offsets) for display-oriented masking. </p></td<tbody><tr>- <td>app_id</td>- <td><a href="#string">string</a></td>+ <td>session</td>+ <td><a href="#bytebase.v1.TaskRunSession.Postgres.Session">TaskRunSession.Postgres.Session</a></td><td></td>- <td><p> </p></td>+ <td><p>`session` is the session of the task run executing commands. </p></td></tr><tr>- <td>app_secret</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p> </p></td>+ <td>blocking_sessions</td>+ <td><a href="#bytebase.v1.TaskRunSession.Postgres.Session">TaskRunSession.Postgres.Session</a></td>+ <td>repeated</td>+ <td><p>`blocking_sessions` block `session`. </p></td>+ </tr>++ <tr>+ <td>blocked_sessions</td>+ <td><a href="#bytebase.v1.TaskRunSession.Postgres.Session">TaskRunSession.Postgres.Session</a></td>+ <td>repeated</td>+ <td><p>`blocked_sessions` are blocked by `session`. </p></td></tr></tbody>@@ -6519,8 +6131,8 @@ Uses character indices (not byte offsets) for display-oriented masking. </p></td- <h3 id="bytebase.v1.AppIMSetting.IMSetting">AppIMSetting.IMSetting</h3>- <p></p>+ <h3 id="bytebase.v1.TaskRunSession.Postgres.Session">TaskRunSession.Postgres.Session</h3>+ <p>PostgreSQL session information read from `pg_stat_activity`.</p><table class="field-table">@@ -6530,52 +6142,101 @@ Uses character indices (not byte offsets) for display-oriented masking. </p></td<tbody><tr>- <td>type</td>- <td><a href="#bytebase.v1.WebhookType">WebhookType</a></td>- <td></td>- <td><p> </p></td>+ <td>pid</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>Process ID of the session. </p></td>+ </tr>++ <tr>+ <td>blocked_by_pids</td>+ <td><a href="#string">string</a></td>+ <td>repeated</td>+ <td><p>PIDs of sessions blocking this session. </p></td>+ </tr>++ <tr>+ <td>query</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>Current query being executed. </p></td>+ </tr>++ <tr>+ <td>state</td>+ <td><a href="#string">string</a></td>+ <td>optional</td>+ <td><p>Session state (active, idle, etc.). </p></td>+ </tr>++ <tr>+ <td>wait_event_type</td>+ <td><a href="#string">string</a></td>+ <td>optional</td>+ <td><p>Wait event type if session is waiting. </p></td>+ </tr>++ <tr>+ <td>wait_event</td>+ <td><a href="#string">string</a></td>+ <td>optional</td>+ <td><p>Specific wait event if session is waiting. </p></td></tr><tr>- <td>slack</td>- <td><a href="#bytebase.v1.AppIMSetting.Slack">AppIMSetting.Slack</a></td>- <td></td>- <td><p> </p></td>+ <td>datname</td>+ <td><a href="#string">string</a></td>+ <td>optional</td>+ <td><p>Database name. </p></td></tr><tr>- <td>feishu</td>- <td><a href="#bytebase.v1.AppIMSetting.Feishu">AppIMSetting.Feishu</a></td>- <td></td>- <td><p> </p></td>+ <td>usename</td>+ <td><a href="#string">string</a></td>+ <td>optional</td>+ <td><p>User name. </p></td></tr><tr>- <td>wecom</td>- <td><a href="#bytebase.v1.AppIMSetting.Wecom">AppIMSetting.Wecom</a></td>+ <td>application_name</td>+ <td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>Application name. </p></td></tr><tr>- <td>lark</td>- <td><a href="#bytebase.v1.AppIMSetting.Lark">AppIMSetting.Lark</a></td>- <td></td>- <td><p> </p></td>+ <td>client_addr</td>+ <td><a href="#string">string</a></td>+ <td>optional</td>+ <td><p>Client IP address. </p></td></tr><tr>- <td>dingtalk</td>- <td><a href="#bytebase.v1.AppIMSetting.DingTalk">AppIMSetting.DingTalk</a></td>- <td></td>- <td><p> </p></td>+ <td>client_port</td>+ <td><a href="#string">string</a></td>+ <td>optional</td>+ <td><p>Client port number. </p></td></tr><tr>- <td>teams</td>- <td><a href="#bytebase.v1.AppIMSetting.Teams">AppIMSetting.Teams</a></td>+ <td>backend_start</td>+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td><td></td>- <td><p> </p></td>+ <td><p>When the backend process started. </p></td>+ </tr>++ <tr>+ <td>xact_start</td>+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>+ <td>optional</td>+ <td><p>When the current transaction started. </p></td>+ </tr>++ <tr>+ <td>query_start</td>+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>+ <td>optional</td>+ <td><p>When the current query started. </p></td></tr></tbody>@@ -6585,240 +6246,541 @@ Uses character indices (not byte offsets) for display-oriented masking. </p></td- <h3 id="bytebase.v1.AppIMSetting.Lark">AppIMSetting.Lark</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>app_id</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p> </p></td>- </tr>-- <tr>- <td>app_secret</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p> </p></td>- </tr>-- </tbody>- </table>----+++ <h3 id="bytebase.v1.Task.Status">Task.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>Unspecified status.</p></td>+ </tr>++ <tr>+ <td>NOT_STARTED</td>+ <td>1</td>+ <td><p>Task has not started and is awaiting its turn in the deployment sequence.</p></td>+ </tr>++ <tr>+ <td>PENDING</td>+ <td>2</td>+ <td><p>Task is ready to run and waiting for approval or scheduled time.</p></td>+ </tr>++ <tr>+ <td>RUNNING</td>+ <td>3</td>+ <td><p>Task is currently executing.</p></td>+ </tr>++ <tr>+ <td>DONE</td>+ <td>4</td>+ <td><p>Task completed successfully.</p></td>+ </tr>++ <tr>+ <td>FAILED</td>+ <td>5</td>+ <td><p>Task execution failed with errors.</p></td>+ </tr>++ <tr>+ <td>CANCELED</td>+ <td>6</td>+ <td><p>Task execution was canceled by a user.</p></td>+ </tr>++ <tr>+ <td>SKIPPED</td>+ <td>7</td>+ <td><p>Task was skipped and will not be executed.</p></td>+ </tr>++ </tbody>+ </table>++ <h3 id="bytebase.v1.Task.Type">Task.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 task type.</p></td>+ </tr>++ <tr>+ <td>GENERAL</td>+ <td>1</td>+ <td><p>General task for miscellaneous operations.</p></td>+ </tr>++ <tr>+ <td>DATABASE_CREATE</td>+ <td>2</td>+ <td><p>Database creation task that creates a new database.+Use payload DatabaseCreate.</p></td>+ </tr>++ <tr>+ <td>DATABASE_MIGRATE</td>+ <td>3</td>+ <td><p>Database migration task that applies versioned schema changes.+Use payload DatabaseUpdate.</p></td>+ </tr>++ <tr>+ <td>DATABASE_EXPORT</td>+ <td>4</td>+ <td><p>Database export task that exports query results or table data.+Use payload DatabaseDataExport.</p></td>+ </tr>++ </tbody>+ </table>++ <h3 id="bytebase.v1.TaskRun.ExportArchiveStatus">TaskRun.ExportArchiveStatus</h3>+ <p></p>+ <table class="enum-table">+ <thead>+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>EXPORT_ARCHIVE_STATUS_UNSPECIFIED</td>+ <td>0</td>+ <td><p>Unspecified export archive status.</p></td>+ </tr>++ <tr>+ <td>READY</td>+ <td>1</td>+ <td><p>Export archive is ready for download.</p></td>+ </tr>++ <tr>+ <td>EXPORTED</td>+ <td>2</td>+ <td><p>Export archive has been downloaded by the user.</p></td>+ </tr>++ </tbody>+ </table>++ <h3 id="bytebase.v1.TaskRun.Status">TaskRun.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>Unspecified status.</p></td>+ </tr>++ <tr>+ <td>PENDING</td>+ <td>1</td>+ <td><p>Task run is queued and waiting to start execution.</p></td>+ </tr>++ <tr>+ <td>RUNNING</td>+ <td>2</td>+ <td><p>Task run is currently executing.</p></td>+ </tr>++ <tr>+ <td>DONE</td>+ <td>3</td>+ <td><p>Task run completed successfully.</p></td>+ </tr>++ <tr>+ <td>FAILED</td>+ <td>4</td>+ <td><p>Task run execution failed with errors.</p></td>+ </tr>++ <tr>+ <td>CANCELED</td>+ <td>5</td>+ <td><p>Task run execution was canceled by a user.</p></td>+ </tr>++ <tr>+ <td>AVAILABLE</td>+ <td>6</td>+ <td><p>Task run is ready for immediate execution.</p></td>+ </tr>++ </tbody>+ </table>++ <h3 id="bytebase.v1.TaskRunLogEntry.TransactionControl.Type">TaskRunLogEntry.TransactionControl.Type</h3>+ <p>Transaction control type.</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 type.</p></td>+ </tr>++ <tr>+ <td>BEGIN</td>+ <td>1</td>+ <td><p>Begin transaction.</p></td>+ </tr>++ <tr>+ <td>COMMIT</td>+ <td>2</td>+ <td><p>Commit transaction.</p></td>+ </tr>++ <tr>+ <td>ROLLBACK</td>+ <td>3</td>+ <td><p>Rollback transaction.</p></td>+ </tr>++ </tbody>+ </table>++ <h3 id="bytebase.v1.TaskRunLogEntry.Type">TaskRunLogEntry.Type</h3>+ <p>The type of log entry.</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 type.</p></td>+ </tr>++ <tr>+ <td>SCHEMA_DUMP</td>+ <td>1</td>+ <td><p>Schema dump operation.</p></td>+ </tr>++ <tr>+ <td>COMMAND_EXECUTE</td>+ <td>2</td>+ <td><p>Command execution.</p></td>+ </tr>++ <tr>+ <td>DATABASE_SYNC</td>+ <td>3</td>+ <td><p>Database synchronization.</p></td>+ </tr>++ <tr>+ <td>TRANSACTION_CONTROL</td>+ <td>5</td>+ <td><p>Transaction control (BEGIN, COMMIT, ROLLBACK).</p></td>+ </tr>++ <tr>+ <td>PRIOR_BACKUP</td>+ <td>6</td>+ <td><p>Prior backup operation.</p></td>+ </tr>++ <tr>+ <td>RETRY_INFO</td>+ <td>7</td>+ <td><p>Retry information.</p></td>+ </tr>++ <tr>+ <td>COMPUTE_DIFF</td>+ <td>8</td>+ <td><p>Schema diff computation.</p></td>+ </tr>++ <tr>+ <td>RELEASE_FILE_EXECUTE</td>+ <td>9</td>+ <td><p>Release file execution.</p></td>+ </tr>++ <tr>+ <td>GHOST_MIGRATION</td>+ <td>10</td>+ <td><p>gh-ost online migration.</p></td>+ </tr>++ </tbody>+ </table>- <h3 id="bytebase.v1.AppIMSetting.Slack">AppIMSetting.Slack</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>token</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p> </p></td>- </tr>-- </tbody>- </table>-+-- <h3 id="bytebase.v1.AppIMSetting.Teams">AppIMSetting.Teams</h3>- <p></p>+ <h3 id="bytebase.v1.RolloutService">RolloutService</h3>+ <p>RolloutService manages the execution of deployment plans.</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>GetRollout</td>+ <td><a href="#bytebase.v1.GetRolloutRequest">GetRolloutRequest</a></td>+ <td><a href="#bytebase.v1.Rollout">Rollout</a></td>+ <td><p>Retrieves a rollout by its plan name.+Permissions required: bb.rollouts.get</p></td>+ </tr>++ <tr>+ <td>ListRollouts</td>+ <td><a href="#bytebase.v1.ListRolloutsRequest">ListRolloutsRequest</a></td>+ <td><a href="#bytebase.v1.ListRolloutsResponse">ListRolloutsResponse</a></td>+ <td><p>Lists rollouts in a project.+Permissions required: bb.rollouts.list</p></td>+ </tr>++ <tr>+ <td>CreateRollout</td>+ <td><a href="#bytebase.v1.CreateRolloutRequest">CreateRolloutRequest</a></td>+ <td><a href="#bytebase.v1.Rollout">Rollout</a></td>+ <td><p>Creates a new rollout for a plan.+Permissions required: bb.rollouts.create (or issue creator for data export issues)</p></td>+ </tr>++ <tr>+ <td>ListTaskRuns</td>+ <td><a href="#bytebase.v1.ListTaskRunsRequest">ListTaskRunsRequest</a></td>+ <td><a href="#bytebase.v1.ListTaskRunsResponse">ListTaskRunsResponse</a></td>+ <td><p>Lists task run executions for a task.+Permissions required: bb.taskRuns.list</p></td>+ </tr>++ <tr>+ <td>GetTaskRun</td>+ <td><a href="#bytebase.v1.GetTaskRunRequest">GetTaskRunRequest</a></td>+ <td><a href="#bytebase.v1.TaskRun">TaskRun</a></td>+ <td><p>Retrieves a task run by name.+Permissions required: bb.taskRuns.list</p></td>+ </tr>++ <tr>+ <td>GetTaskRunLog</td>+ <td><a href="#bytebase.v1.GetTaskRunLogRequest">GetTaskRunLogRequest</a></td>+ <td><a href="#bytebase.v1.TaskRunLog">TaskRunLog</a></td>+ <td><p>Retrieves execution logs for a task run.+Permissions required: bb.taskRuns.list</p></td>+ </tr>++ <tr>+ <td>GetTaskRunSession</td>+ <td><a href="#bytebase.v1.GetTaskRunSessionRequest">GetTaskRunSessionRequest</a></td>+ <td><a href="#bytebase.v1.TaskRunSession">TaskRunSession</a></td>+ <td><p>Retrieves database session information for a running task.+Permissions required: bb.taskRuns.list</p></td>+ </tr>++ <tr>+ <td>BatchRunTasks</td>+ <td><a href="#bytebase.v1.BatchRunTasksRequest">BatchRunTasksRequest</a></td>+ <td><a href="#bytebase.v1.BatchRunTasksResponse">BatchRunTasksResponse</a></td>+ <td><p>Executes multiple tasks in a rollout stage.+Permissions required: bb.taskRuns.create (or issue creator for data export issues, or user with rollout policy role for the environment)</p></td>+ </tr>++ <tr>+ <td>BatchSkipTasks</td>+ <td><a href="#bytebase.v1.BatchSkipTasksRequest">BatchSkipTasksRequest</a></td>+ <td><a href="#bytebase.v1.BatchSkipTasksResponse">BatchSkipTasksResponse</a></td>+ <td><p>Skips multiple tasks in a rollout stage.+Permissions required: bb.taskRuns.create (or issue creator for data export issues, or user with rollout policy role for the environment)</p></td>+ </tr>++ <tr>+ <td>BatchCancelTaskRuns</td>+ <td><a href="#bytebase.v1.BatchCancelTaskRunsRequest">BatchCancelTaskRunsRequest</a></td>+ <td><a href="#bytebase.v1.BatchCancelTaskRunsResponse">BatchCancelTaskRunsResponse</a></td>+ <td><p>Cancels multiple running task executions.+Permissions required: bb.taskRuns.create (or issue creator for data export issues, or user with rollout policy role for the environment)</p></td>+ </tr>++ <tr>+ <td>PreviewTaskRunRollback</td>+ <td><a href="#bytebase.v1.PreviewTaskRunRollbackRequest">PreviewTaskRunRollbackRequest</a></td>+ <td><a href="#bytebase.v1.PreviewTaskRunRollbackResponse">PreviewTaskRunRollbackResponse</a></td>+ <td><p>Generates rollback SQL for a completed task run.+Permissions required: bb.taskRuns.list</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>tenant_id</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>Azure AD tenant ID (Directory ID). </p></td>- </tr>- <tr>- <td>client_id</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>Azure AD application (client) ID. </p></td>- </tr>+ <tr>+ <td>GetRollout</td>+ <td>GET</td>+ <td>/v1/{name=projects/*/plans/*/rollout}</td>+ <td></td>+ </tr>- <tr>- <td>client_secret</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>Azure AD client secret. </p></td>- </tr>+- </tbody>- </table>------ <h3 id="bytebase.v1.AppIMSetting.Wecom">AppIMSetting.Wecom</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>corp_id</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p> </p></td>- </tr>+ <tr>+ <td>ListRollouts</td>+ <td>GET</td>+ <td>/v1/{parent=projects/*}/rollouts</td>+ <td></td>+ </tr>- <tr>- <td>agent_id</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p> </p></td>- </tr>+- <tr>- <td>secret</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p> </p></td>- </tr>- </tbody>- </table>------ <h3 id="bytebase.v1.DataClassificationSetting">DataClassificationSetting</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>CreateRollout</td>+ <td>POST</td>+ <td>/v1/{parent=projects/*/plans/*}/rollout</td>+ <td>*</td>+ </tr>- <tr>- <td>configs</td>- <td><a href="#bytebase.v1.DataClassificationSetting.DataClassificationConfig">DataClassificationSetting.DataClassificationConfig</a></td>- <td>repeated</td>- <td><p> </p></td>- </tr>+- </tbody>- </table>------ <h3 id="bytebase.v1.DataClassificationSetting.DataClassificationConfig">DataClassificationSetting.DataClassificationConfig</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>id</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>id is the uuid for classification. Each project can chose one classification config. </p></td>- </tr>+ <tr>+ <td>ListTaskRuns</td>+ <td>GET</td>+ <td>/v1/{parent=projects/*/plans/*/rollout/stages/*/tasks/*}/taskRuns</td>+ <td></td>+ </tr>- <tr>- <td>title</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p> </p></td>- </tr>+- <tr>- <td>levels</td>- <td><a href="#bytebase.v1.DataClassificationSetting.DataClassificationConfig.Level">DataClassificationSetting.DataClassificationConfig.Level</a></td>- <td>repeated</td>- <td><p>levels is user defined level list for classification. </p></td>- </tr>- <tr>- <td>classification</td>- <td><a href="#bytebase.v1.DataClassificationSetting.DataClassificationConfig.ClassificationEntry">DataClassificationSetting.DataClassificationConfig.ClassificationEntry</a></td>- <td>repeated</td>- <td><p>classification is the id - DataClassification map.-The id should in [0-9]+-[0-9]+-[0-9]+ format. </p></td>- </tr>+ <tr>+ <td>GetTaskRun</td>+ <td>GET</td>+ <td>/v1/{name=projects/*/plans/*/rollout/stages/*/tasks/*/taskRuns/*}</td>+ <td></td>+ </tr>- </tbody>- </table>------ <h3 id="bytebase.v1.DataClassificationSetting.DataClassificationConfig.ClassificationEntry">DataClassificationSetting.DataClassificationConfig.ClassificationEntry</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></td>- <td><p> </p></td>- </tr>- <tr>- <td>value</td>- <td><a href="#bytebase.v1.DataClassificationSetting.DataClassificationConfig.DataClassification">DataClassificationSetting.DataClassificationConfig.DataClassification</a></td>- <td></td>- <td><p> </p></td>- </tr>+ <tr>+ <td>GetTaskRunLog</td>+ <td>GET</td>+ <td>/v1/{parent=projects/*/plans/*/rollout/stages/*/tasks/*/taskRuns/*}/log</td>+ <td></td>+ </tr>+++++ <tr>+ <td>GetTaskRunSession</td>+ <td>GET</td>+ <td>/v1/{parent=projects/*/plans/*/rollout/stages/*/tasks/*/taskRuns/*}/session</td>+ <td></td>+ </tr>+++++ <tr>+ <td>BatchRunTasks</td>+ <td>POST</td>+ <td>/v1/{parent=projects/*/plans/*/rollout/stages/*}/tasks:batchRun</td>+ <td>*</td>+ </tr>+++++ <tr>+ <td>BatchSkipTasks</td>+ <td>POST</td>+ <td>/v1/{parent=projects/*/plans/*/rollout/stages/*}/tasks:batchSkip</td>+ <td>*</td>+ </tr>+++++ <tr>+ <td>BatchCancelTaskRuns</td>+ <td>POST</td>+ <td>/v1/{parent=projects/*/plans/*/rollout/stages/*/tasks/*}/taskRuns:batchCancel</td>+ <td>*</td>+ </tr>++++ <tr>+ <td>PreviewTaskRunRollback</td>+ <td>POST</td>+ <td>/v1/{name=projects/*/plans/*/rollout/stages/*/tasks/*/taskRuns/*}:previewRollback</td>+ <td>*</td>+ </tr>++</tbody></table>-++++ <div class="file-heading">+ <h2 id="v1/instance_role_service.proto">v1/instance_role_service.proto</h2><a href="#title">Top</a>+ </div>+ <p></p>-- <h3 id="bytebase.v1.DataClassificationSetting.DataClassificationConfig.DataClassification">DataClassificationSetting.DataClassificationConfig.DataClassification</h3>- <p></p>+ <h3 id="bytebase.v1.InstanceRole">InstanceRole</h3>+ <p>InstanceRole is the API message for instance role.</p><table class="field-table">@@ -6828,55 +6790,49 @@ The id should in [0-9]+-[0-9]+-[0-9]+ format. </p></td><tbody><tr>- <td>id</td>+ <td>name</td><td><a href="#string">string</a></td><td></td>- <td><p>id is the classification id in [0-9]+-[0-9]+-[0-9]+ format. </p></td>+ <td><p>The name of the role.+Format: instances/{instance}/roles/{role}+The role name is the unique name for the role. </p></td></tr><tr>- <td>title</td>+ <td>role_name</td><td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>The role name. It's unique within the instance. </p></td></tr><tr>- <td>level</td>- <td><a href="#int32">int32</a></td>+ <td>password</td>+ <td><a href="#string">string</a></td><td>optional</td>- <td><p>The sensitivity level. Maps to Level.level. </p></td>+ <td><p>The role password. </p></td></tr>- </tbody>- </table>------ <h3 id="bytebase.v1.DataClassificationSetting.DataClassificationConfig.Level">DataClassificationSetting.DataClassificationConfig.Level</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>connection_limit</td>+ <td><a href="#int32">int32</a></td>+ <td>optional</td>+ <td><p>The connection count limit for this role. </p></td>+ </tr><tr>- <td>title</td>+ <td>valid_until</td><td><a href="#string">string</a></td>- <td></td>- <td><p> </p></td>+ <td>optional</td>+ <td><p>The expiration for the role's password. </p></td></tr><tr>- <td>level</td>- <td><a href="#int32">int32</a></td>- <td></td>- <td><p>The numeric level for ordering. Higher = more sensitive. </p></td>+ <td>attribute</td>+ <td><a href="#string">string</a></td>+ <td>optional</td>+ <td><p>The role attribute.+For PostgreSQL, it contains super_user, no_inherit, create_role, create_db, can_login, replication, and bypass_rls. Docs: https://www.postgresql.org/docs/current/role-attributes.html+For MySQL, it's the global privileges as GRANT statements, which means it only contains "GRANT ... ON *.* TO ...". Docs: https://dev.mysql.com/doc/refman/8.0/en/grant.html </p></td></tr></tbody>@@ -6886,7 +6842,7 @@ The id should in [0-9]+-[0-9]+-[0-9]+ format. </p></td>- <h3 id="bytebase.v1.EmailSetting">EmailSetting</h3>+ <h3 id="bytebase.v1.ListInstanceRolesRequest">ListInstanceRolesRequest</h3><p></p>@@ -6897,31 +6853,41 @@ The id should in [0-9]+-[0-9]+-[0-9]+ format. </p></td><tbody><tr>- <td>from</td>+ <td>parent</td><td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>The parent, which owns this collection of roles.+Format: instances/{instance} </p></td></tr><tr>- <td>from_name</td>- <td><a href="#string">string</a></td>+ <td>page_size</td>+ <td><a href="#int32">int32</a></td><td></td>- <td><p> </p></td>+ <td><p>Not used.+The maximum number of roles to return. The service may return fewer than+this value.+If unspecified, at most 10 roles will be returned.+The maximum value is 1000; values above 1000 will be coerced to 1000. </p></td></tr><tr>- <td>type</td>- <td><a href="#bytebase.v1.EmailSetting.Type">EmailSetting.Type</a></td>+ <td>page_token</td>+ <td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>Not used.+A page token, received from a previous `ListInstanceRoles` call.+Provide this to retrieve the subsequent page.++When paginating, all other parameters provided to `ListInstanceRoles` must match+the call that provided the page token. </p></td></tr><tr>- <td>smtp</td>- <td><a href="#bytebase.v1.EmailSetting.SMTPConfig">EmailSetting.SMTPConfig</a></td>+ <td>refresh</td>+ <td><a href="#bool">bool</a></td><td></td>- <td><p> </p></td>+ <td><p>Refresh will refresh and return the latest data. </p></td></tr></tbody>@@ -6931,7 +6897,7 @@ The id should in [0-9]+-[0-9]+-[0-9]+ format. </p></td>- <h3 id="bytebase.v1.EmailSetting.SMTPConfig">EmailSetting.SMTPConfig</h3>+ <h3 id="bytebase.v1.ListInstanceRolesResponse">ListInstanceRolesResponse</h3><p></p>@@ -6942,45 +6908,18 @@ The id should in [0-9]+-[0-9]+-[0-9]+ format. </p></td><tbody><tr>- <td>host</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p> </p></td>- </tr>-- <tr>- <td>port</td>- <td><a href="#int32">int32</a></td>- <td></td>- <td><p> </p></td>- </tr>-- <tr>- <td>username</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p> </p></td>+ <td>roles</td>+ <td><a href="#bytebase.v1.InstanceRole">InstanceRole</a></td>+ <td>repeated</td>+ <td><p>The roles from the specified request. </p></td></tr><tr>- <td>password</td>+ <td>next_page_token</td><td><a href="#string">string</a></td><td></td>- <td><p> </p></td>- </tr>-- <tr>- <td>encryption</td>- <td><a href="#bytebase.v1.EmailSetting.SMTPConfig.Encryption">EmailSetting.SMTPConfig.Encryption</a></td>- <td></td>- <td><p> </p></td>- </tr>-- <tr>- <td>authentication</td>- <td><a href="#bytebase.v1.EmailSetting.SMTPConfig.Authentication">EmailSetting.SMTPConfig.Authentication</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>@@ -6990,87 +6929,69 @@ The id should in [0-9]+-[0-9]+-[0-9]+ format. </p></td>- <h3 id="bytebase.v1.EnvironmentSetting">EnvironmentSetting</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="#bytebase.v1.EnvironmentSetting.Environment">EnvironmentSetting.Environment</a></td>- <td>repeated</td>- <td><p> </p></td>- </tr>-- </tbody>- </table>+-+-- <h3 id="bytebase.v1.EnvironmentSetting.Environment">EnvironmentSetting.Environment</h3>- <p></p>+ <h3 id="bytebase.v1.InstanceRoleService">InstanceRoleService</h3>+ <p>InstanceRoleService manages database roles within instances.</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>ListInstanceRoles</td>+ <td><a href="#bytebase.v1.ListInstanceRolesRequest">ListInstanceRolesRequest</a></td>+ <td><a href="#bytebase.v1.ListInstanceRolesResponse">ListInstanceRolesResponse</a></td>+ <td><p>Lists all database roles in an instance.+Permissions required: bb.instanceRoles.list</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>name</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The resource name of the environment.-Format: environments/{environment}.-Output only. </p></td>- </tr>-- <tr>- <td>id</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The resource id of the environment.-This value should be 4-63 characters, and valid characters-are /[a-z][0-9]-/. </p></td>- </tr>-- <tr>- <td>title</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The display name of the environment. </p></td>- </tr>-- <tr>- <td>tags</td>- <td><a href="#bytebase.v1.EnvironmentSetting.Environment.TagsEntry">EnvironmentSetting.Environment.TagsEntry</a></td>- <td>repeated</td>- <td><p> </p></td>- </tr>- <tr>- <td>color</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p> </p></td>- </tr>+ <tr>+ <td>ListInstanceRoles</td>+ <td>GET</td>+ <td>/v1/{parent=instances/*}/roles</td>+ <td></td>+ </tr>+</tbody></table>--+- <h3 id="bytebase.v1.EnvironmentSetting.Environment.TagsEntry">EnvironmentSetting.Environment.TagsEntry</h3>+ <div class="file-heading">+ <h2 id="v1/instance_service.proto">v1/instance_service.proto</h2><a href="#title">Top</a>+ </div>+ <p></p>+++ <h3 id="bytebase.v1.AddDataSourceRequest">AddDataSourceRequest</h3><p></p>@@ -7081,17 +7002,26 @@ are /[a-z][0-9]-/. </p></td><tbody><tr>- <td>key</td>+ <td>name</td><td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>The name of the instance to add a data source to.+Format: instances/{instance} </p></td>+ </tr>++ <tr>+ <td>data_source</td>+ <td><a href="#bytebase.v1.DataSource">DataSource</a></td>+ <td></td>+ <td><p>Identified by data source ID.+Only READ_ONLY data source can be added. </p></td></tr><tr>- <td>value</td>- <td><a href="#string">string</a></td>+ <td>validate_only</td>+ <td><a href="#bool">bool</a></td><td></td>- <td><p> </p></td>+ <td><p>Validate only also tests the data source connection. </p></td></tr></tbody>@@ -7101,8 +7031,8 @@ are /[a-z][0-9]-/. </p></td>- <h3 id="bytebase.v1.GetSettingRequest">GetSettingRequest</h3>- <p>The request message for getting a setting.</p>+ <h3 id="bytebase.v1.BatchSyncInstancesRequest">BatchSyncInstancesRequest</h3>+ <p></p><table class="field-table">@@ -7112,10 +7042,11 @@ are /[a-z][0-9]-/. </p></td><tbody><tr>- <td>name</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The resource name of the setting. </p></td>+ <td>requests</td>+ <td><a href="#bytebase.v1.SyncInstanceRequest">SyncInstanceRequest</a></td>+ <td>repeated</td>+ <td><p>The request message specifying the instances to sync.+A maximum of 1000 instances can be synced in a batch. </p></td></tr></tbody>@@ -7125,8 +7056,15 @@ are /[a-z][0-9]-/. </p></td>- <h3 id="bytebase.v1.GetSettingResponse">GetSettingResponse</h3>- <p>The response message for getting a setting.</p>+ <h3 id="bytebase.v1.BatchSyncInstancesResponse">BatchSyncInstancesResponse</h3>+ <p></p>++++++ <h3 id="bytebase.v1.BatchUpdateInstancesRequest">BatchUpdateInstancesRequest</h3>+ <p></p><table class="field-table">@@ -7136,10 +7074,10 @@ are /[a-z][0-9]-/. </p></td><tbody><tr>- <td>setting</td>- <td><a href="#bytebase.v1.Setting">Setting</a></td>- <td></td>- <td><p> </p></td>+ <td>requests</td>+ <td><a href="#bytebase.v1.UpdateInstanceRequest">UpdateInstanceRequest</a></td>+ <td>repeated</td>+ <td><p>The request message specifying the resources to update. </p></td></tr></tbody>@@ -7149,14 +7087,7 @@ are /[a-z][0-9]-/. </p></td>- <h3 id="bytebase.v1.ListSettingsRequest">ListSettingsRequest</h3>- <p></p>------ <h3 id="bytebase.v1.ListSettingsResponse">ListSettingsResponse</h3>+ <h3 id="bytebase.v1.BatchUpdateInstancesResponse">BatchUpdateInstancesResponse</h3><p></p>@@ -7167,10 +7098,10 @@ are /[a-z][0-9]-/. </p></td><tbody><tr>- <td>settings</td>- <td><a href="#bytebase.v1.Setting">Setting</a></td>+ <td>instances</td>+ <td><a href="#bytebase.v1.Instance">Instance</a></td><td>repeated</td>- <td><p>The settings from the specified request. </p></td>+ <td><p> </p></td></tr></tbody>@@ -7180,7 +7111,7 @@ are /[a-z][0-9]-/. </p></td>- <h3 id="bytebase.v1.SemanticTypeSetting">SemanticTypeSetting</h3>+ <h3 id="bytebase.v1.CreateInstanceRequest">CreateInstanceRequest</h3><p></p>@@ -7191,10 +7122,28 @@ are /[a-z][0-9]-/. </p></td><tbody><tr>- <td>types</td>- <td><a href="#bytebase.v1.SemanticTypeSetting.SemanticType">SemanticTypeSetting.SemanticType</a></td>- <td>repeated</td>- <td><p> </p></td>+ <td>instance</td>+ <td><a href="#bytebase.v1.Instance">Instance</a></td>+ <td></td>+ <td><p>The instance to create. </p></td>+ </tr>++ <tr>+ <td>instance_id</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The ID to use for the instance, which will become the final component of+the instance's resource name.++This value should be 4-63 characters, and valid characters+are /[a-z][0-9]-/. </p></td>+ </tr>++ <tr>+ <td>validate_only</td>+ <td><a href="#bool">bool</a></td>+ <td></td>+ <td><p>Validate only also tests the data source connection. </p></td></tr></tbody>@@ -7204,7 +7153,7 @@ are /[a-z][0-9]-/. </p></td>- <h3 id="bytebase.v1.SemanticTypeSetting.SemanticType">SemanticTypeSetting.SemanticType</h3>+ <h3 id="bytebase.v1.DataSource">DataSource</h3><p></p>@@ -7215,146 +7164,359 @@ are /[a-z][0-9]-/. </p></td><tbody><tr>- <td>id</td>+ <td>id</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The unique identifier for this data source. </p></td>+ </tr>++ <tr>+ <td>type</td>+ <td><a href="#bytebase.v1.DataSourceType">DataSourceType</a></td>+ <td></td>+ <td><p>The type of data source (ADMIN or READ_ONLY). </p></td>+ </tr>++ <tr>+ <td>username</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The username for database authentication. </p></td>+ </tr>++ <tr>+ <td>password</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The password for database authentication. </p></td>+ </tr>++ <tr>+ <td>use_ssl</td>+ <td><a href="#bool">bool</a></td>+ <td></td>+ <td><p>Use SSL to connect to the data source. By default, we use system default SSL configuration. </p></td>+ </tr>++ <tr>+ <td>ssl_ca</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The SSL certificate authority certificate. </p></td>+ </tr>++ <tr>+ <td>ssl_cert</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The SSL client certificate. </p></td>+ </tr>++ <tr>+ <td>ssl_key</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The SSL client private key. </p></td>+ </tr>++ <tr>+ <td>ssl_ca_path</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The local filesystem path to the SSL certificate authority certificate. </p></td>+ </tr>++ <tr>+ <td>ssl_cert_path</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The local filesystem path to the SSL client certificate. </p></td>+ </tr>++ <tr>+ <td>ssl_key_path</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The local filesystem path to the SSL client private key. </p></td>+ </tr>++ <tr>+ <td>ssl_ca_set</td>+ <td><a href="#bool">bool</a></td>+ <td></td>+ <td><p>Whether an SSL certificate authority certificate has been configured. </p></td>+ </tr>++ <tr>+ <td>ssl_cert_set</td>+ <td><a href="#bool">bool</a></td>+ <td></td>+ <td><p>Whether an SSL client certificate has been configured. </p></td>+ </tr>++ <tr>+ <td>ssl_key_set</td>+ <td><a href="#bool">bool</a></td>+ <td></td>+ <td><p>Whether an SSL client private key has been configured. </p></td>+ </tr>++ <tr>+ <td>ssl_ca_path_set</td>+ <td><a href="#bool">bool</a></td>+ <td></td>+ <td><p>Whether an SSL certificate authority path has been configured. </p></td>+ </tr>++ <tr>+ <td>ssl_cert_path_set</td>+ <td><a href="#bool">bool</a></td>+ <td></td>+ <td><p>Whether an SSL client certificate path has been configured. </p></td>+ </tr>++ <tr>+ <td>ssl_key_path_set</td>+ <td><a href="#bool">bool</a></td>+ <td></td>+ <td><p>Whether an SSL client private key path has been configured. </p></td>+ </tr>++ <tr>+ <td>verify_tls_certificate</td>+ <td><a href="#bool">bool</a></td>+ <td></td>+ <td><p>verify_tls_certificate enables TLS certificate verification for SSL connections.+Default is false (no verification) for backward compatibility.+Set to true for secure connections (recommended for production).+Only set to false for development or when certificates cannot be properly+validated (e.g., self-signed certs, VPN environments). </p></td>+ </tr>++ <tr>+ <td>host</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The hostname or IP address of the database server. </p></td>+ </tr>++ <tr>+ <td>port</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The port number of the database server. </p></td>+ </tr>++ <tr>+ <td>database</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The name of the database to connect to. </p></td>+ </tr>++ <tr>+ <td>srv</td>+ <td><a href="#bool">bool</a></td>+ <td></td>+ <td><p>srv, authentication_database and replica_set are used for MongoDB.+srv is a boolean flag that indicates whether the host is a DNS SRV record. </p></td>+ </tr>++ <tr>+ <td>authentication_database</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>authentication_database is the database name to authenticate against, which stores the user credentials. </p></td>+ </tr>++ <tr>+ <td>replica_set</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>replica_set is used for MongoDB replica set. </p></td>+ </tr>++ <tr>+ <td>sid</td><td><a href="#string">string</a></td><td></td>- <td><p>id is the uuid for semantic type. </p></td>+ <td><p>sid and service_name are used for Oracle. </p></td></tr><tr>- <td>title</td>+ <td>service_name</td><td><a href="#string">string</a></td><td></td>- <td><p>the title of the semantic type, it should not be empty. </p></td>+ <td><p> </p></td></tr><tr>- <td>description</td>+ <td>ssh_host</td><td><a href="#string">string</a></td><td></td>- <td><p>the description of the semantic type, it can be empty. </p></td>+ <td><p>Connection over SSH.+The hostname of the SSH server agent.+Required. </p></td></tr><tr>- <td>algorithm</td>- <td><a href="#bytebase.v1.Algorithm">Algorithm</a></td>+ <td>ssh_port</td>+ <td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>The port of the SSH server agent. It's 22 typically.+Required. </p></td></tr><tr>- <td>icon</td>+ <td>ssh_user</td><td><a href="#string">string</a></td><td></td>- <td><p>icon is the icon for semantic type, it can be emoji or base64 encoded image. </p></td>+ <td><p>The user to login the server.+Required. </p></td></tr>- </tbody>- </table>------ <h3 id="bytebase.v1.Setting">Setting</h3>- <p>The schema of setting.</p>--- <table class="field-table">- <thead>- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>- </thead>- <tbody>+ <tr>+ <td>ssh_password</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The password to login the server. If it's empty string, no password is required. </p></td>+ </tr><tr>- <td>name</td>+ <td>ssh_private_key</td><td><a href="#string">string</a></td><td></td>- <td><p>The resource name of the setting.-Format: settings/{setting}-Example: "settings/SEMANTIC_TYPES" </p></td>+ <td><p>The private key to login the server. If it's empty string, we will use the system default private key from os.Getenv("SSH_AUTH_SOCK"). </p></td></tr><tr>- <td>value</td>- <td><a href="#bytebase.v1.SettingValue">SettingValue</a></td>+ <td>authentication_private_key</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>The configuration value of the setting. </p></td>+ <td><p>PKCS#8 private key in PEM format. If it's empty string, no private key is required.+Used for authentication when connecting to the data source. </p></td></tr>- </tbody>- </table>------ <h3 id="bytebase.v1.SettingValue">SettingValue</h3>- <p>The data in setting value.</p>--- <table class="field-table">- <thead>- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>- </thead>- <tbody>+ <tr>+ <td>authentication_private_key_passphrase</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>Passphrase for the encrypted PKCS#8 private key. Only used when the private key is encrypted. </p></td>+ </tr><tr>- <td>app_im</td>- <td><a href="#bytebase.v1.AppIMSetting">AppIMSetting</a></td>+ <td>external_secret</td>+ <td><a href="#bytebase.v1.DataSourceExternalSecret">DataSourceExternalSecret</a></td><td></td><td><p> </p></td></tr><tr>- <td>workspace_profile</td>- <td><a href="#bytebase.v1.WorkspaceProfileSetting">WorkspaceProfileSetting</a></td>+ <td>authentication_type</td>+ <td><a href="#bytebase.v1.DataSource.AuthenticationType">DataSource.AuthenticationType</a></td><td></td><td><p> </p></td></tr><tr>- <td>workspace_approval</td>- <td><a href="#bytebase.v1.WorkspaceApprovalSetting">WorkspaceApprovalSetting</a></td>+ <td>azure_credential</td>+ <td><a href="#bytebase.v1.DataSource.AzureCredential">DataSource.AzureCredential</a></td><td></td><td><p> </p></td></tr><tr>- <td>data_classification</td>- <td><a href="#bytebase.v1.DataClassificationSetting">DataClassificationSetting</a></td>+ <td>aws_credential</td>+ <td><a href="#bytebase.v1.DataSource.AWSCredential">DataSource.AWSCredential</a></td><td></td><td><p> </p></td></tr><tr>- <td>semantic_type</td>- <td><a href="#bytebase.v1.SemanticTypeSetting">SemanticTypeSetting</a></td>+ <td>gcp_credential</td>+ <td><a href="#bytebase.v1.DataSource.GCPCredential">DataSource.GCPCredential</a></td><td></td><td><p> </p></td></tr><tr>- <td>ai</td>- <td><a href="#bytebase.v1.AISetting">AISetting</a></td>+ <td>sasl_config</td>+ <td><a href="#bytebase.v1.SASLConfig">SASLConfig</a></td><td></td><td><p> </p></td></tr><tr>- <td>environment</td>- <td><a href="#bytebase.v1.EnvironmentSetting">EnvironmentSetting</a></td>+ <td>additional_addresses</td>+ <td><a href="#bytebase.v1.DataSource.Address">DataSource.Address</a></td>+ <td>repeated</td>+ <td><p>additional_addresses is used for MongoDB replica set. </p></td>+ </tr>++ <tr>+ <td>direct_connection</td>+ <td><a href="#bool">bool</a></td>+ <td></td>+ <td><p>direct_connection is used for MongoDB to dispatch all the operations to the node specified in the connection string. </p></td>+ </tr>++ <tr>+ <td>region</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>region is the location of where the DB is, works for AWS RDS. For example, us-east-1. </p></td>+ </tr>++ <tr>+ <td>warehouse_id</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>warehouse_id is used by Databricks. </p></td>+ </tr>++ <tr>+ <td>master_name</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>master_name is the master name used by connecting redis-master via redis sentinel. </p></td>+ </tr>++ <tr>+ <td>master_username</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>master_username and master_password are master credentials used by redis sentinel mode. </p></td>+ </tr>++ <tr>+ <td>master_password</td>+ <td><a href="#string">string</a></td><td></td><td><p> </p></td></tr><tr>- <td>email</td>- <td><a href="#bytebase.v1.EmailSetting">EmailSetting</a></td>+ <td>redis_type</td>+ <td><a href="#bytebase.v1.DataSource.RedisType">DataSource.RedisType</a></td><td></td><td><p> </p></td></tr>+ <tr>+ <td>cluster</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>Cluster is the cluster name for the data source. Used by CockroachDB. </p></td>+ </tr>++ <tr>+ <td>extra_connection_parameters</td>+ <td><a href="#bytebase.v1.DataSource.ExtraConnectionParametersEntry">DataSource.ExtraConnectionParametersEntry</a></td>+ <td>repeated</td>+ <td><p>Extra connection parameters for the database connection.+For PostgreSQL HA, this can be used to set target_session_attrs=read-write </p></td>+ </tr>+</tbody></table>@@ -7362,7 +7524,7 @@ Example: "settings/SEMANTIC_TYPES" </p></td>- <h3 id="bytebase.v1.TestEmailSettingRequest">TestEmailSettingRequest</h3>+ <h3 id="bytebase.v1.DataSource.AWSCredential">DataSource.AWSCredential</h3><p></p>@@ -7373,26 +7535,42 @@ Example: "settings/SEMANTIC_TYPES" </p></td><tbody><tr>- <td>parent</td>+ <td>access_key_id</td><td><a href="#string">string</a></td><td></td><td><p> </p></td></tr><tr>- <td>email_setting</td>- <td><a href="#bytebase.v1.EmailSetting">EmailSetting</a></td>+ <td>secret_access_key</td>+ <td><a href="#string">string</a></td><td></td><td><p> </p></td></tr><tr>- <td>to</td>+ <td>session_token</td><td><a href="#string">string</a></td><td></td><td><p> </p></td></tr>+ <tr>+ <td>role_arn</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>ARN of IAM role to assume for cross-account access.+See: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html </p></td>+ </tr>++ <tr>+ <td>external_id</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>Optional external ID for additional security when assuming role.+See: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-user_externalid.html </p></td>+ </tr>+</tbody></table>@@ -7400,7 +7578,7 @@ Example: "settings/SEMANTIC_TYPES" </p></td>- <h3 id="bytebase.v1.TestEmailSettingResponse">TestEmailSettingResponse</h3>+ <h3 id="bytebase.v1.DataSource.Address">DataSource.Address</h3><p></p>@@ -7411,14 +7589,14 @@ Example: "settings/SEMANTIC_TYPES" </p></td><tbody><tr>- <td>success</td>- <td><a href="#bool">bool</a></td>+ <td>host</td>+ <td><a href="#string">string</a></td><td></td><td><p> </p></td></tr><tr>- <td>error</td>+ <td>port</td><td><a href="#string">string</a></td><td></td><td><p> </p></td>@@ -7431,8 +7609,8 @@ Example: "settings/SEMANTIC_TYPES" </p></td>- <h3 id="bytebase.v1.UpdateSettingRequest">UpdateSettingRequest</h3>- <p>The request message for updating or creating a setting.</p>+ <h3 id="bytebase.v1.DataSource.AzureCredential">DataSource.AzureCredential</h3>+ <p></p><table class="field-table">@@ -7442,55 +7620,23 @@ Example: "settings/SEMANTIC_TYPES" </p></td><tbody><tr>- <td>setting</td>- <td><a href="#bytebase.v1.Setting">Setting</a></td>- <td></td>- <td><p>The setting to update. </p></td>- </tr>-- <tr>- <td>validate_only</td>- <td><a href="#bool">bool</a></td>- <td></td>- <td><p>validate_only is a flag to indicate whether to validate the setting value,-server would not persist the setting value if it is true. </p></td>- </tr>-- <tr>- <td>allow_missing</td>- <td><a href="#bool">bool</a></td>+ <td>tenant_id</td>+ <td><a href="#string">string</a></td><td></td><td><p> </p></td></tr><tr>- <td>update_mask</td>- <td><a href="#google.protobuf.FieldMask">google.protobuf.FieldMask</a></td>+ <td>client_id</td>+ <td><a href="#string">string</a></td><td></td><td><p> </p></td></tr>- </tbody>- </table>------ <h3 id="bytebase.v1.WorkspaceApprovalSetting">WorkspaceApprovalSetting</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>rules</td>- <td><a href="#bytebase.v1.WorkspaceApprovalSetting.Rule">WorkspaceApprovalSetting.Rule</a></td>- <td>repeated</td>+ <td>client_secret</td>+ <td><a href="#string">string</a></td>+ <td></td><td><p> </p></td></tr>@@ -7501,7 +7647,7 @@ server would not persist the setting value if it is true. </p></td>- <h3 id="bytebase.v1.WorkspaceApprovalSetting.Rule">WorkspaceApprovalSetting.Rule</h3>+ <h3 id="bytebase.v1.DataSource.ExtraConnectionParametersEntry">DataSource.ExtraConnectionParametersEntry</h3><p></p>@@ -7512,49 +7658,15 @@ server would not persist the setting value if it is true. </p></td><tbody><tr>- <td>template</td>- <td><a href="#bytebase.v1.ApprovalTemplate">ApprovalTemplate</a></td>+ <td>key</td>+ <td><a href="#string">string</a></td><td></td><td><p> </p></td></tr><tr>- <td>condition</td>- <td><a href="#google.type.Expr">google.type.Expr</a></td>- <td></td>- <td><p>The condition that is associated with the rule.-The syntax and semantics of CEL are documented at https://github.com/google/cel-spec--The `source` field filters which rules apply. The `condition` field then evaluates with full context.--All supported variables:-statement.affected_rows: affected row count in the DDL/DML, support "==", "!=", "<", "<=", ">", ">=" operations.-statement.table_rows: table row count number, support "==", "!=", "<", "<=", ">", ">=" operations.-resource.environment_id: the environment resource id, support "==", "!=", "in [xx]", "!(in [xx])" operations.-resource.project_id: the project resource id, support "==", "!=", "in [xx]", "!(in [xx])", "contains()", "matches()", "startsWith()", "endsWith()" operations.-resource.db_engine: the database engine type, support "==", "!=", "in [xx]", "!(in [xx])" operations. Check the Engine enum for values.-statement.sql_type: the SQL type, support "==", "!=", "in [xx]", "!(in [xx])" operations.-resource.database_name: the database name, support "==", "!=", "in [xx]", "!(in [xx])", "contains()", "matches()", "startsWith()", "endsWith()" operations.-resource.schema_name: the schema name, support "==", "!=", "in [xx]", "!(in [xx])", "contains()", "matches()", "startsWith()", "endsWith()" operations.-resource.table_name: the table name, support "==", "!=", "in [xx]", "!(in [xx])", "contains()", "matches()", "startsWith()", "endsWith()" operations.-statement.text: the SQL statement, support "contains()", "matches()", "startsWith()", "endsWith()" operations.-request.expiration_days: the role expiration days for the request, support "==", "!=", "<", "<=", ">", ">=" operations.-request.role: the request role full name, support "==", "!=", "in [xx]", "!(in [xx])", "contains()", "matches()", "startsWith()", "endsWith()" operations.--When source is CHANGE_DATABASE, support: statement.*, resource.* (excluding request.*)-When source is CREATE_DATABASE, support: resource.environment_id, resource.project_id, resource.db_engine, resource.database_name-When source is EXPORT_DATA, support: resource.environment_id, resource.project_id, resource.db_engine, resource.database_name, resource.schema_name, resource.table_name-When source is REQUEST_ROLE, support: resource.project_id, request.expiration_days, request.role-When source is REQUEST_ACCESS, support: resource.environment_id, resource.project_id, request.unmask--For examples:-resource.environment_id == "prod" && statement.affected_rows >= 100-resource.table_name.matches("sensitive_.*") && resource.db_engine == "MYSQL" </p></td>- </tr>-- <tr>- <td>source</td>- <td><a href="#bytebase.v1.WorkspaceApprovalSetting.Rule.Source">WorkspaceApprovalSetting.Rule.Source</a></td>+ <td>value</td>+ <td><a href="#string">string</a></td><td></td><td><p> </p></td></tr>@@ -7566,7 +7678,7 @@ resource.table_name.matches("sensitive_.*") && resource.db_engin- <h3 id="bytebase.v1.WorkspaceProfileSetting">WorkspaceProfileSetting</h3>+ <h3 id="bytebase.v1.DataSource.GCPCredential">DataSource.GCPCredential</h3><p></p>@@ -7577,154 +7689,160 @@ resource.table_name.matches("sensitive_.*") && resource.db_engin<tbody><tr>- <td>external_url</td>+ <td>content</td><td><a href="#string">string</a></td><td></td>- <td><p>The external URL is used for sso authentication callback. </p></td>+ <td><p> </p></td></tr>- <tr>- <td>disallow_signup</td>- <td><a href="#bool">bool</a></td>- <td></td>- <td><p>Disallow self-service signup, users can only be invited by the owner. </p></td>- </tr>+ </tbody>+ </table>++++++ <h3 id="bytebase.v1.DataSourceExternalSecret">DataSourceExternalSecret</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>require_mfa</td>- <td><a href="#bool">bool</a></td>+ <td>secret_type</td>+ <td><a href="#bytebase.v1.DataSourceExternalSecret.SecretType">DataSourceExternalSecret.SecretType</a></td><td></td>- <td><p>Require MFA for all users. </p></td>+ <td><p>The type of external secret store. </p></td></tr><tr>- <td>refresh_token_duration</td>- <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>+ <td>url</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>The duration for refresh token. Default is 7 days. </p></td>+ <td><p>The URL of the external secret store. </p></td></tr><tr>- <td>announcement</td>- <td><a href="#bytebase.v1.Announcement">Announcement</a></td>+ <td>auth_type</td>+ <td><a href="#bytebase.v1.DataSourceExternalSecret.AuthType">DataSourceExternalSecret.AuthType</a></td><td></td>- <td><p>The setting of custom announcement </p></td>+ <td><p>The authentication method for accessing the secret store. </p></td></tr><tr>- <td>maximum_role_expiration</td>- <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>+ <td>app_role</td>+ <td><a href="#bytebase.v1.DataSourceExternalSecret.AppRoleAuthOption">DataSourceExternalSecret.AppRoleAuthOption</a></td><td></td>- <td><p>The max duration for role expired. </p></td>+ <td><p>AppRole authentication configuration. </p></td></tr><tr>- <td>domains</td>+ <td>token</td><td><a href="#string">string</a></td>- <td>repeated</td>- <td><p>The workspace domain, e.g., bytebase.com. </p></td>- </tr>-- <tr>- <td>enforce_identity_domain</td>- <td><a href="#bool">bool</a></td>- <td></td>- <td><p>Only user and group from the domains can be created and login. </p></td>- </tr>-- <tr>- <td>database_change_mode</td>- <td><a href="#bytebase.v1.DatabaseChangeMode">DatabaseChangeMode</a></td><td></td>- <td><p>The workspace database change mode. </p></td>+ <td><p>Token for direct authentication. </p></td></tr><tr>- <td>disallow_password_signin</td>- <td><a href="#bool">bool</a></td>+ <td>engine_name</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>Whether to disallow password signin. (Except workspace admins) </p></td>+ <td><p>engine name is the name for secret engine. </p></td></tr><tr>- <td>enable_metric_collection</td>- <td><a href="#bool">bool</a></td>+ <td>secret_name</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>Whether to enable metric collection for the workspace. </p></td>+ <td><p>the secret name in the engine to store the password. </p></td></tr><tr>- <td>inactive_session_timeout</td>- <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>+ <td>password_key_name</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>The session expiration time if not activity detected for the user. Value <= 0 means no limit. </p></td>+ <td><p>the key name for the password. </p></td></tr><tr>- <td>enable_audit_log_stdout</td>+ <td>skip_vault_tls_verification</td><td><a href="#bool">bool</a></td><td></td>- <td><p>Whether to enable audit logging to stdout in structured JSON format.-Requires TEAM or ENTERPRISE license. </p></td>+ <td><p>TLS configuration for connecting to Vault server.+These fields are separate from the database TLS configuration in DataSource.+skip_vault_tls_verification disables TLS certificate verification for Vault connections.+Default is false (verification enabled) for security.+Only set to true for development or when certificates cannot be properly validated. </p></td></tr><tr>- <td>watermark</td>- <td><a href="#bool">bool</a></td>+ <td>vault_ssl_ca</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>Whether to display watermark on pages.-Requires ENTERPRISE license. </p></td>+ <td><p>CA certificate for Vault server verification. </p></td></tr><tr>- <td>directory_sync_token</td>+ <td>vault_ssl_cert</td><td><a href="#string">string</a></td><td></td>- <td><p>The token for directory sync authentication. </p></td>+ <td><p>Client certificate for mutual TLS authentication with Vault. </p></td></tr><tr>- <td>password_restriction</td>- <td><a href="#bytebase.v1.WorkspaceProfileSetting.PasswordRestriction">WorkspaceProfileSetting.PasswordRestriction</a></td>+ <td>vault_ssl_key</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>Password restriction settings. </p></td>+ <td><p>Client private key for mutual TLS authentication with Vault. </p></td></tr>- <tr>- <td>access_token_duration</td>- <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>- <td></td>- <td><p>The duration for access token. Default is 1 hour. </p></td>- </tr>+ </tbody>+ </table>++++++ <h3 id="bytebase.v1.DataSourceExternalSecret.AppRoleAuthOption">DataSourceExternalSecret.AppRoleAuthOption</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>enable_debug</td>- <td><a href="#bool">bool</a></td>+ <td>role_id</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>Whether debug mode is enabled. </p></td>+ <td><p>The role ID for Vault AppRole authentication. </p></td></tr><tr>- <td>sql_result_size</td>- <td><a href="#int64">int64</a></td>+ <td>secret_id</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>The maximum result size limit in bytes for query and export, works for the SQL Editor and Export Center.-The default value is 100MB, we will use the default value if the setting not exists, or the limit <= 0. </p></td>+ <td><p>the secret id for the role without ttl. </p></td></tr><tr>- <td>query_timeout</td>- <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>+ <td>type</td>+ <td><a href="#bytebase.v1.DataSourceExternalSecret.AppRoleAuthOption.SecretType">DataSourceExternalSecret.AppRoleAuthOption.SecretType</a></td><td></td>- <td><p>The query timeout duration for query and export, works for the SQL Editor and Export Center. </p></td>+ <td><p>The type of secret for AppRole authentication. </p></td></tr><tr>- <td>allow_email_code_signin</td>- <td><a href="#bool">bool</a></td>+ <td>mount_path</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>Allow signin/signup using email + a 6-digit one-time verification code.-Requires the EMAIL setting to be configured on the workspace. </p></td>+ <td><p>The path where the approle auth method is mounted. </p></td></tr></tbody>@@ -7734,7 +7852,7 @@ Requires the EMAIL setting to be configured on the workspace. </p></td>- <h3 id="bytebase.v1.WorkspaceProfileSetting.PasswordRestriction">WorkspaceProfileSetting.PasswordRestriction</h3>+ <h3 id="bytebase.v1.DeleteInstanceRequest">DeleteInstanceRequest</h3><p></p>@@ -7745,52 +7863,28 @@ Requires the EMAIL setting to be configured on the workspace. </p></td><tbody><tr>- <td>min_length</td>- <td><a href="#int32">int32</a></td>- <td></td>- <td><p>min_length is the minimum length for password, should no less than 8. </p></td>- </tr>-- <tr>- <td>require_number</td>- <td><a href="#bool">bool</a></td>- <td></td>- <td><p>require_number requires the password must contains at least one number. </p></td>- </tr>-- <tr>- <td>require_letter</td>- <td><a href="#bool">bool</a></td>- <td></td>- <td><p>require_letter requires the password must contains at least one letter, regardless of upper case or lower case </p></td>- </tr>-- <tr>- <td>require_uppercase_letter</td>- <td><a href="#bool">bool</a></td>+ <td>name</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>require_uppercase_letter requires the password must contains at least one upper case letter. </p></td>+ <td><p>The name of the instance to delete.+Format: instances/{instance} </p></td></tr><tr>- <td>require_special_character</td>+ <td>force</td><td><a href="#bool">bool</a></td><td></td>- <td><p>require_special_character requires the password must contains at least one special character. </p></td>+ <td><p>If set to true, any databases and sheets from this project will also be moved to default project, and all open issues will be closed. </p></td></tr><tr>- <td>require_reset_password_for_first_login</td>+ <td>purge</td><td><a href="#bool">bool</a></td><td></td>- <td><p>require_reset_password_for_first_login requires users to reset their password after the 1st login. </p></td>- </tr>-- <tr>- <td>password_rotation</td>- <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>- <td></td>- <td><p>password_rotation requires users to reset their password after the duration. </p></td>+ <td><p>If set to true, permanently purge the soft-deleted instance and all related resources.+This operation is irreversible. Following AIP-165, this should only be used for+administrative cleanup of old soft-deleted instances.+The instance must already be soft-deleted for this to work. </p></td></tr></tbody>@@ -7800,470 +7894,373 @@ Requires the EMAIL setting to be configured on the workspace. </p></td>--- <h3 id="bytebase.v1.AISetting.Provider">AISetting.Provider</h3>- <p></p>- <table class="enum-table">- <thead>- <tr><td>Name</td><td>Number</td><td>Description</td></tr>- </thead>- <tbody>-- <tr>- <td>PROVIDER_UNSPECIFIED</td>- <td>0</td>- <td><p></p></td>- </tr>-- <tr>- <td>OPEN_AI</td>- <td>1</td>- <td><p></p></td>- </tr>-- <tr>- <td>CLAUDE</td>- <td>2</td>- <td><p></p></td>- </tr>-- <tr>- <td>GEMINI</td>- <td>3</td>- <td><p></p></td>- </tr>-- <tr>- <td>AZURE_OPENAI</td>- <td>4</td>- <td><p></p></td>- </tr>-- </tbody>- </table>-- <h3 id="bytebase.v1.Algorithm.InnerOuterMask.MaskType">Algorithm.InnerOuterMask.MaskType</h3>- <p></p>- <table class="enum-table">- <thead>- <tr><td>Name</td><td>Number</td><td>Description</td></tr>- </thead>- <tbody>-- <tr>- <td>MASK_TYPE_UNSPECIFIED</td>- <td>0</td>- <td><p></p></td>- </tr>-- <tr>- <td>INNER</td>- <td>1</td>- <td><p></p></td>- </tr>-- <tr>- <td>OUTER</td>- <td>2</td>- <td><p></p></td>- </tr>-- </tbody>- </table>-- <h3 id="bytebase.v1.Announcement.AlertLevel">Announcement.AlertLevel</h3>- <p>We support three levels of AlertLevel: INFO, WARNING, and ERROR.</p>- <table class="enum-table">- <thead>- <tr><td>Name</td><td>Number</td><td>Description</td></tr>- </thead>- <tbody>-- <tr>- <td>ALERT_LEVEL_UNSPECIFIED</td>- <td>0</td>- <td><p></p></td>- </tr>-- <tr>- <td>INFO</td>- <td>1</td>- <td><p></p></td>- </tr>-- <tr>- <td>WARNING</td>- <td>2</td>- <td><p></p></td>- </tr>-- <tr>- <td>CRITICAL</td>- <td>3</td>- <td><p></p></td>- </tr>-- </tbody>- </table>-- <h3 id="bytebase.v1.DatabaseChangeMode">DatabaseChangeMode</h3>- <p></p>- <table class="enum-table">- <thead>- <tr><td>Name</td><td>Number</td><td>Description</td></tr>- </thead>- <tbody>-- <tr>- <td>DATABASE_CHANGE_MODE_UNSPECIFIED</td>- <td>0</td>- <td><p></p></td>- </tr>-- <tr>- <td>PIPELINE</td>- <td>1</td>- <td><p>A more advanced database change process, including custom approval workflows and other advanced features.-Default to this mode.</p></td>- </tr>-- <tr>- <td>EDITOR</td>- <td>2</td>- <td><p>A simple database change process in SQL editor. Users can execute SQL directly.</p></td>- </tr>-- </tbody>- </table>-- <h3 id="bytebase.v1.EmailSetting.SMTPConfig.Authentication">EmailSetting.SMTPConfig.Authentication</h3>- <p></p>- <table class="enum-table">- <thead>- <tr><td>Name</td><td>Number</td><td>Description</td></tr>- </thead>- <tbody>-- <tr>- <td>AUTHENTICATION_UNSPECIFIED</td>- <td>0</td>- <td><p></p></td>- </tr>-- <tr>- <td>AUTHENTICATION_NONE</td>- <td>1</td>- <td><p></p></td>- </tr>-- <tr>- <td>PLAIN</td>- <td>2</td>- <td><p></p></td>- </tr>-- <tr>- <td>LOGIN</td>- <td>3</td>- <td><p></p></td>- </tr>-- <tr>- <td>CRAM_MD5</td>- <td>4</td>- <td><p></p></td>- </tr>-- </tbody>- </table>-- <h3 id="bytebase.v1.EmailSetting.SMTPConfig.Encryption">EmailSetting.SMTPConfig.Encryption</h3>- <p></p>- <table class="enum-table">- <thead>- <tr><td>Name</td><td>Number</td><td>Description</td></tr>- </thead>- <tbody>-- <tr>- <td>ENCRYPTION_UNSPECIFIED</td>- <td>0</td>- <td><p></p></td>- </tr>-- <tr>- <td>ENCRYPTION_NONE</td>- <td>1</td>- <td><p></p></td>- </tr>-- <tr>- <td>STARTTLS</td>- <td>2</td>- <td><p></p></td>- </tr>-- <tr>- <td>SSL_TLS</td>- <td>3</td>- <td><p></p></td>- </tr>-- </tbody>- </table>-- <h3 id="bytebase.v1.EmailSetting.Type">EmailSetting.Type</h3>+ <h3 id="bytebase.v1.GetInstanceRequest">GetInstanceRequest</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></p></td>- </tr>-- <tr>- <td>SMTP</td>- <td>1</td>- <td><p></p></td>- </tr>-- </tbody>- </table>+++ <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 instance to retrieve.+Format: instances/{instance} </p></td>+ </tr>++ </tbody>+ </table>++++- <h3 id="bytebase.v1.Setting.SettingName">Setting.SettingName</h3>+ <h3 id="bytebase.v1.Instance">Instance</h3><p></p>- <table class="enum-table">- <thead>- <tr><td>Name</td><td>Number</td><td>Description</td></tr>- </thead>- <tbody>-- <tr>- <td>SETTING_NAME_UNSPECIFIED</td>- <td>0</td>- <td><p></p></td>- </tr>-- <tr>- <td>WORKSPACE_PROFILE</td>- <td>1</td>- <td><p></p></td>- </tr>-- <tr>- <td>WORKSPACE_APPROVAL</td>- <td>2</td>- <td><p></p></td>- </tr>-- <tr>- <td>APP_IM</td>- <td>3</td>- <td><p></p></td>- </tr>-- <tr>- <td>AI</td>- <td>4</td>- <td><p></p></td>- </tr>-- <tr>- <td>DATA_CLASSIFICATION</td>- <td>5</td>- <td><p></p></td>- </tr>-- <tr>- <td>SEMANTIC_TYPES</td>- <td>6</td>- <td><p></p></td>- </tr>-- <tr>- <td>ENVIRONMENT</td>- <td>7</td>- <td><p></p></td>- </tr>-- <tr>- <td>EMAIL</td>- <td>8</td>- <td><p></p></td>- </tr>-- </tbody>- </table>+++ <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 instance.+Format: instances/{instance} </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 instance. </p></td>+ </tr>++ <tr>+ <td>title</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The display title of the instance. </p></td>+ </tr>++ <tr>+ <td>engine</td>+ <td><a href="#bytebase.v1.Engine">Engine</a></td>+ <td></td>+ <td><p>The database engine type. </p></td>+ </tr>++ <tr>+ <td>engine_version</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The version of the database engine. </p></td>+ </tr>++ <tr>+ <td>external_link</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>External URL to the database instance console. </p></td>+ </tr>++ <tr>+ <td>data_sources</td>+ <td><a href="#bytebase.v1.DataSource">DataSource</a></td>+ <td>repeated</td>+ <td><p>Data source configurations for connecting to the instance. </p></td>+ </tr>++ <tr>+ <td>environment</td>+ <td><a href="#string">string</a></td>+ <td>optional</td>+ <td><p>The environment resource.+Format: environments/prod where prod is the environment resource ID. </p></td>+ </tr>++ <tr>+ <td>activation</td>+ <td><a href="#bool">bool</a></td>+ <td></td>+ <td><p>Whether the instance is activated for use. </p></td>+ </tr>++ <tr>+ <td>roles</td>+ <td><a href="#bytebase.v1.InstanceRole">InstanceRole</a></td>+ <td>repeated</td>+ <td><p>Database roles available in this instance. </p></td>+ </tr>++ <tr>+ <td>sync_interval</td>+ <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>+ <td></td>+ <td><p>How often the instance is synced. </p></td>+ </tr>++ <tr>+ <td>sync_databases</td>+ <td><a href="#string">string</a></td>+ <td>repeated</td>+ <td><p>Enable sync for following databases.+Default empty, means sync all schemas & databases. </p></td>+ </tr>++ <tr>+ <td>last_sync_time</td>+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>+ <td></td>+ <td><p>The last time the instance was synced. </p></td>+ </tr>++ <tr>+ <td>labels</td>+ <td><a href="#bytebase.v1.Instance.LabelsEntry">Instance.LabelsEntry</a></td>+ <td>repeated</td>+ <td><p>Labels are key-value pairs that can be attached to the instance.+For example, { "org_group": "infrastructure", "environment": "production" } </p></td>+ </tr>++ </tbody>+ </table>++++- <h3 id="bytebase.v1.WorkspaceApprovalSetting.Rule.Source">WorkspaceApprovalSetting.Rule.Source</h3>+ <h3 id="bytebase.v1.Instance.LabelsEntry">Instance.LabelsEntry</h3><p></p>- <table class="enum-table">- <thead>- <tr><td>Name</td><td>Number</td><td>Description</td></tr>- </thead>- <tbody>-- <tr>- <td>SOURCE_UNSPECIFIED</td>- <td>0</td>- <td><p></p></td>- </tr>-- <tr>- <td>CHANGE_DATABASE</td>- <td>1</td>- <td><p></p></td>- </tr>-- <tr>- <td>CREATE_DATABASE</td>- <td>2</td>- <td><p></p></td>- </tr>-- <tr>- <td>EXPORT_DATA</td>- <td>3</td>- <td><p></p></td>- </tr>-- <tr>- <td>REQUEST_ROLE</td>- <td>4</td>- <td><p></p></td>- </tr>-- <tr>- <td>REQUEST_ACCESS</td>- <td>5</td>- <td><p></p></td>- </tr>-- </tbody>- </table>+++ <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></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.InstanceResource">InstanceResource</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>title</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The display title of the instance. </p></td>+ </tr>++ <tr>+ <td>engine</td>+ <td><a href="#bytebase.v1.Engine">Engine</a></td>+ <td></td>+ <td><p>The database engine type. </p></td>+ </tr>++ <tr>+ <td>engine_version</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The version of the database engine. </p></td>+ </tr>++ <tr>+ <td>data_sources</td>+ <td><a href="#bytebase.v1.DataSource">DataSource</a></td>+ <td>repeated</td>+ <td><p>Data source configurations for the instance. </p></td>+ </tr>++ <tr>+ <td>activation</td>+ <td><a href="#bool">bool</a></td>+ <td></td>+ <td><p>Whether the instance is activated. </p></td>+ </tr>++ <tr>+ <td>name</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The name of the instance.+Format: instances/{instance} </p></td>+ </tr>++ <tr>+ <td>environment</td>+ <td><a href="#string">string</a></td>+ <td>optional</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.SettingService">SettingService</h3>- <p>SettingService manages workspace-level settings and configurations.</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>ListSettings</td>- <td><a href="#bytebase.v1.ListSettingsRequest">ListSettingsRequest</a></td>- <td><a href="#bytebase.v1.ListSettingsResponse">ListSettingsResponse</a></td>- <td><p>Lists all workspace settings.-Permissions required: bb.settings.list</p></td>- </tr>-- <tr>- <td>GetSetting</td>- <td><a href="#bytebase.v1.GetSettingRequest">GetSettingRequest</a></td>- <td><a href="#bytebase.v1.Setting">Setting</a></td>- <td><p>Retrieves a workspace setting by name.-Permissions required: bb.settings.get</p></td>- </tr>-- <tr>- <td>UpdateSetting</td>- <td><a href="#bytebase.v1.UpdateSettingRequest">UpdateSettingRequest</a></td>- <td><a href="#bytebase.v1.Setting">Setting</a></td>- <td><p>Updates a workspace setting.-Permissions required: bb.settings.set</p></td>- </tr>-- <tr>- <td>TestEmailSetting</td>- <td><a href="#bytebase.v1.TestEmailSettingRequest">TestEmailSettingRequest</a></td>- <td><a href="#bytebase.v1.TestEmailSettingResponse">TestEmailSettingResponse</a></td>- <td><p>Sends a test email using the provided config (without persisting).-Permissions required: bb.settings.set</p></td>- </tr>-- </tbody>- </table>+ <h3 id="bytebase.v1.KerberosConfig">KerberosConfig</h3>+ <p></p>--- <h4>Methods with HTTP bindings</h4>- <table>+ <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>ListSettings</td>- <td>GET</td>- <td>/v1/settings</td>- <td></td>- </tr>+ <tr>+ <td>primary</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The primary component of the Kerberos principal. </p></td>+ </tr>-+ <tr>+ <td>instance</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The instance component of the Kerberos principal. </p></td>+ </tr>+ <tr>+ <td>realm</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The Kerberos realm. </p></td>+ </tr>- <tr>- <td>GetSetting</td>- <td>GET</td>- <td>/v1/{name=settings/*}</td>- <td></td>- </tr>+ <tr>+ <td>keytab</td>+ <td><a href="#bytes">bytes</a></td>+ <td></td>+ <td><p>The keytab file contents for authentication. </p></td>+ </tr>-+ <tr>+ <td>kdc_host</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The hostname of the Key Distribution Center (KDC). </p></td>+ </tr>+ <tr>+ <td>kdc_port</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The port of the Key Distribution Center (KDC). </p></td>+ </tr>- <tr>- <td>UpdateSetting</td>- <td>PATCH</td>- <td>/v1/{setting.name=settings/*}</td>- <td>setting</td>- </tr>+ <tr>+ <td>kdc_transport_protocol</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The transport protocol for KDC communication (tcp or udp). </p></td>+ </tr>-+ </tbody>+ </table>++++++ <h3 id="bytebase.v1.ListInstanceDatabaseRequest">ListInstanceDatabaseRequest</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 instance.+Format: instances/{instance} </p></td>+ </tr>- <tr>- <td>TestEmailSetting</td>- <td>POST</td>- <td>/v1/{parent=workspaces/*}/settings/EMAIL:test</td>- <td>*</td>- </tr>+ <tr>+ <td>instance</td>+ <td><a href="#bytebase.v1.Instance">Instance</a></td>+ <td>optional</td>+ <td><p>The target instance. We need to set this field if the target instance is not created yet. </p></td>+ </tr>-</tbody></table>++-- <div class="file-heading">- <h2 id="v1/actuator_service.proto">v1/actuator_service.proto</h2><a href="#title">Top</a>- </div>- <p></p>+ <h3 id="bytebase.v1.ListInstanceDatabaseResponse">ListInstanceDatabaseResponse</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>databases</td>+ <td><a href="#string">string</a></td>+ <td>repeated</td>+ <td><p>All database name list in the instance. </p></td>+ </tr>++ </tbody>+ </table>+++- <h3 id="bytebase.v1.ActuatorInfo">ActuatorInfo</h3>- <p>System information and configuration for the Bytebase instance.</p><p>Actuator concept is similar to the Spring Boot Actuator.</p>+ <h3 id="bytebase.v1.ListInstancesRequest">ListInstancesRequest</h3>+ <p></p><table class="field-table">@@ -8273,152 +8270,206 @@ Permissions required: bb.settings.set</p></td><tbody><tr>- <td>version</td>- <td><a href="#string">string</a></td>+ <td>page_size</td>+ <td><a href="#int32">int32</a></td><td></td>- <td><p>The Bytebase server version. </p></td>+ <td><p>The maximum number of instances to return. The service may return fewer than+this value.+If unspecified, at most 10 instances will be returned.+The maximum value is 1000; values above 1000 will be coerced to 1000. </p></td></tr><tr>- <td>git_commit</td>+ <td>page_token</td><td><a href="#string">string</a></td><td></td>- <td><p>The git commit hash of the build. </p></td>- </tr>-- <tr>- <td>readonly</td>- <td><a href="#bool">bool</a></td>- <td></td>- <td><p>Whether the Bytebase instance is running in read-only mode. </p></td>- </tr>-- <tr>- <td>saas</td>- <td><a href="#bool">bool</a></td>- <td></td>- <td><p>Whether the Bytebase instance is running in SaaS mode where some features cannot be edited by users. </p></td>+ <td><p>A page token, received from a previous `ListInstances` call.+Provide this to retrieve the subsequent page.++When paginating, all other parameters provided to `ListInstances` must match+the call that provided the page token. </p></td></tr><tr>- <td>demo</td>+ <td>show_deleted</td><td><a href="#bool">bool</a></td><td></td>- <td><p>Whether the Bytebase instance is running in demo mode. </p></td>- </tr>-- <tr>- <td>host</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The host address of the Bytebase instance. </p></td>+ <td><p>Show deleted instances if specified. </p></td></tr><tr>- <td>port</td>+ <td>filter</td><td><a href="#string">string</a></td><td></td>- <td><p>The port number of the Bytebase instance. </p></td>+ <td><p>Filter the instance.+The syntax and semantics of CEL are documented at https://github.com/google/cel-spec++Supported filters:+- name: the instance name, support "==" and ".contains()" operator.+- resource_id: the instance id, support "==" and ".contains()" operator.+- environment: the environment full name in "environments/{id}" format, support "==" operator.+- state: the instance state, check State enum for values, support "==" operator.+- engine: the instance engine, check Engine enum for values. Support "==", "in [xx]", "!(in [xx])" operator.+- host: the instance host, support "==" and ".contains()" operator.+- port: the instance port, support "==" and ".contains()" operator.+- project: the project full name in "projects/{id}" format, support "==" operator.+- labels.{key}: the instance label, support "==" and "in" operators.++For example:+name == "sample instance"+name.contains("sample")+resource_id == "sample-instance"+resource_id.contains("sample")+state == "DELETED"+environment == "environments/test"+environment == "" (find instances which environment is not set)+engine == "MYSQL"+engine in ["MYSQL", "POSTGRES"]+!(engine in ["MYSQL", "POSTGRES"])+host == "127.0.0.1"+host.contains("127.0")+port == "54321"+port.contains("543")+labels.org_group == "infrastructure"+labels.environment in ["prod", "production"]+project == "projects/sample-project"+You can combine filter conditions like:+name.contains("sample") && environment == "environments/test"+host == "127.0.0.1" && port == "54321" </p></td></tr><tr>- <td>external_url</td>+ <td>order_by</td><td><a href="#string">string</a></td><td></td>- <td><p>The external URL where users or webhook callbacks access Bytebase. </p></td>- </tr>-- <tr>- <td>last_active_time</td>- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>- <td></td>- <td><p>The last time any API call was made, refreshed on each request. </p></td>+ <td><p>The order by of instances.+Support title, environment. The default sorting order is ascending.+For example:+- order_by = "title"+- order_by = "title desc"+- order_by = "title desc, environment asc" </p></td></tr>- <tr>- <td>workspace</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The unique identifier for the workspace.-Format: workspaces/{id} </p></td>- </tr>+ </tbody>+ </table>++++++ <h3 id="bytebase.v1.ListInstancesResponse">ListInstancesResponse</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>unlicensed_features</td>- <td><a href="#string">string</a></td>+ <td>instances</td>+ <td><a href="#bytebase.v1.Instance">Instance</a></td><td>repeated</td>- <td><p>List of features that are not licensed. </p></td>- </tr>-- <tr>- <td>docker</td>- <td><a href="#bool">bool</a></td>- <td></td>- <td><p>Whether the Bytebase instance is running in Docker. </p></td>+ <td><p>The instances from the specified request. </p></td></tr><tr>- <td>activated_user_count</td>- <td><a href="#int32">int32</a></td>+ <td>next_page_token</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>The number of activated users. </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>- <tr>- <td>activated_instance_count</td>- <td><a href="#int32">int32</a></td>- <td></td>- <td><p>The number of activated database instances. </p></td>- </tr>+ </tbody>+ </table>++++++ <h3 id="bytebase.v1.RemoveDataSourceRequest">RemoveDataSourceRequest</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>total_instance_count</td>- <td><a href="#int32">int32</a></td>+ <td>name</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>The total number of database instances. </p></td>+ <td><p>The name of the instance to remove a data source from.+Format: instances/{instance} </p></td></tr><tr>- <td>enable_sample</td>- <td><a href="#bool">bool</a></td>+ <td>data_source</td>+ <td><a href="#bytebase.v1.DataSource">DataSource</a></td><td></td>- <td><p>Whether sample data setup is enabled. </p></td>+ <td><p>Identified by data source ID.+Only READ_ONLY data source can be removed. </p></td></tr>- <tr>- <td>external_url_from_flag</td>- <td><a href="#bool">bool</a></td>- <td></td>- <td><p>Whether the external URL is set via command-line flag (and thus cannot be changed via UI). </p></td>- </tr>+ </tbody>+ </table>++++++ <h3 id="bytebase.v1.SASLConfig">SASLConfig</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>replica_count</td>- <td><a href="#int32">int32</a></td>+ <td>krb_config</td>+ <td><a href="#bytebase.v1.KerberosConfig">KerberosConfig</a></td><td></td>- <td><p>The number of active replicas (servers sharing the same database). </p></td>+ <td><p>Kerberos authentication configuration. </p></td></tr>- <tr>- <td>restriction</td>- <td><a href="#bytebase.v1.Restriction">Restriction</a></td>- <td></td>- <td><p> </p></td>- </tr>+ </tbody>+ </table>++++++ <h3 id="bytebase.v1.SyncInstanceRequest">SyncInstanceRequest</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>default_project</td>+ <td>name</td><td><a href="#string">string</a></td><td></td>- <td><p>The default project for unassigned databases.-Format: projects/{id} </p></td>+ <td><p>The name of instance.+Format: instances/{instance} </p></td></tr><tr>- <td>user_count_in_iam</td>- <td><a href="#int32">int32</a></td>+ <td>enable_full_sync</td>+ <td><a href="#bool">bool</a></td><td></td>- <td><p>The number of users in the workspace IAM (for seat limit display). </p></td>+ <td><p>When full sync is enabled, all databases in the instance will be synchronized. Otherwise, only+the instance metadata (such as the database list) and any newly discovered databases will be synced. </p></td></tr></tbody>@@ -8428,15 +8479,32 @@ Format: projects/{id} </p></td>- <h3 id="bytebase.v1.DeleteCacheRequest">DeleteCacheRequest</h3>- <p>Request message for deleting cache.</p>+ <h3 id="bytebase.v1.SyncInstanceResponse">SyncInstanceResponse</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>databases</td>+ <td><a href="#string">string</a></td>+ <td>repeated</td>+ <td><p>All database name list in the instance. </p></td>+ </tr>++ </tbody>+ </table>-+- <h3 id="bytebase.v1.GetActuatorInfoRequest">GetActuatorInfoRequest</h3>- <p>Request message for getting actuator information.</p>+ <h3 id="bytebase.v1.UndeleteInstanceRequest">UndeleteInstanceRequest</h3>+ <p></p><table class="field-table">@@ -8449,10 +8517,8 @@ Format: projects/{id} </p></td><td>name</td><td><a href="#string">string</a></td><td></td>- <td><p>Optional. The workspace to scope the response to.-Format: workspaces/{workspace}-When unset, the workspace is resolved from the request context (self-hosted)-or no workspace-scoped fields are returned (SaaS). </p></td>+ <td><p>The name of the deleted instance.+Format: instances/{instance} </p></td></tr></tbody>@@ -8462,7 +8528,7 @@ or no workspace-scoped fields are returned (SaaS). </p></td>- <h3 id="bytebase.v1.Restriction">Restriction</h3>+ <h3 id="bytebase.v1.UpdateDataSourceRequest">UpdateDataSourceRequest</h3><p></p>@@ -8473,39 +8539,40 @@ or no workspace-scoped fields are returned (SaaS). </p></td><tbody><tr>- <td>disallow_signup</td>- <td><a href="#bool">bool</a></td>+ <td>name</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>Whether self-service user signup is disabled. </p></td>+ <td><p>The name of the instance to update a data source.+Format: instances/{instance} </p></td></tr><tr>- <td>disallow_password_signin</td>- <td><a href="#bool">bool</a></td>+ <td>data_source</td>+ <td><a href="#bytebase.v1.DataSource">DataSource</a></td><td></td>- <td><p>Whether password-based signin is disabled (except for workspace admins). </p></td>+ <td><p>Identified by data source ID. </p></td></tr><tr>- <td>password_restriction</td>- <td><a href="#bytebase.v1.WorkspaceProfileSetting.PasswordRestriction">WorkspaceProfileSetting.PasswordRestriction</a></td>+ <td>update_mask</td>+ <td><a href="#google.protobuf.FieldMask">google.protobuf.FieldMask</a></td><td></td>- <td><p>Password complexity and restriction requirements. </p></td>+ <td><p>The list of fields to update. </p></td></tr><tr>- <td>allow_email_code_signin</td>+ <td>validate_only</td><td><a href="#bool">bool</a></td><td></td>- <td><p>Whether email + 6-digit code signin is enabled for this workspace. </p></td>+ <td><p>Validate only also tests the data source connection. </p></td></tr><tr>- <td>password_reset_enabled</td>+ <td>allow_missing</td><td><a href="#bool">bool</a></td><td></td>- <td><p>Whether password reset via email is available for this workspace.-True when the workspace (or deployment) has an email setting configured. </p></td>+ <td><p>If set to true, and the data source is not found, a new data source will be created.+In this situation, `update_mask` is ignored. </p></td></tr></tbody>@@ -8515,21 +8582,260 @@ True when the workspace (or deployment) has an email setting configured. </p></t- <h3 id="bytebase.v1.SetupSampleRequest">SetupSampleRequest</h3>- <p>Request message for setting up sample data.</p>+ <h3 id="bytebase.v1.UpdateInstanceRequest">UpdateInstanceRequest</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>instance</td>+ <td><a href="#bytebase.v1.Instance">Instance</a></td>+ <td></td>+ <td><p>The instance to update.++The instance's `name` field is used to identify the instance to update.+Format: instances/{instance} </p></td>+ </tr>++ <tr>+ <td>update_mask</td>+ <td><a href="#google.protobuf.FieldMask">google.protobuf.FieldMask</a></td>+ <td></td>+ <td><p>The list of fields to update. </p></td>+ </tr>++ <tr>+ <td>allow_missing</td>+ <td><a href="#bool">bool</a></td>+ <td></td>+ <td><p>If set to true, and the instance is not found, a new instance will be created.+In this situation, `update_mask` is ignored. </p></td>+ </tr>++ </tbody>+ </table>++-+++ <h3 id="bytebase.v1.DataSource.AuthenticationType">DataSource.AuthenticationType</h3>+ <p></p>+ <table class="enum-table">+ <thead>+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>AUTHENTICATION_UNSPECIFIED</td>+ <td>0</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>PASSWORD</td>+ <td>1</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>GOOGLE_CLOUD_SQL_IAM</td>+ <td>2</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>AWS_RDS_IAM</td>+ <td>3</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>AZURE_IAM</td>+ <td>4</td>+ <td><p></p></td>+ </tr>++ </tbody>+ </table>++ <h3 id="bytebase.v1.DataSource.RedisType">DataSource.RedisType</h3>+ <p></p>+ <table class="enum-table">+ <thead>+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>REDIS_TYPE_UNSPECIFIED</td>+ <td>0</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>STANDALONE</td>+ <td>1</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>SENTINEL</td>+ <td>2</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>CLUSTER</td>+ <td>3</td>+ <td><p></p></td>+ </tr>++ </tbody>+ </table>++ <h3 id="bytebase.v1.DataSourceExternalSecret.AppRoleAuthOption.SecretType">DataSourceExternalSecret.AppRoleAuthOption.SecretType</h3>+ <p></p>+ <table class="enum-table">+ <thead>+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>SECRET_TYPE_UNSPECIFIED</td>+ <td>0</td>+ <td><p>Unspecified secret type.</p></td>+ </tr>++ <tr>+ <td>PLAIN</td>+ <td>1</td>+ <td><p>Plain text secret.</p></td>+ </tr>++ <tr>+ <td>ENVIRONMENT</td>+ <td>2</td>+ <td><p>Secret from environment variable.</p></td>+ </tr>++ </tbody>+ </table>++ <h3 id="bytebase.v1.DataSourceExternalSecret.AuthType">DataSourceExternalSecret.AuthType</h3>+ <p></p>+ <table class="enum-table">+ <thead>+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>AUTH_TYPE_UNSPECIFIED</td>+ <td>0</td>+ <td><p>Unspecified authentication type.</p></td>+ </tr>++ <tr>+ <td>TOKEN</td>+ <td>1</td>+ <td><p>ref: https://developer.hashicorp.com/vault/docs/auth/token</p></td>+ </tr>++ <tr>+ <td>VAULT_APP_ROLE</td>+ <td>2</td>+ <td><p>ref: https://developer.hashicorp.com/vault/docs/auth/approle</p></td>+ </tr>++ </tbody>+ </table>++ <h3 id="bytebase.v1.DataSourceExternalSecret.SecretType">DataSourceExternalSecret.SecretType</h3>+ <p></p>+ <table class="enum-table">+ <thead>+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>SECRET_TYPE_UNSPECIFIED</td>+ <td>0</td>+ <td><p>Unspecified secret type.</p></td>+ </tr>++ <tr>+ <td>VAULT_KV_V2</td>+ <td>1</td>+ <td><p>ref: https://developer.hashicorp.com/vault/api-docs/secret/kv/kv-v2</p></td>+ </tr>++ <tr>+ <td>AWS_SECRETS_MANAGER</td>+ <td>2</td>+ <td><p>ref: https://docs.aws.amazon.com/secretsmanager/latest/userguide/intro.html</p></td>+ </tr>++ <tr>+ <td>GCP_SECRET_MANAGER</td>+ <td>3</td>+ <td><p>ref: https://cloud.google.com/secret-manager/docs</p></td>+ </tr>++ <tr>+ <td>AZURE_KEY_VAULT</td>+ <td>4</td>+ <td><p>ref: https://learn.microsoft.com/en-us/azure/key-vault/secrets/about-secrets</p></td>+ </tr>++ </tbody>+ </table>++ <h3 id="bytebase.v1.DataSourceType">DataSourceType</h3>+ <p></p>+ <table class="enum-table">+ <thead>+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>DATA_SOURCE_UNSPECIFIED</td>+ <td>0</td>+ <td><p>Unspecified data source type.</p></td>+ </tr>++ <tr>+ <td>ADMIN</td>+ <td>1</td>+ <td><p>Admin data source with write permissions.</p></td>+ </tr>++ <tr>+ <td>READ_ONLY</td>+ <td>2</td>+ <td><p>Read-only data source for query operations.</p></td>+ </tr>++ </tbody>+ </table>- <h3 id="bytebase.v1.ActuatorService">ActuatorService</h3>- <p>ActuatorService manages system health and operational information.</p>+ <h3 id="bytebase.v1.InstanceService">InstanceService</h3>+ <p>InstanceService manages database instances and their connections.</p><table class="enum-table"><thead><tr><td>Method Name</td><td>Request Type</td><td>Response Type</td><td>Description</td></tr>@@ -8537,411 +8843,257 @@ True when the workspace (or deployment) has an email setting configured. </p></t<tbody><tr>- <td>GetActuatorInfo</td>- <td><a href="#bytebase.v1.GetActuatorInfoRequest">GetActuatorInfoRequest</a></td>- <td><a href="#bytebase.v1.ActuatorInfo">ActuatorInfo</a></td>- <td><p>Gets system information and health status of the Bytebase instance.-When `name` is provided (or the workspace-scoped binding is used), the-response includes workspace-scoped fields for that workspace.-Permissions required: None</p></td>+ <td>GetInstance</td>+ <td><a href="#bytebase.v1.GetInstanceRequest">GetInstanceRequest</a></td>+ <td><a href="#bytebase.v1.Instance">Instance</a></td>+ <td><p>Gets a database instance by name.+Permissions required: bb.instances.get</p></td></tr><tr>- <td>SetupSample</td>- <td><a href="#bytebase.v1.SetupSampleRequest">SetupSampleRequest</a></td>- <td><a href="#google.protobuf.Empty">.google.protobuf.Empty</a></td>- <td><p>Sets up sample data for demonstration and testing purposes.-Permissions required: bb.projects.create</p></td>+ <td>ListInstances</td>+ <td><a href="#bytebase.v1.ListInstancesRequest">ListInstancesRequest</a></td>+ <td><a href="#bytebase.v1.ListInstancesResponse">ListInstancesResponse</a></td>+ <td><p>Lists all database instances.+Permissions required: bb.instances.list</p></td></tr><tr>- <td>DeleteCache</td>- <td><a href="#bytebase.v1.DeleteCacheRequest">DeleteCacheRequest</a></td>+ <td>CreateInstance</td>+ <td><a href="#bytebase.v1.CreateInstanceRequest">CreateInstanceRequest</a></td>+ <td><a href="#bytebase.v1.Instance">Instance</a></td>+ <td><p>Creates a new database instance.+Permissions required: bb.instances.create</p></td>+ </tr>++ <tr>+ <td>UpdateInstance</td>+ <td><a href="#bytebase.v1.UpdateInstanceRequest">UpdateInstanceRequest</a></td>+ <td><a href="#bytebase.v1.Instance">Instance</a></td>+ <td><p>Updates a database instance.+Permissions required: bb.instances.update</p></td>+ </tr>++ <tr>+ <td>DeleteInstance</td>+ <td><a href="#bytebase.v1.DeleteInstanceRequest">DeleteInstanceRequest</a></td><td><a href="#google.protobuf.Empty">.google.protobuf.Empty</a></td>- <td><p>Clears the system cache to force data refresh.-Permissions required: None</p></td>+ <td><p>Deletes or soft-deletes a database instance.+Permissions required: bb.instances.delete</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>+ <td>UndeleteInstance</td>+ <td><a href="#bytebase.v1.UndeleteInstanceRequest">UndeleteInstanceRequest</a></td>+ <td><a href="#bytebase.v1.Instance">Instance</a></td>+ <td><p>Restores a soft-deleted database instance.+Permissions required: bb.instances.undelete</p></td></tr>- </thead>- <tbody>--<tr>- <td>GetActuatorInfo</td>- <td>GET</td>- <td>/v1/actuator/info</td>- <td></td>+ <td>SyncInstance</td>+ <td><a href="#bytebase.v1.SyncInstanceRequest">SyncInstanceRequest</a></td>+ <td><a href="#bytebase.v1.SyncInstanceResponse">SyncInstanceResponse</a></td>+ <td><p>Syncs database schemas and metadata from an instance.+Permissions required: bb.instances.sync</p></td></tr>-+<tr>- <td>GetActuatorInfo</td>- <td>GET</td>- <td>/v1/{name=workspaces/*}/actuator/info</td>- <td></td>+ <td>ListInstanceDatabase</td>+ <td><a href="#bytebase.v1.ListInstanceDatabaseRequest">ListInstanceDatabaseRequest</a></td>+ <td><a href="#bytebase.v1.ListInstanceDatabaseResponse">ListInstanceDatabaseResponse</a></td>+ <td><p>Lists all databases within an instance without creating them.+Permissions required: bb.instances.get</p></td></tr>---<tr>- <td>SetupSample</td>- <td>POST</td>- <td>/v1/actuator:setupSample</td>- <td></td>+ <td>BatchSyncInstances</td>+ <td><a href="#bytebase.v1.BatchSyncInstancesRequest">BatchSyncInstancesRequest</a></td>+ <td><a href="#bytebase.v1.BatchSyncInstancesResponse">BatchSyncInstancesResponse</a></td>+ <td><p>Syncs multiple instances in a single request.+Permissions required: bb.instances.sync</p></td></tr>---<tr>- <td>DeleteCache</td>- <td>DELETE</td>- <td>/v1/actuator/cache</td>- <td></td>+ <td>BatchUpdateInstances</td>+ <td><a href="#bytebase.v1.BatchUpdateInstancesRequest">BatchUpdateInstancesRequest</a></td>+ <td><a href="#bytebase.v1.BatchUpdateInstancesResponse">BatchUpdateInstancesResponse</a></td>+ <td><p>Updates multiple instances in a single request.+Permissions required: bb.instances.update</p></td></tr>-- </tbody>- </table>----- <div class="file-heading">- <h2 id="v1/ai_service.proto">v1/ai_service.proto</h2><a href="#title">Top</a>- </div>- <p></p>--- <h3 id="bytebase.v1.AIChatMessage">AIChatMessage</h3>- <p>A single message in the conversation.</p>--- <table class="field-table">- <thead>- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>- </thead>- <tbody>-- <tr>- <td>role</td>- <td><a href="#bytebase.v1.AIChatMessageRole">AIChatMessageRole</a></td>- <td></td>- <td><p>The role of the message sender. </p></td>- </tr>-- <tr>- <td>content</td>- <td><a href="#string">string</a></td>- <td>optional</td>- <td><p>The text content of the message. Optional for assistant messages that only contain tool calls. </p></td>- </tr>-- <tr>- <td>tool_calls</td>- <td><a href="#bytebase.v1.AIChatToolCall">AIChatToolCall</a></td>- <td>repeated</td>- <td><p>Tool calls made by the assistant. Only present in assistant messages. </p></td>- </tr>-- <tr>- <td>tool_call_id</td>- <td><a href="#string">string</a></td>- <td>optional</td>- <td><p>The ID of the tool call this message is responding to. Only present in tool messages. </p></td>- </tr>-- </tbody>- </table>------ <h3 id="bytebase.v1.AIChatRequest">AIChatRequest</h3>- <p>Request message for AIService.Chat.</p>--- <table class="field-table">- <thead>- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>- </thead>- <tbody>-- <tr>- <td>messages</td>- <td><a href="#bytebase.v1.AIChatMessage">AIChatMessage</a></td>- <td>repeated</td>- <td><p>The conversation messages. </p></td>- </tr>-- <tr>- <td>tool_definitions</td>- <td><a href="#bytebase.v1.AIChatToolDefinition">AIChatToolDefinition</a></td>- <td>repeated</td>- <td><p>The tool definitions available to the AI. </p></td>- </tr>-- </tbody>- </table>------ <h3 id="bytebase.v1.AIChatResponse">AIChatResponse</h3>- <p>Response message for AIService.Chat.</p>+ <tr>+ <td>AddDataSource</td>+ <td><a href="#bytebase.v1.AddDataSourceRequest">AddDataSourceRequest</a></td>+ <td><a href="#bytebase.v1.Instance">Instance</a></td>+ <td><p>Adds a read-only data source to an instance.+Permissions required: bb.instances.update</p></td>+ </tr>++ <tr>+ <td>RemoveDataSource</td>+ <td><a href="#bytebase.v1.RemoveDataSourceRequest">RemoveDataSourceRequest</a></td>+ <td><a href="#bytebase.v1.Instance">Instance</a></td>+ <td><p>Removes a read-only data source from an instance.+Permissions required: bb.instances.update</p></td>+ </tr>++ <tr>+ <td>UpdateDataSource</td>+ <td><a href="#bytebase.v1.UpdateDataSourceRequest">UpdateDataSourceRequest</a></td>+ <td><a href="#bytebase.v1.Instance">Instance</a></td>+ <td><p>Updates a data source configuration.+Permissions required: bb.instances.update</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>content</td>- <td><a href="#string">string</a></td>- <td>optional</td>- <td><p>The text content of the AI response. Optional when the response only contains tool calls. </p></td>- </tr>-- <tr>- <td>tool_calls</td>- <td><a href="#bytebase.v1.AIChatToolCall">AIChatToolCall</a></td>- <td>repeated</td>- <td><p>Tool calls the AI wants to make. </p></td>- </tr>- <tr>- <td>usage</td>- <td><a href="#bytebase.v1.AIChatUsage">AIChatUsage</a></td>- <td>optional</td>- <td><p>Token usage for this provider call, when available. </p></td>- </tr>+ <tr>+ <td>GetInstance</td>+ <td>GET</td>+ <td>/v1/{name=instances/*}</td>+ <td></td>+ </tr>- </tbody>- </table>------ <h3 id="bytebase.v1.AIChatToolCall">AIChatToolCall</h3>- <p>A tool call made by the AI.</p>--- <table class="field-table">- <thead>- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>- </thead>- <tbody>+- <tr>- <td>id</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The unique ID of this tool call. </p></td>- </tr>- <tr>- <td>name</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The name of the tool to call. </p></td>- </tr>+ <tr>+ <td>ListInstances</td>+ <td>GET</td>+ <td>/v1/instances</td>+ <td></td>+ </tr>- <tr>- <td>arguments</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The JSON-encoded arguments to pass to the tool. </p></td>- </tr>+- <tr>- <td>metadata</td>- <td><a href="#string">string</a></td>- <td>optional</td>- <td><p>Opaque provider-specific metadata (e.g., Gemini thought_signature).-Frontend must echo this back unchanged when sending tool results. </p></td>- </tr>- </tbody>- </table>------ <h3 id="bytebase.v1.AIChatToolDefinition">AIChatToolDefinition</h3>- <p>A tool definition that the AI can invoke.</p>--- <table class="field-table">- <thead>- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>- </thead>- <tbody>+ <tr>+ <td>CreateInstance</td>+ <td>POST</td>+ <td>/v1/instances</td>+ <td>instance</td>+ </tr>- <tr>- <td>name</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The name of the tool. </p></td>- </tr>+- <tr>- <td>description</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>A description of what the tool does. </p></td>- </tr>- <tr>- <td>parameters_schema</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The JSON Schema describing the tool's parameters. </p></td>- </tr>+ <tr>+ <td>UpdateInstance</td>+ <td>PATCH</td>+ <td>/v1/{instance.name=instances/*}</td>+ <td>instance</td>+ </tr>- </tbody>- </table>------ <h3 id="bytebase.v1.AIChatUsage">AIChatUsage</h3>- <p>Token usage for a single AI provider call.</p>--- <table class="field-table">- <thead>- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>- </thead>- <tbody>+- <tr>- <td>total_tokens</td>- <td><a href="#int32">int32</a></td>- <td></td>- <td><p>Total tokens used by the provider call. </p></td>- </tr>- </tbody>- </table>-------- <h3 id="bytebase.v1.AIChatMessageRole">AIChatMessageRole</h3>- <p>Role of a chat message.</p>- <table class="enum-table">- <thead>- <tr><td>Name</td><td>Number</td><td>Description</td></tr>- </thead>- <tbody>-<tr>- <td>AI_CHAT_MESSAGE_ROLE_UNSPECIFIED</td>- <td>0</td>- <td><p>Unspecified role.</p></td>+ <td>DeleteInstance</td>+ <td>DELETE</td>+ <td>/v1/{name=instances/*}</td>+ <td></td></tr>+++<tr>- <td>AI_CHAT_MESSAGE_ROLE_SYSTEM</td>- <td>1</td>- <td><p>System message providing instructions.</p></td>+ <td>UndeleteInstance</td>+ <td>POST</td>+ <td>/v1/{name=instances/*}:undelete</td>+ <td>*</td></tr>+++<tr>- <td>AI_CHAT_MESSAGE_ROLE_USER</td>- <td>2</td>- <td><p>User message.</p></td>+ <td>SyncInstance</td>+ <td>POST</td>+ <td>/v1/{name=instances/*}:sync</td>+ <td>*</td></tr>+++<tr>- <td>AI_CHAT_MESSAGE_ROLE_ASSISTANT</td>- <td>3</td>- <td><p>Assistant (AI) message.</p></td>+ <td>ListInstanceDatabase</td>+ <td>POST</td>+ <td>/v1/{name=instances/*}:databases</td>+ <td>*</td></tr>+++<tr>- <td>AI_CHAT_MESSAGE_ROLE_TOOL</td>- <td>4</td>- <td><p>Tool result message.</p></td>+ <td>BatchSyncInstances</td>+ <td>POST</td>+ <td>/v1/instances:batchSync</td>+ <td>*</td></tr>+- </tbody>- </table>------ <h3 id="bytebase.v1.AIService">AIService</h3>- <p>AIService provides AI chat capabilities for the page agent.</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>Chat</td>- <td><a href="#bytebase.v1.AIChatRequest">AIChatRequest</a></td>- <td><a href="#bytebase.v1.AIChatResponse">AIChatResponse</a></td>- <td><p>Chat sends a conversation with tool definitions to the configured AI provider-and returns the AI response.</p></td>+ <td>BatchUpdateInstances</td>+ <td>POST</td>+ <td>/v1/instances:batchUpdate</td>+ <td>*</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>+ <td>AddDataSource</td>+ <td>POST</td>+ <td>/v1/{name=instances/*}:addDataSource</td>+ <td>*</td></tr>- </thead>- <tbody>+<tr>- <td>Chat</td>+ <td>RemoveDataSource</td><td>POST</td>- <td>/v1/ai/chat</td>+ <td>/v1/{name=instances/*}:removeDataSource</td><td>*</td></tr>+++ <tr>+ <td>UpdateDataSource</td>+ <td>PATCH</td>+ <td>/v1/{name=instances/*}:updateDataSource</td>+ <td>data_source</td>+ </tr>++</tbody></table>@@ -8949,13 +9101,13 @@ and returns the AI response.</p></td><div class="file-heading">- <h2 id="v1/iam_policy.proto">v1/iam_policy.proto</h2><a href="#title">Top</a>+ <h2 id="v1/database_service.proto">v1/database_service.proto</h2><a href="#title">Top</a></div><p></p>- <h3 id="bytebase.v1.Binding">Binding</h3>- <p>Binding associates members with a role and optional conditions.</p>+ <h3 id="bytebase.v1.BatchGetDatabasesRequest">BatchGetDatabasesRequest</h3>+ <p></p><table class="field-table">@@ -8965,52 +9117,44 @@ and returns the AI response.</p></td><tbody><tr>- <td>role</td>+ <td>parent</td><td><a href="#string">string</a></td><td></td>- <td><p>The role that is assigned to the members.-Format: roles/{role} </p></td>+ <td><p>The parent resource shared by all databases being retrieved.+- projects/{project}: batch get databases in a project;+- instances/{instances}: batch get databases in a instance;+Use "-" as wildcard to batch get databases across parent. </p></td></tr><tr>- <td>members</td>+ <td>names</td><td><a href="#string">string</a></td><td>repeated</td>- <td><p>Specifies the principals requesting access for a Bytebase resource.-For users, the member should be: user:{email}-For groups, the member should be: group:{email}-For service accounts, the member should be: serviceAccount:{email}-For workload identities, the member should be: workloadIdentity:{email} </p></td>+ <td><p>The list of database names to retrieve. </p></td></tr>- <tr>- <td>condition</td>- <td><a href="#google.type.Expr">google.type.Expr</a></td>- <td></td>- <td><p>The condition that is associated with this binding, only used in the project IAM policy.-If the condition evaluates to true, then this binding applies to the current request.-If the condition evaluates to false, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding.-The syntax and semantics of CEL are documented at https://github.com/google/cel-spec+ </tbody>+ </table>-Support variables:-resource.database: the database full name in "instances/{instance}/databases/{database}" format, used by the "roles/sqlEditorUser" and "roles/sqlEditorReadUser" roles, support "==" operator.-resource.schema_name: the schema name, used by the "roles/sqlEditorUser" and "roles/sqlEditorReadUser" roles, support "==" operator.-resource.table_name: the table name, used by the "roles/sqlEditorUser" and "roles/sqlEditorReadUser" roles, support "==" operator.-resource.environment_id: the environment to allow the DDL/DML operation in the SQL Editor, only works for the role with bb.sql.ddl or bb.sql.dml permissions. Support "in" operator.-request.time: the expiration. Only support "<" operation in `request.time < timestamp("{ISO datetime string format}")`.+-For example:-resource.database == "instances/local-pg/databases/postgres" && resource.schema_name in ["public","another_schema"]-resource.database == "instances/local-pg/databases/bytebase" && resource.schema_name == "public" && resource.table_name in ["audit_log"]-resource.database == "instances/local-pg/databases/postgres" && resource.environment_id in ["test"]-request.time < timestamp("2025-04-26T11:24:48.655Z") </p></td>- </tr>+++ <h3 id="bytebase.v1.BatchGetDatabasesResponse">BatchGetDatabasesResponse</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>parsed_expr</td>- <td><a href="#google.api.expr.v1alpha1.Expr">google.api.expr.v1alpha1.Expr</a></td>- <td></td>- <td><p>The parsed expression of the condition. </p></td>+ <td>databases</td>+ <td><a href="#bytebase.v1.Database">Database</a></td>+ <td>repeated</td>+ <td><p>The databases from the specified request. </p></td></tr></tbody>@@ -9020,8 +9164,8 @@ request.time < timestamp("2025-04-26T11:24:48.655Z") </p></td>- <h3 id="bytebase.v1.BindingDelta">BindingDelta</h3>- <p>A single change to a binding.</p>+ <h3 id="bytebase.v1.BatchSyncDatabasesRequest">BatchSyncDatabasesRequest</h3>+ <p></p><table class="field-table">@@ -9031,32 +9175,19 @@ request.time < timestamp("2025-04-26T11:24:48.655Z") </p></td><tbody><tr>- <td>action</td>- <td><a href="#bytebase.v1.BindingDelta.Action">BindingDelta.Action</a></td>- <td></td>- <td><p>The action that was performed on a Binding. </p></td>- </tr>-- <tr>- <td>role</td>+ <td>parent</td><td><a href="#string">string</a></td><td></td>- <td><p>Role that is assigned to `members`.-For example, `roles/projectOwner`. </p></td>+ <td><p>The parent resource shared by all databases being updated.+Format: instances/{instance}+If the operation spans parents, a dash (-) may be accepted as a wildcard. </p></td></tr><tr>- <td>member</td>+ <td>names</td><td><a href="#string">string</a></td>- <td></td>- <td><p>Follows the same format of Binding.members. </p></td>- </tr>-- <tr>- <td>condition</td>- <td><a href="#google.type.Expr">google.type.Expr</a></td>- <td></td>- <td><p>The condition that is associated with this binding. </p></td>+ <td>repeated</td>+ <td><p>The list of database names to sync. </p></td></tr></tbody>@@ -9066,8 +9197,15 @@ For example, `roles/projectOwner`. </p></td>- <h3 id="bytebase.v1.GetIamPolicyRequest">GetIamPolicyRequest</h3>- <p>Request message for getting an IAM policy.</p>+ <h3 id="bytebase.v1.BatchSyncDatabasesResponse">BatchSyncDatabasesResponse</h3>+ <p></p>++++++ <h3 id="bytebase.v1.BatchUpdateDatabasesRequest">BatchUpdateDatabasesRequest</h3>+ <p></p><table class="field-table">@@ -9077,12 +9215,21 @@ For example, `roles/projectOwner`. </p></td><tbody><tr>- <td>resource</td>+ <td>parent</td><td><a href="#string">string</a></td><td></td>- <td><p>The name of the resource to get the IAM policy.-Format: projects/{project}-Format: workspaces/{workspace} </p></td>+ <td><p>The parent resource shared by all databases being updated.+Format: instances/{instance}+If the operation spans parents, a dash (-) may be accepted as a wildcard.+We only support updating the project of databases for now. </p></td>+ </tr>++ <tr>+ <td>requests</td>+ <td><a href="#bytebase.v1.UpdateDatabaseRequest">UpdateDatabaseRequest</a></td>+ <td>repeated</td>+ <td><p>The request message specifying the resources to update.+A maximum of 1000 databases can be modified in a batch. </p></td></tr></tbody>@@ -9092,8 +9239,8 @@ Format: workspaces/{workspace} </p></td>- <h3 id="bytebase.v1.IamPolicy">IamPolicy</h3>- <p>IAM policy that binds members to roles.</p>+ <h3 id="bytebase.v1.BatchUpdateDatabasesResponse">BatchUpdateDatabasesResponse</h3>+ <p></p><table class="field-table">@@ -9103,20 +9250,10 @@ Format: workspaces/{workspace} </p></td><tbody><tr>- <td>bindings</td>- <td><a href="#bytebase.v1.Binding">Binding</a></td>+ <td>databases</td>+ <td><a href="#bytebase.v1.Database">Database</a></td><td>repeated</td>- <td><p>Collection of binding.-A binding binds one or more project members to a single project role. </p></td>- </tr>-- <tr>- <td>etag</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The current etag of the policy.-If an etag is provided and does not match the current etag of the policy,-the call will be blocked and an ABORTED error will be returned. </p></td>+ <td><p>Databases updated. </p></td></tr></tbody>@@ -9126,8 +9263,8 @@ the call will be blocked and an ABORTED error will be returned. </p></td>- <h3 id="bytebase.v1.PolicyDelta">PolicyDelta</h3>- <p>Describes changes between two IAM policies.</p>+ <h3 id="bytebase.v1.BoundingBox">BoundingBox</h3>+ <p>BoundingBox defines the spatial bounds for GEOMETRY spatial indexes.</p><table class="field-table">@@ -9137,10 +9274,31 @@ the call will be blocked and an ABORTED error will be returned. </p></td><tbody><tr>- <td>binding_deltas</td>- <td><a href="#bytebase.v1.BindingDelta">BindingDelta</a></td>- <td>repeated</td>- <td><p>The delta for Bindings between two policies. </p></td>+ <td>xmin</td>+ <td><a href="#double">double</a></td>+ <td></td>+ <td><p>Minimum X coordinate </p></td>+ </tr>++ <tr>+ <td>ymin</td>+ <td><a href="#double">double</a></td>+ <td></td>+ <td><p>Minimum Y coordinate </p></td>+ </tr>++ <tr>+ <td>xmax</td>+ <td><a href="#double">double</a></td>+ <td></td>+ <td><p>Maximum X coordinate </p></td>+ </tr>++ <tr>+ <td>ymax</td>+ <td><a href="#double">double</a></td>+ <td></td>+ <td><p>Maximum Y coordinate </p></td></tr></tbody>@@ -9150,8 +9308,8 @@ the call will be blocked and an ABORTED error will be returned. </p></td>- <h3 id="bytebase.v1.SetIamPolicyRequest">SetIamPolicyRequest</h3>- <p>Request message for setting an IAM policy.</p>+ <h3 id="bytebase.v1.Changelog">Changelog</h3>+ <p></p><table class="field-table">@@ -9161,26 +9319,53 @@ the call will be blocked and an ABORTED error will be returned. </p></td><tbody><tr>- <td>resource</td>+ <td>name</td><td><a href="#string">string</a></td><td></td>- <td><p>The name of the resource to set the IAM policy.-Format: projects/{project}-Format: workspaces/{workspace} </p></td>+ <td><p>Format: instances/{instance}/databases/{database}/changelogs/{changelog} </p></td></tr><tr>- <td>policy</td>- <td><a href="#bytebase.v1.IamPolicy">IamPolicy</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>status</td>+ <td><a href="#bytebase.v1.Changelog.Status">Changelog.Status</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>schema</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>schema_size</td>+ <td><a href="#int64">int64</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>task_run</td>+ <td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun} </p></td></tr><tr>- <td>etag</td>+ <td>plan_title</td><td><a href="#string">string</a></td><td></td>- <td><p>The current etag of the policy. </p></td>+ <td><p>The title of the plan associated with this changelog's task run.+This field is populated by deriving the plan from task_run for display purposes. </p></td></tr></tbody>@@ -9190,51 +9375,8 @@ Format: workspaces/{workspace} </p></td>--- <h3 id="bytebase.v1.BindingDelta.Action">BindingDelta.Action</h3>- <p>Type of action performed on a binding.</p>- <table class="enum-table">- <thead>- <tr><td>Name</td><td>Number</td><td>Description</td></tr>- </thead>- <tbody>-- <tr>- <td>ACTION_UNSPECIFIED</td>- <td>0</td>- <td><p>Unspecified action.</p></td>- </tr>-- <tr>- <td>ADD</td>- <td>1</td>- <td><p>Add a binding.</p></td>- </tr>-- <tr>- <td>REMOVE</td>- <td>2</td>- <td><p>Remove a binding.</p></td>- </tr>-- </tbody>- </table>-------- <div class="file-heading">- <h2 id="v1/audit_log_service.proto">v1/audit_log_service.proto</h2><a href="#title">Top</a>- </div>- <p></p>--- <h3 id="bytebase.v1.AuditData">AuditData</h3>- <p>Additional audit data specific to certain operations.</p>+ <h3 id="bytebase.v1.CheckConstraintMetadata">CheckConstraintMetadata</h3>+ <p>CheckConstraintMetadata is the metadata for check constraints.</p><table class="field-table">@@ -9244,10 +9386,17 @@ Format: workspaces/{workspace} </p></td><tbody><tr>- <td>policy_delta</td>- <td><a href="#bytebase.v1.PolicyDelta">PolicyDelta</a></td>+ <td>name</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>Changes to IAM policies. </p></td>+ <td><p>The name is the name of a check constraint. </p></td>+ </tr>++ <tr>+ <td>expression</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The expression is the expression of a check constraint. </p></td></tr></tbody>@@ -9257,8 +9406,8 @@ Format: workspaces/{workspace} </p></td>- <h3 id="bytebase.v1.AuditLog">AuditLog</h3>- <p>Audit log entry recording system activity or API call.</p>+ <h3 id="bytebase.v1.ColumnMetadata">ColumnMetadata</h3>+ <p>ColumnMetadata is the metadata for columns.</p><table class="field-table">@@ -9271,90 +9420,141 @@ Format: workspaces/{workspace} </p></td><td>name</td><td><a href="#string">string</a></td><td></td>- <td><p>The name of the log.-Formats:-- projects/{project}/auditLogs/{uid}-- workspaces/{workspace}/auditLogs/{uid} </p></td>+ <td><p>The name is the name of a column. </p></td></tr><tr>- <td>create_time</td>- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>+ <td>position</td>+ <td><a href="#int32">int32</a></td><td></td>- <td><p>The timestamp when the audit log was created. </p></td>+ <td><p>The position is the position in columns. </p></td></tr><tr>- <td>user</td>+ <td>has_default</td>+ <td><a href="#bool">bool</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>default</td><td><a href="#string">string</a></td><td></td>- <td><p>The user who performed the action.-Format: users/{email} </p></td>+ <td><p>The default value of column. </p></td></tr><tr>- <td>method</td>+ <td>default_on_null</td>+ <td><a href="#bool">bool</a></td>+ <td></td>+ <td><p>Oracle specific metadata.+The default_on_null is the default on null of a column. </p></td>+ </tr>++ <tr>+ <td>on_update</td><td><a href="#string">string</a></td><td></td>- <td><p>The method or action being audited.-For example: /bytebase.v1.SQLService/Query or bb.project.repository.push </p></td>+ <td><p>The on_update is the on update action of a column.+For MySQL like databases, it's only supported for TIMESTAMP columns with+CURRENT_TIMESTAMP as on update value. </p></td></tr><tr>- <td>severity</td>- <td><a href="#bytebase.v1.AuditLog.Severity">AuditLog.Severity</a></td>+ <td>nullable</td>+ <td><a href="#bool">bool</a></td><td></td>- <td><p>The severity level of this audit log entry. </p></td>+ <td><p>The nullable is the nullable of a column. </p></td></tr><tr>- <td>resource</td>+ <td>type</td><td><a href="#string">string</a></td><td></td>- <td><p>The resource associated with this audit log. </p></td>+ <td><p>The type is the type of a column. </p></td></tr><tr>- <td>request</td>+ <td>character_set</td><td><a href="#string">string</a></td><td></td>- <td><p>The request payload in JSON format. </p></td>+ <td><p>The character_set is the character_set of a column. </p></td></tr><tr>- <td>response</td>+ <td>collation</td><td><a href="#string">string</a></td><td></td>- <td><p>The response payload in JSON format.-Some fields may be omitted if they are too large or contain sensitive information. </p></td>+ <td><p>The collation is the collation of a column. </p></td></tr><tr>- <td>status</td>- <td><a href="#google.rpc.Status">google.rpc.Status</a></td>+ <td>comment</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>The status of the operation. </p></td>+ <td><p>The comment is the comment of a column. </p></td></tr><tr>- <td>latency</td>- <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>+ <td>generation</td>+ <td><a href="#bytebase.v1.GenerationMetadata">GenerationMetadata</a></td><td></td>- <td><p>The duration of the operation. </p></td>+ <td><p>The generation is the generation of a column. </p></td></tr><tr>- <td>service_data</td>- <td><a href="#google.protobuf.Any">google.protobuf.Any</a></td>+ <td>is_identity</td>+ <td><a href="#bool">bool</a></td><td></td>- <td><p>Service-specific metadata about the request, response, and activities. </p></td>+ <td><p> </p></td></tr><tr>- <td>request_metadata</td>- <td><a href="#bytebase.v1.RequestMetadata">RequestMetadata</a></td>+ <td>identity_generation</td>+ <td><a href="#bytebase.v1.ColumnMetadata.IdentityGeneration">ColumnMetadata.IdentityGeneration</a></td><td></td>- <td><p>Metadata about the request context. </p></td>+ <td><p>The identity_generation is for identity columns, PG only. </p></td>+ </tr>++ <tr>+ <td>identity_seed</td>+ <td><a href="#int64">int64</a></td>+ <td></td>+ <td><p>The identity_seed is for identity columns, MSSQL only. </p></td>+ </tr>++ <tr>+ <td>identity_increment</td>+ <td><a href="#int64">int64</a></td>+ <td></td>+ <td><p>The identity_increment is for identity columns, MSSQL only. </p></td>+ </tr>++ <tr>+ <td>default_constraint_name</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The default_constraint_name is the name of the default constraint, MSSQL only.+In MSSQL, default values are implemented as named constraints. When modifying or+dropping a column's default value, you must reference the constraint by name.+This field stores the actual constraint name from the database.++Example: A column definition like:+ CREATE TABLE employees (+ status NVARCHAR(20) DEFAULT 'active'+ )++Will create a constraint with an auto-generated name like 'DF__employees__statu__3B75D760'+or a user-defined name if specified:+ ALTER TABLE employees ADD CONSTRAINT DF_employees_status DEFAULT 'active' FOR status++To modify the default, you must first drop the existing constraint by name:+ ALTER TABLE employees DROP CONSTRAINT DF__employees__statu__3B75D760+ ALTER TABLE employees ADD CONSTRAINT DF_employees_status DEFAULT 'inactive' FOR status++This field is populated when syncing from the database. When empty (e.g., when parsing+from SQL files), the system cannot automatically drop the constraint. </p></td></tr></tbody>@@ -9364,8 +9564,8 @@ Some fields may be omitted if they are too large or contain sensitive informatio- <h3 id="bytebase.v1.ExportAuditLogsRequest">ExportAuditLogsRequest</h3>- <p>Request message for exporting audit logs.</p>+ <h3 id="bytebase.v1.Database">Database</h3>+ <p></p><table class="field-table">@@ -9375,54 +9575,95 @@ Some fields may be omitted if they are too large or contain sensitive informatio<tbody><tr>- <td>parent</td>+ <td>name</td><td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>The name of the database.+Format: instances/{instance}/databases/{database}+{database} is the database name in the instance. </p></td></tr><tr>- <td>filter</td>+ <td>state</td>+ <td><a href="#bytebase.v1.State">State</a></td>+ <td></td>+ <td><p>The existence of a database. </p></td>+ </tr>++ <tr>+ <td>successful_sync_time</td>+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>+ <td></td>+ <td><p>The latest synchronization time. </p></td>+ </tr>++ <tr>+ <td>project</td><td><a href="#string">string</a></td><td></td>- <td><p>The filter of the log. It should be a valid CEL expression.-Check the filter field in the SearchAuditLogsRequest message. </p></td>+ <td><p>The project for a database.+Format: projects/{project} </p></td>+ </tr>++ <tr>+ <td>release</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The release that was last applied to this database.+Format: projects/{project}/releases/{release_id}+Example: projects/my-project/releases/release_20260115-RC00 </p></td>+ </tr>++ <tr>+ <td>environment</td>+ <td><a href="#string">string</a></td>+ <td>optional</td>+ <td><p>The environment resource.+Format: environments/prod where prod is the environment resource ID. </p></td>+ </tr>++ <tr>+ <td>effective_environment</td>+ <td><a href="#string">string</a></td>+ <td>optional</td>+ <td><p>The effective environment based on environment tag above and environment+tag on the instance. Inheritance follows+https://cloud.google.com/resource-manager/docs/tags/tags-overview. </p></td>+ </tr>++ <tr>+ <td>labels</td>+ <td><a href="#bytebase.v1.Database.LabelsEntry">Database.LabelsEntry</a></td>+ <td>repeated</td>+ <td><p>Labels will be used for deployment and policy control. </p></td></tr><tr>- <td>order_by</td>- <td><a href="#string">string</a></td>+ <td>instance_resource</td>+ <td><a href="#bytebase.v1.InstanceResource">InstanceResource</a></td><td></td>- <td><p>The order by of the log.-Only support order by create_time. The default sorting order is ascending.-For example:- - order_by = "create_time asc"- - order_by = "create_time desc" </p></td>+ <td><p>The instance resource. </p></td></tr><tr>- <td>format</td>- <td><a href="#bytebase.v1.ExportFormat">ExportFormat</a></td>+ <td>backup_available</td>+ <td><a href="#bool">bool</a></td><td></td>- <td><p>The export format. </p></td>+ <td><p>The database is available for DML prior backup. </p></td></tr><tr>- <td>page_size</td>- <td><a href="#int32">int32</a></td>+ <td>sync_status</td>+ <td><a href="#bytebase.v1.SyncStatus">SyncStatus</a></td><td></td>- <td><p>The maximum number of logs to return.-The service may return fewer than this value.-If unspecified, at most 10 log entries will be returned.-The maximum value is 5000; values above 5000 will be coerced to 5000. </p></td>+ <td><p>The sync status of the database. </p></td></tr><tr>- <td>page_token</td>+ <td>sync_error</td><td><a href="#string">string</a></td><td></td>- <td><p>A page token, received from a previous `ExportAuditLogs` call.-Provide this to retrieve the subsequent page. </p></td>+ <td><p>The error message if sync failed. </p></td></tr></tbody>@@ -9432,8 +9673,8 @@ Provide this to retrieve the subsequent page. </p></td>- <h3 id="bytebase.v1.ExportAuditLogsResponse">ExportAuditLogsResponse</h3>- <p>Response message for exporting audit logs.</p>+ <h3 id="bytebase.v1.Database.LabelsEntry">Database.LabelsEntry</h3>+ <p></p><table class="field-table">@@ -9443,19 +9684,17 @@ Provide this to retrieve the subsequent page. </p></td><tbody><tr>- <td>content</td>- <td><a href="#bytes">bytes</a></td>+ <td>key</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>The exported audit log content in the requested format. </p></td>+ <td><p> </p></td></tr><tr>- <td>next_page_token</td>+ <td>value</td><td><a href="#string">string</a></td><td></td>- <td><p>A token to retrieve next page of log entities.-Pass this value in the page_token field in the subsequent call-to retrieve the next page of log entities. </p></td>+ <td><p> </p></td></tr></tbody>@@ -9465,8 +9704,8 @@ to retrieve the next page of log entities. </p></td>- <h3 id="bytebase.v1.RequestMetadata">RequestMetadata</h3>- <p>Metadata about the incoming request.</p>+ <h3 id="bytebase.v1.DatabaseMetadata">DatabaseMetadata</h3>+ <p>DatabaseMetadata is the metadata for databases.</p><table class="field-table">@@ -9476,91 +9715,54 @@ to retrieve the next page of log entities. </p></td><tbody><tr>- <td>caller_ip</td>+ <td>name</td><td><a href="#string">string</a></td><td></td>- <td><p>The IP address of the request originator. </p></td>+ <td><p>The database metadata name.++Format: instances/{instance}/databases/{database}/metadata </p></td></tr><tr>- <td>caller_supplied_user_agent</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The user agent string provided by the caller.-This is supplied by the client and is not authenticated. </p></td>+ <td>schemas</td>+ <td><a href="#bytebase.v1.SchemaMetadata">SchemaMetadata</a></td>+ <td>repeated</td>+ <td><p>The schemas is the list of schemas in a database. </p></td></tr>- </tbody>- </table>------ <h3 id="bytebase.v1.SearchAuditLogsRequest">SearchAuditLogsRequest</h3>- <p>Request message for searching audit logs.</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>character_set</td><td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>The character_set is the character set of a database. </p></td></tr><tr>- <td>filter</td>+ <td>collation</td><td><a href="#string">string</a></td><td></td>- <td><p>The filter of the log. It should be a valid CEL expression.-The syntax and semantics of CEL are documented at https://github.com/google/cel-spec--Supported filter:-- method: the API name, can be found in the docs, should start with "/bytebase.v1." prefix. For example "/bytebase.v1.UserService/CreateUser". Support "==" operator.-- severity: support "==" operator, check Severity enum in AuditLog message for values.-- user: the actor, should in "users/{email}" format, support "==" operator.-- create_time: support ">=" and "<=" operator.--For example:- - filter = "method == '/bytebase.v1.SQLService/Query'"- - filter = "method == '/bytebase.v1.SQLService/Query' && severity == 'ERROR'"- - filter = "method == '/bytebase.v1.SQLService/Query' && severity == 'ERROR' && user == 'users/[email protected]'"- - filter = "method == '/bytebase.v1.SQLService/Query' && severity == 'ERROR' && create_time <= '2021-01-01T00:00:00Z' && create_time >= '2020-01-01T00:00:00Z'" </p></td>+ <td><p>The collation is the collation of a database. </p></td></tr><tr>- <td>order_by</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The order by of the log.-Only support order by create_time. The default sorting order is ascending.-For example:- - order_by = "create_time asc"- - order_by = "create_time desc" </p></td>+ <td>extensions</td>+ <td><a href="#bytebase.v1.ExtensionMetadata">ExtensionMetadata</a></td>+ <td>repeated</td>+ <td><p>The extensions is the list of extensions in a database. </p></td></tr><tr>- <td>page_size</td>- <td><a href="#int32">int32</a></td>+ <td>owner</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>The maximum number of logs to return.-The service may return fewer than this value.-If unspecified, at most 10 log entries will be returned.-The maximum value is 5000; values above 5000 will be coerced to 5000. </p></td>+ <td><p>The owner of the database. </p></td></tr><tr>- <td>page_token</td>+ <td>search_path</td><td><a href="#string">string</a></td><td></td>- <td><p>A page token, received from a previous `SearchLogs` call.-Provide this to retrieve the subsequent page. </p></td>+ <td><p>The search_path is the search path of a PostgreSQL database. </p></td></tr></tbody>@@ -9570,8 +9772,8 @@ Provide this to retrieve the subsequent page. </p></td>- <h3 id="bytebase.v1.SearchAuditLogsResponse">SearchAuditLogsResponse</h3>- <p>Response message for searching audit logs.</p>+ <h3 id="bytebase.v1.DatabaseSDLSchema">DatabaseSDLSchema</h3>+ <p>DatabaseSDLSchema contains the schema in SDL format.</p><table class="field-table">@@ -9581,188 +9783,169 @@ Provide this to retrieve the subsequent page. </p></td><tbody><tr>- <td>audit_logs</td>- <td><a href="#bytebase.v1.AuditLog">AuditLog</a></td>- <td>repeated</td>- <td><p> </p></td>+ <td>schema</td>+ <td><a href="#bytes">bytes</a></td>+ <td></td>+ <td><p>The SDL schema content.+- For SINGLE_FILE format: contains the complete SDL schema as a text string.+- For MULTI_FILE format: contains the ZIP archive as binary data. </p></td></tr><tr>- <td>next_page_token</td>+ <td>content_type</td><td><a href="#string">string</a></td><td></td>- <td><p>A token to retrieve next page of log entities.-Pass this value in the page_token field in the subsequent call-to retrieve the next page of log entities. </p></td>+ <td><p>The MIME type of the schema content.+Indicates how the client should interpret the schema field.+Examples:+- "text/plain; charset=utf-8" for SINGLE_FILE format+- "application/zip" for MULTI_FILE format </p></td></tr></tbody></table>------- <h3 id="bytebase.v1.AuditLog.Severity">AuditLog.Severity</h3>- <p>Severity level for audit log entries.</p>- <table class="enum-table">- <thead>- <tr><td>Name</td><td>Number</td><td>Description</td></tr>- </thead>- <tbody>-- <tr>- <td>SEVERITY_UNSPECIFIED</td>- <td>0</td>- <td><p>Unspecified severity level.</p></td>- </tr>-- <tr>- <td>DEBUG</td>- <td>1</td>- <td><p>Debug-level information.</p></td>- </tr>-- <tr>- <td>INFO</td>- <td>2</td>- <td><p>Informational messages.</p></td>- </tr>-- <tr>- <td>NOTICE</td>- <td>3</td>- <td><p>Notable events.</p></td>- </tr>-- <tr>- <td>WARNING</td>- <td>4</td>- <td><p>Warning conditions.</p></td>- </tr>-- <tr>- <td>ERROR</td>- <td>5</td>- <td><p>Error conditions.</p></td>- </tr>-- <tr>- <td>CRITICAL</td>- <td>6</td>- <td><p>Critical conditions.</p></td>- </tr>-- <tr>- <td>ALERT</td>- <td>7</td>- <td><p>Action must be taken immediately.</p></td>- </tr>-- <tr>- <td>EMERGENCY</td>- <td>8</td>- <td><p>System is unusable.</p></td>- </tr>-- </tbody>- </table>------ <h3 id="bytebase.v1.AuditLogService">AuditLogService</h3>- <p>AuditLogService manages audit logs for system activities and API calls.</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>SearchAuditLogs</td>- <td><a href="#bytebase.v1.SearchAuditLogsRequest">SearchAuditLogsRequest</a></td>- <td><a href="#bytebase.v1.SearchAuditLogsResponse">SearchAuditLogsResponse</a></td>- <td><p>Searches audit logs with optional filtering and pagination.-Permissions required: bb.auditLogs.search</p></td>- </tr>-- <tr>- <td>ExportAuditLogs</td>- <td><a href="#bytebase.v1.ExportAuditLogsRequest">ExportAuditLogsRequest</a></td>- <td><a href="#bytebase.v1.ExportAuditLogsResponse">ExportAuditLogsResponse</a></td>- <td><p>Exports audit logs in a specified format for external analysis.-Permissions required: bb.auditLogs.export</p></td>- </tr>-- </tbody>- </table>+--- <h4>Methods with HTTP bindings</h4>- <table>++ <h3 id="bytebase.v1.DatabaseSchema">DatabaseSchema</h3>+ <p>DatabaseSchema is the metadata for databases.</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>schema</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The schema dump from database. </p></td>+ </tr>- <tr>- <td>SearchAuditLogs</td>- <td>POST</td>- <td>/v1/{parent=projects/*}/auditLogs:search</td>- <td>*</td>- </tr>+ </tbody>+ </table>++++++ <h3 id="bytebase.v1.DependencyColumn">DependencyColumn</h3>+ <p>DependencyColumn is the metadata for dependency columns.</p>+++ <table class="field-table">+ <thead>+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>+ </thead>+ <tbody>- <tr>- <td>SearchAuditLogs</td>- <td>POST</td>- <td>/v1/auditLogs:search</td>- <td>*</td>- </tr>+ <tr>+ <td>schema</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The schema is the schema of a reference column. </p></td>+ </tr>-+ <tr>+ <td>table</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The table is the table of a reference column. </p></td>+ </tr>+ <tr>+ <td>column</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The column is the name of a reference column. </p></td>+ </tr>- <tr>- <td>ExportAuditLogs</td>- <td>POST</td>- <td>/v1/{parent=projects/*}/auditLogs:export</td>- <td>*</td>- </tr>+ </tbody>+ </table>++++++ <h3 id="bytebase.v1.DependencyTable">DependencyTable</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>ExportAuditLogs</td>- <td>POST</td>- <td>/v1/auditLogs:export</td>- <td>*</td>- </tr>+ <tr>+ <td>schema</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The schema is the schema of a reference table. </p></td>+ </tr>++ <tr>+ <td>table</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The table is the name of a reference table. </p></td>+ </tr>-</tbody></table>++-- <div class="file-heading">- <h2 id="v1/user_service.proto">v1/user_service.proto</h2><a href="#title">Top</a>- </div>- <p></p>+ <h3 id="bytebase.v1.DiffSchemaRequest">DiffSchemaRequest</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 database or changelog.+Format:+database: instances/{instance}/databases/{database}+changelog: instances/{instance}/databases/{database}/changelogs/{changelog} </p></td>+ </tr>++ <tr>+ <td>schema</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The target schema. </p></td>+ </tr>++ <tr>+ <td>changelog</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The resource name of the changelog+Format:+instances/{instance}/databases/{database}/changelogs/{changelog} </p></td>+ </tr>++ </tbody>+ </table>+++- <h3 id="bytebase.v1.BatchGetUsersRequest">BatchGetUsersRequest</h3>+ <h3 id="bytebase.v1.DiffSchemaResponse">DiffSchemaResponse</h3><p></p>@@ -9773,11 +9956,10 @@ Permissions required: bb.auditLogs.export</p></td><tbody><tr>- <td>names</td>+ <td>diff</td><td><a href="#string">string</a></td>- <td>repeated</td>- <td><p>The user names to retrieve.-Format: users/{email} </p></td>+ <td></td>+ <td><p> </p></td></tr></tbody>@@ -9787,8 +9969,8 @@ Format: users/{email} </p></td>- <h3 id="bytebase.v1.BatchGetUsersResponse">BatchGetUsersResponse</h3>- <p></p>+ <h3 id="bytebase.v1.DimensionConstraint">DimensionConstraint</h3>+ <p>DimensionConstraint defines constraints for a spatial dimension.</p><table class="field-table">@@ -9798,10 +9980,31 @@ Format: users/{email} </p></td><tbody><tr>- <td>users</td>- <td><a href="#bytebase.v1.User">User</a></td>- <td>repeated</td>- <td><p>The users from the specified request. </p></td>+ <td>dimension</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>Dimension name/type (X, Y, Z, M, etc.) </p></td>+ </tr>++ <tr>+ <td>min_value</td>+ <td><a href="#double">double</a></td>+ <td></td>+ <td><p>Minimum value for this dimension </p></td>+ </tr>++ <tr>+ <td>max_value</td>+ <td><a href="#double">double</a></td>+ <td></td>+ <td><p>Maximum value for this dimension </p></td>+ </tr>++ <tr>+ <td>tolerance</td>+ <td><a href="#double">double</a></td>+ <td></td>+ <td><p>Tolerance for this dimension </p></td></tr></tbody>@@ -9811,8 +10014,8 @@ Format: users/{email} </p></td>- <h3 id="bytebase.v1.CreateUserRequest">CreateUserRequest</h3>- <p></p>+ <h3 id="bytebase.v1.DimensionalConfig">DimensionalConfig</h3>+ <p>DimensionalConfig defines dimensional and constraint parameters for spatial indexes.</p><table class="field-table">@@ -9822,10 +10025,31 @@ Format: users/{email} </p></td><tbody><tr>- <td>user</td>- <td><a href="#bytebase.v1.User">User</a></td>+ <td>dimensions</td>+ <td><a href="#int32">int32</a></td><td></td>- <td><p>The user to create. </p></td>+ <td><p>Number of dimensions (2-4, default 2) </p></td>+ </tr>++ <tr>+ <td>data_type</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>Spatial data type (GEOMETRY, GEOGRAPHY, POINT, POLYGON, etc.) </p></td>+ </tr>++ <tr>+ <td>srid</td>+ <td><a href="#int32">int32</a></td>+ <td></td>+ <td><p>Spatial reference system identifier (SRID) </p></td>+ </tr>++ <tr>+ <td>constraints</td>+ <td><a href="#bytebase.v1.DimensionConstraint">DimensionConstraint</a></td>+ <td>repeated</td>+ <td><p>Coordinate system constraints </p></td></tr></tbody>@@ -9835,7 +10059,7 @@ Format: users/{email} </p></td>- <h3 id="bytebase.v1.DeleteUserRequest">DeleteUserRequest</h3>+ <h3 id="bytebase.v1.EnumTypeMetadata">EnumTypeMetadata</h3><p></p>@@ -9849,8 +10073,28 @@ Format: users/{email} </p></td><td>name</td><td><a href="#string">string</a></td><td></td>- <td><p>The name of the user to delete.-Format: users/{email} </p></td>+ <td><p>The name of a type. </p></td>+ </tr>++ <tr>+ <td>values</td>+ <td><a href="#string">string</a></td>+ <td>repeated</td>+ <td><p>The enum values of a type. </p></td>+ </tr>++ <tr>+ <td>comment</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The comment describing the enum type. </p></td>+ </tr>++ <tr>+ <td>skip_dump</td>+ <td><a href="#bool">bool</a></td>+ <td></td>+ <td><p>Whether to skip this enum type during schema dump operations. </p></td></tr></tbody>@@ -9860,7 +10104,7 @@ Format: users/{email} </p></td>- <h3 id="bytebase.v1.GetUserRequest">GetUserRequest</h3>+ <h3 id="bytebase.v1.EventMetadata">EventMetadata</h3><p></p>@@ -9874,78 +10118,49 @@ Format: users/{email} </p></td><td>name</td><td><a href="#string">string</a></td><td></td>- <td><p>The name of the user to retrieve.-Format: users/{email} </p></td>+ <td><p>The name of the event. </p></td></tr>- </tbody>- </table>------ <h3 id="bytebase.v1.ListUsersRequest">ListUsersRequest</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>definition</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The schedule of the event. </p></td>+ </tr><tr>- <td>page_size</td>- <td><a href="#int32">int32</a></td>+ <td>time_zone</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>The maximum number of users to return. The service may return fewer than-this value.-If unspecified, at most 10 users will be returned.-The maximum value is 1000; values above 1000 will be coerced to 1000. </p></td>+ <td><p>The time zone of the event. </p></td></tr><tr>- <td>page_token</td>+ <td>sql_mode</td><td><a href="#string">string</a></td><td></td>- <td><p>A page token, received from a previous `ListUsers` call.-Provide this to retrieve the subsequent page.--When paginating, all other parameters provided to `ListUsers` must match-the call that provided the page token. </p></td>+ <td><p>The SQL mode setting for the event. </p></td></tr><tr>- <td>show_deleted</td>- <td><a href="#bool">bool</a></td>+ <td>character_set_client</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>Show deleted users if specified. </p></td>+ <td><p>The character set used by the client creating the event. </p></td></tr><tr>- <td>filter</td>+ <td>collation_connection</td><td><a href="#string">string</a></td><td></td>- <td><p>Filter is used to filter users returned in the list.-The syntax and semantics of CEL are documented at https://github.com/google/cel-spec--Supported filter:-- name: the user name, support "==" and ".contains()" operator.-- email: the user email, support "==" and ".contains()" operator.-- state: check State enum for values, support "==" operator.-- project: the project full name in "projects/{id}" format, support "==" operator.--For example:-name == "ed"-name.contains("ed")-email == "[email protected]"-email.contains("ed")-state == "DELETED"-project == "projects/sample-project"-You can combine filter conditions like:-name.contains("ed") && project == "projects/sample-project"-(name == "ed" || email == "[email protected]") && project == "projects/sample-project" </p></td>+ <td><p>The collation used for the connection when creating the event. </p></td>+ </tr>++ <tr>+ <td>comment</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The comment is the comment of an event. </p></td></tr></tbody>@@ -9955,8 +10170,8 @@ name.contains("ed") && project == "projects/sample-project&#- <h3 id="bytebase.v1.ListUsersResponse">ListUsersResponse</h3>- <p></p>+ <h3 id="bytebase.v1.ExtensionMetadata">ExtensionMetadata</h3>+ <p>ExtensionMetadata is the metadata for extensions.</p><table class="field-table">@@ -9966,43 +10181,32 @@ name.contains("ed") && project == "projects/sample-project&#<tbody><tr>- <td>users</td>- <td><a href="#bytebase.v1.User">User</a></td>- <td>repeated</td>- <td><p>The users from the specified request. </p></td>+ <td>name</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The name is the name of an extension. </p></td></tr><tr>- <td>next_page_token</td>+ <td>schema</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 schema is the extension that is installed to. But the extension usage+is not limited to the schema. </p></td></tr>- </tbody>- </table>------ <h3 id="bytebase.v1.UndeleteUserRequest">UndeleteUserRequest</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>version</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The version is the version of an extension. </p></td>+ </tr><tr>- <td>name</td>+ <td>description</td><td><a href="#string">string</a></td><td></td>- <td><p>The name of the deleted user.-Format: users/{email} </p></td>+ <td><p>The description is the description of an extension. </p></td></tr></tbody>@@ -10012,7 +10216,7 @@ Format: users/{email} </p></td>- <h3 id="bytebase.v1.UpdateEmailRequest">UpdateEmailRequest</h3>+ <h3 id="bytebase.v1.ExternalTableMetadata">ExternalTableMetadata</h3><p></p>@@ -10026,16 +10230,28 @@ Format: users/{email} </p></td><td>name</td><td><a href="#string">string</a></td><td></td>- <td><p>The name of the user whose email to update.-Format: users/{email}-Note: This is the current (old) email address. The new email is specified in the 'email' field. </p></td>+ <td><p>The name is the name of a external table. </p></td></tr><tr>- <td>email</td>+ <td>external_server_name</td><td><a href="#string">string</a></td><td></td>- <td><p>The new email address. </p></td>+ <td><p>The external_server_name is the name of the external server. </p></td>+ </tr>++ <tr>+ <td>external_database_name</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The external_database_name is the name of the external database. </p></td>+ </tr>++ <tr>+ <td>columns</td>+ <td><a href="#bytebase.v1.ColumnMetadata">ColumnMetadata</a></td>+ <td>repeated</td>+ <td><p>The columns is the ordered list of columns in a foreign table. </p></td></tr></tbody>@@ -10045,8 +10261,8 @@ Note: This is the current (old) email address. The new email is specified in the- <h3 id="bytebase.v1.UpdateUserRequest">UpdateUserRequest</h3>- <p></p>+ <h3 id="bytebase.v1.ForeignKeyMetadata">ForeignKeyMetadata</h3>+ <p>ForeignKeyMetadata is the metadata for foreign keys.</p><table class="field-table">@@ -10056,50 +10272,62 @@ Note: This is the current (old) email address. The new email is specified in the<tbody><tr>- <td>user</td>- <td><a href="#bytebase.v1.User">User</a></td>+ <td>name</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>The user to update.--The user's `name` field is used to identify the user to update.-Format: users/{email} </p></td>+ <td><p>The name is the name of a foreign key. </p></td></tr><tr>- <td>update_mask</td>- <td><a href="#google.protobuf.FieldMask">google.protobuf.FieldMask</a></td>+ <td>columns</td>+ <td><a href="#string">string</a></td>+ <td>repeated</td>+ <td><p>The columns are the ordered referencing columns of a foreign key. </p></td>+ </tr>++ <tr>+ <td>referenced_schema</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>The list of fields to update. </p></td>+ <td><p>The referenced_schema is the referenced schema name of a foreign key.+It is an empty string for databases without such concept such as MySQL. </p></td></tr><tr>- <td>otp_code</td>+ <td>referenced_table</td><td><a href="#string">string</a></td>- <td>optional</td>- <td><p>The otp_code is used to verify the user's identity by MFA. </p></td>+ <td></td>+ <td><p>The referenced_table is the referenced table name of a foreign key. </p></td></tr><tr>- <td>regenerate_temp_mfa_secret</td>- <td><a href="#bool">bool</a></td>+ <td>referenced_columns</td>+ <td><a href="#string">string</a></td>+ <td>repeated</td>+ <td><p>The referenced_columns are the ordered referenced columns of a foreign key. </p></td>+ </tr>++ <tr>+ <td>on_delete</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>The regenerate_temp_mfa_secret flag means to regenerate temporary MFA secret for user.-This is used for MFA setup. The temporary MFA secret and recovery codes will be returned in the response. </p></td>+ <td><p>The on_delete is the on delete action of a foreign key. </p></td></tr><tr>- <td>regenerate_recovery_codes</td>- <td><a href="#bool">bool</a></td>+ <td>on_update</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>The regenerate_recovery_codes flag means to regenerate recovery codes for user. </p></td>+ <td><p>The on_update is the on update action of a foreign key. </p></td></tr><tr>- <td>allow_missing</td>- <td><a href="#bool">bool</a></td>+ <td>match_type</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>If set to true, and the user is not found, a new user will be created.-In this situation, `update_mask` is ignored. </p></td>+ <td><p>The match_type is the match type of a foreign key.+The match_type is the PostgreSQL specific field.+It's empty string for other databases. </p></td></tr></tbody>@@ -10109,8 +10337,8 @@ In this situation, `update_mask` is ignored. </p></td>- <h3 id="bytebase.v1.User">User</h3>- <p></p>+ <h3 id="bytebase.v1.FunctionMetadata">FunctionMetadata</h3>+ <p>FunctionMetadata is the metadata for functions.</p><table class="field-table">@@ -10123,102 +10351,72 @@ In this situation, `update_mask` is ignored. </p></td><td>name</td><td><a href="#string">string</a></td><td></td>- <td><p>The name of the user.-Format: users/{email} </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 user account. </p></td>- </tr>-- <tr>- <td>email</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The email address of the user, used for login and notifications. </p></td>- </tr>-- <tr>- <td>title</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The display title or full name of the user. </p></td>+ <td><p>The name is the name of a function. </p></td></tr><tr>- <td>password</td>+ <td>definition</td><td><a href="#string">string</a></td><td></td>- <td><p>The password for authentication. Only used during user creation or password updates. </p></td>+ <td><p>The definition is the definition of a function. </p></td></tr><tr>- <td>service_key</td>+ <td>signature</td><td><a href="#string">string</a></td><td></td>- <td><p>The service key for service account authentication. </p></td>- </tr>-- <tr>- <td>mfa_enabled</td>- <td><a href="#bool">bool</a></td>- <td></td>- <td><p>The mfa_enabled flag means if the user has enabled MFA. </p></td>+ <td><p>The signature is the name with the number and type of input arguments the+function takes. </p></td></tr><tr>- <td>temp_otp_secret</td>+ <td>character_set_client</td><td><a href="#string">string</a></td><td></td>- <td><p>Temporary OTP secret used during MFA setup and regeneration. </p></td>+ <td><p>MySQL specific metadata. </p></td></tr><tr>- <td>temp_recovery_codes</td>+ <td>collation_connection</td><td><a href="#string">string</a></td>- <td>repeated</td>- <td><p>Temporary recovery codes used during MFA setup and regeneration. </p></td>+ <td></td>+ <td><p> </p></td></tr><tr>- <td>temp_otp_secret_created_time</td>- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>+ <td>database_collation</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>Timestamp when temp_otp_secret was created. Used by frontend to show countdown timer. </p></td>+ <td><p> </p></td></tr><tr>- <td>phone</td>+ <td>sql_mode</td><td><a href="#string">string</a></td><td></td>- <td><p>Should be a valid E.164 compliant phone number.-Could be empty. </p></td>+ <td><p> </p></td></tr><tr>- <td>profile</td>- <td><a href="#bytebase.v1.User.Profile">User.Profile</a></td>+ <td>comment</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>User profile metadata. </p></td>+ <td><p> </p></td></tr><tr>- <td>groups</td>- <td><a href="#string">string</a></td>+ <td>dependency_tables</td>+ <td><a href="#bytebase.v1.DependencyTable">DependencyTable</a></td><td>repeated</td>- <td><p>The groups for the user.-Format: groups/{email} </p></td>+ <td><p>The dependency_tables is the list of dependency tables of a function.+For PostgreSQL, it's the list of tables that the function depends on the return type definition. </p></td></tr><tr>- <td>workspace</td>- <td><a href="#string">string</a></td>+ <td>skip_dump</td>+ <td><a href="#bool">bool</a></td><td></td>- <td><p>The current workspace.-Format: workspaces/{id} </p></td>+ <td><p> </p></td></tr></tbody>@@ -10228,7 +10426,7 @@ Format: workspaces/{id} </p></td>- <h3 id="bytebase.v1.User.Profile">User.Profile</h3>+ <h3 id="bytebase.v1.GenerationMetadata">GenerationMetadata</h3><p></p>@@ -10239,24 +10437,17 @@ Format: workspaces/{id} </p></td><tbody><tr>- <td>last_login_time</td>- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>- <td></td>- <td><p>The last time the user successfully logged in. </p></td>- </tr>-- <tr>- <td>last_change_password_time</td>- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>+ <td>type</td>+ <td><a href="#bytebase.v1.GenerationMetadata.Type">GenerationMetadata.Type</a></td><td></td>- <td><p>The last time the user changed their password. </p></td>+ <td><p> </p></td></tr><tr>- <td>source</td>+ <td>expression</td><td><a href="#string">string</a></td><td></td>- <td><p>source means where the user comes from. For now we support Entra ID SCIM sync, so the source could be Entra ID. </p></td>+ <td><p> </p></td></tr></tbody>@@ -10266,218 +10457,176 @@ Format: workspaces/{id} </p></td>------- <h3 id="bytebase.v1.UserService">UserService</h3>- <p>UserService manages user accounts and authentication.</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>GetUser</td>- <td><a href="#bytebase.v1.GetUserRequest">GetUserRequest</a></td>- <td><a href="#bytebase.v1.User">User</a></td>- <td><p>Get the user.-Any authenticated user can get the user.-Permissions required: bb.users.get</p></td>- </tr>-- <tr>- <td>BatchGetUsers</td>- <td><a href="#bytebase.v1.BatchGetUsersRequest">BatchGetUsersRequest</a></td>- <td><a href="#bytebase.v1.BatchGetUsersResponse">BatchGetUsersResponse</a></td>- <td><p>Get the users in batch.-Any authenticated user can batch get users.-Permissions required: bb.users.get</p></td>- </tr>-- <tr>- <td>GetCurrentUser</td>- <td><a href="#google.protobuf.Empty">.google.protobuf.Empty</a></td>- <td><a href="#bytebase.v1.User">User</a></td>- <td><p>Get the current authenticated user.-Permissions required: None</p></td>- </tr>-- <tr>- <td>ListUsers</td>- <td><a href="#bytebase.v1.ListUsersRequest">ListUsersRequest</a></td>- <td><a href="#bytebase.v1.ListUsersResponse">ListUsersResponse</a></td>- <td><p>List all users.-Any authenticated user can list users.-Permissions required: bb.users.list</p></td>- </tr>-- <tr>- <td>CreateUser</td>- <td><a href="#bytebase.v1.CreateUserRequest">CreateUserRequest</a></td>- <td><a href="#bytebase.v1.User">User</a></td>- <td><p>Creates a user in the caller's workspace (admin action, self-hosted only).-In SaaS mode, admins should add users via workspace IAM policy instead.-Permissions required: bb.users.create</p></td>- </tr>-- <tr>- <td>UpdateUser</td>- <td><a href="#bytebase.v1.UpdateUserRequest">UpdateUserRequest</a></td>- <td><a href="#bytebase.v1.User">User</a></td>- <td><p>Updates a user. Users can update their own profile, or users with bb.users.update permission can update any user.-Note: Email updates are not supported through this API. Use UpdateEmail instead.-Permissions required: bb.users.update (or self)</p></td>- </tr>-- <tr>- <td>DeleteUser</td>- <td><a href="#bytebase.v1.DeleteUserRequest">DeleteUserRequest</a></td>- <td><a href="#google.protobuf.Empty">.google.protobuf.Empty</a></td>- <td><p>Deletes a user. Requires bb.users.delete permission with additional validation: the last remaining workspace admin cannot be deleted.-Permissions required: bb.users.delete</p></td>- </tr>-- <tr>- <td>UndeleteUser</td>- <td><a href="#bytebase.v1.UndeleteUserRequest">UndeleteUserRequest</a></td>- <td><a href="#bytebase.v1.User">User</a></td>- <td><p>Restores a deleted user.-Permissions required: bb.users.undelete</p></td>- </tr>-- <tr>- <td>UpdateEmail</td>- <td><a href="#bytebase.v1.UpdateEmailRequest">UpdateEmailRequest</a></td>- <td><a href="#bytebase.v1.User">User</a></td>- <td><p>Updates a user's email address.-Permissions required: bb.users.updateEmail</p></td>- </tr>-- </tbody>- </table>+ <h3 id="bytebase.v1.GetChangelogRequest">GetChangelogRequest</h3>+ <p></p>--- <h4>Methods with HTTP bindings</h4>- <table>+ <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>GetUser</td>- <td>GET</td>- <td>/v1/{name=users/*}</td>- <td></td>- </tr>----- <tr>- <td>BatchGetUsers</td>- <td>GET</td>- <td>/v1/users:batchGet</td>- <td></td>- </tr>----- <tr>- <td>GetCurrentUser</td>- <td>GET</td>- <td>/v1/users/me</td>- <td></td>- </tr>----- <tr>- <td>ListUsers</td>- <td>GET</td>- <td>/v1/users</td>- <td></td>- </tr>----- <tr>- <td>CreateUser</td>- <td>POST</td>- <td>/v1/users</td>- <td>user</td>- </tr>--+ <tr>+ <td>name</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The name of the changelog to retrieve.+Format: instances/{instance}/databases/{database}/changelogs/{changelog} </p></td>+ </tr>- <tr>- <td>UpdateUser</td>- <td>PATCH</td>- <td>/v1/{user.name=users/*}</td>- <td>user</td>- </tr>+ <tr>+ <td>view</td>+ <td><a href="#bytebase.v1.ChangelogView">ChangelogView</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>-+ </tbody>+ </table>++++++ <h3 id="bytebase.v1.GetDatabaseMetadataRequest">GetDatabaseMetadataRequest</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 database to retrieve metadata.+Format: instances/{instance}/databases/{database}/metadata </p></td>+ </tr>- <tr>- <td>DeleteUser</td>- <td>DELETE</td>- <td>/v1/{name=users/*}</td>- <td></td>- </tr>+ <tr>+ <td>filter</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>Filter is used to filter databases returned in the list.+The syntax and semantics of CEL are documented at https://github.com/google/cel-spec++Supported filter:+- schema: the schema name, support "==" operator.+- table: the table name, support "==" and ".contains()" operator.++For example:+schema == "schema-a"+table == "table-a"+table.contains("table-a")+schema == "schema-a" && table.contains("sample")+The filter is used to search for tables containing "sample" in the schema "schemas/schema-a".+The column masking level will only be returned when a table filter is used. </p></td>+ </tr>-+ <tr>+ <td>limit</td>+ <td><a href="#int32">int32</a></td>+ <td></td>+ <td><p>Limit the response size of returned table metadata per schema.+For example, if the database has 3 schemas, and each schema has 100 tables,+if limit is 20, then only 20 tables will be returned for each schema, total 60 tables.+Default 0, means no limit. </p></td>+ </tr>+ </tbody>+ </table>++++++ <h3 id="bytebase.v1.GetDatabaseRequest">GetDatabaseRequest</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>UndeleteUser</td>- <td>POST</td>- <td>/v1/{name=users/*}:undelete</td>- <td>*</td>- </tr>+ <tr>+ <td>name</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The name of the database to retrieve.+Format: instances/{instance}/databases/{database} </p></td>+ </tr>-+ </tbody>+ </table>++++++ <h3 id="bytebase.v1.GetDatabaseSDLSchemaRequest">GetDatabaseSDLSchemaRequest</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 database to retrieve SDL schema.+Format: instances/{instance}/databases/{database}/sdlSchema </p></td>+ </tr>- <tr>- <td>UpdateEmail</td>- <td>POST</td>- <td>/v1/{name=users/*}:updateEmail</td>- <td>*</td>- </tr>+ <tr>+ <td>format</td>+ <td><a href="#bytebase.v1.GetDatabaseSDLSchemaRequest.SDLFormat">GetDatabaseSDLSchemaRequest.SDLFormat</a></td>+ <td></td>+ <td><p>The format of the SDL schema output. </p></td>+ </tr>-</tbody></table>++-- <div class="file-heading">- <h2 id="v1/auth_service.proto">v1/auth_service.proto</h2><a href="#title">Top</a>- </div>- <p></p>+ <h3 id="bytebase.v1.GetDatabaseSchemaRequest">GetDatabaseSchemaRequest</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 database to retrieve schema.+Format: instances/{instance}/databases/{database}/schema </p></td>+ </tr>++ </tbody>+ </table>+++- <h3 id="bytebase.v1.ExchangeTokenRequest">ExchangeTokenRequest</h3>+ <h3 id="bytebase.v1.GetSchemaStringRequest">GetSchemaStringRequest</h3><p></p>@@ -10488,18 +10637,40 @@ Permissions required: bb.users.updateEmail</p></td><tbody><tr>- <td>token</td>+ <td>name</td><td><a href="#string">string</a></td><td></td>- <td><p>External OIDC token (JWT) from CI/CD platform. </p></td>+ <td><p>The name of the database.+Format: instances/{instance}/databases/{database} </p></td></tr><tr>- <td>email</td>+ <td>type</td>+ <td><a href="#bytebase.v1.GetSchemaStringRequest.ObjectType">GetSchemaStringRequest.ObjectType</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>schema</td><td><a href="#string">string</a></td><td></td>- <td><p>Workload Identity email for identifying which identity to authenticate as.-Format: {name}@workload.bytebase.com </p></td>+ <td><p>It's empty for DATABASE. </p></td>+ </tr>++ <tr>+ <td>object</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>It's empty for DATABASE and SCHEMA. </p></td>+ </tr>++ <tr>+ <td>metadata</td>+ <td><a href="#bytebase.v1.DatabaseMetadata">DatabaseMetadata</a></td>+ <td></td>+ <td><p>If use the metadata to generate the schema string, the type is OBJECT_TYPE_UNSPECIFIED.+Also the schema and object are empty. </p></td></tr></tbody>@@ -10509,7 +10680,7 @@ Format: {name}@workload.bytebase.com </p></td>- <h3 id="bytebase.v1.ExchangeTokenResponse">ExchangeTokenResponse</h3>+ <h3 id="bytebase.v1.GetSchemaStringResponse">GetSchemaStringResponse</h3><p></p>@@ -10520,10 +10691,10 @@ Format: {name}@workload.bytebase.com </p></td><tbody><tr>- <td>access_token</td>+ <td>schema_string</td><td><a href="#string">string</a></td><td></td>- <td><p>Bytebase access token. </p></td>+ <td><p> </p></td></tr></tbody>@@ -10533,8 +10704,8 @@ Format: {name}@workload.bytebase.com </p></td>- <h3 id="bytebase.v1.IdentityProviderContext">IdentityProviderContext</h3>- <p>Context for identity provider authentication.</p>+ <h3 id="bytebase.v1.GridLevel">GridLevel</h3>+ <p>GridLevel defines a tessellation grid level with its density.</p><table class="field-table">@@ -10544,111 +10715,157 @@ Format: {name}@workload.bytebase.com </p></td><tbody><tr>- <td>oauth2_context</td>- <td><a href="#bytebase.v1.OAuth2IdentityProviderContext">OAuth2IdentityProviderContext</a></td>+ <td>level</td>+ <td><a href="#int32">int32</a></td>+ <td></td>+ <td><p>Grid level number (1-4 for SQL Server) </p></td>+ </tr>++ <tr>+ <td>density</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>Grid density (LOW, MEDIUM, HIGH) </p></td>+ </tr>++ </tbody>+ </table>++++++ <h3 id="bytebase.v1.IndexMetadata">IndexMetadata</h3>+ <p>IndexMetadata is the metadata for indexes.</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 name of an index. </p></td>+ </tr>++ <tr>+ <td>expressions</td>+ <td><a href="#string">string</a></td>+ <td>repeated</td>+ <td><p>The expressions are the ordered columns or expressions of an index.+This could refer to a column or an expression. </p></td>+ </tr>++ <tr>+ <td>key_length</td>+ <td><a href="#int64">int64</a></td>+ <td>repeated</td>+ <td><p>The key_lengths are the ordered key lengths of an index.+If the key length is not specified, it's -1. </p></td>+ </tr>++ <tr>+ <td>descending</td>+ <td><a href="#bool">bool</a></td>+ <td>repeated</td>+ <td><p>The descending is the ordered descending of an index. </p></td>+ </tr>++ <tr>+ <td>type</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The type is the type of an index. </p></td>+ </tr>++ <tr>+ <td>unique</td>+ <td><a href="#bool">bool</a></td><td></td>- <td><p>OAuth2 authentication context. </p></td>+ <td><p>The unique is whether the index is unique. </p></td></tr><tr>- <td>oidc_context</td>- <td><a href="#bytebase.v1.OIDCIdentityProviderContext">OIDCIdentityProviderContext</a></td>+ <td>primary</td>+ <td><a href="#bool">bool</a></td><td></td>- <td><p>OpenID Connect authentication context. </p></td>+ <td><p>The primary is whether the index is a primary key index. </p></td></tr>- </tbody>- </table>------ <h3 id="bytebase.v1.LoginRequest">LoginRequest</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>email</td>- <td><a href="#string">string</a></td>+ <td>visible</td>+ <td><a href="#bool">bool</a></td><td></td>- <td><p>User's email address. </p></td>+ <td><p>The visible is whether the index is visible. </p></td></tr><tr>- <td>password</td>+ <td>comment</td><td><a href="#string">string</a></td><td></td>- <td><p>User's password for authentication. </p></td>+ <td><p>The comment is the comment of an index. </p></td></tr><tr>- <td>web</td>- <td><a href="#bool">bool</a></td>+ <td>definition</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>If true, sets access token and refresh token as HTTP-only cookies instead of-returning the token in the response body. Use for browser-based clients. </p></td>+ <td><p>The definition of an index. </p></td></tr><tr>- <td>idp_name</td>+ <td>parent_index_schema</td><td><a href="#string">string</a></td><td></td>- <td><p>The name of the identity provider.-Format: idps/{idp} </p></td>+ <td><p>The schema name of the parent index. </p></td></tr><tr>- <td>idp_context</td>- <td><a href="#bytebase.v1.IdentityProviderContext">IdentityProviderContext</a></td>+ <td>parent_index_name</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>The idp_context is used to get the user information from identity provider. </p></td>+ <td><p>The index name of the parent index. </p></td></tr><tr>- <td>otp_code</td>- <td><a href="#string">string</a></td>- <td>optional</td>- <td><p>The otp_code is used to verify the user's identity by MFA. </p></td>+ <td>granularity</td>+ <td><a href="#int64">int64</a></td>+ <td></td>+ <td><p>The number of granules in the block. It's a ClickHouse specific field. </p></td></tr><tr>- <td>recovery_code</td>- <td><a href="#string">string</a></td>- <td>optional</td>- <td><p>The recovery_code is used to recovery the user's identity with MFA. </p></td>+ <td>is_constraint</td>+ <td><a href="#bool">bool</a></td>+ <td></td>+ <td><p>It's a PostgreSQL specific field.+The unique constraint and unique index are not the same thing in PostgreSQL. </p></td></tr><tr>- <td>mfa_temp_token</td>- <td><a href="#string">string</a></td>- <td>optional</td>- <td><p>The mfa_temp_token is used to verify the user's identity by MFA. </p></td>+ <td>spatial_config</td>+ <td><a href="#bytebase.v1.SpatialIndexConfig">SpatialIndexConfig</a></td>+ <td></td>+ <td><p>Spatial index configuration for spatial databases like SQL Server, PostgreSQL with PostGIS, etc. </p></td></tr><tr>- <td>email_code</td>+ <td>opclass_names</td><td><a href="#string">string</a></td>- <td>optional</td>- <td><p>6-digit code from email for passwordless login/signup.-Pairs with `email`. Mutually exclusive with `password` and `idp_name`. </p></td>+ <td>repeated</td>+ <td><p>https://www.postgresql.org/docs/current/catalog-pg-opclass.html+Name of the operator class for each column. (PostgreSQL specific). </p></td></tr><tr>- <td>workspace</td>- <td><a href="#string">string</a></td>- <td>optional</td>- <td><p>Preferred workspace to land in after login. If the user is a member of this-workspace, the token is issued for it; otherwise falls back to the default-resolution (last login workspace → first membership). Typically populated-from the ?workspace= query parameter in invite links.-Format: workspaces/{workspace} </p></td>+ <td>opclass_defaults</td>+ <td><a href="#bool">bool</a></td>+ <td>repeated</td>+ <td><p>True if the operator class is the default. (PostgreSQL specific). </p></td></tr></tbody>@@ -10658,7 +10875,7 @@ Format: workspaces/{workspace} </p></td>- <h3 id="bytebase.v1.LoginResponse">LoginResponse</h3>+ <h3 id="bytebase.v1.ListChangelogsRequest">ListChangelogsRequest</h3><p></p>@@ -10669,32 +10886,55 @@ Format: workspaces/{workspace} </p></td><tbody><tr>- <td>token</td>+ <td>parent</td><td><a href="#string">string</a></td><td></td>- <td><p>Access token for authenticated requests.-Only returned when web=false. For web=true, the token is set as an HTTP-only cookie. </p></td>+ <td><p>The parent of the changelogs.+Format: instances/{instance}/databases/{database} </p></td></tr><tr>- <td>mfa_temp_token</td>+ <td>page_size</td>+ <td><a href="#int32">int32</a></td>+ <td></td>+ <td><p>The maximum number of changelogs to return. The service may return fewer+than this value. If unspecified, at most 10 changelogs 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>optional</td>- <td><p>Temporary token for MFA verification. </p></td>+ <td></td>+ <td><p>A page token, received from the previous call.+Provide this to retrieve the subsequent page.++When paginating, all other parameters provided must match+the call that provided the page token. </p></td></tr><tr>- <td>require_reset_password</td>- <td><a href="#bool">bool</a></td>+ <td>view</td>+ <td><a href="#bytebase.v1.ChangelogView">ChangelogView</a></td><td></td>- <td><p>Whether user must reset password before continuing. </p></td>+ <td><p> </p></td></tr><tr>- <td>user</td>- <td><a href="#bytebase.v1.User">User</a></td>+ <td>filter</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>The user from the successful login. </p></td>+ <td><p>Filter is used to filter changelogs returned in the list.+The syntax and semantics of CEL are documented at https://github.com/google/cel-spec++Supported filter:+- status: the changelog status, support "==" operation. check Changelog.Status for available values.+- create_time: the changelog create time in "2006-01-02T15:04:05Z07:00" format, support ">=" or "<=" operator.++Example:+status == "DONE"+status == "FAILED" && type == "SDL"+create_time >= "2024-01-01T00:00:00Z" && create_time <= "2024-01-02T00:00:00Z" </p></td></tr></tbody>@@ -10704,15 +10944,8 @@ Only returned when web=false. For web=true, the token is set as an HTTP-only coo- <h3 id="bytebase.v1.LogoutRequest">LogoutRequest</h3>- <p>Request to logout current user session.</p>------ <h3 id="bytebase.v1.OAuth2IdentityProviderContext">OAuth2IdentityProviderContext</h3>- <p>OAuth2 authentication context.</p>+ <h3 id="bytebase.v1.ListChangelogsResponse">ListChangelogsResponse</h3>+ <p></p><table class="field-table">@@ -10722,10 +10955,18 @@ Only returned when web=false. For web=true, the token is set as an HTTP-only coo<tbody><tr>- <td>code</td>+ <td>changelogs</td>+ <td><a href="#bytebase.v1.Changelog">Changelog</a></td>+ <td>repeated</td>+ <td><p>The list of changelogs. </p></td>+ </tr>++ <tr>+ <td>next_page_token</td><td><a href="#string">string</a></td><td></td>- <td><p>Authorization code from OAuth2 provider. </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>@@ -10735,8 +10976,8 @@ Only returned when web=false. For web=true, the token is set as an HTTP-only coo- <h3 id="bytebase.v1.OIDCIdentityProviderContext">OIDCIdentityProviderContext</h3>- <p>OpenID Connect authentication context.</p>+ <h3 id="bytebase.v1.ListDatabasesRequest">ListDatabasesRequest</h3>+ <p></p><table class="field-table">@@ -10746,58 +10987,89 @@ Only returned when web=false. For web=true, the token is set as an HTTP-only coo<tbody><tr>- <td>code</td>+ <td>parent</td><td><a href="#string">string</a></td><td></td>- <td><p>Authorization code from OIDC provider. </p></td>+ <td><p>- projects/{project}: list databases in a project, require "bb.projects.get" permission.+- workspaces/{id}: list databases in the workspace, require "bb.databases.list" permission.+- instances/{instances}: list databases in a instance, require "bb.instances.get" permission </p></td></tr>- </tbody>- </table>------ <h3 id="bytebase.v1.RefreshRequest">RefreshRequest</h3>- <p>Request to refresh the access token.</p>--+ <tr>+ <td>page_size</td>+ <td><a href="#int32">int32</a></td>+ <td></td>+ <td><p>The maximum number of databases to return. The service may return fewer+than this value.+If unspecified, at most 10 databases 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 `ListDatabases` call.+Provide this to retrieve the subsequent page.--- <h3 id="bytebase.v1.RefreshResponse">RefreshResponse</h3>- <p>Response from refreshing the access token.</p>+When paginating, all other parameters provided to `ListDatabases` must+match the call that provided the page token. </p></td>+ </tr>++ <tr>+ <td>filter</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>Filter is used to filter databases returned in the list.+The syntax and semantics of CEL are documented at https://github.com/google/cel-spec-+Supported filter:+- environment: the environment full name in "environments/{id}" format, support "==" operator.+- name: the database name, support ".contains()" operator.+- project: the project full name in "projects/{id}" format, support "==" operator.+- instance: the instance full name in "instances/{id}" format, support "==" operator.+- engine: the database engine, check Engine enum for values. Support "==", "in [xx]", "!(in [xx])" operator.+- exclude_unassigned: should be "true" or "false", will not show unassigned databases if it's true, support "==" operator.+- table: filter by the database table, support "==" and ".contains()" operator.+- labels.{key}: the database label, support "==" and "in" operators.--- <h3 id="bytebase.v1.RequestPasswordResetRequest">RequestPasswordResetRequest</h3>- <p></p>+For example:+environment == "environments/{environment resource id}"+environment == "" (find databases which environment is not set)+project == "projects/{project resource id}"+instance == "instances/{instance resource id}"+name.contains("database name")+engine == "MYSQL"+engine in ["MYSQL", "POSTGRES"]+!(engine in ["MYSQL", "POSTGRES"])+exclude_unassigned == true+table == "sample"+table.contains("sam")+labels.environment == "production"+labels.region == "asia"+labels.region in ["asia", "europe"]-- <table class="field-table">- <thead>- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>- </thead>- <tbody>+You can combine filter conditions like:+environment == "environments/prod" && name.contains("employee") </p></td>+ </tr><tr>- <td>email</td>- <td><a href="#string">string</a></td>+ <td>show_deleted</td>+ <td><a href="#bool">bool</a></td><td></td>- <td><p>The email address of the account to reset. </p></td>+ <td><p>Show deleted database if specified. </p></td></tr><tr>- <td>workspace</td>+ <td>order_by</td><td><a href="#string">string</a></td>- <td>optional</td>- <td><p>Optional workspace context captured at send time, used to locate the EMAIL setting,-and later (at verify time) for signup gate checks and workspace assignment.-Unset for SaaS brand-new signup (no workspace exists yet).-Format: workspaces/{workspace} </p></td>+ <td></td>+ <td><p>The order by of databases.+Support name, project, instance. The default sorting order is ascending.+For example:+- order_by = "name" - order by name ascending+- order_by = "name desc"+- order_by = "name desc, project asc" </p></td></tr></tbody>@@ -10807,7 +11079,7 @@ Format: workspaces/{workspace} </p></td>- <h3 id="bytebase.v1.ResetPasswordRequest">ResetPasswordRequest</h3>+ <h3 id="bytebase.v1.ListDatabasesResponse">ListDatabasesResponse</h3><p></p>@@ -10818,24 +11090,18 @@ Format: workspaces/{workspace} </p></td><tbody><tr>- <td>email</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The email address of the account. </p></td>- </tr>-- <tr>- <td>code</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The 6-digit code from the reset email. </p></td>+ <td>databases</td>+ <td><a href="#bytebase.v1.Database">Database</a></td>+ <td>repeated</td>+ <td><p>The databases from the specified request. </p></td></tr><tr>- <td>new_password</td>+ <td>next_page_token</td><td><a href="#string">string</a></td><td></td>- <td><p>The new password to set. </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>@@ -10845,8 +11111,8 @@ Format: workspaces/{workspace} </p></td>- <h3 id="bytebase.v1.SendEmailLoginCodeRequest">SendEmailLoginCodeRequest</h3>- <p></p>+ <h3 id="bytebase.v1.MaterializedViewMetadata">MaterializedViewMetadata</h3>+ <p>MaterializedViewMetadata is the metadata for materialized views.</p><table class="field-table">@@ -10856,58 +11122,53 @@ Format: workspaces/{workspace} </p></td><tbody><tr>- <td>email</td>+ <td>name</td><td><a href="#string">string</a></td><td></td>- <td><p>The email address to send the code to. </p></td>+ <td><p>The name is the name of a materialized view. </p></td></tr><tr>- <td>workspace</td>+ <td>definition</td><td><a href="#string">string</a></td>- <td>optional</td>- <td><p>Optional workspace context captured at send time, used to locate the EMAIL setting,-and later (at verify time) for signup gate checks and workspace assignment.-Unset for SaaS brand-new signup (no workspace exists yet).-Format: workspaces/{workspace} </p></td>+ <td></td>+ <td><p>The definition is the definition of a materialized view. </p></td></tr>- </tbody>- </table>------ <h3 id="bytebase.v1.SignupRequest">SignupRequest</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>email</td>+ <td>comment</td><td><a href="#string">string</a></td><td></td>- <td><p>The email for the new account. </p></td>+ <td><p>The comment is the comment of a materialized view. </p></td></tr><tr>- <td>password</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The password for the new account. </p></td>+ <td>dependency_columns</td>+ <td><a href="#bytebase.v1.DependencyColumn">DependencyColumn</a></td>+ <td>repeated</td>+ <td><p>The dependency_columns is the list of dependency columns of a materialized+view. </p></td></tr><tr>- <td>title</td>- <td><a href="#string">string</a></td>+ <td>triggers</td>+ <td><a href="#bytebase.v1.TriggerMetadata">TriggerMetadata</a></td>+ <td>repeated</td>+ <td><p>The columns is the ordered list of columns in a table. </p></td>+ </tr>++ <tr>+ <td>indexes</td>+ <td><a href="#bytebase.v1.IndexMetadata">IndexMetadata</a></td>+ <td>repeated</td>+ <td><p>The indexes is the list of indexes in a table. </p></td>+ </tr>++ <tr>+ <td>skip_dump</td>+ <td><a href="#bool">bool</a></td><td></td>- <td><p>The display name of the user. </p></td>+ <td><p> </p></td></tr></tbody>@@ -10917,8 +11178,8 @@ Format: workspaces/{workspace} </p></td>- <h3 id="bytebase.v1.SwitchWorkspaceRequest">SwitchWorkspaceRequest</h3>- <p></p>+ <h3 id="bytebase.v1.PackageMetadata">PackageMetadata</h3>+ <p>PackageMetadata is the metadata for packages.</p><table class="field-table">@@ -10928,39 +11189,17 @@ Format: workspaces/{workspace} </p></td><tbody><tr>- <td>workspace</td>+ <td>name</td><td><a href="#string">string</a></td><td></td>- <td><p>The target workspace to switch to.-Format: workspaces/{workspace} </p></td>- </tr>-- <tr>- <td>web</td>- <td><a href="#bool">bool</a></td>- <td></td>- <td><p>If true, sets tokens as HTTP-only cookies (browser clients). </p></td>- </tr>-- <tr>- <td>otp_code</td>- <td><a href="#string">string</a></td>- <td>optional</td>- <td><p>OTP code for MFA verification. Required if the target workspace enforces MFA. </p></td>- </tr>-- <tr>- <td>recovery_code</td>- <td><a href="#string">string</a></td>- <td>optional</td>- <td><p>Recovery code for MFA verification (alternative to otp_code). </p></td>+ <td><p>The name is the name of a package. </p></td></tr><tr>- <td>mfa_temp_token</td>+ <td>definition</td><td><a href="#string">string</a></td>- <td>optional</td>- <td><p>Temporary MFA token from a previous SwitchWorkspace call that returned mfa_temp_token. </p></td>+ <td></td>+ <td><p>The definition is the definition of a package. </p></td></tr></tbody>@@ -10970,232 +11209,210 @@ Format: workspaces/{workspace} </p></td>------- <h3 id="bytebase.v1.AuthService">AuthService</h3>- <p>AuthService handles user authentication 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>Login</td>- <td><a href="#bytebase.v1.LoginRequest">LoginRequest</a></td>- <td><a href="#bytebase.v1.LoginResponse">LoginResponse</a></td>- <td><p>Authenticates a user and returns access tokens.-Permissions required: None</p></td>- </tr>-- <tr>- <td>Logout</td>- <td><a href="#bytebase.v1.LogoutRequest">LogoutRequest</a></td>- <td><a href="#google.protobuf.Empty">.google.protobuf.Empty</a></td>- <td><p>Logs out the current user session.-Permissions required: None</p></td>- </tr>-- <tr>- <td>ExchangeToken</td>- <td><a href="#bytebase.v1.ExchangeTokenRequest">ExchangeTokenRequest</a></td>- <td><a href="#bytebase.v1.ExchangeTokenResponse">ExchangeTokenResponse</a></td>- <td><p>Exchanges an external OIDC token for a Bytebase access token.-Used by CI/CD pipelines with Workload Identity Federation.-Permissions required: None (validates via OIDC token)</p></td>- </tr>-- <tr>- <td>Signup</td>- <td><a href="#bytebase.v1.SignupRequest">SignupRequest</a></td>- <td><a href="#bytebase.v1.LoginResponse">LoginResponse</a></td>- <td><p>Registers a new user account. Creates a principal and assigns a workspace:-- If the user's email was pre-invited to a workspace, joins that workspace.-- Otherwise, creates a new workspace with the user as admin.-Returns access tokens so the user is logged in immediately after signup.</p></td>- </tr>-- <tr>- <td>Refresh</td>- <td><a href="#bytebase.v1.RefreshRequest">RefreshRequest</a></td>- <td><a href="#bytebase.v1.RefreshResponse">RefreshResponse</a></td>- <td><p>Refreshes the access token using the refresh token cookie.-Permissions required: None (validates via refresh token cookie)</p></td>- </tr>-- <tr>- <td>SwitchWorkspace</td>- <td><a href="#bytebase.v1.SwitchWorkspaceRequest">SwitchWorkspaceRequest</a></td>- <td><a href="#bytebase.v1.LoginResponse">LoginResponse</a></td>- <td><p>Switches the current user's active workspace and issues new tokens.-The user must be a member of the target workspace.</p></td>- </tr>-- <tr>- <td>RequestPasswordReset</td>- <td><a href="#bytebase.v1.RequestPasswordResetRequest">RequestPasswordResetRequest</a></td>- <td><a href="#google.protobuf.Empty">.google.protobuf.Empty</a></td>- <td><p>Requests a password reset email for the given email address.-Always returns success to avoid leaking whether the email exists.-Permissions required: None</p></td>- </tr>-- <tr>- <td>ResetPassword</td>- <td><a href="#bytebase.v1.ResetPasswordRequest">ResetPasswordRequest</a></td>- <td><a href="#google.protobuf.Empty">.google.protobuf.Empty</a></td>- <td><p>Resets the user's password using a password reset token from email.-Permissions required: None (validates via token)</p></td>- </tr>-- <tr>- <td>SendEmailLoginCode</td>- <td><a href="#bytebase.v1.SendEmailLoginCodeRequest">SendEmailLoginCodeRequest</a></td>- <td><a href="#google.protobuf.Empty">.google.protobuf.Empty</a></td>- <td><p>Sends a 6-digit verification code to the email for login/signup.-Always returns success (no email enumeration). Enforces 60-sec resend cooldown.-Permissions required: None</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>+ <h3 id="bytebase.v1.ProcedureMetadata">ProcedureMetadata</h3>+ <p>ProcedureMetadata is the metadata for procedures.</p>+++ <table class="field-table">+ <thead>+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr></thead><tbody>---- <tr>- <td>Login</td>- <td>POST</td>- <td>/v1/auth/login</td>- <td>*</td>- </tr>-+ <tr>+ <td>name</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The name is the name of a procedure. </p></td>+ </tr>+ <tr>+ <td>definition</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The definition is the definition of a procedure. </p></td>+ </tr>- <tr>- <td>Logout</td>- <td>POST</td>- <td>/v1/auth/logout</td>- <td>*</td>- </tr>+ <tr>+ <td>signature</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The signature is the name with the number and type of input arguments the+procedure takes. </p></td>+ </tr>-+ <tr>+ <td>character_set_client</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>MySQL specific metadata. </p></td>+ </tr>+ <tr>+ <td>collation_connection</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>- <tr>- <td>ExchangeToken</td>- <td>POST</td>- <td>/v1/auth:exchangeToken</td>- <td>*</td>- </tr>+ <tr>+ <td>database_collation</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>-+ <tr>+ <td>sql_mode</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>+ <tr>+ <td>comment</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The comment is the comment of a procedure. </p></td>+ </tr>- <tr>- <td>Signup</td>- <td>POST</td>- <td>/v1/auth/signup</td>- <td>*</td>- </tr>+ <tr>+ <td>skip_dump</td>+ <td><a href="#bool">bool</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>-+ </tbody>+ </table>++++++ <h3 id="bytebase.v1.SchemaMetadata">SchemaMetadata</h3>+ <p>SchemaMetadata is the metadata for schemas.</p><p>This is the concept of schema in Postgres, but it's a no-op for MySQL.</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 schema name.+It is an empty string for databases without such concept such as MySQL. </p></td>+ </tr>- <tr>- <td>Refresh</td>- <td>POST</td>- <td>/v1/auth/refresh</td>- <td>*</td>- </tr>+ <tr>+ <td>tables</td>+ <td><a href="#bytebase.v1.TableMetadata">TableMetadata</a></td>+ <td>repeated</td>+ <td><p>The tables is the list of tables in a schema. </p></td>+ </tr>-+ <tr>+ <td>external_tables</td>+ <td><a href="#bytebase.v1.ExternalTableMetadata">ExternalTableMetadata</a></td>+ <td>repeated</td>+ <td><p>The external_tables is the list of external tables in a schema. </p></td>+ </tr>+ <tr>+ <td>views</td>+ <td><a href="#bytebase.v1.ViewMetadata">ViewMetadata</a></td>+ <td>repeated</td>+ <td><p>The views is the list of views in a schema. </p></td>+ </tr>- <tr>- <td>SwitchWorkspace</td>- <td>POST</td>- <td>/v1/auth:switchWorkspace</td>- <td>*</td>- </tr>+ <tr>+ <td>functions</td>+ <td><a href="#bytebase.v1.FunctionMetadata">FunctionMetadata</a></td>+ <td>repeated</td>+ <td><p>The functions is the list of functions in a schema. </p></td>+ </tr>-+ <tr>+ <td>procedures</td>+ <td><a href="#bytebase.v1.ProcedureMetadata">ProcedureMetadata</a></td>+ <td>repeated</td>+ <td><p>The procedures is the list of procedures in a schema. </p></td>+ </tr>+ <tr>+ <td>streams</td>+ <td><a href="#bytebase.v1.StreamMetadata">StreamMetadata</a></td>+ <td>repeated</td>+ <td><p>The streams is the list of streams in a schema, currently, only used for+Snowflake. </p></td>+ </tr>- <tr>- <td>RequestPasswordReset</td>- <td>POST</td>- <td>/v1/auth:requestPasswordReset</td>- <td>*</td>- </tr>+ <tr>+ <td>tasks</td>+ <td><a href="#bytebase.v1.TaskMetadata">TaskMetadata</a></td>+ <td>repeated</td>+ <td><p>The routines is the list of routines in a schema, currently, only used for+Snowflake. </p></td>+ </tr>-+ <tr>+ <td>materialized_views</td>+ <td><a href="#bytebase.v1.MaterializedViewMetadata">MaterializedViewMetadata</a></td>+ <td>repeated</td>+ <td><p>The materialized_views is the list of materialized views in a schema. </p></td>+ </tr>+ <tr>+ <td>packages</td>+ <td><a href="#bytebase.v1.PackageMetadata">PackageMetadata</a></td>+ <td>repeated</td>+ <td><p>The packages is the list of packages in a schema. </p></td>+ </tr>- <tr>- <td>ResetPassword</td>- <td>POST</td>- <td>/v1/auth:resetPassword</td>- <td>*</td>- </tr>+ <tr>+ <td>owner</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The owner of the schema. </p></td>+ </tr>-+ <tr>+ <td>sequences</td>+ <td><a href="#bytebase.v1.SequenceMetadata">SequenceMetadata</a></td>+ <td>repeated</td>+ <td><p>The sequences is the list of sequences in a schema, sorted by name. </p></td>+ </tr>+ <tr>+ <td>events</td>+ <td><a href="#bytebase.v1.EventMetadata">EventMetadata</a></td>+ <td>repeated</td>+ <td><p>The events is the list of scheduled events in a schema. </p></td>+ </tr>- <tr>- <td>SendEmailLoginCode</td>- <td>POST</td>- <td>/v1/auth:sendEmailLoginCode</td>- <td>*</td>- </tr>+ <tr>+ <td>enum_types</td>+ <td><a href="#bytebase.v1.EnumTypeMetadata">EnumTypeMetadata</a></td>+ <td>repeated</td>+ <td><p>The enum_types is the list of user-defined enum types in a schema. </p></td>+ </tr>-- </tbody>- </table>----- <div class="file-heading">- <h2 id="v1/cel_service.proto">v1/cel_service.proto</h2><a href="#title">Top</a>- </div>- <p></p>--- <h3 id="bytebase.v1.BatchDeparseRequest">BatchDeparseRequest</h3>- <p>Request message for batch deparsing CEL expressions.</p>--- <table class="field-table">- <thead>- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>- </thead>- <tbody>+ <tr>+ <td>skip_dump</td>+ <td><a href="#bool">bool</a></td>+ <td></td>+ <td><p>Whether to skip this schema during schema dump operations. </p></td>+ </tr><tr>- <td>expressions</td>- <td><a href="#google.api.expr.v1alpha1.Expr">google.api.expr.v1alpha1.Expr</a></td>- <td>repeated</td>- <td><p>The CEL expression ASTs to deparse. </p></td>+ <td>comment</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The comment is the comment of a schema. </p></td></tr></tbody>@@ -11205,8 +11422,8 @@ Permissions required: None</p></td>- <h3 id="bytebase.v1.BatchDeparseResponse">BatchDeparseResponse</h3>- <p>Response message for batch deparsing CEL expressions.</p>+ <h3 id="bytebase.v1.SequenceMetadata">SequenceMetadata</h3>+ <p></p><table class="field-table">@@ -11216,34 +11433,94 @@ Permissions required: None</p></td><tbody><tr>- <td>expressions</td>+ <td>name</td><td><a href="#string">string</a></td>- <td>repeated</td>- <td><p>The deparsed CEL expressions as strings. </p></td>+ <td></td>+ <td><p>The name of a sequence. </p></td></tr>- </tbody>- </table>------ <h3 id="bytebase.v1.BatchParseRequest">BatchParseRequest</h3>- <p>Request message for batch parsing CEL expressions.</p>--- <table class="field-table">- <thead>- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>- </thead>- <tbody>+ <tr>+ <td>data_type</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The data type of a sequence. </p></td>+ </tr><tr>- <td>expressions</td>+ <td>start</td><td><a href="#string">string</a></td>- <td>repeated</td>- <td><p>The CEL expression strings to parse. </p></td>+ <td></td>+ <td><p>The start value of a sequence. </p></td>+ </tr>++ <tr>+ <td>min_value</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The minimum value of a sequence. </p></td>+ </tr>++ <tr>+ <td>max_value</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The maximum value of a sequence. </p></td>+ </tr>++ <tr>+ <td>increment</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>Increment value of a sequence. </p></td>+ </tr>++ <tr>+ <td>cycle</td>+ <td><a href="#bool">bool</a></td>+ <td></td>+ <td><p>Cycle is whether the sequence cycles. </p></td>+ </tr>++ <tr>+ <td>cache_size</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>Cache size of a sequence. </p></td>+ </tr>++ <tr>+ <td>last_value</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>Last value of a sequence. </p></td>+ </tr>++ <tr>+ <td>owner_table</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The owner table of the sequence. </p></td>+ </tr>++ <tr>+ <td>owner_column</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The owner column of the sequence. </p></td>+ </tr>++ <tr>+ <td>comment</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The comment describing the sequence. </p></td>+ </tr>++ <tr>+ <td>skip_dump</td>+ <td><a href="#bool">bool</a></td>+ <td></td>+ <td><p>Whether to skip this sequence during schema dump operations. </p></td></tr></tbody>@@ -11253,8 +11530,8 @@ Permissions required: None</p></td>- <h3 id="bytebase.v1.BatchParseResponse">BatchParseResponse</h3>- <p>Response message for batch parsing CEL expressions.</p>+ <h3 id="bytebase.v1.SpatialIndexConfig">SpatialIndexConfig</h3>+ <p>SpatialIndexConfig defines the spatial index configuration for spatial databases.</p><table class="field-table">@@ -11264,10 +11541,31 @@ Permissions required: None</p></td><tbody><tr>- <td>expressions</td>- <td><a href="#google.api.expr.v1alpha1.Expr">google.api.expr.v1alpha1.Expr</a></td>- <td>repeated</td>- <td><p>The parsed CEL expressions as AST. </p></td>+ <td>method</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>Spatial indexing method (e.g., "SPATIAL", "R-TREE", "GIST") </p></td>+ </tr>++ <tr>+ <td>tessellation</td>+ <td><a href="#bytebase.v1.TessellationConfig">TessellationConfig</a></td>+ <td></td>+ <td><p>Tessellation configuration for grid-based spatial indexes </p></td>+ </tr>++ <tr>+ <td>storage</td>+ <td><a href="#bytebase.v1.StorageConfig">StorageConfig</a></td>+ <td></td>+ <td><p>Storage and performance configuration </p></td>+ </tr>++ <tr>+ <td>dimensional</td>+ <td><a href="#bytebase.v1.DimensionalConfig">DimensionalConfig</a></td>+ <td></td>+ <td><p>Dimensional configuration </p></td></tr></tbody>@@ -11277,160 +11575,112 @@ Permissions required: None</p></td>------- <h3 id="bytebase.v1.CelService">CelService</h3>- <p>CelService manages CEL (Common Expression Language) parsing and formatting 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>BatchParse</td>- <td><a href="#bytebase.v1.BatchParseRequest">BatchParseRequest</a></td>- <td><a href="#bytebase.v1.BatchParseResponse">BatchParseResponse</a></td>- <td><p>Parses multiple CEL expression strings into AST representations.-Permissions required: None</p></td>- </tr>-- <tr>- <td>BatchDeparse</td>- <td><a href="#bytebase.v1.BatchDeparseRequest">BatchDeparseRequest</a></td>- <td><a href="#bytebase.v1.BatchDeparseResponse">BatchDeparseResponse</a></td>- <td><p>Converts multiple CEL AST representations back into expression strings.-Permissions required: None</p></td>- </tr>-- </tbody>- </table>+ <h3 id="bytebase.v1.StorageConfig">StorageConfig</h3>+ <p>StorageConfig defines storage and performance parameters for spatial indexes.</p>--- <h4>Methods with HTTP bindings</h4>- <table>+ <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>fillfactor</td>+ <td><a href="#int32">int32</a></td>+ <td></td>+ <td><p>Fill factor percentage (1-100) </p></td>+ </tr>- <tr>- <td>BatchParse</td>- <td>POST</td>- <td>/v1/cel/batchParse</td>- <td>*</td>- </tr>--+ <tr>+ <td>buffering</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>Buffering mode for PostgreSQL (auto, on, off) </p></td>+ </tr>+ <tr>+ <td>tablespace</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>Tablespace configuration for Oracle </p></td>+ </tr>- <tr>- <td>BatchDeparse</td>- <td>POST</td>- <td>/v1/cel/batchDeparse</td>- <td>*</td>- </tr>+ <tr>+ <td>work_tablespace</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>-- </tbody>- </table>----- <div class="file-heading">- <h2 id="v1/database_catalog_service.proto">v1/database_catalog_service.proto</h2><a href="#title">Top</a>- </div>- <p></p>--- <h3 id="bytebase.v1.ColumnCatalog">ColumnCatalog</h3>- <p>Column metadata within a table.</p>--- <table class="field-table">- <thead>- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>- </thead>- <tbody>+ <tr>+ <td>sdo_level</td>+ <td><a href="#int32">int32</a></td>+ <td></td>+ <td><p> </p></td>+ </tr><tr>- <td>name</td>- <td><a href="#string">string</a></td>+ <td>commit_interval</td>+ <td><a href="#int32">int32</a></td><td></td>- <td><p>The column name. </p></td>+ <td><p> </p></td></tr><tr>- <td>semantic_type</td>+ <td>pad_index</td>+ <td><a href="#bool">bool</a></td>+ <td></td>+ <td><p>SQL Server specific parameters </p></td>+ </tr>++ <tr>+ <td>sort_in_tempdb</td><td><a href="#string">string</a></td><td></td>- <td><p>The semantic type describing the data purpose. </p></td>+ <td><p>ON, OFF </p></td></tr><tr>- <td>labels</td>- <td><a href="#bytebase.v1.ColumnCatalog.LabelsEntry">ColumnCatalog.LabelsEntry</a></td>- <td>repeated</td>- <td><p>User-defined labels for this column. </p></td>+ <td>drop_existing</td>+ <td><a href="#bool">bool</a></td>+ <td></td>+ <td><p> </p></td></tr><tr>- <td>classification</td>- <td><a href="#string">string</a></td>+ <td>online</td>+ <td><a href="#bool">bool</a></td><td></td>- <td><p>The data classification level for this column. </p></td>+ <td><p> </p></td></tr><tr>- <td>object_schema</td>- <td><a href="#bytebase.v1.ObjectSchema">ObjectSchema</a></td>- <td>optional</td>- <td><p>Object schema for complex column types like JSON. </p></td>+ <td>allow_row_locks</td>+ <td><a href="#bool">bool</a></td>+ <td></td>+ <td><p> </p></td></tr>- </tbody>- </table>------ <h3 id="bytebase.v1.ColumnCatalog.LabelsEntry">ColumnCatalog.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>allow_page_locks</td>+ <td><a href="#bool">bool</a></td>+ <td></td>+ <td><p> </p></td>+ </tr><tr>- <td>key</td>- <td><a href="#string">string</a></td>+ <td>maxdop</td>+ <td><a href="#int32">int32</a></td><td></td><td><p> </p></td></tr><tr>- <td>value</td>+ <td>data_compression</td><td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>NONE, ROW, PAGE </p></td></tr></tbody>@@ -11440,8 +11690,8 @@ Permissions required: None</p></td>- <h3 id="bytebase.v1.DatabaseCatalog">DatabaseCatalog</h3>- <p>Catalog metadata for a database including schemas, tables, and columns.</p>+ <h3 id="bytebase.v1.StreamMetadata">StreamMetadata</h3>+ <p></p><table class="field-table">@@ -11454,85 +11704,56 @@ Permissions required: None</p></td><td>name</td><td><a href="#string">string</a></td><td></td>- <td><p>The name of the database catalog.-Format: instances/{instance}/databases/{database}/catalog </p></td>+ <td><p>The name is the name of a stream. </p></td></tr><tr>- <td>schemas</td>- <td><a href="#bytebase.v1.SchemaCatalog">SchemaCatalog</a></td>- <td>repeated</td>- <td><p>The schemas in the database. </p></td>+ <td>table_name</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The table_name is the name of the table/view that the stream is created on. </p></td></tr>- </tbody>- </table>------ <h3 id="bytebase.v1.GetDatabaseCatalogRequest">GetDatabaseCatalogRequest</h3>- <p>Request message for getting a database catalog.</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>owner</td><td><a href="#string">string</a></td><td></td>- <td><p>The name of the database catalog to retrieve.-Format: instances/{instance}/databases/{database}/catalog </p></td>+ <td><p>The owner of the stream. </p></td></tr>- </tbody>- </table>------ <h3 id="bytebase.v1.ObjectSchema">ObjectSchema</h3>- <p>Schema definition for object-type columns.</p>--- <table class="field-table">- <thead>- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>- </thead>- <tbody>+ <tr>+ <td>comment</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The comment of the stream. </p></td>+ </tr><tr><td>type</td>- <td><a href="#bytebase.v1.ObjectSchema.Type">ObjectSchema.Type</a></td>+ <td><a href="#bytebase.v1.StreamMetadata.Type">StreamMetadata.Type</a></td><td></td>- <td><p>The data type of this object. </p></td>+ <td><p>The type of the stream. </p></td></tr><tr>- <td>struct_kind</td>- <td><a href="#bytebase.v1.ObjectSchema.StructKind">ObjectSchema.StructKind</a></td>+ <td>stale</td>+ <td><a href="#bool">bool</a></td><td></td>- <td><p>Struct schema. </p></td>+ <td><p>Indicates whether the stream was last read before the `stale_after` time. </p></td></tr><tr>- <td>array_kind</td>- <td><a href="#bytebase.v1.ObjectSchema.ArrayKind">ObjectSchema.ArrayKind</a></td>+ <td>mode</td>+ <td><a href="#bytebase.v1.StreamMetadata.Mode">StreamMetadata.Mode</a></td><td></td>- <td><p>Array schema. </p></td>+ <td><p>The mode of the stream. </p></td></tr><tr>- <td>semantic_type</td>+ <td>definition</td><td><a href="#string">string</a></td><td></td>- <td><p>The semantic type of this object. </p></td>+ <td><p>The definition of the stream. </p></td></tr></tbody>@@ -11542,8 +11763,8 @@ Format: instances/{instance}/databases/{database}/catalog </p></td>- <h3 id="bytebase.v1.ObjectSchema.ArrayKind">ObjectSchema.ArrayKind</h3>- <p>Array type with element schema.</p>+ <h3 id="bytebase.v1.SyncDatabaseRequest">SyncDatabaseRequest</h3>+ <p></p><table class="field-table">@@ -11553,10 +11774,11 @@ Format: instances/{instance}/databases/{database}/catalog </p></td><tbody><tr>- <td>kind</td>- <td><a href="#bytebase.v1.ObjectSchema">ObjectSchema</a></td>+ <td>name</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>The schema of array elements. </p></td>+ <td><p>The name of the database to sync.+Format: instances/{instance}/databases/{database} </p></td></tr></tbody>@@ -11566,32 +11788,15 @@ Format: instances/{instance}/databases/{database}/catalog </p></td>- <h3 id="bytebase.v1.ObjectSchema.StructKind">ObjectSchema.StructKind</h3>- <p>Structure type with named properties.</p>+ <h3 id="bytebase.v1.SyncDatabaseResponse">SyncDatabaseResponse</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>properties</td>- <td><a href="#bytebase.v1.ObjectSchema.StructKind.PropertiesEntry">ObjectSchema.StructKind.PropertiesEntry</a></td>- <td>repeated</td>- <td><p>Properties of the struct. </p></td>- </tr>-- </tbody>- </table>--- <h3 id="bytebase.v1.ObjectSchema.StructKind.PropertiesEntry">ObjectSchema.StructKind.PropertiesEntry</h3>- <p></p>+ <h3 id="bytebase.v1.TableMetadata">TableMetadata</h3>+ <p>TableMetadata is the metadata for tables.</p><table class="field-table">@@ -11601,290 +11806,163 @@ Format: instances/{instance}/databases/{database}/catalog </p></td><tbody><tr>- <td>key</td>+ <td>name</td><td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>The name is the name of a table. </p></td></tr><tr>- <td>value</td>- <td><a href="#bytebase.v1.ObjectSchema">ObjectSchema</a></td>+ <td>columns</td>+ <td><a href="#bytebase.v1.ColumnMetadata">ColumnMetadata</a></td>+ <td>repeated</td>+ <td><p>The columns is the ordered list of columns in a table. </p></td>+ </tr>++ <tr>+ <td>indexes</td>+ <td><a href="#bytebase.v1.IndexMetadata">IndexMetadata</a></td>+ <td>repeated</td>+ <td><p>The indexes is the list of indexes in a table. </p></td>+ </tr>++ <tr>+ <td>engine</td>+ <td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>The engine is the engine of a table. </p></td></tr>- </tbody>- </table>------ <h3 id="bytebase.v1.SchemaCatalog">SchemaCatalog</h3>- <p>Schema metadata within a database.</p>--- <table class="field-table">- <thead>- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>- </thead>- <tbody>+ <tr>+ <td>collation</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The collation is the collation of a table. </p></td>+ </tr>++ <tr>+ <td>charset</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The character set of table. </p></td>+ </tr>++ <tr>+ <td>row_count</td>+ <td><a href="#int64">int64</a></td>+ <td></td>+ <td><p>The row_count is the estimated number of rows of a table. </p></td>+ </tr>++ <tr>+ <td>data_size</td>+ <td><a href="#int64">int64</a></td>+ <td></td>+ <td><p>The data_size is the estimated data size of a table. </p></td>+ </tr><tr>- <td>name</td>- <td><a href="#string">string</a></td>+ <td>index_size</td>+ <td><a href="#int64">int64</a></td><td></td>- <td><p>The schema name. </p></td>+ <td><p>The index_size is the estimated index size of a table. </p></td></tr><tr>- <td>tables</td>- <td><a href="#bytebase.v1.TableCatalog">TableCatalog</a></td>- <td>repeated</td>- <td><p>The tables in the schema. </p></td>+ <td>data_free</td>+ <td><a href="#int64">int64</a></td>+ <td></td>+ <td><p>The data_free is the estimated free data size of a table. </p></td></tr>- </tbody>- </table>------ <h3 id="bytebase.v1.TableCatalog">TableCatalog</h3>- <p>Table metadata within a schema.</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>create_options</td><td><a href="#string">string</a></td><td></td>- <td><p>The table name. </p></td>+ <td><p>The create_options is the create option of a table. </p></td></tr><tr>- <td>columns</td>- <td><a href="#bytebase.v1.TableCatalog.Columns">TableCatalog.Columns</a></td>+ <td>comment</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>Regular table columns. </p></td>+ <td><p>The comment is the comment of a table. </p></td></tr><tr>- <td>object_schema</td>- <td><a href="#bytebase.v1.ObjectSchema">ObjectSchema</a></td>- <td></td>- <td><p>Object schema for JSON/XML columns. </p></td>+ <td>foreign_keys</td>+ <td><a href="#bytebase.v1.ForeignKeyMetadata">ForeignKeyMetadata</a></td>+ <td>repeated</td>+ <td><p>The foreign_keys is the list of foreign keys in a table. </p></td></tr><tr>- <td>classification</td>+ <td>partitions</td>+ <td><a href="#bytebase.v1.TablePartitionMetadata">TablePartitionMetadata</a></td>+ <td>repeated</td>+ <td><p>The partitions is the list of partitions in a table. </p></td>+ </tr>++ <tr>+ <td>check_constraints</td>+ <td><a href="#bytebase.v1.CheckConstraintMetadata">CheckConstraintMetadata</a></td>+ <td>repeated</td>+ <td><p>The check_constraints is the list of check constraints in a table. </p></td>+ </tr>++ <tr>+ <td>owner</td><td><a href="#string">string</a></td><td></td>- <td><p>The data classification level for this table. </p></td>+ <td><p>The owner of the table. </p></td></tr>- </tbody>- </table>------ <h3 id="bytebase.v1.TableCatalog.Columns">TableCatalog.Columns</h3>- <p>Column list for regular tables.</p>--- <table class="field-table">- <thead>- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>- </thead>- <tbody>-<tr>- <td>columns</td>- <td><a href="#bytebase.v1.ColumnCatalog">ColumnCatalog</a></td>+ <td>sorting_keys</td>+ <td><a href="#string">string</a></td><td>repeated</td>- <td><p>The columns in the table. </p></td>+ <td><p>The sorting_keys is a tuple of column names or arbitrary expressions. ClickHouse specific field.+Reference: https://clickhouse.com/docs/en/engines/table-engines/mergetree-family/mergetree#order_by </p></td></tr>- </tbody>- </table>------ <h3 id="bytebase.v1.UpdateDatabaseCatalogRequest">UpdateDatabaseCatalogRequest</h3>- <p>Request message for updating a database catalog.</p>--- <table class="field-table">- <thead>- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>- </thead>- <tbody>-<tr>- <td>catalog</td>- <td><a href="#bytebase.v1.DatabaseCatalog">DatabaseCatalog</a></td>- <td></td>- <td><p>The database catalog to update.--The catalog's `name` field is used to identify the database catalog to update.-Format: instances/{instance}/databases/{database}/catalog </p></td>+ <td>triggers</td>+ <td><a href="#bytebase.v1.TriggerMetadata">TriggerMetadata</a></td>+ <td>repeated</td>+ <td><p>The triggers is the list of triggers associated with the table. </p></td></tr><tr>- <td>allow_missing</td>+ <td>skip_dump</td><td><a href="#bool">bool</a></td><td></td>- <td><p>If set to true, and the database catalog is not found, a new database catalog will be created.-In this situation, `update_mask` is ignored. </p></td>+ <td><p>Whether to skip this table during schema dump operations. </p></td></tr>- </tbody>- </table>-------- <h3 id="bytebase.v1.ObjectSchema.Type">ObjectSchema.Type</h3>- <p>Object schema data types.</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 type.</p></td>- </tr>-- <tr>- <td>STRING</td>- <td>1</td>- <td><p>String type.</p></td>- </tr>-- <tr>- <td>NUMBER</td>- <td>2</td>- <td><p>Number type.</p></td>- </tr>-- <tr>- <td>BOOLEAN</td>- <td>3</td>- <td><p>Boolean type.</p></td>- </tr>-- <tr>- <td>OBJECT</td>- <td>4</td>- <td><p>Object/struct type.</p></td>- </tr>-- <tr>- <td>ARRAY</td>- <td>5</td>- <td><p>Array type.</p></td>- </tr>-- </tbody>- </table>------ <h3 id="bytebase.v1.DatabaseCatalogService">DatabaseCatalogService</h3>- <p>DatabaseCatalogService manages database schema metadata and classification.</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>GetDatabaseCatalog</td>- <td><a href="#bytebase.v1.GetDatabaseCatalogRequest">GetDatabaseCatalogRequest</a></td>- <td><a href="#bytebase.v1.DatabaseCatalog">DatabaseCatalog</a></td>- <td><p>Gets the catalog metadata for a database.-Permissions required: bb.databaseCatalogs.get</p></td>- </tr>-- <tr>- <td>UpdateDatabaseCatalog</td>- <td><a href="#bytebase.v1.UpdateDatabaseCatalogRequest">UpdateDatabaseCatalogRequest</a></td>- <td><a href="#bytebase.v1.DatabaseCatalog">DatabaseCatalog</a></td>- <td><p>Updates catalog metadata such as classifications and labels.-Permissions required: bb.databaseCatalogs.update</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>GetDatabaseCatalog</td>- <td>GET</td>- <td>/v1/{name=instances/*/databases/*/catalog}</td>- <td></td>- </tr>---+ <tr>+ <td>sharding_info</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>https://docs.pingcap.com/tidb/stable/information-schema-tables/ </p></td>+ </tr>- <tr>- <td>UpdateDatabaseCatalog</td>- <td>PATCH</td>- <td>/v1/{catalog.name=instances/*/databases/*/catalog}</td>- <td>catalog</td>- </tr>+ <tr>+ <td>primary_key_type</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>https://docs.pingcap.com/tidb/stable/clustered-indexes/#clustered-indexes+CLUSTERED or NONCLUSTERED. </p></td>+ </tr>-</tbody></table>+---- <div class="file-heading">- <h2 id="v1/database_group_service.proto">v1/database_group_service.proto</h2><a href="#title">Top</a>- </div>- <p></p>+- <h3 id="bytebase.v1.CreateDatabaseGroupRequest">CreateDatabaseGroupRequest</h3>- <p>Request message for creating a database group.</p>+ <h3 id="bytebase.v1.TablePartitionMetadata">TablePartitionMetadata</h3>+ <p>TablePartitionMetadata is the metadata for table partitions.</p><table class="field-table">@@ -11894,36 +11972,78 @@ Permissions required: bb.databaseCatalogs.update</p></td><tbody><tr>- <td>parent</td>+ <td>name</td><td><a href="#string">string</a></td><td></td>- <td><p>The parent resource where this database group will be created.-Format: projects/{project} </p></td>+ <td><p>The name is the name of a table partition. </p></td></tr><tr>- <td>database_group</td>- <td><a href="#bytebase.v1.DatabaseGroup">DatabaseGroup</a></td>+ <td>type</td>+ <td><a href="#bytebase.v1.TablePartitionMetadata.Type">TablePartitionMetadata.Type</a></td><td></td>- <td><p>The database group to create. </p></td>+ <td><p>The type of a table partition. </p></td></tr><tr>- <td>database_group_id</td>+ <td>expression</td><td><a href="#string">string</a></td><td></td>- <td><p>The ID to use for the database group, which will become the final component of-the database group's resource name.--This value should be 4-63 characters, and valid characters-are /[a-z][0-9]-/. </p></td>+ <td><p>The expression is the expression of a table partition.+For PostgreSQL, the expression is the text of {FOR VALUES+partition_bound_spec}, see+https://www.postgresql.org/docs/current/sql-createtable.html. For MySQL,+the expression is the `expr` or `column_list` of the following syntax.+PARTITION BY+ { [LINEAR] HASH(expr)+ | [LINEAR] KEY [ALGORITHM={1 | 2}] (column_list)+ | RANGE{(expr) | COLUMNS(column_list)}+ | LIST{(expr) | COLUMNS(column_list)} }. </p></td></tr><tr>- <td>validate_only</td>- <td><a href="#bool">bool</a></td>+ <td>value</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>If set, validate the create request and preview the full database group response, but do not actually create it. </p></td>+ <td><p>The value is the value of a table partition.+For MySQL, the value is for RANGE and LIST partition types,+- For a RANGE partition, it contains the value set in the partition's+VALUES LESS THAN clause, which can be either an integer or MAXVALUE.+- For a LIST partition, this column contains the values defined in the+partition's VALUES IN clause, which is a list of comma-separated integer+values.+- For others, it's an empty string. </p></td>+ </tr>++ <tr>+ <td>use_default</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The use_default is whether the users use the default partition, it stores+the different value for different database engines. For MySQL, it's [INT]+type, 0 means not use default partition, otherwise, it's equals to number+in syntax [SUB]PARTITION {number}. </p></td>+ </tr>++ <tr>+ <td>subpartitions</td>+ <td><a href="#bytebase.v1.TablePartitionMetadata">TablePartitionMetadata</a></td>+ <td>repeated</td>+ <td><p>The subpartitions is the list of subpartitions in a table partition. </p></td>+ </tr>++ <tr>+ <td>indexes</td>+ <td><a href="#bytebase.v1.IndexMetadata">IndexMetadata</a></td>+ <td>repeated</td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>check_constraints</td>+ <td><a href="#bytebase.v1.CheckConstraintMetadata">CheckConstraintMetadata</a></td>+ <td>repeated</td>+ <td><p> </p></td></tr></tbody>@@ -11933,8 +12053,8 @@ are /[a-z][0-9]-/. </p></td>- <h3 id="bytebase.v1.DatabaseGroup">DatabaseGroup</h3>- <p>A group of databases matched by expressions.</p>+ <h3 id="bytebase.v1.TaskMetadata">TaskMetadata</h3>+ <p></p><table class="field-table">@@ -11947,41 +12067,71 @@ are /[a-z][0-9]-/. </p></td><td>name</td><td><a href="#string">string</a></td><td></td>- <td><p>The name of the database group.-Format: projects/{project}/databaseGroups/{databaseGroup} </p></td>+ <td><p>The name is the name of a task. </p></td></tr><tr>- <td>title</td>+ <td>id</td><td><a href="#string">string</a></td><td></td>- <td><p>The short name used in actual databases specified by users. </p></td>+ <td><p>The id is the snowflake-generated id of a task.+Example: 01ad32a0-1bb6-5e93-0000-000000000001 </p></td></tr><tr>- <td>database_expr</td>- <td><a href="#google.type.Expr">google.type.Expr</a></td>+ <td>owner</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>The condition that is associated with this database group.-The syntax and semantics of CEL are documented at https://github.com/google/cel-spec--Support variables:-resource.environment_id: the environment resource id. Support "==", "!=", "in [XX]", "!(in [xx])" operations.-resource.instance_id: the instance resource id. Support "==", "!=", "in [XX]", "!(in [xx])", "contains", "matches", "startsWith", "endsWith" operations.-resource.database_name: the database name. Support "==", "!=", "in [XX]", "!(in [xx])", "contains", "matches", "startsWith", "endsWith" operations.-resource.database_labels: the database labels. Support map access operations.-All variables should join with "&&" condition.--For example:-resource.environment_id == "test" && resource.database_name.startsWith("sample_")-resource.database_labels["tenant"] == "tenant1" </p></td>+ <td><p>The owner of the task. </p></td></tr><tr>- <td>matched_databases</td>- <td><a href="#bytebase.v1.DatabaseGroup.Database">DatabaseGroup.Database</a></td>+ <td>comment</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The comment of the task. </p></td>+ </tr>++ <tr>+ <td>warehouse</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The warehouse of the task. </p></td>+ </tr>++ <tr>+ <td>schedule</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The schedule interval of the task. </p></td>+ </tr>++ <tr>+ <td>predecessors</td>+ <td><a href="#string">string</a></td><td>repeated</td>- <td><p>The list of databases that match the database group condition. </p></td>+ <td><p>The predecessor tasks of the task. </p></td>+ </tr>++ <tr>+ <td>state</td>+ <td><a href="#bytebase.v1.TaskMetadata.State">TaskMetadata.State</a></td>+ <td></td>+ <td><p>The state of the task. </p></td>+ </tr>++ <tr>+ <td>condition</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The condition of the task. </p></td>+ </tr>++ <tr>+ <td>definition</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The definition of the task. </p></td></tr></tbody>@@ -11991,8 +12141,8 @@ resource.database_labels["tenant"] == "tenant1" </p></td>- <h3 id="bytebase.v1.DatabaseGroup.Database">DatabaseGroup.Database</h3>- <p>A database within a database group.</p>+ <h3 id="bytebase.v1.TessellationConfig">TessellationConfig</h3>+ <p>TessellationConfig defines tessellation parameters for spatial indexes.</p><table class="field-table">@@ -12002,11 +12152,31 @@ resource.database_labels["tenant"] == "tenant1" </p></td><tbody><tr>- <td>name</td>+ <td>scheme</td><td><a href="#string">string</a></td><td></td>- <td><p>The resource name of the database.-Format: instances/{instance}/databases/{database} </p></td>+ <td><p>Tessellation scheme (e.g., "GEOMETRY_GRID", "GEOGRAPHY_GRID", "GEOMETRY_AUTO_GRID") </p></td>+ </tr>++ <tr>+ <td>grid_levels</td>+ <td><a href="#bytebase.v1.GridLevel">GridLevel</a></td>+ <td>repeated</td>+ <td><p>Grid levels and densities for multi-level tessellation </p></td>+ </tr>++ <tr>+ <td>cells_per_object</td>+ <td><a href="#int32">int32</a></td>+ <td></td>+ <td><p>Number of cells per object (1-8192 for SQL Server) </p></td>+ </tr>++ <tr>+ <td>bounding_box</td>+ <td><a href="#bytebase.v1.BoundingBox">BoundingBox</a></td>+ <td></td>+ <td><p>Bounding box for GEOMETRY tessellation (not used for GEOGRAPHY) </p></td></tr></tbody>@@ -12016,8 +12186,8 @@ Format: instances/{instance}/databases/{database} </p></td>- <h3 id="bytebase.v1.DeleteDatabaseGroupRequest">DeleteDatabaseGroupRequest</h3>- <p>Request message for deleting a database group.</p>+ <h3 id="bytebase.v1.TriggerMetadata">TriggerMetadata</h3>+ <p></p><table class="field-table">@@ -12027,11 +12197,67 @@ Format: instances/{instance}/databases/{database} </p></td><tbody><tr>- <td>name</td>- <td><a href="#string">string</a></td>+ <td>name</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The name is the name of the trigger. </p></td>+ </tr>++ <tr>+ <td>event</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The event is the event of the trigger, such as INSERT, UPDATE, DELETE,+TRUNCATE. </p></td>+ </tr>++ <tr>+ <td>timing</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The timing is the timing of the trigger, such as BEFORE, AFTER. </p></td>+ </tr>++ <tr>+ <td>body</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The body is the body of the trigger. </p></td>+ </tr>++ <tr>+ <td>sql_mode</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The SQL mode setting for the trigger. </p></td>+ </tr>++ <tr>+ <td>character_set_client</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The character set used by the client creating the trigger. </p></td>+ </tr>++ <tr>+ <td>collation_connection</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The collation used for the connection when creating the trigger. </p></td>+ </tr>++ <tr>+ <td>comment</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The comment describing the trigger. </p></td>+ </tr>++ <tr>+ <td>skip_dump</td>+ <td><a href="#bool">bool</a></td><td></td>- <td><p>The name of the database group to delete.-Format: projects/{project}/databaseGroups/{databaseGroup} </p></td>+ <td><p>Whether to skip this trigger during schema dump operations. </p></td></tr></tbody>@@ -12041,8 +12267,8 @@ Format: projects/{project}/databaseGroups/{databaseGroup} </p></td>- <h3 id="bytebase.v1.GetDatabaseGroupRequest">GetDatabaseGroupRequest</h3>- <p>Request message for getting a database group.</p>+ <h3 id="bytebase.v1.UpdateDatabaseRequest">UpdateDatabaseRequest</h3>+ <p></p><table class="field-table">@@ -12052,18 +12278,28 @@ Format: projects/{project}/databaseGroups/{databaseGroup} </p></td><tbody><tr>- <td>name</td>- <td><a href="#string">string</a></td>+ <td>database</td>+ <td><a href="#bytebase.v1.Database">Database</a></td><td></td>- <td><p>The name of the database group to retrieve.-Format: projects/{project}/databaseGroups/{databaseGroup} </p></td>+ <td><p>The database to update.++The database's `name` field is used to identify the database to update.+Format: instances/{instance}/databases/{database} </p></td></tr><tr>- <td>view</td>- <td><a href="#bytebase.v1.DatabaseGroupView">DatabaseGroupView</a></td>+ <td>update_mask</td>+ <td><a href="#google.protobuf.FieldMask">google.protobuf.FieldMask</a></td><td></td>- <td><p>The view to return. Defaults to DATABASE_GROUP_VIEW_BASIC. </p></td>+ <td><p>The list of fields to update. </p></td>+ </tr>++ <tr>+ <td>allow_missing</td>+ <td><a href="#bool">bool</a></td>+ <td></td>+ <td><p>If set to true, and the database is not found, a new database will be created.+In this situation, `update_mask` is ignored. </p></td></tr></tbody>@@ -12073,8 +12309,8 @@ Format: projects/{project}/databaseGroups/{databaseGroup} </p></td>- <h3 id="bytebase.v1.ListDatabaseGroupsRequest">ListDatabaseGroupsRequest</h3>- <p>Request message for listing database groups.</p>+ <h3 id="bytebase.v1.ViewMetadata">ViewMetadata</h3>+ <p>ViewMetadata is the metadata for views.</p><table class="field-table">@@ -12084,84 +12320,52 @@ Format: projects/{project}/databaseGroups/{databaseGroup} </p></td><tbody><tr>- <td>parent</td>+ <td>name</td><td><a href="#string">string</a></td><td></td>- <td><p>The parent resource whose database groups are to be listed.-Format: projects/{project} </p></td>+ <td><p>The name is the name of a view. </p></td></tr><tr>- <td>view</td>- <td><a href="#bytebase.v1.DatabaseGroupView">DatabaseGroupView</a></td>+ <td>definition</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>The view to return. Defaults to DATABASE_GROUP_VIEW_BASIC. </p></td>+ <td><p>The definition is the definition of a view. </p></td></tr>- </tbody>- </table>------ <h3 id="bytebase.v1.ListDatabaseGroupsResponse">ListDatabaseGroupsResponse</h3>- <p>Response message for listing database groups.</p>--- <table class="field-table">- <thead>- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>- </thead>- <tbody>+ <tr>+ <td>comment</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The comment is the comment of a view. </p></td>+ </tr><tr>- <td>database_groups</td>- <td><a href="#bytebase.v1.DatabaseGroup">DatabaseGroup</a></td>+ <td>dependency_columns</td>+ <td><a href="#bytebase.v1.DependencyColumn">DependencyColumn</a></td><td>repeated</td>- <td><p>The database groups from the specified request. </p></td>+ <td><p>The dependency_columns is the list of dependency columns of a view. </p></td></tr>- </tbody>- </table>------ <h3 id="bytebase.v1.UpdateDatabaseGroupRequest">UpdateDatabaseGroupRequest</h3>- <p>Request message for updating a database group.</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="#bytebase.v1.DatabaseGroup">DatabaseGroup</a></td>- <td></td>- <td><p>The database group to update.--The database group's `name` field is used to identify the database group to update.-Format: projects/{project}/databaseGroups/{databaseGroup} </p></td>+ <td>columns</td>+ <td><a href="#bytebase.v1.ColumnMetadata">ColumnMetadata</a></td>+ <td>repeated</td>+ <td><p>The columns is the ordered list of columns in a table. </p></td></tr><tr>- <td>update_mask</td>- <td><a href="#google.protobuf.FieldMask">google.protobuf.FieldMask</a></td>- <td></td>- <td><p>The list of fields to update. </p></td>+ <td>triggers</td>+ <td><a href="#bytebase.v1.TriggerMetadata">TriggerMetadata</a></td>+ <td>repeated</td>+ <td><p>The triggers is the list of triggers in a view. </p></td></tr><tr>- <td>allow_missing</td>+ <td>skip_dump</td><td><a href="#bool">bool</a></td><td></td>- <td><p>If set to true, and the database group is not found, a new database group will be created.-In this situation, `update_mask` is ignored. </p></td>+ <td><p> </p></td></tr></tbody>@@ -12173,8 +12377,161 @@ In this situation, `update_mask` is ignored. </p></td>- <h3 id="bytebase.v1.DatabaseGroupView">DatabaseGroupView</h3>- <p>View options for database group responses.</p>+ <h3 id="bytebase.v1.Changelog.Status">Changelog.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>PENDING</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>++ </tbody>+ </table>++ <h3 id="bytebase.v1.ChangelogView">ChangelogView</h3>+ <p></p>+ <table class="enum-table">+ <thead>+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>CHANGELOG_VIEW_UNSPECIFIED</td>+ <td>0</td>+ <td><p>The default / unset value.+The API will default to the BASIC view.</p></td>+ </tr>++ <tr>+ <td>CHANGELOG_VIEW_BASIC</td>+ <td>1</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>CHANGELOG_VIEW_FULL</td>+ <td>2</td>+ <td><p></p></td>+ </tr>++ </tbody>+ </table>++ <h3 id="bytebase.v1.ColumnMetadata.IdentityGeneration">ColumnMetadata.IdentityGeneration</h3>+ <p></p>+ <table class="enum-table">+ <thead>+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>IDENTITY_GENERATION_UNSPECIFIED</td>+ <td>0</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>ALWAYS</td>+ <td>1</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>BY_DEFAULT</td>+ <td>2</td>+ <td><p></p></td>+ </tr>++ </tbody>+ </table>++ <h3 id="bytebase.v1.GenerationMetadata.Type">GenerationMetadata.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></p></td>+ </tr>++ <tr>+ <td>VIRTUAL</td>+ <td>1</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>STORED</td>+ <td>2</td>+ <td><p></p></td>+ </tr>++ </tbody>+ </table>++ <h3 id="bytebase.v1.GetDatabaseSDLSchemaRequest.SDLFormat">GetDatabaseSDLSchemaRequest.SDLFormat</h3>+ <p>SDLFormat specifies the output format for SDL schema.</p>+ <table class="enum-table">+ <thead>+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>SDL_FORMAT_UNSPECIFIED</td>+ <td>0</td>+ <td><p>Unspecified format. Defaults to SINGLE_FILE.</p></td>+ </tr>++ <tr>+ <td>SINGLE_FILE</td>+ <td>1</td>+ <td><p>Single file format: returns the complete SDL schema as a single file.</p></td>+ </tr>++ <tr>+ <td>MULTI_FILE</td>+ <td>2</td>+ <td><p>Multi-file format: returns the SDL schema as a ZIP archive containing+multiple files organized by schema objects (tables, views, functions, etc.).</p></td>+ </tr>++ </tbody>+ </table>++ <h3 id="bytebase.v1.GetSchemaStringRequest.ObjectType">GetSchemaStringRequest.ObjectType</h3>+ <p></p><table class="enum-table"><thead><tr><td>Name</td><td>Number</td><td>Description</td></tr>@@ -12182,318 +12539,249 @@ In this situation, `update_mask` is ignored. </p></td><tbody><tr>- <td>DATABASE_GROUP_VIEW_UNSPECIFIED</td>+ <td>OBJECT_TYPE_UNSPECIFIED</td><td>0</td>- <td><p>The default / unset value.-The API will default to the BASIC view.</p></td>+ <td><p></p></td></tr><tr>- <td>DATABASE_GROUP_VIEW_BASIC</td>+ <td>DATABASE</td><td>1</td>- <td><p>Include basic information about the database group, but exclude the list of matched databases and unmatched databases.</p></td>+ <td><p></p></td></tr><tr>- <td>DATABASE_GROUP_VIEW_FULL</td>+ <td>SCHEMA</td><td>2</td>- <td><p>Include everything.</p></td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>TABLE</td>+ <td>3</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>VIEW</td>+ <td>4</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>MATERIALIZED_VIEW</td>+ <td>5</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>FUNCTION</td>+ <td>6</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>PROCEDURE</td>+ <td>7</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>SEQUENCE</td>+ <td>8</td>+ <td><p></p></td></tr></tbody></table>---+ <h3 id="bytebase.v1.StreamMetadata.Mode">StreamMetadata.Mode</h3>+ <p></p>+ <table class="enum-table">+ <thead>+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>MODE_UNSPECIFIED</td>+ <td>0</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>DEFAULT</td>+ <td>1</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>APPEND_ONLY</td>+ <td>2</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>INSERT_ONLY</td>+ <td>3</td>+ <td><p></p></td>+ </tr>++ </tbody>+ </table>- <h3 id="bytebase.v1.DatabaseGroupService">DatabaseGroupService</h3>- <p>DatabaseGroupService manages database groups for organizing databases by criteria.</p>+ <h3 id="bytebase.v1.StreamMetadata.Type">StreamMetadata.Type</h3>+ <p></p><table class="enum-table"><thead>- <tr><td>Method Name</td><td>Request Type</td><td>Response Type</td><td>Description</td></tr>+ <tr><td>Name</td><td>Number</td><td>Description</td></tr></thead><tbody><tr>- <td>ListDatabaseGroups</td>- <td><a href="#bytebase.v1.ListDatabaseGroupsRequest">ListDatabaseGroupsRequest</a></td>- <td><a href="#bytebase.v1.ListDatabaseGroupsResponse">ListDatabaseGroupsResponse</a></td>- <td><p>Lists database groups in a project.-Permissions required: bb.databaseGroups.list</p></td>+ <td>TYPE_UNSPECIFIED</td>+ <td>0</td>+ <td><p></p></td></tr><tr>- <td>GetDatabaseGroup</td>- <td><a href="#bytebase.v1.GetDatabaseGroupRequest">GetDatabaseGroupRequest</a></td>- <td><a href="#bytebase.v1.DatabaseGroup">DatabaseGroup</a></td>- <td><p>Gets a database group by name.-Permissions required: bb.databaseGroups.get</p></td>+ <td>DELTA</td>+ <td>1</td>+ <td><p></p></td></tr>+ </tbody>+ </table>++ <h3 id="bytebase.v1.SyncStatus">SyncStatus</h3>+ <p>SyncStatus is the status of the database sync operation.</p>+ <table class="enum-table">+ <thead>+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>+ </thead>+ <tbody>+<tr>- <td>CreateDatabaseGroup</td>- <td><a href="#bytebase.v1.CreateDatabaseGroupRequest">CreateDatabaseGroupRequest</a></td>- <td><a href="#bytebase.v1.DatabaseGroup">DatabaseGroup</a></td>- <td><p>Creates a new database group.-Permissions required: bb.databaseGroups.create</p></td>+ <td>SYNC_STATUS_UNSPECIFIED</td>+ <td>0</td>+ <td><p></p></td></tr><tr>- <td>UpdateDatabaseGroup</td>- <td><a href="#bytebase.v1.UpdateDatabaseGroupRequest">UpdateDatabaseGroupRequest</a></td>- <td><a href="#bytebase.v1.DatabaseGroup">DatabaseGroup</a></td>- <td><p>Updates a database group.-Permissions required: bb.databaseGroups.update-When allow_missing=true, also requires: bb.databaseGroups.create</p></td>+ <td>OK</td>+ <td>1</td>+ <td><p>The database was synced successfully.</p></td></tr><tr>- <td>DeleteDatabaseGroup</td>- <td><a href="#bytebase.v1.DeleteDatabaseGroupRequest">DeleteDatabaseGroupRequest</a></td>- <td><a href="#google.protobuf.Empty">.google.protobuf.Empty</a></td>- <td><p>Deletes a database group.-Permissions required: bb.databaseGroups.delete</p></td>+ <td>FAILED</td>+ <td>2</td>+ <td><p>The database sync failed.</p></td></tr></tbody></table>----- <h4>Methods with HTTP bindings</h4>- <table>- <thead>++ <h3 id="bytebase.v1.TablePartitionMetadata.Type">TablePartitionMetadata.Type</h3>+ <p>Type is the type of a table partition, some database engines may not</p><p>support all types. Only avilable for the following database engines now:</p><p>MySQL: RANGE, RANGE COLUMNS, LIST, LIST COLUMNS, HASH, LINEAR HASH, KEY,</p><p>LINEAR_KEY</p><p>(https://dev.mysql.com/doc/refman/8.0/en/partitioning-types.html) TiDB:</p><p>RANGE, RANGE COLUMNS, LIST, LIST COLUMNS, HASH, KEY PostgreSQL: RANGE,</p><p>LIST, HASH (https://www.postgresql.org/docs/current/ddl-partitioning.html)</p>+ <table class="enum-table">+ <thead>+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>+ </thead>+ <tbody>+<tr>- <td>Method Name</td>- <td>Method</td>- <td>Pattern</td>- <td>Body</td>+ <td>TYPE_UNSPECIFIED</td>+ <td>0</td>+ <td><p></p></td></tr>- </thead>- <tbody>--<tr>- <td>ListDatabaseGroups</td>- <td>GET</td>- <td>/v1/{parent=projects/*}/databaseGroups</td>- <td></td>+ <td>RANGE</td>+ <td>1</td>+ <td><p></p></td></tr>---<tr>- <td>GetDatabaseGroup</td>- <td>GET</td>- <td>/v1/{name=projects/*/databaseGroups/*}</td>- <td></td>+ <td>RANGE_COLUMNS</td>+ <td>2</td>+ <td><p></p></td></tr>---<tr>- <td>CreateDatabaseGroup</td>- <td>POST</td>- <td>/v1/{parent=projects/*}/databaseGroups</td>- <td>database_group</td>+ <td>LIST</td>+ <td>3</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>LIST_COLUMNS</td>+ <td>4</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>HASH</td>+ <td>5</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>LINEAR_HASH</td>+ <td>6</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>KEY</td>+ <td>7</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>LINEAR_KEY</td>+ <td>8</td>+ <td><p></p></td>+ </tr>++ </tbody>+ </table>++ <h3 id="bytebase.v1.TaskMetadata.State">TaskMetadata.State</h3>+ <p></p>+ <table class="enum-table">+ <thead>+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>STATE_UNSPECIFIED</td>+ <td>0</td>+ <td><p></p></td></tr>---<tr>- <td>UpdateDatabaseGroup</td>- <td>PATCH</td>- <td>/v1/{database_group.name=projects/*/databaseGroups/*}</td>- <td>database_group</td>+ <td>STARTED</td>+ <td>1</td>+ <td><p></p></td></tr>---<tr>- <td>DeleteDatabaseGroup</td>- <td>DELETE</td>- <td>/v1/{name=projects/*/databaseGroups/*}</td>- <td></td>+ <td>SUSPENDED</td>+ <td>2</td>+ <td><p></p></td></tr>-- </tbody>- </table>----- <div class="file-heading">- <h2 id="v1/instance_role_service.proto">v1/instance_role_service.proto</h2><a href="#title">Top</a>- </div>- <p></p>--- <h3 id="bytebase.v1.InstanceRole">InstanceRole</h3>- <p>InstanceRole is the API message for instance role.</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 role.-Format: instances/{instance}/roles/{role}-The role name is the unique name for the role. </p></td>- </tr>-- <tr>- <td>role_name</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The role name. It's unique within the instance. </p></td>- </tr>-- <tr>- <td>password</td>- <td><a href="#string">string</a></td>- <td>optional</td>- <td><p>The role password. </p></td>- </tr>-- <tr>- <td>connection_limit</td>- <td><a href="#int32">int32</a></td>- <td>optional</td>- <td><p>The connection count limit for this role. </p></td>- </tr>-- <tr>- <td>valid_until</td>- <td><a href="#string">string</a></td>- <td>optional</td>- <td><p>The expiration for the role's password. </p></td>- </tr>-- <tr>- <td>attribute</td>- <td><a href="#string">string</a></td>- <td>optional</td>- <td><p>The role attribute.-For PostgreSQL, it contains super_user, no_inherit, create_role, create_db, can_login, replication, and bypass_rls. Docs: https://www.postgresql.org/docs/current/role-attributes.html-For MySQL, it's the global privileges as GRANT statements, which means it only contains "GRANT ... ON *.* TO ...". Docs: https://dev.mysql.com/doc/refman/8.0/en/grant.html </p></td>- </tr>-- </tbody>- </table>------ <h3 id="bytebase.v1.ListInstanceRolesRequest">ListInstanceRolesRequest</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 roles.-Format: instances/{instance} </p></td>- </tr>-- <tr>- <td>page_size</td>- <td><a href="#int32">int32</a></td>- <td></td>- <td><p>Not used.-The maximum number of roles to return. The service may return fewer than-this value.-If unspecified, at most 10 roles 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>Not used.-A page token, received from a previous `ListInstanceRoles` call.-Provide this to retrieve the subsequent page.--When paginating, all other parameters provided to `ListInstanceRoles` must match-the call that provided the page token. </p></td>- </tr>-- <tr>- <td>refresh</td>- <td><a href="#bool">bool</a></td>- <td></td>- <td><p>Refresh will refresh and return the latest data. </p></td>- </tr>-- </tbody>- </table>------ <h3 id="bytebase.v1.ListInstanceRolesResponse">ListInstanceRolesResponse</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>roles</td>- <td><a href="#bytebase.v1.InstanceRole">InstanceRole</a></td>- <td>repeated</td>- <td><p>The roles 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>------+ </tbody>+ </table>- <h3 id="bytebase.v1.InstanceRoleService">InstanceRoleService</h3>- <p>InstanceRoleService manages database roles within instances.</p>+ <h3 id="bytebase.v1.DatabaseService">DatabaseService</h3>+ <p>DatabaseService manages databases and their schemas.</p><table class="enum-table"><thead><tr><td>Method Name</td><td>Request Type</td><td>Response Type</td><td>Description</td></tr>@@ -12501,11 +12789,115 @@ If this field is omitted, there are no subsequent pages. </p></td><tbody><tr>- <td>ListInstanceRoles</td>- <td><a href="#bytebase.v1.ListInstanceRolesRequest">ListInstanceRolesRequest</a></td>- <td><a href="#bytebase.v1.ListInstanceRolesResponse">ListInstanceRolesResponse</a></td>- <td><p>Lists all database roles in an instance.-Permissions required: bb.instanceRoles.list</p></td>+ <td>GetDatabase</td>+ <td><a href="#bytebase.v1.GetDatabaseRequest">GetDatabaseRequest</a></td>+ <td><a href="#bytebase.v1.Database">Database</a></td>+ <td><p>Retrieves a database by name.+Permissions required: bb.databases.get</p></td>+ </tr>++ <tr>+ <td>BatchGetDatabases</td>+ <td><a href="#bytebase.v1.BatchGetDatabasesRequest">BatchGetDatabasesRequest</a></td>+ <td><a href="#bytebase.v1.BatchGetDatabasesResponse">BatchGetDatabasesResponse</a></td>+ <td><p>Retrieves multiple databases by their names.+Permissions required: bb.databases.get</p></td>+ </tr>++ <tr>+ <td>ListDatabases</td>+ <td><a href="#bytebase.v1.ListDatabasesRequest">ListDatabasesRequest</a></td>+ <td><a href="#bytebase.v1.ListDatabasesResponse">ListDatabasesResponse</a></td>+ <td><p>Lists databases in a project, instance, or workspace.+Permissions required: bb.projects.get (for project parent), bb.databases.list (for workspace parent), or bb.instances.get (for instance parent)</p></td>+ </tr>++ <tr>+ <td>UpdateDatabase</td>+ <td><a href="#bytebase.v1.UpdateDatabaseRequest">UpdateDatabaseRequest</a></td>+ <td><a href="#bytebase.v1.Database">Database</a></td>+ <td><p>Updates database properties such as labels and project assignment.+Permissions required: bb.databases.update</p></td>+ </tr>++ <tr>+ <td>BatchUpdateDatabases</td>+ <td><a href="#bytebase.v1.BatchUpdateDatabasesRequest">BatchUpdateDatabasesRequest</a></td>+ <td><a href="#bytebase.v1.BatchUpdateDatabasesResponse">BatchUpdateDatabasesResponse</a></td>+ <td><p>Updates multiple databases in a single batch operation.+Permissions required: bb.databases.update</p></td>+ </tr>++ <tr>+ <td>SyncDatabase</td>+ <td><a href="#bytebase.v1.SyncDatabaseRequest">SyncDatabaseRequest</a></td>+ <td><a href="#bytebase.v1.SyncDatabaseResponse">SyncDatabaseResponse</a></td>+ <td><p>Synchronizes database schema from the instance.+Permissions required: bb.databases.sync</p></td>+ </tr>++ <tr>+ <td>BatchSyncDatabases</td>+ <td><a href="#bytebase.v1.BatchSyncDatabasesRequest">BatchSyncDatabasesRequest</a></td>+ <td><a href="#bytebase.v1.BatchSyncDatabasesResponse">BatchSyncDatabasesResponse</a></td>+ <td><p>Synchronizes multiple databases in a single batch operation.+Permissions required: bb.databases.sync</p></td>+ </tr>++ <tr>+ <td>GetDatabaseMetadata</td>+ <td><a href="#bytebase.v1.GetDatabaseMetadataRequest">GetDatabaseMetadataRequest</a></td>+ <td><a href="#bytebase.v1.DatabaseMetadata">DatabaseMetadata</a></td>+ <td><p>Retrieves database metadata including tables, columns, and indexes.+Permissions required: bb.databases.getSchema</p></td>+ </tr>++ <tr>+ <td>GetDatabaseSchema</td>+ <td><a href="#bytebase.v1.GetDatabaseSchemaRequest">GetDatabaseSchemaRequest</a></td>+ <td><a href="#bytebase.v1.DatabaseSchema">DatabaseSchema</a></td>+ <td><p>Retrieves database schema as DDL statements.+Permissions required: bb.databases.getSchema</p></td>+ </tr>++ <tr>+ <td>GetDatabaseSDLSchema</td>+ <td><a href="#bytebase.v1.GetDatabaseSDLSchemaRequest">GetDatabaseSDLSchemaRequest</a></td>+ <td><a href="#bytebase.v1.DatabaseSDLSchema">DatabaseSDLSchema</a></td>+ <td><p>Retrieves database schema in SDL (Schema Definition Language) format.+Permissions required: bb.databases.getSchema</p></td>+ </tr>++ <tr>+ <td>DiffSchema</td>+ <td><a href="#bytebase.v1.DiffSchemaRequest">DiffSchemaRequest</a></td>+ <td><a href="#bytebase.v1.DiffSchemaResponse">DiffSchemaResponse</a></td>+ <td><p>Compares and generates migration statements between two schemas.+Permissions required: bb.databases.get</p></td>+ </tr>++ <tr>+ <td>ListChangelogs</td>+ <td><a href="#bytebase.v1.ListChangelogsRequest">ListChangelogsRequest</a></td>+ <td><a href="#bytebase.v1.ListChangelogsResponse">ListChangelogsResponse</a></td>+ <td><p>Lists migration history for a database.+Permissions required: bb.changelogs.list</p></td>+ </tr>++ <tr>+ <td>GetChangelog</td>+ <td><a href="#bytebase.v1.GetChangelogRequest">GetChangelogRequest</a></td>+ <td><a href="#bytebase.v1.Changelog">Changelog</a></td>+ <td><p>Retrieves a specific changelog entry.+Permissions required: bb.changelogs.get</p></td>+ </tr>++ <tr>+ <td>GetSchemaString</td>+ <td><a href="#bytebase.v1.GetSchemaStringRequest">GetSchemaStringRequest</a></td>+ <td><a href="#bytebase.v1.GetSchemaStringResponse">GetSchemaStringResponse</a></td>+ <td><p>Generates schema DDL for a database object.+Permissions required: bb.databases.getSchema</p></td></tr></tbody>@@ -12529,98 +12921,184 @@ Permissions required: bb.instanceRoles.list</p></td><tr>- <td>ListInstanceRoles</td>+ <td>GetDatabase</td><td>GET</td>- <td>/v1/{parent=instances/*}/roles</td>+ <td>/v1/{name=instances/*/databases/*}</td><td></td></tr>- </tbody>- </table>----- <div class="file-heading">- <h2 id="v1/instance_service.proto">v1/instance_service.proto</h2><a href="#title">Top</a>- </div>- <p></p>--- <h3 id="bytebase.v1.AddDataSourceRequest">AddDataSourceRequest</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 instance to add a data source to.-Format: instances/{instance} </p></td>- </tr>- <tr>- <td>data_source</td>- <td><a href="#bytebase.v1.DataSource">DataSource</a></td>- <td></td>- <td><p>Identified by data source ID.-Only READ_ONLY data source can be added. </p></td>- </tr>+ <tr>+ <td>BatchGetDatabases</td>+ <td>GET</td>+ <td>/v1/{parent=projects/*}/databases:batchGet</td>+ <td></td>+ </tr>- <tr>- <td>validate_only</td>- <td><a href="#bool">bool</a></td>- <td></td>- <td><p>Validate only also tests the data source connection. </p></td>- </tr>+ <tr>+ <td>BatchGetDatabases</td>+ <td>GET</td>+ <td>/v1/{parent=instances/*}/databases:batchGet</td>+ <td></td>+ </tr>- </tbody>- </table>------ <h3 id="bytebase.v1.BatchSyncInstancesRequest">BatchSyncInstancesRequest</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>ListDatabases</td>+ <td>GET</td>+ <td>/v1/{parent=projects/*}/databases</td>+ <td></td>+ </tr>++ <tr>+ <td>ListDatabases</td>+ <td>GET</td>+ <td>/v1/{parent=instances/*}/databases</td>+ <td></td>+ </tr>++ <tr>+ <td>ListDatabases</td>+ <td>GET</td>+ <td>/v1/{parent=workspaces/*}/databases</td>+ <td></td>+ </tr>+++++ <tr>+ <td>UpdateDatabase</td>+ <td>PATCH</td>+ <td>/v1/{database.name=instances/*/databases/*}</td>+ <td>database</td>+ </tr>+++++ <tr>+ <td>BatchUpdateDatabases</td>+ <td>POST</td>+ <td>/v1/{parent=instances/*}/databases:batchUpdate</td>+ <td>*</td>+ </tr>+++++ <tr>+ <td>SyncDatabase</td>+ <td>POST</td>+ <td>/v1/{name=instances/*/databases/*}:sync</td>+ <td>*</td>+ </tr>+++++ <tr>+ <td>BatchSyncDatabases</td>+ <td>POST</td>+ <td>/v1/{parent=instances/*}/databases:batchSync</td>+ <td>*</td>+ </tr>+++++ <tr>+ <td>GetDatabaseMetadata</td>+ <td>GET</td>+ <td>/v1/{name=instances/*/databases/*/metadata}</td>+ <td></td>+ </tr>+++++ <tr>+ <td>GetDatabaseSchema</td>+ <td>GET</td>+ <td>/v1/{name=instances/*/databases/*/schema}</td>+ <td></td>+ </tr>+++++ <tr>+ <td>GetDatabaseSDLSchema</td>+ <td>GET</td>+ <td>/v1/{name=instances/*/databases/*/sdlSchema}</td>+ <td></td>+ </tr>+++++ <tr>+ <td>DiffSchema</td>+ <td>POST</td>+ <td>/v1/{name=instances/*/databases/*}:diffSchema</td>+ <td>*</td>+ </tr>++ <tr>+ <td>DiffSchema</td>+ <td>POST</td>+ <td>/v1/{name=instances/*/databases/*/changelogs/*}:diffSchema</td>+ <td>*</td>+ </tr>+++++ <tr>+ <td>ListChangelogs</td>+ <td>GET</td>+ <td>/v1/{parent=instances/*/databases/*}/changelogs</td>+ <td></td>+ </tr>+++++ <tr>+ <td>GetChangelog</td>+ <td>GET</td>+ <td>/v1/{name=instances/*/databases/*/changelogs/*}</td>+ <td></td>+ </tr>- <tr>- <td>requests</td>- <td><a href="#bytebase.v1.SyncInstanceRequest">SyncInstanceRequest</a></td>- <td>repeated</td>- <td><p>The request message specifying the instances to sync.-A maximum of 1000 instances can be synced in a batch. </p></td>- </tr>++++ <tr>+ <td>GetSchemaString</td>+ <td>GET</td>+ <td>/v1/{name=instances/*/databases/*/schemaString}</td>+ <td></td>+ </tr>+</tbody></table>--+- <h3 id="bytebase.v1.BatchSyncInstancesResponse">BatchSyncInstancesResponse</h3>- <p></p>--+ <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.BatchUpdateInstancesRequest">BatchUpdateInstancesRequest</h3>+ <h3 id="bytebase.v1.AICompletionRequest">AICompletionRequest</h3><p></p>@@ -12631,10 +13109,10 @@ A maximum of 1000 instances can be synced in a batch. </p></td><tbody><tr>- <td>requests</td>- <td><a href="#bytebase.v1.UpdateInstanceRequest">UpdateInstanceRequest</a></td>+ <td>messages</td>+ <td><a href="#bytebase.v1.AICompletionRequest.Message">AICompletionRequest.Message</a></td><td>repeated</td>- <td><p>The request message specifying the resources to update. </p></td>+ <td><p> </p></td></tr></tbody>@@ -12644,7 +13122,7 @@ A maximum of 1000 instances can be synced in a batch. </p></td>- <h3 id="bytebase.v1.BatchUpdateInstancesResponse">BatchUpdateInstancesResponse</h3>+ <h3 id="bytebase.v1.AICompletionRequest.Message">AICompletionRequest.Message</h3><p></p>@@ -12655,9 +13133,16 @@ A maximum of 1000 instances can be synced in a batch. </p></td><tbody><tr>- <td>instances</td>- <td><a href="#bytebase.v1.Instance">Instance</a></td>- <td>repeated</td>+ <td>role</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>@@ -12668,7 +13153,7 @@ A maximum of 1000 instances can be synced in a batch. </p></td>- <h3 id="bytebase.v1.CreateInstanceRequest">CreateInstanceRequest</h3>+ <h3 id="bytebase.v1.AICompletionResponse">AICompletionResponse</h3><p></p>@@ -12679,28 +13164,11 @@ A maximum of 1000 instances can be synced in a batch. </p></td><tbody><tr>- <td>instance</td>- <td><a href="#bytebase.v1.Instance">Instance</a></td>- <td></td>- <td><p>The instance to create. </p></td>- </tr>-- <tr>- <td>instance_id</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The ID to use for the instance, which will become the final component of-the instance's resource name.--This value should be 4-63 characters, and valid characters-are /[a-z][0-9]-/. </p></td>- </tr>-- <tr>- <td>validate_only</td>- <td><a href="#bool">bool</a></td>- <td></td>- <td><p>Validate only also tests the data source connection. </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>@@ -12710,368 +13178,277 @@ are /[a-z][0-9]-/. </p></td>- <h3 id="bytebase.v1.DataSource">DataSource</h3>+ <h3 id="bytebase.v1.AICompletionResponse.Candidate">AICompletionResponse.Candidate</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>id</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The unique identifier for this data source. </p></td>- </tr>-- <tr>- <td>type</td>- <td><a href="#bytebase.v1.DataSourceType">DataSourceType</a></td>- <td></td>- <td><p>The type of data source (ADMIN or READ_ONLY). </p></td>- </tr>-- <tr>- <td>username</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The username for database authentication. </p></td>- </tr>-- <tr>- <td>password</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The password for database authentication. </p></td>- </tr>-- <tr>- <td>use_ssl</td>- <td><a href="#bool">bool</a></td>- <td></td>- <td><p>Use SSL to connect to the data source. By default, we use system default SSL configuration. </p></td>- </tr>-- <tr>- <td>ssl_ca</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The SSL certificate authority certificate. </p></td>- </tr>-- <tr>- <td>ssl_cert</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The SSL client certificate. </p></td>- </tr>-- <tr>- <td>ssl_key</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The SSL client private key. </p></td>- </tr>-- <tr>- <td>ssl_ca_path</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The local filesystem path to the SSL certificate authority certificate. </p></td>- </tr>-- <tr>- <td>ssl_cert_path</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The local filesystem path to the SSL client certificate. </p></td>- </tr>-- <tr>- <td>ssl_key_path</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The local filesystem path to the SSL client private key. </p></td>- </tr>-- <tr>- <td>ssl_ca_set</td>- <td><a href="#bool">bool</a></td>- <td></td>- <td><p>Whether an SSL certificate authority certificate has been configured. </p></td>- </tr>-- <tr>- <td>ssl_cert_set</td>- <td><a href="#bool">bool</a></td>- <td></td>- <td><p>Whether an SSL client certificate has been configured. </p></td>- </tr>-- <tr>- <td>ssl_key_set</td>- <td><a href="#bool">bool</a></td>- <td></td>- <td><p>Whether an SSL client private key has been configured. </p></td>- </tr>-- <tr>- <td>ssl_ca_path_set</td>- <td><a href="#bool">bool</a></td>- <td></td>- <td><p>Whether an SSL certificate authority path has been configured. </p></td>- </tr>-- <tr>- <td>ssl_cert_path_set</td>- <td><a href="#bool">bool</a></td>- <td></td>- <td><p>Whether an SSL client certificate path has been configured. </p></td>- </tr>-- <tr>- <td>ssl_key_path_set</td>- <td><a href="#bool">bool</a></td>- <td></td>- <td><p>Whether an SSL client private key path has been configured. </p></td>- </tr>-- <tr>- <td>verify_tls_certificate</td>- <td><a href="#bool">bool</a></td>- <td></td>- <td><p>verify_tls_certificate enables TLS certificate verification for SSL connections.-Default is false (no verification) for backward compatibility.-Set to true for secure connections (recommended for production).-Only set to false for development or when certificates cannot be properly-validated (e.g., self-signed certs, VPN environments). </p></td>- </tr>-- <tr>- <td>host</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The hostname or IP address of the database server. </p></td>- </tr>-- <tr>- <td>port</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The port number of the database server. </p></td>- </tr>-- <tr>- <td>database</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The name of the database to connect to. </p></td>- </tr>-- <tr>- <td>srv</td>- <td><a href="#bool">bool</a></td>- <td></td>- <td><p>srv, authentication_database and replica_set are used for MongoDB.-srv is a boolean flag that indicates whether the host is a DNS SRV record. </p></td>- </tr>-- <tr>- <td>authentication_database</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>authentication_database is the database name to authenticate against, which stores the user credentials. </p></td>- </tr>+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>+ </thead>+ <tbody><tr>- <td>replica_set</td>- <td><a href="#string">string</a></td>+ <td>content</td>+ <td><a href="#bytebase.v1.AICompletionResponse.Candidate.Content">AICompletionResponse.Candidate.Content</a></td><td></td>- <td><p>replica_set is used for MongoDB replica set. </p></td>+ <td><p> </p></td></tr>+ </tbody>+ </table>++++++ <h3 id="bytebase.v1.AICompletionResponse.Candidate.Content">AICompletionResponse.Candidate.Content</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>sid</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>sid and service_name are used for Oracle. </p></td>+ <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>+ </table>++++++ <h3 id="bytebase.v1.AICompletionResponse.Candidate.Content.Part">AICompletionResponse.Candidate.Content.Part</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>service_name</td>+ <td>text</td><td><a href="#string">string</a></td><td></td><td><p> </p></td></tr>- <tr>- <td>ssh_host</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>Connection over SSH.-The hostname of the SSH server agent.-Required. </p></td>- </tr>+ </tbody>+ </table>++++++ <h3 id="bytebase.v1.AdminExecuteRequest">AdminExecuteRequest</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>ssh_port</td>+ <td>name</td><td><a href="#string">string</a></td><td></td>- <td><p>The port of the SSH server agent. It's 22 typically.-Required. </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>ssh_user</td>+ <td>statement</td><td><a href="#string">string</a></td><td></td>- <td><p>The user to login the server.-Required. </p></td>+ <td><p>The SQL statement to execute. </p></td></tr><tr>- <td>ssh_password</td>- <td><a href="#string">string</a></td>+ <td>limit</td>+ <td><a href="#int32">int32</a></td><td></td>- <td><p>The password to login the server. If it's empty string, no password is required. </p></td>+ <td><p>The maximum number of rows to return. </p></td></tr><tr>- <td>ssh_private_key</td>+ <td>schema</td><td><a href="#string">string</a></td>- <td></td>- <td><p>The private key to login the server. If it's empty string, we will use the system default private key from os.Getenv("SSH_AUTH_SOCK"). </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>authentication_private_key</td>+ <td>container</td><td><a href="#string">string</a></td>- <td></td>- <td><p>PKCS#8 private key in PEM format. If it's empty string, no private key is required.-Used for authentication when connecting to the data source. </p></td>+ <td>optional</td>+ <td><p>Container is the container name to execute the query against, used for+CosmosDB only. </p></td></tr>- <tr>- <td>authentication_private_key_passphrase</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>Passphrase for the encrypted PKCS#8 private key. Only used when the private key is encrypted. </p></td>- </tr>+ </tbody>+ </table>++++++ <h3 id="bytebase.v1.AdminExecuteResponse">AdminExecuteResponse</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>external_secret</td>- <td><a href="#bytebase.v1.DataSourceExternalSecret">DataSourceExternalSecret</a></td>- <td></td>- <td><p> </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>- <tr>- <td>authentication_type</td>- <td><a href="#bytebase.v1.DataSource.AuthenticationType">DataSource.AuthenticationType</a></td>- <td></td>- <td><p> </p></td>- </tr>+ </tbody>+ </table>++++++ <h3 id="bytebase.v1.Advice">Advice</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>azure_credential</td>- <td><a href="#bytebase.v1.DataSource.AzureCredential">DataSource.AzureCredential</a></td>+ <td>status</td>+ <td><a href="#bytebase.v1.Advice.Level">Advice.Level</a></td><td></td>- <td><p> </p></td>+ <td><p>The advice level. </p></td></tr><tr>- <td>aws_credential</td>- <td><a href="#bytebase.v1.DataSource.AWSCredential">DataSource.AWSCredential</a></td>+ <td>code</td>+ <td><a href="#int32">int32</a></td><td></td>- <td><p> </p></td>+ <td><p>The advice code. </p></td></tr><tr>- <td>gcp_credential</td>- <td><a href="#bytebase.v1.DataSource.GCPCredential">DataSource.GCPCredential</a></td>+ <td>title</td>+ <td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>The advice title. </p></td></tr><tr>- <td>sasl_config</td>- <td><a href="#bytebase.v1.SASLConfig">SASLConfig</a></td>+ <td>content</td>+ <td><a href="#string">string</a></td><td></td>- <td><p> </p></td>- </tr>-- <tr>- <td>additional_addresses</td>- <td><a href="#bytebase.v1.DataSource.Address">DataSource.Address</a></td>- <td>repeated</td>- <td><p>additional_addresses is used for MongoDB replica set. </p></td>+ <td><p>The advice content. </p></td></tr><tr>- <td>direct_connection</td>- <td><a href="#bool">bool</a></td>+ <td>start_position</td>+ <td><a href="#bytebase.v1.Position">Position</a></td><td></td>- <td><p>direct_connection is used for MongoDB to dispatch all the operations to the node specified in the connection string. </p></td>+ <td><p>The start_position is inclusive and the end_position is exclusive.+TODO: use range instead </p></td></tr><tr>- <td>region</td>- <td><a href="#string">string</a></td>+ <td>end_position</td>+ <td><a href="#bytebase.v1.Position">Position</a></td><td></td>- <td><p>region is the location of where the DB is, works for AWS RDS. For example, us-east-1. </p></td>+ <td><p> </p></td></tr><tr>- <td>warehouse_id</td>- <td><a href="#string">string</a></td>+ <td>rule_type</td>+ <td><a href="#bytebase.v1.Advice.RuleType">Advice.RuleType</a></td><td></td>- <td><p>warehouse_id is used by Databricks. </p></td>+ <td><p>The type of linting rule that generated this advice. </p></td></tr>- <tr>- <td>master_name</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>master_name is the master name used by connecting redis-master via redis sentinel. </p></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>master_username</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>master_username and master_password are master credentials used by redis sentinel mode. </p></td>+ <td><p>The metadata of the source schema. </p></td></tr><tr>- <td>master_password</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> </p></td>+ <td><p>The metadata of the target schema. </p></td></tr><tr>- <td>redis_type</td>- <td><a href="#bytebase.v1.DataSource.RedisType">DataSource.RedisType</a></td>+ <td>engine</td>+ <td><a href="#bytebase.v1.Engine">Engine</a></td><td></td>- <td><p> </p></td>+ <td><p>The database engine of the schema. </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>cluster</td>+ <td>diff</td><td><a href="#string">string</a></td><td></td>- <td><p>Cluster is the cluster name for the data source. Used by CockroachDB. </p></td>- </tr>-- <tr>- <td>extra_connection_parameters</td>- <td><a href="#bytebase.v1.DataSource.ExtraConnectionParametersEntry">DataSource.ExtraConnectionParametersEntry</a></td>- <td>repeated</td>- <td><p>Extra connection parameters for the database connection.-For PostgreSQL HA, this can be used to set target_session_attrs=read-write </p></td>+ <td><p>The diff of the metadata. </p></td></tr></tbody>@@ -13081,7 +13458,7 @@ For PostgreSQL HA, this can be used to set target_session_attrs=read-write </p><- <h3 id="bytebase.v1.DataSource.AWSCredential">DataSource.AWSCredential</h3>+ <h3 id="bytebase.v1.ExportRequest">ExportRequest</h3><p></p>@@ -13092,40 +13469,69 @@ For PostgreSQL HA, this can be used to set target_session_attrs=read-write </p><<tbody><tr>- <td>access_key_id</td>+ <td>name</td><td><a href="#string">string</a></td><td></td>- <td><p> </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}/plans/{plan}/rollout+Format: projects/{project}/plans/{plan}/rollout/stages/{stage} </p></td></tr><tr>- <td>secret_access_key</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>session_token</td>- <td><a href="#string">string</a></td>+ <td>limit</td>+ <td><a href="#int32">int32</a></td><td></td>- <td><p> </p></td>+ <td><p>The maximum number of rows to return. </p></td></tr><tr>- <td>role_arn</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>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>ARN of IAM role to assume for cross-account access.-See: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html </p></td>+ <td><p>The zip password provide by users. </p></td></tr><tr>- <td>external_id</td>+ <td>data_source_id</td><td><a href="#string">string</a></td><td></td>- <td><p>Optional external ID for additional security when assuming role.-See: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-user_externalid.html </p></td>+ <td><p>The id of data source.+If omitted, Export resolves the data source server-side by using the+single read-only data source when exactly one exists, or the admin data+source otherwise. It can also be set explicitly to export from the admin+data source or 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></tbody>@@ -13135,7 +13541,7 @@ See: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-user_e- <h3 id="bytebase.v1.DataSource.Address">DataSource.Address</h3>+ <h3 id="bytebase.v1.ExportResponse">ExportResponse</h3><p></p>@@ -13146,17 +13552,10 @@ See: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-user_e<tbody><tr>- <td>host</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p> </p></td>- </tr>-- <tr>- <td>port</td>- <td><a href="#string">string</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>@@ -13166,7 +13565,7 @@ See: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-user_e- <h3 id="bytebase.v1.DataSource.AzureCredential">DataSource.AzureCredential</h3>+ <h3 id="bytebase.v1.MaskingReason">MaskingReason</h3><p></p>@@ -13177,79 +13576,52 @@ See: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-user_e<tbody><tr>- <td>tenant_id</td>+ <td>semantic_type_id</td><td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>The semantic type that triggered masking (e.g., "SSN", "email", "phone"). </p></td></tr><tr>- <td>client_id</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>client_secret</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>- </tbody>- </table>------ <h3 id="bytebase.v1.DataSource.ExtraConnectionParametersEntry">DataSource.ExtraConnectionParametersEntry</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>algorithm</td><td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>The masking algorithm used. </p></td></tr><tr>- <td>value</td>+ <td>context</td><td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>Additional context (e.g., "Matched global rule: PII Protection"). </p></td></tr>- </tbody>- </table>------ <h3 id="bytebase.v1.DataSource.GCPCredential">DataSource.GCPCredential</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>classification_level</td>+ <td><a href="#int32">int32</a></td>+ <td></td>+ <td><p>The classification level that triggered masking. </p></td>+ </tr><tr>- <td>content</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>@@ -13259,7 +13631,7 @@ See: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-user_e- <h3 id="bytebase.v1.DataSourceExternalSecret">DataSourceExternalSecret</h3>+ <h3 id="bytebase.v1.QueryHistory">QueryHistory</h3><p></p>@@ -13270,91 +13642,92 @@ See: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-user_e<tbody><tr>- <td>secret_type</td>- <td><a href="#bytebase.v1.DataSourceExternalSecret.SecretType">DataSourceExternalSecret.SecretType</a></td>- <td></td>- <td><p>The type of external secret store. </p></td>- </tr>-- <tr>- <td>url</td>+ <td>name</td><td><a href="#string">string</a></td><td></td>- <td><p>The URL of the external secret store. </p></td>- </tr>-- <tr>- <td>auth_type</td>- <td><a href="#bytebase.v1.DataSourceExternalSecret.AuthType">DataSourceExternalSecret.AuthType</a></td>- <td></td>- <td><p>The authentication method for accessing the secret store. </p></td>+ <td><p>The name for the query history.+Format: projects/{project}/queryHistories/{id} </p></td></tr><tr>- <td>app_role</td>- <td><a href="#bytebase.v1.DataSourceExternalSecret.AppRoleAuthOption">DataSourceExternalSecret.AppRoleAuthOption</a></td>+ <td>database</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>AppRole authentication configuration. </p></td>+ <td><p>The database name to execute the query.+Format: instances/{instance}/databases/{databaseName} </p></td></tr><tr>- <td>token</td>+ <td>creator</td><td><a href="#string">string</a></td><td></td>- <td><p>Token for direct authentication. </p></td>+ <td><p> </p></td></tr><tr>- <td>engine_name</td>- <td><a href="#string">string</a></td>+ <td>create_time</td>+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td><td></td>- <td><p>engine name is the name for secret engine. </p></td>+ <td><p> </p></td></tr><tr>- <td>secret_name</td>+ <td>statement</td><td><a href="#string">string</a></td><td></td>- <td><p>the secret name in the engine to store the password. </p></td>+ <td><p> </p></td></tr><tr>- <td>password_key_name</td>+ <td>error</td><td><a href="#string">string</a></td>- <td></td>- <td><p>the key name for the password. </p></td>+ <td>optional</td>+ <td><p> </p></td></tr><tr>- <td>skip_vault_tls_verification</td>- <td><a href="#bool">bool</a></td>+ <td>duration</td>+ <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td><td></td>- <td><p>TLS configuration for connecting to Vault server.-These fields are separate from the database TLS configuration in DataSource.-skip_vault_tls_verification disables TLS certificate verification for Vault connections.-Default is false (verification enabled) for security.-Only set to true for development or when certificates cannot be properly validated. </p></td>+ <td><p> </p></td></tr><tr>- <td>vault_ssl_ca</td>- <td><a href="#string">string</a></td>+ <td>type</td>+ <td><a href="#bytebase.v1.QueryHistory.Type">QueryHistory.Type</a></td><td></td>- <td><p>CA certificate for Vault server verification. </p></td>+ <td><p> </p></td></tr>+ </tbody>+ </table>++++++ <h3 id="bytebase.v1.QueryOption">QueryOption</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>vault_ssl_cert</td>- <td><a href="#string">string</a></td>+ <td>redis_run_commands_on</td>+ <td><a href="#bytebase.v1.QueryOption.RedisRunCommandsOn">QueryOption.RedisRunCommandsOn</a></td><td></td>- <td><p>Client certificate for mutual TLS authentication with Vault. </p></td>+ <td><p> </p></td></tr><tr>- <td>vault_ssl_key</td>- <td><a href="#string">string</a></td>+ <td>mssql_explain_format</td>+ <td><a href="#bytebase.v1.QueryOption.MSSQLExplainFormat">QueryOption.MSSQLExplainFormat</a></td><td></td>- <td><p>Client private key for mutual TLS authentication with Vault. </p></td>+ <td><p> </p></td></tr></tbody>@@ -13364,7 +13737,7 @@ Only set to true for development or when certificates cannot be properly validat- <h3 id="bytebase.v1.DataSourceExternalSecret.AppRoleAuthOption">DataSourceExternalSecret.AppRoleAuthOption</h3>+ <h3 id="bytebase.v1.QueryRequest">QueryRequest</h3><p></p>@@ -13375,73 +13748,66 @@ Only set to true for development or when certificates cannot be properly validat<tbody><tr>- <td>role_id</td>+ <td>name</td><td><a href="#string">string</a></td><td></td>- <td><p>The role ID for Vault AppRole authentication. </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>secret_id</td>+ <td>statement</td><td><a href="#string">string</a></td><td></td>- <td><p>the secret id for the role without ttl. </p></td>+ <td><p>The SQL statement to execute. </p></td></tr><tr>- <td>type</td>- <td><a href="#bytebase.v1.DataSourceExternalSecret.AppRoleAuthOption.SecretType">DataSourceExternalSecret.AppRoleAuthOption.SecretType</a></td>+ <td>limit</td>+ <td><a href="#int32">int32</a></td><td></td>- <td><p>The type of secret for AppRole authentication. </p></td>+ <td><p>The maximum number of rows to return. </p></td></tr><tr>- <td>mount_path</td>+ <td>data_source_id</td><td><a href="#string">string</a></td><td></td>- <td><p>The path where the approle auth method is mounted. </p></td>+ <td><p>The id of data source.+If omitted, Query resolves the data source server-side by using the single+read-only data source when exactly one exists, or the admin data source+otherwise. It can also be set explicitly to query the admin data source or+a specific read-only data source. </p></td></tr>- </tbody>- </table>------ <h3 id="bytebase.v1.DeleteInstanceRequest">DeleteInstanceRequest</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>explain</td>+ <td><a href="#bool">bool</a></td>+ <td></td>+ <td><p>Explain the statement. </p></td>+ </tr><tr>- <td>name</td>+ <td>schema</td><td><a href="#string">string</a></td>- <td></td>- <td><p>The name of the instance to delete.-Format: instances/{instance} </p></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>force</td>- <td><a href="#bool">bool</a></td>+ <td>query_option</td>+ <td><a href="#bytebase.v1.QueryOption">QueryOption</a></td><td></td>- <td><p>If set to true, any databases and sheets from this project will also be moved to default project, and all open issues will be closed. </p></td>+ <td><p> </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 instance and all related resources.-This operation is irreversible. Following AIP-165, this should only be used for-administrative cleanup of old soft-deleted instances.-The instance must already be soft-deleted for this to work. </p></td>+ <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>@@ -13451,7 +13817,7 @@ The instance must already be soft-deleted for this to work. </p></td>- <h3 id="bytebase.v1.GetInstanceRequest">GetInstanceRequest</h3>+ <h3 id="bytebase.v1.QueryResponse">QueryResponse</h3><p></p>@@ -13462,11 +13828,10 @@ The instance must already be soft-deleted for this to work. </p></td><tbody><tr>- <td>name</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The name of the instance to retrieve.-Format: instances/{instance} </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>@@ -13476,7 +13841,7 @@ Format: instances/{instance} </p></td>- <h3 id="bytebase.v1.Instance">Instance</h3>+ <h3 id="bytebase.v1.QueryResult">QueryResult</h3><p></p>@@ -13487,105 +13852,120 @@ Format: instances/{instance} </p></td><tbody><tr>- <td>name</td>+ <td>column_names</td><td><a href="#string">string</a></td>- <td></td>- <td><p>The name of the instance.-Format: instances/{instance} </p></td>+ <td>repeated</td>+ <td><p>Column names of the query result. </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 instance. </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>title</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The display title of the instance. </p></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>engine</td>- <td><a href="#bytebase.v1.Engine">Engine</a></td>+ <td>rows_count</td>+ <td><a href="#int64">int64</a></td><td></td>- <td><p>The database engine type. </p></td>+ <td><p> </p></td></tr><tr>- <td>engine_version</td>+ <td>error</td><td><a href="#string">string</a></td><td></td>- <td><p>The version of the database engine. </p></td>+ <td><p>The error message if the query failed. </p></td></tr><tr>- <td>external_link</td>- <td><a href="#string">string</a></td>+ <td>latency</td>+ <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td><td></td>- <td><p>External URL to the database instance console. </p></td>+ <td><p>The time it takes to execute the query. </p></td></tr><tr>- <td>data_sources</td>- <td><a href="#bytebase.v1.DataSource">DataSource</a></td>- <td>repeated</td>- <td><p>Data source configurations for connecting to the instance. </p></td>+ <td>statement</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The query statement for the result. </p></td></tr><tr>- <td>environment</td>- <td><a href="#string">string</a></td>- <td>optional</td>- <td><p>The environment resource.-Format: environments/prod where prod is the environment resource ID. </p></td>+ <td>postgres_error</td>+ <td><a href="#bytebase.v1.QueryResult.PostgresError">QueryResult.PostgresError</a></td>+ <td></td>+ <td><p> </p></td></tr><tr>- <td>activation</td>- <td><a href="#bool">bool</a></td>+ <td>syntax_error</td>+ <td><a href="#bytebase.v1.QueryResult.SyntaxError">QueryResult.SyntaxError</a></td><td></td>- <td><p>Whether the instance is activated for use. </p></td>+ <td><p> </p></td></tr><tr>- <td>roles</td>- <td><a href="#bytebase.v1.InstanceRole">InstanceRole</a></td>- <td>repeated</td>- <td><p>Database roles available in this instance. </p></td>+ <td>permission_denied</td>+ <td><a href="#bytebase.v1.PermissionDeniedDetail">PermissionDeniedDetail</a></td>+ <td></td>+ <td><p> </p></td></tr><tr>- <td>sync_interval</td>- <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>+ <td>command_error</td>+ <td><a href="#bytebase.v1.QueryResult.CommandError">QueryResult.CommandError</a></td><td></td>- <td><p>How often the instance is synced. </p></td>+ <td><p> </p></td></tr><tr>- <td>sync_databases</td>- <td><a href="#string">string</a></td>+ <td>messages</td>+ <td><a href="#bytebase.v1.QueryResult.Message">QueryResult.Message</a></td><td>repeated</td>- <td><p>Enable sync for following databases.-Default empty, means sync all schemas & databases. </p></td>+ <td><p>Informational or debug messages returned by the database engine during query execution.+Examples include PostgreSQL's RAISE NOTICE, MSSQL's PRINT, or Oracle's DBMS_OUTPUT.PUT_LINE. </p></td></tr><tr>- <td>last_sync_time</td>- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>- <td></td>- <td><p>The last time the instance was synced. </p></td>+ <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>+ </table>++++++ <h3 id="bytebase.v1.QueryResult.CommandError">QueryResult.CommandError</h3>+ <p>Permission denied with resource information or disallowed command_type.</p><p>Either resources or command_type is available.</p>+++ <table class="field-table">+ <thead>+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>+ </thead>+ <tbody>+<tr>- <td>labels</td>- <td><a href="#bytebase.v1.Instance.LabelsEntry">Instance.LabelsEntry</a></td>- <td>repeated</td>- <td><p>Labels are key-value pairs that can be attached to the instance.-For example, { "org_group": "infrastructure", "environment": "production" } </p></td>+ <td>command_type</td>+ <td><a href="#bytebase.v1.QueryResult.CommandError.Type">QueryResult.CommandError.Type</a></td>+ <td></td>+ <td><p>Disallowed command_type. </p></td></tr></tbody>@@ -13595,7 +13975,7 @@ For example, { "org_group": "infrastructure", "environment&#- <h3 id="bytebase.v1.Instance.LabelsEntry">Instance.LabelsEntry</h3>+ <h3 id="bytebase.v1.QueryResult.Message">QueryResult.Message</h3><p></p>@@ -13606,14 +13986,14 @@ For example, { "org_group": "infrastructure", "environment&#<tbody><tr>- <td>key</td>- <td><a href="#string">string</a></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>value</td>+ <td>content</td><td><a href="#string">string</a></td><td></td><td><p> </p></td>@@ -13626,8 +14006,8 @@ For example, { "org_group": "infrastructure", "environment&#- <h3 id="bytebase.v1.InstanceResource">InstanceResource</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">@@ -13637,120 +14017,122 @@ For example, { "org_group": "infrastructure", "environment&#<tbody><tr>- <td>title</td>+ <td>severity</td><td><a href="#string">string</a></td><td></td>- <td><p>The display title of the instance. </p></td>+ <td><p> </p></td></tr><tr>- <td>engine</td>- <td><a href="#bytebase.v1.Engine">Engine</a></td>+ <td>code</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>The database engine type. </p></td>+ <td><p> </p></td></tr><tr>- <td>engine_version</td>+ <td>message</td><td><a href="#string">string</a></td><td></td>- <td><p>The version of the database engine. </p></td>+ <td><p> </p></td></tr><tr>- <td>data_sources</td>- <td><a href="#bytebase.v1.DataSource">DataSource</a></td>- <td>repeated</td>- <td><p>Data source configurations for the instance. </p></td>+ <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>activation</td>- <td><a href="#bool">bool</a></td>+ <td>internal_query</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>Whether the instance is activated. </p></td>+ <td><p> </p></td></tr><tr>- <td>name</td>+ <td>where</td><td><a href="#string">string</a></td><td></td>- <td><p>The name of the instance.-Format: instances/{instance} </p></td>+ <td><p> </p></td></tr><tr>- <td>environment</td>+ <td>schema_name</td><td><a href="#string">string</a></td>- <td>optional</td>- <td><p>The environment resource.-Format: environments/prod where prod is the environment resource ID. </p></td>+ <td></td>+ <td><p> </p></td></tr>- </tbody>- </table>------ <h3 id="bytebase.v1.KerberosConfig">KerberosConfig</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>primary</td>+ <td>table_name</td><td><a href="#string">string</a></td><td></td>- <td><p>The primary component of the Kerberos principal. </p></td>+ <td><p> </p></td></tr><tr>- <td>instance</td>+ <td>column_name</td><td><a href="#string">string</a></td><td></td>- <td><p>The instance component of the Kerberos principal. </p></td>+ <td><p> </p></td></tr><tr>- <td>realm</td>+ <td>data_type_name</td><td><a href="#string">string</a></td><td></td>- <td><p>The Kerberos realm. </p></td>+ <td><p> </p></td></tr><tr>- <td>keytab</td>- <td><a href="#bytes">bytes</a></td>+ <td>constraint_name</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>The keytab file contents for authentication. </p></td>+ <td><p> </p></td></tr><tr>- <td>kdc_host</td>+ <td>file</td><td><a href="#string">string</a></td><td></td>- <td><p>The hostname of the Key Distribution Center (KDC). </p></td>+ <td><p> </p></td></tr><tr>- <td>kdc_port</td>- <td><a href="#string">string</a></td>+ <td>line</td>+ <td><a href="#int32">int32</a></td><td></td>- <td><p>The port of the Key Distribution Center (KDC). </p></td>+ <td><p> </p></td></tr><tr>- <td>kdc_transport_protocol</td>+ <td>routine</td><td><a href="#string">string</a></td><td></td>- <td><p>The transport protocol for KDC communication (tcp or udp). </p></td>+ <td><p> </p></td></tr></tbody>@@ -13760,8 +14142,8 @@ Format: environments/prod where prod is the environment resource ID. </p></td>- <h3 id="bytebase.v1.ListInstanceDatabaseRequest">ListInstanceDatabaseRequest</h3>- <p></p>+ <h3 id="bytebase.v1.QueryResult.SyntaxError">QueryResult.SyntaxError</h3>+ <p>Syntax error with position information for editor highlighting</p><table class="field-table">@@ -13771,18 +14153,10 @@ Format: environments/prod where prod is the environment resource ID. </p></td><tbody><tr>- <td>name</td>- <td><a href="#string">string</a></td>+ <td>start_position</td>+ <td><a href="#bytebase.v1.Position">Position</a></td><td></td>- <td><p>The name of the instance.-Format: instances/{instance} </p></td>- </tr>-- <tr>- <td>instance</td>- <td><a href="#bytebase.v1.Instance">Instance</a></td>- <td>optional</td>- <td><p>The target instance. We need to set this field if the target instance is not created yet. </p></td>+ <td><p>Position information for highlighting in editor </p></td></tr></tbody>@@ -13792,7 +14166,7 @@ Format: instances/{instance} </p></td>- <h3 id="bytebase.v1.ListInstanceDatabaseResponse">ListInstanceDatabaseResponse</h3>+ <h3 id="bytebase.v1.QueryRow">QueryRow</h3><p></p>@@ -13803,10 +14177,10 @@ Format: instances/{instance} </p></td><tbody><tr>- <td>databases</td>- <td><a href="#string">string</a></td>+ <td>values</td>+ <td><a href="#bytebase.v1.RowValue">RowValue</a></td><td>repeated</td>- <td><p>All database name list in the instance. </p></td>+ <td><p>Row values of the query result. </p></td></tr></tbody>@@ -13816,7 +14190,7 @@ Format: instances/{instance} </p></td>- <h3 id="bytebase.v1.ListInstancesRequest">ListInstancesRequest</h3>+ <h3 id="bytebase.v1.RowValue">RowValue</h3><p></p>@@ -13827,173 +14201,98 @@ Format: instances/{instance} </p></td><tbody><tr>- <td>page_size</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 instances to return. The service may return fewer than-this value.-If unspecified, at most 10 instances 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>bool_value</td>+ <td><a href="#bool">bool</a></td><td></td>- <td><p>A page token, received from a previous `ListInstances` call.-Provide this to retrieve the subsequent page.--When paginating, all other parameters provided to `ListInstances` must match-the call that provided the page token. </p></td>+ <td><p> </p></td></tr><tr>- <td>show_deleted</td>- <td><a href="#bool">bool</a></td>+ <td>bytes_value</td>+ <td><a href="#bytes">bytes</a></td><td></td>- <td><p>Show deleted instances if specified. </p></td>+ <td><p> </p></td></tr><tr>- <td>filter</td>- <td><a href="#string">string</a></td>+ <td>double_value</td>+ <td><a href="#double">double</a></td><td></td>- <td><p>Filter the instance.-The syntax and semantics of CEL are documented at https://github.com/google/cel-spec--Supported filters:-- name: the instance name, support "==" and ".contains()" operator.-- resource_id: the instance id, support "==" and ".contains()" operator.-- environment: the environment full name in "environments/{id}" format, support "==" operator.-- state: the instance state, check State enum for values, support "==" operator.-- engine: the instance engine, check Engine enum for values. Support "==", "in [xx]", "!(in [xx])" operator.-- host: the instance host, support "==" and ".contains()" operator.-- port: the instance port, support "==" and ".contains()" operator.-- project: the project full name in "projects/{id}" format, support "==" operator.-- labels.{key}: the instance label, support "==" and "in" operators.--For example:-name == "sample instance"-name.contains("sample")-resource_id == "sample-instance"-resource_id.contains("sample")-state == "DELETED"-environment == "environments/test"-environment == "" (find instances which environment is not set)-engine == "MYSQL"-engine in ["MYSQL", "POSTGRES"]-!(engine in ["MYSQL", "POSTGRES"])-host == "127.0.0.1"-host.contains("127.0")-port == "54321"-port.contains("543")-labels.org_group == "infrastructure"-labels.environment in ["prod", "production"]-project == "projects/sample-project"-You can combine filter conditions like:-name.contains("sample") && environment == "environments/test"-host == "127.0.0.1" && port == "54321" </p></td>+ <td><p> </p></td></tr><tr>- <td>order_by</td>- <td><a href="#string">string</a></td>+ <td>float_value</td>+ <td><a href="#float">float</a></td><td></td>- <td><p>The order by of instances.-Support title, environment. The default sorting order is ascending.-For example:-- order_by = "title"-- order_by = "title desc"-- order_by = "title desc, environment asc" </p></td>+ <td><p> </p></td></tr>- </tbody>- </table>------ <h3 id="bytebase.v1.ListInstancesResponse">ListInstancesResponse</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>int32_value</td>+ <td><a href="#int32">int32</a></td>+ <td></td>+ <td><p> </p></td>+ </tr><tr>- <td>instances</td>- <td><a href="#bytebase.v1.Instance">Instance</a></td>- <td>repeated</td>- <td><p>The instances from the specified request. </p></td>+ <td>int64_value</td>+ <td><a href="#int64">int64</a></td>+ <td></td>+ <td><p> </p></td></tr><tr>- <td>next_page_token</td>+ <td>string_value</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>- </table>------ <h3 id="bytebase.v1.RemoveDataSourceRequest">RemoveDataSourceRequest</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>uint32_value</td>+ <td><a href="#uint32">uint32</a></td><td></td>- <td><p>The name of the instance to remove a data source from.-Format: instances/{instance} </p></td>+ <td><p> </p></td></tr><tr>- <td>data_source</td>- <td><a href="#bytebase.v1.DataSource">DataSource</a></td>+ <td>uint64_value</td>+ <td><a href="#uint64">uint64</a></td><td></td>- <td><p>Identified by data source ID.-Only READ_ONLY data source can be removed. </p></td>+ <td><p> </p></td></tr>- </tbody>- </table>------ <h3 id="bytebase.v1.SASLConfig">SASLConfig</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>krb_config</td>- <td><a href="#bytebase.v1.KerberosConfig">KerberosConfig</a></td>+ <td>timestamp_value</td>+ <td><a href="#bytebase.v1.RowValue.Timestamp">RowValue.Timestamp</a></td><td></td>- <td><p>Kerberos authentication configuration. </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>timestamp_tz_value</td>+ <td><a href="#bytebase.v1.RowValue.TimestampTZ">RowValue.TimestampTZ</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></tr></tbody>@@ -14003,7 +14302,7 @@ Only READ_ONLY data source can be removed. </p></td>- <h3 id="bytebase.v1.SyncInstanceRequest">SyncInstanceRequest</h3>+ <h3 id="bytebase.v1.RowValue.Timestamp">RowValue.Timestamp</h3><p></p>@@ -14014,19 +14313,17 @@ Only READ_ONLY data source can be removed. </p></td><tbody><tr>- <td>name</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 name of instance.-Format: instances/{instance} </p></td>+ <td><p> </p></td></tr><tr>- <td>enable_full_sync</td>- <td><a href="#bool">bool</a></td>+ <td>accuracy</td>+ <td><a href="#int32">int32</a></td><td></td>- <td><p>When full sync is enabled, all databases in the instance will be synchronized. Otherwise, only-the instance metadata (such as the database list) and any newly discovered databases will be synced. </p></td>+ <td><p>The accuracy is the number of digits after the decimal point. </p></td></tr></tbody>@@ -14036,7 +14333,7 @@ the instance metadata (such as the database list) and any newly discovered datab- <h3 id="bytebase.v1.SyncInstanceResponse">SyncInstanceResponse</h3>+ <h3 id="bytebase.v1.RowValue.TimestampTZ">RowValue.TimestampTZ</h3><p></p>@@ -14047,35 +14344,36 @@ the instance metadata (such as the database list) and any newly discovered datab<tbody><tr>- <td>databases</td>+ <td>google_timestamp</td>+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>zone</td><td><a href="#string">string</a></td>- <td>repeated</td>- <td><p>All database name list in the instance. </p></td>+ <td></td>+ <td><p>Zone is the time zone abbreviations in timezone database such as "PDT",+"PST". 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>- </tbody>- </table>------ <h3 id="bytebase.v1.UndeleteInstanceRequest">UndeleteInstanceRequest</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>offset</td>+ <td><a href="#int32">int32</a></td>+ <td></td>+ <td><p>The offset is in seconds east of UTC </p></td>+ </tr><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 instance.-Format: instances/{instance} </p></td>+ <td><p> </p></td></tr></tbody>@@ -14085,7 +14383,7 @@ Format: instances/{instance} </p></td>- <h3 id="bytebase.v1.UpdateDataSourceRequest">UpdateDataSourceRequest</h3>+ <h3 id="bytebase.v1.SearchQueryHistoriesRequest">SearchQueryHistoriesRequest</h3><p></p>@@ -14096,40 +14394,45 @@ Format: instances/{instance} </p></td><tbody><tr>- <td>name</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The name of the instance to update a data source.-Format: instances/{instance} </p></td>- </tr>-- <tr>- <td>data_source</td>- <td><a href="#bytebase.v1.DataSource">DataSource</a></td>- <td></td>- <td><p>Identified by data source ID. </p></td>- </tr>-- <tr>- <td>update_mask</td>- <td><a href="#google.protobuf.FieldMask">google.protobuf.FieldMask</a></td>+ <td>page_size</td>+ <td><a href="#int32">int32</a></td><td></td>- <td><p>The list of fields to update. </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>validate_only</td>- <td><a href="#bool">bool</a></td>+ <td>page_token</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>Validate only also tests the data source connection. </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 data source is not found, a new data source 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 "projects/{id}" format, support "==" operator.+- database: the database full name in "instances/{id}/databases/{name}" format, support "==" operator.+- instance: the instance full name in "instances/{id}" format, support "==" operator.+- type: the type, should be "QUERY" or "EXPORT", support "==" operator.+- statement: the SQL statement, support ".contains()" operator.++For example:+project == "projects/{project}"+database == "instances/{instance}/databases/{database}"+instance == "instances/{instance}"+type == "QUERY"+type == "EXPORT"+statement.contains("select")+type == "QUERY" && statement.contains("select") </p></td></tr></tbody>@@ -14139,7 +14442,7 @@ In this situation, `update_mask` is ignored. </p></td>- <h3 id="bytebase.v1.UpdateInstanceRequest">UpdateInstanceRequest</h3>+ <h3 id="bytebase.v1.SearchQueryHistoriesResponse">SearchQueryHistoriesResponse</h3><p></p>@@ -14150,28 +14453,19 @@ In this situation, `update_mask` is ignored. </p></td><tbody><tr>- <td>instance</td>- <td><a href="#bytebase.v1.Instance">Instance</a></td>- <td></td>- <td><p>The instance to update.--The instance's `name` field is used to identify the instance to update.-Format: instances/{instance} </p></td>- </tr>-- <tr>- <td>update_mask</td>- <td><a href="#google.protobuf.FieldMask">google.protobuf.FieldMask</a></td>- <td></td>- <td><p>The list of fields to update. </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>allow_missing</td>- <td><a href="#bool">bool</a></td>+ <td>next_page_token</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>If set to true, and the instance is not found, a new instance will be created.-In this situation, `update_mask` is ignored. </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>@@ -14183,49 +14477,8 @@ In this situation, `update_mask` is ignored. </p></td>- <h3 id="bytebase.v1.DataSource.AuthenticationType">DataSource.AuthenticationType</h3>- <p></p>- <table class="enum-table">- <thead>- <tr><td>Name</td><td>Number</td><td>Description</td></tr>- </thead>- <tbody>-- <tr>- <td>AUTHENTICATION_UNSPECIFIED</td>- <td>0</td>- <td><p></p></td>- </tr>-- <tr>- <td>PASSWORD</td>- <td>1</td>- <td><p></p></td>- </tr>-- <tr>- <td>GOOGLE_CLOUD_SQL_IAM</td>- <td>2</td>- <td><p></p></td>- </tr>-- <tr>- <td>AWS_RDS_IAM</td>- <td>3</td>- <td><p></p></td>- </tr>-- <tr>- <td>AZURE_IAM</td>- <td>4</td>- <td><p></p></td>- </tr>-- </tbody>- </table>-- <h3 id="bytebase.v1.DataSource.RedisType">DataSource.RedisType</h3>- <p></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>@@ -14233,34 +14486,34 @@ In this situation, `update_mask` is ignored. </p></td><tbody><tr>- <td>REDIS_TYPE_UNSPECIFIED</td>+ <td>ADVICE_LEVEL_UNSPECIFIED</td><td>0</td>- <td><p></p></td>+ <td><p>Unspecified advice level.</p></td></tr><tr>- <td>STANDALONE</td>+ <td>SUCCESS</td><td>1</td>- <td><p></p></td>+ <td><p>Success status indicating the check passed without issues.</p></td></tr><tr>- <td>SENTINEL</td>+ <td>WARNING</td><td>2</td>- <td><p></p></td>+ <td><p>Warning status indicating potential issues that should be reviewed.</p></td></tr><tr>- <td>CLUSTER</td>+ <td>ERROR</td><td>3</td>- <td><p></p></td>+ <td><p>Error status indicating critical issues that must be addressed.</p></td></tr></tbody></table>- <h3 id="bytebase.v1.DataSourceExternalSecret.AppRoleAuthOption.SecretType">DataSourceExternalSecret.AppRoleAuthOption.SecretType</h3>- <p></p>+ <h3 id="bytebase.v1.Advice.RuleType">Advice.RuleType</h3>+ <p>RuleType indicates the source of the linting rule.</p><table class="enum-table"><thead><tr><td>Name</td><td>Number</td><td>Description</td></tr>@@ -14268,27 +14521,29 @@ In this situation, `update_mask` is ignored. </p></td><tbody><tr>- <td>SECRET_TYPE_UNSPECIFIED</td>+ <td>RULE_TYPE_UNSPECIFIED</td><td>0</td>- <td><p>Unspecified secret type.</p></td>+ <td><p>Unspecified rule type.</p></td></tr><tr>- <td>PLAIN</td>+ <td>PARSER_BASED</td><td>1</td>- <td><p>Plain text secret.</p></td>+ <td><p>Parser-based rule enforced by the built-in SQL parser.+These are non-configurable, mandatory checks for schema health.</p></td></tr><tr>- <td>ENVIRONMENT</td>+ <td>AI_POWERED</td><td>2</td>- <td><p>Secret from environment variable.</p></td>+ <td><p>AI-powered rule defined by user in natural language.+These are custom, flexible checks powered by AI models.</p></td></tr></tbody></table>- <h3 id="bytebase.v1.DataSourceExternalSecret.AuthType">DataSourceExternalSecret.AuthType</h3>+ <h3 id="bytebase.v1.QueryHistory.Type">QueryHistory.Type</h3><p></p><table class="enum-table"><thead>@@ -14297,27 +14552,27 @@ In this situation, `update_mask` is ignored. </p></td><tbody><tr>- <td>AUTH_TYPE_UNSPECIFIED</td>+ <td>TYPE_UNSPECIFIED</td><td>0</td>- <td><p>Unspecified authentication type.</p></td>+ <td><p>Unspecified query history type.</p></td></tr><tr>- <td>TOKEN</td>+ <td>QUERY</td><td>1</td>- <td><p>ref: https://developer.hashicorp.com/vault/docs/auth/token</p></td>+ <td><p>Query execution for data retrieval.</p></td></tr><tr>- <td>VAULT_APP_ROLE</td>+ <td>EXPORT</td><td>2</td>- <td><p>ref: https://developer.hashicorp.com/vault/docs/auth/approle</p></td>+ <td><p>Data export operation to file.</p></td></tr></tbody></table>- <h3 id="bytebase.v1.DataSourceExternalSecret.SecretType">DataSourceExternalSecret.SecretType</h3>+ <h3 id="bytebase.v1.QueryOption.MSSQLExplainFormat">QueryOption.MSSQLExplainFormat</h3><p></p><table class="enum-table"><thead>@@ -14326,39 +14581,27 @@ In this situation, `update_mask` is ignored. </p></td><tbody><tr>- <td>SECRET_TYPE_UNSPECIFIED</td>+ <td>MSSQL_EXPLAIN_FORMAT_UNSPECIFIED</td><td>0</td>- <td><p>Unspecified secret type.</p></td>+ <td><p>defaults to SHOWPLAN_ALL</p></td></tr><tr>- <td>VAULT_KV_V2</td>+ <td>MSSQL_EXPLAIN_FORMAT_ALL</td><td>1</td>- <td><p>ref: https://developer.hashicorp.com/vault/api-docs/secret/kv/kv-v2</p></td>+ <td><p>SHOWPLAN_ALL</p></td></tr><tr>- <td>AWS_SECRETS_MANAGER</td>+ <td>MSSQL_EXPLAIN_FORMAT_XML</td><td>2</td>- <td><p>ref: https://docs.aws.amazon.com/secretsmanager/latest/userguide/intro.html</p></td>- </tr>-- <tr>- <td>GCP_SECRET_MANAGER</td>- <td>3</td>- <td><p>ref: https://cloud.google.com/secret-manager/docs</p></td>- </tr>-- <tr>- <td>AZURE_KEY_VAULT</td>- <td>4</td>- <td><p>ref: https://learn.microsoft.com/en-us/azure/key-vault/secrets/about-secrets</p></td>+ <td><p>SHOWPLAN_XML</p></td></tr></tbody></table>- <h3 id="bytebase.v1.DataSourceType">DataSourceType</h3>+ <h3 id="bytebase.v1.QueryOption.RedisRunCommandsOn">QueryOption.RedisRunCommandsOn</h3><p></p><table class="enum-table"><thead>@@ -14367,226 +14610,198 @@ In this situation, `update_mask` is ignored. </p></td><tbody><tr>- <td>DATA_SOURCE_UNSPECIFIED</td>+ <td>REDIS_RUN_COMMANDS_ON_UNSPECIFIED</td><td>0</td>- <td><p>Unspecified data source type.</p></td>+ <td><p>UNSPECIFIED defaults to SINGLE_NODE.</p></td></tr><tr>- <td>ADMIN</td>+ <td>SINGLE_NODE</td><td>1</td>- <td><p>Admin data source with write permissions.</p></td>+ <td><p>Execute Redis commands on a single node in the cluster.</p></td></tr><tr>- <td>READ_ONLY</td>+ <td>ALL_NODES</td><td>2</td>- <td><p>Read-only data source for query operations.</p></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.InstanceService">InstanceService</h3>- <p>InstanceService manages database instances and their connections.</p>+ <h3 id="bytebase.v1.QueryResult.CommandError.Type">QueryResult.CommandError.Type</h3>+ <p></p><table class="enum-table"><thead>- <tr><td>Method Name</td><td>Request Type</td><td>Response Type</td><td>Description</td></tr>+ <tr><td>Name</td><td>Number</td><td>Description</td></tr></thead><tbody><tr>- <td>GetInstance</td>- <td><a href="#bytebase.v1.GetInstanceRequest">GetInstanceRequest</a></td>- <td><a href="#bytebase.v1.Instance">Instance</a></td>- <td><p>Gets a database instance by name.-Permissions required: bb.instances.get</p></td>- </tr>-- <tr>- <td>ListInstances</td>- <td><a href="#bytebase.v1.ListInstancesRequest">ListInstancesRequest</a></td>- <td><a href="#bytebase.v1.ListInstancesResponse">ListInstancesResponse</a></td>- <td><p>Lists all database instances.-Permissions required: bb.instances.list</p></td>+ <td>TYPE_UNSPECIFIED</td>+ <td>0</td>+ <td><p></p></td></tr><tr>- <td>CreateInstance</td>- <td><a href="#bytebase.v1.CreateInstanceRequest">CreateInstanceRequest</a></td>- <td><a href="#bytebase.v1.Instance">Instance</a></td>- <td><p>Creates a new database instance.-Permissions required: bb.instances.create</p></td>+ <td>DDL</td>+ <td>1</td>+ <td><p></p></td></tr><tr>- <td>UpdateInstance</td>- <td><a href="#bytebase.v1.UpdateInstanceRequest">UpdateInstanceRequest</a></td>- <td><a href="#bytebase.v1.Instance">Instance</a></td>- <td><p>Updates a database instance.-Permissions required: bb.instances.update</p></td>+ <td>DML</td>+ <td>2</td>+ <td><p></p></td></tr><tr>- <td>DeleteInstance</td>- <td><a href="#bytebase.v1.DeleteInstanceRequest">DeleteInstanceRequest</a></td>- <td><a href="#google.protobuf.Empty">.google.protobuf.Empty</a></td>- <td><p>Deletes or soft-deletes a database instance.-Permissions required: bb.instances.delete</p></td>+ <td>NON_READ_ONLY</td>+ <td>3</td>+ <td><p></p></td></tr>- <tr>- <td>UndeleteInstance</td>- <td><a href="#bytebase.v1.UndeleteInstanceRequest">UndeleteInstanceRequest</a></td>- <td><a href="#bytebase.v1.Instance">Instance</a></td>- <td><p>Restores a soft-deleted database instance.-Permissions required: bb.instances.undelete</p></td>- </tr>+ </tbody>+ </table>++ <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>+ </thead>+ <tbody><tr>- <td>SyncInstance</td>- <td><a href="#bytebase.v1.SyncInstanceRequest">SyncInstanceRequest</a></td>- <td><a href="#bytebase.v1.SyncInstanceResponse">SyncInstanceResponse</a></td>- <td><p>Syncs database schemas and metadata from an instance.-Permissions required: bb.instances.sync</p></td>+ <td>LEVEL_UNSPECIFIED</td>+ <td>0</td>+ <td><p>Unspecified message level.</p></td></tr><tr>- <td>ListInstanceDatabase</td>- <td><a href="#bytebase.v1.ListInstanceDatabaseRequest">ListInstanceDatabaseRequest</a></td>- <td><a href="#bytebase.v1.ListInstanceDatabaseResponse">ListInstanceDatabaseResponse</a></td>- <td><p>Lists all databases within an instance without creating them.-Permissions required: bb.instances.get</p></td>+ <td>INFO</td>+ <td>1</td>+ <td><p>Informational message.</p></td></tr><tr>- <td>BatchSyncInstances</td>- <td><a href="#bytebase.v1.BatchSyncInstancesRequest">BatchSyncInstancesRequest</a></td>- <td><a href="#bytebase.v1.BatchSyncInstancesResponse">BatchSyncInstancesResponse</a></td>- <td><p>Syncs multiple instances in a single request.-Permissions required: bb.instances.sync</p></td>+ <td>WARNING</td>+ <td>2</td>+ <td><p>Warning message indicating potential issues.</p></td></tr><tr>- <td>BatchUpdateInstances</td>- <td><a href="#bytebase.v1.BatchUpdateInstancesRequest">BatchUpdateInstancesRequest</a></td>- <td><a href="#bytebase.v1.BatchUpdateInstancesResponse">BatchUpdateInstancesResponse</a></td>- <td><p>Updates multiple instances in a single request.-Permissions required: bb.instances.update</p></td>+ <td>DEBUG</td>+ <td>3</td>+ <td><p>Debug message for development and troubleshooting.</p></td></tr><tr>- <td>AddDataSource</td>- <td><a href="#bytebase.v1.AddDataSourceRequest">AddDataSourceRequest</a></td>- <td><a href="#bytebase.v1.Instance">Instance</a></td>- <td><p>Adds a read-only data source to an instance.-Permissions required: bb.instances.update</p></td>+ <td>LOG</td>+ <td>4</td>+ <td><p>General log message.</p></td></tr><tr>- <td>RemoveDataSource</td>- <td><a href="#bytebase.v1.RemoveDataSourceRequest">RemoveDataSourceRequest</a></td>- <td><a href="#bytebase.v1.Instance">Instance</a></td>- <td><p>Removes a read-only data source from an instance.-Permissions required: bb.instances.update</p></td>+ <td>NOTICE</td>+ <td>5</td>+ <td><p>Notice message for important information.</p></td></tr><tr>- <td>UpdateDataSource</td>- <td><a href="#bytebase.v1.UpdateDataSourceRequest">UpdateDataSourceRequest</a></td>- <td><a href="#bytebase.v1.Instance">Instance</a></td>- <td><p>Updates a data source configuration.-Permissions required: bb.instances.update</p></td>+ <td>EXCEPTION</td>+ <td>6</td>+ <td><p>Exception message indicating error conditions.</p></td></tr></tbody></table>+---- <h4>Methods with HTTP bindings</h4>- <table>- <thead>++++ <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>Method Name</td>- <td>Method</td>- <td>Pattern</td>- <td>Body</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>- </thead>- <tbody>--<tr>- <td>GetInstance</td>- <td>GET</td>- <td>/v1/{name=instances/*}</td>- <td></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>ListInstances</td>- <td>GET</td>- <td>/v1/instances</td>- <td></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's own query histories)</p></td></tr>---<tr>- <td>CreateInstance</td>- <td>POST</td>- <td>/v1/instances</td>- <td>instance</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>UpdateInstance</td>- <td>PATCH</td>- <td>/v1/{instance.name=instances/*}</td>- <td>instance</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>DeleteInstance</td>- <td>DELETE</td>- <td>/v1/{name=instances/*}</td>- <td></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>UndeleteInstance</td>- <td>POST</td>- <td>/v1/{name=instances/*}:undelete</td>- <td>*</td>+ <td>Method Name</td>+ <td>Method</td>+ <td>Pattern</td>+ <td>Body</td></tr>-+ </thead>+ <tbody><tr>- <td>SyncInstance</td>+ <td>Query</td><td>POST</td>- <td>/v1/{name=instances/*}:sync</td>+ <td>/v1/{name=instances/*/databases/*}:query</td><td>*</td></tr>@@ -14594,19 +14809,19 @@ Permissions required: bb.instances.update</p></td><tr>- <td>ListInstanceDatabase</td>- <td>POST</td>- <td>/v1/{name=instances/*}:databases</td>- <td>*</td>+ <td>AdminExecute</td>+ <td>GET</td>+ <td>/v1:adminExecute</td>+ <td></td></tr><tr>- <td>BatchSyncInstances</td>+ <td>SearchQueryHistories</td><td>POST</td>- <td>/v1/instances:batchSync</td>+ <td>/v1/queryHistories:search</td><td>*</td></tr>@@ -14614,29 +14829,23 @@ Permissions required: bb.instances.update</p></td><tr>- <td>BatchUpdateInstances</td>+ <td>Export</td><td>POST</td>- <td>/v1/instances:batchUpdate</td>+ <td>/v1/{name=instances/*/databases/*}:export</td><td>*</td></tr>---<tr>- <td>AddDataSource</td>+ <td>Export</td><td>POST</td>- <td>/v1/{name=instances/*}:addDataSource</td>+ <td>/v1/{name=projects/*/plans/*/rollout}:export</td><td>*</td></tr>---<tr>- <td>RemoveDataSource</td>+ <td>Export</td><td>POST</td>- <td>/v1/{name=instances/*}:removeDataSource</td>+ <td>/v1/{name=projects/*/plans/*/rollout/stages/*}:export</td><td>*</td></tr>@@ -14644,228 +14853,36 @@ Permissions required: bb.instances.update</p></td><tr>- <td>UpdateDataSource</td>- <td>PATCH</td>- <td>/v1/{name=instances/*}:updateDataSource</td>- <td>data_source</td>- </tr>--- </tbody>- </table>----- <div class="file-heading">- <h2 id="v1/database_service.proto">v1/database_service.proto</h2><a href="#title">Top</a>- </div>- <p></p>--- <h3 id="bytebase.v1.BatchGetDatabasesRequest">BatchGetDatabasesRequest</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 resource shared by all databases being retrieved.-- projects/{project}: batch get databases in a project;-- instances/{instances}: batch get databases in a instance;-Use "-" as wildcard to batch get databases across parent. </p></td>- </tr>-- <tr>- <td>names</td>- <td><a href="#string">string</a></td>- <td>repeated</td>- <td><p>The list of database names to retrieve. </p></td>- </tr>-- </tbody>- </table>------ <h3 id="bytebase.v1.BatchGetDatabasesResponse">BatchGetDatabasesResponse</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>databases</td>- <td><a href="#bytebase.v1.Database">Database</a></td>- <td>repeated</td>- <td><p>The databases from the specified request. </p></td>- </tr>-- </tbody>- </table>------ <h3 id="bytebase.v1.BatchSyncDatabasesRequest">BatchSyncDatabasesRequest</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 resource shared by all databases being updated.-Format: instances/{instance}-If the operation spans parents, a dash (-) may be accepted as a wildcard. </p></td>- </tr>-- <tr>- <td>names</td>- <td><a href="#string">string</a></td>- <td>repeated</td>- <td><p>The list of database names to sync. </p></td>- </tr>-- </tbody>- </table>------ <h3 id="bytebase.v1.BatchSyncDatabasesResponse">BatchSyncDatabasesResponse</h3>- <p></p>------ <h3 id="bytebase.v1.BatchUpdateDatabasesRequest">BatchUpdateDatabasesRequest</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 resource shared by all databases being updated.-Format: instances/{instance}-If the operation spans parents, a dash (-) may be accepted as a wildcard.-We only support updating the project of databases for now. </p></td>- </tr>-- <tr>- <td>requests</td>- <td><a href="#bytebase.v1.UpdateDatabaseRequest">UpdateDatabaseRequest</a></td>- <td>repeated</td>- <td><p>The request message specifying the resources to update.-A maximum of 1000 databases can be modified in a batch. </p></td>- </tr>-- </tbody>- </table>------ <h3 id="bytebase.v1.BatchUpdateDatabasesResponse">BatchUpdateDatabasesResponse</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>databases</td>- <td><a href="#bytebase.v1.Database">Database</a></td>- <td>repeated</td>- <td><p>Databases updated. </p></td>- </tr>-- </tbody>- </table>------ <h3 id="bytebase.v1.BoundingBox">BoundingBox</h3>- <p>BoundingBox defines the spatial bounds for GEOMETRY spatial indexes.</p>--- <table class="field-table">- <thead>- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>- </thead>- <tbody>-- <tr>- <td>xmin</td>- <td><a href="#double">double</a></td>- <td></td>- <td><p>Minimum X coordinate </p></td>- </tr>+ <td>DiffMetadata</td>+ <td>POST</td>+ <td>/v1/schemaDesign:diffMetadata</td>+ <td>*</td>+ </tr>- <tr>- <td>ymin</td>- <td><a href="#double">double</a></td>- <td></td>- <td><p>Minimum Y coordinate </p></td>- </tr>+- <tr>- <td>xmax</td>- <td><a href="#double">double</a></td>- <td></td>- <td><p>Maximum X coordinate </p></td>- </tr>- <tr>- <td>ymax</td>- <td><a href="#double">double</a></td>- <td></td>- <td><p>Maximum Y coordinate </p></td>- </tr>+ <tr>+ <td>AICompletion</td>+ <td>POST</td>+ <td>/v1/sql/aiCompletion</td>+ <td>*</td>+ </tr>+</tbody></table>--+- <h3 id="bytebase.v1.Changelog">Changelog</h3>+ <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.CancelPlanCheckRunRequest">CancelPlanCheckRunRequest</h3><p></p>@@ -14879,50 +14896,8 @@ A maximum of 1000 databases can be modified in a batch. </p></td><td>name</td><td><a href="#string">string</a></td><td></td>- <td><p>Format: instances/{instance}/databases/{database}/changelogs/{changelog} </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>status</td>- <td><a href="#bytebase.v1.Changelog.Status">Changelog.Status</a></td>- <td></td>- <td><p> </p></td>- </tr>-- <tr>- <td>schema</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p> </p></td>- </tr>-- <tr>- <td>schema_size</td>- <td><a href="#int64">int64</a></td>- <td></td>- <td><p> </p></td>- </tr>-- <tr>- <td>task_run</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun} </p></td>- </tr>-- <tr>- <td>plan_title</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The title of the plan associated with this changelog's task run.-This field is populated by deriving the plan from task_run for display purposes. </p></td>+ <td><p>The name of the plan check run to cancel.+Format: projects/{project}/plans/{plan}/planCheckRun </p></td></tr></tbody>@@ -14932,39 +14907,15 @@ This field is populated by deriving the plan from task_run for display purposes.- <h3 id="bytebase.v1.CheckConstraintMetadata">CheckConstraintMetadata</h3>- <p>CheckConstraintMetadata is the metadata for check constraints.</p>+ <h3 id="bytebase.v1.CancelPlanCheckRunResponse">CancelPlanCheckRunResponse</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 name of a check constraint. </p></td>- </tr>-- <tr>- <td>expression</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The expression is the expression of a check constraint. </p></td>- </tr>-- </tbody>- </table>--- <h3 id="bytebase.v1.ColumnMetadata">ColumnMetadata</h3>- <p>ColumnMetadata is the metadata for columns.</p>+ <h3 id="bytebase.v1.CreatePlanRequest">CreatePlanRequest</h3>+ <p></p><table class="field-table">@@ -14974,144 +14925,18 @@ This field is populated by deriving the plan from task_run for display purposes.<tbody><tr>- <td>name</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The name is the name of a column. </p></td>- </tr>-- <tr>- <td>position</td>- <td><a href="#int32">int32</a></td>- <td></td>- <td><p>The position is the position in columns. </p></td>- </tr>-- <tr>- <td>has_default</td>- <td><a href="#bool">bool</a></td>- <td></td>- <td><p> </p></td>- </tr>-- <tr>- <td>default</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The default value of column. </p></td>- </tr>-- <tr>- <td>default_on_null</td>- <td><a href="#bool">bool</a></td>- <td></td>- <td><p>Oracle specific metadata.-The default_on_null is the default on null of a column. </p></td>- </tr>-- <tr>- <td>on_update</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The on_update is the on update action of a column.-For MySQL like databases, it's only supported for TIMESTAMP columns with-CURRENT_TIMESTAMP as on update value. </p></td>- </tr>-- <tr>- <td>nullable</td>- <td><a href="#bool">bool</a></td>- <td></td>- <td><p>The nullable is the nullable of a column. </p></td>- </tr>-- <tr>- <td>type</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The type is the type of a column. </p></td>- </tr>-- <tr>- <td>character_set</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The character_set is the character_set of a column. </p></td>- </tr>-- <tr>- <td>collation</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The collation is the collation of a column. </p></td>- </tr>-- <tr>- <td>comment</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The comment is the comment of a column. </p></td>- </tr>-- <tr>- <td>generation</td>- <td><a href="#bytebase.v1.GenerationMetadata">GenerationMetadata</a></td>- <td></td>- <td><p>The generation is the generation of a column. </p></td>- </tr>-- <tr>- <td>is_identity</td>- <td><a href="#bool">bool</a></td>- <td></td>- <td><p> </p></td>- </tr>-- <tr>- <td>identity_generation</td>- <td><a href="#bytebase.v1.ColumnMetadata.IdentityGeneration">ColumnMetadata.IdentityGeneration</a></td>- <td></td>- <td><p>The identity_generation is for identity columns, PG only. </p></td>- </tr>-- <tr>- <td>identity_seed</td>- <td><a href="#int64">int64</a></td>- <td></td>- <td><p>The identity_seed is for identity columns, MSSQL only. </p></td>- </tr>-- <tr>- <td>identity_increment</td>- <td><a href="#int64">int64</a></td>- <td></td>- <td><p>The identity_increment is for identity columns, MSSQL only. </p></td>- </tr>-- <tr>- <td>default_constraint_name</td>+ <td>parent</td><td><a href="#string">string</a></td><td></td>- <td><p>The default_constraint_name is the name of the default constraint, MSSQL only.-In MSSQL, default values are implemented as named constraints. When modifying or-dropping a column's default value, you must reference the constraint by name.-This field stores the actual constraint name from the database.--Example: A column definition like:- CREATE TABLE employees (- status NVARCHAR(20) DEFAULT 'active'- )--Will create a constraint with an auto-generated name like 'DF__employees__statu__3B75D760'-or a user-defined name if specified:- ALTER TABLE employees ADD CONSTRAINT DF_employees_status DEFAULT 'active' FOR status--To modify the default, you must first drop the existing constraint by name:- ALTER TABLE employees DROP CONSTRAINT DF__employees__statu__3B75D760- ALTER TABLE employees ADD CONSTRAINT DF_employees_status DEFAULT 'inactive' FOR status--This field is populated when syncing from the database. When empty (e.g., when parsing-from SQL files), the system cannot automatically drop the constraint. </p></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>@@ -15121,7 +14946,7 @@ from SQL files), the system cannot automatically drop the constraint. </p></td>- <h3 id="bytebase.v1.Database">Database</h3>+ <h3 id="bytebase.v1.GetPlanCheckRunRequest">GetPlanCheckRunRequest</h3><p></p>@@ -15135,92 +14960,105 @@ from SQL files), the system cannot automatically drop the constraint. </p></td><td>name</td><td><a href="#string">string</a></td><td></td>- <td><p>The name of the database.-Format: instances/{instance}/databases/{database}-{database} is the database name in the instance. </p></td>- </tr>-- <tr>- <td>state</td>- <td><a href="#bytebase.v1.State">State</a></td>- <td></td>- <td><p>The existence of a database. </p></td>- </tr>-- <tr>- <td>successful_sync_time</td>- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>- <td></td>- <td><p>The latest synchronization time. </p></td>+ <td><p>The name of the plan check run to retrieve.+Format: projects/{project}/plans/{plan}/planCheckRun </p></td></tr>- <tr>- <td>project</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The project for a database.-Format: projects/{project} </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>release</td>+ <td>name</td><td><a href="#string">string</a></td><td></td>- <td><p>The release that was last applied to this database.-Format: projects/{project}/releases/{release_id}-Example: projects/my-project/releases/release_20260115-RC00 </p></td>+ <td><p>The name of the plan to retrieve.+Format: projects/{project}/plans/{plan} </p></td></tr>- <tr>- <td>environment</td>- <td><a href="#string">string</a></td>- <td>optional</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.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>effective_environment</td>+ <td>parent</td><td><a href="#string">string</a></td>- <td>optional</td>- <td><p>The effective environment based on environment tag above and environment-tag on the instance. Inheritance follows-https://cloud.google.com/resource-manager/docs/tags/tags-overview. </p></td>- </tr>-- <tr>- <td>labels</td>- <td><a href="#bytebase.v1.Database.LabelsEntry">Database.LabelsEntry</a></td>- <td>repeated</td>- <td><p>Labels will be used for deployment and policy control. </p></td>- </tr>-- <tr>- <td>instance_resource</td>- <td><a href="#bytebase.v1.InstanceResource">InstanceResource</a></td><td></td>- <td><p>The instance resource. </p></td>+ <td><p>The parent, which owns this collection of plans.+Format: projects/{project}+Use "projects/-" to list all plans from all projects. </p></td></tr><tr>- <td>backup_available</td>- <td><a href="#bool">bool</a></td>+ <td>page_size</td>+ <td><a href="#int32">int32</a></td><td></td>- <td><p>The database is available for DML prior backup. </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>sync_status</td>- <td><a href="#bytebase.v1.SyncStatus">SyncStatus</a></td>+ <td>page_token</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>The sync status of the database. </p></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><tr>- <td>sync_error</td>+ <td>filter</td><td><a href="#string">string</a></td><td></td>- <td><p>The error message if sync failed. </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 "users/{email or id}" format, support "==" operator.+- create_time: the plan create time in "2006-01-02T15:04:05Z07:00" format, support ">=" or "<=" operator.+- has_rollout: whether the plan has rollout, support "==" operator, the value should be "true" or "false".+- has_issue: the plan has issue or not, support "==" operator, the value should be "true" or "false".+- title: the plan title, support "==" operator for exact match and ".contains()" operator for case-insensitive substring match.+- spec_type: the plan spec config type, support "==" operator, the value should be "create_database_config", "change_database_config", or "export_data_config".+- state: the plan state, support "==" operator, the value should be "ACTIVE" or "DELETED".++For example:+creator == "users/[email protected]" && create_time >= "2025-01-02T15:04:05Z07:00"+has_rollout == false && has_issue == true+title == "My Plan"+title.contains("database migration")+spec_type == "change_database_config"+state == "ACTIVE" </p></td></tr></tbody>@@ -15230,7 +15068,7 @@ https://cloud.google.com/resource-manager/docs/tags/tags-overview. </p></td>- <h3 id="bytebase.v1.Database.LabelsEntry">Database.LabelsEntry</h3>+ <h3 id="bytebase.v1.ListPlansResponse">ListPlansResponse</h3><p></p>@@ -15241,17 +15079,18 @@ https://cloud.google.com/resource-manager/docs/tags/tags-overview. </p></td><tbody><tr>- <td>key</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p> </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>value</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>@@ -15261,8 +15100,8 @@ https://cloud.google.com/resource-manager/docs/tags/tags-overview. </p></td>- <h3 id="bytebase.v1.DatabaseMetadata">DatabaseMetadata</h3>- <p>DatabaseMetadata is the metadata for databases.</p>+ <h3 id="bytebase.v1.Plan">Plan</h3>+ <p></p><table class="field-table">@@ -15275,150 +15114,102 @@ https://cloud.google.com/resource-manager/docs/tags/tags-overview. </p></td><td>name</td><td><a href="#string">string</a></td><td></td>- <td><p>The database metadata name.--Format: instances/{instance}/databases/{database}/metadata </p></td>- </tr>-- <tr>- <td>schemas</td>- <td><a href="#bytebase.v1.SchemaMetadata">SchemaMetadata</a></td>- <td>repeated</td>- <td><p>The schemas is the list of schemas in a database. </p></td>+ <td><p>The name of the plan.+`plan` is a system generated ID.+Format: projects/{project}/plans/{plan} </p></td></tr><tr>- <td>character_set</td>- <td><a href="#string">string</a></td>+ <td>state</td>+ <td><a href="#bytebase.v1.State">State</a></td><td></td>- <td><p>The character_set is the character set of a database. </p></td>+ <td><p>The state of the plan. </p></td></tr><tr>- <td>collation</td>+ <td>issue</td><td><a href="#string">string</a></td><td></td>- <td><p>The collation is the collation of a database. </p></td>- </tr>-- <tr>- <td>extensions</td>- <td><a href="#bytebase.v1.ExtensionMetadata">ExtensionMetadata</a></td>- <td>repeated</td>- <td><p>The extensions is the list of extensions in a database. </p></td>+ <td><p>The issue associated with the plan.+Can be empty.+Format: projects/{project}/issues/{issue} </p></td></tr><tr>- <td>owner</td>+ <td>title</td><td><a href="#string">string</a></td><td></td>- <td><p>The owner of the database. </p></td>+ <td><p>The title of the plan. </p></td></tr><tr>- <td>search_path</td>+ <td>description</td><td><a href="#string">string</a></td><td></td>- <td><p>The search_path is the search path of a PostgreSQL database. </p></td>+ <td><p>The description of the plan. </p></td></tr>- </tbody>- </table>------ <h3 id="bytebase.v1.DatabaseSDLSchema">DatabaseSDLSchema</h3>- <p>DatabaseSDLSchema contains the schema in SDL format.</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><a href="#bytes">bytes</a></td>- <td></td>- <td><p>The SDL schema content.-- For SINGLE_FILE format: contains the complete SDL schema as a text string.-- For MULTI_FILE format: contains the ZIP archive as binary data. </p></td>+ <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>content_type</td>+ <td>creator</td><td><a href="#string">string</a></td><td></td>- <td><p>The MIME type of the schema content.-Indicates how the client should interpret the schema field.-Examples:-- "text/plain; charset=utf-8" for SINGLE_FILE format-- "application/zip" for MULTI_FILE format </p></td>+ <td><p>Format: users/[email protected] </p></td></tr>- </tbody>- </table>------ <h3 id="bytebase.v1.DatabaseSchema">DatabaseSchema</h3>- <p>DatabaseSchema is the metadata for databases.</p>--- <table class="field-table">- <thead>- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>- </thead>- <tbody>+ <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>schema</td>- <td><a href="#string">string</a></td>+ <td>update_time</td>+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td><td></td>- <td><p>The schema dump from database. </p></td>+ <td><p> </p></td></tr>- </tbody>- </table>------ <h3 id="bytebase.v1.DependencyColumn">DependencyColumn</h3>- <p>DependencyColumn is the metadata for dependency columns.</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_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>schema</td>- <td><a href="#string">string</a></td>+ <td>has_rollout</td>+ <td><a href="#bool">bool</a></td><td></td>- <td><p>The schema is the schema of a reference column. </p></td>+ <td><p>Whether the plan has started the rollout. </p></td></tr><tr>- <td>table</td>- <td><a href="#string">string</a></td>+ <td>approval_status</td>+ <td><a href="#bytebase.v1.ApprovalStatus">ApprovalStatus</a></td><td></td>- <td><p>The table is the table of a reference column. </p></td>+ <td><p>The approval status of the linked issue.+Unspecified when no linked issue exists. </p></td></tr><tr>- <td>column</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The column is the name of a reference column. </p></td>+ <td>rollout_stage_summaries</td>+ <td><a href="#bytebase.v1.Plan.RolloutStageSummary">Plan.RolloutStageSummary</a></td>+ <td>repeated</td>+ <td><p>Per-stage rollout status summary.+Ordered by environment deployment order. Empty when no rollout exists. </p></td></tr></tbody>@@ -15428,7 +15219,7 @@ Examples:- <h3 id="bytebase.v1.DependencyTable">DependencyTable</h3>+ <h3 id="bytebase.v1.Plan.ChangeDatabaseConfig">Plan.ChangeDatabaseConfig</h3><p></p>@@ -15439,17 +15230,35 @@ Examples:<tbody><tr>- <td>schema</td>+ <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 schema is the schema of a reference table. </p></td>+ <td><p>The resource name of the sheet.+Format: projects/{project}/sheets/{sheet} </p></td></tr><tr>- <td>table</td>+ <td>release</td><td><a href="#string">string</a></td><td></td>- <td><p>The table is the name of a reference table. </p></td>+ <td><p>The resource name of the release.+Format: projects/{project}/releases/{release} </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>@@ -15459,7 +15268,7 @@ Examples:- <h3 id="bytebase.v1.DiffSchemaRequest">DiffSchemaRequest</h3>+ <h3 id="bytebase.v1.Plan.CreateDatabaseConfig">Plan.CreateDatabaseConfig</h3><p></p>@@ -15470,98 +15279,62 @@ Examples:<tbody><tr>- <td>name</td>+ <td>target</td><td><a href="#string">string</a></td><td></td>- <td><p>The name of the database or changelog.-Format:-database: instances/{instance}/databases/{database}-changelog: instances/{instance}/databases/{database}/changelogs/{changelog} </p></td>+ <td><p>The resource name of the instance on which the database is created.+Format: instances/{instance} </p></td></tr><tr>- <td>schema</td>+ <td>database</td><td><a href="#string">string</a></td><td></td>- <td><p>The target schema. </p></td>+ <td><p>The name of the database to create. </p></td></tr><tr>- <td>changelog</td>+ <td>table</td><td><a href="#string">string</a></td><td></td>- <td><p>The resource name of the changelog-Format:-instances/{instance}/databases/{database}/changelogs/{changelog} </p></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>- </tbody>- </table>------ <h3 id="bytebase.v1.DiffSchemaResponse">DiffSchemaResponse</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>character_set</td><td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>character_set is the character set of the database. </p></td></tr>- </tbody>- </table>------ <h3 id="bytebase.v1.DimensionConstraint">DimensionConstraint</h3>- <p>DimensionConstraint defines constraints for a spatial dimension.</p>--- <table class="field-table">- <thead>- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>- </thead>- <tbody>-<tr>- <td>dimension</td>+ <td>collation</td><td><a href="#string">string</a></td><td></td>- <td><p>Dimension name/type (X, Y, Z, M, etc.) </p></td>+ <td><p>collation is the collation of the database. </p></td></tr><tr>- <td>min_value</td>- <td><a href="#double">double</a></td>+ <td>cluster</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>Minimum value for this dimension </p></td>+ <td><p>cluster is the cluster of the database. This is only applicable to ClickHouse for "ON CLUSTER <<cluster>>". </p></td></tr><tr>- <td>max_value</td>- <td><a href="#double">double</a></td>+ <td>owner</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>Maximum value for this dimension </p></td>+ <td><p>owner is the owner of the database. This is only applicable to Postgres for "WITH OWNER <<owner>>". </p></td></tr><tr>- <td>tolerance</td>- <td><a href="#double">double</a></td>+ <td>environment</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>Tolerance for this dimension </p></td>+ <td><p>The environment resource.+Format: environments/prod where prod is the environment resource ID. </p></td></tr></tbody>@@ -15571,8 +15344,8 @@ instances/{instance}/databases/{database}/changelogs/{changelog} </p></td>- <h3 id="bytebase.v1.DimensionalConfig">DimensionalConfig</h3>- <p>DimensionalConfig defines dimensional and constraint parameters for spatial indexes.</p>+ <h3 id="bytebase.v1.Plan.ExportDataConfig">Plan.ExportDataConfig</h3>+ <p></p><table class="field-table">@@ -15582,31 +15355,35 @@ instances/{instance}/databases/{database}/changelogs/{changelog} </p></td><tbody><tr>- <td>dimensions</td>- <td><a href="#int32">int32</a></td>- <td></td>- <td><p>Number of dimensions (2-4, default 2) </p></td>+ <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>data_type</td>+ <td>sheet</td><td><a href="#string">string</a></td><td></td>- <td><p>Spatial data type (GEOMETRY, GEOGRAPHY, POINT, POLYGON, etc.) </p></td>+ <td><p>The resource name of the sheet.+Format: projects/{project}/sheets/{sheet} </p></td></tr><tr>- <td>srid</td>- <td><a href="#int32">int32</a></td>+ <td>format</td>+ <td><a href="#bytebase.v1.ExportFormat">ExportFormat</a></td><td></td>- <td><p>Spatial reference system identifier (SRID) </p></td>+ <td><p>The format of the exported file. </p></td></tr><tr>- <td>constraints</td>- <td><a href="#bytebase.v1.DimensionConstraint">DimensionConstraint</a></td>- <td>repeated</td>- <td><p>Coordinate system constraints </p></td>+ <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>@@ -15616,7 +15393,7 @@ instances/{instance}/databases/{database}/changelogs/{changelog} </p></td>- <h3 id="bytebase.v1.EnumTypeMetadata">EnumTypeMetadata</h3>+ <h3 id="bytebase.v1.Plan.PlanCheckRunStatusCountEntry">Plan.PlanCheckRunStatusCountEntry</h3><p></p>@@ -15627,31 +15404,17 @@ instances/{instance}/databases/{database}/changelogs/{changelog} </p></td><tbody><tr>- <td>name</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The name of a type. </p></td>- </tr>-- <tr>- <td>values</td>- <td><a href="#string">string</a></td>- <td>repeated</td>- <td><p>The enum values of a type. </p></td>- </tr>-- <tr>- <td>comment</td>+ <td>key</td><td><a href="#string">string</a></td><td></td>- <td><p>The comment describing the enum type. </p></td>+ <td><p> </p></td></tr><tr>- <td>skip_dump</td>- <td><a href="#bool">bool</a></td>+ <td>value</td>+ <td><a href="#int32">int32</a></td><td></td>- <td><p>Whether to skip this enum type during schema dump operations. </p></td>+ <td><p> </p></td></tr></tbody>@@ -15661,7 +15424,7 @@ instances/{instance}/databases/{database}/changelogs/{changelog} </p></td>- <h3 id="bytebase.v1.EventMetadata">EventMetadata</h3>+ <h3 id="bytebase.v1.Plan.RolloutStageSummary">Plan.RolloutStageSummary</h3><p></p>@@ -15672,52 +15435,63 @@ instances/{instance}/databases/{database}/changelogs/{changelog} </p></td><tbody><tr>- <td>name</td>+ <td>stage</td><td><a href="#string">string</a></td><td></td>- <td><p>The name of the event. </p></td>+ <td><p>The stage resource name.+Format: projects/{project}/plans/{plan}/rollout/stages/{stage} </p></td></tr><tr>- <td>definition</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The schedule of the event. </p></td>+ <td>task_status_counts</td>+ <td><a href="#bytebase.v1.Plan.TaskStatusCount">Plan.TaskStatusCount</a></td>+ <td>repeated</td>+ <td><p>Task status counts for this stage. </p></td></tr>- <tr>- <td>time_zone</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The time zone of the event. </p></td>- </tr>+ </tbody>+ </table>++++++ <h3 id="bytebase.v1.Plan.Spec">Plan.Spec</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>sql_mode</td>+ <td>id</td><td><a href="#string">string</a></td><td></td>- <td><p>The SQL mode setting for the event. </p></td>+ <td><p>A UUID4 string that uniquely identifies the Spec. </p></td></tr><tr>- <td>character_set_client</td>- <td><a href="#string">string</a></td>+ <td>create_database_config</td>+ <td><a href="#bytebase.v1.Plan.CreateDatabaseConfig">Plan.CreateDatabaseConfig</a></td><td></td>- <td><p>The character set used by the client creating the event. </p></td>+ <td><p> </p></td></tr><tr>- <td>collation_connection</td>- <td><a href="#string">string</a></td>+ <td>change_database_config</td>+ <td><a href="#bytebase.v1.Plan.ChangeDatabaseConfig">Plan.ChangeDatabaseConfig</a></td><td></td>- <td><p>The collation used for the connection when creating the event. </p></td>+ <td><p> </p></td></tr><tr>- <td>comment</td>- <td><a href="#string">string</a></td>+ <td>export_data_config</td>+ <td><a href="#bytebase.v1.Plan.ExportDataConfig">Plan.ExportDataConfig</a></td><td></td>- <td><p>The comment is the comment of an event. </p></td>+ <td><p> </p></td></tr></tbody>@@ -15727,8 +15501,8 @@ instances/{instance}/databases/{database}/changelogs/{changelog} </p></td>- <h3 id="bytebase.v1.ExtensionMetadata">ExtensionMetadata</h3>- <p>ExtensionMetadata is the metadata for extensions.</p>+ <h3 id="bytebase.v1.Plan.TaskStatusCount">Plan.TaskStatusCount</h3>+ <p></p><table class="field-table">@@ -15738,32 +15512,17 @@ instances/{instance}/databases/{database}/changelogs/{changelog} </p></td><tbody><tr>- <td>name</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The name is the name of an extension. </p></td>- </tr>-- <tr>- <td>schema</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The schema is the extension that is installed to. But the extension usage-is not limited to the schema. </p></td>- </tr>-- <tr>- <td>version</td>- <td><a href="#string">string</a></td>+ <td>status</td>+ <td><a href="#bytebase.v1.Task.Status">Task.Status</a></td><td></td>- <td><p>The version is the version of an extension. </p></td>+ <td><p>The task status. </p></td></tr><tr>- <td>description</td>- <td><a href="#string">string</a></td>+ <td>count</td>+ <td><a href="#int32">int32</a></td><td></td>- <td><p>The description is the description of an extension. </p></td>+ <td><p>The number of tasks in the status. </p></td></tr></tbody>@@ -15773,7 +15532,7 @@ is not limited to the schema. </p></td>- <h3 id="bytebase.v1.ExternalTableMetadata">ExternalTableMetadata</h3>+ <h3 id="bytebase.v1.PlanCheckRun">PlanCheckRun</h3><p></p>@@ -15787,28 +15546,35 @@ is not limited to the schema. </p></td><td>name</td><td><a href="#string">string</a></td><td></td>- <td><p>The name is the name of a external table. </p></td>+ <td><p>Format: projects/{project}/plans/{plan}/planCheckRun </p></td></tr><tr>- <td>external_server_name</td>- <td><a href="#string">string</a></td>+ <td>status</td>+ <td><a href="#bytebase.v1.PlanCheckRun.Status">PlanCheckRun.Status</a></td><td></td>- <td><p>The external_server_name is the name of the external server. </p></td>+ <td><p> </p></td></tr><tr>- <td>external_database_name</td>+ <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>The external_database_name is the name of the external database. </p></td>+ <td><p>error is set if the Status is FAILED. </p></td></tr><tr>- <td>columns</td>- <td><a href="#bytebase.v1.ColumnMetadata">ColumnMetadata</a></td>- <td>repeated</td>- <td><p>The columns is the ordered list of columns in a foreign table. </p></td>+ <td>create_time</td>+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>+ <td></td>+ <td><p> </p></td></tr></tbody>@@ -15818,8 +15584,8 @@ is not limited to the schema. </p></td>- <h3 id="bytebase.v1.ForeignKeyMetadata">ForeignKeyMetadata</h3>- <p>ForeignKeyMetadata is the metadata for foreign keys.</p>+ <h3 id="bytebase.v1.PlanCheckRun.Result">PlanCheckRun.Result</h3>+ <p></p><table class="field-table">@@ -15829,62 +15595,60 @@ is not limited to the schema. </p></td><tbody><tr>- <td>name</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 name is the name of a foreign key. </p></td>+ <td><p> </p></td></tr><tr>- <td>columns</td>+ <td>title</td><td><a href="#string">string</a></td>- <td>repeated</td>- <td><p>The columns are the ordered referencing columns of a foreign key. </p></td>+ <td></td>+ <td><p> </p></td></tr><tr>- <td>referenced_schema</td>+ <td>content</td><td><a href="#string">string</a></td><td></td>- <td><p>The referenced_schema is the referenced schema name of a foreign key.-It is an empty string for databases without such concept such as MySQL. </p></td>+ <td><p> </p></td></tr><tr>- <td>referenced_table</td>- <td><a href="#string">string</a></td>+ <td>code</td>+ <td><a href="#int32">int32</a></td><td></td>- <td><p>The referenced_table is the referenced table name of a foreign key. </p></td>+ <td><p> </p></td></tr><tr>- <td>referenced_columns</td>+ <td>target</td><td><a href="#string">string</a></td>- <td>repeated</td>- <td><p>The referenced_columns are the ordered referenced columns of a foreign key. </p></td>+ <td></td>+ <td><p>Target identification for consolidated results.+Format: instances/{instance}/databases/{database} </p></td></tr><tr>- <td>on_delete</td>- <td><a href="#string">string</a></td>+ <td>type</td>+ <td><a href="#bytebase.v1.PlanCheckRun.Result.Type">PlanCheckRun.Result.Type</a></td><td></td>- <td><p>The on_delete is the on delete action of a foreign key. </p></td>+ <td><p> </p></td></tr><tr>- <td>on_update</td>- <td><a href="#string">string</a></td>+ <td>sql_summary_report</td>+ <td><a href="#bytebase.v1.PlanCheckRun.Result.SqlSummaryReport">PlanCheckRun.Result.SqlSummaryReport</a></td><td></td>- <td><p>The on_update is the on update action of a foreign key. </p></td>+ <td><p> </p></td></tr><tr>- <td>match_type</td>- <td><a href="#string">string</a></td>+ <td>sql_review_report</td>+ <td><a href="#bytebase.v1.PlanCheckRun.Result.SqlReviewReport">PlanCheckRun.Result.SqlReviewReport</a></td><td></td>- <td><p>The match_type is the match type of a foreign key.-The match_type is the PostgreSQL specific field.-It's empty string for other databases. </p></td>+ <td><p> </p></td></tr></tbody>@@ -15894,8 +15658,8 @@ It's empty string for other databases. </p></td>- <h3 id="bytebase.v1.FunctionMetadata">FunctionMetadata</h3>- <p>FunctionMetadata is the metadata for functions.</p>+ <h3 id="bytebase.v1.PlanCheckRun.Result.SqlReviewReport">PlanCheckRun.Result.SqlReviewReport</h3>+ <p></p><table class="field-table">@@ -15905,75 +15669,131 @@ It's empty string for other databases. </p></td><tbody><tr>- <td>name</td>- <td><a href="#string">string</a></td>+ <td>start_position</td>+ <td><a href="#bytebase.v1.Position">Position</a></td><td></td>- <td><p>The name is the name of a function. </p></td>+ <td><p>Position of the SQL statement. </p></td></tr><tr>- <td>definition</td>- <td><a href="#string">string</a></td>+ <td>end_position</td>+ <td><a href="#bytebase.v1.Position">Position</a></td><td></td>- <td><p>The definition is the definition of a function. </p></td>+ <td><p> </p></td></tr>- <tr>- <td>signature</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The signature is the name with the number and type of input arguments the-function takes. </p></td>- </tr>+ </tbody>+ </table>++++++ <h3 id="bytebase.v1.PlanCheckRun.Result.SqlSummaryReport">PlanCheckRun.Result.SqlSummaryReport</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>character_set_client</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>MySQL specific metadata. </p></td>+ <td>statement_types</td>+ <td><a href="#bytebase.v1.StatementType">StatementType</a></td>+ <td>repeated</td>+ <td><p>statement_types are the types of statements that are found in the sql. </p></td></tr><tr>- <td>collation_connection</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></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>database_collation</td>+ <td>name</td><td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>The plan to run plan checks.+Format: projects/{project}/plans/{plan} </p></td></tr><tr>- <td>sql_mode</td>+ <td>spec_id</td><td><a href="#string">string</a></td>- <td></td>- <td><p> </p></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></tr>+ </tbody>+ </table>++++++ <h3 id="bytebase.v1.RunPlanChecksResponse">RunPlanChecksResponse</h3>+ <p></p>++++++ <h3 id="bytebase.v1.UpdatePlanRequest">UpdatePlanRequest</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>comment</td>- <td><a href="#string">string</a></td>+ <td>plan</td>+ <td><a href="#bytebase.v1.Plan">Plan</a></td><td></td>- <td><p> </p></td>+ <td><p>The plan to update.++The plan's `name` field is used to identify the plan to update.+Format: projects/{project}/plans/{plan} </p></td></tr><tr>- <td>dependency_tables</td>- <td><a href="#bytebase.v1.DependencyTable">DependencyTable</a></td>- <td>repeated</td>- <td><p>The dependency_tables is the list of dependency tables of a function.-For PostgreSQL, it's the list of tables that the function depends on the return type definition. </p></td>+ <td>update_mask</td>+ <td><a href="#google.protobuf.FieldMask">google.protobuf.FieldMask</a></td>+ <td></td>+ <td><p>The list of fields to update. </p></td></tr><tr>- <td>skip_dump</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>@@ -15983,38 +15803,254 @@ For PostgreSQL, it's the list of tables that the function depends on the ret- <h3 id="bytebase.v1.GenerationMetadata">GenerationMetadata</h3>+++ <h3 id="bytebase.v1.PlanCheckRun.Result.Type">PlanCheckRun.Result.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></p></td>+ </tr>++ <tr>+ <td>STATEMENT_ADVISE</td>+ <td>1</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>STATEMENT_SUMMARY_REPORT</td>+ <td>2</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>GHOST_SYNC</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.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>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>GetPlanCheckRun</td>+ <td><a href="#bytebase.v1.GetPlanCheckRunRequest">GetPlanCheckRunRequest</a></td>+ <td><a href="#bytebase.v1.PlanCheckRun">PlanCheckRun</a></td>+ <td><p>Gets the plan check run for a deployment plan.+Permissions required: bb.planCheckRuns.get</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>CancelPlanCheckRun</td>+ <td><a href="#bytebase.v1.CancelPlanCheckRunRequest">CancelPlanCheckRunRequest</a></td>+ <td><a href="#bytebase.v1.CancelPlanCheckRunResponse">CancelPlanCheckRunResponse</a></td>+ <td><p>Cancels the plan check run for a deployment plan.+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>type</td>- <td><a href="#bytebase.v1.GenerationMetadata.Type">GenerationMetadata.Type</a></td>- <td></td>- <td><p> </p></td>- </tr>- <tr>- <td>expression</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p> </p></td>- </tr>+ <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>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>GetPlanCheckRun</td>+ <td>GET</td>+ <td>/v1/{name=projects/*/plans/*/planCheckRun}</td>+ <td></td>+ </tr>+++++ <tr>+ <td>RunPlanChecks</td>+ <td>POST</td>+ <td>/v1/{name=projects/*/plans/*}:runPlanChecks</td>+ <td>*</td>+ </tr>+++++ <tr>+ <td>CancelPlanCheckRun</td>+ <td>POST</td>+ <td>/v1/{name=projects/*/plans/*/planCheckRun}:cancel</td>+ <td>*</td>+ </tr>+</tbody></table>--+- <h3 id="bytebase.v1.GetChangelogRequest">GetChangelogRequest</h3>+ <div class="file-heading">+ <h2 id="v1/issue_service.proto">v1/issue_service.proto</h2><a href="#title">Top</a>+ </div>+ <p></p>+++ <h3 id="bytebase.v1.ApprovalFlow">ApprovalFlow</h3><p></p>@@ -16025,18 +16061,10 @@ For PostgreSQL, it's the list of tables that the function depends on the ret<tbody><tr>- <td>name</td>+ <td>roles</td><td><a href="#string">string</a></td>- <td></td>- <td><p>The name of the changelog to retrieve.-Format: instances/{instance}/databases/{database}/changelogs/{changelog} </p></td>- </tr>-- <tr>- <td>view</td>- <td><a href="#bytebase.v1.ChangelogView">ChangelogView</a></td>- <td></td>- <td><p> </p></td>+ <td>repeated</td>+ <td><p>The roles required for approval in order. </p></td></tr></tbody>@@ -16046,7 +16074,7 @@ Format: instances/{instance}/databases/{database}/changelogs/{changelog} </p></t- <h3 id="bytebase.v1.GetDatabaseMetadataRequest">GetDatabaseMetadataRequest</h3>+ <h3 id="bytebase.v1.ApprovalTemplate">ApprovalTemplate</h3><p></p>@@ -16057,41 +16085,24 @@ Format: instances/{instance}/databases/{database}/changelogs/{changelog} </p></t<tbody><tr>- <td>name</td>- <td><a href="#string">string</a></td>+ <td>flow</td>+ <td><a href="#bytebase.v1.ApprovalFlow">ApprovalFlow</a></td><td></td>- <td><p>The name of the database to retrieve metadata.-Format: instances/{instance}/databases/{database}/metadata </p></td>+ <td><p>The approval flow definition. </p></td></tr><tr>- <td>filter</td>+ <td>title</td><td><a href="#string">string</a></td><td></td>- <td><p>Filter is used to filter databases returned in the list.-The syntax and semantics of CEL are documented at https://github.com/google/cel-spec--Supported filter:-- schema: the schema name, support "==" operator.-- table: the table name, support "==" and ".contains()" operator.--For example:-schema == "schema-a"-table == "table-a"-table.contains("table-a")-schema == "schema-a" && table.contains("sample")-The filter is used to search for tables containing "sample" in the schema "schemas/schema-a".-The column masking level will only be returned when a table filter is used. </p></td>+ <td><p>The title of the approval template. </p></td></tr><tr>- <td>limit</td>- <td><a href="#int32">int32</a></td>+ <td>description</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>Limit the response size of returned table metadata per schema.-For example, if the database has 3 schemas, and each schema has 100 tables,-if limit is 20, then only 20 tables will be returned for each schema, total 60 tables.-Default 0, means no limit. </p></td>+ <td><p>The description of the approval template. </p></td></tr></tbody>@@ -16101,7 +16112,7 @@ Default 0, means no limit. </p></td>- <h3 id="bytebase.v1.GetDatabaseRequest">GetDatabaseRequest</h3>+ <h3 id="bytebase.v1.ApproveIssueRequest">ApproveIssueRequest</h3><p></p>@@ -16115,8 +16126,15 @@ Default 0, means no limit. </p></td><td>name</td><td><a href="#string">string</a></td><td></td>- <td><p>The name of the database to retrieve.-Format: instances/{instance}/databases/{database} </p></td>+ <td><p>The name of the issue to add an approver.+Format: projects/{project}/issues/{issue} </p></td>+ </tr>++ <tr>+ <td>comment</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The comment explaining the approval decision. </p></td></tr></tbody>@@ -16126,7 +16144,7 @@ Format: instances/{instance}/databases/{database} </p></td>- <h3 id="bytebase.v1.GetDatabaseSDLSchemaRequest">GetDatabaseSDLSchemaRequest</h3>+ <h3 id="bytebase.v1.BatchUpdateIssuesStatusRequest">BatchUpdateIssuesStatusRequest</h3><p></p>@@ -16137,18 +16155,35 @@ Format: instances/{instance}/databases/{database} </p></td><tbody><tr>- <td>name</td>+ <td>parent</td><td><a href="#string">string</a></td><td></td>- <td><p>The name of the database to retrieve SDL schema.-Format: instances/{instance}/databases/{database}/sdlSchema </p></td>+ <td><p>The parent resource shared by all issues being updated.+Format: projects/{project}+If the operation spans parents, a dash (-) may be accepted as a wildcard.+We only support updating the status of databases for now. </p></td></tr><tr>- <td>format</td>- <td><a href="#bytebase.v1.GetDatabaseSDLSchemaRequest.SDLFormat">GetDatabaseSDLSchemaRequest.SDLFormat</a></td>+ <td>issues</td>+ <td><a href="#string">string</a></td>+ <td>repeated</td>+ <td><p>The list of issues to update.+Format: projects/{project}/issues/{issue} </p></td>+ </tr>++ <tr>+ <td>status</td>+ <td><a href="#bytebase.v1.IssueStatus">IssueStatus</a></td><td></td>- <td><p>The format of the SDL schema output. </p></td>+ <td><p>The new status. </p></td>+ </tr>++ <tr>+ <td>reason</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The reason for the status change. </p></td></tr></tbody>@@ -16158,32 +16193,14 @@ Format: instances/{instance}/databases/{database}/sdlSchema </p></td>- <h3 id="bytebase.v1.GetDatabaseSchemaRequest">GetDatabaseSchemaRequest</h3>+ <h3 id="bytebase.v1.BatchUpdateIssuesStatusResponse">BatchUpdateIssuesStatusResponse</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 database to retrieve schema.-Format: instances/{instance}/databases/{database}/schema </p></td>- </tr>-- </tbody>- </table>--- <h3 id="bytebase.v1.GetSchemaStringRequest">GetSchemaStringRequest</h3>+ <h3 id="bytebase.v1.CreateIssueCommentRequest">CreateIssueCommentRequest</h3><p></p>@@ -16194,40 +16211,18 @@ Format: instances/{instance}/databases/{database}/schema </p></td><tbody><tr>- <td>name</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The name of the database.-Format: instances/{instance}/databases/{database} </p></td>- </tr>-- <tr>- <td>type</td>- <td><a href="#bytebase.v1.GetSchemaStringRequest.ObjectType">GetSchemaStringRequest.ObjectType</a></td>- <td></td>- <td><p> </p></td>- </tr>-- <tr>- <td>schema</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>It's empty for DATABASE. </p></td>- </tr>-- <tr>- <td>object</td>+ <td>parent</td><td><a href="#string">string</a></td><td></td>- <td><p>It's empty for DATABASE and SCHEMA. </p></td>+ <td><p>The issue name+Format: projects/{project}/issues/{issue} </p></td></tr><tr>- <td>metadata</td>- <td><a href="#bytebase.v1.DatabaseMetadata">DatabaseMetadata</a></td>+ <td>issue_comment</td>+ <td><a href="#bytebase.v1.IssueComment">IssueComment</a></td><td></td>- <td><p>If use the metadata to generate the schema string, the type is OBJECT_TYPE_UNSPECIFIED.-Also the schema and object are empty. </p></td>+ <td><p>The comment to create. </p></td></tr></tbody>@@ -16237,7 +16232,7 @@ Also the schema and object are empty. </p></td>- <h3 id="bytebase.v1.GetSchemaStringResponse">GetSchemaStringResponse</h3>+ <h3 id="bytebase.v1.CreateIssueRequest">CreateIssueRequest</h3><p></p>@@ -16248,10 +16243,18 @@ Also the schema and object are empty. </p></td><tbody><tr>- <td>schema_string</td>+ <td>parent</td><td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>The parent, which owns this collection of issues.+Format: projects/{project} </p></td>+ </tr>++ <tr>+ <td>issue</td>+ <td><a href="#bytebase.v1.Issue">Issue</a></td>+ <td></td>+ <td><p>The issue to create. </p></td></tr></tbody>@@ -16261,8 +16264,8 @@ Also the schema and object are empty. </p></td>- <h3 id="bytebase.v1.GridLevel">GridLevel</h3>- <p>GridLevel defines a tessellation grid level with its density.</p>+ <h3 id="bytebase.v1.GetIssueRequest">GetIssueRequest</h3>+ <p></p><table class="field-table">@@ -16272,17 +16275,18 @@ Also the schema and object are empty. </p></td><tbody><tr>- <td>level</td>- <td><a href="#int32">int32</a></td>+ <td>name</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>Grid level number (1-4 for SQL Server) </p></td>+ <td><p>The name of the issue to retrieve.+Format: projects/{project}/issues/{issue} </p></td></tr><tr>- <td>density</td>- <td><a href="#string">string</a></td>+ <td>force</td>+ <td><a href="#bool">bool</a></td><td></td>- <td><p>Grid density (LOW, MEDIUM, HIGH) </p></td>+ <td><p>If set to true, bypass cache and fetch the latest data. </p></td></tr></tbody>@@ -16292,8 +16296,8 @@ Also the schema and object are empty. </p></td>- <h3 id="bytebase.v1.IndexMetadata">IndexMetadata</h3>- <p>IndexMetadata is the metadata for indexes.</p>+ <h3 id="bytebase.v1.Issue">Issue</h3>+ <p></p><table class="field-table">@@ -16303,195 +16307,119 @@ Also the schema and object are empty. </p></td><tbody><tr>- <td>name</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The name is the name of an index. </p></td>- </tr>-- <tr>- <td>expressions</td>- <td><a href="#string">string</a></td>- <td>repeated</td>- <td><p>The expressions are the ordered columns or expressions of an index.-This could refer to a column or an expression. </p></td>- </tr>-- <tr>- <td>key_length</td>- <td><a href="#int64">int64</a></td>- <td>repeated</td>- <td><p>The key_lengths are the ordered key lengths of an index.-If the key length is not specified, it's -1. </p></td>- </tr>-- <tr>- <td>descending</td>- <td><a href="#bool">bool</a></td>- <td>repeated</td>- <td><p>The descending is the ordered descending of an index. </p></td>- </tr>-- <tr>- <td>type</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The type is the type of an index. </p></td>- </tr>-- <tr>- <td>unique</td>- <td><a href="#bool">bool</a></td>- <td></td>- <td><p>The unique is whether the index is unique. </p></td>- </tr>-- <tr>- <td>primary</td>- <td><a href="#bool">bool</a></td>- <td></td>- <td><p>The primary is whether the index is a primary key index. </p></td>- </tr>-- <tr>- <td>visible</td>- <td><a href="#bool">bool</a></td>- <td></td>- <td><p>The visible is whether the index is visible. </p></td>- </tr>-- <tr>- <td>comment</td>+ <td>name</td><td><a href="#string">string</a></td><td></td>- <td><p>The comment is the comment of an index. </p></td>+ <td><p>The name of the issue.+Format: projects/{project}/issues/{issue} </p></td></tr><tr>- <td>definition</td>+ <td>title</td><td><a href="#string">string</a></td><td></td>- <td><p>The definition of an index. </p></td>+ <td><p>The title of the issue. </p></td></tr><tr>- <td>parent_index_schema</td>+ <td>description</td><td><a href="#string">string</a></td><td></td>- <td><p>The schema name of the parent index. </p></td>+ <td><p>The description of the issue. </p></td></tr><tr>- <td>parent_index_name</td>- <td><a href="#string">string</a></td>+ <td>type</td>+ <td><a href="#bytebase.v1.Issue.Type">Issue.Type</a></td><td></td>- <td><p>The index name of the parent index. </p></td>+ <td><p> </p></td></tr><tr>- <td>granularity</td>- <td><a href="#int64">int64</a></td>+ <td>status</td>+ <td><a href="#bytebase.v1.IssueStatus">IssueStatus</a></td><td></td>- <td><p>The number of granules in the block. It's a ClickHouse specific field. </p></td>+ <td><p>The status of the issue. </p></td></tr><tr>- <td>is_constraint</td>- <td><a href="#bool">bool</a></td>- <td></td>- <td><p>It's a PostgreSQL specific field.-The unique constraint and unique index are not the same thing in PostgreSQL. </p></td>+ <td>approvers</td>+ <td><a href="#bytebase.v1.Issue.Approver">Issue.Approver</a></td>+ <td>repeated</td>+ <td><p> </p></td></tr><tr>- <td>spatial_config</td>- <td><a href="#bytebase.v1.SpatialIndexConfig">SpatialIndexConfig</a></td>+ <td>approval_template</td>+ <td><a href="#bytebase.v1.ApprovalTemplate">ApprovalTemplate</a></td><td></td>- <td><p>Spatial index configuration for spatial databases like SQL Server, PostgreSQL with PostGIS, etc. </p></td>+ <td><p>The approval template for the issue. </p></td></tr><tr>- <td>opclass_names</td>+ <td>creator</td><td><a href="#string">string</a></td>- <td>repeated</td>- <td><p>https://www.postgresql.org/docs/current/catalog-pg-opclass.html-Name of the operator class for each column. (PostgreSQL specific). </p></td>+ <td></td>+ <td><p>Format: users/[email protected] </p></td></tr><tr>- <td>opclass_defaults</td>- <td><a href="#bool">bool</a></td>- <td>repeated</td>- <td><p>True if the operator class is the default. (PostgreSQL specific). </p></td>+ <td>create_time</td>+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>+ <td></td>+ <td><p> </p></td></tr>- </tbody>- </table>------ <h3 id="bytebase.v1.ListChangelogsRequest">ListChangelogsRequest</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>update_time</td>+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>+ <td></td>+ <td><p> </p></td>+ </tr><tr>- <td>parent</td>+ <td>plan</td><td><a href="#string">string</a></td><td></td>- <td><p>The parent of the changelogs.-Format: instances/{instance}/databases/{database} </p></td>+ <td><p>The plan associated with the issue.+Can be empty.+Format: projects/{project}/plans/{plan} </p></td></tr><tr>- <td>page_size</td>- <td><a href="#int32">int32</a></td>+ <td>role_grant</td>+ <td><a href="#bytebase.v1.RoleGrant">RoleGrant</a></td><td></td>- <td><p>The maximum number of changelogs to return. The service may return fewer-than this value. If unspecified, at most 10 changelogs will be returned.-The maximum value is 1000; values above 1000 will be coerced to 1000. </p></td>+ <td><p>Used if the issue type is ROLE_GRANT. </p></td></tr><tr>- <td>page_token</td>- <td><a href="#string">string</a></td>+ <td>risk_level</td>+ <td><a href="#bytebase.v1.RiskLevel">RiskLevel</a></td><td></td>- <td><p>A page token, received from the previous call.-Provide this to retrieve the subsequent page.--When paginating, all other parameters provided must match-the call that provided the page token. </p></td>+ <td><p>The risk level of the issue. </p></td></tr><tr>- <td>view</td>- <td><a href="#bytebase.v1.ChangelogView">ChangelogView</a></td>+ <td>labels</td>+ <td><a href="#string">string</a></td>+ <td>repeated</td>+ <td><p>Labels attached to the issue for categorization and filtering. </p></td>+ </tr>++ <tr>+ <td>approval_status</td>+ <td><a href="#bytebase.v1.ApprovalStatus">ApprovalStatus</a></td><td></td>- <td><p> </p></td>+ <td><p>The overall approval status for the issue. </p></td></tr><tr>- <td>filter</td>+ <td>access_grant</td><td><a href="#string">string</a></td><td></td>- <td><p>Filter is used to filter changelogs returned in the list.-The syntax and semantics of CEL are documented at https://github.com/google/cel-spec--Supported filter:-- status: the changelog status, support "==" operation. check Changelog.Status for available values.-- create_time: the changelog create time in "2006-01-02T15:04:05Z07:00" format, support ">=" or "<=" operator.--Example:-status == "DONE"-status == "FAILED" && type == "SDL"-create_time >= "2024-01-01T00:00:00Z" && create_time <= "2024-01-02T00:00:00Z" </p></td>+ <td><p>The access grant associated with this issue.+Format: projects/{project}/accessGrants/{access_grant} </p></td></tr></tbody>@@ -16501,8 +16429,8 @@ create_time >= "2024-01-01T00:00:00Z" && create_time <= &#- <h3 id="bytebase.v1.ListChangelogsResponse">ListChangelogsResponse</h3>- <p></p>+ <h3 id="bytebase.v1.Issue.Approver">Issue.Approver</h3>+ <p>Approvers and their approval status for the issue.</p><table class="field-table">@@ -16512,18 +16440,17 @@ create_time >= "2024-01-01T00:00:00Z" && create_time <= &#<tbody><tr>- <td>changelogs</td>- <td><a href="#bytebase.v1.Changelog">Changelog</a></td>- <td>repeated</td>- <td><p>The list of changelogs. </p></td>+ <td>status</td>+ <td><a href="#bytebase.v1.Issue.Approver.Status">Issue.Approver.Status</a></td>+ <td></td>+ <td><p>The new status. </p></td></tr><tr>- <td>next_page_token</td>+ <td>principal</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>Format: users/[email protected] </p></td></tr></tbody>@@ -16533,8 +16460,8 @@ If this field is omitted, there are no subsequent pages. </p></td>- <h3 id="bytebase.v1.ListDatabasesRequest">ListDatabasesRequest</h3>- <p></p>+ <h3 id="bytebase.v1.IssueComment">IssueComment</h3>+ <p>A comment on an issue.</p><table class="field-table">@@ -16544,89 +16471,66 @@ 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>- projects/{project}: list databases in a project, require "bb.projects.get" permission.-- workspaces/{id}: list databases in the workspace, require "bb.databases.list" permission.-- instances/{instances}: list databases in a instance, require "bb.instances.get" permission </p></td>+ <td><p>Format: projects/{project}/issues/{issue}/issueComments/{issueComment-uid} </p></td></tr><tr>- <td>page_size</td>- <td><a href="#int32">int32</a></td>+ <td>comment</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>The maximum number of databases to return. The service may return fewer-than this value.-If unspecified, at most 10 databases will be returned.-The maximum value is 1000; values above 1000 will be coerced to 1000. </p></td>+ <td><p>The text content of the comment. </p></td></tr><tr>- <td>page_token</td>+ <td>payload</td><td><a href="#string">string</a></td><td></td>- <td><p>A page token, received from a previous `ListDatabases` call.-Provide this to retrieve the subsequent page.--When paginating, all other parameters provided to `ListDatabases` must-match the call that provided the page token. </p></td>+ <td><p>TODO: use struct message instead. </p></td></tr><tr>- <td>filter</td>- <td><a href="#string">string</a></td>+ <td>create_time</td>+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td><td></td>- <td><p>Filter is used to filter databases returned in the list.-The syntax and semantics of CEL are documented at https://github.com/google/cel-spec--Supported filter:-- environment: the environment full name in "environments/{id}" format, support "==" operator.-- name: the database name, support ".contains()" operator.-- project: the project full name in "projects/{id}" format, support "==" operator.-- instance: the instance full name in "instances/{id}" format, support "==" operator.-- engine: the database engine, check Engine enum for values. Support "==", "in [xx]", "!(in [xx])" operator.-- exclude_unassigned: should be "true" or "false", will not show unassigned databases if it's true, support "==" operator.-- table: filter by the database table, support "==" and ".contains()" operator.-- labels.{key}: the database label, support "==" and "in" operators.--For example:-environment == "environments/{environment resource id}"-environment == "" (find databases which environment is not set)-project == "projects/{project resource id}"-instance == "instances/{instance resource id}"-name.contains("database name")-engine == "MYSQL"-engine in ["MYSQL", "POSTGRES"]-!(engine in ["MYSQL", "POSTGRES"])-exclude_unassigned == true-table == "sample"-table.contains("sam")-labels.environment == "production"-labels.region == "asia"-labels.region in ["asia", "europe"]--You can combine filter conditions like:-environment == "environments/prod" && name.contains("employee") </p></td>+ <td><p> </p></td></tr><tr>- <td>show_deleted</td>- <td><a href="#bool">bool</a></td>+ <td>update_time</td>+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td><td></td>- <td><p>Show deleted database if specified. </p></td>+ <td><p> </p></td></tr><tr>- <td>order_by</td>+ <td>creator</td><td><a href="#string">string</a></td><td></td>- <td><p>The order by of databases.-Support name, project, instance. The default sorting order is ascending.-For example:-- order_by = "name" - order by name ascending-- order_by = "name desc"-- order_by = "name desc, project asc" </p></td>+ <td><p>Format: users/{email} </p></td>+ </tr>++ <tr>+ <td>approval</td>+ <td><a href="#bytebase.v1.IssueComment.Approval">IssueComment.Approval</a></td>+ <td></td>+ <td><p>Approval event. </p></td>+ </tr>++ <tr>+ <td>issue_update</td>+ <td><a href="#bytebase.v1.IssueComment.IssueUpdate">IssueComment.IssueUpdate</a></td>+ <td></td>+ <td><p>Issue update event. </p></td>+ </tr>++ <tr>+ <td>plan_update</td>+ <td><a href="#bytebase.v1.IssueComment.PlanUpdate">IssueComment.PlanUpdate</a></td>+ <td></td>+ <td><p>Plan update event. </p></td></tr></tbody>@@ -16636,29 +16540,21 @@ For example:- <h3 id="bytebase.v1.ListDatabasesResponse">ListDatabasesResponse</h3>- <p></p>+ <h3 id="bytebase.v1.IssueComment.Approval">IssueComment.Approval</h3>+ <p>Approval event information.</p><table class="field-table">- <thead>- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>- </thead>- <tbody>-- <tr>- <td>databases</td>- <td><a href="#bytebase.v1.Database">Database</a></td>- <td>repeated</td>- <td><p>The databases from the specified request. </p></td>- </tr>+ <thead>+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>+ </thead>+ <tbody><tr>- <td>next_page_token</td>- <td><a href="#string">string</a></td>+ <td>status</td>+ <td><a href="#bytebase.v1.IssueComment.Approval.Status">IssueComment.Approval.Status</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 approval status. </p></td></tr></tbody>@@ -16668,8 +16564,8 @@ If this field is omitted, there are no subsequent pages. </p></td>- <h3 id="bytebase.v1.MaterializedViewMetadata">MaterializedViewMetadata</h3>- <p>MaterializedViewMetadata is the metadata for materialized views.</p>+ <h3 id="bytebase.v1.IssueComment.IssueUpdate">IssueComment.IssueUpdate</h3>+ <p>Issue update event information.</p><table class="field-table">@@ -16679,52 +16575,58 @@ If this field is omitted, there are no subsequent pages. </p></td><tbody><tr>- <td>name</td>+ <td>from_title</td><td><a href="#string">string</a></td>- <td></td>- <td><p>The name is the name of a materialized view. </p></td>+ <td>optional</td>+ <td><p> </p></td></tr><tr>- <td>definition</td>+ <td>to_title</td><td><a href="#string">string</a></td>- <td></td>- <td><p>The definition is the definition of a materialized view. </p></td>+ <td>optional</td>+ <td><p> </p></td></tr><tr>- <td>comment</td>+ <td>from_description</td><td><a href="#string">string</a></td>- <td></td>- <td><p>The comment is the comment of a materialized view. </p></td>+ <td>optional</td>+ <td><p> </p></td></tr><tr>- <td>dependency_columns</td>- <td><a href="#bytebase.v1.DependencyColumn">DependencyColumn</a></td>- <td>repeated</td>- <td><p>The dependency_columns is the list of dependency columns of a materialized-view. </p></td>+ <td>to_description</td>+ <td><a href="#string">string</a></td>+ <td>optional</td>+ <td><p> </p></td></tr><tr>- <td>triggers</td>- <td><a href="#bytebase.v1.TriggerMetadata">TriggerMetadata</a></td>- <td>repeated</td>- <td><p>The columns is the ordered list of columns in a table. </p></td>+ <td>from_status</td>+ <td><a href="#bytebase.v1.IssueStatus">IssueStatus</a></td>+ <td>optional</td>+ <td><p> </p></td></tr><tr>- <td>indexes</td>- <td><a href="#bytebase.v1.IndexMetadata">IndexMetadata</a></td>+ <td>to_status</td>+ <td><a href="#bytebase.v1.IssueStatus">IssueStatus</a></td>+ <td>optional</td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>from_labels</td>+ <td><a href="#string">string</a></td><td>repeated</td>- <td><p>The indexes is the list of indexes in a table. </p></td>+ <td><p> </p></td></tr><tr>- <td>skip_dump</td>- <td><a href="#bool">bool</a></td>- <td></td>+ <td>to_labels</td>+ <td><a href="#string">string</a></td>+ <td>repeated</td><td><p> </p></td></tr>@@ -16735,8 +16637,8 @@ view. </p></td>- <h3 id="bytebase.v1.PackageMetadata">PackageMetadata</h3>- <p>PackageMetadata is the metadata for packages.</p>+ <h3 id="bytebase.v1.IssueComment.PlanUpdate">IssueComment.PlanUpdate</h3>+ <p>Plan update event information (snapshot of plan.config.specs before</p><p>and after a PlanService.UpdatePlan call that mutated specs).</p><table class="field-table">@@ -16746,17 +16648,17 @@ view. </p></td><tbody><tr>- <td>name</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The name is the name of a package. </p></td>+ <td>from_specs</td>+ <td><a href="#bytebase.v1.Plan.Spec">Plan.Spec</a></td>+ <td>repeated</td>+ <td><p> </p></td></tr><tr>- <td>definition</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The definition is the definition of a package. </p></td>+ <td>to_specs</td>+ <td><a href="#bytebase.v1.Plan.Spec">Plan.Spec</a></td>+ <td>repeated</td>+ <td><p> </p></td></tr></tbody>@@ -16766,8 +16668,8 @@ view. </p></td>- <h3 id="bytebase.v1.ProcedureMetadata">ProcedureMetadata</h3>- <p>ProcedureMetadata is the metadata for procedures.</p>+ <h3 id="bytebase.v1.ListIssueCommentsRequest">ListIssueCommentsRequest</h3>+ <p></p><table class="field-table">@@ -16777,67 +16679,63 @@ view. </p></td><tbody><tr>- <td>name</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The name is the name of a procedure. </p></td>- </tr>-- <tr>- <td>definition</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The definition is the definition of a procedure. </p></td>- </tr>-- <tr>- <td>signature</td>+ <td>parent</td><td><a href="#string">string</a></td><td></td>- <td><p>The signature is the name with the number and type of input arguments the-procedure takes. </p></td>+ <td><p>Format: projects/{projects}/issues/{issue} </p></td></tr><tr>- <td>character_set_client</td>- <td><a href="#string">string</a></td>+ <td>page_size</td>+ <td><a href="#int32">int32</a></td><td></td>- <td><p>MySQL specific metadata. </p></td>+ <td><p>The maximum number of issue comments to return. The service may return fewer than+this value.+If unspecified, at most 10 issue comments will be returned.+The maximum value is 1000; values above 1000 will be coerced to 1000. </p></td></tr><tr>- <td>collation_connection</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 `ListIssueComments` call.+Provide this to retrieve the subsequent page.++When paginating, all other parameters provided to `ListIssueComments` must match+the call that provided the page token. </p></td></tr>- <tr>- <td>database_collation</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p> </p></td>- </tr>+ </tbody>+ </table>++++++ <h3 id="bytebase.v1.ListIssueCommentsResponse">ListIssueCommentsResponse</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>sql_mode</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p> </p></td>+ <td>issue_comments</td>+ <td><a href="#bytebase.v1.IssueComment">IssueComment</a></td>+ <td>repeated</td>+ <td><p>The issue comments from the specified request. </p></td></tr><tr>- <td>comment</td>+ <td>next_page_token</td><td><a href="#string">string</a></td><td></td>- <td><p>The comment is the comment of a procedure. </p></td>- </tr>-- <tr>- <td>skip_dump</td>- <td><a href="#bool">bool</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>@@ -16847,8 +16745,8 @@ procedure takes. </p></td>- <h3 id="bytebase.v1.SchemaMetadata">SchemaMetadata</h3>- <p>SchemaMetadata is the metadata for schemas.</p><p>This is the concept of schema in Postgres, but it's a no-op for MySQL.</p>+ <h3 id="bytebase.v1.ListIssuesRequest">ListIssuesRequest</h3>+ <p></p><table class="field-table">@@ -16858,118 +16756,142 @@ procedure takes. </p></td><tbody><tr>- <td>name</td>+ <td>parent</td><td><a href="#string">string</a></td><td></td>- <td><p>The name is the schema name.-It is an empty string for databases without such concept such as MySQL. </p></td>- </tr>-- <tr>- <td>tables</td>- <td><a href="#bytebase.v1.TableMetadata">TableMetadata</a></td>- <td>repeated</td>- <td><p>The tables is the list of tables in a schema. </p></td>- </tr>-- <tr>- <td>external_tables</td>- <td><a href="#bytebase.v1.ExternalTableMetadata">ExternalTableMetadata</a></td>- <td>repeated</td>- <td><p>The external_tables is the list of external tables in a schema. </p></td>- </tr>-- <tr>- <td>views</td>- <td><a href="#bytebase.v1.ViewMetadata">ViewMetadata</a></td>- <td>repeated</td>- <td><p>The views is the list of views in a schema. </p></td>- </tr>-- <tr>- <td>functions</td>- <td><a href="#bytebase.v1.FunctionMetadata">FunctionMetadata</a></td>- <td>repeated</td>- <td><p>The functions is the list of functions in a schema. </p></td>- </tr>-- <tr>- <td>procedures</td>- <td><a href="#bytebase.v1.ProcedureMetadata">ProcedureMetadata</a></td>- <td>repeated</td>- <td><p>The procedures is the list of procedures in a schema. </p></td>+ <td><p>The parent, which owns this collection of issues.+Format: projects/{project} </p></td></tr><tr>- <td>streams</td>- <td><a href="#bytebase.v1.StreamMetadata">StreamMetadata</a></td>- <td>repeated</td>- <td><p>The streams is the list of streams in a schema, currently, only used for-Snowflake. </p></td>+ <td>page_size</td>+ <td><a href="#int32">int32</a></td>+ <td></td>+ <td><p>The maximum number of issues to return. The service may return fewer than+this value.+If unspecified, at most 10 issues will be returned.+The maximum value is 1000; values above 1000 will be coerced to 1000. </p></td></tr><tr>- <td>tasks</td>- <td><a href="#bytebase.v1.TaskMetadata">TaskMetadata</a></td>- <td>repeated</td>- <td><p>The routines is the list of routines in a schema, currently, only used for-Snowflake. </p></td>+ <td>page_token</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>A page token, received from a previous `ListIssues` call.+Provide this to retrieve the subsequent page.++When paginating, all other parameters provided to `ListIssues` must match+the call that provided the page token. </p></td></tr><tr>- <td>materialized_views</td>- <td><a href="#bytebase.v1.MaterializedViewMetadata">MaterializedViewMetadata</a></td>- <td>repeated</td>- <td><p>The materialized_views is the list of materialized views in a schema. </p></td>+ <td>filter</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>Filter is used to filter issues returned in the list.+The syntax and semantics of CEL are documented at https://github.com/google/cel-spec++Supported filters:+- creator: issue creator full name in "users/{email or id}" format, support "==" operator.+- status: the issue status, support "==" and "in" operator, check the IssueStatus enum for the values.+- create_time: issue create time in "2006-01-02T15:04:05Z07:00" format, support ">=" or "<=" operator.+- type: the issue type, support "==" and "in" operator, check the Type enum in the Issue message for the values.+- labels: the issue labels, support "==" and "in" operator.+- risk_level: the issue risk level, support "in" operator, check the RiskLevel enum for the values.+- approval_status: issue approval status, support "==" operator.+- current_approver: the issue approver, should in "users/{email} format", support "==" operator.++For example:+creator == "users/[email protected]" && status in ["OPEN", "DONE"]+status == "CANCELED" && type == "DATABASE_CHANGE"+labels in ["label1", "label2"]+risk_level in ["HIGH", "MODERATE"]+create_time >= "2025-01-02T15:04:05Z07:00" </p></td></tr><tr>- <td>packages</td>- <td><a href="#bytebase.v1.PackageMetadata">PackageMetadata</a></td>- <td>repeated</td>- <td><p>The packages is the list of packages in a schema. </p></td>+ <td>query</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>Query is the query statement. </p></td></tr><tr>- <td>owner</td>+ <td>order_by</td><td><a href="#string">string</a></td><td></td>- <td><p>The owner of the schema. </p></td>+ <td><p>The order by of issues.+Support:+- create_time+- update_time+The default sorting order is ascending.+For example:+- order_by = "create_time desc"+- order_by = "update_time asc" </p></td></tr>- <tr>- <td>sequences</td>- <td><a href="#bytebase.v1.SequenceMetadata">SequenceMetadata</a></td>- <td>repeated</td>- <td><p>The sequences is the list of sequences in a schema, sorted by name. </p></td>- </tr>+ </tbody>+ </table>++++++ <h3 id="bytebase.v1.ListIssuesResponse">ListIssuesResponse</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>events</td>- <td><a href="#bytebase.v1.EventMetadata">EventMetadata</a></td>+ <td>issues</td>+ <td><a href="#bytebase.v1.Issue">Issue</a></td><td>repeated</td>- <td><p>The events is the list of scheduled events in a schema. </p></td>+ <td><p>The issues from the specified request. </p></td></tr><tr>- <td>enum_types</td>- <td><a href="#bytebase.v1.EnumTypeMetadata">EnumTypeMetadata</a></td>- <td>repeated</td>- <td><p>The enum_types is the list of user-defined enum types in a schema. </p></td>+ <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.RejectIssueRequest">RejectIssueRequest</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>skip_dump</td>- <td><a href="#bool">bool</a></td>+ <td>name</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>Whether to skip this schema during schema dump operations. </p></td>+ <td><p>The name of the issue to add a rejection.+Format: projects/{project}/issues/{issue} </p></td></tr><tr><td>comment</td><td><a href="#string">string</a></td><td></td>- <td><p>The comment is the comment of a schema. </p></td>+ <td><p>The comment explaining the rejection decision. </p></td></tr></tbody>@@ -16979,7 +16901,7 @@ Snowflake. </p></td>- <h3 id="bytebase.v1.SequenceMetadata">SequenceMetadata</h3>+ <h3 id="bytebase.v1.RequestIssueRequest">RequestIssueRequest</h3><p></p>@@ -16993,91 +16915,163 @@ Snowflake. </p></td><td>name</td><td><a href="#string">string</a></td><td></td>- <td><p>The name of a sequence. </p></td>+ <td><p>The name of the issue to request a issue.+Format: projects/{project}/issues/{issue} </p></td></tr><tr>- <td>data_type</td>+ <td>comment</td><td><a href="#string">string</a></td><td></td>- <td><p>The data type of a sequence. </p></td>+ <td><p>The comment explaining the request. </p></td></tr>+ </tbody>+ </table>++++++ <h3 id="bytebase.v1.RetryIssueApprovalRequest">RetryIssueApprovalRequest</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</td>+ <td>name</td><td><a href="#string">string</a></td><td></td>- <td><p>The start value of a sequence. </p></td>+ <td><p>The name of the issue whose approval-finding should be retried.+Format: projects/{project}/issues/{issue} </p></td></tr>+ </tbody>+ </table>++++++ <h3 id="bytebase.v1.RoleGrant">RoleGrant</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>min_value</td>+ <td>role</td><td><a href="#string">string</a></td><td></td>- <td><p>The minimum value of a sequence. </p></td>+ <td><p>The requested role.+Format: roles/EXPORTER. </p></td></tr><tr>- <td>max_value</td>+ <td>user</td><td><a href="#string">string</a></td><td></td>- <td><p>The maximum value of a sequence. </p></td>+ <td><p>The user to be granted.+Format: users/{email}. </p></td></tr><tr>- <td>increment</td>- <td><a href="#string">string</a></td>+ <td>condition</td>+ <td><a href="#google.type.Expr">google.type.Expr</a></td><td></td>- <td><p>Increment value of a sequence. </p></td>+ <td><p>The condition for the role. Same as the condition in IAM Binding message. </p></td></tr><tr>- <td>cycle</td>- <td><a href="#bool">bool</a></td>+ <td>expiration</td>+ <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td><td></td>- <td><p>Cycle is whether the sequence cycles. </p></td>+ <td><p>The duration for which the grant is valid. </p></td></tr>+ </tbody>+ </table>++++++ <h3 id="bytebase.v1.SearchIssuesRequest">SearchIssuesRequest</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>cache_size</td>+ <td>parent</td><td><a href="#string">string</a></td><td></td>- <td><p>Cache size of a sequence. </p></td>+ <td><p>The parent, which owns this collection of issues.+Format: projects/{project}+Use "projects/-" to list all issues from all projects. </p></td></tr><tr>- <td>last_value</td>- <td><a href="#string">string</a></td>+ <td>page_size</td>+ <td><a href="#int32">int32</a></td><td></td>- <td><p>Last value of a sequence. </p></td>+ <td><p>The maximum number of issues to return. The service may return fewer than+this value.+If unspecified, at most 10 issues will be returned.+The maximum value is 1000; values above 1000 will be coerced to 1000. </p></td></tr><tr>- <td>owner_table</td>+ <td>page_token</td><td><a href="#string">string</a></td><td></td>- <td><p>The owner table of the sequence. </p></td>+ <td><p>A page token, received from a previous `SearchIssues` call.+Provide this to retrieve the subsequent page.++When paginating, all other parameters provided to `SearchIssues` must match+the call that provided the page token. </p></td></tr><tr>- <td>owner_column</td>+ <td>filter</td><td><a href="#string">string</a></td><td></td>- <td><p>The owner column of the sequence. </p></td>+ <td><p>Filter is used to filter issues returned in the list.+Check the filter field in the ListIssuesRequest message. </p></td></tr><tr>- <td>comment</td>+ <td>query</td><td><a href="#string">string</a></td><td></td>- <td><p>The comment describing the sequence. </p></td>+ <td><p>Query is the query statement. </p></td></tr><tr>- <td>skip_dump</td>- <td><a href="#bool">bool</a></td>+ <td>order_by</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>Whether to skip this sequence during schema dump operations. </p></td>+ <td><p>The order by of issues.+Support:+- create_time+- update_time+The default sorting order is ascending.+For example:+- order_by = "create_time desc"+- order_by = "update_time asc" </p></td></tr></tbody>@@ -17087,8 +17081,8 @@ Snowflake. </p></td>- <h3 id="bytebase.v1.SpatialIndexConfig">SpatialIndexConfig</h3>- <p>SpatialIndexConfig defines the spatial index configuration for spatial databases.</p>+ <h3 id="bytebase.v1.SearchIssuesResponse">SearchIssuesResponse</h3>+ <p></p><table class="field-table">@@ -17098,31 +17092,18 @@ Snowflake. </p></td><tbody><tr>- <td>method</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>Spatial indexing method (e.g., "SPATIAL", "R-TREE", "GIST") </p></td>- </tr>-- <tr>- <td>tessellation</td>- <td><a href="#bytebase.v1.TessellationConfig">TessellationConfig</a></td>- <td></td>- <td><p>Tessellation configuration for grid-based spatial indexes </p></td>- </tr>-- <tr>- <td>storage</td>- <td><a href="#bytebase.v1.StorageConfig">StorageConfig</a></td>- <td></td>- <td><p>Storage and performance configuration </p></td>+ <td>issues</td>+ <td><a href="#bytebase.v1.Issue">Issue</a></td>+ <td>repeated</td>+ <td><p>The issues from the specified request. </p></td></tr><tr>- <td>dimensional</td>- <td><a href="#bytebase.v1.DimensionalConfig">DimensionalConfig</a></td>+ <td>next_page_token</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>Dimensional configuration </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>@@ -17132,8 +17113,8 @@ Snowflake. </p></td>- <h3 id="bytebase.v1.StorageConfig">StorageConfig</h3>- <p>StorageConfig defines storage and performance parameters for spatial indexes.</p>+ <h3 id="bytebase.v1.UpdateIssueCommentRequest">UpdateIssueCommentRequest</h3>+ <p></p><table class="field-table">@@ -17143,474 +17124,516 @@ Snowflake. </p></td><tbody><tr>- <td>fillfactor</td>- <td><a href="#int32">int32</a></td>- <td></td>- <td><p>Fill factor percentage (1-100) </p></td>- </tr>-- <tr>- <td>buffering</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>Buffering mode for PostgreSQL (auto, on, off) </p></td>- </tr>-- <tr>- <td>tablespace</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>Tablespace configuration for Oracle </p></td>- </tr>-- <tr>- <td>work_tablespace</td>+ <td>parent</td><td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>The issue name+Format: projects/{project}/issues/{issue} </p></td></tr><tr>- <td>sdo_level</td>- <td><a href="#int32">int32</a></td>+ <td>issue_comment</td>+ <td><a href="#bytebase.v1.IssueComment">IssueComment</a></td><td></td>- <td><p> </p></td>+ <td><p>The comment to update. </p></td></tr><tr>- <td>commit_interval</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> </p></td>+ <td><p>The list of fields to update. </p></td></tr><tr>- <td>pad_index</td>+ <td>allow_missing</td><td><a href="#bool">bool</a></td><td></td>- <td><p>SQL Server specific parameters </p></td>- </tr>-- <tr>- <td>sort_in_tempdb</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>ON, OFF </p></td>+ <td><p>If set to true, and the issue comment is not found, a new issue comment will be created.+In this situation, `update_mask` is ignored. </p></td></tr>- <tr>- <td>drop_existing</td>- <td><a href="#bool">bool</a></td>- <td></td>- <td><p> </p></td>- </tr>+ </tbody>+ </table>++++++ <h3 id="bytebase.v1.UpdateIssueRequest">UpdateIssueRequest</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>online</td>- <td><a href="#bool">bool</a></td>+ <td>issue</td>+ <td><a href="#bytebase.v1.Issue">Issue</a></td><td></td>- <td><p> </p></td>+ <td><p>The issue to update.++The issue's `name` field is used to identify the issue to update.+Format: projects/{project}/issues/{issue} </p></td></tr><tr>- <td>allow_row_locks</td>- <td><a href="#bool">bool</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>allow_page_locks</td>+ <td>allow_missing</td><td><a href="#bool">bool</a></td><td></td>- <td><p> </p></td>- </tr>-- <tr>- <td>maxdop</td>- <td><a href="#int32">int32</a></td>- <td></td>- <td><p> </p></td>- </tr>-- <tr>- <td>data_compression</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>NONE, ROW, PAGE </p></td>+ <td><p>If set to true, and the issue is not found, a new issue will be created.+In this situation, `update_mask` is ignored. </p></td></tr></tbody></table>-+++++++ <h3 id="bytebase.v1.Issue.Approver.Status">Issue.Approver.Status</h3>+ <p>The approval status of an approver.</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>Unspecified status.</p></td>+ </tr>++ <tr>+ <td>PENDING</td>+ <td>1</td>+ <td><p>Awaiting approval.</p></td>+ </tr>++ <tr>+ <td>APPROVED</td>+ <td>2</td>+ <td><p>Approved.</p></td>+ </tr>++ <tr>+ <td>REJECTED</td>+ <td>3</td>+ <td><p>Rejected.</p></td>+ </tr>++ </tbody>+ </table>++ <h3 id="bytebase.v1.Issue.Type">Issue.Type</h3>+ <p>The type of issue.</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 issue type.</p></td>+ </tr>++ <tr>+ <td>DATABASE_CHANGE</td>+ <td>1</td>+ <td><p>Database schema or data change.</p></td>+ </tr>++ <tr>+ <td>ROLE_GRANT</td>+ <td>2</td>+ <td><p>Role grant request.</p></td>+ </tr>++ <tr>+ <td>DATABASE_EXPORT</td>+ <td>3</td>+ <td><p>Database data export request.</p></td>+ </tr>++ <tr>+ <td>ACCESS_GRANT</td>+ <td>4</td>+ <td><p>Temporary access grant request.</p></td>+ </tr>++ </tbody>+ </table>++ <h3 id="bytebase.v1.IssueComment.Approval.Status">IssueComment.Approval.Status</h3>+ <p>Approval status values.</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>Unspecified status.</p></td>+ </tr>++ <tr>+ <td>PENDING</td>+ <td>1</td>+ <td><p>Approval pending.</p></td>+ </tr>++ <tr>+ <td>APPROVED</td>+ <td>2</td>+ <td><p>Approved.</p></td>+ </tr>++ <tr>+ <td>REJECTED</td>+ <td>3</td>+ <td><p>Rejected.</p></td>+ </tr>++ </tbody>+ </table>++ <h3 id="bytebase.v1.IssueStatus">IssueStatus</h3>+ <p>The status of an issue.</p>+ <table class="enum-table">+ <thead>+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>ISSUE_STATUS_UNSPECIFIED</td>+ <td>0</td>+ <td><p>Unspecified status.</p></td>+ </tr>++ <tr>+ <td>OPEN</td>+ <td>1</td>+ <td><p>Issue is open and active.</p></td>+ </tr>++ <tr>+ <td>DONE</td>+ <td>2</td>+ <td><p>Issue is completed.</p></td>+ </tr>++ <tr>+ <td>CANCELED</td>+ <td>3</td>+ <td><p>Issue is canceled.</p></td>+ </tr>++ </tbody>+ </table>+++-- <h3 id="bytebase.v1.StreamMetadata">StreamMetadata</h3>- <p></p>+ <h3 id="bytebase.v1.IssueService">IssueService</h3>+ <p>IssueService manages issues for tracking database changes and tasks.</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>GetIssue</td>+ <td><a href="#bytebase.v1.GetIssueRequest">GetIssueRequest</a></td>+ <td><a href="#bytebase.v1.Issue">Issue</a></td>+ <td><p>Retrieves an issue by name.+Permissions required: bb.issues.get</p></td>+ </tr>++ <tr>+ <td>CreateIssue</td>+ <td><a href="#bytebase.v1.CreateIssueRequest">CreateIssueRequest</a></td>+ <td><a href="#bytebase.v1.Issue">Issue</a></td>+ <td><p>Creates a new issue for database changes or tasks.+Permissions required: bb.issues.create</p></td>+ </tr>++ <tr>+ <td>ListIssues</td>+ <td><a href="#bytebase.v1.ListIssuesRequest">ListIssuesRequest</a></td>+ <td><a href="#bytebase.v1.ListIssuesResponse">ListIssuesResponse</a></td>+ <td><p>Lists issues in a project.+Permissions required: bb.issues.list</p></td>+ </tr>++ <tr>+ <td>SearchIssues</td>+ <td><a href="#bytebase.v1.SearchIssuesRequest">SearchIssuesRequest</a></td>+ <td><a href="#bytebase.v1.SearchIssuesResponse">SearchIssuesResponse</a></td>+ <td><p>Search for issues that the caller has the bb.issues.get permission on and also satisfy the specified filter & query.+Permissions required: bb.issues.get</p></td>+ </tr>++ <tr>+ <td>UpdateIssue</td>+ <td><a href="#bytebase.v1.UpdateIssueRequest">UpdateIssueRequest</a></td>+ <td><a href="#bytebase.v1.Issue">Issue</a></td>+ <td><p>Updates an issue's properties such as title, description, or labels.+Permissions required: bb.issues.update</p></td>+ </tr>++ <tr>+ <td>ListIssueComments</td>+ <td><a href="#bytebase.v1.ListIssueCommentsRequest">ListIssueCommentsRequest</a></td>+ <td><a href="#bytebase.v1.ListIssueCommentsResponse">ListIssueCommentsResponse</a></td>+ <td><p>Lists comments on an issue.+Permissions required: bb.issueComments.list</p></td>+ </tr>++ <tr>+ <td>CreateIssueComment</td>+ <td><a href="#bytebase.v1.CreateIssueCommentRequest">CreateIssueCommentRequest</a></td>+ <td><a href="#bytebase.v1.IssueComment">IssueComment</a></td>+ <td><p>Adds a comment to an issue.+Permissions required: bb.issueComments.create</p></td>+ </tr>++ <tr>+ <td>UpdateIssueComment</td>+ <td><a href="#bytebase.v1.UpdateIssueCommentRequest">UpdateIssueCommentRequest</a></td>+ <td><a href="#bytebase.v1.IssueComment">IssueComment</a></td>+ <td><p>Updates an existing issue comment.+Permissions required: bb.issueComments.update</p></td>+ </tr>++ <tr>+ <td>BatchUpdateIssuesStatus</td>+ <td><a href="#bytebase.v1.BatchUpdateIssuesStatusRequest">BatchUpdateIssuesStatusRequest</a></td>+ <td><a href="#bytebase.v1.BatchUpdateIssuesStatusResponse">BatchUpdateIssuesStatusResponse</a></td>+ <td><p>Updates the status of multiple issues in a single operation.+Permissions required: bb.issues.update</p></td>+ </tr>++ <tr>+ <td>ApproveIssue</td>+ <td><a href="#bytebase.v1.ApproveIssueRequest">ApproveIssueRequest</a></td>+ <td><a href="#bytebase.v1.Issue">Issue</a></td>+ <td><p>Approves an issue. Access determined by approval flow configuration - caller must be a designated approver for the current approval step.+Permissions required: None (determined by approval flow)</p></td>+ </tr>++ <tr>+ <td>RejectIssue</td>+ <td><a href="#bytebase.v1.RejectIssueRequest">RejectIssueRequest</a></td>+ <td><a href="#bytebase.v1.Issue">Issue</a></td>+ <td><p>Rejects an issue. Access determined by approval flow configuration - caller must be a designated approver for the current approval step.+Permissions required: None (determined by approval flow)</p></td>+ </tr>++ <tr>+ <td>RequestIssue</td>+ <td><a href="#bytebase.v1.RequestIssueRequest">RequestIssueRequest</a></td>+ <td><a href="#bytebase.v1.Issue">Issue</a></td>+ <td><p>Requests changes on an issue. Access determined by approval flow configuration - caller must be a designated approver for the current approval step.+Permissions required: None (determined by approval flow)</p></td>+ </tr>++ <tr>+ <td>RetryIssueApproval</td>+ <td><a href="#bytebase.v1.RetryIssueApprovalRequest">RetryIssueApprovalRequest</a></td>+ <td><a href="#bytebase.v1.Issue">Issue</a></td>+ <td><p>Re-runs approval-template finding for an issue stuck in CHECKING.+Useful when the synchronous post-create finding errored (e.g. against+a malformed workspace approval rule) and the operator has since+corrected it — without this, the issue would remain in CHECKING+indefinitely because there is no other retry path for non-DATABASE_CHANGE+issue types. Idempotent: returns the existing issue unchanged when+approval-finding has already completed.+Permissions required: None (caller must be the issue creator;+mirrors RequestIssue's authorization model).</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>name</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The name is the name of a stream. </p></td>- </tr>-- <tr>- <td>table_name</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The table_name is the name of the table/view that the stream is created on. </p></td>- </tr>-- <tr>- <td>owner</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The owner of the stream. </p></td>- </tr>-- <tr>- <td>comment</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The comment of the stream. </p></td>- </tr>-- <tr>- <td>type</td>- <td><a href="#bytebase.v1.StreamMetadata.Type">StreamMetadata.Type</a></td>- <td></td>- <td><p>The type of the stream. </p></td>- </tr>-- <tr>- <td>stale</td>- <td><a href="#bool">bool</a></td>- <td></td>- <td><p>Indicates whether the stream was last read before the `stale_after` time. </p></td>- </tr>- <tr>- <td>mode</td>- <td><a href="#bytebase.v1.StreamMetadata.Mode">StreamMetadata.Mode</a></td>- <td></td>- <td><p>The mode of the stream. </p></td>- </tr>+ <tr>+ <td>GetIssue</td>+ <td>GET</td>+ <td>/v1/{name=projects/*/issues/*}</td>+ <td></td>+ </tr>- <tr>- <td>definition</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The definition of the stream. </p></td>- </tr>+- </tbody>- </table>------ <h3 id="bytebase.v1.SyncDatabaseRequest">SyncDatabaseRequest</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 database to sync.-Format: instances/{instance}/databases/{database} </p></td>- </tr>+ <tr>+ <td>CreateIssue</td>+ <td>POST</td>+ <td>/v1/{parent=projects/*}/issues</td>+ <td>issue</td>+ </tr>- </tbody>- </table>------ <h3 id="bytebase.v1.SyncDatabaseResponse">SyncDatabaseResponse</h3>- <p></p>------ <h3 id="bytebase.v1.TableMetadata">TableMetadata</h3>- <p>TableMetadata is the metadata for tables.</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 name of a table. </p></td>- </tr>- <tr>- <td>columns</td>- <td><a href="#bytebase.v1.ColumnMetadata">ColumnMetadata</a></td>- <td>repeated</td>- <td><p>The columns is the ordered list of columns in a table. </p></td>- </tr>+ <tr>+ <td>ListIssues</td>+ <td>GET</td>+ <td>/v1/{parent=projects/*}/issues</td>+ <td></td>+ </tr>- <tr>- <td>indexes</td>- <td><a href="#bytebase.v1.IndexMetadata">IndexMetadata</a></td>- <td>repeated</td>- <td><p>The indexes is the list of indexes in a table. </p></td>- </tr>+- <tr>- <td>engine</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The engine is the engine of a table. </p></td>- </tr>- <tr>- <td>collation</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The collation is the collation of a table. </p></td>- </tr>+ <tr>+ <td>SearchIssues</td>+ <td>POST</td>+ <td>/v1/{parent=projects/*}/issues:search</td>+ <td>*</td>+ </tr>- <tr>- <td>charset</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The character set of table. </p></td>- </tr>+- <tr>- <td>row_count</td>- <td><a href="#int64">int64</a></td>- <td></td>- <td><p>The row_count is the estimated number of rows of a table. </p></td>- </tr>- <tr>- <td>data_size</td>- <td><a href="#int64">int64</a></td>- <td></td>- <td><p>The data_size is the estimated data size of a table. </p></td>- </tr>+ <tr>+ <td>UpdateIssue</td>+ <td>PATCH</td>+ <td>/v1/{issue.name=projects/*/issues/*}</td>+ <td>issue</td>+ </tr>- <tr>- <td>index_size</td>- <td><a href="#int64">int64</a></td>- <td></td>- <td><p>The index_size is the estimated index size of a table. </p></td>- </tr>+- <tr>- <td>data_free</td>- <td><a href="#int64">int64</a></td>- <td></td>- <td><p>The data_free is the estimated free data size of a table. </p></td>- </tr>- <tr>- <td>create_options</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The create_options is the create option of a table. </p></td>- </tr>+ <tr>+ <td>ListIssueComments</td>+ <td>GET</td>+ <td>/v1/{parent=projects/*/issues/*}/issueComments</td>+ <td></td>+ </tr>- <tr>- <td>comment</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The comment is the comment of a table. </p></td>- </tr>+- <tr>- <td>foreign_keys</td>- <td><a href="#bytebase.v1.ForeignKeyMetadata">ForeignKeyMetadata</a></td>- <td>repeated</td>- <td><p>The foreign_keys is the list of foreign keys in a table. </p></td>- </tr>- <tr>- <td>partitions</td>- <td><a href="#bytebase.v1.TablePartitionMetadata">TablePartitionMetadata</a></td>- <td>repeated</td>- <td><p>The partitions is the list of partitions in a table. </p></td>- </tr>+ <tr>+ <td>CreateIssueComment</td>+ <td>POST</td>+ <td>/v1/{parent=projects/*/issues/*}:comment</td>+ <td>issue_comment</td>+ </tr>- <tr>- <td>check_constraints</td>- <td><a href="#bytebase.v1.CheckConstraintMetadata">CheckConstraintMetadata</a></td>- <td>repeated</td>- <td><p>The check_constraints is the list of check constraints in a table. </p></td>- </tr>+- <tr>- <td>owner</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The owner of the table. </p></td>- </tr>- <tr>- <td>sorting_keys</td>- <td><a href="#string">string</a></td>- <td>repeated</td>- <td><p>The sorting_keys is a tuple of column names or arbitrary expressions. ClickHouse specific field.-Reference: https://clickhouse.com/docs/en/engines/table-engines/mergetree-family/mergetree#order_by </p></td>- </tr>+ <tr>+ <td>UpdateIssueComment</td>+ <td>PATCH</td>+ <td>/v1/{parent=projects/*/issues/*}:comment</td>+ <td>issue_comment</td>+ </tr>- <tr>- <td>triggers</td>- <td><a href="#bytebase.v1.TriggerMetadata">TriggerMetadata</a></td>- <td>repeated</td>- <td><p>The triggers is the list of triggers associated with the table. </p></td>- </tr>+- <tr>- <td>skip_dump</td>- <td><a href="#bool">bool</a></td>- <td></td>- <td><p>Whether to skip this table during schema dump operations. </p></td>- </tr>- <tr>- <td>sharding_info</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>https://docs.pingcap.com/tidb/stable/information-schema-tables/ </p></td>- </tr>+ <tr>+ <td>BatchUpdateIssuesStatus</td>+ <td>POST</td>+ <td>/v1/{parent=projects/*}/issues:batchUpdateStatus</td>+ <td>*</td>+ </tr>- <tr>- <td>primary_key_type</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>https://docs.pingcap.com/tidb/stable/clustered-indexes/#clustered-indexes-CLUSTERED or NONCLUSTERED. </p></td>- </tr>+- </tbody>- </table>------ <h3 id="bytebase.v1.TablePartitionMetadata">TablePartitionMetadata</h3>- <p>TablePartitionMetadata is the metadata for table partitions.</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 name of a table partition. </p></td>- </tr>+ <tr>+ <td>ApproveIssue</td>+ <td>POST</td>+ <td>/v1/{name=projects/*/issues/*}:approve</td>+ <td>*</td>+ </tr>- <tr>- <td>type</td>- <td><a href="#bytebase.v1.TablePartitionMetadata.Type">TablePartitionMetadata.Type</a></td>- <td></td>- <td><p>The type of a table partition. </p></td>- </tr>+- <tr>- <td>expression</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The expression is the expression of a table partition.-For PostgreSQL, the expression is the text of {FOR VALUES-partition_bound_spec}, see-https://www.postgresql.org/docs/current/sql-createtable.html. For MySQL,-the expression is the `expr` or `column_list` of the following syntax.-PARTITION BY- { [LINEAR] HASH(expr)- | [LINEAR] KEY [ALGORITHM={1 | 2}] (column_list)- | RANGE{(expr) | COLUMNS(column_list)}- | LIST{(expr) | COLUMNS(column_list)} }. </p></td>- </tr>- <tr>- <td>value</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The value is the value of a table partition.-For MySQL, the value is for RANGE and LIST partition types,-- For a RANGE partition, it contains the value set in the partition's-VALUES LESS THAN clause, which can be either an integer or MAXVALUE.-- For a LIST partition, this column contains the values defined in the-partition's VALUES IN clause, which is a list of comma-separated integer-values.-- For others, it's an empty string. </p></td>- </tr>+ <tr>+ <td>RejectIssue</td>+ <td>POST</td>+ <td>/v1/{name=projects/*/issues/*}:reject</td>+ <td>*</td>+ </tr>- <tr>- <td>use_default</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The use_default is whether the users use the default partition, it stores-the different value for different database engines. For MySQL, it's [INT]-type, 0 means not use default partition, otherwise, it's equals to number-in syntax [SUB]PARTITION {number}. </p></td>- </tr>+- <tr>- <td>subpartitions</td>- <td><a href="#bytebase.v1.TablePartitionMetadata">TablePartitionMetadata</a></td>- <td>repeated</td>- <td><p>The subpartitions is the list of subpartitions in a table partition. </p></td>- </tr>- <tr>- <td>indexes</td>- <td><a href="#bytebase.v1.IndexMetadata">IndexMetadata</a></td>- <td>repeated</td>- <td><p> </p></td>- </tr>+ <tr>+ <td>RequestIssue</td>+ <td>POST</td>+ <td>/v1/{name=projects/*/issues/*}:request</td>+ <td>*</td>+ </tr>- <tr>- <td>check_constraints</td>- <td><a href="#bytebase.v1.CheckConstraintMetadata">CheckConstraintMetadata</a></td>- <td>repeated</td>- <td><p> </p></td>- </tr>++++ <tr>+ <td>RetryIssueApproval</td>+ <td>POST</td>+ <td>/v1/{name=projects/*/issues/*}:retryApproval</td>+ <td>*</td>+ </tr>+</tbody></table>--+- <h3 id="bytebase.v1.TaskMetadata">TaskMetadata</h3>+ <div class="file-heading">+ <h2 id="v1/setting_service.proto">v1/setting_service.proto</h2><a href="#title">Top</a>+ </div>+ <p></p>+++ <h3 id="bytebase.v1.AISetting">AISetting</h3><p></p>@@ -17621,119 +17644,45 @@ in syntax [SUB]PARTITION {number}. </p></td><tbody><tr>- <td>name</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The name is the name of a task. </p></td>- </tr>-- <tr>- <td>id</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The id is the snowflake-generated id of a task.-Example: 01ad32a0-1bb6-5e93-0000-000000000001 </p></td>- </tr>-- <tr>- <td>owner</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The owner of the task. </p></td>- </tr>-- <tr>- <td>comment</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The comment of the task. </p></td>- </tr>-- <tr>- <td>warehouse</td>- <td><a href="#string">string</a></td>+ <td>enabled</td>+ <td><a href="#bool">bool</a></td><td></td>- <td><p>The warehouse of the task. </p></td>+ <td><p> </p></td></tr><tr>- <td>schedule</td>- <td><a href="#string">string</a></td>+ <td>provider</td>+ <td><a href="#bytebase.v1.AISetting.Provider">AISetting.Provider</a></td><td></td>- <td><p>The schedule interval of the task. </p></td>+ <td><p> </p></td></tr><tr>- <td>predecessors</td>+ <td>endpoint</td><td><a href="#string">string</a></td>- <td>repeated</td>- <td><p>The predecessor tasks of the task. </p></td>- </tr>-- <tr>- <td>state</td>- <td><a href="#bytebase.v1.TaskMetadata.State">TaskMetadata.State</a></td><td></td>- <td><p>The state of the task. </p></td>+ <td><p> </p></td></tr><tr>- <td>condition</td>+ <td>api_key</td><td><a href="#string">string</a></td><td></td>- <td><p>The condition of the task. </p></td>+ <td><p> </p></td></tr><tr>- <td>definition</td>+ <td>model</td><td><a href="#string">string</a></td><td></td>- <td><p>The definition of the task. </p></td>+ <td><p> </p></td></tr>- </tbody>- </table>------ <h3 id="bytebase.v1.TessellationConfig">TessellationConfig</h3>- <p>TessellationConfig defines tessellation parameters for spatial indexes.</p>--- <table class="field-table">- <thead>- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>- </thead>- <tbody>-<tr>- <td>scheme</td>+ <td>version</td><td><a href="#string">string</a></td><td></td>- <td><p>Tessellation scheme (e.g., "GEOMETRY_GRID", "GEOGRAPHY_GRID", "GEOMETRY_AUTO_GRID") </p></td>- </tr>-- <tr>- <td>grid_levels</td>- <td><a href="#bytebase.v1.GridLevel">GridLevel</a></td>- <td>repeated</td>- <td><p>Grid levels and densities for multi-level tessellation </p></td>- </tr>-- <tr>- <td>cells_per_object</td>- <td><a href="#int32">int32</a></td>- <td></td>- <td><p>Number of cells per object (1-8192 for SQL Server) </p></td>- </tr>-- <tr>- <td>bounding_box</td>- <td><a href="#bytebase.v1.BoundingBox">BoundingBox</a></td>- <td></td>- <td><p>Bounding box for GEOMETRY tessellation (not used for GEOGRAPHY) </p></td>+ <td><p> </p></td></tr></tbody>@@ -17743,7 +17692,7 @@ Example: 01ad32a0-1bb6-5e93-0000-000000000001 </p></td>- <h3 id="bytebase.v1.TriggerMetadata">TriggerMetadata</h3>+ <h3 id="bytebase.v1.Algorithm">Algorithm</h3><p></p>@@ -17754,67 +17703,31 @@ Example: 01ad32a0-1bb6-5e93-0000-000000000001 </p></td><tbody><tr>- <td>name</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The name is the name of the trigger. </p></td>- </tr>-- <tr>- <td>event</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The event is the event of the trigger, such as INSERT, UPDATE, DELETE,-TRUNCATE. </p></td>- </tr>-- <tr>- <td>timing</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The timing is the timing of the trigger, such as BEFORE, AFTER. </p></td>- </tr>-- <tr>- <td>body</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The body is the body of the trigger. </p></td>- </tr>-- <tr>- <td>sql_mode</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The SQL mode setting for the trigger. </p></td>- </tr>-- <tr>- <td>character_set_client</td>- <td><a href="#string">string</a></td>+ <td>full_mask</td>+ <td><a href="#bytebase.v1.Algorithm.FullMask">Algorithm.FullMask</a></td><td></td>- <td><p>The character set used by the client creating the trigger. </p></td>+ <td><p> </p></td></tr><tr>- <td>collation_connection</td>- <td><a href="#string">string</a></td>+ <td>range_mask</td>+ <td><a href="#bytebase.v1.Algorithm.RangeMask">Algorithm.RangeMask</a></td><td></td>- <td><p>The collation used for the connection when creating the trigger. </p></td>+ <td><p> </p></td></tr><tr>- <td>comment</td>- <td><a href="#string">string</a></td>+ <td>md5_mask</td>+ <td><a href="#bytebase.v1.Algorithm.MD5Mask">Algorithm.MD5Mask</a></td><td></td>- <td><p>The comment describing the trigger. </p></td>+ <td><p> </p></td></tr><tr>- <td>skip_dump</td>- <td><a href="#bool">bool</a></td>+ <td>inner_outer_mask</td>+ <td><a href="#bytebase.v1.Algorithm.InnerOuterMask">Algorithm.InnerOuterMask</a></td><td></td>- <td><p>Whether to skip this trigger during schema dump operations. </p></td>+ <td><p> </p></td></tr></tbody>@@ -17824,7 +17737,7 @@ TRUNCATE. </p></td>- <h3 id="bytebase.v1.UpdateDatabaseRequest">UpdateDatabaseRequest</h3>+ <h3 id="bytebase.v1.Algorithm.FullMask">Algorithm.FullMask</h3><p></p>@@ -17835,28 +17748,11 @@ TRUNCATE. </p></td><tbody><tr>- <td>database</td>- <td><a href="#bytebase.v1.Database">Database</a></td>- <td></td>- <td><p>The database to update.--The database's `name` field is used to identify the database to update.-Format: instances/{instance}/databases/{database} </p></td>- </tr>-- <tr>- <td>update_mask</td>- <td><a href="#google.protobuf.FieldMask">google.protobuf.FieldMask</a></td>- <td></td>- <td><p>The list of fields to update. </p></td>- </tr>-- <tr>- <td>allow_missing</td>- <td><a href="#bool">bool</a></td>+ <td>substitution</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>If set to true, and the database is not found, a new database will be created.-In this situation, `update_mask` is ignored. </p></td>+ <td><p>substitution is the string used to replace the original value, the+max length of the string is 16 bytes. </p></td></tr></tbody>@@ -17866,61 +17762,40 @@ In this situation, `update_mask` is ignored. </p></td>- <h3 id="bytebase.v1.ViewMetadata">ViewMetadata</h3>- <p>ViewMetadata is the metadata for views.</p>+ <h3 id="bytebase.v1.Algorithm.InnerOuterMask">Algorithm.InnerOuterMask</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 name of a view. </p></td>- </tr>-- <tr>- <td>definition</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The definition is the definition of a view. </p></td>- </tr>+ <tbody><tr>- <td>comment</td>- <td><a href="#string">string</a></td>+ <td>prefix_len</td>+ <td><a href="#int32">int32</a></td><td></td>- <td><p>The comment is the comment of a view. </p></td>- </tr>-- <tr>- <td>dependency_columns</td>- <td><a href="#bytebase.v1.DependencyColumn">DependencyColumn</a></td>- <td>repeated</td>- <td><p>The dependency_columns is the list of dependency columns of a view. </p></td>+ <td><p> </p></td></tr><tr>- <td>columns</td>- <td><a href="#bytebase.v1.ColumnMetadata">ColumnMetadata</a></td>- <td>repeated</td>- <td><p>The columns is the ordered list of columns in a table. </p></td>+ <td>suffix_len</td>+ <td><a href="#int32">int32</a></td>+ <td></td>+ <td><p> </p></td></tr><tr>- <td>triggers</td>- <td><a href="#bytebase.v1.TriggerMetadata">TriggerMetadata</a></td>- <td>repeated</td>- <td><p>The triggers is the list of triggers in a view. </p></td>+ <td>type</td>+ <td><a href="#bytebase.v1.Algorithm.InnerOuterMask.MaskType">Algorithm.InnerOuterMask.MaskType</a></td>+ <td></td>+ <td><p> </p></td></tr><tr>- <td>skip_dump</td>- <td><a href="#bool">bool</a></td>+ <td>substitution</td>+ <td><a href="#string">string</a></td><td></td><td><p> </p></td></tr>@@ -17932,731 +17807,700 @@ In this situation, `update_mask` is ignored. </p></td>--- <h3 id="bytebase.v1.Changelog.Status">Changelog.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>PENDING</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>-- </tbody>- </table>-- <h3 id="bytebase.v1.ChangelogView">ChangelogView</h3>- <p></p>- <table class="enum-table">- <thead>- <tr><td>Name</td><td>Number</td><td>Description</td></tr>- </thead>- <tbody>-- <tr>- <td>CHANGELOG_VIEW_UNSPECIFIED</td>- <td>0</td>- <td><p>The default / unset value.-The API will default to the BASIC view.</p></td>- </tr>-- <tr>- <td>CHANGELOG_VIEW_BASIC</td>- <td>1</td>- <td><p></p></td>- </tr>-- <tr>- <td>CHANGELOG_VIEW_FULL</td>- <td>2</td>- <td><p></p></td>- </tr>-- </tbody>- </table>-- <h3 id="bytebase.v1.ColumnMetadata.IdentityGeneration">ColumnMetadata.IdentityGeneration</h3>- <p></p>- <table class="enum-table">- <thead>- <tr><td>Name</td><td>Number</td><td>Description</td></tr>- </thead>- <tbody>-- <tr>- <td>IDENTITY_GENERATION_UNSPECIFIED</td>- <td>0</td>- <td><p></p></td>- </tr>-- <tr>- <td>ALWAYS</td>- <td>1</td>- <td><p></p></td>- </tr>-- <tr>- <td>BY_DEFAULT</td>- <td>2</td>- <td><p></p></td>- </tr>-- </tbody>- </table>-- <h3 id="bytebase.v1.GenerationMetadata.Type">GenerationMetadata.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></p></td>- </tr>-- <tr>- <td>VIRTUAL</td>- <td>1</td>- <td><p></p></td>- </tr>-- <tr>- <td>STORED</td>- <td>2</td>- <td><p></p></td>- </tr>-- </tbody>- </table>-- <h3 id="bytebase.v1.GetDatabaseSDLSchemaRequest.SDLFormat">GetDatabaseSDLSchemaRequest.SDLFormat</h3>- <p>SDLFormat specifies the output format for SDL schema.</p>- <table class="enum-table">- <thead>- <tr><td>Name</td><td>Number</td><td>Description</td></tr>- </thead>- <tbody>-- <tr>- <td>SDL_FORMAT_UNSPECIFIED</td>- <td>0</td>- <td><p>Unspecified format. Defaults to SINGLE_FILE.</p></td>- </tr>-- <tr>- <td>SINGLE_FILE</td>- <td>1</td>- <td><p>Single file format: returns the complete SDL schema as a single file.</p></td>- </tr>-- <tr>- <td>MULTI_FILE</td>- <td>2</td>- <td><p>Multi-file format: returns the SDL schema as a ZIP archive containing-multiple files organized by schema objects (tables, views, functions, etc.).</p></td>- </tr>-- </tbody>- </table>-- <h3 id="bytebase.v1.GetSchemaStringRequest.ObjectType">GetSchemaStringRequest.ObjectType</h3>+ <h3 id="bytebase.v1.Algorithm.MD5Mask">Algorithm.MD5Mask</h3><p></p>- <table class="enum-table">- <thead>- <tr><td>Name</td><td>Number</td><td>Description</td></tr>- </thead>- <tbody>-- <tr>- <td>OBJECT_TYPE_UNSPECIFIED</td>- <td>0</td>- <td><p></p></td>- </tr>-- <tr>- <td>DATABASE</td>- <td>1</td>- <td><p></p></td>- </tr>-- <tr>- <td>SCHEMA</td>- <td>2</td>- <td><p></p></td>- </tr>-- <tr>- <td>TABLE</td>- <td>3</td>- <td><p></p></td>- </tr>-- <tr>- <td>VIEW</td>- <td>4</td>- <td><p></p></td>- </tr>-- <tr>- <td>MATERIALIZED_VIEW</td>- <td>5</td>- <td><p></p></td>- </tr>-- <tr>- <td>FUNCTION</td>- <td>6</td>- <td><p></p></td>- </tr>-- <tr>- <td>PROCEDURE</td>- <td>7</td>- <td><p></p></td>- </tr>-- <tr>- <td>SEQUENCE</td>- <td>8</td>- <td><p></p></td>- </tr>-- </tbody>- </table>+++ <table class="field-table">+ <thead>+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>salt</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>salt is the salt value to generate a different hash that with the word alone. </p></td>+ </tr>++ </tbody>+ </table>++++- <h3 id="bytebase.v1.StreamMetadata.Mode">StreamMetadata.Mode</h3>+ <h3 id="bytebase.v1.Algorithm.RangeMask">Algorithm.RangeMask</h3><p></p>- <table class="enum-table">- <thead>- <tr><td>Name</td><td>Number</td><td>Description</td></tr>- </thead>- <tbody>-- <tr>- <td>MODE_UNSPECIFIED</td>- <td>0</td>- <td><p></p></td>- </tr>-- <tr>- <td>DEFAULT</td>- <td>1</td>- <td><p></p></td>- </tr>-- <tr>- <td>APPEND_ONLY</td>- <td>2</td>- <td><p></p></td>- </tr>-- <tr>- <td>INSERT_ONLY</td>- <td>3</td>- <td><p></p></td>- </tr>-- </tbody>- </table>+++ <table class="field-table">+ <thead>+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>slices</td>+ <td><a href="#bytebase.v1.Algorithm.RangeMask.Slice">Algorithm.RangeMask.Slice</a></td>+ <td>repeated</td>+ <td><p>We store it as a repeated field to face the fact that the original value may have multiple parts should be masked.+But frontend can be started with a single rule easily. </p></td>+ </tr>++ </tbody>+ </table>++++- <h3 id="bytebase.v1.StreamMetadata.Type">StreamMetadata.Type</h3>+ <h3 id="bytebase.v1.Algorithm.RangeMask.Slice">Algorithm.RangeMask.Slice</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></p></td>- </tr>-- <tr>- <td>DELTA</td>- <td>1</td>- <td><p></p></td>- </tr>-- </tbody>- </table>-- <h3 id="bytebase.v1.SyncStatus">SyncStatus</h3>- <p>SyncStatus is the status of the database sync operation.</p>- <table class="enum-table">- <thead>- <tr><td>Name</td><td>Number</td><td>Description</td></tr>- </thead>- <tbody>-- <tr>- <td>SYNC_STATUS_UNSPECIFIED</td>- <td>0</td>- <td><p></p></td>- </tr>-- <tr>- <td>OK</td>- <td>1</td>- <td><p>The database was synced successfully.</p></td>- </tr>-- <tr>- <td>FAILED</td>- <td>2</td>- <td><p>The database sync failed.</p></td>- </tr>-- </tbody>- </table>+++ <table class="field-table">+ <thead>+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>start</td>+ <td><a href="#int32">int32</a></td>+ <td></td>+ <td><p>start is the start character index (0-based) of the original value, should be less than end.+Uses character indices (not byte offsets) for display-oriented masking.+Example: For "你好world", character index 2 refers to 'w' (the 3rd character). </p></td>+ </tr>++ <tr>+ <td>end</td>+ <td><a href="#int32">int32</a></td>+ <td></td>+ <td><p>end is the end character index (exclusive) of the original value.+Uses character indices (not byte offsets) for display-oriented masking. </p></td>+ </tr>++ <tr>+ <td>substitution</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>substitution is the string used to replace the OriginalValue[start:end). </p></td>+ </tr>++ </tbody>+ </table>++++- <h3 id="bytebase.v1.TablePartitionMetadata.Type">TablePartitionMetadata.Type</h3>- <p>Type is the type of a table partition, some database engines may not</p><p>support all types. Only avilable for the following database engines now:</p><p>MySQL: RANGE, RANGE COLUMNS, LIST, LIST COLUMNS, HASH, LINEAR HASH, KEY,</p><p>LINEAR_KEY</p><p>(https://dev.mysql.com/doc/refman/8.0/en/partitioning-types.html) TiDB:</p><p>RANGE, RANGE COLUMNS, LIST, LIST COLUMNS, HASH, KEY PostgreSQL: RANGE,</p><p>LIST, HASH (https://www.postgresql.org/docs/current/ddl-partitioning.html)</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></p></td>- </tr>-- <tr>- <td>RANGE</td>- <td>1</td>- <td><p></p></td>- </tr>-- <tr>- <td>RANGE_COLUMNS</td>- <td>2</td>- <td><p></p></td>- </tr>-- <tr>- <td>LIST</td>- <td>3</td>- <td><p></p></td>- </tr>-- <tr>- <td>LIST_COLUMNS</td>- <td>4</td>- <td><p></p></td>- </tr>-- <tr>- <td>HASH</td>- <td>5</td>- <td><p></p></td>- </tr>-- <tr>- <td>LINEAR_HASH</td>- <td>6</td>- <td><p></p></td>- </tr>-- <tr>- <td>KEY</td>- <td>7</td>- <td><p></p></td>- </tr>-- <tr>- <td>LINEAR_KEY</td>- <td>8</td>- <td><p></p></td>- </tr>-- </tbody>- </table>+ <h3 id="bytebase.v1.Announcement">Announcement</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>level</td>+ <td><a href="#bytebase.v1.Announcement.AlertLevel">Announcement.AlertLevel</a></td>+ <td></td>+ <td><p>The alert level of announcement </p></td>+ </tr>++ <tr>+ <td>text</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The text of announcement </p></td>+ </tr>++ <tr>+ <td>link</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The optional link, user can follow the link to check extra details </p></td>+ </tr>++ </tbody>+ </table>++++- <h3 id="bytebase.v1.TaskMetadata.State">TaskMetadata.State</h3>+ <h3 id="bytebase.v1.AppIMSetting">AppIMSetting</h3><p></p>- <table class="enum-table">- <thead>- <tr><td>Name</td><td>Number</td><td>Description</td></tr>- </thead>- <tbody>-- <tr>- <td>STATE_UNSPECIFIED</td>- <td>0</td>- <td><p></p></td>- </tr>-- <tr>- <td>STARTED</td>- <td>1</td>- <td><p></p></td>- </tr>-- <tr>- <td>SUSPENDED</td>- <td>2</td>- <td><p></p></td>- </tr>-- </tbody>- </table>--++ <table class="field-table">+ <thead>+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>settings</td>+ <td><a href="#bytebase.v1.AppIMSetting.IMSetting">AppIMSetting.IMSetting</a></td>+ <td>repeated</td>+ <td><p> </p></td>+ </tr>++ </tbody>+ </table>+++- <h3 id="bytebase.v1.DatabaseService">DatabaseService</h3>- <p>DatabaseService manages databases and their schemas.</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>GetDatabase</td>- <td><a href="#bytebase.v1.GetDatabaseRequest">GetDatabaseRequest</a></td>- <td><a href="#bytebase.v1.Database">Database</a></td>- <td><p>Retrieves a database by name.-Permissions required: bb.databases.get</p></td>- </tr>-- <tr>- <td>BatchGetDatabases</td>- <td><a href="#bytebase.v1.BatchGetDatabasesRequest">BatchGetDatabasesRequest</a></td>- <td><a href="#bytebase.v1.BatchGetDatabasesResponse">BatchGetDatabasesResponse</a></td>- <td><p>Retrieves multiple databases by their names.-Permissions required: bb.databases.get</p></td>- </tr>-- <tr>- <td>ListDatabases</td>- <td><a href="#bytebase.v1.ListDatabasesRequest">ListDatabasesRequest</a></td>- <td><a href="#bytebase.v1.ListDatabasesResponse">ListDatabasesResponse</a></td>- <td><p>Lists databases in a project, instance, or workspace.-Permissions required: bb.projects.get (for project parent), bb.databases.list (for workspace parent), or bb.instances.get (for instance parent)</p></td>- </tr>-- <tr>- <td>UpdateDatabase</td>- <td><a href="#bytebase.v1.UpdateDatabaseRequest">UpdateDatabaseRequest</a></td>- <td><a href="#bytebase.v1.Database">Database</a></td>- <td><p>Updates database properties such as labels and project assignment.-Permissions required: bb.databases.update</p></td>- </tr>-- <tr>- <td>BatchUpdateDatabases</td>- <td><a href="#bytebase.v1.BatchUpdateDatabasesRequest">BatchUpdateDatabasesRequest</a></td>- <td><a href="#bytebase.v1.BatchUpdateDatabasesResponse">BatchUpdateDatabasesResponse</a></td>- <td><p>Updates multiple databases in a single batch operation.-Permissions required: bb.databases.update</p></td>- </tr>-- <tr>- <td>SyncDatabase</td>- <td><a href="#bytebase.v1.SyncDatabaseRequest">SyncDatabaseRequest</a></td>- <td><a href="#bytebase.v1.SyncDatabaseResponse">SyncDatabaseResponse</a></td>- <td><p>Synchronizes database schema from the instance.-Permissions required: bb.databases.sync</p></td>- </tr>-- <tr>- <td>BatchSyncDatabases</td>- <td><a href="#bytebase.v1.BatchSyncDatabasesRequest">BatchSyncDatabasesRequest</a></td>- <td><a href="#bytebase.v1.BatchSyncDatabasesResponse">BatchSyncDatabasesResponse</a></td>- <td><p>Synchronizes multiple databases in a single batch operation.-Permissions required: bb.databases.sync</p></td>- </tr>-- <tr>- <td>GetDatabaseMetadata</td>- <td><a href="#bytebase.v1.GetDatabaseMetadataRequest">GetDatabaseMetadataRequest</a></td>- <td><a href="#bytebase.v1.DatabaseMetadata">DatabaseMetadata</a></td>- <td><p>Retrieves database metadata including tables, columns, and indexes.-Permissions required: bb.databases.getSchema</p></td>- </tr>-- <tr>- <td>GetDatabaseSchema</td>- <td><a href="#bytebase.v1.GetDatabaseSchemaRequest">GetDatabaseSchemaRequest</a></td>- <td><a href="#bytebase.v1.DatabaseSchema">DatabaseSchema</a></td>- <td><p>Retrieves database schema as DDL statements.-Permissions required: bb.databases.getSchema</p></td>- </tr>-- <tr>- <td>GetDatabaseSDLSchema</td>- <td><a href="#bytebase.v1.GetDatabaseSDLSchemaRequest">GetDatabaseSDLSchemaRequest</a></td>- <td><a href="#bytebase.v1.DatabaseSDLSchema">DatabaseSDLSchema</a></td>- <td><p>Retrieves database schema in SDL (Schema Definition Language) format.-Permissions required: bb.databases.getSchema</p></td>- </tr>-- <tr>- <td>DiffSchema</td>- <td><a href="#bytebase.v1.DiffSchemaRequest">DiffSchemaRequest</a></td>- <td><a href="#bytebase.v1.DiffSchemaResponse">DiffSchemaResponse</a></td>- <td><p>Compares and generates migration statements between two schemas.-Permissions required: bb.databases.get</p></td>- </tr>-- <tr>- <td>ListChangelogs</td>- <td><a href="#bytebase.v1.ListChangelogsRequest">ListChangelogsRequest</a></td>- <td><a href="#bytebase.v1.ListChangelogsResponse">ListChangelogsResponse</a></td>- <td><p>Lists migration history for a database.-Permissions required: bb.changelogs.list</p></td>- </tr>-- <tr>- <td>GetChangelog</td>- <td><a href="#bytebase.v1.GetChangelogRequest">GetChangelogRequest</a></td>- <td><a href="#bytebase.v1.Changelog">Changelog</a></td>- <td><p>Retrieves a specific changelog entry.-Permissions required: bb.changelogs.get</p></td>- </tr>-- <tr>- <td>GetSchemaString</td>- <td><a href="#bytebase.v1.GetSchemaStringRequest">GetSchemaStringRequest</a></td>- <td><a href="#bytebase.v1.GetSchemaStringResponse">GetSchemaStringResponse</a></td>- <td><p>Generates schema DDL for a database object.-Permissions required: bb.databases.getSchema</p></td>- </tr>-- </tbody>- </table>+ <h3 id="bytebase.v1.AppIMSetting.DingTalk">AppIMSetting.DingTalk</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>client_id</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>client_secret</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>robot_code</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ </tbody>+ </table>+-- <h4>Methods with HTTP bindings</h4>- <table>++++ <h3 id="bytebase.v1.AppIMSetting.Feishu">AppIMSetting.Feishu</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>app_id</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>app_secret</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ </tbody>+ </table>++++++ <h3 id="bytebase.v1.AppIMSetting.IMSetting">AppIMSetting.IMSetting</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>type</td>+ <td><a href="#bytebase.v1.WebhookType">WebhookType</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>- <tr>- <td>GetDatabase</td>- <td>GET</td>- <td>/v1/{name=instances/*/databases/*}</td>- <td></td>- </tr>+ <tr>+ <td>slack</td>+ <td><a href="#bytebase.v1.AppIMSetting.Slack">AppIMSetting.Slack</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>-+ <tr>+ <td>feishu</td>+ <td><a href="#bytebase.v1.AppIMSetting.Feishu">AppIMSetting.Feishu</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>+ <tr>+ <td>wecom</td>+ <td><a href="#bytebase.v1.AppIMSetting.Wecom">AppIMSetting.Wecom</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>- <tr>- <td>BatchGetDatabases</td>- <td>GET</td>- <td>/v1/{parent=projects/*}/databases:batchGet</td>- <td></td>- </tr>+ <tr>+ <td>lark</td>+ <td><a href="#bytebase.v1.AppIMSetting.Lark">AppIMSetting.Lark</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>- <tr>- <td>BatchGetDatabases</td>- <td>GET</td>- <td>/v1/{parent=instances/*}/databases:batchGet</td>- <td></td>- </tr>+ <tr>+ <td>dingtalk</td>+ <td><a href="#bytebase.v1.AppIMSetting.DingTalk">AppIMSetting.DingTalk</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>-+ <tr>+ <td>teams</td>+ <td><a href="#bytebase.v1.AppIMSetting.Teams">AppIMSetting.Teams</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>+ </tbody>+ </table>++++++ <h3 id="bytebase.v1.AppIMSetting.Lark">AppIMSetting.Lark</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>ListDatabases</td>- <td>GET</td>- <td>/v1/{parent=projects/*}/databases</td>- <td></td>- </tr>+ <tr>+ <td>app_id</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>- <tr>- <td>ListDatabases</td>- <td>GET</td>- <td>/v1/{parent=instances/*}/databases</td>- <td></td>- </tr>+ <tr>+ <td>app_secret</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>- <tr>- <td>ListDatabases</td>- <td>GET</td>- <td>/v1/{parent=workspaces/*}/databases</td>- <td></td>- </tr>+ </tbody>+ </table>++++++ <h3 id="bytebase.v1.AppIMSetting.Slack">AppIMSetting.Slack</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>token</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>+ </tbody>+ </table>++++++ <h3 id="bytebase.v1.AppIMSetting.Teams">AppIMSetting.Teams</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>UpdateDatabase</td>- <td>PATCH</td>- <td>/v1/{database.name=instances/*/databases/*}</td>- <td>database</td>- </tr>+ <tr>+ <td>tenant_id</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>Azure AD tenant ID (Directory ID). </p></td>+ </tr>-+ <tr>+ <td>client_id</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>Azure AD application (client) ID. </p></td>+ </tr>+ <tr>+ <td>client_secret</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>Azure AD client secret. </p></td>+ </tr>- <tr>- <td>BatchUpdateDatabases</td>- <td>POST</td>- <td>/v1/{parent=instances/*}/databases:batchUpdate</td>- <td>*</td>- </tr>+ </tbody>+ </table>++++++ <h3 id="bytebase.v1.AppIMSetting.Wecom">AppIMSetting.Wecom</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>corp_id</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>agent_id</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>secret</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ </tbody>+ </table>++++++ <h3 id="bytebase.v1.DataClassificationSetting">DataClassificationSetting</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>configs</td>+ <td><a href="#bytebase.v1.DataClassificationSetting.DataClassificationConfig">DataClassificationSetting.DataClassificationConfig</a></td>+ <td>repeated</td>+ <td><p> </p></td>+ </tr>+ </tbody>+ </table>++++++ <h3 id="bytebase.v1.DataClassificationSetting.DataClassificationConfig">DataClassificationSetting.DataClassificationConfig</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>SyncDatabase</td>- <td>POST</td>- <td>/v1/{name=instances/*/databases/*}:sync</td>- <td>*</td>- </tr>+ <tr>+ <td>id</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>id is the uuid for classification. Each project can chose one classification config. </p></td>+ </tr>-+ <tr>+ <td>title</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>+ <tr>+ <td>levels</td>+ <td><a href="#bytebase.v1.DataClassificationSetting.DataClassificationConfig.Level">DataClassificationSetting.DataClassificationConfig.Level</a></td>+ <td>repeated</td>+ <td><p>levels is user defined level list for classification. </p></td>+ </tr>- <tr>- <td>BatchSyncDatabases</td>- <td>POST</td>- <td>/v1/{parent=instances/*}/databases:batchSync</td>- <td>*</td>- </tr>+ <tr>+ <td>classification</td>+ <td><a href="#bytebase.v1.DataClassificationSetting.DataClassificationConfig.ClassificationEntry">DataClassificationSetting.DataClassificationConfig.ClassificationEntry</a></td>+ <td>repeated</td>+ <td><p>classification is the id - DataClassification map.+The id should in [0-9]+-[0-9]+-[0-9]+ format. </p></td>+ </tr>-+ </tbody>+ </table>++++++ <h3 id="bytebase.v1.DataClassificationSetting.DataClassificationConfig.ClassificationEntry">DataClassificationSetting.DataClassificationConfig.ClassificationEntry</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></td>+ <td><p> </p></td>+ </tr>- <tr>- <td>GetDatabaseMetadata</td>- <td>GET</td>- <td>/v1/{name=instances/*/databases/*/metadata}</td>- <td></td>- </tr>+ <tr>+ <td>value</td>+ <td><a href="#bytebase.v1.DataClassificationSetting.DataClassificationConfig.DataClassification">DataClassificationSetting.DataClassificationConfig.DataClassification</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>-+ </tbody>+ </table>++++++ <h3 id="bytebase.v1.DataClassificationSetting.DataClassificationConfig.DataClassification">DataClassificationSetting.DataClassificationConfig.DataClassification</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>id</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>id is the classification id in [0-9]+-[0-9]+-[0-9]+ format. </p></td>+ </tr>- <tr>- <td>GetDatabaseSchema</td>- <td>GET</td>- <td>/v1/{name=instances/*/databases/*/schema}</td>- <td></td>- </tr>+ <tr>+ <td>title</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>-+ <tr>+ <td>level</td>+ <td><a href="#int32">int32</a></td>+ <td>optional</td>+ <td><p>The sensitivity level. Maps to Level.level. </p></td>+ </tr>+ </tbody>+ </table>++++++ <h3 id="bytebase.v1.DataClassificationSetting.DataClassificationConfig.Level">DataClassificationSetting.DataClassificationConfig.Level</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>GetDatabaseSDLSchema</td>- <td>GET</td>- <td>/v1/{name=instances/*/databases/*/sdlSchema}</td>- <td></td>- </tr>+ <tr>+ <td>title</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>-+ <tr>+ <td>level</td>+ <td><a href="#int32">int32</a></td>+ <td></td>+ <td><p>The numeric level for ordering. Higher = more sensitive. </p></td>+ </tr>+ </tbody>+ </table>++++++ <h3 id="bytebase.v1.EmailSetting">EmailSetting</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>DiffSchema</td>- <td>POST</td>- <td>/v1/{name=instances/*/databases/*}:diffSchema</td>- <td>*</td>- </tr>+ <tr>+ <td>from</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>- <tr>- <td>DiffSchema</td>- <td>POST</td>- <td>/v1/{name=instances/*/databases/*/changelogs/*}:diffSchema</td>- <td>*</td>- </tr>+ <tr>+ <td>from_name</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>-+ <tr>+ <td>type</td>+ <td><a href="#bytebase.v1.EmailSetting.Type">EmailSetting.Type</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>+ <tr>+ <td>smtp</td>+ <td><a href="#bytebase.v1.EmailSetting.SMTPConfig">EmailSetting.SMTPConfig</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>- <tr>- <td>ListChangelogs</td>- <td>GET</td>- <td>/v1/{parent=instances/*/databases/*}/changelogs</td>- <td></td>- </tr>+ </tbody>+ </table>++++++ <h3 id="bytebase.v1.EmailSetting.SMTPConfig">EmailSetting.SMTPConfig</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>host</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>+ <tr>+ <td>port</td>+ <td><a href="#int32">int32</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>- <tr>- <td>GetChangelog</td>- <td>GET</td>- <td>/v1/{name=instances/*/databases/*/changelogs/*}</td>- <td></td>- </tr>+ <tr>+ <td>username</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>-+ <tr>+ <td>password</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>+ <tr>+ <td>encryption</td>+ <td><a href="#bytebase.v1.EmailSetting.SMTPConfig.Encryption">EmailSetting.SMTPConfig.Encryption</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>- <tr>- <td>GetSchemaString</td>- <td>GET</td>- <td>/v1/{name=instances/*/databases/*/schemaString}</td>- <td></td>- </tr>+ <tr>+ <td>authentication</td>+ <td><a href="#bytebase.v1.EmailSetting.SMTPConfig.Authentication">EmailSetting.SMTPConfig.Authentication</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>-</tbody></table>+---- <div class="file-heading">- <h2 id="v1/group_service.proto">v1/group_service.proto</h2><a href="#title">Top</a>- </div>- <p></p>+- <h3 id="bytebase.v1.BatchGetGroupsRequest">BatchGetGroupsRequest</h3>- <p>Request message for batch getting groups.</p>+ <h3 id="bytebase.v1.EnvironmentSetting">EnvironmentSetting</h3>+ <p></p><table class="field-table">@@ -18666,11 +18510,10 @@ Permissions required: bb.databases.getSchema</p></td><tbody><tr>- <td>names</td>- <td><a href="#string">string</a></td>+ <td>environments</td>+ <td><a href="#bytebase.v1.EnvironmentSetting.Environment">EnvironmentSetting.Environment</a></td><td>repeated</td>- <td><p>The group names to retrieve.-Format: groups/{email} </p></td>+ <td><p> </p></td></tr></tbody>@@ -18680,8 +18523,8 @@ Format: groups/{email} </p></td>- <h3 id="bytebase.v1.BatchGetGroupsResponse">BatchGetGroupsResponse</h3>- <p>Response message for batch getting groups.</p>+ <h3 id="bytebase.v1.EnvironmentSetting.Environment">EnvironmentSetting.Environment</h3>+ <p></p><table class="field-table">@@ -18691,10 +18534,42 @@ Format: groups/{email} </p></td><tbody><tr>- <td>groups</td>- <td><a href="#bytebase.v1.Group">Group</a></td>+ <td>name</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The resource name of the environment.+Format: environments/{environment}.+Output only. </p></td>+ </tr>++ <tr>+ <td>id</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The resource id of the environment.+This value should be 4-63 characters, and valid characters+are /[a-z][0-9]-/. </p></td>+ </tr>++ <tr>+ <td>title</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The display name of the environment. </p></td>+ </tr>++ <tr>+ <td>tags</td>+ <td><a href="#bytebase.v1.EnvironmentSetting.Environment.TagsEntry">EnvironmentSetting.Environment.TagsEntry</a></td><td>repeated</td>- <td><p>The groups from the specified request. </p></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>color</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p> </p></td></tr></tbody>@@ -18704,8 +18579,8 @@ Format: groups/{email} </p></td>- <h3 id="bytebase.v1.CreateGroupRequest">CreateGroupRequest</h3>- <p>Request message for creating a group.</p>+ <h3 id="bytebase.v1.EnvironmentSetting.Environment.TagsEntry">EnvironmentSetting.Environment.TagsEntry</h3>+ <p></p><table class="field-table">@@ -18715,18 +18590,17 @@ Format: groups/{email} </p></td><tbody><tr>- <td>group</td>- <td><a href="#bytebase.v1.Group">Group</a></td>+ <td>key</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>The group to create. </p></td>+ <td><p> </p></td></tr><tr>- <td>group_email</td>+ <td>value</td><td><a href="#string">string</a></td><td></td>- <td><p>The email to use for the group, which will become the final component-of the group's resource name. </p></td>+ <td><p> </p></td></tr></tbody>@@ -18736,8 +18610,8 @@ of the group's resource name. </p></td>- <h3 id="bytebase.v1.DeleteGroupRequest">DeleteGroupRequest</h3>- <p>Request message for deleting a group.</p>+ <h3 id="bytebase.v1.GetSettingRequest">GetSettingRequest</h3>+ <p>The request message for getting a setting.</p><table class="field-table">@@ -18750,8 +18624,7 @@ of the group's resource name. </p></td><td>name</td><td><a href="#string">string</a></td><td></td>- <td><p>The name of the group to delete.-Format: groups/{email} </p></td>+ <td><p>The resource name of the setting. </p></td></tr></tbody>@@ -18761,8 +18634,8 @@ Format: groups/{email} </p></td>- <h3 id="bytebase.v1.GetGroupRequest">GetGroupRequest</h3>- <p>Request message for getting a group.</p>+ <h3 id="bytebase.v1.GetSettingResponse">GetSettingResponse</h3>+ <p>The response message for getting a setting.</p><table class="field-table">@@ -18772,11 +18645,10 @@ Format: groups/{email} </p></td><tbody><tr>- <td>name</td>- <td><a href="#string">string</a></td>+ <td>setting</td>+ <td><a href="#bytebase.v1.Setting">Setting</a></td><td></td>- <td><p>The name of the group to retrieve.-Format: groups/{email} </p></td>+ <td><p> </p></td></tr></tbody>@@ -18786,8 +18658,15 @@ Format: groups/{email} </p></td>- <h3 id="bytebase.v1.Group">Group</h3>- <p>A group of users within the workspace.</p>+ <h3 id="bytebase.v1.ListSettingsRequest">ListSettingsRequest</h3>+ <p></p>++++++ <h3 id="bytebase.v1.ListSettingsResponse">ListSettingsResponse</h3>+ <p></p><table class="field-table">@@ -18797,46 +18676,86 @@ Format: groups/{email} </p></td><tbody><tr>- <td>name</td>+ <td>settings</td>+ <td><a href="#bytebase.v1.Setting">Setting</a></td>+ <td>repeated</td>+ <td><p>The settings from the specified request. </p></td>+ </tr>++ </tbody>+ </table>++++++ <h3 id="bytebase.v1.SemanticTypeSetting">SemanticTypeSetting</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>types</td>+ <td><a href="#bytebase.v1.SemanticTypeSetting.SemanticType">SemanticTypeSetting.SemanticType</a></td>+ <td>repeated</td>+ <td><p> </p></td>+ </tr>++ </tbody>+ </table>++++++ <h3 id="bytebase.v1.SemanticTypeSetting.SemanticType">SemanticTypeSetting.SemanticType</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>id</td><td><a href="#string">string</a></td><td></td>- <td><p>The name of the group to retrieve.-Format: groups/{group}, the group should be email or uuid. </p></td>+ <td><p>id is the uuid for semantic type. </p></td></tr><tr><td>title</td><td><a href="#string">string</a></td><td></td>- <td><p>The display title of the group. </p></td>+ <td><p>the title of the semantic type, it should not be empty. </p></td></tr><tr><td>description</td><td><a href="#string">string</a></td><td></td>- <td><p>The description of the group. </p></td>- </tr>-- <tr>- <td>members</td>- <td><a href="#bytebase.v1.GroupMember">GroupMember</a></td>- <td>repeated</td>- <td><p>The members of the group. </p></td>+ <td><p>the description of the semantic type, it can be empty. </p></td></tr><tr>- <td>source</td>- <td><a href="#string">string</a></td>+ <td>algorithm</td>+ <td><a href="#bytebase.v1.Algorithm">Algorithm</a></td><td></td>- <td><p>The source system where the group originated (e.g., Entra ID for SCIM sync). </p></td>+ <td><p> </p></td></tr><tr>- <td>email</td>+ <td>icon</td><td><a href="#string">string</a></td><td></td>- <td><p>The unique email for the group. </p></td>+ <td><p>icon is the icon for semantic type, it can be emoji or base64 encoded image. </p></td></tr></tbody>@@ -18846,8 +18765,8 @@ Format: groups/{group}, the group should be email or uuid. </p></td>- <h3 id="bytebase.v1.GroupMember">GroupMember</h3>- <p>A member of a group with a role.</p>+ <h3 id="bytebase.v1.Setting">Setting</h3>+ <p>The schema of setting.</p><table class="field-table">@@ -18857,19 +18776,19 @@ Format: groups/{group}, the group should be email or uuid. </p></td><tbody><tr>- <td>member</td>+ <td>name</td><td><a href="#string">string</a></td><td></td>- <td><p>Member is the principal who belong to this group.--Format: users/[email protected] </p></td>+ <td><p>The resource name of the setting.+Format: settings/{setting}+Example: "settings/SEMANTIC_TYPES" </p></td></tr><tr>- <td>role</td>- <td><a href="#bytebase.v1.GroupMember.Role">GroupMember.Role</a></td>+ <td>value</td>+ <td><a href="#bytebase.v1.SettingValue">SettingValue</a></td><td></td>- <td><p>The member's role in the group. </p></td>+ <td><p>The configuration value of the setting. </p></td></tr></tbody>@@ -18879,8 +18798,8 @@ Format: users/[email protected] </p></td>- <h3 id="bytebase.v1.ListGroupsRequest">ListGroupsRequest</h3>- <p>Request message for listing groups.</p>+ <h3 id="bytebase.v1.SettingValue">SettingValue</h3>+ <p>The data in setting value.</p><table class="field-table">@@ -18890,46 +18809,59 @@ Format: users/[email protected] </p></td><tbody><tr>- <td>page_size</td>- <td><a href="#int32">int32</a></td>+ <td>app_im</td>+ <td><a href="#bytebase.v1.AppIMSetting">AppIMSetting</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>workspace_profile</td>+ <td><a href="#bytebase.v1.WorkspaceProfileSetting">WorkspaceProfileSetting</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>workspace_approval</td>+ <td><a href="#bytebase.v1.WorkspaceApprovalSetting">WorkspaceApprovalSetting</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>data_classification</td>+ <td><a href="#bytebase.v1.DataClassificationSetting">DataClassificationSetting</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>semantic_type</td>+ <td><a href="#bytebase.v1.SemanticTypeSetting">SemanticTypeSetting</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>ai</td>+ <td><a href="#bytebase.v1.AISetting">AISetting</a></td><td></td>- <td><p>The maximum number of groups to return. The service may return fewer than-this value.-If unspecified, at most 10 groups 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>environment</td>+ <td><a href="#bytebase.v1.EnvironmentSetting">EnvironmentSetting</a></td><td></td>- <td><p>A page token, received from a previous `ListGroups` call.-Provide this to retrieve the subsequent page.--When paginating, all other parameters provided to `ListGroups` must match-the call that provided the page token. </p></td>+ <td><p> </p></td></tr><tr>- <td>filter</td>- <td><a href="#string">string</a></td>+ <td>email</td>+ <td><a href="#bytebase.v1.EmailSetting">EmailSetting</a></td><td></td>- <td><p>Filter is used to filter groups returned in the list.-The syntax and semantics of CEL are documented at https://github.com/google/cel-spec--Supported filter:-- title: the group title, support "==" and ".contains()" operator.-- email: the group email, support "==" and ".contains()" operator.-- project: the project full name in "projects/{id}" format, support "==" operator.--For example:-title == "dba"-email == "[email protected]"-title.contains("dba")-email.contains("dba")-project == "projects/sample-project"-You can combine filter conditions like:-title.contains("dba") || email.contains("dba") </p></td>+ <td><p> </p></td></tr></tbody>@@ -18939,8 +18871,8 @@ title.contains("dba") || email.contains("dba") </p></td>- <h3 id="bytebase.v1.ListGroupsResponse">ListGroupsResponse</h3>- <p>Response message for listing groups.</p>+ <h3 id="bytebase.v1.TestEmailSettingRequest">TestEmailSettingRequest</h3>+ <p></p><table class="field-table">@@ -18950,18 +18882,24 @@ title.contains("dba") || email.contains("dba") </p></td><tbody><tr>- <td>groups</td>- <td><a href="#bytebase.v1.Group">Group</a></td>- <td>repeated</td>- <td><p>The groups from the specified request. </p></td>+ <td>parent</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p> </p></td></tr><tr>- <td>next_page_token</td>+ <td>email_setting</td>+ <td><a href="#bytebase.v1.EmailSetting">EmailSetting</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>to</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>@@ -18971,8 +18909,8 @@ If this field is omitted, there are no subsequent pages. </p></td>- <h3 id="bytebase.v1.UpdateGroupRequest">UpdateGroupRequest</h3>- <p>Request message for updating a group.</p>+ <h3 id="bytebase.v1.TestEmailSettingResponse">TestEmailSettingResponse</h3>+ <p></p><table class="field-table">@@ -18982,28 +18920,17 @@ If this field is omitted, there are no subsequent pages. </p></td><tbody><tr>- <td>group</td>- <td><a href="#bytebase.v1.Group">Group</a></td>- <td></td>- <td><p>The group to update.--The group's `name` field is used to identify the group to update.-Format: groups/{email} </p></td>- </tr>-- <tr>- <td>update_mask</td>- <td><a href="#google.protobuf.FieldMask">google.protobuf.FieldMask</a></td>+ <td>success</td>+ <td><a href="#bool">bool</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>error</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>If set to true, and the group is not found, a new group will be created.-In this situation, `update_mask` is ignored. </p></td>+ <td><p> </p></td></tr></tbody>@@ -19013,191 +18940,77 @@ In this situation, `update_mask` is ignored. </p></td>--- <h3 id="bytebase.v1.GroupMember.Role">GroupMember.Role</h3>- <p>The role of a group member.</p>- <table class="enum-table">- <thead>- <tr><td>Name</td><td>Number</td><td>Description</td></tr>- </thead>- <tbody>-- <tr>- <td>ROLE_UNSPECIFIED</td>- <td>0</td>- <td><p>Unspecified role.</p></td>- </tr>-- <tr>- <td>OWNER</td>- <td>1</td>- <td><p>Group owner.</p></td>- </tr>-- <tr>- <td>MEMBER</td>- <td>2</td>- <td><p>Group member.</p></td>- </tr>-- </tbody>- </table>------ <h3 id="bytebase.v1.GroupService">GroupService</h3>- <p>GroupService manages user groups for organizing users and permissions.</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>GetGroup</td>- <td><a href="#bytebase.v1.GetGroupRequest">GetGroupRequest</a></td>- <td><a href="#bytebase.v1.Group">Group</a></td>- <td><p>Gets a group by name.-Group members or users with bb.groups.get permission can get the group.-Permissions required: bb.groups.get OR caller is the group member</p></td>- </tr>-- <tr>- <td>BatchGetGroups</td>- <td><a href="#bytebase.v1.BatchGetGroupsRequest">BatchGetGroupsRequest</a></td>- <td><a href="#bytebase.v1.BatchGetGroupsResponse">BatchGetGroupsResponse</a></td>- <td><p>Gets multiple groups in a single request.-Group members or users with bb.groups.get permission can get the group.-Permissions required: bb.groups.get OR caller is the group member</p></td>- </tr>-- <tr>- <td>ListGroups</td>- <td><a href="#bytebase.v1.ListGroupsRequest">ListGroupsRequest</a></td>- <td><a href="#bytebase.v1.ListGroupsResponse">ListGroupsResponse</a></td>- <td><p>Lists all groups in the workspace.-Permissions required: bb.groups.list</p></td>- </tr>-- <tr>- <td>CreateGroup</td>- <td><a href="#bytebase.v1.CreateGroupRequest">CreateGroupRequest</a></td>- <td><a href="#bytebase.v1.Group">Group</a></td>- <td><p>Creates a new group.-Permissions required: bb.groups.create</p></td>- </tr>-- <tr>- <td>UpdateGroup</td>- <td><a href="#bytebase.v1.UpdateGroupRequest">UpdateGroupRequest</a></td>- <td><a href="#bytebase.v1.Group">Group</a></td>- <td><p>Updates a group. Group owners or users with bb.groups.update permission can update.-Permissions required: bb.groups.update OR caller is group owner-When allow_missing=true, also requires: bb.groups.create</p></td>- </tr>-- <tr>- <td>DeleteGroup</td>- <td><a href="#bytebase.v1.DeleteGroupRequest">DeleteGroupRequest</a></td>- <td><a href="#google.protobuf.Empty">.google.protobuf.Empty</a></td>- <td><p>Deletes a group. Group owners or users with bb.groups.delete permission can delete.-Permissions required: bb.groups.delete OR caller is group owner</p></td>- </tr>-- </tbody>- </table>+ <h3 id="bytebase.v1.UpdateSettingRequest">UpdateSettingRequest</h3>+ <p>The request message for updating or creating a setting.</p>--- <h4>Methods with HTTP bindings</h4>- <table>+ <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>GetGroup</td>- <td>GET</td>- <td>/v1/{name=groups/*}</td>- <td></td>- </tr>----- <tr>- <td>BatchGetGroups</td>- <td>GET</td>- <td>/v1/groups:batchGet</td>- <td></td>- </tr>----- <tr>- <td>ListGroups</td>- <td>GET</td>- <td>/v1/groups</td>- <td></td>- </tr>----- <tr>- <td>CreateGroup</td>- <td>POST</td>- <td>/v1/groups</td>- <td>group</td>- </tr>---- <tr>- <td>UpdateGroup</td>- <td>PATCH</td>- <td>/v1/{group.name=groups/*}</td>- <td>group</td>- </tr>+ <tr>+ <td>setting</td>+ <td><a href="#bytebase.v1.Setting">Setting</a></td>+ <td></td>+ <td><p>The setting to update. </p></td>+ </tr>-+ <tr>+ <td>validate_only</td>+ <td><a href="#bool">bool</a></td>+ <td></td>+ <td><p>validate_only is a flag to indicate whether to validate the setting value,+server would not persist the setting value if it is true. </p></td>+ </tr>+ <tr>+ <td>allow_missing</td>+ <td><a href="#bool">bool</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>- <tr>- <td>DeleteGroup</td>- <td>DELETE</td>- <td>/v1/{name=groups/*}</td>- <td></td>- </tr>+ <tr>+ <td>update_mask</td>+ <td><a href="#google.protobuf.FieldMask">google.protobuf.FieldMask</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>-</tbody></table>++-- <div class="file-heading">- <h2 id="v1/idp_service.proto">v1/idp_service.proto</h2><a href="#title">Top</a>- </div>- <p></p>+ <h3 id="bytebase.v1.WorkspaceApprovalSetting">WorkspaceApprovalSetting</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>rules</td>+ <td><a href="#bytebase.v1.WorkspaceApprovalSetting.Rule">WorkspaceApprovalSetting.Rule</a></td>+ <td>repeated</td>+ <td><p> </p></td>+ </tr>++ </tbody>+ </table>+++- <h3 id="bytebase.v1.CreateIdentityProviderRequest">CreateIdentityProviderRequest</h3>+ <h3 id="bytebase.v1.WorkspaceApprovalSetting.Rule">WorkspaceApprovalSetting.Rule</h3><p></p>@@ -19208,28 +19021,51 @@ Permissions required: bb.groups.delete OR caller is group owner</p></td><tbody><tr>- <td>identity_provider</td>- <td><a href="#bytebase.v1.IdentityProvider">IdentityProvider</a></td>+ <td>template</td>+ <td><a href="#bytebase.v1.ApprovalTemplate">ApprovalTemplate</a></td><td></td>- <td><p>The identity provider to create. </p></td>+ <td><p> </p></td></tr><tr>- <td>identity_provider_id</td>- <td><a href="#string">string</a></td>+ <td>condition</td>+ <td><a href="#google.type.Expr">google.type.Expr</a></td><td></td>- <td><p>The ID to use for the identity provider, which will become the final component of-the identity provider's resource name.+ <td><p>The condition that is associated with the rule.+The syntax and semantics of CEL are documented at https://github.com/google/cel-spec-This value should be 4-63 characters, and valid characters-are /[a-z][0-9]-/. </p></td>+The `source` field filters which rules apply. The `condition` field then evaluates with full context.++All supported variables:+statement.affected_rows: affected row count in the DDL/DML, support "==", "!=", "<", "<=", ">", ">=" operations.+statement.table_rows: table row count number, support "==", "!=", "<", "<=", ">", ">=" operations.+resource.environment_id: the environment resource id, support "==", "!=", "in [xx]", "!(in [xx])" operations.+resource.project_id: the project resource id, support "==", "!=", "in [xx]", "!(in [xx])", "contains()", "matches()", "startsWith()", "endsWith()" operations.+resource.db_engine: the database engine type, support "==", "!=", "in [xx]", "!(in [xx])" operations. Check the Engine enum for values.+statement.sql_type: the SQL type, support "==", "!=", "in [xx]", "!(in [xx])" operations.+resource.database_name: the database name, support "==", "!=", "in [xx]", "!(in [xx])", "contains()", "matches()", "startsWith()", "endsWith()" operations.+resource.schema_name: the schema name, support "==", "!=", "in [xx]", "!(in [xx])", "contains()", "matches()", "startsWith()", "endsWith()" operations.+resource.table_name: the table name, support "==", "!=", "in [xx]", "!(in [xx])", "contains()", "matches()", "startsWith()", "endsWith()" operations.+statement.text: the SQL statement, support "contains()", "matches()", "startsWith()", "endsWith()" operations.+request.expiration_days: the role expiration days for the request, support "==", "!=", "<", "<=", ">", ">=" operations.+request.role: the request role full name, support "==", "!=", "in [xx]", "!(in [xx])", "contains()", "matches()", "startsWith()", "endsWith()" operations.++When source is CHANGE_DATABASE, support: statement.*, resource.* (excluding request.*)+When source is CREATE_DATABASE, support: resource.environment_id, resource.project_id, resource.db_engine, resource.database_name+When source is EXPORT_DATA, support: resource.environment_id, resource.project_id, resource.db_engine, resource.database_name, resource.schema_name, resource.table_name+When source is REQUEST_ROLE, support: resource.project_id, request.expiration_days, request.role+When source is REQUEST_ACCESS, support: resource.environment_id, resource.project_id, request.unmask++For examples:+resource.environment_id == "prod" && statement.affected_rows >= 100+resource.table_name.matches("sensitive_.*") && resource.db_engine == "MYSQL" </p></td></tr><tr>- <td>validate_only</td>- <td><a href="#bool">bool</a></td>+ <td>source</td>+ <td><a href="#bytebase.v1.WorkspaceApprovalSetting.Rule.Source">WorkspaceApprovalSetting.Rule.Source</a></td><td></td>- <td><p>If set to true, the request will be validated without actually creating the identity provider. </p></td>+ <td><p> </p></td></tr></tbody>@@ -19239,7 +19075,7 @@ are /[a-z][0-9]-/. </p></td>- <h3 id="bytebase.v1.DeleteIdentityProviderRequest">DeleteIdentityProviderRequest</h3>+ <h3 id="bytebase.v1.WorkspaceProfileSetting">WorkspaceProfileSetting</h3><p></p>@@ -19250,11 +19086,154 @@ are /[a-z][0-9]-/. </p></td><tbody><tr>- <td>name</td>+ <td>external_url</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The external URL is used for sso authentication callback. </p></td>+ </tr>++ <tr>+ <td>disallow_signup</td>+ <td><a href="#bool">bool</a></td>+ <td></td>+ <td><p>Disallow self-service signup, users can only be invited by the owner. </p></td>+ </tr>++ <tr>+ <td>require_mfa</td>+ <td><a href="#bool">bool</a></td>+ <td></td>+ <td><p>Require MFA for all users. </p></td>+ </tr>++ <tr>+ <td>refresh_token_duration</td>+ <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>+ <td></td>+ <td><p>The duration for refresh token. Default is 7 days. </p></td>+ </tr>++ <tr>+ <td>announcement</td>+ <td><a href="#bytebase.v1.Announcement">Announcement</a></td>+ <td></td>+ <td><p>The setting of custom announcement </p></td>+ </tr>++ <tr>+ <td>maximum_role_expiration</td>+ <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>+ <td></td>+ <td><p>The max duration for role expired. </p></td>+ </tr>++ <tr>+ <td>domains</td>+ <td><a href="#string">string</a></td>+ <td>repeated</td>+ <td><p>The workspace domain, e.g., bytebase.com. </p></td>+ </tr>++ <tr>+ <td>enforce_identity_domain</td>+ <td><a href="#bool">bool</a></td>+ <td></td>+ <td><p>Only user and group from the domains can be created and login. </p></td>+ </tr>++ <tr>+ <td>database_change_mode</td>+ <td><a href="#bytebase.v1.DatabaseChangeMode">DatabaseChangeMode</a></td>+ <td></td>+ <td><p>The workspace database change mode. </p></td>+ </tr>++ <tr>+ <td>disallow_password_signin</td>+ <td><a href="#bool">bool</a></td>+ <td></td>+ <td><p>Whether to disallow password signin. (Except workspace admins) </p></td>+ </tr>++ <tr>+ <td>enable_metric_collection</td>+ <td><a href="#bool">bool</a></td>+ <td></td>+ <td><p>Whether to enable metric collection for the workspace. </p></td>+ </tr>++ <tr>+ <td>inactive_session_timeout</td>+ <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>+ <td></td>+ <td><p>The session expiration time if not activity detected for the user. Value <= 0 means no limit. </p></td>+ </tr>++ <tr>+ <td>enable_audit_log_stdout</td>+ <td><a href="#bool">bool</a></td>+ <td></td>+ <td><p>Whether to enable audit logging to stdout in structured JSON format.+Requires TEAM or ENTERPRISE license. </p></td>+ </tr>++ <tr>+ <td>watermark</td>+ <td><a href="#bool">bool</a></td>+ <td></td>+ <td><p>Whether to display watermark on pages.+Requires ENTERPRISE license. </p></td>+ </tr>++ <tr>+ <td>directory_sync_token</td><td><a href="#string">string</a></td><td></td>- <td><p>The name of the identity provider to delete.-Format: idps/{identity_provider} </p></td>+ <td><p>The token for directory sync authentication. </p></td>+ </tr>++ <tr>+ <td>password_restriction</td>+ <td><a href="#bytebase.v1.WorkspaceProfileSetting.PasswordRestriction">WorkspaceProfileSetting.PasswordRestriction</a></td>+ <td></td>+ <td><p>Password restriction settings. </p></td>+ </tr>++ <tr>+ <td>access_token_duration</td>+ <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>+ <td></td>+ <td><p>The duration for access token. Default is 1 hour. </p></td>+ </tr>++ <tr>+ <td>enable_debug</td>+ <td><a href="#bool">bool</a></td>+ <td></td>+ <td><p>Whether debug mode is enabled. </p></td>+ </tr>++ <tr>+ <td>sql_result_size</td>+ <td><a href="#int64">int64</a></td>+ <td></td>+ <td><p>The maximum result size limit in bytes for query and export, works for the SQL Editor and Export Center.+The default value is 100MB, we will use the default value if the setting not exists, or the limit <= 0. </p></td>+ </tr>++ <tr>+ <td>query_timeout</td>+ <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>+ <td></td>+ <td><p>The query timeout duration for query and export, works for the SQL Editor and Export Center. </p></td>+ </tr>++ <tr>+ <td>allow_email_code_signin</td>+ <td><a href="#bool">bool</a></td>+ <td></td>+ <td><p>Allow signin/signup using email + a 6-digit one-time verification code.+Requires the EMAIL setting to be configured on the workspace. </p></td></tr></tbody>@@ -19264,8 +19243,8 @@ Format: idps/{identity_provider} </p></td>- <h3 id="bytebase.v1.FieldMapping">FieldMapping</h3>- <p>FieldMapping saves the field names from user info API of identity provider.</p><p>As we save all raw json string of user info response data into `principal.idp_user_info`,</p><p>we can extract the relevant data based with `FieldMapping`.</p>+ <h3 id="bytebase.v1.WorkspaceProfileSetting.PasswordRestriction">WorkspaceProfileSetting.PasswordRestriction</h3>+ <p></p><table class="field-table">@@ -19275,57 +19254,52 @@ Format: idps/{identity_provider} </p></td><tbody><tr>- <td>identifier</td>- <td><a href="#string">string</a></td>+ <td>min_length</td>+ <td><a href="#int32">int32</a></td><td></td>- <td><p>Identifier is the field name of the unique identifier in 3rd-party idp user info. Required. </p></td>+ <td><p>min_length is the minimum length for password, should no less than 8. </p></td></tr><tr>- <td>display_name</td>- <td><a href="#string">string</a></td>+ <td>require_number</td>+ <td><a href="#bool">bool</a></td><td></td>- <td><p>DisplayName is the field name of display name in 3rd-party idp user info. Optional. </p></td>+ <td><p>require_number requires the password must contains at least one number. </p></td></tr><tr>- <td>phone</td>- <td><a href="#string">string</a></td>+ <td>require_letter</td>+ <td><a href="#bool">bool</a></td><td></td>- <td><p>Phone is the field name of primary phone in 3rd-party idp user info. Optional. </p></td>+ <td><p>require_letter requires the password must contains at least one letter, regardless of upper case or lower case </p></td></tr><tr>- <td>groups</td>- <td><a href="#string">string</a></td>+ <td>require_uppercase_letter</td>+ <td><a href="#bool">bool</a></td><td></td>- <td><p>Groups is the field name of groups in 3rd-party idp user info. Optional.-Mainly used for OIDC: https://developer.okta.com/docs/guides/customize-tokens-groups-claim/main/ </p></td>+ <td><p>require_uppercase_letter requires the password must contains at least one upper case letter. </p></td></tr>- </tbody>- </table>------ <h3 id="bytebase.v1.GetIdentityProviderRequest">GetIdentityProviderRequest</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>require_special_character</td>+ <td><a href="#bool">bool</a></td>+ <td></td>+ <td><p>require_special_character requires the password must contains at least one special character. </p></td>+ </tr><tr>- <td>name</td>- <td><a href="#string">string</a></td>+ <td>require_reset_password_for_first_login</td>+ <td><a href="#bool">bool</a></td><td></td>- <td><p>The name of the identity provider to retrieve.-Format: idps/{idp} </p></td>+ <td><p>require_reset_password_for_first_login requires users to reset their password after the 1st login. </p></td>+ </tr>++ <tr>+ <td>password_rotation</td>+ <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>+ <td></td>+ <td><p>password_rotation requires users to reset their password after the duration. </p></td></tr></tbody>@@ -19335,339 +19309,470 @@ Format: idps/{idp} </p></td>- <h3 id="bytebase.v1.IdentityProvider">IdentityProvider</h3>+++ <h3 id="bytebase.v1.AISetting.Provider">AISetting.Provider</h3>+ <p></p>+ <table class="enum-table">+ <thead>+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>PROVIDER_UNSPECIFIED</td>+ <td>0</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>OPEN_AI</td>+ <td>1</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>CLAUDE</td>+ <td>2</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>GEMINI</td>+ <td>3</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>AZURE_OPENAI</td>+ <td>4</td>+ <td><p></p></td>+ </tr>++ </tbody>+ </table>++ <h3 id="bytebase.v1.Algorithm.InnerOuterMask.MaskType">Algorithm.InnerOuterMask.MaskType</h3>+ <p></p>+ <table class="enum-table">+ <thead>+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>MASK_TYPE_UNSPECIFIED</td>+ <td>0</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>INNER</td>+ <td>1</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>OUTER</td>+ <td>2</td>+ <td><p></p></td>+ </tr>++ </tbody>+ </table>++ <h3 id="bytebase.v1.Announcement.AlertLevel">Announcement.AlertLevel</h3>+ <p>We support three levels of AlertLevel: INFO, WARNING, and ERROR.</p>+ <table class="enum-table">+ <thead>+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>ALERT_LEVEL_UNSPECIFIED</td>+ <td>0</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>INFO</td>+ <td>1</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>WARNING</td>+ <td>2</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>CRITICAL</td>+ <td>3</td>+ <td><p></p></td>+ </tr>++ </tbody>+ </table>++ <h3 id="bytebase.v1.DatabaseChangeMode">DatabaseChangeMode</h3>+ <p></p>+ <table class="enum-table">+ <thead>+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>DATABASE_CHANGE_MODE_UNSPECIFIED</td>+ <td>0</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>PIPELINE</td>+ <td>1</td>+ <td><p>A more advanced database change process, including custom approval workflows and other advanced features.+Default to this mode.</p></td>+ </tr>++ <tr>+ <td>EDITOR</td>+ <td>2</td>+ <td><p>A simple database change process in SQL editor. Users can execute SQL directly.</p></td>+ </tr>++ </tbody>+ </table>++ <h3 id="bytebase.v1.EmailSetting.SMTPConfig.Authentication">EmailSetting.SMTPConfig.Authentication</h3>+ <p></p>+ <table class="enum-table">+ <thead>+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>AUTHENTICATION_UNSPECIFIED</td>+ <td>0</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>AUTHENTICATION_NONE</td>+ <td>1</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>PLAIN</td>+ <td>2</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>LOGIN</td>+ <td>3</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>CRAM_MD5</td>+ <td>4</td>+ <td><p></p></td>+ </tr>++ </tbody>+ </table>++ <h3 id="bytebase.v1.EmailSetting.SMTPConfig.Encryption">EmailSetting.SMTPConfig.Encryption</h3>+ <p></p>+ <table class="enum-table">+ <thead>+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>ENCRYPTION_UNSPECIFIED</td>+ <td>0</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>ENCRYPTION_NONE</td>+ <td>1</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>STARTTLS</td>+ <td>2</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>SSL_TLS</td>+ <td>3</td>+ <td><p></p></td>+ </tr>++ </tbody>+ </table>++ <h3 id="bytebase.v1.EmailSetting.Type">EmailSetting.Type</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 identity provider.-Format: idps/{idp} </p></td>- </tr>-- <tr>- <td>title</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The display title of the identity provider. </p></td>- </tr>-- <tr>- <td>domain</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The domain for email matching when using this identity provider. </p></td>- </tr>-- <tr>- <td>type</td>- <td><a href="#bytebase.v1.IdentityProviderType">IdentityProviderType</a></td>- <td></td>- <td><p>The type of identity provider protocol. </p></td>- </tr>-- <tr>- <td>config</td>- <td><a href="#bytebase.v1.IdentityProviderConfig">IdentityProviderConfig</a></td>- <td></td>- <td><p>The configuration details for the identity provider. </p></td>- </tr>-- </tbody>- </table>----+ <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></p></td>+ </tr>++ <tr>+ <td>SMTP</td>+ <td>1</td>+ <td><p></p></td>+ </tr>++ </tbody>+ </table>- <h3 id="bytebase.v1.IdentityProviderConfig">IdentityProviderConfig</h3>+ <h3 id="bytebase.v1.Setting.SettingName">Setting.SettingName</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>oauth2_config</td>- <td><a href="#bytebase.v1.OAuth2IdentityProviderConfig">OAuth2IdentityProviderConfig</a></td>- <td></td>- <td><p>OAuth2 protocol configuration. </p></td>- </tr>-- <tr>- <td>oidc_config</td>- <td><a href="#bytebase.v1.OIDCIdentityProviderConfig">OIDCIdentityProviderConfig</a></td>- <td></td>- <td><p>OIDC protocol configuration. </p></td>- </tr>-- <tr>- <td>ldap_config</td>- <td><a href="#bytebase.v1.LDAPIdentityProviderConfig">LDAPIdentityProviderConfig</a></td>- <td></td>- <td><p>LDAP protocol configuration. </p></td>- </tr>-- </tbody>- </table>------ <h3 id="bytebase.v1.LDAPIdentityProviderConfig">LDAPIdentityProviderConfig</h3>- <p>LDAPIdentityProviderConfig is the structure for LDAP identity provider config.</p>--- <table class="field-table">- <thead>- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>- </thead>- <tbody>-- <tr>- <td>host</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>Host is the hostname or IP address of the LDAP server, e.g.,-"ldap.example.com". </p></td>- </tr>-- <tr>- <td>port</td>- <td><a href="#int32">int32</a></td>- <td></td>- <td><p>Port is the port number of the LDAP server, e.g., 389. When not set, the-default port of the corresponding security protocol will be used, i.e. 389-for StartTLS and 636 for LDAPS. </p></td>- </tr>-- <tr>- <td>skip_tls_verify</td>- <td><a href="#bool">bool</a></td>- <td></td>- <td><p>SkipTLSVerify controls whether to skip TLS certificate verification. </p></td>- </tr>-- <tr>- <td>bind_dn</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>BindDN is the DN of the user to bind as a service account to perform-search requests. </p></td>- </tr>-- <tr>- <td>bind_password</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>BindPassword is the password of the user to bind as a service account. </p></td>- </tr>-- <tr>- <td>base_dn</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>BaseDN is the base DN to search for users, e.g., "ou=users,dc=example,dc=com". </p></td>- </tr>-- <tr>- <td>user_filter</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>UserFilter is the filter to search for users, e.g., "(uid=%s)". </p></td>- </tr>-- <tr>- <td>security_protocol</td>- <td><a href="#bytebase.v1.LDAPIdentityProviderConfig.SecurityProtocol">LDAPIdentityProviderConfig.SecurityProtocol</a></td>- <td></td>- <td><p>SecurityProtocol is the security protocol to be used for establishing-connections with the LDAP server. </p></td>- </tr>-- <tr>- <td>field_mapping</td>- <td><a href="#bytebase.v1.FieldMapping">FieldMapping</a></td>- <td></td>- <td><p>FieldMapping is the mapping of the user attributes returned by the LDAP-server. </p></td>- </tr>-- </tbody>- </table>----+ <table class="enum-table">+ <thead>+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>SETTING_NAME_UNSPECIFIED</td>+ <td>0</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>WORKSPACE_PROFILE</td>+ <td>1</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>WORKSPACE_APPROVAL</td>+ <td>2</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>APP_IM</td>+ <td>3</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>AI</td>+ <td>4</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>DATA_CLASSIFICATION</td>+ <td>5</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>SEMANTIC_TYPES</td>+ <td>6</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>ENVIRONMENT</td>+ <td>7</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>EMAIL</td>+ <td>8</td>+ <td><p></p></td>+ </tr>++ </tbody>+ </table>- <h3 id="bytebase.v1.ListIdentityProvidersRequest">ListIdentityProvidersRequest</h3>+ <h3 id="bytebase.v1.WorkspaceApprovalSetting.Rule.Source">WorkspaceApprovalSetting.Rule.Source</h3><p></p>+ <table class="enum-table">+ <thead>+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>SOURCE_UNSPECIFIED</td>+ <td>0</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>CHANGE_DATABASE</td>+ <td>1</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>CREATE_DATABASE</td>+ <td>2</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>EXPORT_DATA</td>+ <td>3</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>REQUEST_ROLE</td>+ <td>4</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>REQUEST_ACCESS</td>+ <td>5</td>+ <td><p></p></td>+ </tr>++ </tbody>+ </table>+-- <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 workspace whose identity providers should be listed.-Format: workspaces/{workspace}-When unset, the workspace is resolved from the request context. </p></td>- </tr>-- </tbody>- </table>--+-- <h3 id="bytebase.v1.ListIdentityProvidersResponse">ListIdentityProvidersResponse</h3>- <p></p>+ <h3 id="bytebase.v1.SettingService">SettingService</h3>+ <p>SettingService manages workspace-level settings and configurations.</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>ListSettings</td>+ <td><a href="#bytebase.v1.ListSettingsRequest">ListSettingsRequest</a></td>+ <td><a href="#bytebase.v1.ListSettingsResponse">ListSettingsResponse</a></td>+ <td><p>Lists all workspace settings.+Permissions required: bb.settings.list</p></td>+ </tr>++ <tr>+ <td>GetSetting</td>+ <td><a href="#bytebase.v1.GetSettingRequest">GetSettingRequest</a></td>+ <td><a href="#bytebase.v1.Setting">Setting</a></td>+ <td><p>Retrieves a workspace setting by name.+Permissions required: bb.settings.get</p></td>+ </tr>++ <tr>+ <td>UpdateSetting</td>+ <td><a href="#bytebase.v1.UpdateSettingRequest">UpdateSettingRequest</a></td>+ <td><a href="#bytebase.v1.Setting">Setting</a></td>+ <td><p>Updates a workspace setting.+Permissions required: bb.settings.set</p></td>+ </tr>++ <tr>+ <td>TestEmailSetting</td>+ <td><a href="#bytebase.v1.TestEmailSettingRequest">TestEmailSettingRequest</a></td>+ <td><a href="#bytebase.v1.TestEmailSettingResponse">TestEmailSettingResponse</a></td>+ <td><p>Sends a test email using the provided config (without persisting).+Permissions required: bb.settings.set</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>identity_providers</td>- <td><a href="#bytebase.v1.IdentityProvider">IdentityProvider</a></td>- <td>repeated</td>- <td><p>The identity providers from the specified request. </p></td>- </tr>- </tbody>- </table>------ <h3 id="bytebase.v1.OAuth2IdentityProviderConfig">OAuth2IdentityProviderConfig</h3>- <p>OAuth2IdentityProviderConfig is the structure for OAuth2 identity provider config.</p>--- <table class="field-table">- <thead>- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>- </thead>- <tbody>+ <tr>+ <td>ListSettings</td>+ <td>GET</td>+ <td>/v1/settings</td>+ <td></td>+ </tr>- <tr>- <td>auth_url</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The authorization endpoint URL for OAuth2 flow. </p></td>- </tr>+- <tr>- <td>token_url</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The token endpoint URL for exchanging authorization code. </p></td>- </tr>- <tr>- <td>user_info_url</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The user information endpoint URL. </p></td>- </tr>+ <tr>+ <td>GetSetting</td>+ <td>GET</td>+ <td>/v1/{name=settings/*}</td>+ <td></td>+ </tr>- <tr>- <td>client_id</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The OAuth2 client identifier. </p></td>- </tr>+- <tr>- <td>client_secret</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The OAuth2 client secret for authentication. </p></td>- </tr>- <tr>- <td>scopes</td>- <td><a href="#string">string</a></td>- <td>repeated</td>- <td><p>The list of OAuth2 scopes to request. </p></td>- </tr>+ <tr>+ <td>UpdateSetting</td>+ <td>PATCH</td>+ <td>/v1/{setting.name=settings/*}</td>+ <td>setting</td>+ </tr>- <tr>- <td>field_mapping</td>- <td><a href="#bytebase.v1.FieldMapping">FieldMapping</a></td>- <td></td>- <td><p>Mapping configuration for user attributes from OAuth2 response. </p></td>- </tr>+- <tr>- <td>skip_tls_verify</td>- <td><a href="#bool">bool</a></td>- <td></td>- <td><p>Whether to skip TLS certificate verification. </p></td>- </tr>- <tr>- <td>auth_style</td>- <td><a href="#bytebase.v1.OAuth2AuthStyle">OAuth2AuthStyle</a></td>- <td></td>- <td><p>The authentication style for client credentials. </p></td>- </tr>+ <tr>+ <td>TestEmailSetting</td>+ <td>POST</td>+ <td>/v1/{parent=workspaces/*}/settings/EMAIL:test</td>+ <td>*</td>+ </tr>+</tbody></table>--+- <h3 id="bytebase.v1.OAuth2IdentityProviderTestRequestContext">OAuth2IdentityProviderTestRequestContext</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>code</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>Authorize code from website. </p></td>- </tr>-- </tbody>- </table>--+ <div class="file-heading">+ <h2 id="v1/actuator_service.proto">v1/actuator_service.proto</h2><a href="#title">Top</a>+ </div>+ <p></p>-- <h3 id="bytebase.v1.OIDCIdentityProviderConfig">OIDCIdentityProviderConfig</h3>- <p>OIDCIdentityProviderConfig is the structure for OIDC identity provider config.</p>+ <h3 id="bytebase.v1.ActuatorInfo">ActuatorInfo</h3>+ <p>System information and configuration for the Bytebase instance.</p><p>Actuator concept is similar to the Spring Boot Actuator.</p><table class="field-table">@@ -19677,185 +19782,152 @@ When unset, the workspace is resolved from the request context. </p></td><tbody><tr>- <td>issuer</td>+ <td>version</td><td><a href="#string">string</a></td><td></td>- <td><p>The OIDC issuer URL for the identity provider. </p></td>+ <td><p>The Bytebase server version. </p></td></tr><tr>- <td>client_id</td>+ <td>git_commit</td><td><a href="#string">string</a></td><td></td>- <td><p>The OIDC client identifier. </p></td>+ <td><p>The git commit hash of the build. </p></td></tr><tr>- <td>client_secret</td>- <td><a href="#string">string</a></td>+ <td>readonly</td>+ <td><a href="#bool">bool</a></td><td></td>- <td><p>The OIDC client secret for authentication. </p></td>+ <td><p>Whether the Bytebase instance is running in read-only mode. </p></td></tr><tr>- <td>scopes</td>- <td><a href="#string">string</a></td>- <td>repeated</td>- <td><p>The scopes that the OIDC provider supports.-Should be fetched from the well-known configuration file of the OIDC provider. </p></td>+ <td>saas</td>+ <td><a href="#bool">bool</a></td>+ <td></td>+ <td><p>Whether the Bytebase instance is running in SaaS mode where some features cannot be edited by users. </p></td></tr><tr>- <td>field_mapping</td>- <td><a href="#bytebase.v1.FieldMapping">FieldMapping</a></td>+ <td>demo</td>+ <td><a href="#bool">bool</a></td><td></td>- <td><p>Mapping configuration for user attributes from OIDC claims. </p></td>+ <td><p>Whether the Bytebase instance is running in demo mode. </p></td></tr><tr>- <td>skip_tls_verify</td>- <td><a href="#bool">bool</a></td>+ <td>host</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>Whether to skip TLS certificate verification. </p></td>+ <td><p>The host address of the Bytebase instance. </p></td></tr><tr>- <td>auth_style</td>- <td><a href="#bytebase.v1.OAuth2AuthStyle">OAuth2AuthStyle</a></td>+ <td>port</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>The authentication style for client credentials. </p></td>+ <td><p>The port number of the Bytebase instance. </p></td></tr><tr>- <td>auth_endpoint</td>+ <td>external_url</td><td><a href="#string">string</a></td><td></td>- <td><p>The authorization endpoint of the OIDC provider.-Should be fetched from the well-known configuration file of the OIDC provider. </p></td>+ <td><p>The external URL where users or webhook callbacks access Bytebase. </p></td></tr>- </tbody>- </table>------ <h3 id="bytebase.v1.OIDCIdentityProviderTestRequestContext">OIDCIdentityProviderTestRequestContext</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>last_active_time</td>+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>+ <td></td>+ <td><p>The last time any API call was made, refreshed on each request. </p></td>+ </tr><tr>- <td>code</td>+ <td>workspace</td><td><a href="#string">string</a></td><td></td>- <td><p>Authorize code from OIDC provider. </p></td>+ <td><p>The unique identifier for the workspace.+Format: workspaces/{id} </p></td></tr>- </tbody>- </table>------ <h3 id="bytebase.v1.TestIdentityProviderRequest">TestIdentityProviderRequest</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>unlicensed_features</td>+ <td><a href="#string">string</a></td>+ <td>repeated</td>+ <td><p>List of features that are not licensed. </p></td>+ </tr><tr>- <td>identity_provider</td>- <td><a href="#bytebase.v1.IdentityProvider">IdentityProvider</a></td>+ <td>docker</td>+ <td><a href="#bool">bool</a></td><td></td>- <td><p>The identity provider to test connection including uncreated. </p></td>+ <td><p>Whether the Bytebase instance is running in Docker. </p></td></tr><tr>- <td>oauth2_context</td>- <td><a href="#bytebase.v1.OAuth2IdentityProviderTestRequestContext">OAuth2IdentityProviderTestRequestContext</a></td>+ <td>activated_user_count</td>+ <td><a href="#int32">int32</a></td><td></td>- <td><p> </p></td>+ <td><p>The number of activated users. </p></td></tr><tr>- <td>oidc_context</td>- <td><a href="#bytebase.v1.OIDCIdentityProviderTestRequestContext">OIDCIdentityProviderTestRequestContext</a></td>+ <td>activated_instance_count</td>+ <td><a href="#int32">int32</a></td><td></td>- <td><p>OIDC authentication context for test connection. </p></td>+ <td><p>The number of activated database instances. </p></td></tr>- </tbody>- </table>------ <h3 id="bytebase.v1.TestIdentityProviderResponse">TestIdentityProviderResponse</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>total_instance_count</td>+ <td><a href="#int32">int32</a></td>+ <td></td>+ <td><p>The total number of database instances. </p></td>+ </tr><tr>- <td>claims</td>- <td><a href="#bytebase.v1.TestIdentityProviderResponse.ClaimsEntry">TestIdentityProviderResponse.ClaimsEntry</a></td>- <td>repeated</td>- <td><p>The map of claims returned by the identity provider. </p></td>+ <td>enable_sample</td>+ <td><a href="#bool">bool</a></td>+ <td></td>+ <td><p>Whether sample data setup is enabled. </p></td></tr><tr>- <td>user_info</td>- <td><a href="#bytebase.v1.TestIdentityProviderResponse.UserInfoEntry">TestIdentityProviderResponse.UserInfoEntry</a></td>- <td>repeated</td>- <td><p>The matched user info from the claims. </p></td>+ <td>external_url_from_flag</td>+ <td><a href="#bool">bool</a></td>+ <td></td>+ <td><p>Whether the external URL is set via command-line flag (and thus cannot be changed via UI). </p></td></tr>- </tbody>- </table>------ <h3 id="bytebase.v1.TestIdentityProviderResponse.ClaimsEntry">TestIdentityProviderResponse.ClaimsEntry</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>replica_count</td>+ <td><a href="#int32">int32</a></td>+ <td></td>+ <td><p>The number of active replicas (servers sharing the same database). </p></td>+ </tr><tr>- <td>key</td>- <td><a href="#string">string</a></td>+ <td>restriction</td>+ <td><a href="#bytebase.v1.Restriction">Restriction</a></td><td></td><td><p> </p></td></tr><tr>- <td>value</td>+ <td>default_project</td><td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>The default project for unassigned databases.+Format: projects/{id} </p></td>+ </tr>++ <tr>+ <td>user_count_in_iam</td>+ <td><a href="#int32">int32</a></td>+ <td></td>+ <td><p>The number of users in the workspace IAM (for seat limit display). </p></td></tr></tbody>@@ -19865,8 +19937,15 @@ Should be fetched from the well-known configuration file of the OIDC provider. <- <h3 id="bytebase.v1.TestIdentityProviderResponse.UserInfoEntry">TestIdentityProviderResponse.UserInfoEntry</h3>- <p></p>+ <h3 id="bytebase.v1.DeleteCacheRequest">DeleteCacheRequest</h3>+ <p>Request message for deleting cache.</p>++++++ <h3 id="bytebase.v1.GetActuatorInfoRequest">GetActuatorInfoRequest</h3>+ <p>Request message for getting actuator information.</p><table class="field-table">@@ -19876,17 +19955,13 @@ Should be fetched from the well-known configuration file of the OIDC provider. <<tbody><tr>- <td>key</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p> </p></td>- </tr>-- <tr>- <td>value</td>+ <td>name</td><td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>Optional. The workspace to scope the response to.+Format: workspaces/{workspace}+When unset, the workspace is resolved from the request context (self-hosted)+or no workspace-scoped fields are returned (SaaS). </p></td></tr></tbody>@@ -19896,7 +19971,7 @@ Should be fetched from the well-known configuration file of the OIDC provider. <- <h3 id="bytebase.v1.UpdateIdentityProviderRequest">UpdateIdentityProviderRequest</h3>+ <h3 id="bytebase.v1.Restriction">Restriction</h3><p></p>@@ -19907,28 +19982,39 @@ Should be fetched from the well-known configuration file of the OIDC provider. <<tbody><tr>- <td>identity_provider</td>- <td><a href="#bytebase.v1.IdentityProvider">IdentityProvider</a></td>+ <td>disallow_signup</td>+ <td><a href="#bool">bool</a></td>+ <td></td>+ <td><p>Whether self-service user signup is disabled. </p></td>+ </tr>++ <tr>+ <td>disallow_password_signin</td>+ <td><a href="#bool">bool</a></td><td></td>- <td><p>The identity provider to update.--The identity provider's `name` field is used to identify the identity provider to update.-Format: idps/{identity_provider} </p></td>+ <td><p>Whether password-based signin is disabled (except for workspace admins). </p></td></tr><tr>- <td>update_mask</td>- <td><a href="#google.protobuf.FieldMask">google.protobuf.FieldMask</a></td>+ <td>password_restriction</td>+ <td><a href="#bytebase.v1.WorkspaceProfileSetting.PasswordRestriction">WorkspaceProfileSetting.PasswordRestriction</a></td><td></td>- <td><p>The list of fields to update. </p></td>+ <td><p>Password complexity and restriction requirements. </p></td></tr><tr>- <td>allow_missing</td>+ <td>allow_email_code_signin</td><td><a href="#bool">bool</a></td><td></td>- <td><p>If set to true, and the identity provider is not found, a new identity provider will be created.-In this situation, `update_mask` is ignored. </p></td>+ <td><p>Whether email + 6-digit code signin is enabled for this workspace. </p></td>+ </tr>++ <tr>+ <td>password_reset_enabled</td>+ <td><a href="#bool">bool</a></td>+ <td></td>+ <td><p>Whether password reset via email is available for this workspace.+True when the workspace (or deployment) has an email setting configured. </p></td></tr></tbody>@@ -19938,109 +20024,21 @@ In this situation, `update_mask` is ignored. </p></td>+ <h3 id="bytebase.v1.SetupSampleRequest">SetupSampleRequest</h3>+ <p>Request message for setting up sample data.</p>+++- <h3 id="bytebase.v1.IdentityProviderType">IdentityProviderType</h3>- <p></p>- <table class="enum-table">- <thead>- <tr><td>Name</td><td>Number</td><td>Description</td></tr>- </thead>- <tbody>-- <tr>- <td>IDENTITY_PROVIDER_TYPE_UNSPECIFIED</td>- <td>0</td>- <td><p>Unspecified identity provider type.</p></td>- </tr>-- <tr>- <td>OAUTH2</td>- <td>1</td>- <td><p>OAuth 2.0 authentication protocol.</p></td>- </tr>-- <tr>- <td>OIDC</td>- <td>2</td>- <td><p>OpenID Connect authentication protocol.</p></td>- </tr>-- <tr>- <td>LDAP</td>- <td>3</td>- <td><p>LDAP directory service authentication.</p></td>- </tr>-- </tbody>- </table>-- <h3 id="bytebase.v1.LDAPIdentityProviderConfig.SecurityProtocol">LDAPIdentityProviderConfig.SecurityProtocol</h3>- <p></p>- <table class="enum-table">- <thead>- <tr><td>Name</td><td>Number</td><td>Description</td></tr>- </thead>- <tbody>-- <tr>- <td>SECURITY_PROTOCOL_UNSPECIFIED</td>- <td>0</td>- <td><p></p></td>- </tr>-- <tr>- <td>START_TLS</td>- <td>1</td>- <td><p>StartTLS is the security protocol that starts with an unencrypted connection and then upgrades to TLS.</p></td>- </tr>-- <tr>- <td>LDAPS</td>- <td>2</td>- <td><p>LDAPS is the security protocol that uses TLS from the beginning.</p></td>- </tr>-- </tbody>- </table>-- <h3 id="bytebase.v1.OAuth2AuthStyle">OAuth2AuthStyle</h3>- <p></p>- <table class="enum-table">- <thead>- <tr><td>Name</td><td>Number</td><td>Description</td></tr>- </thead>- <tbody>-- <tr>- <td>OAUTH2_AUTH_STYLE_UNSPECIFIED</td>- <td>0</td>- <td><p></p></td>- </tr>-- <tr>- <td>IN_PARAMS</td>- <td>1</td>- <td><p>IN_PARAMS sends the "client_id" and "client_secret" in the POST body-as application/x-www-form-urlencoded parameters.</p></td>- </tr>-- <tr>- <td>IN_HEADER</td>- <td>2</td>- <td><p>IN_HEADER sends the client_id and client_password using HTTP Basic Authorization.-This is an optional style described in the OAuth2 RFC 6749 section 2.3.1.</p></td>- </tr>-- </tbody>- </table>+- <h3 id="bytebase.v1.IdentityProviderService">IdentityProviderService</h3>- <p>IdentityProviderService manages external identity providers for SSO authentication.</p>+ <h3 id="bytebase.v1.ActuatorService">ActuatorService</h3>+ <p>ActuatorService manages system health and operational information.</p><table class="enum-table"><thead><tr><td>Method Name</td><td>Request Type</td><td>Response Type</td><td>Description</td></tr>@@ -20048,52 +20046,29 @@ This is an optional style described in the OAuth2 RFC 6749 section 2.3.1.</p></t<tbody><tr>- <td>GetIdentityProvider</td>- <td><a href="#bytebase.v1.GetIdentityProviderRequest">GetIdentityProviderRequest</a></td>- <td><a href="#bytebase.v1.IdentityProvider">IdentityProvider</a></td>- <td><p>Gets an identity provider by name.-Permissions required: bb.identityProviders.get</p></td>- </tr>-- <tr>- <td>ListIdentityProviders</td>- <td><a href="#bytebase.v1.ListIdentityProvidersRequest">ListIdentityProvidersRequest</a></td>- <td><a href="#bytebase.v1.ListIdentityProvidersResponse">ListIdentityProvidersResponse</a></td>- <td><p>Lists all configured identity providers (public endpoint for login page).+ <td>GetActuatorInfo</td>+ <td><a href="#bytebase.v1.GetActuatorInfoRequest">GetActuatorInfoRequest</a></td>+ <td><a href="#bytebase.v1.ActuatorInfo">ActuatorInfo</a></td>+ <td><p>Gets system information and health status of the Bytebase instance.+When `name` is provided (or the workspace-scoped binding is used), the+response includes workspace-scoped fields for that workspace.Permissions required: None</p></td></tr><tr>- <td>CreateIdentityProvider</td>- <td><a href="#bytebase.v1.CreateIdentityProviderRequest">CreateIdentityProviderRequest</a></td>- <td><a href="#bytebase.v1.IdentityProvider">IdentityProvider</a></td>- <td><p>Creates a new identity provider.-Permissions required: bb.identityProviders.create</p></td>- </tr>-- <tr>- <td>UpdateIdentityProvider</td>- <td><a href="#bytebase.v1.UpdateIdentityProviderRequest">UpdateIdentityProviderRequest</a></td>- <td><a href="#bytebase.v1.IdentityProvider">IdentityProvider</a></td>- <td><p>Updates an identity provider.-Permissions required: bb.identityProviders.update-When allow_missing=true, also requires: bb.identityProviders.create</p></td>- </tr>-- <tr>- <td>DeleteIdentityProvider</td>- <td><a href="#bytebase.v1.DeleteIdentityProviderRequest">DeleteIdentityProviderRequest</a></td>+ <td>SetupSample</td>+ <td><a href="#bytebase.v1.SetupSampleRequest">SetupSampleRequest</a></td><td><a href="#google.protobuf.Empty">.google.protobuf.Empty</a></td>- <td><p>Deletes an identity provider.-Permissions required: bb.identityProviders.delete</p></td>+ <td><p>Sets up sample data for demonstration and testing purposes.+Permissions required: bb.projects.create</p></td></tr><tr>- <td>TestIdentityProvider</td>- <td><a href="#bytebase.v1.TestIdentityProviderRequest">TestIdentityProviderRequest</a></td>- <td><a href="#bytebase.v1.TestIdentityProviderResponse">TestIdentityProviderResponse</a></td>- <td><p>Tests the connection and configuration of an identity provider.-Permissions required: bb.identityProviders.update</p></td>+ <td>DeleteCache</td>+ <td><a href="#bytebase.v1.DeleteCacheRequest">DeleteCacheRequest</a></td>+ <td><a href="#google.protobuf.Empty">.google.protobuf.Empty</a></td>+ <td><p>Clears the system cache to force data refresh.+Permissions required: None</p></td></tr></tbody>@@ -20117,26 +20092,26 @@ Permissions required: bb.identityProviders.update</p></td><tr>- <td>GetIdentityProvider</td>+ <td>GetActuatorInfo</td><td>GET</td>- <td>/v1/{name=idps/*}</td>+ <td>/v1/actuator/info</td><td></td></tr>---<tr>- <td>ListIdentityProviders</td>+ <td>GetActuatorInfo</td><td>GET</td>- <td>/v1/idps</td>+ <td>/v1/{name=workspaces/*}/actuator/info</td><td></td></tr>+++<tr>- <td>ListIdentityProviders</td>- <td>GET</td>- <td>/v1/{parent=workspaces/*}/idps</td>+ <td>SetupSample</td>+ <td>POST</td>+ <td>/v1/actuator:setupSample</td><td></td></tr>@@ -20144,57 +20119,141 @@ Permissions required: bb.identityProviders.update</p></td><tr>- <td>CreateIdentityProvider</td>- <td>POST</td>- <td>/v1/idps</td>- <td>identity_provider</td>+ <td>DeleteCache</td>+ <td>DELETE</td>+ <td>/v1/actuator/cache</td>+ <td></td></tr>+ </tbody>+ </table>+++++ <div class="file-heading">+ <h2 id="v1/ai_service.proto">v1/ai_service.proto</h2><a href="#title">Top</a>+ </div>+ <p></p>+++ <h3 id="bytebase.v1.AIChatMessage">AIChatMessage</h3>+ <p>A single message in the conversation.</p>+++ <table class="field-table">+ <thead>+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>role</td>+ <td><a href="#bytebase.v1.AIChatMessageRole">AIChatMessageRole</a></td>+ <td></td>+ <td><p>The role of the message sender. </p></td>+ </tr>++ <tr>+ <td>content</td>+ <td><a href="#string">string</a></td>+ <td>optional</td>+ <td><p>The text content of the message. Optional for assistant messages that only contain tool calls. </p></td>+ </tr>++ <tr>+ <td>tool_calls</td>+ <td><a href="#bytebase.v1.AIChatToolCall">AIChatToolCall</a></td>+ <td>repeated</td>+ <td><p>Tool calls made by the assistant. Only present in assistant messages. </p></td>+ </tr>+ <tr>+ <td>tool_call_id</td>+ <td><a href="#string">string</a></td>+ <td>optional</td>+ <td><p>The ID of the tool call this message is responding to. Only present in tool messages. </p></td>+ </tr>- <tr>- <td>UpdateIdentityProvider</td>- <td>PATCH</td>- <td>/v1/{identity_provider.name=idps/*}</td>- <td>identity_provider</td>- </tr>+ </tbody>+ </table>++++++ <h3 id="bytebase.v1.AIChatRequest">AIChatRequest</h3>+ <p>Request message for AIService.Chat.</p>+++ <table class="field-table">+ <thead>+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>+ </thead>+ <tbody>-+ <tr>+ <td>messages</td>+ <td><a href="#bytebase.v1.AIChatMessage">AIChatMessage</a></td>+ <td>repeated</td>+ <td><p>The conversation messages. </p></td>+ </tr>+ <tr>+ <td>tool_definitions</td>+ <td><a href="#bytebase.v1.AIChatToolDefinition">AIChatToolDefinition</a></td>+ <td>repeated</td>+ <td><p>The tool definitions available to the AI. </p></td>+ </tr>- <tr>- <td>DeleteIdentityProvider</td>- <td>DELETE</td>- <td>/v1/{name=idps/*}</td>- <td></td>- </tr>+ </tbody>+ </table>++++++ <h3 id="bytebase.v1.AIChatResponse">AIChatResponse</h3>+ <p>Response message for AIService.Chat.</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="#string">string</a></td>+ <td>optional</td>+ <td><p>The text content of the AI response. Optional when the response only contains tool calls. </p></td>+ </tr>+ <tr>+ <td>tool_calls</td>+ <td><a href="#bytebase.v1.AIChatToolCall">AIChatToolCall</a></td>+ <td>repeated</td>+ <td><p>Tool calls the AI wants to make. </p></td>+ </tr>- <tr>- <td>TestIdentityProvider</td>- <td>POST</td>- <td>/v1/idps/*:test</td>- <td>*</td>- </tr>+ <tr>+ <td>usage</td>+ <td><a href="#bytebase.v1.AIChatUsage">AIChatUsage</a></td>+ <td>optional</td>+ <td><p>Token usage for this provider call, when available. </p></td>+ </tr>-</tbody></table>+---- <div class="file-heading">- <h2 id="v1/org_policy_service.proto">v1/org_policy_service.proto</h2><a href="#title">Top</a>- </div>- <p></p>+- <h3 id="bytebase.v1.CreatePolicyRequest">CreatePolicyRequest</h3>- <p></p>+ <h3 id="bytebase.v1.AIChatToolCall">AIChatToolCall</h3>+ <p>A tool call made by the AI.</p><table class="field-table">@@ -20204,28 +20263,32 @@ Permissions required: bb.identityProviders.update</p></td><tbody><tr>- <td>parent</td>+ <td>id</td><td><a href="#string">string</a></td><td></td>- <td><p>The parent resource where this instance will be created.-Workspace resource name: workspaces/{workspace-id}.-Environment resource name: environments/environment-id.-Instance resource name: instances/instance-id.-Database resource name: instances/instance-id/databases/database-name. </p></td>+ <td><p>The unique ID of this tool call. </p></td></tr><tr>- <td>policy</td>- <td><a href="#bytebase.v1.Policy">Policy</a></td>+ <td>name</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>The policy to create. </p></td>+ <td><p>The name of the tool to call. </p></td></tr><tr>- <td>type</td>- <td><a href="#bytebase.v1.PolicyType">PolicyType</a></td>+ <td>arguments</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>The type of policy to create. </p></td>+ <td><p>The JSON-encoded arguments to pass to the tool. </p></td>+ </tr>++ <tr>+ <td>metadata</td>+ <td><a href="#string">string</a></td>+ <td>optional</td>+ <td><p>Opaque provider-specific metadata (e.g., Gemini thought_signature).+Frontend must echo this back unchanged when sending tool results. </p></td></tr></tbody>@@ -20235,8 +20298,8 @@ Database resource name: instances/instance-id/databases/database-name. </p></td>- <h3 id="bytebase.v1.DeletePolicyRequest">DeletePolicyRequest</h3>- <p></p>+ <h3 id="bytebase.v1.AIChatToolDefinition">AIChatToolDefinition</h3>+ <p>A tool definition that the AI can invoke.</p><table class="field-table">@@ -20249,12 +20312,21 @@ Database resource name: instances/instance-id/databases/database-name. </p></td><td>name</td><td><a href="#string">string</a></td><td></td>- <td><p>The policy's `name` field is used to identify the instance to update.-Format: {resource name}/policies/{policy type}-Workspace resource name: workspaces/{workspace-id}.-Environment resource name: environments/environment-id.-Instance resource name: instances/instance-id.-Database resource name: instances/instance-id/databases/database-name. </p></td>+ <td><p>The name of the tool. </p></td>+ </tr>++ <tr>+ <td>description</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>A description of what the tool does. </p></td>+ </tr>++ <tr>+ <td>parameters_schema</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The JSON Schema describing the tool's parameters. </p></td></tr></tbody>@@ -20264,8 +20336,8 @@ Database resource name: instances/instance-id/databases/database-name. </p></td>- <h3 id="bytebase.v1.GetPolicyRequest">GetPolicyRequest</h3>- <p></p>+ <h3 id="bytebase.v1.AIChatUsage">AIChatUsage</h3>+ <p>Token usage for a single AI provider call.</p><table class="field-table">@@ -20274,23 +20346,125 @@ Database resource name: instances/instance-id/databases/database-name. </p></td></thead><tbody>- <tr>- <td>name</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The name of the policy to retrieve.-Format: {resource type}/{resource id}/policies/{policy type} </p></td>- </tr>+ <tr>+ <td>total_tokens</td>+ <td><a href="#int32">int32</a></td>+ <td></td>+ <td><p>Total tokens used by the provider call. </p></td>+ </tr>++ </tbody>+ </table>++++++++ <h3 id="bytebase.v1.AIChatMessageRole">AIChatMessageRole</h3>+ <p>Role of a chat message.</p>+ <table class="enum-table">+ <thead>+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>AI_CHAT_MESSAGE_ROLE_UNSPECIFIED</td>+ <td>0</td>+ <td><p>Unspecified role.</p></td>+ </tr>++ <tr>+ <td>AI_CHAT_MESSAGE_ROLE_SYSTEM</td>+ <td>1</td>+ <td><p>System message providing instructions.</p></td>+ </tr>++ <tr>+ <td>AI_CHAT_MESSAGE_ROLE_USER</td>+ <td>2</td>+ <td><p>User message.</p></td>+ </tr>++ <tr>+ <td>AI_CHAT_MESSAGE_ROLE_ASSISTANT</td>+ <td>3</td>+ <td><p>Assistant (AI) message.</p></td>+ </tr>++ <tr>+ <td>AI_CHAT_MESSAGE_ROLE_TOOL</td>+ <td>4</td>+ <td><p>Tool result message.</p></td>+ </tr>++ </tbody>+ </table>++++++ <h3 id="bytebase.v1.AIService">AIService</h3>+ <p>AIService provides AI chat capabilities for the page agent.</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>Chat</td>+ <td><a href="#bytebase.v1.AIChatRequest">AIChatRequest</a></td>+ <td><a href="#bytebase.v1.AIChatResponse">AIChatResponse</a></td>+ <td><p>Chat sends a conversation with tool definitions to the configured AI provider+and returns the AI response.</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>Chat</td>+ <td>POST</td>+ <td>/v1/ai/chat</td>+ <td>*</td>+ </tr>+</tbody></table>--+- <h3 id="bytebase.v1.ListPoliciesRequest">ListPoliciesRequest</h3>- <p></p>+ <div class="file-heading">+ <h2 id="v1/iam_policy.proto">v1/iam_policy.proto</h2><a href="#title">Top</a>+ </div>+ <p></p>+++ <h3 id="bytebase.v1.Binding">Binding</h3>+ <p>Binding associates members with a role and optional conditions.</p><table class="field-table">@@ -20300,25 +20474,52 @@ Format: {resource type}/{resource id}/policies/{policy type} </p></td><tbody><tr>- <td>parent</td>+ <td>role</td><td><a href="#string">string</a></td><td></td>- <td><p>The parent, which owns this collection of policies.-Format: {resource type}/{resource id} </p></td>+ <td><p>The role that is assigned to the members.+Format: roles/{role} </p></td></tr><tr>- <td>policy_type</td>- <td><a href="#bytebase.v1.PolicyType">PolicyType</a></td>- <td>optional</td>- <td><p>Filter by specific policy type. </p></td>+ <td>members</td>+ <td><a href="#string">string</a></td>+ <td>repeated</td>+ <td><p>Specifies the principals requesting access for a Bytebase resource.+For users, the member should be: user:{email}+For groups, the member should be: group:{email}+For service accounts, the member should be: serviceAccount:{email}+For workload identities, the member should be: workloadIdentity:{email} </p></td></tr><tr>- <td>show_deleted</td>- <td><a href="#bool">bool</a></td>+ <td>condition</td>+ <td><a href="#google.type.Expr">google.type.Expr</a></td><td></td>- <td><p>Show deleted policies if specified. </p></td>+ <td><p>The condition that is associated with this binding, only used in the project IAM policy.+If the condition evaluates to true, then this binding applies to the current request.+If the condition evaluates to false, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding.+The syntax and semantics of CEL are documented at https://github.com/google/cel-spec++Support variables:+resource.database: the database full name in "instances/{instance}/databases/{database}" format, used by the "roles/sqlEditorUser" and "roles/sqlEditorReadUser" roles, support "==" operator.+resource.schema_name: the schema name, used by the "roles/sqlEditorUser" and "roles/sqlEditorReadUser" roles, support "==" operator.+resource.table_name: the table name, used by the "roles/sqlEditorUser" and "roles/sqlEditorReadUser" roles, support "==" operator.+resource.environment_id: the environment to allow the DDL/DML operation in the SQL Editor, only works for the role with bb.sql.ddl or bb.sql.dml permissions. Support "in" operator.+request.time: the expiration. Only support "<" operation in `request.time < timestamp("{ISO datetime string format}")`.++For example:+resource.database == "instances/local-pg/databases/postgres" && resource.schema_name in ["public","another_schema"]+resource.database == "instances/local-pg/databases/bytebase" && resource.schema_name == "public" && resource.table_name in ["audit_log"]+resource.database == "instances/local-pg/databases/postgres" && resource.environment_id in ["test"]+request.time < timestamp("2025-04-26T11:24:48.655Z") </p></td>+ </tr>++ <tr>+ <td>parsed_expr</td>+ <td><a href="#google.api.expr.v1alpha1.Expr">google.api.expr.v1alpha1.Expr</a></td>+ <td></td>+ <td><p>The parsed expression of the condition. </p></td></tr></tbody>@@ -20328,8 +20529,8 @@ Format: {resource type}/{resource id} </p></td>- <h3 id="bytebase.v1.ListPoliciesResponse">ListPoliciesResponse</h3>- <p></p>+ <h3 id="bytebase.v1.BindingDelta">BindingDelta</h3>+ <p>A single change to a binding.</p><table class="field-table">@@ -20339,10 +20540,32 @@ Format: {resource type}/{resource id} </p></td><tbody><tr>- <td>policies</td>- <td><a href="#bytebase.v1.Policy">Policy</a></td>- <td>repeated</td>- <td><p>The policies from the specified request. </p></td>+ <td>action</td>+ <td><a href="#bytebase.v1.BindingDelta.Action">BindingDelta.Action</a></td>+ <td></td>+ <td><p>The action that was performed on a Binding. </p></td>+ </tr>++ <tr>+ <td>role</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>Role that is assigned to `members`.+For example, `roles/projectOwner`. </p></td>+ </tr>++ <tr>+ <td>member</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>Follows the same format of Binding.members. </p></td>+ </tr>++ <tr>+ <td>condition</td>+ <td><a href="#google.type.Expr">google.type.Expr</a></td>+ <td></td>+ <td><p>The condition that is associated with this binding. </p></td></tr></tbody>@@ -20352,8 +20575,8 @@ Format: {resource type}/{resource id} </p></td>- <h3 id="bytebase.v1.MaskingExemptionPolicy">MaskingExemptionPolicy</h3>- <p>MaskingExemptionPolicy is the allowlist of users who can access sensitive data.</p>+ <h3 id="bytebase.v1.GetIamPolicyRequest">GetIamPolicyRequest</h3>+ <p>Request message for getting an IAM policy.</p><table class="field-table">@@ -20363,10 +20586,12 @@ Format: {resource type}/{resource id} </p></td><tbody><tr>- <td>exemptions</td>- <td><a href="#bytebase.v1.MaskingExemptionPolicy.Exemption">MaskingExemptionPolicy.Exemption</a></td>- <td>repeated</td>- <td><p> </p></td>+ <td>resource</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The name of the resource to get the IAM policy.+Format: projects/{project}+Format: workspaces/{workspace} </p></td></tr></tbody>@@ -20376,8 +20601,8 @@ Format: {resource type}/{resource id} </p></td>- <h3 id="bytebase.v1.MaskingExemptionPolicy.Exemption">MaskingExemptionPolicy.Exemption</h3>- <p></p>+ <h3 id="bytebase.v1.IamPolicy">IamPolicy</h3>+ <p>IAM policy that binds members to roles.</p><table class="field-table">@@ -20387,36 +20612,20 @@ Format: {resource type}/{resource id} </p></td><tbody><tr>- <td>members</td>- <td><a href="#string">string</a></td>+ <td>bindings</td>+ <td><a href="#bytebase.v1.Binding">Binding</a></td><td>repeated</td>- <td><p>Specifies the principals who are exempt from masking.-For users, the member should be: user:{email}-For groups, the member should be: group:{email}-For service accounts, the member should be: serviceAccount:{email}-For workload identities, the member should be: workloadIdentity:{email} </p></td>+ <td><p>Collection of binding.+A binding binds one or more project members to a single project role. </p></td></tr><tr>- <td>condition</td>- <td><a href="#google.type.Expr">google.type.Expr</a></td>+ <td>etag</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>The condition that is associated with this exception policy instance.-The syntax and semantics of CEL are documented at https://github.com/google/cel-spec-If the condition is empty, means the user can access all databases without expiration.--Support variables:-resource.instance_id: the instance resource id. Only support "==" operation.-resource.database_name: the database name. Only support "==" operation.-resource.schema_name: the schema name. Only support "==" operation.-resource.table_name: the table name. Only support "==" operation.-resource.column_name: the column name. Only support "==" operation.-request.time: the expiration. Only support "<" operation in `request.time < timestamp("{ISO datetime string format}")`-All variables should join with "&&" condition.--For example:-resource.instance_id == "local" && resource.database_name == "employee" && request.time < timestamp("2025-04-30T11:10:39.000Z")-resource.instance_id == "local" && resource.database_name == "employee" </p></td>+ <td><p>The current etag of the policy.+If an etag is provided and does not match the current etag of the policy,+the call will be blocked and an ABORTED error will be returned. </p></td></tr></tbody>@@ -20426,8 +20635,8 @@ resource.instance_id == "local" && resource.database_name == - <h3 id="bytebase.v1.MaskingRulePolicy">MaskingRulePolicy</h3>- <p>Policy for configuring data masking rules.</p>+ <h3 id="bytebase.v1.PolicyDelta">PolicyDelta</h3>+ <p>Describes changes between two IAM policies.</p><table class="field-table">@@ -20437,10 +20646,10 @@ resource.instance_id == "local" && resource.database_name == <tbody><tr>- <td>rules</td>- <td><a href="#bytebase.v1.MaskingRulePolicy.MaskingRule">MaskingRulePolicy.MaskingRule</a></td>+ <td>binding_deltas</td>+ <td><a href="#bytebase.v1.BindingDelta">BindingDelta</a></td><td>repeated</td>- <td><p>The list of masking rules. </p></td>+ <td><p>The delta for Bindings between two policies. </p></td></tr></tbody>@@ -20450,8 +20659,8 @@ resource.instance_id == "local" && resource.database_name == - <h3 id="bytebase.v1.MaskingRulePolicy.MaskingRule">MaskingRulePolicy.MaskingRule</h3>- <p>A rule that defines when and how to mask data.</p>+ <h3 id="bytebase.v1.SetIamPolicyRequest">SetIamPolicyRequest</h3>+ <p>Request message for setting an IAM policy.</p><table class="field-table">@@ -20461,47 +20670,93 @@ resource.instance_id == "local" && resource.database_name == <tbody><tr>- <td>id</td>+ <td>resource</td><td><a href="#string">string</a></td><td></td>- <td><p>A unique identifier for the rule in UUID format. </p></td>+ <td><p>The name of the resource to set the IAM policy.+Format: projects/{project}+Format: workspaces/{workspace} </p></td></tr><tr>- <td>condition</td>- <td><a href="#google.type.Expr">google.type.Expr</a></td>+ <td>policy</td>+ <td><a href="#bytebase.v1.IamPolicy">IamPolicy</a></td><td></td>- <td><p>The condition for the masking rule.-The syntax and semantics of CEL are documented at https://github.com/google/cel-spec+ <td><p> </p></td>+ </tr>++ <tr>+ <td>etag</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The current etag of the policy. </p></td>+ </tr>++ </tbody>+ </table>-Support variables:-resource.environment_id: the environment resource id.-resource.project_id: the project resource id.-resource.instance_id: the instance resource id.-resource.database_name: the database name.-resource.table_name: the table name.-resource.column_name: the column name.-resource.classification_level: the classification level (integer).+-Each variable support following operations:-==: the value equals the target.-!=: the value not equals the target.-in: the value matches one of the targets.-!(in): the value not matches any of the targets.-<, <=, >, >=: numeric comparison (classification_level only).+++++ <h3 id="bytebase.v1.BindingDelta.Action">BindingDelta.Action</h3>+ <p>Type of action performed on a binding.</p>+ <table class="enum-table">+ <thead>+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>ACTION_UNSPECIFIED</td>+ <td>0</td>+ <td><p>Unspecified action.</p></td>+ </tr>++ <tr>+ <td>ADD</td>+ <td>1</td>+ <td><p>Add a binding.</p></td>+ </tr>++ <tr>+ <td>REMOVE</td>+ <td>2</td>+ <td><p>Remove a binding.</p></td>+ </tr>++ </tbody>+ </table>++++++++ <div class="file-heading">+ <h2 id="v1/audit_log_service.proto">v1/audit_log_service.proto</h2><a href="#title">Top</a>+ </div>+ <p></p>-For example:-resource.environment_id == "test" && resource.project_id == "sample-project"-resource.instance_id == "sample-instance" && resource.database_name == "employee" && resource.table_name in ["table1", "table2"]-resource.environment_id != "test" || !(resource.project_id in ["poject1", "prject2"])-resource.instance_id == "sample-instance" && (resource.database_name == "db1" || resource.database_name == "db2") </p></td>- </tr>++ <h3 id="bytebase.v1.AuditData">AuditData</h3>+ <p>Additional audit data specific to certain operations.</p>+++ <table class="field-table">+ <thead>+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>+ </thead>+ <tbody><tr>- <td>semantic_type</td>- <td><a href="#string">string</a></td>+ <td>policy_delta</td>+ <td><a href="#bytebase.v1.PolicyDelta">PolicyDelta</a></td><td></td>- <td><p>The semantic type of data to mask (e.g., "SSN", "EMAIL"). </p></td>+ <td><p>Changes to IAM policies. </p></td></tr></tbody>@@ -20511,8 +20766,8 @@ resource.instance_id == "sample-instance" && (resource.database_- <h3 id="bytebase.v1.Policy">Policy</h3>- <p></p>+ <h3 id="bytebase.v1.AuditLog">AuditLog</h3>+ <p>Audit log entry recording system activity or API call.</p><table class="field-table">@@ -20525,75 +20780,90 @@ resource.instance_id == "sample-instance" && (resource.database_<td>name</td><td><a href="#string">string</a></td><td></td>- <td><p>The name of the policy.-Format: {resource name}/policies/{policy type}-Workspace resource name: workspaces/{workspace-id}.-Environment resource name: environments/environment-id.-Instance resource name: instances/instance-id.-Database resource name: instances/instance-id/databases/database-name. </p></td>+ <td><p>The name of the log.+Formats:+- projects/{project}/auditLogs/{uid}+- workspaces/{workspace}/auditLogs/{uid} </p></td></tr><tr>- <td>inherit_from_parent</td>- <td><a href="#bool">bool</a></td>+ <td>create_time</td>+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td><td></td>- <td><p>Whether this policy inherits from its parent resource. </p></td>+ <td><p>The timestamp when the audit log was created. </p></td></tr><tr>- <td>type</td>- <td><a href="#bytebase.v1.PolicyType">PolicyType</a></td>+ <td>user</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>The type of policy. </p></td>+ <td><p>The user who performed the action.+Format: users/{email} </p></td></tr><tr>- <td>rollout_policy</td>- <td><a href="#bytebase.v1.RolloutPolicy">RolloutPolicy</a></td>+ <td>method</td>+ <td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>The method or action being audited.+For example: /bytebase.v1.SQLService/Query or bb.project.repository.push </p></td></tr><tr>- <td>masking_rule_policy</td>- <td><a href="#bytebase.v1.MaskingRulePolicy">MaskingRulePolicy</a></td>+ <td>severity</td>+ <td><a href="#bytebase.v1.AuditLog.Severity">AuditLog.Severity</a></td><td></td>- <td><p> </p></td>+ <td><p>The severity level of this audit log entry. </p></td></tr><tr>- <td>masking_exemption_policy</td>- <td><a href="#bytebase.v1.MaskingExemptionPolicy">MaskingExemptionPolicy</a></td>+ <td>resource</td>+ <td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>The resource associated with this audit log. </p></td></tr><tr>- <td>tag_policy</td>- <td><a href="#bytebase.v1.TagPolicy">TagPolicy</a></td>+ <td>request</td>+ <td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>The request payload in JSON format. </p></td></tr><tr>- <td>query_data_policy</td>- <td><a href="#bytebase.v1.QueryDataPolicy">QueryDataPolicy</a></td>+ <td>response</td>+ <td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>The response payload in JSON format.+Some fields may be omitted if they are too large or contain sensitive information. </p></td></tr><tr>- <td>enforce</td>- <td><a href="#bool">bool</a></td>+ <td>status</td>+ <td><a href="#google.rpc.Status">google.rpc.Status</a></td><td></td>- <td><p>Whether the policy is enforced. </p></td>+ <td><p>The status of the operation. </p></td></tr><tr>- <td>resource_type</td>- <td><a href="#bytebase.v1.PolicyResourceType">PolicyResourceType</a></td>+ <td>latency</td>+ <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td><td></td>- <td><p>The resource type for the policy. </p></td>+ <td><p>The duration of the operation. </p></td>+ </tr>++ <tr>+ <td>service_data</td>+ <td><a href="#google.protobuf.Any">google.protobuf.Any</a></td>+ <td></td>+ <td><p>Service-specific metadata about the request, response, and activities. </p></td>+ </tr>++ <tr>+ <td>request_metadata</td>+ <td><a href="#bytebase.v1.RequestMetadata">RequestMetadata</a></td>+ <td></td>+ <td><p>Metadata about the request context. </p></td></tr></tbody>@@ -20603,8 +20873,8 @@ Database resource name: instances/instance-id/databases/database-name. </p></td>- <h3 id="bytebase.v1.QueryDataPolicy">QueryDataPolicy</h3>- <p>QueryDataPolicy is the policy configuration for querying data in the SQL Editor.</p>+ <h3 id="bytebase.v1.ExportAuditLogsRequest">ExportAuditLogsRequest</h3>+ <p>Request message for exporting audit logs.</p><table class="field-table">@@ -20614,40 +20884,54 @@ Database resource name: instances/instance-id/databases/database-name. </p></td><tbody><tr>- <td>maximum_result_rows</td>- <td><a href="#int32">int32</a></td>+ <td>parent</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>Support both project-level and workspace-level.-The maximum number of rows to return in the SQL editor.-The default value <= 0, means no limit. </p></td>+ <td><p> </p></td></tr><tr>- <td>disable_export</td>- <td><a href="#bool">bool</a></td>+ <td>filter</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>workspace-level policy-Disable data export in the SQL editor. </p></td>+ <td><p>The filter of the log. It should be a valid CEL expression.+Check the filter field in the SearchAuditLogsRequest message. </p></td></tr><tr>- <td>disable_copy_data</td>- <td><a href="#bool">bool</a></td>+ <td>order_by</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>workspace-level policy-Disable copying query results in the SQL editor. </p></td>+ <td><p>The order by of the log.+Only support order by create_time. The default sorting order is ascending.+For example:+ - order_by = "create_time asc"+ - order_by = "create_time desc" </p></td></tr><tr>- <td>allow_admin_data_source</td>- <td><a href="#bool">bool</a></td>+ <td>format</td>+ <td><a href="#bytebase.v1.ExportFormat">ExportFormat</a></td><td></td>- <td><p>workspace-level policy-Allow using the admin data source to query in the SQL editor.-If true, users can select the admin data source or read-only data source-If false,-1. when read-only data source is configured, users're force to use the read-only data source-2. otherwise fallback to use the admin data source. </p></td>+ <td><p>The export format. </p></td>+ </tr>++ <tr>+ <td>page_size</td>+ <td><a href="#int32">int32</a></td>+ <td></td>+ <td><p>The maximum number of logs to return.+The service may return fewer than this value.+If unspecified, at most 10 log entries will be returned.+The maximum value is 5000; values above 5000 will be coerced to 5000. </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 `ExportAuditLogs` call.+Provide this to retrieve the subsequent page. </p></td></tr></tbody>@@ -20657,8 +20941,8 @@ If false,- <h3 id="bytebase.v1.RolloutPolicy">RolloutPolicy</h3>- <p>Rollout policy configuration.</p>+ <h3 id="bytebase.v1.ExportAuditLogsResponse">ExportAuditLogsResponse</h3>+ <p>Response message for exporting audit logs.</p><table class="field-table">@@ -20668,17 +20952,19 @@ If false,<tbody><tr>- <td>automatic</td>- <td><a href="#bool">bool</a></td>+ <td>content</td>+ <td><a href="#bytes">bytes</a></td><td></td>- <td><p>Whether rollout is automatic without manual approval. </p></td>+ <td><p>The exported audit log content in the requested format. </p></td></tr><tr>- <td>roles</td>+ <td>next_page_token</td><td><a href="#string">string</a></td>- <td>repeated</td>- <td><p>The roles that can approve rollout execution. </p></td>+ <td></td>+ <td><p>A token to retrieve next page of log entities.+Pass this value in the page_token field in the subsequent call+to retrieve the next page of log entities. </p></td></tr></tbody>@@ -20688,8 +20974,8 @@ If false,- <h3 id="bytebase.v1.TagPolicy">TagPolicy</h3>- <p>Policy for tagging resources with metadata.</p>+ <h3 id="bytebase.v1.RequestMetadata">RequestMetadata</h3>+ <p>Metadata about the incoming request.</p><table class="field-table">@@ -20699,11 +20985,18 @@ If false,<tbody><tr>- <td>tags</td>- <td><a href="#bytebase.v1.TagPolicy.TagsEntry">TagPolicy.TagsEntry</a></td>- <td>repeated</td>- <td><p>tags is the key - value map for resources.-for example, the environment resource can have the sql review config tag, like "bb.tag.review_config": "reviewConfigs/{review config resource id}" </p></td>+ <td>caller_ip</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The IP address of the request originator. </p></td>+ </tr>++ <tr>+ <td>caller_supplied_user_agent</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The user agent string provided by the caller.+This is supplied by the client and is not authenticated. </p></td></tr></tbody>@@ -20713,8 +21006,8 @@ for example, the environment resource can have the sql review config tag, like &- <h3 id="bytebase.v1.TagPolicy.TagsEntry">TagPolicy.TagsEntry</h3>- <p></p>+ <h3 id="bytebase.v1.SearchAuditLogsRequest">SearchAuditLogsRequest</h3>+ <p>Request message for searching audit logs.</p><table class="field-table">@@ -20724,17 +21017,59 @@ for example, the environment resource can have the sql review config tag, like &<tbody><tr>- <td>key</td>+ <td>parent</td><td><a href="#string">string</a></td><td></td><td><p> </p></td></tr><tr>- <td>value</td>+ <td>filter</td><td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>The filter of the log. It should be a valid CEL expression.+The syntax and semantics of CEL are documented at https://github.com/google/cel-spec++Supported filter:+- method: the API name, can be found in the docs, should start with "/bytebase.v1." prefix. For example "/bytebase.v1.UserService/CreateUser". Support "==" operator.+- severity: support "==" operator, check Severity enum in AuditLog message for values.+- user: the actor, should in "users/{email}" format, support "==" operator.+- create_time: support ">=" and "<=" operator.++For example:+ - filter = "method == '/bytebase.v1.SQLService/Query'"+ - filter = "method == '/bytebase.v1.SQLService/Query' && severity == 'ERROR'"+ - filter = "method == '/bytebase.v1.SQLService/Query' && severity == 'ERROR' && user == 'users/[email protected]'"+ - filter = "method == '/bytebase.v1.SQLService/Query' && severity == 'ERROR' && create_time <= '2021-01-01T00:00:00Z' && create_time >= '2020-01-01T00:00:00Z'" </p></td>+ </tr>++ <tr>+ <td>order_by</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The order by of the log.+Only support order by create_time. The default sorting order is ascending.+For example:+ - order_by = "create_time asc"+ - order_by = "create_time desc" </p></td>+ </tr>++ <tr>+ <td>page_size</td>+ <td><a href="#int32">int32</a></td>+ <td></td>+ <td><p>The maximum number of logs to return.+The service may return fewer than this value.+If unspecified, at most 10 log entries will be returned.+The maximum value is 5000; values above 5000 will be coerced to 5000. </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 `SearchLogs` call.+Provide this to retrieve the subsequent page. </p></td></tr></tbody>@@ -20744,8 +21079,8 @@ for example, the environment resource can have the sql review config tag, like &- <h3 id="bytebase.v1.UpdatePolicyRequest">UpdatePolicyRequest</h3>- <p></p>+ <h3 id="bytebase.v1.SearchAuditLogsResponse">SearchAuditLogsResponse</h3>+ <p>Response message for searching audit logs.</p><table class="field-table">@@ -20755,32 +21090,19 @@ for example, the environment resource can have the sql review config tag, like &<tbody><tr>- <td>policy</td>- <td><a href="#bytebase.v1.Policy">Policy</a></td>- <td></td>- <td><p>The policy to update.--The policy's `name` field is used to identify the instance to update.-Format: {resource name}/policies/{policy type}-Workspace resource name: workspaces/{workspace-id}.-Environment resource name: environments/environment-id.-Instance resource name: instances/instance-id.-Database resource name: instances/instance-id/databases/database-name. </p></td>- </tr>-- <tr>- <td>update_mask</td>- <td><a href="#google.protobuf.FieldMask">google.protobuf.FieldMask</a></td>- <td></td>- <td><p>The list of fields to update. </p></td>+ <td>audit_logs</td>+ <td><a href="#bytebase.v1.AuditLog">AuditLog</a></td>+ <td>repeated</td>+ <td><p> </p></td></tr><tr>- <td>allow_missing</td>- <td><a href="#bool">bool</a></td>+ <td>next_page_token</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>If set to true, and the policy is not found, a new policy will be created.-In this situation, `update_mask` is ignored. </p></td>+ <td><p>A token to retrieve next page of log entities.+Pass this value in the page_token field in the subsequent call+to retrieve the next page of log entities. </p></td></tr></tbody>@@ -20792,43 +21114,8 @@ In this situation, `update_mask` is ignored. </p></td>- <h3 id="bytebase.v1.PolicyResourceType">PolicyResourceType</h3>- <p>The resource type that a policy can be attached to.</p>- <table class="enum-table">- <thead>- <tr><td>Name</td><td>Number</td><td>Description</td></tr>- </thead>- <tbody>-- <tr>- <td>RESOURCE_TYPE_UNSPECIFIED</td>- <td>0</td>- <td><p>Unspecified resource type.</p></td>- </tr>-- <tr>- <td>WORKSPACE</td>- <td>1</td>- <td><p>Workspace-level policy.</p></td>- </tr>-- <tr>- <td>ENVIRONMENT</td>- <td>2</td>- <td><p>Environment-level policy.</p></td>- </tr>-- <tr>- <td>PROJECT</td>- <td>3</td>- <td><p>Project-level policy.</p></td>- </tr>-- </tbody>- </table>-- <h3 id="bytebase.v1.PolicyType">PolicyType</h3>- <p>The type of organizational policy.</p>+ <h3 id="bytebase.v1.AuditLog.Severity">AuditLog.Severity</h3>+ <p>Severity level for audit log entries.</p><table class="enum-table"><thead><tr><td>Name</td><td>Number</td><td>Description</td></tr>@@ -20836,301 +21123,139 @@ In this situation, `update_mask` is ignored. </p></td><tbody><tr>- <td>POLICY_TYPE_UNSPECIFIED</td>+ <td>SEVERITY_UNSPECIFIED</td><td>0</td>- <td><p>Unspecified policy type.</p></td>- </tr>-- <tr>- <td>MASKING_RULE</td>- <td>1</td>- <td><p>Data masking rule policy.</p></td>- </tr>-- <tr>- <td>MASKING_EXEMPTION</td>- <td>2</td>- <td><p>Data masking exemption policy.</p></td>- </tr>-- <tr>- <td>ROLLOUT_POLICY</td>- <td>3</td>- <td><p>Rollout deployment policy.</p></td>- </tr>-- <tr>- <td>TAG</td>- <td>4</td>- <td><p>Resource tag policy.</p></td>- </tr>-- <tr>- <td>DATA_QUERY</td>- <td>6</td>- <td><p>Query data access policy.</p></td>- </tr>-- </tbody>- </table>------ <h3 id="bytebase.v1.OrgPolicyService">OrgPolicyService</h3>- <p>OrgPolicyService manages organizational policies at various resource levels.</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>GetPolicy</td>- <td><a href="#bytebase.v1.GetPolicyRequest">GetPolicyRequest</a></td>- <td><a href="#bytebase.v1.Policy">Policy</a></td>- <td><p>Retrieves a policy by name.-Permissions required: bb.policies.get</p></td>- </tr>-- <tr>- <td>ListPolicies</td>- <td><a href="#bytebase.v1.ListPoliciesRequest">ListPoliciesRequest</a></td>- <td><a href="#bytebase.v1.ListPoliciesResponse">ListPoliciesResponse</a></td>- <td><p>Lists policies at a specified resource level.-Permissions required: bb.policies.list</p></td>- </tr>-- <tr>- <td>CreatePolicy</td>- <td><a href="#bytebase.v1.CreatePolicyRequest">CreatePolicyRequest</a></td>- <td><a href="#bytebase.v1.Policy">Policy</a></td>- <td><p>Creates a new organizational policy.-Permissions required: bb.policies.create</p></td>- </tr>-- <tr>- <td>UpdatePolicy</td>- <td><a href="#bytebase.v1.UpdatePolicyRequest">UpdatePolicyRequest</a></td>- <td><a href="#bytebase.v1.Policy">Policy</a></td>- <td><p>Updates an existing organizational policy.-Permissions required: bb.policies.update</p></td>- </tr>-- <tr>- <td>DeletePolicy</td>- <td><a href="#bytebase.v1.DeletePolicyRequest">DeletePolicyRequest</a></td>- <td><a href="#google.protobuf.Empty">.google.protobuf.Empty</a></td>- <td><p>Deletes an organizational policy.-Permissions required: bb.policies.delete</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>GetPolicy</td>- <td>GET</td>- <td>/v1/{name=workspaces/*/policies/*}</td>- <td></td>- </tr>-- <tr>- <td>GetPolicy</td>- <td>GET</td>- <td>/v1/{name=projects/*/policies/*}</td>- <td></td>- </tr>-- <tr>- <td>GetPolicy</td>- <td>GET</td>- <td>/v1/{name=environments/*/policies/*}</td>- <td></td>- </tr>-- <tr>- <td>GetPolicy</td>- <td>GET</td>- <td>/v1/{name=instances/*/policies/*}</td>- <td></td>- </tr>-- <tr>- <td>GetPolicy</td>- <td>GET</td>- <td>/v1/{name=instances/*/databases/*/policies/*}</td>- <td></td>+ <td><p>Unspecified severity level.</p></td></tr>---- <tr>- <td>ListPolicies</td>- <td>GET</td>- <td>/v1/{parent=workspaces/*}/policies</td>- <td></td>- </tr>-- <tr>- <td>ListPolicies</td>- <td>GET</td>- <td>/v1/{parent=projects/*}/policies</td>- <td></td>- </tr>-- <tr>- <td>ListPolicies</td>- <td>GET</td>- <td>/v1/{parent=environments/*}/policies</td>- <td></td>- </tr>-- <tr>- <td>ListPolicies</td>- <td>GET</td>- <td>/v1/{parent=instances/*}/policies</td>- <td></td>- </tr>-- <tr>- <td>ListPolicies</td>- <td>GET</td>- <td>/v1/{parent=instances/*/databases/*}/policies</td>- <td></td>+ <tr>+ <td>DEBUG</td>+ <td>1</td>+ <td><p>Debug-level information.</p></td></tr>---<tr>- <td>CreatePolicy</td>- <td>POST</td>- <td>/v1/{parent=workspaces/*}/policies</td>- <td>policy</td>+ <td>INFO</td>+ <td>2</td>+ <td><p>Informational messages.</p></td></tr>-+<tr>- <td>CreatePolicy</td>- <td>POST</td>- <td>/v1/{parent=projects/*}/policies</td>- <td>policy</td>+ <td>NOTICE</td>+ <td>3</td>+ <td><p>Notable events.</p></td></tr>-+<tr>- <td>CreatePolicy</td>- <td>POST</td>- <td>/v1/{parent=environments/*}/policies</td>- <td>policy</td>+ <td>WARNING</td>+ <td>4</td>+ <td><p>Warning conditions.</p></td></tr>-+<tr>- <td>CreatePolicy</td>- <td>POST</td>- <td>/v1/{parent=instances/*}/policies</td>- <td>policy</td>+ <td>ERROR</td>+ <td>5</td>+ <td><p>Error conditions.</p></td></tr>-+<tr>- <td>CreatePolicy</td>- <td>POST</td>- <td>/v1/{parent=instances/*/databases/*}/policies</td>- <td>policy</td>+ <td>CRITICAL</td>+ <td>6</td>+ <td><p>Critical conditions.</p></td></tr>---<tr>- <td>UpdatePolicy</td>- <td>PATCH</td>- <td>/v1/{policy.name=workspaces/*/policies/*}</td>- <td>policy</td>+ <td>ALERT</td>+ <td>7</td>+ <td><p>Action must be taken immediately.</p></td></tr>-+<tr>- <td>UpdatePolicy</td>- <td>PATCH</td>- <td>/v1/{policy.name=projects/*/policies/*}</td>- <td>policy</td>+ <td>EMERGENCY</td>+ <td>8</td>+ <td><p>System is unusable.</p></td></tr>-++ </tbody>+ </table>++++++ <h3 id="bytebase.v1.AuditLogService">AuditLogService</h3>+ <p>AuditLogService manages audit logs for system activities and API calls.</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>UpdatePolicy</td>- <td>PATCH</td>- <td>/v1/{policy.name=environments/*/policies/*}</td>- <td>policy</td>+ <td>SearchAuditLogs</td>+ <td><a href="#bytebase.v1.SearchAuditLogsRequest">SearchAuditLogsRequest</a></td>+ <td><a href="#bytebase.v1.SearchAuditLogsResponse">SearchAuditLogsResponse</a></td>+ <td><p>Searches audit logs with optional filtering and pagination.+Permissions required: bb.auditLogs.search</p></td></tr>-+<tr>- <td>UpdatePolicy</td>- <td>PATCH</td>- <td>/v1/{policy.name=instances/*/policies/*}</td>- <td>policy</td>+ <td>ExportAuditLogs</td>+ <td><a href="#bytebase.v1.ExportAuditLogsRequest">ExportAuditLogsRequest</a></td>+ <td><a href="#bytebase.v1.ExportAuditLogsResponse">ExportAuditLogsResponse</a></td>+ <td><p>Exports audit logs in a specified format for external analysis.+Permissions required: bb.auditLogs.export</p></td></tr>-++ </tbody>+ </table>+++++ <h4>Methods with HTTP bindings</h4>+ <table>+ <thead><tr>- <td>UpdatePolicy</td>- <td>PATCH</td>- <td>/v1/{policy.name=instances/*/databases/*/policies/*}</td>- <td>policy</td>+ <td>Method Name</td>+ <td>Method</td>+ <td>Pattern</td>+ <td>Body</td></tr>-+ </thead>+ <tbody><tr>- <td>DeletePolicy</td>- <td>DELETE</td>- <td>/v1/{name=workspaces/*/policies/*}</td>- <td></td>+ <td>SearchAuditLogs</td>+ <td>POST</td>+ <td>/v1/{parent=projects/*}/auditLogs:search</td>+ <td>*</td></tr><tr>- <td>DeletePolicy</td>- <td>DELETE</td>- <td>/v1/{name=projects/*/policies/*}</td>- <td></td>+ <td>SearchAuditLogs</td>+ <td>POST</td>+ <td>/v1/auditLogs:search</td>+ <td>*</td></tr>- <tr>- <td>DeletePolicy</td>- <td>DELETE</td>- <td>/v1/{name=environments/*/policies/*}</td>- <td></td>- </tr>++<tr>- <td>DeletePolicy</td>- <td>DELETE</td>- <td>/v1/{name=instances/*/policies/*}</td>- <td></td>+ <td>ExportAuditLogs</td>+ <td>POST</td>+ <td>/v1/{parent=projects/*}/auditLogs:export</td>+ <td>*</td></tr><tr>- <td>DeletePolicy</td>- <td>DELETE</td>- <td>/v1/{name=instances/*/databases/*/policies/*}</td>- <td></td>+ <td>ExportAuditLogs</td>+ <td>POST</td>+ <td>/v1/auditLogs:export</td>+ <td>*</td></tr>@@ -21141,12 +21266,12 @@ Permissions required: bb.policies.delete</p></td><div class="file-heading">- <h2 id="v1/rollout_service.proto">v1/rollout_service.proto</h2><a href="#title">Top</a>+ <h2 id="v1/user_service.proto">v1/user_service.proto</h2><a href="#title">Top</a></div><p></p>- <h3 id="bytebase.v1.BatchCancelTaskRunsRequest">BatchCancelTaskRunsRequest</h3>+ <h3 id="bytebase.v1.BatchGetUsersRequest">BatchGetUsersRequest</h3><p></p>@@ -21157,20 +21282,11 @@ Permissions required: bb.policies.delete</p></td><tbody><tr>- <td>parent</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The task name for the taskRuns.-Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}-Use `projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/-` to cancel task runs under the same stage. </p></td>- </tr>-- <tr>- <td>task_runs</td>+ <td>names</td><td><a href="#string">string</a></td><td>repeated</td>- <td><p>The taskRuns to cancel.-Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun} </p></td>+ <td><p>The user names to retrieve.+Format: users/{email} </p></td></tr></tbody>@@ -21180,14 +21296,31 @@ Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/task- <h3 id="bytebase.v1.BatchCancelTaskRunsResponse">BatchCancelTaskRunsResponse</h3>+ <h3 id="bytebase.v1.BatchGetUsersResponse">BatchGetUsersResponse</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>users</td>+ <td><a href="#bytebase.v1.User">User</a></td>+ <td>repeated</td>+ <td><p>The users from the specified request. </p></td>+ </tr>++ </tbody>+ </table>++- <h3 id="bytebase.v1.BatchRunTasksRequest">BatchRunTasksRequest</h3>+ <h3 id="bytebase.v1.CreateUserRequest">CreateUserRequest</h3><p></p>@@ -21198,33 +21331,10 @@ Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/task<tbody><tr>- <td>parent</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The stage name for the tasks.-Format: projects/{project}/plans/{plan}/rollout/stages/{stage} </p></td>- </tr>-- <tr>- <td>tasks</td>- <td><a href="#string">string</a></td>- <td>repeated</td>- <td><p>The tasks to run.-Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task} </p></td>- </tr>-- <tr>- <td>run_time</td>- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>- <td>optional</td>- <td><p>The task run should run after run_time. </p></td>- </tr>-- <tr>- <td>skip_prior_backup</td>- <td><a href="#bool">bool</a></td>+ <td>user</td>+ <td><a href="#bytebase.v1.User">User</a></td><td></td>- <td><p>If true, skip prior backup for this run even if the task has prior backup enabled. </p></td>+ <td><p>The user to create. </p></td></tr></tbody>@@ -21234,14 +21344,32 @@ Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task} </p>- <h3 id="bytebase.v1.BatchRunTasksResponse">BatchRunTasksResponse</h3>+ <h3 id="bytebase.v1.DeleteUserRequest">DeleteUserRequest</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 user to delete.+Format: users/{email} </p></td>+ </tr>++ </tbody>+ </table>++- <h3 id="bytebase.v1.BatchSkipTasksRequest">BatchSkipTasksRequest</h3>+ <h3 id="bytebase.v1.GetUserRequest">GetUserRequest</h3><p></p>@@ -21252,26 +21380,11 @@ Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task} </p><tbody><tr>- <td>parent</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The stage name for the tasks.-Format: projects/{project}/plans/{plan}/rollout/stages/{stage} </p></td>- </tr>-- <tr>- <td>tasks</td>- <td><a href="#string">string</a></td>- <td>repeated</td>- <td><p>The tasks to skip.-Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task} </p></td>- </tr>-- <tr>- <td>reason</td>+ <td>name</td><td><a href="#string">string</a></td><td></td>- <td><p>The reason for skipping the tasks. </p></td>+ <td><p>The name of the user to retrieve.+Format: users/{email} </p></td></tr></tbody>@@ -21281,14 +21394,7 @@ Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task} </p>- <h3 id="bytebase.v1.BatchSkipTasksResponse">BatchSkipTasksResponse</h3>- <p></p>------ <h3 id="bytebase.v1.CreateRolloutRequest">CreateRolloutRequest</h3>+ <h3 id="bytebase.v1.ListUsersRequest">ListUsersRequest</h3><p></p>@@ -21299,21 +21405,56 @@ Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task} </p><tbody><tr>- <td>parent</td>+ <td>page_size</td>+ <td><a href="#int32">int32</a></td>+ <td></td>+ <td><p>The maximum number of users to return. The service may return fewer than+this value.+If unspecified, at most 10 users 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>The parent plan for which this rollout will be created.-Format: projects/{project}/plans/{plan} </p></td>+ <td><p>A page token, received from a previous `ListUsers` call.+Provide this to retrieve the subsequent page.++When paginating, all other parameters provided to `ListUsers` must match+the call that provided the page token. </p></td></tr><tr>- <td>target</td>+ <td>show_deleted</td>+ <td><a href="#bool">bool</a></td>+ <td></td>+ <td><p>Show deleted users if specified. </p></td>+ </tr>++ <tr>+ <td>filter</td><td><a href="#string">string</a></td>- <td>optional</td>- <td><p>Create the rollout only for the specified target.-Format: environments/{environment}-If unspecified, all stages are created.-If set to "", no stages are created. </p></td>+ <td></td>+ <td><p>Filter is used to filter users returned in the list.+The syntax and semantics of CEL are documented at https://github.com/google/cel-spec++Supported filter:+- name: the user name, support "==" and ".contains()" operator.+- email: the user email, support "==" and ".contains()" operator.+- state: check State enum for values, support "==" operator.+- project: the project full name in "projects/{id}" format, support "==" operator.++For example:+name == "ed"+name.contains("ed")+email == "[email protected]"+email.contains("ed")+state == "DELETED"+project == "projects/sample-project"+You can combine filter conditions like:+name.contains("ed") && project == "projects/sample-project"+(name == "ed" || email == "[email protected]") && project == "projects/sample-project" </p></td></tr></tbody>@@ -21323,7 +21464,7 @@ If set to "", no stages are created. </p></td>- <h3 id="bytebase.v1.GetRolloutRequest">GetRolloutRequest</h3>+ <h3 id="bytebase.v1.ListUsersResponse">ListUsersResponse</h3><p></p>@@ -21334,12 +21475,18 @@ If set to "", no stages are created. </p></td><tbody><tr>- <td>name</td>+ <td>users</td>+ <td><a href="#bytebase.v1.User">User</a></td>+ <td>repeated</td>+ <td><p>The users from the specified request. </p></td>+ </tr>++ <tr>+ <td>next_page_token</td><td><a href="#string">string</a></td><td></td>- <td><p>The name of the rollout to retrieve.-This is the rollout resource name, which is the plan name plus /rollout suffix.-Format: projects/{project}/plans/{plan}/rollout </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>@@ -21349,7 +21496,7 @@ Format: projects/{project}/plans/{plan}/rollout </p></td>- <h3 id="bytebase.v1.GetTaskRunLogRequest">GetTaskRunLogRequest</h3>+ <h3 id="bytebase.v1.UndeleteUserRequest">UndeleteUserRequest</h3><p></p>@@ -21360,10 +21507,11 @@ Format: projects/{project}/plans/{plan}/rollout </p></td><tbody><tr>- <td>parent</td>+ <td>name</td><td><a href="#string">string</a></td><td></td>- <td><p>Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun} </p></td>+ <td><p>The name of the deleted user.+Format: users/{email} </p></td></tr></tbody>@@ -21373,7 +21521,7 @@ Format: projects/{project}/plans/{plan}/rollout </p></td>- <h3 id="bytebase.v1.GetTaskRunRequest">GetTaskRunRequest</h3>+ <h3 id="bytebase.v1.UpdateEmailRequest">UpdateEmailRequest</h3><p></p>@@ -21387,7 +21535,16 @@ Format: projects/{project}/plans/{plan}/rollout </p></td><td>name</td><td><a href="#string">string</a></td><td></td>- <td><p>Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun} </p></td>+ <td><p>The name of the user whose email to update.+Format: users/{email}+Note: This is the current (old) email address. The new email is specified in the 'email' field. </p></td>+ </tr>++ <tr>+ <td>email</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The new email address. </p></td></tr></tbody>@@ -21397,7 +21554,7 @@ Format: projects/{project}/plans/{plan}/rollout </p></td>- <h3 id="bytebase.v1.GetTaskRunSessionRequest">GetTaskRunSessionRequest</h3>+ <h3 id="bytebase.v1.UpdateUserRequest">UpdateUserRequest</h3><p></p>@@ -21408,10 +21565,50 @@ Format: projects/{project}/plans/{plan}/rollout </p></td><tbody><tr>- <td>parent</td>+ <td>user</td>+ <td><a href="#bytebase.v1.User">User</a></td>+ <td></td>+ <td><p>The user to update.++The user's `name` field is used to identify the user to update.+Format: users/{email} </p></td>+ </tr>++ <tr>+ <td>update_mask</td>+ <td><a href="#google.protobuf.FieldMask">google.protobuf.FieldMask</a></td>+ <td></td>+ <td><p>The list of fields to update. </p></td>+ </tr>++ <tr>+ <td>otp_code</td><td><a href="#string">string</a></td>+ <td>optional</td>+ <td><p>The otp_code is used to verify the user's identity by MFA. </p></td>+ </tr>++ <tr>+ <td>regenerate_temp_mfa_secret</td>+ <td><a href="#bool">bool</a></td><td></td>- <td><p>Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun} </p></td>+ <td><p>The regenerate_temp_mfa_secret flag means to regenerate temporary MFA secret for user.+This is used for MFA setup. The temporary MFA secret and recovery codes will be returned in the response. </p></td>+ </tr>++ <tr>+ <td>regenerate_recovery_codes</td>+ <td><a href="#bool">bool</a></td>+ <td></td>+ <td><p>The regenerate_recovery_codes flag means to regenerate recovery codes for user. </p></td>+ </tr>++ <tr>+ <td>allow_missing</td>+ <td><a href="#bool">bool</a></td>+ <td></td>+ <td><p>If set to true, and the user is not found, a new user will be created.+In this situation, `update_mask` is ignored. </p></td></tr></tbody>@@ -21421,7 +21618,7 @@ Format: projects/{project}/plans/{plan}/rollout </p></td>- <h3 id="bytebase.v1.ListRolloutsRequest">ListRolloutsRequest</h3>+ <h3 id="bytebase.v1.User">User</h3><p></p>@@ -21432,49 +21629,105 @@ Format: projects/{project}/plans/{plan}/rollout </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 rollouts.-Format: projects/{project}-Use "projects/-" to list all rollouts from all projects. </p></td>+ <td><p>The name of the user.+Format: users/{email} </p></td></tr><tr>- <td>page_size</td>- <td><a href="#int32">int32</a></td>+ <td>state</td>+ <td><a href="#bytebase.v1.State">State</a></td><td></td>- <td><p>The maximum number of rollouts to return. The service may return fewer than-this value.-If unspecified, at most 10 rollouts will be returned.-The maximum value is 1000; values above 1000 will be coerced to 1000. </p></td>+ <td><p>The lifecycle state of the user account. </p></td>+ </tr>++ <tr>+ <td>email</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The email address of the user, used for login and notifications. </p></td>+ </tr>++ <tr>+ <td>title</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The display title or full name of the user. </p></td>+ </tr>++ <tr>+ <td>password</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The password for authentication. Only used during user creation or password updates. </p></td>+ </tr>++ <tr>+ <td>service_key</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The service key for service account authentication. </p></td>+ </tr>++ <tr>+ <td>mfa_enabled</td>+ <td><a href="#bool">bool</a></td>+ <td></td>+ <td><p>The mfa_enabled flag means if the user has enabled MFA. </p></td>+ </tr>++ <tr>+ <td>temp_otp_secret</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>Temporary OTP secret used during MFA setup and regeneration. </p></td>+ </tr>++ <tr>+ <td>temp_recovery_codes</td>+ <td><a href="#string">string</a></td>+ <td>repeated</td>+ <td><p>Temporary recovery codes used during MFA setup and regeneration. </p></td>+ </tr>++ <tr>+ <td>temp_otp_secret_created_time</td>+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>+ <td></td>+ <td><p>Timestamp when temp_otp_secret was created. Used by frontend to show countdown timer. </p></td>+ </tr>++ <tr>+ <td>phone</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>Should be a valid E.164 compliant phone number.+Could be empty. </p></td>+ </tr>++ <tr>+ <td>profile</td>+ <td><a href="#bytebase.v1.User.Profile">User.Profile</a></td>+ <td></td>+ <td><p>User profile metadata. </p></td></tr><tr>- <td>page_token</td>+ <td>groups</td><td><a href="#string">string</a></td>- <td></td>- <td><p>A page token, received from a previous `ListRollouts` call.-Provide this to retrieve the subsequent page.--When paginating, all other parameters provided to `ListRollouts` must match-the call that provided the page token. </p></td>+ <td>repeated</td>+ <td><p>The groups for the user.+Format: groups/{email} </p></td></tr><tr>- <td>filter</td>+ <td>workspace</td><td><a href="#string">string</a></td><td></td>- <td><p>Filter is used to filter rollouts returned in the list.-The syntax and semantics of CEL are documented at https://github.com/google/cel-spec--Supported filters:-- update_time: rollout update time in "2006-01-02T15:04:05Z07:00" format, support ">=" or "<=" operator.-- task_type: the task type, support "in" operator, check the Task.Type enum for the values.--For example:-update_time >= "2025-01-02T15:04:05Z07:00"-task_type in ["DATABASE_MIGRATE", "DATABASE_EXPORT"] </p></td>+ <td><p>The current workspace.+Format: workspaces/{id} </p></td></tr></tbody>@@ -21484,7 +21737,7 @@ task_type in ["DATABASE_MIGRATE", "DATABASE_EXPORT"] </p></td>- <h3 id="bytebase.v1.ListRolloutsResponse">ListRolloutsResponse</h3>+ <h3 id="bytebase.v1.User.Profile">User.Profile</h3><p></p>@@ -21495,44 +21748,24 @@ task_type in ["DATABASE_MIGRATE", "DATABASE_EXPORT"] </p></td><tbody><tr>- <td>rollouts</td>- <td><a href="#bytebase.v1.Rollout">Rollout</a></td>- <td>repeated</td>- <td><p>The rollouts from the specified request. </p></td>+ <td>last_login_time</td>+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>+ <td></td>+ <td><p>The last time the user successfully logged in. </p></td></tr><tr>- <td>next_page_token</td>- <td><a href="#string">string</a></td>+ <td>last_change_password_time</td>+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</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 last time the user changed their password. </p></td></tr>- </tbody>- </table>------ <h3 id="bytebase.v1.ListTaskRunsRequest">ListTaskRunsRequest</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>source</td><td><a href="#string">string</a></td><td></td>- <td><p>The parent, which owns this collection of taskRuns.-Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}-Use "projects/{project}/plans/{plan}/rollout/stages/-/tasks/-" to list all taskRuns from a rollout. </p></td>+ <td><p>source means where the user comes from. For now we support Entra ID SCIM sync, so the source could be Entra ID. </p></td></tr></tbody>@@ -21542,31 +21775,218 @@ Use "projects/{project}/plans/{plan}/rollout/stages/-/tasks/-" to list a- <h3 id="bytebase.v1.ListTaskRunsResponse">ListTaskRunsResponse</h3>- <p></p>+++++++ <h3 id="bytebase.v1.UserService">UserService</h3>+ <p>UserService manages user accounts and authentication.</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>GetUser</td>+ <td><a href="#bytebase.v1.GetUserRequest">GetUserRequest</a></td>+ <td><a href="#bytebase.v1.User">User</a></td>+ <td><p>Get the user.+Any authenticated user can get the user.+Permissions required: bb.users.get</p></td>+ </tr>++ <tr>+ <td>BatchGetUsers</td>+ <td><a href="#bytebase.v1.BatchGetUsersRequest">BatchGetUsersRequest</a></td>+ <td><a href="#bytebase.v1.BatchGetUsersResponse">BatchGetUsersResponse</a></td>+ <td><p>Get the users in batch.+Any authenticated user can batch get users.+Permissions required: bb.users.get</p></td>+ </tr>++ <tr>+ <td>GetCurrentUser</td>+ <td><a href="#google.protobuf.Empty">.google.protobuf.Empty</a></td>+ <td><a href="#bytebase.v1.User">User</a></td>+ <td><p>Get the current authenticated user.+Permissions required: None</p></td>+ </tr>++ <tr>+ <td>ListUsers</td>+ <td><a href="#bytebase.v1.ListUsersRequest">ListUsersRequest</a></td>+ <td><a href="#bytebase.v1.ListUsersResponse">ListUsersResponse</a></td>+ <td><p>List all users.+Any authenticated user can list users.+Permissions required: bb.users.list</p></td>+ </tr>++ <tr>+ <td>CreateUser</td>+ <td><a href="#bytebase.v1.CreateUserRequest">CreateUserRequest</a></td>+ <td><a href="#bytebase.v1.User">User</a></td>+ <td><p>Creates a user in the caller's workspace (admin action, self-hosted only).+In SaaS mode, admins should add users via workspace IAM policy instead.+Permissions required: bb.users.create</p></td>+ </tr>++ <tr>+ <td>UpdateUser</td>+ <td><a href="#bytebase.v1.UpdateUserRequest">UpdateUserRequest</a></td>+ <td><a href="#bytebase.v1.User">User</a></td>+ <td><p>Updates a user. Users can update their own profile, or users with bb.users.update permission can update any user.+Note: Email updates are not supported through this API. Use UpdateEmail instead.+Permissions required: bb.users.update (or self)</p></td>+ </tr>++ <tr>+ <td>DeleteUser</td>+ <td><a href="#bytebase.v1.DeleteUserRequest">DeleteUserRequest</a></td>+ <td><a href="#google.protobuf.Empty">.google.protobuf.Empty</a></td>+ <td><p>Deletes a user. Requires bb.users.delete permission with additional validation: the last remaining workspace admin cannot be deleted.+Permissions required: bb.users.delete</p></td>+ </tr>++ <tr>+ <td>UndeleteUser</td>+ <td><a href="#bytebase.v1.UndeleteUserRequest">UndeleteUserRequest</a></td>+ <td><a href="#bytebase.v1.User">User</a></td>+ <td><p>Restores a deleted user.+Permissions required: bb.users.undelete</p></td>+ </tr>++ <tr>+ <td>UpdateEmail</td>+ <td><a href="#bytebase.v1.UpdateEmailRequest">UpdateEmailRequest</a></td>+ <td><a href="#bytebase.v1.User">User</a></td>+ <td><p>Updates a user's email address.+Permissions required: bb.users.updateEmail</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>GetUser</td>+ <td>GET</td>+ <td>/v1/{name=users/*}</td>+ <td></td>+ </tr>+++++ <tr>+ <td>BatchGetUsers</td>+ <td>GET</td>+ <td>/v1/users:batchGet</td>+ <td></td>+ </tr>+++++ <tr>+ <td>GetCurrentUser</td>+ <td>GET</td>+ <td>/v1/users/me</td>+ <td></td>+ </tr>+++++ <tr>+ <td>ListUsers</td>+ <td>GET</td>+ <td>/v1/users</td>+ <td></td>+ </tr>+++++ <tr>+ <td>CreateUser</td>+ <td>POST</td>+ <td>/v1/users</td>+ <td>user</td>+ </tr>+++++ <tr>+ <td>UpdateUser</td>+ <td>PATCH</td>+ <td>/v1/{user.name=users/*}</td>+ <td>user</td>+ </tr>+++++ <tr>+ <td>DeleteUser</td>+ <td>DELETE</td>+ <td>/v1/{name=users/*}</td>+ <td></td>+ </tr>+++++ <tr>+ <td>UndeleteUser</td>+ <td>POST</td>+ <td>/v1/{name=users/*}:undelete</td>+ <td>*</td>+ </tr>++- <tr>- <td>task_runs</td>- <td><a href="#bytebase.v1.TaskRun">TaskRun</a></td>- <td>repeated</td>- <td><p>The taskRuns from the specified request. </p></td>- </tr>+ <tr>+ <td>UpdateEmail</td>+ <td>POST</td>+ <td>/v1/{name=users/*}:updateEmail</td>+ <td>*</td>+ </tr>++</tbody></table>--+- <h3 id="bytebase.v1.PreviewTaskRunRollbackRequest">PreviewTaskRunRollbackRequest</h3>+ <div class="file-heading">+ <h2 id="v1/auth_service.proto">v1/auth_service.proto</h2><a href="#title">Top</a>+ </div>+ <p></p>+++ <h3 id="bytebase.v1.ExchangeTokenRequest">ExchangeTokenRequest</h3><p></p>@@ -21577,34 +21997,18 @@ Use "projects/{project}/plans/{plan}/rollout/stages/-/tasks/-" to list a<tbody><tr>- <td>name</td>+ <td>token</td><td><a href="#string">string</a></td><td></td>- <td><p>Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun} </p></td>+ <td><p>External OIDC token (JWT) from CI/CD platform. </p></td></tr>- </tbody>- </table>------ <h3 id="bytebase.v1.PreviewTaskRunRollbackResponse">PreviewTaskRunRollbackResponse</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>email</td><td><a href="#string">string</a></td><td></td>- <td><p>The rollback SQL statement that would undo the task run. </p></td>+ <td><p>Workload Identity email for identifying which identity to authenticate as.+Format: {name}@workload.bytebase.com </p></td></tr></tbody>@@ -21614,7 +22018,7 @@ Use "projects/{project}/plans/{plan}/rollout/stages/-/tasks/-" to list a- <h3 id="bytebase.v1.Rollout">Rollout</h3>+ <h3 id="bytebase.v1.ExchangeTokenResponse">ExchangeTokenResponse</h3><p></p>@@ -21625,40 +22029,10 @@ Use "projects/{project}/plans/{plan}/rollout/stages/-/tasks/-" to list a<tbody><tr>- <td>name</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The resource name of the rollout.-Format: projects/{project}/plans/{plan}/rollout </p></td>- </tr>-- <tr>- <td>title</td>+ <td>access_token</td><td><a href="#string">string</a></td><td></td>- <td><p>The title of the rollout, inherited from the associated plan.-This field is output only and cannot be directly set. </p></td>- </tr>-- <tr>- <td>stages</td>- <td><a href="#bytebase.v1.Stage">Stage</a></td>- <td>repeated</td>- <td><p>Stages and thus tasks of the rollout. </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>update_time</td>- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>- <td></td>- <td><p> </p></td>+ <td><p>Bytebase access token. </p></td></tr></tbody>@@ -21668,8 +22042,8 @@ This field is output only and cannot be directly set. </p></td>- <h3 id="bytebase.v1.Stage">Stage</h3>- <p></p>+ <h3 id="bytebase.v1.IdentityProviderContext">IdentityProviderContext</h3>+ <p>Context for identity provider authentication.</p><table class="field-table">@@ -21679,35 +22053,17 @@ This field is output only and cannot be directly set. </p></td><tbody><tr>- <td>name</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>Format: projects/{project}/plans/{plan}/rollout/stages/{stage}-Use "-" for {stage} when the stage has no environment or deleted environment. </p></td>- </tr>-- <tr>- <td>id</td>- <td><a href="#string">string</a></td>+ <td>oauth2_context</td>+ <td><a href="#bytebase.v1.OAuth2IdentityProviderContext">OAuth2IdentityProviderContext</a></td><td></td>- <td><p>id is the environment id of the stage.-e.g., "prod".-Use "-" when the stage has no environment or deleted environment. </p></td>+ <td><p>OAuth2 authentication context. </p></td></tr><tr>- <td>environment</td>- <td><a href="#string">string</a></td>+ <td>oidc_context</td>+ <td><a href="#bytebase.v1.OIDCIdentityProviderContext">OIDCIdentityProviderContext</a></td><td></td>- <td><p>environment is the environment of the stage.-Format: environments/{environment} for valid environments, or "environments/-" for stages without environment or with deleted environments. </p></td>- </tr>-- <tr>- <td>tasks</td>- <td><a href="#bytebase.v1.Task">Task</a></td>- <td>repeated</td>- <td><p>The tasks within this stage. </p></td>+ <td><p>OpenID Connect authentication context. </p></td></tr></tbody>@@ -21717,7 +22073,7 @@ Format: environments/{environment} for valid environments, or "environments/- <h3 id="bytebase.v1.Task">Task</h3>+ <h3 id="bytebase.v1.LoginRequest">LoginRequest</h3><p></p>@@ -21728,163 +22084,80 @@ Format: environments/{environment} for valid environments, or "environments/<tbody><tr>- <td>name</td>+ <td>email</td><td><a href="#string">string</a></td><td></td>- <td><p>Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task} </p></td>+ <td><p>User's email address. </p></td></tr><tr>- <td>spec_id</td>+ <td>password</td><td><a href="#string">string</a></td><td></td>- <td><p>A UUID4 string that uniquely identifies the Spec. </p></td>+ <td><p>User's password for authentication. </p></td></tr><tr>- <td>status</td>- <td><a href="#bytebase.v1.Task.Status">Task.Status</a></td>+ <td>web</td>+ <td><a href="#bool">bool</a></td><td></td>- <td><p>Status is the status of the task. </p></td>+ <td><p>If true, sets access token and refresh token as HTTP-only cookies instead of+returning the token in the response body. Use for browser-based clients. </p></td></tr><tr>- <td>skipped_reason</td>+ <td>idp_name</td><td><a href="#string">string</a></td><td></td>- <td><p>The reason why the task was skipped. </p></td>+ <td><p>The name of the identity provider.+Format: idps/{idp} </p></td></tr><tr>- <td>type</td>- <td><a href="#bytebase.v1.Task.Type">Task.Type</a></td>+ <td>idp_context</td>+ <td><a href="#bytebase.v1.IdentityProviderContext">IdentityProviderContext</a></td><td></td>- <td><p> </p></td>+ <td><p>The idp_context is used to get the user information from identity provider. </p></td></tr><tr>- <td>target</td>+ <td>otp_code</td><td><a href="#string">string</a></td>- <td></td>- <td><p>Format: instances/{instance} if the task is DatabaseCreate.-Format: instances/{instance}/databases/{database} </p></td>- </tr>-- <tr>- <td>database_create</td>- <td><a href="#bytebase.v1.Task.DatabaseCreate">Task.DatabaseCreate</a></td>- <td></td>- <td><p> </p></td>- </tr>-- <tr>- <td>database_update</td>- <td><a href="#bytebase.v1.Task.DatabaseUpdate">Task.DatabaseUpdate</a></td>- <td></td>- <td><p> </p></td>- </tr>-- <tr>- <td>database_data_export</td>- <td><a href="#bytebase.v1.Task.DatabaseDataExport">Task.DatabaseDataExport</a></td>- <td></td>- <td><p> </p></td>- </tr>-- <tr>- <td>update_time</td>- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>- <td>optional</td>- <td><p>The update_time is the update time of latest task run.-If there are no task runs, it will be empty. </p></td>- </tr>-- <tr>- <td>run_time</td>- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td><td>optional</td>- <td><p>The run_time is the scheduled run time of latest task run.-If there are no task runs or the task run is not scheduled, it will be empty. </p></td>+ <td><p>The otp_code is used to verify the user's identity by MFA. </p></td></tr>- </tbody>- </table>------ <h3 id="bytebase.v1.Task.DatabaseCreate">Task.DatabaseCreate</h3>- <p>Payload for creating a new database.</p>--- <table class="field-table">- <thead>- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>- </thead>- <tbody>-<tr>- <td>sheet</td>+ <td>recovery_code</td><td><a href="#string">string</a></td>- <td></td>- <td><p>Format: projects/{project}/sheets/{sheet} </p></td>+ <td>optional</td>+ <td><p>The recovery_code is used to recovery the user's identity with MFA. </p></td></tr>- </tbody>- </table>------ <h3 id="bytebase.v1.Task.DatabaseDataExport">Task.DatabaseDataExport</h3>- <p>Payload for exporting database data.</p>--- <table class="field-table">- <thead>- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>- </thead>- <tbody>-<tr>- <td>sheet</td>+ <td>mfa_temp_token</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>optional</td>+ <td><p>The mfa_temp_token is used to verify the user's identity by MFA. </p></td></tr>- </tbody>- </table>------ <h3 id="bytebase.v1.Task.DatabaseUpdate">Task.DatabaseUpdate</h3>- <p>Payload for updating a database schema.</p>--- <table class="field-table">- <thead>- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>- </thead>- <tbody>-<tr>- <td>sheet</td>+ <td>email_code</td><td><a href="#string">string</a></td>- <td></td>- <td><p>Format: projects/{project}/sheets/{sheet} </p></td>+ <td>optional</td>+ <td><p>6-digit code from email for passwordless login/signup.+Pairs with `email`. Mutually exclusive with `password` and `idp_name`. </p></td></tr><tr>- <td>release</td>+ <td>workspace</td><td><a href="#string">string</a></td>- <td></td>- <td><p>Format: projects/{project}/releases/{release} </p></td>+ <td>optional</td>+ <td><p>Preferred workspace to land in after login. If the user is a member of this+workspace, the token is issued for it; otherwise falls back to the default+resolution (last login workspace → first membership). Typically populated+from the ?workspace= query parameter in invite links.+Format: workspaces/{workspace} </p></td></tr></tbody>@@ -21894,7 +22167,7 @@ Format: projects/{project}/sheets/{sheet} </p></td>- <h3 id="bytebase.v1.TaskRun">TaskRun</h3>+ <h3 id="bytebase.v1.LoginResponse">LoginResponse</h3><p></p>@@ -21905,84 +22178,32 @@ Format: projects/{project}/sheets/{sheet} </p></td><tbody><tr>- <td>name</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun} </p></td>- </tr>-- <tr>- <td>creator</td>+ <td>token</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>update_time</td>- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>- <td></td>- <td><p> </p></td>- </tr>-- <tr>- <td>status</td>- <td><a href="#bytebase.v1.TaskRun.Status">TaskRun.Status</a></td>- <td></td>- <td><p>The current execution status of the task run. </p></td>+ <td><p>Access token for authenticated requests.+Only returned when web=false. For web=true, the token is set as an HTTP-only cookie. </p></td></tr><tr>- <td>detail</td>+ <td>mfa_temp_token</td><td><a href="#string">string</a></td>- <td></td>- <td><p>Below are the results of a task run.-Detailed information about the task run result. </p></td>- </tr>-- <tr>- <td>start_time</td>- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>- <td></td>- <td><p>The time when the task run started execution. </p></td>- </tr>-- <tr>- <td>export_archive_status</td>- <td><a href="#bytebase.v1.TaskRun.ExportArchiveStatus">TaskRun.ExportArchiveStatus</a></td>- <td></td>- <td><p>The export archive status for data export tasks. </p></td>+ <td>optional</td>+ <td><p>Temporary token for MFA verification. </p></td></tr><tr>- <td>has_prior_backup</td>+ <td>require_reset_password</td><td><a href="#bool">bool</a></td><td></td>- <td><p>Indicates whether a prior backup was created for this task run.-When true, rollback SQL can be generated via PreviewTaskRunRollback.-Backup details are available in the task run logs. </p></td>+ <td><p>Whether user must reset password before continuing. </p></td></tr><tr>- <td>scheduler_info</td>- <td><a href="#bytebase.v1.TaskRun.SchedulerInfo">TaskRun.SchedulerInfo</a></td>+ <td>user</td>+ <td><a href="#bytebase.v1.User">User</a></td><td></td>- <td><p>Scheduling information about the task run. </p></td>- </tr>-- <tr>- <td>run_time</td>- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>- <td>optional</td>- <td><p>The task run should run after run_time.-This can only be set when creating the task run calling BatchRunTasks. </p></td>+ <td><p>The user from the successful login. </p></td></tr></tbody>@@ -21992,8 +22213,15 @@ This can only be set when creating the task run calling BatchRunTasks. </p></td>- <h3 id="bytebase.v1.TaskRun.SchedulerInfo">TaskRun.SchedulerInfo</h3>- <p>Information about task run scheduling.</p>+ <h3 id="bytebase.v1.LogoutRequest">LogoutRequest</h3>+ <p>Request to logout current user session.</p>++++++ <h3 id="bytebase.v1.OAuth2IdentityProviderContext">OAuth2IdentityProviderContext</h3>+ <p>OAuth2 authentication context.</p><table class="field-table">@@ -22003,17 +22231,10 @@ This can only be set when creating the task run calling BatchRunTasks. </p></td><tbody><tr>- <td>report_time</td>- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>- <td></td>- <td><p>The time when the scheduling info was reported. </p></td>- </tr>-- <tr>- <td>waiting_cause</td>- <td><a href="#bytebase.v1.TaskRun.SchedulerInfo.WaitingCause">TaskRun.SchedulerInfo.WaitingCause</a></td>+ <td>code</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>The cause for the task run waiting. </p></td>+ <td><p>Authorization code from OAuth2 provider. </p></td></tr></tbody>@@ -22023,8 +22244,8 @@ This can only be set when creating the task run calling BatchRunTasks. </p></td>- <h3 id="bytebase.v1.TaskRun.SchedulerInfo.WaitingCause">TaskRun.SchedulerInfo.WaitingCause</h3>- <p>Information about why a task run is waiting.</p>+ <h3 id="bytebase.v1.OIDCIdentityProviderContext">OIDCIdentityProviderContext</h3>+ <p>OpenID Connect authentication context.</p><table class="field-table">@@ -22034,10 +22255,10 @@ This can only be set when creating the task run calling BatchRunTasks. </p></td><tbody><tr>- <td>parallel_tasks_limit</td>- <td><a href="#bool">bool</a></td>+ <td>code</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>Waiting due to parallel tasks limit. </p></td>+ <td><p>Authorization code from OIDC provider. </p></td></tr></tbody>@@ -22047,7 +22268,21 @@ This can only be set when creating the task run calling BatchRunTasks. </p></td>- <h3 id="bytebase.v1.TaskRunLog">TaskRunLog</h3>+ <h3 id="bytebase.v1.RefreshRequest">RefreshRequest</h3>+ <p>Request to refresh the access token.</p>++++++ <h3 id="bytebase.v1.RefreshResponse">RefreshResponse</h3>+ <p>Response from refreshing the access token.</p>++++++ <h3 id="bytebase.v1.RequestPasswordResetRequest">RequestPasswordResetRequest</h3><p></p>@@ -22058,17 +22293,20 @@ This can only be set when creating the task run calling BatchRunTasks. </p></td><tbody><tr>- <td>name</td>+ <td>email</td><td><a href="#string">string</a></td><td></td>- <td><p>Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun}/log </p></td>+ <td><p>The email address of the account to reset. </p></td></tr><tr>- <td>entries</td>- <td><a href="#bytebase.v1.TaskRunLogEntry">TaskRunLogEntry</a></td>- <td>repeated</td>- <td><p>The log entries for this task run. </p></td>+ <td>workspace</td>+ <td><a href="#string">string</a></td>+ <td>optional</td>+ <td><p>Optional workspace context captured at send time, used to locate the EMAIL setting,+and later (at verify time) for signup gate checks and workspace assignment.+Unset for SaaS brand-new signup (no workspace exists yet).+Format: workspaces/{workspace} </p></td></tr></tbody>@@ -22078,7 +22316,7 @@ This can only be set when creating the task run calling BatchRunTasks. </p></td>- <h3 id="bytebase.v1.TaskRunLogEntry">TaskRunLogEntry</h3>+ <h3 id="bytebase.v1.ResetPasswordRequest">ResetPasswordRequest</h3><p></p>@@ -22089,87 +22327,96 @@ This can only be set when creating the task run calling BatchRunTasks. </p></td><tbody><tr>- <td>type</td>- <td><a href="#bytebase.v1.TaskRunLogEntry.Type">TaskRunLogEntry.Type</a></td>- <td></td>- <td><p>The type of this log entry. </p></td>- </tr>-- <tr>- <td>log_time</td>- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>- <td></td>- <td><p>The time when the log was recorded. </p></td>- </tr>-- <tr>- <td>replica_id</td>+ <td>email</td><td><a href="#string">string</a></td><td></td>- <td><p>The replica ID for this log entry. </p></td>+ <td><p>The email address of the account. </p></td></tr><tr>- <td>schema_dump</td>- <td><a href="#bytebase.v1.TaskRunLogEntry.SchemaDump">TaskRunLogEntry.SchemaDump</a></td>+ <td>code</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>Schema dump details (if type is SCHEMA_DUMP). </p></td>+ <td><p>The 6-digit code from the reset email. </p></td></tr><tr>- <td>command_execute</td>- <td><a href="#bytebase.v1.TaskRunLogEntry.CommandExecute">TaskRunLogEntry.CommandExecute</a></td>+ <td>new_password</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>Command execution details (if type is COMMAND_EXECUTE). </p></td>+ <td><p>The new password to set. </p></td></tr>- <tr>- <td>database_sync</td>- <td><a href="#bytebase.v1.TaskRunLogEntry.DatabaseSync">TaskRunLogEntry.DatabaseSync</a></td>- <td></td>- <td><p>Database sync details (if type is DATABASE_SYNC). </p></td>- </tr>+ </tbody>+ </table>++++++ <h3 id="bytebase.v1.SendEmailLoginCodeRequest">SendEmailLoginCodeRequest</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>transaction_control</td>- <td><a href="#bytebase.v1.TaskRunLogEntry.TransactionControl">TaskRunLogEntry.TransactionControl</a></td>+ <td>email</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>Transaction control details (if type is TRANSACTION_CONTROL). </p></td>+ <td><p>The email address to send the code to. </p></td></tr><tr>- <td>prior_backup</td>- <td><a href="#bytebase.v1.TaskRunLogEntry.PriorBackup">TaskRunLogEntry.PriorBackup</a></td>- <td></td>- <td><p>Prior backup details (if type is PRIOR_BACKUP). </p></td>+ <td>workspace</td>+ <td><a href="#string">string</a></td>+ <td>optional</td>+ <td><p>Optional workspace context captured at send time, used to locate the EMAIL setting,+and later (at verify time) for signup gate checks and workspace assignment.+Unset for SaaS brand-new signup (no workspace exists yet).+Format: workspaces/{workspace} </p></td></tr>- <tr>- <td>retry_info</td>- <td><a href="#bytebase.v1.TaskRunLogEntry.RetryInfo">TaskRunLogEntry.RetryInfo</a></td>- <td></td>- <td><p>Retry information details (if type is RETRY_INFO). </p></td>- </tr>+ </tbody>+ </table>++++++ <h3 id="bytebase.v1.SignupRequest">SignupRequest</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>compute_diff</td>- <td><a href="#bytebase.v1.TaskRunLogEntry.ComputeDiff">TaskRunLogEntry.ComputeDiff</a></td>+ <td>email</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>Compute diff details (if type is COMPUTE_DIFF). </p></td>+ <td><p>The email for the new account. </p></td></tr><tr>- <td>release_file_execute</td>- <td><a href="#bytebase.v1.TaskRunLogEntry.ReleaseFileExecute">TaskRunLogEntry.ReleaseFileExecute</a></td>+ <td>password</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>Release file execution details (if type is RELEASE_FILE_EXECUTE). </p></td>+ <td><p>The password for the new account. </p></td></tr><tr>- <td>ghost_migration</td>- <td><a href="#bytebase.v1.TaskRunLogEntry.GhostMigration">TaskRunLogEntry.GhostMigration</a></td>+ <td>title</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>gh-ost migration details (if type is GHOST_MIGRATION). </p></td>+ <td><p>The display name of the user. </p></td></tr></tbody>@@ -22179,8 +22426,8 @@ This can only be set when creating the task run calling BatchRunTasks. </p></td>- <h3 id="bytebase.v1.TaskRunLogEntry.CommandExecute">TaskRunLogEntry.CommandExecute</h3>- <p>Command execution details.</p>+ <h3 id="bytebase.v1.SwitchWorkspaceRequest">SwitchWorkspaceRequest</h3>+ <p></p><table class="field-table">@@ -22190,44 +22437,261 @@ This can only be set when creating the task run calling BatchRunTasks. </p></td><tbody><tr>- <td>log_time</td>- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>+ <td>workspace</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>When the command was logged. </p></td>+ <td><p>The target workspace to switch to.+Format: workspaces/{workspace} </p></td></tr><tr>- <td>range</td>- <td><a href="#bytebase.v1.Range">Range</a></td>+ <td>web</td>+ <td><a href="#bool">bool</a></td><td></td>- <td><p>The byte offset range of the executed command in the sheet.-Uses byte offsets (not character indices) for efficient slicing of sheet content bytes.-Example: For "SELECT 你好;" in a UTF-8 sheet, range [0, 13) represents all 13 bytes. </p></td>+ <td><p>If true, sets tokens as HTTP-only cookies (browser clients). </p></td></tr><tr>- <td>statement</td>+ <td>otp_code</td><td><a href="#string">string</a></td>- <td></td>- <td><p>The executed statement. </p></td>+ <td>optional</td>+ <td><p>OTP code for MFA verification. Required if the target workspace enforces MFA. </p></td></tr><tr>- <td>response</td>- <td><a href="#bytebase.v1.TaskRunLogEntry.CommandExecute.CommandResponse">TaskRunLogEntry.CommandExecute.CommandResponse</a></td>- <td></td>- <td><p>The response from executing the command. </p></td>+ <td>recovery_code</td>+ <td><a href="#string">string</a></td>+ <td>optional</td>+ <td><p>Recovery code for MFA verification (alternative to otp_code). </p></td>+ </tr>++ <tr>+ <td>mfa_temp_token</td>+ <td><a href="#string">string</a></td>+ <td>optional</td>+ <td><p>Temporary MFA token from a previous SwitchWorkspace call that returned mfa_temp_token. </p></td></tr></tbody></table>-++++++++++++ <h3 id="bytebase.v1.AuthService">AuthService</h3>+ <p>AuthService handles user authentication 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>Login</td>+ <td><a href="#bytebase.v1.LoginRequest">LoginRequest</a></td>+ <td><a href="#bytebase.v1.LoginResponse">LoginResponse</a></td>+ <td><p>Authenticates a user and returns access tokens.+Permissions required: None</p></td>+ </tr>++ <tr>+ <td>Logout</td>+ <td><a href="#bytebase.v1.LogoutRequest">LogoutRequest</a></td>+ <td><a href="#google.protobuf.Empty">.google.protobuf.Empty</a></td>+ <td><p>Logs out the current user session.+Permissions required: None</p></td>+ </tr>++ <tr>+ <td>ExchangeToken</td>+ <td><a href="#bytebase.v1.ExchangeTokenRequest">ExchangeTokenRequest</a></td>+ <td><a href="#bytebase.v1.ExchangeTokenResponse">ExchangeTokenResponse</a></td>+ <td><p>Exchanges an external OIDC token for a Bytebase access token.+Used by CI/CD pipelines with Workload Identity Federation.+Permissions required: None (validates via OIDC token)</p></td>+ </tr>++ <tr>+ <td>Signup</td>+ <td><a href="#bytebase.v1.SignupRequest">SignupRequest</a></td>+ <td><a href="#bytebase.v1.LoginResponse">LoginResponse</a></td>+ <td><p>Registers a new user account. Creates a principal and assigns a workspace:+- If the user's email was pre-invited to a workspace, joins that workspace.+- Otherwise, creates a new workspace with the user as admin.+Returns access tokens so the user is logged in immediately after signup.</p></td>+ </tr>++ <tr>+ <td>Refresh</td>+ <td><a href="#bytebase.v1.RefreshRequest">RefreshRequest</a></td>+ <td><a href="#bytebase.v1.RefreshResponse">RefreshResponse</a></td>+ <td><p>Refreshes the access token using the refresh token cookie.+Permissions required: None (validates via refresh token cookie)</p></td>+ </tr>++ <tr>+ <td>SwitchWorkspace</td>+ <td><a href="#bytebase.v1.SwitchWorkspaceRequest">SwitchWorkspaceRequest</a></td>+ <td><a href="#bytebase.v1.LoginResponse">LoginResponse</a></td>+ <td><p>Switches the current user's active workspace and issues new tokens.+The user must be a member of the target workspace.</p></td>+ </tr>++ <tr>+ <td>RequestPasswordReset</td>+ <td><a href="#bytebase.v1.RequestPasswordResetRequest">RequestPasswordResetRequest</a></td>+ <td><a href="#google.protobuf.Empty">.google.protobuf.Empty</a></td>+ <td><p>Requests a password reset email for the given email address.+Always returns success to avoid leaking whether the email exists.+Permissions required: None</p></td>+ </tr>++ <tr>+ <td>ResetPassword</td>+ <td><a href="#bytebase.v1.ResetPasswordRequest">ResetPasswordRequest</a></td>+ <td><a href="#google.protobuf.Empty">.google.protobuf.Empty</a></td>+ <td><p>Resets the user's password using a password reset token from email.+Permissions required: None (validates via token)</p></td>+ </tr>++ <tr>+ <td>SendEmailLoginCode</td>+ <td><a href="#bytebase.v1.SendEmailLoginCodeRequest">SendEmailLoginCodeRequest</a></td>+ <td><a href="#google.protobuf.Empty">.google.protobuf.Empty</a></td>+ <td><p>Sends a 6-digit verification code to the email for login/signup.+Always returns success (no email enumeration). Enforces 60-sec resend cooldown.+Permissions required: None</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>Login</td>+ <td>POST</td>+ <td>/v1/auth/login</td>+ <td>*</td>+ </tr>+++++ <tr>+ <td>Logout</td>+ <td>POST</td>+ <td>/v1/auth/logout</td>+ <td>*</td>+ </tr>+++++ <tr>+ <td>ExchangeToken</td>+ <td>POST</td>+ <td>/v1/auth:exchangeToken</td>+ <td>*</td>+ </tr>+++++ <tr>+ <td>Signup</td>+ <td>POST</td>+ <td>/v1/auth/signup</td>+ <td>*</td>+ </tr>+++++ <tr>+ <td>Refresh</td>+ <td>POST</td>+ <td>/v1/auth/refresh</td>+ <td>*</td>+ </tr>+++++ <tr>+ <td>SwitchWorkspace</td>+ <td>POST</td>+ <td>/v1/auth:switchWorkspace</td>+ <td>*</td>+ </tr>+++++ <tr>+ <td>RequestPasswordReset</td>+ <td>POST</td>+ <td>/v1/auth:requestPasswordReset</td>+ <td>*</td>+ </tr>+++++ <tr>+ <td>ResetPassword</td>+ <td>POST</td>+ <td>/v1/auth:resetPassword</td>+ <td>*</td>+ </tr>+++++ <tr>+ <td>SendEmailLoginCode</td>+ <td>POST</td>+ <td>/v1/auth:sendEmailLoginCode</td>+ <td>*</td>+ </tr>+++ </tbody>+ </table>-+- <h3 id="bytebase.v1.TaskRunLogEntry.CommandExecute.CommandResponse">TaskRunLogEntry.CommandExecute.CommandResponse</h3>- <p>Command execution response.</p>+ <div class="file-heading">+ <h2 id="v1/cel_service.proto">v1/cel_service.proto</h2><a href="#title">Top</a>+ </div>+ <p></p>+++ <h3 id="bytebase.v1.BatchDeparseRequest">BatchDeparseRequest</h3>+ <p>Request message for batch deparsing CEL expressions.</p><table class="field-table">@@ -22237,32 +22701,10 @@ Example: For "SELECT 你好;" in a UTF-8 sheet, range [0, 13) represents<tbody><tr>- <td>log_time</td>- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>- <td></td>- <td><p>When the response was logged. </p></td>- </tr>-- <tr>- <td>error</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>Error message if command execution failed. </p></td>- </tr>-- <tr>- <td>affected_rows</td>- <td><a href="#int64">int64</a></td>- <td></td>- <td><p>Total affected rows. </p></td>- </tr>-- <tr>- <td>all_affected_rows</td>- <td><a href="#int64">int64</a></td>+ <td>expressions</td>+ <td><a href="#google.api.expr.v1alpha1.Expr">google.api.expr.v1alpha1.Expr</a></td><td>repeated</td>- <td><p>`all_affected_rows` is the affected rows of each command.-`all_affected_rows` may be unavailable if the database driver doesn't support it. Caller should fallback to `affected_rows` in that case. </p></td>+ <td><p>The CEL expression ASTs to deparse. </p></td></tr></tbody>@@ -22272,8 +22714,8 @@ Example: For "SELECT 你好;" in a UTF-8 sheet, range [0, 13) represents- <h3 id="bytebase.v1.TaskRunLogEntry.ComputeDiff">TaskRunLogEntry.ComputeDiff</h3>- <p>Schema diff computation details.</p>+ <h3 id="bytebase.v1.BatchDeparseResponse">BatchDeparseResponse</h3>+ <p>Response message for batch deparsing CEL expressions.</p><table class="field-table">@@ -22283,24 +22725,10 @@ Example: For "SELECT 你好;" in a UTF-8 sheet, range [0, 13) represents<tbody><tr>- <td>start_time</td>- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>- <td></td>- <td><p>When diff computation started. </p></td>- </tr>-- <tr>- <td>end_time</td>- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>- <td></td>- <td><p>When diff computation ended. </p></td>- </tr>-- <tr>- <td>error</td>+ <td>expressions</td><td><a href="#string">string</a></td>- <td></td>- <td><p>Error message if computation failed. </p></td>+ <td>repeated</td>+ <td><p>The deparsed CEL expressions as strings. </p></td></tr></tbody>@@ -22310,8 +22738,8 @@ Example: For "SELECT 你好;" in a UTF-8 sheet, range [0, 13) represents- <h3 id="bytebase.v1.TaskRunLogEntry.DatabaseSync">TaskRunLogEntry.DatabaseSync</h3>- <p>Database synchronization details.</p>+ <h3 id="bytebase.v1.BatchParseRequest">BatchParseRequest</h3>+ <p>Request message for batch parsing CEL expressions.</p><table class="field-table">@@ -22321,24 +22749,10 @@ Example: For "SELECT 你好;" in a UTF-8 sheet, range [0, 13) represents<tbody><tr>- <td>start_time</td>- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>- <td></td>- <td><p>When the database sync started. </p></td>- </tr>-- <tr>- <td>end_time</td>- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>- <td></td>- <td><p>When the database sync ended. </p></td>- </tr>-- <tr>- <td>error</td>+ <td>expressions</td><td><a href="#string">string</a></td>- <td></td>- <td><p>Error message if sync failed. </p></td>+ <td>repeated</td>+ <td><p>The CEL expression strings to parse. </p></td></tr></tbody>@@ -22348,8 +22762,8 @@ Example: For "SELECT 你好;" in a UTF-8 sheet, range [0, 13) represents- <h3 id="bytebase.v1.TaskRunLogEntry.GhostMigration">TaskRunLogEntry.GhostMigration</h3>- <p>gh-ost migration details.</p>+ <h3 id="bytebase.v1.BatchParseResponse">BatchParseResponse</h3>+ <p>Response message for batch parsing CEL expressions.</p><table class="field-table">@@ -22359,24 +22773,10 @@ Example: For "SELECT 你好;" in a UTF-8 sheet, range [0, 13) represents<tbody><tr>- <td>start_time</td>- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>- <td></td>- <td><p>When the gh-ost migration started. </p></td>- </tr>-- <tr>- <td>end_time</td>- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>- <td></td>- <td><p>When the gh-ost migration ended. </p></td>- </tr>-- <tr>- <td>error</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>Error message if the gh-ost migration failed. </p></td>+ <td>expressions</td>+ <td><a href="#google.api.expr.v1alpha1.Expr">google.api.expr.v1alpha1.Expr</a></td>+ <td>repeated</td>+ <td><p>The parsed CEL expressions as AST. </p></td></tr></tbody>@@ -22386,77 +22786,88 @@ Example: For "SELECT 你好;" in a UTF-8 sheet, range [0, 13) represents- <h3 id="bytebase.v1.TaskRunLogEntry.PriorBackup">TaskRunLogEntry.PriorBackup</h3>- <p>Prior backup operation details.</p>+++++++ <h3 id="bytebase.v1.CelService">CelService</h3>+ <p>CelService manages CEL (Common Expression Language) parsing and formatting 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>BatchParse</td>+ <td><a href="#bytebase.v1.BatchParseRequest">BatchParseRequest</a></td>+ <td><a href="#bytebase.v1.BatchParseResponse">BatchParseResponse</a></td>+ <td><p>Parses multiple CEL expression strings into AST representations.+Permissions required: None</p></td>+ </tr>++ <tr>+ <td>BatchDeparse</td>+ <td><a href="#bytebase.v1.BatchDeparseRequest">BatchDeparseRequest</a></td>+ <td><a href="#bytebase.v1.BatchDeparseResponse">BatchDeparseResponse</a></td>+ <td><p>Converts multiple CEL AST representations back into expression strings.+Permissions required: None</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>start_time</td>- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>- <td></td>- <td><p>When the backup started. </p></td>- </tr>- <tr>- <td>end_time</td>- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>- <td></td>- <td><p>When the backup ended. </p></td>- </tr>+ <tr>+ <td>BatchParse</td>+ <td>POST</td>+ <td>/v1/cel/batchParse</td>+ <td>*</td>+ </tr>- <tr>- <td>prior_backup_detail</td>- <td><a href="#bytebase.v1.TaskRunLogEntry.PriorBackup.PriorBackupDetail">TaskRunLogEntry.PriorBackup.PriorBackupDetail</a></td>- <td></td>- <td><p>The backup details. </p></td>- </tr>+- <tr>- <td>error</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>Error message if the backup failed. </p></td>- </tr>+ <tr>+ <td>BatchDeparse</td>+ <td>POST</td>+ <td>/v1/cel/batchDeparse</td>+ <td>*</td>+ </tr>++</tbody></table>--+- <h3 id="bytebase.v1.TaskRunLogEntry.PriorBackup.PriorBackupDetail">TaskRunLogEntry.PriorBackup.PriorBackupDetail</h3>- <p>Prior backup detail for rollback purposes.</p>--- <table class="field-table">- <thead>- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>- </thead>- <tbody>-- <tr>- <td>items</td>- <td><a href="#bytebase.v1.TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item">TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item</a></td>- <td>repeated</td>- <td><p>The list of backed up tables. </p></td>- </tr>-- </tbody>- </table>--+ <div class="file-heading">+ <h2 id="v1/database_catalog_service.proto">v1/database_catalog_service.proto</h2><a href="#title">Top</a>+ </div>+ <p></p>-- <h3 id="bytebase.v1.TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item">TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item</h3>- <p>A single backup table mapping.</p>+ <h3 id="bytebase.v1.ColumnCatalog">ColumnCatalog</h3>+ <p>Column metadata within a table.</p><table class="field-table">@@ -22466,31 +22877,38 @@ Example: For "SELECT 你好;" in a UTF-8 sheet, range [0, 13) represents<tbody><tr>- <td>source_table</td>- <td><a href="#bytebase.v1.TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item.Table">TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item.Table</a></td>+ <td>name</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>The original table information. </p></td>+ <td><p>The column name. </p></td></tr><tr>- <td>target_table</td>- <td><a href="#bytebase.v1.TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item.Table">TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item.Table</a></td>+ <td>semantic_type</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>The target backup table information. </p></td>+ <td><p>The semantic type describing the data purpose. </p></td></tr><tr>- <td>start_position</td>- <td><a href="#bytebase.v1.Position">Position</a></td>- <td></td>- <td><p>The start position in the SQL statement. </p></td>+ <td>labels</td>+ <td><a href="#bytebase.v1.ColumnCatalog.LabelsEntry">ColumnCatalog.LabelsEntry</a></td>+ <td>repeated</td>+ <td><p>User-defined labels for this column. </p></td></tr><tr>- <td>end_position</td>- <td><a href="#bytebase.v1.Position">Position</a></td>+ <td>classification</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>The end position in the SQL statement. </p></td>+ <td><p>The data classification level for this column. </p></td>+ </tr>++ <tr>+ <td>object_schema</td>+ <td><a href="#bytebase.v1.ObjectSchema">ObjectSchema</a></td>+ <td>optional</td>+ <td><p>Object schema for complex column types like JSON. </p></td></tr></tbody>@@ -22500,8 +22918,8 @@ Example: For "SELECT 你好;" in a UTF-8 sheet, range [0, 13) represents- <h3 id="bytebase.v1.TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item.Table">TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item.Table</h3>- <p>Table information.</p>+ <h3 id="bytebase.v1.ColumnCatalog.LabelsEntry">ColumnCatalog.LabelsEntry</h3>+ <p></p><table class="field-table">@@ -22511,25 +22929,17 @@ Example: For "SELECT 你好;" in a UTF-8 sheet, range [0, 13) represents<tbody><tr>- <td>database</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The database information.-Format: instances/{instance}/databases/{database} </p></td>- </tr>-- <tr>- <td>schema</td>+ <td>key</td><td><a href="#string">string</a></td><td></td>- <td><p>The schema name. </p></td>+ <td><p> </p></td></tr><tr>- <td>table</td>+ <td>value</td><td><a href="#string">string</a></td><td></td>- <td><p>The table name. </p></td>+ <td><p> </p></td></tr></tbody>@@ -22539,8 +22949,8 @@ Format: instances/{instance}/databases/{database} </p></td>- <h3 id="bytebase.v1.TaskRunLogEntry.ReleaseFileExecute">TaskRunLogEntry.ReleaseFileExecute</h3>- <p>Release file execution details.</p>+ <h3 id="bytebase.v1.DatabaseCatalog">DatabaseCatalog</h3>+ <p>Catalog metadata for a database including schemas, tables, and columns.</p><table class="field-table">@@ -22550,17 +22960,18 @@ Format: instances/{instance}/databases/{database} </p></td><tbody><tr>- <td>version</td>+ <td>name</td><td><a href="#string">string</a></td><td></td>- <td><p>The version of the file being executed (e.g., "0001"). </p></td>+ <td><p>The name of the database catalog.+Format: instances/{instance}/databases/{database}/catalog </p></td></tr><tr>- <td>file_path</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The file path within the release (e.g., "2.2/V0001_create_table.sql"). </p></td>+ <td>schemas</td>+ <td><a href="#bytebase.v1.SchemaCatalog">SchemaCatalog</a></td>+ <td>repeated</td>+ <td><p>The schemas in the database. </p></td></tr></tbody>@@ -22570,8 +22981,8 @@ Format: instances/{instance}/databases/{database} </p></td>- <h3 id="bytebase.v1.TaskRunLogEntry.RetryInfo">TaskRunLogEntry.RetryInfo</h3>- <p>Retry information for failed operations.</p>+ <h3 id="bytebase.v1.GetDatabaseCatalogRequest">GetDatabaseCatalogRequest</h3>+ <p>Request message for getting a database catalog.</p><table class="field-table">@@ -22581,24 +22992,11 @@ Format: instances/{instance}/databases/{database} </p></td><tbody><tr>- <td>error</td>+ <td>name</td><td><a href="#string">string</a></td><td></td>- <td><p>The error that triggered the retry. </p></td>- </tr>-- <tr>- <td>retry_count</td>- <td><a href="#int32">int32</a></td>- <td></td>- <td><p>Current retry attempt number. </p></td>- </tr>-- <tr>- <td>maximum_retries</td>- <td><a href="#int32">int32</a></td>- <td></td>- <td><p>Maximum number of retries allowed. </p></td>+ <td><p>The name of the database catalog to retrieve.+Format: instances/{instance}/databases/{database}/catalog </p></td></tr></tbody>@@ -22608,8 +23006,8 @@ Format: instances/{instance}/databases/{database} </p></td>- <h3 id="bytebase.v1.TaskRunLogEntry.SchemaDump">TaskRunLogEntry.SchemaDump</h3>- <p>Schema dump operation details.</p>+ <h3 id="bytebase.v1.ObjectSchema">ObjectSchema</h3>+ <p>Schema definition for object-type columns.</p><table class="field-table">@@ -22619,24 +23017,31 @@ Format: instances/{instance}/databases/{database} </p></td><tbody><tr>- <td>start_time</td>- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>+ <td>type</td>+ <td><a href="#bytebase.v1.ObjectSchema.Type">ObjectSchema.Type</a></td><td></td>- <td><p>When the schema dump started. </p></td>+ <td><p>The data type of this object. </p></td></tr><tr>- <td>end_time</td>- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>+ <td>struct_kind</td>+ <td><a href="#bytebase.v1.ObjectSchema.StructKind">ObjectSchema.StructKind</a></td><td></td>- <td><p>When the schema dump ended. </p></td>+ <td><p>Struct schema. </p></td></tr><tr>- <td>error</td>+ <td>array_kind</td>+ <td><a href="#bytebase.v1.ObjectSchema.ArrayKind">ObjectSchema.ArrayKind</a></td>+ <td></td>+ <td><p>Array schema. </p></td>+ </tr>++ <tr>+ <td>semantic_type</td><td><a href="#string">string</a></td><td></td>- <td><p>Error message if the schema dump failed. </p></td>+ <td><p>The semantic type of this object. </p></td></tr></tbody>@@ -22646,8 +23051,8 @@ Format: instances/{instance}/databases/{database} </p></td>- <h3 id="bytebase.v1.TaskRunLogEntry.TransactionControl">TaskRunLogEntry.TransactionControl</h3>- <p>Transaction control operation details.</p>+ <h3 id="bytebase.v1.ObjectSchema.ArrayKind">ObjectSchema.ArrayKind</h3>+ <p>Array type with element schema.</p><table class="field-table">@@ -22657,17 +23062,34 @@ Format: instances/{instance}/databases/{database} </p></td><tbody><tr>- <td>type</td>- <td><a href="#bytebase.v1.TaskRunLogEntry.TransactionControl.Type">TaskRunLogEntry.TransactionControl.Type</a></td>+ <td>kind</td>+ <td><a href="#bytebase.v1.ObjectSchema">ObjectSchema</a></td><td></td>- <td><p>The type of transaction control. </p></td>+ <td><p>The schema of array elements. </p></td></tr>+ </tbody>+ </table>++++++ <h3 id="bytebase.v1.ObjectSchema.StructKind">ObjectSchema.StructKind</h3>+ <p>Structure type with named properties.</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><a href="#string">string</a></td>- <td></td>- <td><p>Error message if the operation failed. </p></td>+ <td>properties</td>+ <td><a href="#bytebase.v1.ObjectSchema.StructKind.PropertiesEntry">ObjectSchema.StructKind.PropertiesEntry</a></td>+ <td>repeated</td>+ <td><p>Properties of the struct. </p></td></tr></tbody>@@ -22677,7 +23099,7 @@ Format: instances/{instance}/databases/{database} </p></td>- <h3 id="bytebase.v1.TaskRunSession">TaskRunSession</h3>+ <h3 id="bytebase.v1.ObjectSchema.StructKind.PropertiesEntry">ObjectSchema.StructKind.PropertiesEntry</h3><p></p>@@ -22688,17 +23110,17 @@ Format: instances/{instance}/databases/{database} </p></td><tbody><tr>- <td>name</td>+ <td>key</td><td><a href="#string">string</a></td><td></td>- <td><p>Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun}/session </p></td>+ <td><p> </p></td></tr><tr>- <td>postgres</td>- <td><a href="#bytebase.v1.TaskRunSession.Postgres">TaskRunSession.Postgres</a></td>+ <td>value</td>+ <td><a href="#bytebase.v1.ObjectSchema">ObjectSchema</a></td><td></td>- <td><p>PostgreSQL session information. </p></td>+ <td><p> </p></td></tr></tbody>@@ -22708,8 +23130,8 @@ Format: instances/{instance}/databases/{database} </p></td>- <h3 id="bytebase.v1.TaskRunSession.Postgres">TaskRunSession.Postgres</h3>- <p>PostgreSQL session information.</p>+ <h3 id="bytebase.v1.SchemaCatalog">SchemaCatalog</h3>+ <p>Schema metadata within a database.</p><table class="field-table">@@ -22719,24 +23141,17 @@ Format: instances/{instance}/databases/{database} </p></td><tbody><tr>- <td>session</td>- <td><a href="#bytebase.v1.TaskRunSession.Postgres.Session">TaskRunSession.Postgres.Session</a></td>+ <td>name</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>`session` is the session of the task run executing commands. </p></td>- </tr>-- <tr>- <td>blocking_sessions</td>- <td><a href="#bytebase.v1.TaskRunSession.Postgres.Session">TaskRunSession.Postgres.Session</a></td>- <td>repeated</td>- <td><p>`blocking_sessions` block `session`. </p></td>+ <td><p>The schema name. </p></td></tr><tr>- <td>blocked_sessions</td>- <td><a href="#bytebase.v1.TaskRunSession.Postgres.Session">TaskRunSession.Postgres.Session</a></td>+ <td>tables</td>+ <td><a href="#bytebase.v1.TableCatalog">TableCatalog</a></td><td>repeated</td>- <td><p>`blocked_sessions` are blocked by `session`. </p></td>+ <td><p>The tables in the schema. </p></td></tr></tbody>@@ -22746,8 +23161,8 @@ Format: instances/{instance}/databases/{database} </p></td>- <h3 id="bytebase.v1.TaskRunSession.Postgres.Session">TaskRunSession.Postgres.Session</h3>- <p>PostgreSQL session information read from `pg_stat_activity`.</p>+ <h3 id="bytebase.v1.TableCatalog">TableCatalog</h3>+ <p>Table metadata within a schema.</p><table class="field-table">@@ -22757,101 +23172,55 @@ Format: instances/{instance}/databases/{database} </p></td><tbody><tr>- <td>pid</td>+ <td>name</td><td><a href="#string">string</a></td><td></td>- <td><p>Process ID of the session. </p></td>- </tr>-- <tr>- <td>blocked_by_pids</td>- <td><a href="#string">string</a></td>- <td>repeated</td>- <td><p>PIDs of sessions blocking this session. </p></td>+ <td><p>The table name. </p></td></tr><tr>- <td>query</td>- <td><a href="#string">string</a></td>+ <td>columns</td>+ <td><a href="#bytebase.v1.TableCatalog.Columns">TableCatalog.Columns</a></td><td></td>- <td><p>Current query being executed. </p></td>- </tr>-- <tr>- <td>state</td>- <td><a href="#string">string</a></td>- <td>optional</td>- <td><p>Session state (active, idle, etc.). </p></td>- </tr>-- <tr>- <td>wait_event_type</td>- <td><a href="#string">string</a></td>- <td>optional</td>- <td><p>Wait event type if session is waiting. </p></td>- </tr>-- <tr>- <td>wait_event</td>- <td><a href="#string">string</a></td>- <td>optional</td>- <td><p>Specific wait event if session is waiting. </p></td>- </tr>-- <tr>- <td>datname</td>- <td><a href="#string">string</a></td>- <td>optional</td>- <td><p>Database name. </p></td>- </tr>-- <tr>- <td>usename</td>- <td><a href="#string">string</a></td>- <td>optional</td>- <td><p>User name. </p></td>+ <td><p>Regular table columns. </p></td></tr><tr>- <td>application_name</td>- <td><a href="#string">string</a></td>+ <td>object_schema</td>+ <td><a href="#bytebase.v1.ObjectSchema">ObjectSchema</a></td><td></td>- <td><p>Application name. </p></td>- </tr>-- <tr>- <td>client_addr</td>- <td><a href="#string">string</a></td>- <td>optional</td>- <td><p>Client IP address. </p></td>+ <td><p>Object schema for JSON/XML columns. </p></td></tr><tr>- <td>client_port</td>+ <td>classification</td><td><a href="#string">string</a></td>- <td>optional</td>- <td><p>Client port number. </p></td>- </tr>-- <tr>- <td>backend_start</td>- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td><td></td>- <td><p>When the backend process started. </p></td>- </tr>-- <tr>- <td>xact_start</td>- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>- <td>optional</td>- <td><p>When the current transaction started. </p></td>+ <td><p>The data classification level for this table. </p></td></tr>+ </tbody>+ </table>++++++ <h3 id="bytebase.v1.TableCatalog.Columns">TableCatalog.Columns</h3>+ <p>Column list for regular tables.</p>+++ <table class="field-table">+ <thead>+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>+ </thead>+ <tbody>+<tr>- <td>query_start</td>- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>- <td>optional</td>- <td><p>When the current query started. </p></td>+ <td>columns</td>+ <td><a href="#bytebase.v1.ColumnCatalog">ColumnCatalog</a></td>+ <td>repeated</td>+ <td><p>The columns in the table. </p></td></tr></tbody>@@ -22861,230 +23230,45 @@ Format: instances/{instance}/databases/{database} </p></td>+ <h3 id="bytebase.v1.UpdateDatabaseCatalogRequest">UpdateDatabaseCatalogRequest</h3>+ <p>Request message for updating a database catalog.</p>++ <table class="field-table">+ <thead>+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>catalog</td>+ <td><a href="#bytebase.v1.DatabaseCatalog">DatabaseCatalog</a></td>+ <td></td>+ <td><p>The database catalog to update.++The catalog's `name` field is used to identify the database catalog to update.+Format: instances/{instance}/databases/{database}/catalog </p></td>+ </tr>++ <tr>+ <td>allow_missing</td>+ <td><a href="#bool">bool</a></td>+ <td></td>+ <td><p>If set to true, and the database catalog is not found, a new database catalog will be created.+In this situation, `update_mask` is ignored. </p></td>+ </tr>++ </tbody>+ </table>++++- <h3 id="bytebase.v1.Task.Status">Task.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>Unspecified status.</p></td>- </tr>-- <tr>- <td>NOT_STARTED</td>- <td>1</td>- <td><p>Task has not started and is awaiting its turn in the deployment sequence.</p></td>- </tr>-- <tr>- <td>PENDING</td>- <td>2</td>- <td><p>Task is ready to run and waiting for approval or scheduled time.</p></td>- </tr>-- <tr>- <td>RUNNING</td>- <td>3</td>- <td><p>Task is currently executing.</p></td>- </tr>-- <tr>- <td>DONE</td>- <td>4</td>- <td><p>Task completed successfully.</p></td>- </tr>-- <tr>- <td>FAILED</td>- <td>5</td>- <td><p>Task execution failed with errors.</p></td>- </tr>-- <tr>- <td>CANCELED</td>- <td>6</td>- <td><p>Task execution was canceled by a user.</p></td>- </tr>-- <tr>- <td>SKIPPED</td>- <td>7</td>- <td><p>Task was skipped and will not be executed.</p></td>- </tr>-- </tbody>- </table>-- <h3 id="bytebase.v1.Task.Type">Task.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 task type.</p></td>- </tr>-- <tr>- <td>GENERAL</td>- <td>1</td>- <td><p>General task for miscellaneous operations.</p></td>- </tr>-- <tr>- <td>DATABASE_CREATE</td>- <td>2</td>- <td><p>Database creation task that creates a new database.-Use payload DatabaseCreate.</p></td>- </tr>-- <tr>- <td>DATABASE_MIGRATE</td>- <td>3</td>- <td><p>Database migration task that applies versioned schema changes.-Use payload DatabaseUpdate.</p></td>- </tr>-- <tr>- <td>DATABASE_EXPORT</td>- <td>4</td>- <td><p>Database export task that exports query results or table data.-Use payload DatabaseDataExport.</p></td>- </tr>-- </tbody>- </table>-- <h3 id="bytebase.v1.TaskRun.ExportArchiveStatus">TaskRun.ExportArchiveStatus</h3>- <p></p>- <table class="enum-table">- <thead>- <tr><td>Name</td><td>Number</td><td>Description</td></tr>- </thead>- <tbody>-- <tr>- <td>EXPORT_ARCHIVE_STATUS_UNSPECIFIED</td>- <td>0</td>- <td><p>Unspecified export archive status.</p></td>- </tr>-- <tr>- <td>READY</td>- <td>1</td>- <td><p>Export archive is ready for download.</p></td>- </tr>-- <tr>- <td>EXPORTED</td>- <td>2</td>- <td><p>Export archive has been downloaded by the user.</p></td>- </tr>-- </tbody>- </table>-- <h3 id="bytebase.v1.TaskRun.Status">TaskRun.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>Unspecified status.</p></td>- </tr>-- <tr>- <td>PENDING</td>- <td>1</td>- <td><p>Task run is queued and waiting to start execution.</p></td>- </tr>-- <tr>- <td>RUNNING</td>- <td>2</td>- <td><p>Task run is currently executing.</p></td>- </tr>-- <tr>- <td>DONE</td>- <td>3</td>- <td><p>Task run completed successfully.</p></td>- </tr>-- <tr>- <td>FAILED</td>- <td>4</td>- <td><p>Task run execution failed with errors.</p></td>- </tr>-- <tr>- <td>CANCELED</td>- <td>5</td>- <td><p>Task run execution was canceled by a user.</p></td>- </tr>-- <tr>- <td>AVAILABLE</td>- <td>6</td>- <td><p>Task run is ready for immediate execution.</p></td>- </tr>-- </tbody>- </table>-- <h3 id="bytebase.v1.TaskRunLogEntry.TransactionControl.Type">TaskRunLogEntry.TransactionControl.Type</h3>- <p>Transaction control type.</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 type.</p></td>- </tr>-- <tr>- <td>BEGIN</td>- <td>1</td>- <td><p>Begin transaction.</p></td>- </tr>-- <tr>- <td>COMMIT</td>- <td>2</td>- <td><p>Commit transaction.</p></td>- </tr>-- <tr>- <td>ROLLBACK</td>- <td>3</td>- <td><p>Rollback transaction.</p></td>- </tr>-- </tbody>- </table>-- <h3 id="bytebase.v1.TaskRunLogEntry.Type">TaskRunLogEntry.Type</h3>- <p>The type of log entry.</p>+++ <h3 id="bytebase.v1.ObjectSchema.Type">ObjectSchema.Type</h3>+ <p>Object schema data types.</p><table class="enum-table"><thead><tr><td>Name</td><td>Number</td><td>Description</td></tr>@@ -23098,287 +23282,101 @@ Use payload DatabaseDataExport.</p></td></tr><tr>- <td>SCHEMA_DUMP</td>+ <td>STRING</td><td>1</td>- <td><p>Schema dump operation.</p></td>+ <td><p>String type.</p></td></tr><tr>- <td>COMMAND_EXECUTE</td>+ <td>NUMBER</td><td>2</td>- <td><p>Command execution.</p></td>+ <td><p>Number type.</p></td></tr><tr>- <td>DATABASE_SYNC</td>+ <td>BOOLEAN</td><td>3</td>- <td><p>Database synchronization.</p></td>- </tr>-- <tr>- <td>TRANSACTION_CONTROL</td>- <td>5</td>- <td><p>Transaction control (BEGIN, COMMIT, ROLLBACK).</p></td>- </tr>-- <tr>- <td>PRIOR_BACKUP</td>- <td>6</td>- <td><p>Prior backup operation.</p></td>- </tr>-- <tr>- <td>RETRY_INFO</td>- <td>7</td>- <td><p>Retry information.</p></td>- </tr>-- <tr>- <td>COMPUTE_DIFF</td>- <td>8</td>- <td><p>Schema diff computation.</p></td>- </tr>-- <tr>- <td>RELEASE_FILE_EXECUTE</td>- <td>9</td>- <td><p>Release file execution.</p></td>- </tr>-- <tr>- <td>GHOST_MIGRATION</td>- <td>10</td>- <td><p>gh-ost online migration.</p></td>- </tr>-- </tbody>- </table>------ <h3 id="bytebase.v1.RolloutService">RolloutService</h3>- <p>RolloutService manages the execution of deployment plans.</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>GetRollout</td>- <td><a href="#bytebase.v1.GetRolloutRequest">GetRolloutRequest</a></td>- <td><a href="#bytebase.v1.Rollout">Rollout</a></td>- <td><p>Retrieves a rollout by its plan name.-Permissions required: bb.rollouts.get</p></td>- </tr>-- <tr>- <td>ListRollouts</td>- <td><a href="#bytebase.v1.ListRolloutsRequest">ListRolloutsRequest</a></td>- <td><a href="#bytebase.v1.ListRolloutsResponse">ListRolloutsResponse</a></td>- <td><p>Lists rollouts in a project.-Permissions required: bb.rollouts.list</p></td>- </tr>-- <tr>- <td>CreateRollout</td>- <td><a href="#bytebase.v1.CreateRolloutRequest">CreateRolloutRequest</a></td>- <td><a href="#bytebase.v1.Rollout">Rollout</a></td>- <td><p>Creates a new rollout for a plan.-Permissions required: bb.rollouts.create (or issue creator for data export issues)</p></td>- </tr>-- <tr>- <td>ListTaskRuns</td>- <td><a href="#bytebase.v1.ListTaskRunsRequest">ListTaskRunsRequest</a></td>- <td><a href="#bytebase.v1.ListTaskRunsResponse">ListTaskRunsResponse</a></td>- <td><p>Lists task run executions for a task.-Permissions required: bb.taskRuns.list</p></td>- </tr>-- <tr>- <td>GetTaskRun</td>- <td><a href="#bytebase.v1.GetTaskRunRequest">GetTaskRunRequest</a></td>- <td><a href="#bytebase.v1.TaskRun">TaskRun</a></td>- <td><p>Retrieves a task run by name.-Permissions required: bb.taskRuns.list</p></td>- </tr>-- <tr>- <td>GetTaskRunLog</td>- <td><a href="#bytebase.v1.GetTaskRunLogRequest">GetTaskRunLogRequest</a></td>- <td><a href="#bytebase.v1.TaskRunLog">TaskRunLog</a></td>- <td><p>Retrieves execution logs for a task run.-Permissions required: bb.taskRuns.list</p></td>- </tr>-- <tr>- <td>GetTaskRunSession</td>- <td><a href="#bytebase.v1.GetTaskRunSessionRequest">GetTaskRunSessionRequest</a></td>- <td><a href="#bytebase.v1.TaskRunSession">TaskRunSession</a></td>- <td><p>Retrieves database session information for a running task.-Permissions required: bb.taskRuns.list</p></td>- </tr>-- <tr>- <td>BatchRunTasks</td>- <td><a href="#bytebase.v1.BatchRunTasksRequest">BatchRunTasksRequest</a></td>- <td><a href="#bytebase.v1.BatchRunTasksResponse">BatchRunTasksResponse</a></td>- <td><p>Executes multiple tasks in a rollout stage.-Permissions required: bb.taskRuns.create (or issue creator for data export issues, or user with rollout policy role for the environment)</p></td>- </tr>-- <tr>- <td>BatchSkipTasks</td>- <td><a href="#bytebase.v1.BatchSkipTasksRequest">BatchSkipTasksRequest</a></td>- <td><a href="#bytebase.v1.BatchSkipTasksResponse">BatchSkipTasksResponse</a></td>- <td><p>Skips multiple tasks in a rollout stage.-Permissions required: bb.taskRuns.create (or issue creator for data export issues, or user with rollout policy role for the environment)</p></td>- </tr>-- <tr>- <td>BatchCancelTaskRuns</td>- <td><a href="#bytebase.v1.BatchCancelTaskRunsRequest">BatchCancelTaskRunsRequest</a></td>- <td><a href="#bytebase.v1.BatchCancelTaskRunsResponse">BatchCancelTaskRunsResponse</a></td>- <td><p>Cancels multiple running task executions.-Permissions required: bb.taskRuns.create (or issue creator for data export issues, or user with rollout policy role for the environment)</p></td>- </tr>-- <tr>- <td>PreviewTaskRunRollback</td>- <td><a href="#bytebase.v1.PreviewTaskRunRollbackRequest">PreviewTaskRunRollbackRequest</a></td>- <td><a href="#bytebase.v1.PreviewTaskRunRollbackResponse">PreviewTaskRunRollbackResponse</a></td>- <td><p>Generates rollback SQL for a completed task run.-Permissions required: bb.taskRuns.list</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>GetRollout</td>- <td>GET</td>- <td>/v1/{name=projects/*/plans/*/rollout}</td>- <td></td>- </tr>----- <tr>- <td>ListRollouts</td>- <td>GET</td>- <td>/v1/{parent=projects/*}/rollouts</td>- <td></td>- </tr>----- <tr>- <td>CreateRollout</td>- <td>POST</td>- <td>/v1/{parent=projects/*/plans/*}/rollout</td>- <td>*</td>- </tr>----- <tr>- <td>ListTaskRuns</td>- <td>GET</td>- <td>/v1/{parent=projects/*/plans/*/rollout/stages/*/tasks/*}/taskRuns</td>- <td></td>+ <td><p>Boolean type.</p></td></tr>---<tr>- <td>GetTaskRun</td>- <td>GET</td>- <td>/v1/{name=projects/*/plans/*/rollout/stages/*/tasks/*/taskRuns/*}</td>- <td></td>+ <td>OBJECT</td>+ <td>4</td>+ <td><p>Object/struct type.</p></td></tr>---<tr>- <td>GetTaskRunLog</td>- <td>GET</td>- <td>/v1/{parent=projects/*/plans/*/rollout/stages/*/tasks/*/taskRuns/*}/log</td>- <td></td>+ <td>ARRAY</td>+ <td>5</td>+ <td><p>Array type.</p></td></tr>---+ </tbody>+ </table>++++++ <h3 id="bytebase.v1.DatabaseCatalogService">DatabaseCatalogService</h3>+ <p>DatabaseCatalogService manages database schema metadata and classification.</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>GetTaskRunSession</td>- <td>GET</td>- <td>/v1/{parent=projects/*/plans/*/rollout/stages/*/tasks/*/taskRuns/*}/session</td>- <td></td>+ <td>GetDatabaseCatalog</td>+ <td><a href="#bytebase.v1.GetDatabaseCatalogRequest">GetDatabaseCatalogRequest</a></td>+ <td><a href="#bytebase.v1.DatabaseCatalog">DatabaseCatalog</a></td>+ <td><p>Gets the catalog metadata for a database.+Permissions required: bb.databaseCatalogs.get</p></td></tr>---<tr>- <td>BatchRunTasks</td>- <td>POST</td>- <td>/v1/{parent=projects/*/plans/*/rollout/stages/*}/tasks:batchRun</td>- <td>*</td>+ <td>UpdateDatabaseCatalog</td>+ <td><a href="#bytebase.v1.UpdateDatabaseCatalogRequest">UpdateDatabaseCatalogRequest</a></td>+ <td><a href="#bytebase.v1.DatabaseCatalog">DatabaseCatalog</a></td>+ <td><p>Updates catalog metadata such as classifications and labels.+Permissions required: bb.databaseCatalogs.update</p></td></tr>---+ </tbody>+ </table>+++++ <h4>Methods with HTTP bindings</h4>+ <table>+ <thead><tr>- <td>BatchSkipTasks</td>- <td>POST</td>- <td>/v1/{parent=projects/*/plans/*/rollout/stages/*}/tasks:batchSkip</td>- <td>*</td>+ <td>Method Name</td>+ <td>Method</td>+ <td>Pattern</td>+ <td>Body</td></tr>-+ </thead>+ <tbody><tr>- <td>BatchCancelTaskRuns</td>- <td>POST</td>- <td>/v1/{parent=projects/*/plans/*/rollout/stages/*/tasks/*}/taskRuns:batchCancel</td>- <td>*</td>+ <td>GetDatabaseCatalog</td>+ <td>GET</td>+ <td>/v1/{name=instances/*/databases/*/catalog}</td>+ <td></td></tr><tr>- <td>PreviewTaskRunRollback</td>- <td>POST</td>- <td>/v1/{name=projects/*/plans/*/rollout/stages/*/tasks/*/taskRuns/*}:previewRollback</td>- <td>*</td>+ <td>UpdateDatabaseCatalog</td>+ <td>PATCH</td>+ <td>/v1/{catalog.name=instances/*/databases/*/catalog}</td>+ <td>catalog</td></tr>@@ -23389,13 +23387,13 @@ Permissions required: bb.taskRuns.list</p></td><div class="file-heading">- <h2 id="v1/sql_service.proto">v1/sql_service.proto</h2><a href="#title">Top</a>+ <h2 id="v1/database_group_service.proto">v1/database_group_service.proto</h2><a href="#title">Top</a></div><p></p>- <h3 id="bytebase.v1.AICompletionRequest">AICompletionRequest</h3>- <p></p>+ <h3 id="bytebase.v1.CreateDatabaseGroupRequest">CreateDatabaseGroupRequest</h3>+ <p>Request message for creating a database group.</p><table class="field-table">@@ -23405,10 +23403,36 @@ Permissions required: bb.taskRuns.list</p></td><tbody><tr>- <td>messages</td>- <td><a href="#bytebase.v1.AICompletionRequest.Message">AICompletionRequest.Message</a></td>- <td>repeated</td>- <td><p> </p></td>+ <td>parent</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The parent resource where this database group will be created.+Format: projects/{project} </p></td>+ </tr>++ <tr>+ <td>database_group</td>+ <td><a href="#bytebase.v1.DatabaseGroup">DatabaseGroup</a></td>+ <td></td>+ <td><p>The database group to create. </p></td>+ </tr>++ <tr>+ <td>database_group_id</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The ID to use for the database group, which will become the final component of+the database group's resource name.++This value should be 4-63 characters, and valid characters+are /[a-z][0-9]-/. </p></td>+ </tr>++ <tr>+ <td>validate_only</td>+ <td><a href="#bool">bool</a></td>+ <td></td>+ <td><p>If set, validate the create request and preview the full database group response, but do not actually create it. </p></td></tr></tbody>@@ -23418,8 +23442,8 @@ Permissions required: bb.taskRuns.list</p></td>- <h3 id="bytebase.v1.AICompletionRequest.Message">AICompletionRequest.Message</h3>- <p></p>+ <h3 id="bytebase.v1.DatabaseGroup">DatabaseGroup</h3>+ <p>A group of databases matched by expressions.</p><table class="field-table">@@ -23429,42 +23453,44 @@ Permissions required: bb.taskRuns.list</p></td><tbody><tr>- <td>role</td>+ <td>name</td><td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>The name of the database group.+Format: projects/{project}/databaseGroups/{databaseGroup} </p></td></tr><tr>- <td>content</td>+ <td>title</td><td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>The short name used in actual databases specified by users. </p></td></tr>- </tbody>- </table>--+ <tr>+ <td>database_expr</td>+ <td><a href="#google.type.Expr">google.type.Expr</a></td>+ <td></td>+ <td><p>The condition that is associated with this database group.+The syntax and semantics of CEL are documented at https://github.com/google/cel-spec--- <h3 id="bytebase.v1.AICompletionResponse">AICompletionResponse</h3>- <p></p>+Support variables:+resource.environment_id: the environment resource id. Support "==", "!=", "in [XX]", "!(in [xx])" operations.+resource.instance_id: the instance resource id. Support "==", "!=", "in [XX]", "!(in [xx])", "contains", "matches", "startsWith", "endsWith" operations.+resource.database_name: the database name. Support "==", "!=", "in [XX]", "!(in [xx])", "contains", "matches", "startsWith", "endsWith" operations.+resource.database_labels: the database labels. Support map access operations.+All variables should join with "&&" condition.-- <table class="field-table">- <thead>- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>- </thead>- <tbody>+For example:+resource.environment_id == "test" && resource.database_name.startsWith("sample_")+resource.database_labels["tenant"] == "tenant1" </p></td>+ </tr><tr>- <td>candidates</td>- <td><a href="#bytebase.v1.AICompletionResponse.Candidate">AICompletionResponse.Candidate</a></td>+ <td>matched_databases</td>+ <td><a href="#bytebase.v1.DatabaseGroup.Database">DatabaseGroup.Database</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><p>The list of databases that match the database group condition. </p></td></tr></tbody>@@ -23474,8 +23500,8 @@ for OpenAI and Gemini. </p></td>- <h3 id="bytebase.v1.AICompletionResponse.Candidate">AICompletionResponse.Candidate</h3>- <p></p>+ <h3 id="bytebase.v1.DatabaseGroup.Database">DatabaseGroup.Database</h3>+ <p>A database within a database group.</p><table class="field-table">@@ -23485,10 +23511,11 @@ 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> </p></td>+ <td><p>The resource name of the database.+Format: instances/{instance}/databases/{database} </p></td></tr></tbody>@@ -23498,8 +23525,8 @@ for OpenAI and Gemini. </p></td>- <h3 id="bytebase.v1.AICompletionResponse.Candidate.Content">AICompletionResponse.Candidate.Content</h3>- <p></p>+ <h3 id="bytebase.v1.DeleteDatabaseGroupRequest">DeleteDatabaseGroupRequest</h3>+ <p>Request message for deleting a database group.</p><table class="field-table">@@ -23509,10 +23536,11 @@ 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>name</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The name of the database group to delete.+Format: projects/{project}/databaseGroups/{databaseGroup} </p></td></tr></tbody>@@ -23522,8 +23550,8 @@ for OpenAI and Gemini. </p></td>- <h3 id="bytebase.v1.AICompletionResponse.Candidate.Content.Part">AICompletionResponse.Candidate.Content.Part</h3>- <p></p>+ <h3 id="bytebase.v1.GetDatabaseGroupRequest">GetDatabaseGroupRequest</h3>+ <p>Request message for getting a database group.</p><table class="field-table">@@ -23533,10 +23561,18 @@ for OpenAI and Gemini. </p></td><tbody><tr>- <td>text</td>+ <td>name</td><td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>The name of the database group to retrieve.+Format: projects/{project}/databaseGroups/{databaseGroup} </p></td>+ </tr>++ <tr>+ <td>view</td>+ <td><a href="#bytebase.v1.DatabaseGroupView">DatabaseGroupView</a></td>+ <td></td>+ <td><p>The view to return. Defaults to DATABASE_GROUP_VIEW_BASIC. </p></td></tr></tbody>@@ -23546,8 +23582,8 @@ for OpenAI and Gemini. </p></td>- <h3 id="bytebase.v1.AdminExecuteRequest">AdminExecuteRequest</h3>- <p></p>+ <h3 id="bytebase.v1.ListDatabaseGroupsRequest">ListDatabaseGroupsRequest</h3>+ <p>Request message for listing database groups.</p><table class="field-table">@@ -23557,41 +23593,18 @@ for OpenAI and Gemini. </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>parent</td><td><a href="#string">string</a></td><td></td>- <td><p>The SQL statement to execute. </p></td>+ <td><p>The parent resource whose database groups are to be listed.+Format: projects/{project} </p></td></tr><tr>- <td>limit</td>- <td><a href="#int32">int32</a></td>+ <td>view</td>+ <td><a href="#bytebase.v1.DatabaseGroupView">DatabaseGroupView</a></td><td></td>- <td><p>The maximum number of rows to return. </p></td>- </tr>-- <tr>- <td>schema</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>- </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><p>The view to return. Defaults to DATABASE_GROUP_VIEW_BASIC. </p></td></tr></tbody>@@ -23601,8 +23614,8 @@ CosmosDB only. </p></td>- <h3 id="bytebase.v1.AdminExecuteResponse">AdminExecuteResponse</h3>- <p></p>+ <h3 id="bytebase.v1.ListDatabaseGroupsResponse">ListDatabaseGroupsResponse</h3>+ <p>Response message for listing database groups.</p><table class="field-table">@@ -23612,10 +23625,10 @@ CosmosDB only. </p></td><tbody><tr>- <td>results</td>- <td><a href="#bytebase.v1.QueryResult">QueryResult</a></td>+ <td>database_groups</td>+ <td><a href="#bytebase.v1.DatabaseGroup">DatabaseGroup</a></td><td>repeated</td>- <td><p>The query results. </p></td>+ <td><p>The database groups from the specified request. </p></td></tr></tbody>@@ -23625,8 +23638,8 @@ CosmosDB only. </p></td>- <h3 id="bytebase.v1.Advice">Advice</h3>- <p></p>+ <h3 id="bytebase.v1.UpdateDatabaseGroupRequest">UpdateDatabaseGroupRequest</h3>+ <p>Request message for updating a database group.</p><table class="field-table">@@ -23636,64 +23649,204 @@ CosmosDB only. </p></td><tbody><tr>- <td>status</td>- <td><a href="#bytebase.v1.Advice.Level">Advice.Level</a></td>+ <td>database_group</td>+ <td><a href="#bytebase.v1.DatabaseGroup">DatabaseGroup</a></td><td></td>- <td><p>The advice level. </p></td>+ <td><p>The database group to update.++The database group's `name` field is used to identify the database group to update.+Format: projects/{project}/databaseGroups/{databaseGroup} </p></td></tr><tr>- <td>code</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 advice code. </p></td>+ <td><p>The list of fields to update. </p></td></tr><tr>- <td>title</td>- <td><a href="#string">string</a></td>+ <td>allow_missing</td>+ <td><a href="#bool">bool</a></td><td></td>- <td><p>The advice title. </p></td>+ <td><p>If set to true, and the database group is not found, a new database group will be created.+In this situation, `update_mask` is ignored. </p></td></tr>- <tr>- <td>content</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The advice content. </p></td>- </tr>+ </tbody>+ </table>++++++++ <h3 id="bytebase.v1.DatabaseGroupView">DatabaseGroupView</h3>+ <p>View options for database group responses.</p>+ <table class="enum-table">+ <thead>+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>DATABASE_GROUP_VIEW_UNSPECIFIED</td>+ <td>0</td>+ <td><p>The default / unset value.+The API will default to the BASIC view.</p></td>+ </tr>++ <tr>+ <td>DATABASE_GROUP_VIEW_BASIC</td>+ <td>1</td>+ <td><p>Include basic information about the database group, but exclude the list of matched databases and unmatched databases.</p></td>+ </tr>++ <tr>+ <td>DATABASE_GROUP_VIEW_FULL</td>+ <td>2</td>+ <td><p>Include everything.</p></td>+ </tr>++ </tbody>+ </table>++++++ <h3 id="bytebase.v1.DatabaseGroupService">DatabaseGroupService</h3>+ <p>DatabaseGroupService manages database groups for organizing databases by criteria.</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>ListDatabaseGroups</td>+ <td><a href="#bytebase.v1.ListDatabaseGroupsRequest">ListDatabaseGroupsRequest</a></td>+ <td><a href="#bytebase.v1.ListDatabaseGroupsResponse">ListDatabaseGroupsResponse</a></td>+ <td><p>Lists database groups in a project.+Permissions required: bb.databaseGroups.list</p></td>+ </tr>++ <tr>+ <td>GetDatabaseGroup</td>+ <td><a href="#bytebase.v1.GetDatabaseGroupRequest">GetDatabaseGroupRequest</a></td>+ <td><a href="#bytebase.v1.DatabaseGroup">DatabaseGroup</a></td>+ <td><p>Gets a database group by name.+Permissions required: bb.databaseGroups.get</p></td>+ </tr>++ <tr>+ <td>CreateDatabaseGroup</td>+ <td><a href="#bytebase.v1.CreateDatabaseGroupRequest">CreateDatabaseGroupRequest</a></td>+ <td><a href="#bytebase.v1.DatabaseGroup">DatabaseGroup</a></td>+ <td><p>Creates a new database group.+Permissions required: bb.databaseGroups.create</p></td>+ </tr>++ <tr>+ <td>UpdateDatabaseGroup</td>+ <td><a href="#bytebase.v1.UpdateDatabaseGroupRequest">UpdateDatabaseGroupRequest</a></td>+ <td><a href="#bytebase.v1.DatabaseGroup">DatabaseGroup</a></td>+ <td><p>Updates a database group.+Permissions required: bb.databaseGroups.update+When allow_missing=true, also requires: bb.databaseGroups.create</p></td>+ </tr>++ <tr>+ <td>DeleteDatabaseGroup</td>+ <td><a href="#bytebase.v1.DeleteDatabaseGroupRequest">DeleteDatabaseGroupRequest</a></td>+ <td><a href="#google.protobuf.Empty">.google.protobuf.Empty</a></td>+ <td><p>Deletes a database group.+Permissions required: bb.databaseGroups.delete</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>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>- </tr>- <tr>- <td>end_position</td>- <td><a href="#bytebase.v1.Position">Position</a></td>- <td></td>- <td><p> </p></td>- </tr>+ <tr>+ <td>ListDatabaseGroups</td>+ <td>GET</td>+ <td>/v1/{parent=projects/*}/databaseGroups</td>+ <td></td>+ </tr>- <tr>- <td>rule_type</td>- <td><a href="#bytebase.v1.Advice.RuleType">Advice.RuleType</a></td>- <td></td>- <td><p>The type of linting rule that generated this advice. </p></td>- </tr>++++ <tr>+ <td>GetDatabaseGroup</td>+ <td>GET</td>+ <td>/v1/{name=projects/*/databaseGroups/*}</td>+ <td></td>+ </tr>+++++ <tr>+ <td>CreateDatabaseGroup</td>+ <td>POST</td>+ <td>/v1/{parent=projects/*}/databaseGroups</td>+ <td>database_group</td>+ </tr>+++++ <tr>+ <td>UpdateDatabaseGroup</td>+ <td>PATCH</td>+ <td>/v1/{database_group.name=projects/*/databaseGroups/*}</td>+ <td>database_group</td>+ </tr>+++++ <tr>+ <td>DeleteDatabaseGroup</td>+ <td>DELETE</td>+ <td>/v1/{name=projects/*/databaseGroups/*}</td>+ <td></td>+ </tr>+</tbody></table>--+- <h3 id="bytebase.v1.DiffMetadataRequest">DiffMetadataRequest</h3>- <p></p>+ <div class="file-heading">+ <h2 id="v1/group_service.proto">v1/group_service.proto</h2><a href="#title">Top</a>+ </div>+ <p></p>+++ <h3 id="bytebase.v1.BatchGetGroupsRequest">BatchGetGroupsRequest</h3>+ <p>Request message for batch getting groups.</p><table class="field-table">@@ -23703,24 +23856,11 @@ TODO: use range instead </p></td><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>engine</td>- <td><a href="#bytebase.v1.Engine">Engine</a></td>- <td></td>- <td><p>The database engine of the schema. </p></td>+ <td>names</td>+ <td><a href="#string">string</a></td>+ <td>repeated</td>+ <td><p>The group names to retrieve.+Format: groups/{email} </p></td></tr></tbody>@@ -23730,21 +23870,21 @@ TODO: use range instead </p></td>- <h3 id="bytebase.v1.DiffMetadataResponse">DiffMetadataResponse</h3>- <p></p>+ <h3 id="bytebase.v1.BatchGetGroupsResponse">BatchGetGroupsResponse</h3>+ <p>Response message for batch getting groups.</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>+ <tbody>++ <tr>+ <td>groups</td>+ <td><a href="#bytebase.v1.Group">Group</a></td>+ <td>repeated</td>+ <td><p>The groups from the specified request. </p></td></tr></tbody>@@ -23754,8 +23894,8 @@ TODO: use range instead </p></td>- <h3 id="bytebase.v1.ExportRequest">ExportRequest</h3>- <p></p>+ <h3 id="bytebase.v1.CreateGroupRequest">CreateGroupRequest</h3>+ <p>Request message for creating a group.</p><table class="field-table">@@ -23765,69 +23905,18 @@ TODO: use range instead </p></td><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}/plans/{plan}/rollout-Format: projects/{project}/plans/{plan}/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>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>password</td>- <td><a href="#string">string</a></td>+ <td>group</td>+ <td><a href="#bytebase.v1.Group">Group</a></td><td></td>- <td><p>The zip password provide by users. </p></td>+ <td><p>The group to create. </p></td></tr><tr>- <td>data_source_id</td>+ <td>group_email</td><td><a href="#string">string</a></td><td></td>- <td><p>The id of data source.-If omitted, Export resolves the data source server-side by using the-single read-only data source when exactly one exists, or the admin data-source otherwise. It can also be set explicitly to export from the admin-data source or 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>+ <td><p>The email to use for the group, which will become the final component+of the group's resource name. </p></td></tr></tbody>@@ -23837,8 +23926,8 @@ Oracle and search path in Postgres. </p></td>- <h3 id="bytebase.v1.ExportResponse">ExportResponse</h3>- <p></p>+ <h3 id="bytebase.v1.DeleteGroupRequest">DeleteGroupRequest</h3>+ <p>Request message for deleting a group.</p><table class="field-table">@@ -23848,10 +23937,11 @@ Oracle and search path in Postgres. </p></td><tbody><tr>- <td>content</td>- <td><a href="#bytes">bytes</a></td>+ <td>name</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>The export file content. </p></td>+ <td><p>The name of the group to delete.+Format: groups/{email} </p></td></tr></tbody>@@ -23861,8 +23951,8 @@ Oracle and search path in Postgres. </p></td>- <h3 id="bytebase.v1.MaskingReason">MaskingReason</h3>- <p></p>+ <h3 id="bytebase.v1.GetGroupRequest">GetGroupRequest</h3>+ <p>Request message for getting a group.</p><table class="field-table">@@ -23872,52 +23962,11 @@ 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., "SSN", "email", "phone"). </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., "Matched global rule: PII Protection"). </p></td>- </tr>-- <tr>- <td>classification_level</td>- <td><a href="#int32">int32</a></td>- <td></td>- <td><p>The classification level that triggered masking. </p></td>- </tr>-- <tr>- <td>semantic_type_icon</td>+ <td>name</td><td><a href="#string">string</a></td><td></td>- <td><p>Icon associated with the semantic type (if any). </p></td>+ <td><p>The name of the group to retrieve.+Format: groups/{email} </p></td></tr></tbody>@@ -23927,8 +23976,8 @@ Oracle and search path in Postgres. </p></td>- <h3 id="bytebase.v1.QueryHistory">QueryHistory</h3>- <p></p>+ <h3 id="bytebase.v1.Group">Group</h3>+ <p>A group of users within the workspace.</p><table class="field-table">@@ -23941,58 +23990,43 @@ Oracle and search path in Postgres. </p></td><td>name</td><td><a href="#string">string</a></td><td></td>- <td><p>The name for the query history.-Format: projects/{project}/queryHistories/{id} </p></td>+ <td><p>The name of the group to retrieve.+Format: groups/{group}, the group should be email or uuid. </p></td></tr><tr>- <td>database</td>+ <td>title</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>+ <td><p>The display title of the group. </p></td></tr><tr>- <td>creator</td>+ <td>description</td><td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>The description of the group. </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>members</td>+ <td><a href="#bytebase.v1.GroupMember">GroupMember</a></td>+ <td>repeated</td>+ <td><p>The members of the group. </p></td></tr><tr>- <td>statement</td>+ <td>source</td><td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>The source system where the group originated (e.g., Entra ID for SCIM sync). </p></td></tr><tr>- <td>error</td>+ <td>email</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><p>The unique email for the group. </p></td></tr></tbody>@@ -24002,8 +24036,8 @@ Format: instances/{instance}/databases/{databaseName} </p></td>- <h3 id="bytebase.v1.QueryOption">QueryOption</h3>- <p></p>+ <h3 id="bytebase.v1.GroupMember">GroupMember</h3>+ <p>A member of a group with a role.</p><table class="field-table">@@ -24013,17 +24047,19 @@ 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>member</td>+ <td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>Member is the principal who belong to this group.++Format: users/[email protected] </p></td></tr><tr>- <td>mssql_explain_format</td>- <td><a href="#bytebase.v1.QueryOption.MSSQLExplainFormat">QueryOption.MSSQLExplainFormat</a></td>+ <td>role</td>+ <td><a href="#bytebase.v1.GroupMember.Role">GroupMember.Role</a></td><td></td>- <td><p> </p></td>+ <td><p>The member's role in the group. </p></td></tr></tbody>@@ -24033,8 +24069,8 @@ Format: instances/{instance}/databases/{databaseName} </p></td>- <h3 id="bytebase.v1.QueryRequest">QueryRequest</h3>- <p></p>+ <h3 id="bytebase.v1.ListGroupsRequest">ListGroupsRequest</h3>+ <p>Request message for listing groups.</p><table class="field-table">@@ -24044,66 +24080,46 @@ 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>page_size</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.-If omitted, Query resolves the data source server-side by using the single-read-only data source when exactly one exists, or the admin data source-otherwise. It can also be set explicitly to query the admin data source or-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>+ <td><p>The maximum number of groups to return. The service may return fewer than+this value.+If unspecified, at most 10 groups will be returned.+The maximum value is 1000; values above 1000 will be coerced to 1000. </p></td></tr><tr>- <td>query_option</td>- <td><a href="#bytebase.v1.QueryOption">QueryOption</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 `ListGroups` call.+Provide this to retrieve the subsequent page.++When paginating, all other parameters provided to `ListGroups` must match+the call that provided the page token. </p></td></tr><tr>- <td>container</td>+ <td>filter</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></td>+ <td><p>Filter is used to filter groups returned in the list.+The syntax and semantics of CEL are documented at https://github.com/google/cel-spec++Supported filter:+- title: the group title, support "==" and ".contains()" operator.+- email: the group email, support "==" and ".contains()" operator.+- project: the project full name in "projects/{id}" format, support "==" operator.++For example:+title == "dba"+email == "[email protected]"+title.contains("dba")+email.contains("dba")+project == "projects/sample-project"+You can combine filter conditions like:+title.contains("dba") || email.contains("dba") </p></td></tr></tbody>@@ -24113,8 +24129,8 @@ CosmosDB only. </p></td>- <h3 id="bytebase.v1.QueryResponse">QueryResponse</h3>- <p></p>+ <h3 id="bytebase.v1.ListGroupsResponse">ListGroupsResponse</h3>+ <p>Response message for listing groups.</p><table class="field-table">@@ -24124,10 +24140,18 @@ CosmosDB only. </p></td><tbody><tr>- <td>results</td>- <td><a href="#bytebase.v1.QueryResult">QueryResult</a></td>+ <td>groups</td>+ <td><a href="#bytebase.v1.Group">Group</a></td><td>repeated</td>- <td><p>The query results. </p></td>+ <td><p>The groups 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>@@ -24137,8 +24161,8 @@ CosmosDB only. </p></td>- <h3 id="bytebase.v1.QueryResult">QueryResult</h3>- <p></p>+ <h3 id="bytebase.v1.UpdateGroupRequest">UpdateGroupRequest</h3>+ <p>Request message for updating a group.</p><table class="field-table">@@ -24148,107 +24172,223 @@ CosmosDB only. </p></td><tbody><tr>- <td>column_names</td>- <td><a href="#string">string</a></td>- <td>repeated</td>- <td><p>Column names of the query result. </p></td>- </tr>-- <tr>- <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>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>group</td>+ <td><a href="#bytebase.v1.Group">Group</a></td><td></td>- <td><p> </p></td>+ <td><p>The group to update.++The group's `name` field is used to identify the group to update.+Format: groups/{email} </p></td></tr><tr>- <td>error</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>The error message if the query failed. </p></td>+ <td><p>The list of fields to update. </p></td></tr><tr>- <td>latency</td>- <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>+ <td>allow_missing</td>+ <td><a href="#bool">bool</a></td><td></td>- <td><p>The time it takes to execute the query. </p></td>+ <td><p>If set to true, and the group is not found, a new group will be created.+In this situation, `update_mask` is ignored. </p></td></tr>- <tr>- <td>statement</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The query statement for the result. </p></td>- </tr>+ </tbody>+ </table>++++++++ <h3 id="bytebase.v1.GroupMember.Role">GroupMember.Role</h3>+ <p>The role of a group member.</p>+ <table class="enum-table">+ <thead>+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>ROLE_UNSPECIFIED</td>+ <td>0</td>+ <td><p>Unspecified role.</p></td>+ </tr>++ <tr>+ <td>OWNER</td>+ <td>1</td>+ <td><p>Group owner.</p></td>+ </tr>++ <tr>+ <td>MEMBER</td>+ <td>2</td>+ <td><p>Group member.</p></td>+ </tr>++ </tbody>+ </table>++++++ <h3 id="bytebase.v1.GroupService">GroupService</h3>+ <p>GroupService manages user groups for organizing users and permissions.</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>GetGroup</td>+ <td><a href="#bytebase.v1.GetGroupRequest">GetGroupRequest</a></td>+ <td><a href="#bytebase.v1.Group">Group</a></td>+ <td><p>Gets a group by name.+Group members or users with bb.groups.get permission can get the group.+Permissions required: bb.groups.get OR caller is the group member</p></td>+ </tr>++ <tr>+ <td>BatchGetGroups</td>+ <td><a href="#bytebase.v1.BatchGetGroupsRequest">BatchGetGroupsRequest</a></td>+ <td><a href="#bytebase.v1.BatchGetGroupsResponse">BatchGetGroupsResponse</a></td>+ <td><p>Gets multiple groups in a single request.+Group members or users with bb.groups.get permission can get the group.+Permissions required: bb.groups.get OR caller is the group member</p></td>+ </tr>++ <tr>+ <td>ListGroups</td>+ <td><a href="#bytebase.v1.ListGroupsRequest">ListGroupsRequest</a></td>+ <td><a href="#bytebase.v1.ListGroupsResponse">ListGroupsResponse</a></td>+ <td><p>Lists all groups in the workspace.+Permissions required: bb.groups.list</p></td>+ </tr>++ <tr>+ <td>CreateGroup</td>+ <td><a href="#bytebase.v1.CreateGroupRequest">CreateGroupRequest</a></td>+ <td><a href="#bytebase.v1.Group">Group</a></td>+ <td><p>Creates a new group.+Permissions required: bb.groups.create</p></td>+ </tr>++ <tr>+ <td>UpdateGroup</td>+ <td><a href="#bytebase.v1.UpdateGroupRequest">UpdateGroupRequest</a></td>+ <td><a href="#bytebase.v1.Group">Group</a></td>+ <td><p>Updates a group. Group owners or users with bb.groups.update permission can update.+Permissions required: bb.groups.update OR caller is group owner+When allow_missing=true, also requires: bb.groups.create</p></td>+ </tr>++ <tr>+ <td>DeleteGroup</td>+ <td><a href="#bytebase.v1.DeleteGroupRequest">DeleteGroupRequest</a></td>+ <td><a href="#google.protobuf.Empty">.google.protobuf.Empty</a></td>+ <td><p>Deletes a group. Group owners or users with bb.groups.delete permission can delete.+Permissions required: bb.groups.delete OR caller is group owner</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>GetGroup</td>+ <td>GET</td>+ <td>/v1/{name=groups/*}</td>+ <td></td>+ </tr>+++++ <tr>+ <td>BatchGetGroups</td>+ <td>GET</td>+ <td>/v1/groups:batchGet</td>+ <td></td>+ </tr>+++++ <tr>+ <td>ListGroups</td>+ <td>GET</td>+ <td>/v1/groups</td>+ <td></td>+ </tr>+++++ <tr>+ <td>CreateGroup</td>+ <td>POST</td>+ <td>/v1/groups</td>+ <td>group</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>syntax_error</td>- <td><a href="#bytebase.v1.QueryResult.SyntaxError">QueryResult.SyntaxError</a></td>- <td></td>- <td><p> </p></td>- </tr>- <tr>- <td>permission_denied</td>- <td><a href="#bytebase.v1.PermissionDeniedDetail">PermissionDeniedDetail</a></td>- <td></td>- <td><p> </p></td>- </tr>+ <tr>+ <td>UpdateGroup</td>+ <td>PATCH</td>+ <td>/v1/{group.name=groups/*}</td>+ <td>group</td>+ </tr>- <tr>- <td>command_error</td>- <td><a href="#bytebase.v1.QueryResult.CommandError">QueryResult.CommandError</a></td>- <td></td>- <td><p> </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's RAISE NOTICE, MSSQL's PRINT, or Oracle'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>+ <tr>+ <td>DeleteGroup</td>+ <td>DELETE</td>+ <td>/v1/{name=groups/*}</td>+ <td></td>+ </tr>+</tbody></table>--+- <h3 id="bytebase.v1.QueryResult.CommandError">QueryResult.CommandError</h3>- <p>Permission denied with resource information or disallowed command_type.</p><p>Either resources or command_type is available.</p>+ <div class="file-heading">+ <h2 id="v1/idp_service.proto">v1/idp_service.proto</h2><a href="#title">Top</a>+ </div>+ <p></p>+++ <h3 id="bytebase.v1.CreateIdentityProviderRequest">CreateIdentityProviderRequest</h3>+ <p></p><table class="field-table">@@ -24258,10 +24398,28 @@ Examples include PostgreSQL's RAISE NOTICE, MSSQL's PRINT, or Oracle'<tbody><tr>- <td>command_type</td>- <td><a href="#bytebase.v1.QueryResult.CommandError.Type">QueryResult.CommandError.Type</a></td>+ <td>identity_provider</td>+ <td><a href="#bytebase.v1.IdentityProvider">IdentityProvider</a></td><td></td>- <td><p>Disallowed command_type. </p></td>+ <td><p>The identity provider to create. </p></td>+ </tr>++ <tr>+ <td>identity_provider_id</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The ID to use for the identity provider, which will become the final component of+the identity provider's resource name.++This value should be 4-63 characters, and valid characters+are /[a-z][0-9]-/. </p></td>+ </tr>++ <tr>+ <td>validate_only</td>+ <td><a href="#bool">bool</a></td>+ <td></td>+ <td><p>If set to true, the request will be validated without actually creating the identity provider. </p></td></tr></tbody>@@ -24271,7 +24429,7 @@ Examples include PostgreSQL's RAISE NOTICE, MSSQL's PRINT, or Oracle'- <h3 id="bytebase.v1.QueryResult.Message">QueryResult.Message</h3>+ <h3 id="bytebase.v1.DeleteIdentityProviderRequest">DeleteIdentityProviderRequest</h3><p></p>@@ -24282,17 +24440,11 @@ Examples include PostgreSQL's RAISE NOTICE, MSSQL's PRINT, or Oracle'<tbody><tr>- <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>content</td>+ <td>name</td><td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>The name of the identity provider to delete.+Format: idps/{identity_provider} </p></td></tr></tbody>@@ -24302,8 +24454,8 @@ Examples include PostgreSQL's RAISE NOTICE, MSSQL's PRINT, or Oracle'- <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.FieldMapping">FieldMapping</h3>+ <p>FieldMapping saves the field names from user info API of identity provider.</p><p>As we save all raw json string of user info response data into `principal.idp_user_info`,</p><p>we can extract the relevant data based with `FieldMapping`.</p><table class="field-table">@@ -24313,146 +24465,110 @@ Examples include PostgreSQL's RAISE NOTICE, MSSQL's PRINT, or Oracle'<tbody><tr>- <td>severity</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p> </p></td>- </tr>-- <tr>- <td>code</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p> </p></td>- </tr>-- <tr>- <td>message</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p> </p></td>- </tr>-- <tr>- <td>detail</td>+ <td>identifier</td><td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>Identifier is the field name of the unique identifier in 3rd-party idp user info. Required. </p></td></tr><tr>- <td>hint</td>+ <td>display_name</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>+ <td><p>DisplayName is the field name of display name in 3rd-party idp user info. Optional. </p></td></tr><tr>- <td>internal_query</td>+ <td>phone</td><td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>Phone is the field name of primary phone in 3rd-party idp user info. Optional. </p></td></tr><tr>- <td>where</td>+ <td>groups</td><td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>Groups is the field name of groups in 3rd-party idp user info. Optional.+Mainly used for OIDC: https://developer.okta.com/docs/guides/customize-tokens-groups-claim/main/ </p></td></tr>- <tr>- <td>schema_name</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p> </p></td>- </tr>+ </tbody>+ </table>++++++ <h3 id="bytebase.v1.GetIdentityProviderRequest">GetIdentityProviderRequest</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>table_name</td>+ <td>name</td><td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>The name of the identity provider to retrieve.+Format: idps/{idp} </p></td></tr>- <tr>- <td>column_name</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p> </p></td>- </tr>+ </tbody>+ </table>++++++ <h3 id="bytebase.v1.IdentityProvider">IdentityProvider</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>data_type_name</td>+ <td>name</td><td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>The name of the identity provider.+Format: idps/{idp} </p></td></tr><tr>- <td>constraint_name</td>+ <td>title</td><td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>The display title of the identity provider. </p></td></tr><tr>- <td>file</td>+ <td>domain</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>+ <td><p>The domain for email matching when using this identity provider. </p></td></tr><tr>- <td>routine</td>- <td><a href="#string">string</a></td>+ <td>type</td>+ <td><a href="#bytebase.v1.IdentityProviderType">IdentityProviderType</a></td><td></td>- <td><p> </p></td>+ <td><p>The type of identity provider protocol. </p></td></tr>- </tbody>- </table>------ <h3 id="bytebase.v1.QueryResult.SyntaxError">QueryResult.SyntaxError</h3>- <p>Syntax error with position information for editor highlighting</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>config</td>+ <td><a href="#bytebase.v1.IdentityProviderConfig">IdentityProviderConfig</a></td><td></td>- <td><p>Position information for highlighting in editor </p></td>+ <td><p>The configuration details for the identity provider. </p></td></tr></tbody>@@ -24462,7 +24578,7 @@ Examples include PostgreSQL's RAISE NOTICE, MSSQL's PRINT, or Oracle'- <h3 id="bytebase.v1.QueryRow">QueryRow</h3>+ <h3 id="bytebase.v1.IdentityProviderConfig">IdentityProviderConfig</h3><p></p>@@ -24473,10 +24589,24 @@ Examples include PostgreSQL's RAISE NOTICE, MSSQL's PRINT, or Oracle'<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>oauth2_config</td>+ <td><a href="#bytebase.v1.OAuth2IdentityProviderConfig">OAuth2IdentityProviderConfig</a></td>+ <td></td>+ <td><p>OAuth2 protocol configuration. </p></td>+ </tr>++ <tr>+ <td>oidc_config</td>+ <td><a href="#bytebase.v1.OIDCIdentityProviderConfig">OIDCIdentityProviderConfig</a></td>+ <td></td>+ <td><p>OIDC protocol configuration. </p></td>+ </tr>++ <tr>+ <td>ldap_config</td>+ <td><a href="#bytebase.v1.LDAPIdentityProviderConfig">LDAPIdentityProviderConfig</a></td>+ <td></td>+ <td><p>LDAP protocol configuration. </p></td></tr></tbody>@@ -24486,8 +24616,8 @@ Examples include PostgreSQL's RAISE NOTICE, MSSQL's PRINT, or Oracle'- <h3 id="bytebase.v1.RowValue">RowValue</h3>- <p></p>+ <h3 id="bytebase.v1.LDAPIdentityProviderConfig">LDAPIdentityProviderConfig</h3>+ <p>LDAPIdentityProviderConfig is the structure for LDAP identity provider config.</p><table class="field-table">@@ -24497,98 +24627,72 @@ Examples include PostgreSQL's RAISE NOTICE, MSSQL's PRINT, or Oracle'<tbody><tr>- <td>null_value</td>- <td><a href="#google.protobuf.NullValue">google.protobuf.NullValue</a></td>- <td></td>- <td><p> </p></td>- </tr>-- <tr>- <td>bool_value</td>- <td><a href="#bool">bool</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>-- <tr>- <td>double_value</td>- <td><a href="#double">double</a></td>- <td></td>- <td><p> </p></td>- </tr>-- <tr>- <td>float_value</td>- <td><a href="#float">float</a></td>+ <td>host</td>+ <td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>Host is the hostname or IP address of the LDAP server, e.g.,+"ldap.example.com". </p></td></tr><tr>- <td>int32_value</td>+ <td>port</td><td><a href="#int32">int32</a></td><td></td>- <td><p> </p></td>+ <td><p>Port is the port number of the LDAP server, e.g., 389. When not set, the+default port of the corresponding security protocol will be used, i.e. 389+for StartTLS and 636 for LDAPS. </p></td></tr><tr>- <td>int64_value</td>- <td><a href="#int64">int64</a></td>+ <td>skip_tls_verify</td>+ <td><a href="#bool">bool</a></td><td></td>- <td><p> </p></td>+ <td><p>SkipTLSVerify controls whether to skip TLS certificate verification. </p></td></tr><tr>- <td>string_value</td>+ <td>bind_dn</td><td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>BindDN is the DN of the user to bind as a service account to perform+search requests. </p></td></tr><tr>- <td>uint32_value</td>- <td><a href="#uint32">uint32</a></td>+ <td>bind_password</td>+ <td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>BindPassword is the password of the user to bind as a service account. </p></td></tr><tr>- <td>uint64_value</td>- <td><a href="#uint64">uint64</a></td>+ <td>base_dn</td>+ <td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>BaseDN is the base DN to search for users, e.g., "ou=users,dc=example,dc=com". </p></td></tr><tr>- <td>value_value</td>- <td><a href="#google.protobuf.Value">google.protobuf.Value</a></td>+ <td>user_filter</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>UserFilter is the filter to search for users, e.g., "(uid=%s)". </p></td></tr><tr>- <td>timestamp_value</td>- <td><a href="#bytebase.v1.RowValue.Timestamp">RowValue.Timestamp</a></td>+ <td>security_protocol</td>+ <td><a href="#bytebase.v1.LDAPIdentityProviderConfig.SecurityProtocol">LDAPIdentityProviderConfig.SecurityProtocol</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>SecurityProtocol is the security protocol to be used for establishing+connections with the LDAP server. </p></td></tr><tr>- <td>timestamp_tz_value</td>- <td><a href="#bytebase.v1.RowValue.TimestampTZ">RowValue.TimestampTZ</a></td>+ <td>field_mapping</td>+ <td><a href="#bytebase.v1.FieldMapping">FieldMapping</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>FieldMapping is the mapping of the user attributes returned by the LDAP+server. </p></td></tr></tbody>@@ -24598,7 +24702,7 @@ accurately represents the timestamp with location information. </p></td>- <h3 id="bytebase.v1.RowValue.Timestamp">RowValue.Timestamp</h3>+ <h3 id="bytebase.v1.ListIdentityProvidersRequest">ListIdentityProvidersRequest</h3><p></p>@@ -24609,17 +24713,12 @@ 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>parent</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 parent workspace whose identity providers should be listed.+Format: workspaces/{workspace}+When unset, the workspace is resolved from the request context. </p></td></tr></tbody>@@ -24629,7 +24728,7 @@ accurately represents the timestamp with location information. </p></td>- <h3 id="bytebase.v1.RowValue.TimestampTZ">RowValue.TimestampTZ</h3>+ <h3 id="bytebase.v1.ListIdentityProvidersResponse">ListIdentityProvidersResponse</h3><p></p>@@ -24640,36 +24739,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>zone</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>Zone is the time zone abbreviations in timezone database such as "PDT",-"PST". 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>offset</td>- <td><a href="#int32">int32</a></td>- <td></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>+ <td>identity_providers</td>+ <td><a href="#bytebase.v1.IdentityProvider">IdentityProvider</a></td>+ <td>repeated</td>+ <td><p>The identity providers from the specified request. </p></td></tr></tbody>@@ -24679,8 +24752,8 @@ time.Time.Zone() </p></td>- <h3 id="bytebase.v1.SearchQueryHistoriesRequest">SearchQueryHistoriesRequest</h3>- <p></p>+ <h3 id="bytebase.v1.OAuth2IdentityProviderConfig">OAuth2IdentityProviderConfig</h3>+ <p>OAuth2IdentityProviderConfig is the structure for OAuth2 identity provider config.</p><table class="field-table">@@ -24690,78 +24763,66 @@ time.Time.Zone() </p></td><tbody><tr>- <td>page_size</td>- <td><a href="#int32">int32</a></td>+ <td>auth_url</td>+ <td><a href="#string">string</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 authorization endpoint URL for OAuth2 flow. </p></td></tr><tr>- <td>page_token</td>+ <td>token_url</td><td><a href="#string">string</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 token endpoint URL for exchanging authorization code. </p></td></tr><tr>- <td>filter</td>+ <td>user_info_url</td><td><a href="#string">string</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 "projects/{id}" format, support "==" operator.-- database: the database full name in "instances/{id}/databases/{name}" format, support "==" operator.-- instance: the instance full name in "instances/{id}" format, support "==" operator.-- type: the type, should be "QUERY" or "EXPORT", support "==" operator.-- statement: the SQL statement, support ".contains()" operator.--For example:-project == "projects/{project}"-database == "instances/{instance}/databases/{database}"-instance == "instances/{instance}"-type == "QUERY"-type == "EXPORT"-statement.contains("select")-type == "QUERY" && statement.contains("select") </p></td>+ <td><p>The user information endpoint URL. </p></td></tr>- </tbody>- </table>------ <h3 id="bytebase.v1.SearchQueryHistoriesResponse">SearchQueryHistoriesResponse</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>client_id</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The OAuth2 client identifier. </p></td>+ </tr><tr>- <td>query_histories</td>- <td><a href="#bytebase.v1.QueryHistory">QueryHistory</a></td>+ <td>client_secret</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The OAuth2 client secret for authentication. </p></td>+ </tr>++ <tr>+ <td>scopes</td>+ <td><a href="#string">string</a></td><td>repeated</td>- <td><p>The list of history. </p></td>+ <td><p>The list of OAuth2 scopes to request. </p></td>+ </tr>++ <tr>+ <td>field_mapping</td>+ <td><a href="#bytebase.v1.FieldMapping">FieldMapping</a></td>+ <td></td>+ <td><p>Mapping configuration for user attributes from OAuth2 response. </p></td>+ </tr>++ <tr>+ <td>skip_tls_verify</td>+ <td><a href="#bool">bool</a></td>+ <td></td>+ <td><p>Whether to skip TLS certificate verification. </p></td></tr><tr>- <td>next_page_token</td>- <td><a href="#string">string</a></td>+ <td>auth_style</td>+ <td><a href="#bytebase.v1.OAuth2AuthStyle">OAuth2AuthStyle</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>The authentication style for client credentials. </p></td></tr></tbody>@@ -24771,414 +24832,168 @@ Pass this value in the page_token field in the subsequent call to--- <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.Advice.RuleType">Advice.RuleType</h3>- <p>RuleType indicates the source of the linting rule.</p>- <table class="enum-table">- <thead>- <tr><td>Name</td><td>Number</td><td>Description</td></tr>- </thead>- <tbody>-- <tr>- <td>RULE_TYPE_UNSPECIFIED</td>- <td>0</td>- <td><p>Unspecified rule type.</p></td>- </tr>-- <tr>- <td>PARSER_BASED</td>- <td>1</td>- <td><p>Parser-based rule enforced by the built-in SQL parser.-These are non-configurable, mandatory checks for schema health.</p></td>- </tr>-- <tr>- <td>AI_POWERED</td>- <td>2</td>- <td><p>AI-powered rule defined by user in natural language.-These are custom, flexible checks powered by AI models.</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>- </thead>- <tbody>-- <tr>- <td>TYPE_UNSPECIFIED</td>- <td>0</td>- <td><p>Unspecified query history type.</p></td>- </tr>-- <tr>- <td>QUERY</td>- <td>1</td>- <td><p>Query execution for data retrieval.</p></td>- </tr>-- <tr>- <td>EXPORT</td>- <td>2</td>- <td><p>Data export operation to file.</p></td>- </tr>-- </tbody>- </table>-- <h3 id="bytebase.v1.QueryOption.MSSQLExplainFormat">QueryOption.MSSQLExplainFormat</h3>- <p></p>- <table class="enum-table">- <thead>- <tr><td>Name</td><td>Number</td><td>Description</td></tr>- </thead>- <tbody>-- <tr>- <td>MSSQL_EXPLAIN_FORMAT_UNSPECIFIED</td>- <td>0</td>- <td><p>defaults to SHOWPLAN_ALL</p></td>- </tr>-- <tr>- <td>MSSQL_EXPLAIN_FORMAT_ALL</td>- <td>1</td>- <td><p>SHOWPLAN_ALL</p></td>- </tr>-- <tr>- <td>MSSQL_EXPLAIN_FORMAT_XML</td>- <td>2</td>- <td><p>SHOWPLAN_XML</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>REDIS_RUN_COMMANDS_ON_UNSPECIFIED</td>- <td>0</td>- <td><p>UNSPECIFIED defaults to SINGLE_NODE.</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>- </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>- </tr>-- </tbody>- </table>-- <h3 id="bytebase.v1.QueryResult.CommandError.Type">QueryResult.CommandError.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></p></td>- </tr>-- <tr>- <td>DDL</td>- <td>1</td>- <td><p></p></td>- </tr>-- <tr>- <td>DML</td>- <td>2</td>- <td><p></p></td>- </tr>-- <tr>- <td>NON_READ_ONLY</td>- <td>3</td>- <td><p></p></td>- </tr>-- </tbody>- </table>-- <h3 id="bytebase.v1.QueryResult.Message.Level">QueryResult.Message.Level</h3>+ <h3 id="bytebase.v1.OAuth2IdentityProviderTestRequestContext">OAuth2IdentityProviderTestRequestContext</h3><p></p>- <table class="enum-table">- <thead>- <tr><td>Name</td><td>Number</td><td>Description</td></tr>- </thead>- <tbody>-- <tr>- <td>LEVEL_UNSPECIFIED</td>- <td>0</td>- <td><p>Unspecified message level.</p></td>- </tr>-- <tr>- <td>INFO</td>- <td>1</td>- <td><p>Informational message.</p></td>- </tr>-- <tr>- <td>WARNING</td>- <td>2</td>- <td><p>Warning message indicating potential issues.</p></td>- </tr>-- <tr>- <td>DEBUG</td>- <td>3</td>- <td><p>Debug message for development and troubleshooting.</p></td>- </tr>-- <tr>- <td>LOG</td>- <td>4</td>- <td><p>General log message.</p></td>- </tr>-- <tr>- <td>NOTICE</td>- <td>5</td>- <td><p>Notice message for important information.</p></td>- </tr>-- <tr>- <td>EXCEPTION</td>- <td>6</td>- <td><p>Exception message indicating error conditions.</p></td>- </tr>-- </tbody>- </table>--++ <table class="field-table">+ <thead>+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>code</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>Authorize code from website. </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>- </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>- </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's own query histories)</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>- </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>- </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>- </tr>-- </tbody>- </table>+ <h3 id="bytebase.v1.OIDCIdentityProviderConfig">OIDCIdentityProviderConfig</h3>+ <p>OIDCIdentityProviderConfig is the structure for OIDC identity provider config.</p>--- <h4>Methods with HTTP bindings</h4>- <table>+ <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>Query</td>- <td>POST</td>- <td>/v1/{name=instances/*/databases/*}:query</td>- <td>*</td>- </tr>----- <tr>- <td>AdminExecute</td>- <td>GET</td>- <td>/v1:adminExecute</td>- <td></td>- </tr>-+ <tr>+ <td>issuer</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The OIDC issuer URL for the identity provider. </p></td>+ </tr>+ <tr>+ <td>client_id</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The OIDC client identifier. </p></td>+ </tr>- <tr>- <td>SearchQueryHistories</td>- <td>POST</td>- <td>/v1/queryHistories:search</td>- <td>*</td>- </tr>+ <tr>+ <td>client_secret</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The OIDC client secret for authentication. </p></td>+ </tr>-+ <tr>+ <td>scopes</td>+ <td><a href="#string">string</a></td>+ <td>repeated</td>+ <td><p>The scopes that the OIDC provider supports.+Should be fetched from the well-known configuration file of the OIDC provider. </p></td>+ </tr>+ <tr>+ <td>field_mapping</td>+ <td><a href="#bytebase.v1.FieldMapping">FieldMapping</a></td>+ <td></td>+ <td><p>Mapping configuration for user attributes from OIDC claims. </p></td>+ </tr>- <tr>- <td>Export</td>- <td>POST</td>- <td>/v1/{name=instances/*/databases/*}:export</td>- <td>*</td>- </tr>+ <tr>+ <td>skip_tls_verify</td>+ <td><a href="#bool">bool</a></td>+ <td></td>+ <td><p>Whether to skip TLS certificate verification. </p></td>+ </tr>- <tr>- <td>Export</td>- <td>POST</td>- <td>/v1/{name=projects/*/plans/*/rollout}:export</td>- <td>*</td>- </tr>+ <tr>+ <td>auth_style</td>+ <td><a href="#bytebase.v1.OAuth2AuthStyle">OAuth2AuthStyle</a></td>+ <td></td>+ <td><p>The authentication style for client credentials. </p></td>+ </tr>- <tr>- <td>Export</td>- <td>POST</td>- <td>/v1/{name=projects/*/plans/*/rollout/stages/*}:export</td>- <td>*</td>- </tr>+ <tr>+ <td>auth_endpoint</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The authorization endpoint of the OIDC provider.+Should be fetched from the well-known configuration file of the OIDC provider. </p></td>+ </tr>-+ </tbody>+ </table>++++++ <h3 id="bytebase.v1.OIDCIdentityProviderTestRequestContext">OIDCIdentityProviderTestRequestContext</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>code</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>Authorize code from OIDC provider. </p></td>+ </tr>- <tr>- <td>DiffMetadata</td>- <td>POST</td>- <td>/v1/schemaDesign:diffMetadata</td>- <td>*</td>- </tr>+ </tbody>+ </table>++++++ <h3 id="bytebase.v1.TestIdentityProviderRequest">TestIdentityProviderRequest</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>identity_provider</td>+ <td><a href="#bytebase.v1.IdentityProvider">IdentityProvider</a></td>+ <td></td>+ <td><p>The identity provider to test connection including uncreated. </p></td>+ </tr>+ <tr>+ <td>oauth2_context</td>+ <td><a href="#bytebase.v1.OAuth2IdentityProviderTestRequestContext">OAuth2IdentityProviderTestRequestContext</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>- <tr>- <td>AICompletion</td>- <td>POST</td>- <td>/v1/sql/aiCompletion</td>- <td>*</td>- </tr>+ <tr>+ <td>oidc_context</td>+ <td><a href="#bytebase.v1.OIDCIdentityProviderTestRequestContext">OIDCIdentityProviderTestRequestContext</a></td>+ <td></td>+ <td><p>OIDC authentication context for test connection. </p></td>+ </tr>-</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.CancelPlanCheckRunRequest">CancelPlanCheckRunRequest</h3>+ <h3 id="bytebase.v1.TestIdentityProviderResponse">TestIdentityProviderResponse</h3><p></p>@@ -25189,11 +25004,17 @@ Permissions required: None (authenticated users only, requires AI to be enabled)<tbody><tr>- <td>name</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The name of the plan check run to cancel.-Format: projects/{project}/plans/{plan}/planCheckRun </p></td>+ <td>claims</td>+ <td><a href="#bytebase.v1.TestIdentityProviderResponse.ClaimsEntry">TestIdentityProviderResponse.ClaimsEntry</a></td>+ <td>repeated</td>+ <td><p>The map of claims returned by the identity provider. </p></td>+ </tr>++ <tr>+ <td>user_info</td>+ <td><a href="#bytebase.v1.TestIdentityProviderResponse.UserInfoEntry">TestIdentityProviderResponse.UserInfoEntry</a></td>+ <td>repeated</td>+ <td><p>The matched user info from the claims. </p></td></tr></tbody>@@ -25203,14 +25024,7 @@ Format: projects/{project}/plans/{plan}/planCheckRun </p></td>- <h3 id="bytebase.v1.CancelPlanCheckRunResponse">CancelPlanCheckRunResponse</h3>- <p></p>------ <h3 id="bytebase.v1.CreatePlanRequest">CreatePlanRequest</h3>+ <h3 id="bytebase.v1.TestIdentityProviderResponse.ClaimsEntry">TestIdentityProviderResponse.ClaimsEntry</h3><p></p>@@ -25221,18 +25035,17 @@ Format: projects/{project}/plans/{plan}/planCheckRun </p></td><tbody><tr>- <td>parent</td>+ <td>key</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>value</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>The plan to create. </p></td>+ <td><p> </p></td></tr></tbody>@@ -25242,7 +25055,7 @@ Format: projects/{project} </p></td>- <h3 id="bytebase.v1.GetPlanCheckRunRequest">GetPlanCheckRunRequest</h3>+ <h3 id="bytebase.v1.TestIdentityProviderResponse.UserInfoEntry">TestIdentityProviderResponse.UserInfoEntry</h3><p></p>@@ -25253,11 +25066,17 @@ Format: projects/{project} </p></td><tbody><tr>- <td>name</td>+ <td>key</td><td><a href="#string">string</a></td><td></td>- <td><p>The name of the plan check run to retrieve.-Format: projects/{project}/plans/{plan}/planCheckRun </p></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>@@ -25267,7 +25086,7 @@ Format: projects/{project}/plans/{plan}/planCheckRun </p></td>- <h3 id="bytebase.v1.GetPlanRequest">GetPlanRequest</h3>+ <h3 id="bytebase.v1.UpdateIdentityProviderRequest">UpdateIdentityProviderRequest</h3><p></p>@@ -25278,11 +25097,28 @@ Format: projects/{project}/plans/{plan}/planCheckRun </p></td><tbody><tr>- <td>name</td>- <td><a href="#string">string</a></td>+ <td>identity_provider</td>+ <td><a href="#bytebase.v1.IdentityProvider">IdentityProvider</a></td><td></td>- <td><p>The name of the plan to retrieve.-Format: projects/{project}/plans/{plan} </p></td>+ <td><p>The identity provider to update.++The identity provider's `name` field is used to identify the identity provider to update.+Format: idps/{identity_provider} </p></td>+ </tr>++ <tr>+ <td>update_mask</td>+ <td><a href="#google.protobuf.FieldMask">google.protobuf.FieldMask</a></td>+ <td></td>+ <td><p>The list of fields to update. </p></td>+ </tr>++ <tr>+ <td>allow_missing</td>+ <td><a href="#bool">bool</a></td>+ <td></td>+ <td><p>If set to true, and the identity provider is not found, a new identity provider will be created.+In this situation, `update_mask` is ignored. </p></td></tr></tbody>@@ -25292,111 +25128,262 @@ Format: projects/{project}/plans/{plan} </p></td>- <h3 id="bytebase.v1.ListPlansRequest">ListPlansRequest</h3>+++ <h3 id="bytebase.v1.IdentityProviderType">IdentityProviderType</h3>+ <p></p>+ <table class="enum-table">+ <thead>+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>IDENTITY_PROVIDER_TYPE_UNSPECIFIED</td>+ <td>0</td>+ <td><p>Unspecified identity provider type.</p></td>+ </tr>++ <tr>+ <td>OAUTH2</td>+ <td>1</td>+ <td><p>OAuth 2.0 authentication protocol.</p></td>+ </tr>++ <tr>+ <td>OIDC</td>+ <td>2</td>+ <td><p>OpenID Connect authentication protocol.</p></td>+ </tr>++ <tr>+ <td>LDAP</td>+ <td>3</td>+ <td><p>LDAP directory service authentication.</p></td>+ </tr>++ </tbody>+ </table>++ <h3 id="bytebase.v1.LDAPIdentityProviderConfig.SecurityProtocol">LDAPIdentityProviderConfig.SecurityProtocol</h3><p></p>+ <table class="enum-table">+ <thead>+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>SECURITY_PROTOCOL_UNSPECIFIED</td>+ <td>0</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>START_TLS</td>+ <td>1</td>+ <td><p>StartTLS is the security protocol that starts with an unencrypted connection and then upgrades to TLS.</p></td>+ </tr>++ <tr>+ <td>LDAPS</td>+ <td>2</td>+ <td><p>LDAPS is the security protocol that uses TLS from the beginning.</p></td>+ </tr>++ </tbody>+ </table>++ <h3 id="bytebase.v1.OAuth2AuthStyle">OAuth2AuthStyle</h3>+ <p></p>+ <table class="enum-table">+ <thead>+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>OAUTH2_AUTH_STYLE_UNSPECIFIED</td>+ <td>0</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>IN_PARAMS</td>+ <td>1</td>+ <td><p>IN_PARAMS sends the "client_id" and "client_secret" in the POST body+as application/x-www-form-urlencoded parameters.</p></td>+ </tr>++ <tr>+ <td>IN_HEADER</td>+ <td>2</td>+ <td><p>IN_HEADER sends the client_id and client_password using HTTP Basic Authorization.+This is an optional style described in the OAuth2 RFC 6749 section 2.3.1.</p></td>+ </tr>++ </tbody>+ </table>++++++ <h3 id="bytebase.v1.IdentityProviderService">IdentityProviderService</h3>+ <p>IdentityProviderService manages external identity providers for SSO authentication.</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>GetIdentityProvider</td>+ <td><a href="#bytebase.v1.GetIdentityProviderRequest">GetIdentityProviderRequest</a></td>+ <td><a href="#bytebase.v1.IdentityProvider">IdentityProvider</a></td>+ <td><p>Gets an identity provider by name.+Permissions required: bb.identityProviders.get</p></td>+ </tr>++ <tr>+ <td>ListIdentityProviders</td>+ <td><a href="#bytebase.v1.ListIdentityProvidersRequest">ListIdentityProvidersRequest</a></td>+ <td><a href="#bytebase.v1.ListIdentityProvidersResponse">ListIdentityProvidersResponse</a></td>+ <td><p>Lists all configured identity providers (public endpoint for login page).+Permissions required: None</p></td>+ </tr>++ <tr>+ <td>CreateIdentityProvider</td>+ <td><a href="#bytebase.v1.CreateIdentityProviderRequest">CreateIdentityProviderRequest</a></td>+ <td><a href="#bytebase.v1.IdentityProvider">IdentityProvider</a></td>+ <td><p>Creates a new identity provider.+Permissions required: bb.identityProviders.create</p></td>+ </tr>++ <tr>+ <td>UpdateIdentityProvider</td>+ <td><a href="#bytebase.v1.UpdateIdentityProviderRequest">UpdateIdentityProviderRequest</a></td>+ <td><a href="#bytebase.v1.IdentityProvider">IdentityProvider</a></td>+ <td><p>Updates an identity provider.+Permissions required: bb.identityProviders.update+When allow_missing=true, also requires: bb.identityProviders.create</p></td>+ </tr>++ <tr>+ <td>DeleteIdentityProvider</td>+ <td><a href="#bytebase.v1.DeleteIdentityProviderRequest">DeleteIdentityProviderRequest</a></td>+ <td><a href="#google.protobuf.Empty">.google.protobuf.Empty</a></td>+ <td><p>Deletes an identity provider.+Permissions required: bb.identityProviders.delete</p></td>+ </tr>++ <tr>+ <td>TestIdentityProvider</td>+ <td><a href="#bytebase.v1.TestIdentityProviderRequest">TestIdentityProviderRequest</a></td>+ <td><a href="#bytebase.v1.TestIdentityProviderResponse">TestIdentityProviderResponse</a></td>+ <td><p>Tests the connection and configuration of an identity provider.+Permissions required: bb.identityProviders.update</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>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 "projects/-" to list all plans from all projects. </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>- </tr>+ <tr>+ <td>GetIdentityProvider</td>+ <td>GET</td>+ <td>/v1/{name=idps/*}</td>+ <td></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>+- <tr>- <td>filter</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 "users/{email or id}" format, support "==" operator.-- create_time: the plan create time in "2006-01-02T15:04:05Z07:00" format, support ">=" or "<=" operator.-- has_rollout: whether the plan has rollout, support "==" operator, the value should be "true" or "false".-- has_issue: the plan has issue or not, support "==" operator, the value should be "true" or "false".-- title: the plan title, support "==" operator for exact match and ".contains()" operator for case-insensitive substring match.-- spec_type: the plan spec config type, support "==" operator, the value should be "create_database_config", "change_database_config", or "export_data_config".-- state: the plan state, support "==" operator, the value should be "ACTIVE" or "DELETED".--For example:-creator == "users/[email protected]" && create_time >= "2025-01-02T15:04:05Z07:00"-has_rollout == false && has_issue == true-title == "My Plan"-title.contains("database migration")-spec_type == "change_database_config"-state == "ACTIVE" </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>ListIdentityProviders</td>+ <td>GET</td>+ <td>/v1/idps</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>ListIdentityProviders</td>+ <td>GET</td>+ <td>/v1/{parent=workspaces/*}/idps</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>++++ <tr>+ <td>CreateIdentityProvider</td>+ <td>POST</td>+ <td>/v1/idps</td>+ <td>identity_provider</td>+ </tr>+++++ <tr>+ <td>UpdateIdentityProvider</td>+ <td>PATCH</td>+ <td>/v1/{identity_provider.name=idps/*}</td>+ <td>identity_provider</td>+ </tr>+++++ <tr>+ <td>DeleteIdentityProvider</td>+ <td>DELETE</td>+ <td>/v1/{name=idps/*}</td>+ <td></td>+ </tr>+++++ <tr>+ <td>TestIdentityProvider</td>+ <td>POST</td>+ <td>/v1/idps/*:test</td>+ <td>*</td>+ </tr>+</tbody></table>--+- <h3 id="bytebase.v1.Plan">Plan</h3>+ <div class="file-heading">+ <h2 id="v1/org_policy_service.proto">v1/org_policy_service.proto</h2><a href="#title">Top</a>+ </div>+ <p></p>+++ <h3 id="bytebase.v1.CreatePolicyRequest">CreatePolicyRequest</h3><p></p>@@ -25407,105 +25394,28 @@ 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></td>- <td><p>The issue associated with the plan.-Can be empty.-Format: projects/{project}/issues/{issue} </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>- </tr>-- <tr>- <td>creator</td>+ <td>parent</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>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>has_rollout</td>- <td><a href="#bool">bool</a></td>- <td></td>- <td><p>Whether the plan has started the rollout. </p></td>+ <td><p>The parent resource where this instance will be created.+Workspace resource name: workspaces/{workspace-id}.+Environment resource name: environments/environment-id.+Instance resource name: instances/instance-id.+Database resource name: instances/instance-id/databases/database-name. </p></td></tr><tr>- <td>approval_status</td>- <td><a href="#bytebase.v1.Issue.ApprovalStatus">Issue.ApprovalStatus</a></td>+ <td>policy</td>+ <td><a href="#bytebase.v1.Policy">Policy</a></td><td></td>- <td><p>The approval status of the linked issue.-Unspecified when no linked issue exists. </p></td>+ <td><p>The policy to create. </p></td></tr><tr>- <td>rollout_stage_summaries</td>- <td><a href="#bytebase.v1.Plan.RolloutStageSummary">Plan.RolloutStageSummary</a></td>- <td>repeated</td>- <td><p>Per-stage rollout status summary.-Ordered by environment deployment order. Empty when no rollout exists. </p></td>+ <td>type</td>+ <td><a href="#bytebase.v1.PolicyType">PolicyType</a></td>+ <td></td>+ <td><p>The type of policy to create. </p></td></tr></tbody>@@ -25515,7 +25425,7 @@ Ordered by environment deployment order. Empty when no rollout exists. </p></td>- <h3 id="bytebase.v1.Plan.ChangeDatabaseConfig">Plan.ChangeDatabaseConfig</h3>+ <h3 id="bytebase.v1.DeletePolicyRequest">DeletePolicyRequest</h3><p></p>@@ -25526,35 +25436,15 @@ Ordered by environment deployment order. Empty when no rollout exists. </p></td><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>release</td>+ <td>name</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>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>+ <td><p>The policy's `name` field is used to identify the instance to update.+Format: {resource name}/policies/{policy type}+Workspace resource name: workspaces/{workspace-id}.+Environment resource name: environments/environment-id.+Instance resource name: instances/instance-id.+Database resource name: instances/instance-id/databases/database-name. </p></td></tr></tbody>@@ -25564,7 +25454,7 @@ Format: projects/{project}/releases/{release} </p></td>- <h3 id="bytebase.v1.Plan.CreateDatabaseConfig">Plan.CreateDatabaseConfig</h3>+ <h3 id="bytebase.v1.GetPolicyRequest">GetPolicyRequest</h3><p></p>@@ -25575,62 +25465,50 @@ Format: projects/{project}/releases/{release} </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></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>character_set</td>+ <td>name</td><td><a href="#string">string</a></td><td></td>- <td><p>character_set is the character set of the database. </p></td>+ <td><p>The name of the policy to retrieve.+Format: {resource type}/{resource id}/policies/{policy type} </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>+ </tbody>+ </table>++++++ <h3 id="bytebase.v1.ListPoliciesRequest">ListPoliciesRequest</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>cluster</td>+ <td>parent</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 "ON CLUSTER <<cluster>>". </p></td>+ <td><p>The parent, which owns this collection of policies.+Format: {resource type}/{resource id} </p></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 "WITH OWNER <<owner>>". </p></td>+ <td>policy_type</td>+ <td><a href="#bytebase.v1.PolicyType">PolicyType</a></td>+ <td>optional</td>+ <td><p>Filter by specific policy type. </p></td></tr><tr>- <td>environment</td>- <td><a href="#string">string</a></td>+ <td>show_deleted</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>Show deleted policies if specified. </p></td></tr></tbody>@@ -25640,7 +25518,7 @@ Format: environments/prod where prod is the environment resource ID. </p></td>- <h3 id="bytebase.v1.Plan.ExportDataConfig">Plan.ExportDataConfig</h3>+ <h3 id="bytebase.v1.ListPoliciesResponse">ListPoliciesResponse</h3><p></p>@@ -25651,35 +25529,34 @@ Format: environments/prod where prod is the environment resource ID. </p></td><tbody><tr>- <td>targets</td>- <td><a href="#string">string</a></td>+ <td>policies</td>+ <td><a href="#bytebase.v1.Policy">Policy</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>+ <td><p>The policies from the specified request. </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>+ </tbody>+ </table>++++++ <h3 id="bytebase.v1.MaskingExemptionPolicy">MaskingExemptionPolicy</h3>+ <p>MaskingExemptionPolicy is the allowlist of users who can access sensitive data.</p>+++ <table class="field-table">+ <thead>+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>+ </thead>+ <tbody><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>+ <td>exemptions</td>+ <td><a href="#bytebase.v1.MaskingExemptionPolicy.Exemption">MaskingExemptionPolicy.Exemption</a></td>+ <td>repeated</td>+ <td><p> </p></td></tr></tbody>@@ -25689,7 +25566,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.MaskingExemptionPolicy.Exemption">MaskingExemptionPolicy.Exemption</h3><p></p>@@ -25700,17 +25577,36 @@ Leave it empty if no needs to encrypt the zip file. </p></td><tbody><tr>- <td>key</td>+ <td>members</td><td><a href="#string">string</a></td>- <td></td>- <td><p> </p></td>+ <td>repeated</td>+ <td><p>Specifies the principals who are exempt from masking.+For users, the member should be: user:{email}+For groups, the member should be: group:{email}+For service accounts, the member should be: serviceAccount:{email}+For workload identities, the member should be: workloadIdentity:{email} </p></td></tr><tr>- <td>value</td>- <td><a href="#int32">int32</a></td>+ <td>condition</td>+ <td><a href="#google.type.Expr">google.type.Expr</a></td><td></td>- <td><p> </p></td>+ <td><p>The condition that is associated with this exception policy instance.+The syntax and semantics of CEL are documented at https://github.com/google/cel-spec+If the condition is empty, means the user can access all databases without expiration.++Support variables:+resource.instance_id: the instance resource id. Only support "==" operation.+resource.database_name: the database name. Only support "==" operation.+resource.schema_name: the schema name. Only support "==" operation.+resource.table_name: the table name. Only support "==" operation.+resource.column_name: the column name. Only support "==" operation.+request.time: the expiration. Only support "<" operation in `request.time < timestamp("{ISO datetime string format}")`+All variables should join with "&&" condition.++For example:+resource.instance_id == "local" && resource.database_name == "employee" && request.time < timestamp("2025-04-30T11:10:39.000Z")+resource.instance_id == "local" && resource.database_name == "employee" </p></td></tr></tbody>@@ -25720,8 +25616,8 @@ Leave it empty if no needs to encrypt the zip file. </p></td>- <h3 id="bytebase.v1.Plan.RolloutStageSummary">Plan.RolloutStageSummary</h3>- <p></p>+ <h3 id="bytebase.v1.MaskingRulePolicy">MaskingRulePolicy</h3>+ <p>Policy for configuring data masking rules.</p><table class="field-table">@@ -25731,18 +25627,10 @@ Leave it empty if no needs to encrypt the zip file. </p></td><tbody><tr>- <td>stage</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The stage resource name.-Format: projects/{project}/plans/{plan}/rollout/stages/{stage} </p></td>- </tr>-- <tr>- <td>task_status_counts</td>- <td><a href="#bytebase.v1.Plan.TaskStatusCount">Plan.TaskStatusCount</a></td>+ <td>rules</td>+ <td><a href="#bytebase.v1.MaskingRulePolicy.MaskingRule">MaskingRulePolicy.MaskingRule</a></td><td>repeated</td>- <td><p>Task status counts for this stage. </p></td>+ <td><p>The list of masking rules. </p></td></tr></tbody>@@ -25752,8 +25640,8 @@ Format: projects/{project}/plans/{plan}/rollout/stages/{stage} </p></td>- <h3 id="bytebase.v1.Plan.Spec">Plan.Spec</h3>- <p></p>+ <h3 id="bytebase.v1.MaskingRulePolicy.MaskingRule">MaskingRulePolicy.MaskingRule</h3>+ <p>A rule that defines when and how to mask data.</p><table class="field-table">@@ -25766,28 +25654,44 @@ Format: projects/{project}/plans/{plan}/rollout/stages/{stage} </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>+ <td><p>A unique identifier for the rule in UUID format. </p></td></tr><tr>- <td>change_database_config</td>- <td><a href="#bytebase.v1.Plan.ChangeDatabaseConfig">Plan.ChangeDatabaseConfig</a></td>+ <td>condition</td>+ <td><a href="#google.type.Expr">google.type.Expr</a></td><td></td>- <td><p> </p></td>+ <td><p>The condition for the masking rule.+The syntax and semantics of CEL are documented at https://github.com/google/cel-spec++Support variables:+resource.environment_id: the environment resource id.+resource.project_id: the project resource id.+resource.instance_id: the instance resource id.+resource.database_name: the database name.+resource.table_name: the table name.+resource.column_name: the column name.+resource.classification_level: the classification level (integer).++Each variable support following operations:+==: the value equals the target.+!=: the value not equals the target.+in: the value matches one of the targets.+!(in): the value not matches any of the targets.+<, <=, >, >=: numeric comparison (classification_level only).++For example:+resource.environment_id == "test" && resource.project_id == "sample-project"+resource.instance_id == "sample-instance" && resource.database_name == "employee" && resource.table_name in ["table1", "table2"]+resource.environment_id != "test" || !(resource.project_id in ["poject1", "prject2"])+resource.instance_id == "sample-instance" && (resource.database_name == "db1" || resource.database_name == "db2") </p></td></tr><tr>- <td>export_data_config</td>- <td><a href="#bytebase.v1.Plan.ExportDataConfig">Plan.ExportDataConfig</a></td>+ <td>semantic_type</td>+ <td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>The semantic type of data to mask (e.g., "SSN", "EMAIL"). </p></td></tr></tbody>@@ -25797,7 +25701,7 @@ Format: projects/{project}/plans/{plan}/rollout/stages/{stage} </p></td>- <h3 id="bytebase.v1.Plan.TaskStatusCount">Plan.TaskStatusCount</h3>+ <h3 id="bytebase.v1.Policy">Policy</h3><p></p>@@ -25808,71 +25712,80 @@ Format: projects/{project}/plans/{plan}/rollout/stages/{stage} </p></td><tbody><tr>- <td>status</td>- <td><a href="#bytebase.v1.Task.Status">Task.Status</a></td>+ <td>name</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>The task status. </p></td>+ <td><p>The name of the policy.+Format: {resource name}/policies/{policy type}+Workspace resource name: workspaces/{workspace-id}.+Environment resource name: environments/environment-id.+Instance resource name: instances/instance-id.+Database resource name: instances/instance-id/databases/database-name. </p></td></tr><tr>- <td>count</td>- <td><a href="#int32">int32</a></td>+ <td>inherit_from_parent</td>+ <td><a href="#bool">bool</a></td><td></td>- <td><p>The number of tasks in the status. </p></td>+ <td><p>Whether this policy inherits from its parent resource. </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>type</td>+ <td><a href="#bytebase.v1.PolicyType">PolicyType</a></td>+ <td></td>+ <td><p>The type of policy. </p></td>+ </tr><tr>- <td>name</td>- <td><a href="#string">string</a></td>+ <td>rollout_policy</td>+ <td><a href="#bytebase.v1.RolloutPolicy">RolloutPolicy</a></td><td></td>- <td><p>Format: projects/{project}/plans/{plan}/planCheckRun </p></td>+ <td><p> </p></td></tr><tr>- <td>status</td>- <td><a href="#bytebase.v1.PlanCheckRun.Status">PlanCheckRun.Status</a></td>+ <td>masking_rule_policy</td>+ <td><a href="#bytebase.v1.MaskingRulePolicy">MaskingRulePolicy</a></td><td></td><td><p> </p></td></tr><tr>- <td>results</td>- <td><a href="#bytebase.v1.PlanCheckRun.Result">PlanCheckRun.Result</a></td>- <td>repeated</td>+ <td>masking_exemption_policy</td>+ <td><a href="#bytebase.v1.MaskingExemptionPolicy">MaskingExemptionPolicy</a></td>+ <td></td><td><p> </p></td></tr><tr>- <td>error</td>- <td><a href="#string">string</a></td>+ <td>tag_policy</td>+ <td><a href="#bytebase.v1.TagPolicy">TagPolicy</a></td><td></td>- <td><p>error is set if the Status is FAILED. </p></td>+ <td><p> </p></td></tr><tr>- <td>create_time</td>- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>+ <td>query_data_policy</td>+ <td><a href="#bytebase.v1.QueryDataPolicy">QueryDataPolicy</a></td><td></td><td><p> </p></td></tr>+ <tr>+ <td>enforce</td>+ <td><a href="#bool">bool</a></td>+ <td></td>+ <td><p>Whether the policy is enforced. </p></td>+ </tr>++ <tr>+ <td>resource_type</td>+ <td><a href="#bytebase.v1.PolicyResourceType">PolicyResourceType</a></td>+ <td></td>+ <td><p>The resource type for the policy. </p></td>+ </tr>+</tbody></table>@@ -25880,8 +25793,8 @@ Format: projects/{project}/plans/{plan}/rollout/stages/{stage} </p></td>- <h3 id="bytebase.v1.PlanCheckRun.Result">PlanCheckRun.Result</h3>- <p></p>+ <h3 id="bytebase.v1.QueryDataPolicy">QueryDataPolicy</h3>+ <p>QueryDataPolicy is the policy configuration for querying data in the SQL Editor.</p><table class="field-table">@@ -25891,60 +25804,40 @@ Format: projects/{project}/plans/{plan}/rollout/stages/{stage} </p></td><tbody><tr>- <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>maximum_result_rows</td><td><a href="#int32">int32</a></td><td></td>- <td><p> </p></td>- </tr>-- <tr>- <td>target</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>Target identification for consolidated results.-Format: instances/{instance}/databases/{database} </p></td>+ <td><p>Support both project-level and workspace-level.+The maximum number of rows to return in the SQL editor.+The default value <= 0, means no limit. </p></td></tr><tr>- <td>type</td>- <td><a href="#bytebase.v1.PlanCheckRun.Result.Type">PlanCheckRun.Result.Type</a></td>+ <td>disable_export</td>+ <td><a href="#bool">bool</a></td><td></td>- <td><p> </p></td>+ <td><p>workspace-level policy+Disable data export in the SQL editor. </p></td></tr><tr>- <td>sql_summary_report</td>- <td><a href="#bytebase.v1.PlanCheckRun.Result.SqlSummaryReport">PlanCheckRun.Result.SqlSummaryReport</a></td>+ <td>disable_copy_data</td>+ <td><a href="#bool">bool</a></td><td></td>- <td><p> </p></td>+ <td><p>workspace-level policy+Disable copying query results in the SQL editor. </p></td></tr><tr>- <td>sql_review_report</td>- <td><a href="#bytebase.v1.PlanCheckRun.Result.SqlReviewReport">PlanCheckRun.Result.SqlReviewReport</a></td>+ <td>allow_admin_data_source</td>+ <td><a href="#bool">bool</a></td><td></td>- <td><p> </p></td>+ <td><p>workspace-level policy+Allow using the admin data source to query in the SQL editor.+If true, users can select the admin data source or read-only data source+If false,+1. when read-only data source is configured, users're force to use the read-only data source+2. otherwise fallback to use the admin data source. </p></td></tr></tbody>@@ -25954,8 +25847,8 @@ Format: instances/{instance}/databases/{database} </p></td>- <h3 id="bytebase.v1.PlanCheckRun.Result.SqlReviewReport">PlanCheckRun.Result.SqlReviewReport</h3>- <p></p>+ <h3 id="bytebase.v1.RolloutPolicy">RolloutPolicy</h3>+ <p>Rollout policy configuration.</p><table class="field-table">@@ -25965,17 +25858,17 @@ Format: instances/{instance}/databases/{database} </p></td><tbody><tr>- <td>start_position</td>- <td><a href="#bytebase.v1.Position">Position</a></td>+ <td>automatic</td>+ <td><a href="#bool">bool</a></td><td></td>- <td><p>Position of the SQL statement. </p></td>+ <td><p>Whether rollout is automatic without manual approval. </p></td></tr><tr>- <td>end_position</td>- <td><a href="#bytebase.v1.Position">Position</a></td>- <td></td>- <td><p> </p></td>+ <td>roles</td>+ <td><a href="#string">string</a></td>+ <td>repeated</td>+ <td><p>The roles that can approve rollout execution. </p></td></tr></tbody>@@ -25985,8 +25878,8 @@ Format: instances/{instance}/databases/{database} </p></td>- <h3 id="bytebase.v1.PlanCheckRun.Result.SqlSummaryReport">PlanCheckRun.Result.SqlSummaryReport</h3>- <p></p>+ <h3 id="bytebase.v1.TagPolicy">TagPolicy</h3>+ <p>Policy for tagging resources with metadata.</p><table class="field-table">@@ -25996,17 +25889,11 @@ Format: instances/{instance}/databases/{database} </p></td><tbody><tr>- <td>statement_types</td>- <td><a href="#bytebase.v1.StatementType">StatementType</a></td>+ <td>tags</td>+ <td><a href="#bytebase.v1.TagPolicy.TagsEntry">TagPolicy.TagsEntry</a></td><td>repeated</td>- <td><p>statement_types are the types of statements that are found in the sql. </p></td>- </tr>-- <tr>- <td>affected_rows</td>- <td><a href="#int64">int64</a></td>- <td></td>- <td><p> </p></td>+ <td><p>tags is the key - value map for resources.+for example, the environment resource can have the sql review config tag, like "bb.tag.review_config": "reviewConfigs/{review config resource id}" </p></td></tr></tbody>@@ -26016,7 +25903,7 @@ Format: instances/{instance}/databases/{database} </p></td>- <h3 id="bytebase.v1.RunPlanChecksRequest">RunPlanChecksRequest</h3>+ <h3 id="bytebase.v1.TagPolicy.TagsEntry">TagPolicy.TagsEntry</h3><p></p>@@ -26027,20 +25914,17 @@ Format: instances/{instance}/databases/{database} </p></td><tbody><tr>- <td>name</td>+ <td>key</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>+ <td><p> </p></td></tr><tr>- <td>spec_id</td>+ <td>value</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></td>+ <td><p> </p></td></tr></tbody>@@ -26050,14 +25934,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.UpdatePlanRequest">UpdatePlanRequest</h3>+ <h3 id="bytebase.v1.UpdatePolicyRequest">UpdatePolicyRequest</h3><p></p>@@ -26068,13 +25945,17 @@ If not set, all specs in the plan will be used. </p></td><tbody><tr>- <td>plan</td>- <td><a href="#bytebase.v1.Plan">Plan</a></td>+ <td>policy</td>+ <td><a href="#bytebase.v1.Policy">Policy</a></td><td></td>- <td><p>The plan to update.+ <td><p>The policy to update.-The plan's `name` field is used to identify the plan to update.-Format: projects/{project}/plans/{plan} </p></td>+The policy's `name` field is used to identify the instance to update.+Format: {resource name}/policies/{policy type}+Workspace resource name: workspaces/{workspace-id}.+Environment resource name: environments/environment-id.+Instance resource name: instances/instance-id.+Database resource name: instances/instance-id/databases/database-name. </p></td></tr><tr>@@ -26088,7 +25969,7 @@ Format: projects/{project}/plans/{plan} </p></td><td>allow_missing</td><td><a href="#bool">bool</a></td><td></td>- <td><p>If set to true, and the plan is not found, a new plan will be created.+ <td><p>If set to true, and the policy is not found, a new policy will be created.In this situation, `update_mask` is ignored. </p></td></tr>@@ -26101,8 +25982,8 @@ In this situation, `update_mask` is ignored. </p></td>- <h3 id="bytebase.v1.PlanCheckRun.Result.Type">PlanCheckRun.Result.Type</h3>- <p></p>+ <h3 id="bytebase.v1.PolicyResourceType">PolicyResourceType</h3>+ <p>The resource type that a policy can be attached to.</p><table class="enum-table"><thead><tr><td>Name</td><td>Number</td><td>Description</td></tr>@@ -26110,34 +25991,34 @@ In this situation, `update_mask` is ignored. </p></td><tbody><tr>- <td>TYPE_UNSPECIFIED</td>+ <td>RESOURCE_TYPE_UNSPECIFIED</td><td>0</td>- <td><p></p></td>+ <td><p>Unspecified resource type.</p></td></tr><tr>- <td>STATEMENT_ADVISE</td>+ <td>WORKSPACE</td><td>1</td>- <td><p></p></td>+ <td><p>Workspace-level policy.</p></td></tr><tr>- <td>STATEMENT_SUMMARY_REPORT</td>+ <td>ENVIRONMENT</td><td>2</td>- <td><p></p></td>+ <td><p>Environment-level policy.</p></td></tr><tr>- <td>GHOST_SYNC</td>+ <td>PROJECT</td><td>3</td>- <td><p></p></td>+ <td><p>Project-level policy.</p></td></tr></tbody></table>- <h3 id="bytebase.v1.PlanCheckRun.Status">PlanCheckRun.Status</h3>- <p></p>+ <h3 id="bytebase.v1.PolicyType">PolicyType</h3>+ <p>The type of organizational policy.</p><table class="enum-table"><thead><tr><td>Name</td><td>Number</td><td>Description</td></tr>@@ -26145,33 +26026,39 @@ In this situation, `update_mask` is ignored. </p></td><tbody><tr>- <td>STATUS_UNSPECIFIED</td>+ <td>POLICY_TYPE_UNSPECIFIED</td><td>0</td>- <td><p></p></td>+ <td><p>Unspecified policy type.</p></td></tr><tr>- <td>RUNNING</td>+ <td>MASKING_RULE</td><td>1</td>- <td><p></p></td>+ <td><p>Data masking rule policy.</p></td></tr><tr>- <td>DONE</td>+ <td>MASKING_EXEMPTION</td><td>2</td>- <td><p></p></td>+ <td><p>Data masking exemption policy.</p></td></tr><tr>- <td>FAILED</td>+ <td>ROLLOUT_POLICY</td><td>3</td>- <td><p></p></td>+ <td><p>Rollout deployment policy.</p></td></tr><tr>- <td>CANCELED</td>+ <td>TAG</td><td>4</td>- <td><p></p></td>+ <td><p>Resource tag policy.</p></td>+ </tr>++ <tr>+ <td>DATA_QUERY</td>+ <td>6</td>+ <td><p>Query data access policy.</p></td></tr></tbody>@@ -26181,8 +26068,8 @@ In this situation, `update_mask` is ignored. </p></td>- <h3 id="bytebase.v1.PlanService">PlanService</h3>- <p>PlanService manages deployment plans for database changes.</p>+ <h3 id="bytebase.v1.OrgPolicyService">OrgPolicyService</h3>+ <p>OrgPolicyService manages organizational policies at various resource levels.</p><table class="enum-table"><thead><tr><td>Method Name</td><td>Request Type</td><td>Response Type</td><td>Description</td></tr>@@ -26190,60 +26077,43 @@ In this situation, `update_mask` is ignored. </p></td><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>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>+ <td>GetPolicy</td>+ <td><a href="#bytebase.v1.GetPolicyRequest">GetPolicyRequest</a></td>+ <td><a href="#bytebase.v1.Policy">Policy</a></td>+ <td><p>Retrieves a policy by name.+Permissions required: bb.policies.get</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>+ <td>ListPolicies</td>+ <td><a href="#bytebase.v1.ListPoliciesRequest">ListPoliciesRequest</a></td>+ <td><a href="#bytebase.v1.ListPoliciesResponse">ListPoliciesResponse</a></td>+ <td><p>Lists policies at a specified resource level.+Permissions required: bb.policies.list</p></td></tr><tr>- <td>GetPlanCheckRun</td>- <td><a href="#bytebase.v1.GetPlanCheckRunRequest">GetPlanCheckRunRequest</a></td>- <td><a href="#bytebase.v1.PlanCheckRun">PlanCheckRun</a></td>- <td><p>Gets the plan check run for a deployment plan.-Permissions required: bb.planCheckRuns.get</p></td>+ <td>CreatePolicy</td>+ <td><a href="#bytebase.v1.CreatePolicyRequest">CreatePolicyRequest</a></td>+ <td><a href="#bytebase.v1.Policy">Policy</a></td>+ <td><p>Creates a new organizational policy.+Permissions required: bb.policies.create</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>+ <td>UpdatePolicy</td>+ <td><a href="#bytebase.v1.UpdatePolicyRequest">UpdatePolicyRequest</a></td>+ <td><a href="#bytebase.v1.Policy">Policy</a></td>+ <td><p>Updates an existing organizational policy.+Permissions required: bb.policies.update</p></td></tr><tr>- <td>CancelPlanCheckRun</td>- <td><a href="#bytebase.v1.CancelPlanCheckRunRequest">CancelPlanCheckRunRequest</a></td>- <td><a href="#bytebase.v1.CancelPlanCheckRunResponse">CancelPlanCheckRunResponse</a></td>- <td><p>Cancels the plan check run for a deployment plan.-Permissions required: bb.planCheckRuns.run</p></td>+ <td>DeletePolicy</td>+ <td><a href="#bytebase.v1.DeletePolicyRequest">DeletePolicyRequest</a></td>+ <td><a href="#google.protobuf.Empty">.google.protobuf.Empty</a></td>+ <td><p>Deletes an organizational policy.+Permissions required: bb.policies.delete</p></td></tr></tbody>@@ -26267,9 +26137,37 @@ Permissions required: bb.planCheckRuns.run</p></td><tr>- <td>GetPlan</td>+ <td>GetPolicy</td><td>GET</td>- <td>/v1/{name=projects/*/plans/*}</td>+ <td>/v1/{name=workspaces/*/policies/*}</td>+ <td></td>+ </tr>++ <tr>+ <td>GetPolicy</td>+ <td>GET</td>+ <td>/v1/{name=projects/*/policies/*}</td>+ <td></td>+ </tr>++ <tr>+ <td>GetPolicy</td>+ <td>GET</td>+ <td>/v1/{name=environments/*/policies/*}</td>+ <td></td>+ </tr>++ <tr>+ <td>GetPolicy</td>+ <td>GET</td>+ <td>/v1/{name=instances/*/policies/*}</td>+ <td></td>+ </tr>++ <tr>+ <td>GetPolicy</td>+ <td>GET</td>+ <td>/v1/{name=instances/*/databases/*/policies/*}</td><td></td></tr>@@ -26277,9 +26175,37 @@ Permissions required: bb.planCheckRuns.run</p></td><tr>- <td>ListPlans</td>+ <td>ListPolicies</td><td>GET</td>- <td>/v1/{parent=projects/*}/plans</td>+ <td>/v1/{parent=workspaces/*}/policies</td>+ <td></td>+ </tr>++ <tr>+ <td>ListPolicies</td>+ <td>GET</td>+ <td>/v1/{parent=projects/*}/policies</td>+ <td></td>+ </tr>++ <tr>+ <td>ListPolicies</td>+ <td>GET</td>+ <td>/v1/{parent=environments/*}/policies</td>+ <td></td>+ </tr>++ <tr>+ <td>ListPolicies</td>+ <td>GET</td>+ <td>/v1/{parent=instances/*}/policies</td>+ <td></td>+ </tr>++ <tr>+ <td>ListPolicies</td>+ <td>GET</td>+ <td>/v1/{parent=instances/*/databases/*}/policies</td><td></td></tr>@@ -26287,50 +26213,114 @@ Permissions required: bb.planCheckRuns.run</p></td><tr>- <td>CreatePlan</td>+ <td>CreatePolicy</td><td>POST</td>- <td>/v1/{parent=projects/*}/plans</td>- <td>plan</td>+ <td>/v1/{parent=workspaces/*}/policies</td>+ <td>policy</td>+ </tr>++ <tr>+ <td>CreatePolicy</td>+ <td>POST</td>+ <td>/v1/{parent=projects/*}/policies</td>+ <td>policy</td>+ </tr>++ <tr>+ <td>CreatePolicy</td>+ <td>POST</td>+ <td>/v1/{parent=environments/*}/policies</td>+ <td>policy</td>+ </tr>++ <tr>+ <td>CreatePolicy</td>+ <td>POST</td>+ <td>/v1/{parent=instances/*}/policies</td>+ <td>policy</td>+ </tr>++ <tr>+ <td>CreatePolicy</td>+ <td>POST</td>+ <td>/v1/{parent=instances/*/databases/*}/policies</td>+ <td>policy</td></tr><tr>- <td>UpdatePlan</td>+ <td>UpdatePolicy</td><td>PATCH</td>- <td>/v1/{plan.name=projects/*/plans/*}</td>- <td>plan</td>+ <td>/v1/{policy.name=workspaces/*/policies/*}</td>+ <td>policy</td></tr>-+ <tr>+ <td>UpdatePolicy</td>+ <td>PATCH</td>+ <td>/v1/{policy.name=projects/*/policies/*}</td>+ <td>policy</td>+ </tr>+ <tr>+ <td>UpdatePolicy</td>+ <td>PATCH</td>+ <td>/v1/{policy.name=environments/*/policies/*}</td>+ <td>policy</td>+ </tr><tr>- <td>GetPlanCheckRun</td>- <td>GET</td>- <td>/v1/{name=projects/*/plans/*/planCheckRun}</td>- <td></td>+ <td>UpdatePolicy</td>+ <td>PATCH</td>+ <td>/v1/{policy.name=instances/*/policies/*}</td>+ <td>policy</td>+ </tr>++ <tr>+ <td>UpdatePolicy</td>+ <td>PATCH</td>+ <td>/v1/{policy.name=instances/*/databases/*/policies/*}</td>+ <td>policy</td></tr><tr>- <td>RunPlanChecks</td>- <td>POST</td>- <td>/v1/{name=projects/*/plans/*}:runPlanChecks</td>- <td>*</td>+ <td>DeletePolicy</td>+ <td>DELETE</td>+ <td>/v1/{name=workspaces/*/policies/*}</td>+ <td></td></tr>-+ <tr>+ <td>DeletePolicy</td>+ <td>DELETE</td>+ <td>/v1/{name=projects/*/policies/*}</td>+ <td></td>+ </tr>++ <tr>+ <td>DeletePolicy</td>+ <td>DELETE</td>+ <td>/v1/{name=environments/*/policies/*}</td>+ <td></td>+ </tr>+ <tr>+ <td>DeletePolicy</td>+ <td>DELETE</td>+ <td>/v1/{name=instances/*/policies/*}</td>+ <td></td>+ </tr><tr>- <td>CancelPlanCheckRun</td>- <td>POST</td>- <td>/v1/{name=projects/*/plans/*/planCheckRun}:cancel</td>- <td>*</td>+ <td>DeletePolicy</td>+ <td>DELETE</td>+ <td>/v1/{name=instances/*/databases/*/policies/*}</td>+ <td></td></tr>diff --git a/proto/store/store/issue_comment.proto b/proto/store/store/issue_comment.protoindex 4b5088a1e7..ef5dde555e 100644--- a/proto/store/store/issue_comment.proto+++ b/proto/store/store/issue_comment.proto@@ -4,6 +4,7 @@ package bytebase.store;import "store/approval.proto";import "store/issue.proto";+import "store/plan.proto";option go_package = "generated-go/store";@@ -13,7 +14,7 @@ message IssueCommentPayload {oneof event {Approval approval = 2;IssueUpdate issue_update = 3;- PlanSpecUpdate plan_spec_update = 7;+ PlanUpdate plan_update = 7;}message Approval {@@ -31,14 +32,12 @@ message IssueCommentPayload {repeated string to_labels = 8;}- // Plan spec update event (tracks sheet changes to plan specs)- message PlanSpecUpdate {- // The spec that was updated- // Format: projects/{project}/plans/{plan}/specs/{spec}- string spec = 1;- // The SHA256 hash of the previous sheet content (hex-encoded).- optional string from_sheet_sha256 = 2;- // The SHA256 hash of the new sheet content (hex-encoded).- optional string to_sheet_sha256 = 3;+ // PlanUpdate carries before/after snapshots of plan.config.specs,+ // emitted once per PlanService.UpdatePlan call whose specs branch+ // produces a non-cosmetic diff. The renderer computes per-spec+ // add/remove/update from the snapshot pair.+ message PlanUpdate {+ repeated PlanConfig.Spec from_specs = 1;+ repeated PlanConfig.Spec to_specs = 2;}}diff --git a/proto/v1/v1/common.proto b/proto/v1/v1/common.protoindex 7bb2a1afa5..c1ccb518d3 100644--- a/proto/v1/v1/common.proto+++ b/proto/v1/v1/common.proto@@ -97,6 +97,24 @@ enum ExportFormat {XLSX = 4;}+// Approval workflow status for an issue or a plan.+// Lives at the top level so both plan_service.proto and issue_service.proto+// can reference it without a circular import.+enum ApprovalStatus {+ // Unspecified approval status.+ APPROVAL_STATUS_UNSPECIFIED = 0;+ // Approval checks are being evaluated.+ CHECKING = 1;+ // Approval is pending.+ PENDING = 2;+ // Issue has been approved.+ APPROVED = 3;+ // Issue has been rejected.+ REJECTED = 4;+ // Approval was skipped.+ SKIPPED = 5;+}+// Position in a text expressed as one-based line and one-based column.// We use 1-based numbering to match the majority of industry standards:// - Monaco Editor uses 1-based (https://microsoft.github.io/monaco-editor/typedoc/interfaces/IPosition.html)diff --git a/proto/v1/v1/issue_service.proto b/proto/v1/v1/issue_service.protoindex 0d4a884296..c79f1e086e 100644--- a/proto/v1/v1/issue_service.proto+++ b/proto/v1/v1/issue_service.proto@@ -13,6 +13,7 @@ import "google/protobuf/timestamp.proto";import "google/type/expr.proto";import "v1/annotation.proto";import "v1/common.proto";+import "v1/plan_service.proto";option go_package = "github.com/bytebase/bytebase/backend/generated-go/v1";@@ -471,20 +472,6 @@ message Issue {repeated string labels = 17;// The overall approval status for the issue.- enum ApprovalStatus {- // Unspecified approval status.- APPROVAL_STATUS_UNSPECIFIED = 0;- // Approval checks are being evaluated.- CHECKING = 1;- // Approval is pending.- PENDING = 2;- // Issue has been approved.- APPROVED = 3;- // Issue has been rejected.- REJECTED = 4;- // Approval was skipped.- SKIPPED = 5;- }ApprovalStatus approval_status = 18 [(google.api.field_behavior) = OUTPUT_ONLY];// The access grant associated with this issue.@@ -619,8 +606,8 @@ message IssueComment {Approval approval = 7;// Issue update event.IssueUpdate issue_update = 8;- // Plan spec update event.- PlanSpecUpdate plan_spec_update = 12;+ // Plan update event.+ PlanUpdate plan_update = 12;}// Approval event information.@@ -654,16 +641,10 @@ message IssueComment {repeated string to_labels = 8;}- // Plan spec update event information (tracks sheet changes to plan specs).- message PlanSpecUpdate {- // The spec that was updated.- // Format: projects/{project}/plans/{plan}/specs/{spec}- string spec = 1;- // The previous sheet.- // Format: projects/{project}/sheets/{sheet}- optional string from_sheet = 2;- // The new sheet.- // Format: projects/{project}/sheets/{sheet}- optional string to_sheet = 3;+ // Plan update event information (snapshot of plan.config.specs before+ // and after a PlanService.UpdatePlan call that mutated specs).+ message PlanUpdate {+ repeated Plan.Spec from_specs = 1;+ repeated Plan.Spec to_specs = 2;}}diff --git a/proto/v1/v1/plan_service.proto b/proto/v1/v1/plan_service.protoindex 1f6d3d076c..5f45d451fe 100644--- a/proto/v1/v1/plan_service.proto+++ b/proto/v1/v1/plan_service.proto@@ -11,7 +11,6 @@ import "google/protobuf/field_mask.proto";import "google/protobuf/timestamp.proto";import "v1/annotation.proto";import "v1/common.proto";-import "v1/issue_service.proto";import "v1/rollout_service.proto";import "v1/sql_service.proto";@@ -245,7 +244,7 @@ message Plan {// The approval status of the linked issue.// Unspecified when no linked issue exists.- Issue.ApprovalStatus approval_status = 13 [(google.api.field_behavior) = OUTPUT_ONLY];+ ApprovalStatus approval_status = 13 [(google.api.field_behavior) = OUTPUT_ONLY];// Per-stage rollout status summary.// Ordered by environment deployment order. Empty when no rollout exists.