Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
refactor: separate the restriction from GetActuatorInfo into a new API (#21184)
ecmadaoaee7e596cf70
diff --git a/backend/api/mcp/gen/openapi.yaml b/backend/api/mcp/gen/openapi.yamlindex 73f1fcd2f4..79b2f3bbf1 100644--- a/backend/api/mcp/gen/openapi.yaml+++ b/backend/api/mcp/gen/openapi.yaml@@ -262,9 +262,8 @@ paths:summary: GetActuatorInfodescription: |-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+ The workspace is resolved from the authenticated session.+ Permissions required: None (authentication required)operationId: bytebase.v1.ActuatorService.GetActuatorInfoparameters:- name: Connect-Protocol-Version@@ -448,6 +447,44 @@ paths:application/json:schema:$ref: '#/components/schemas/bytebase.v1.ExchangeTokenResponse'+ /bytebase.v1.AuthService/GetAuthenticationRestriction:+ post:+ tags:+ - bytebase.v1.AuthService+ summary: GetAuthenticationRestriction+ description: |-+ Gets the effective restrictions needed to render authentication flows.+ Permissions required: None+ operationId: bytebase.v1.AuthService.GetAuthenticationRestriction+ parameters:+ - name: Connect-Protocol-Version+ in: header+ required: true+ schema:+ $ref: '#/components/schemas/connect-protocol-version'+ - name: Connect-Timeout-Ms+ in: header+ schema:+ $ref: '#/components/schemas/connect-timeout-header'+ requestBody:+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/bytebase.v1.GetAuthenticationRestrictionRequest'+ required: true+ responses:+ default:+ description: Error+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/connect.error'+ "200":+ description: Success+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/bytebase.v1.AuthenticationInfo'/bytebase.v1.AuthService/Login:post:tags:@@ -8229,22 +8266,10 @@ components:type: stringtitle: git_commitdescription: The git commit hash of the build.- readonly:- type: boolean- title: readonly- description: Whether the Bytebase instance is running in read-only mode.saas:type: booleantitle: saasdescription: Whether the Bytebase instance is running in SaaS mode where some features cannot be edited by users.- host:- type: string- title: host- description: The host address of the Bytebase instance.- port:- type: string- title: port- description: The port number of the Bytebase instance.externalUrl:type: stringtitle: external_url@@ -8265,15 +8290,6 @@ components:type: stringtitle: unlicensed_featuresdescription: List of features that are not licensed.- docker:- type: boolean- title: docker- description: Whether the Bytebase instance is running in Docker.- activatedUserCount:- type: integer- title: activated_user_count- format: int32- description: The number of activated users.activatedInstanceCount:type: integertitle: activated_instance_count@@ -8297,9 +8313,6 @@ components:title: replica_countformat: int32description: The number of active replicas (servers sharing the same database).- restriction:- title: restriction- $ref: '#/components/schemas/bytebase.v1.Restriction'defaultProject:type: stringtitle: default_project@@ -8909,6 +8922,21 @@ components:- IAM- CUSTOMdescription: Authorization method for RPC calls.+ bytebase.v1.AuthenticationInfo:+ type: object+ properties:+ workspace:+ type: string+ title: workspace+ description: |-+ The workspace used for authentication, when one can be resolved.+ Format: workspaces/{workspace}+ restriction:+ title: restriction+ description: The effective authentication restrictions.+ $ref: '#/components/schemas/bytebase.v1.Restriction'+ title: AuthenticationInfo+ additionalProperties: falsebytebase.v1.BatchCancelTaskRunsRequest:type: objectproperties:@@ -12020,19 +12048,23 @@ components:title: GetAccessGrantRequestadditionalProperties: falsebytebase.v1.GetActuatorInfoRequest:+ type: object+ title: GetActuatorInfoRequest+ additionalProperties: false+ description: Request message for getting actuator information.+ bytebase.v1.GetAuthenticationRestrictionRequest:type: objectproperties:- name:+ workspace:type: string- title: name+ title: workspacedescription: |-- Optional. The workspace to scope the response to.+ Optional. The workspace whose authentication policy should be returned.Format: workspaces/{workspace}- When unset, the workspace is resolved from the request context (self-hosted)- or no workspace-scoped fields are returned (SaaS).- title: GetActuatorInfoRequest+ When unset, self-hosted resolves the singleton workspace and SaaS uses+ the deployment-level defaults.+ title: GetAuthenticationRestrictionRequestadditionalProperties: false- description: Request message for getting actuator information.bytebase.v1.GetChangelogRequest:type: objectproperties:@@ -22753,6 +22785,12 @@ security: []tags:- name: bytebase.v1.AccessGrantServicedescription: AccessGrantService manages temporary access grants within projects.+ - name: bytebase.v1.ActuatorService+ description: ActuatorService manages system health and operational information.+ - name: bytebase.v1.AIService+ description: AIService provides AI chat capabilities for the page agent.+ - name: bytebase.v1.AuditLogService+ description: AuditLogService manages audit logs for system activities and API calls.- name: bytebase.v1.RolloutServicedescription: RolloutService manages the execution of deployment plans.- name: bytebase.v1.QueryHistoryService@@ -22765,12 +22803,6 @@ tags:description: IssueService manages issues for tracking database changes and tasks.- name: bytebase.v1.SettingServicedescription: SettingService manages workspace-level settings and configurations.- - name: bytebase.v1.ActuatorService- description: ActuatorService manages system health and operational information.- - name: bytebase.v1.AIService- description: AIService provides AI chat capabilities for the page agent.- - name: bytebase.v1.AuditLogService- description: AuditLogService manages audit logs for system activities and API calls.- name: bytebase.v1.UserServicedescription: UserService manages user accounts and authentication.- name: bytebase.v1.AuthServicediff --git a/backend/api/mcp/openapi_index_forbidden_test.go b/backend/api/mcp/openapi_index_forbidden_test.goindex 661928e747..55e343dad1 100644--- a/backend/api/mcp/openapi_index_forbidden_test.go+++ b/backend/api/mcp/openapi_index_forbidden_test.go@@ -24,10 +24,12 @@ func TestForbiddenEndpointsAreNotAdvertised(t *testing.T) {require.Equal(t, forbiddenPath, ep.Path)})- t.Run("absent from service listings", func(t *testing.T) {- require.NotContains(t, idx.Services(), "AuthService",- "every AuthService RPC is FORBIDDEN, so the service itself has nothing to offer an agent")- require.Empty(t, idx.GetServiceEndpoints("AuthService"))+ t.Run("only callable auth endpoints are listed", func(t *testing.T) {+ require.Contains(t, idx.Services(), "AuthService",+ "AuthService has a non-FORBIDDEN authentication restriction endpoint")+ endpoints := idx.GetServiceEndpoints("AuthService")+ require.Len(t, endpoints, 1)+ require.Equal(t, "bytebase.v1.AuthService.GetAuthenticationRestriction", endpoints[0].OperationID)})t.Run("absent from search", func(t *testing.T) {diff --git a/backend/api/v1/actuator_service.go b/backend/api/v1/actuator_service.goindex 04816f7b85..c435c7c208 100644--- a/backend/api/v1/actuator_service.go+++ b/backend/api/v1/actuator_service.go@@ -58,29 +58,21 @@ func NewActuatorService(}// GetActuatorInfo gets the actuator info.-// Workspace resolution order: request.name -> JWT context -> default workspace (self-hosted).+// The workspace is resolved from the authenticated token.func (s *ActuatorService) GetActuatorInfo(ctx context.Context,- req *connect.Request[v1pb.GetActuatorInfoRequest],+ _ *connect.Request[v1pb.GetActuatorInfoRequest],) (*connect.Response[v1pb.ActuatorInfo], error) {- var workspaceID string- if req.Msg.Name != "" {- id, err := common.GetWorkspaceID(req.Msg.Name)- if err != nil {- return nil, connect.NewError(connect.CodeInvalidArgument, err)- }- workspaceID = id+ user, authenticated := GetUserFromContext(ctx)+ if !authenticated || user == nil {+ return nil, connect.NewError(connect.CodeUnauthenticated, errors.New("user not found"))}++ workspaceID := common.GetWorkspaceIDFromContext(ctx)if workspaceID == "" {- workspaceID = common.GetWorkspaceIDFromContext(ctx)- }- if workspaceID == "" && !s.profile.SaaS {- ws, err := s.store.GetWorkspaceID(ctx)- if err != nil {- return nil, connect.NewError(connect.CodeInternal, err)- }- workspaceID = ws+ return nil, connect.NewError(connect.CodeInternal, errors.New("authenticated workspace not found"))}+info, err := s.getServerInfo(ctx, workspaceID)if err != nil {return nil, err@@ -115,26 +107,13 @@ func (s *ActuatorService) SetupSample(}func (s *ActuatorService) getServerInfo(ctx context.Context, workspaceID string) (*v1pb.ActuatorInfo, error) {- restriction, err := getAccountRestriction(- ctx,- s.store,- s.licenseService,- s.profile.SaaS,- workspaceID,- )- if err != nil {- return nil, err- }-serverInfo := v1pb.ActuatorInfo{Version: s.profile.Version,GitCommit: s.profile.GitCommit,Saas: s.profile.SaaS,LastActiveTime: timestamppb.New(time.Unix(s.profile.LastActiveTS.Load(), 0)),- Docker: s.profile.IsDocker,ExternalUrlFromFlag: s.profile.ExternalURL != "",ReplicaCount: int32(s.licenseService.CountActiveReplicas(ctx)),- Restriction: restriction,ExternalUrl: s.profile.ExternalURL,}@@ -158,14 +137,6 @@ func (s *ActuatorService) getServerInfo(ctx context.Context, workspaceID string)}serverInfo.UnlicensedFeatures = unlicensedFeaturesString- if !s.profile.SaaS {- activePrincipalCount, err := s.store.CountActivePrincipals(ctx)- if err != nil {- return nil, connect.NewError(connect.CodeInternal, err)- }- serverInfo.ActivatedUserCount = int32(activePrincipalCount)- }-iamPolicy, err := s.store.GetWorkspaceIamPolicy(ctx, workspaceID)if err != nil {return nil, connect.NewError(connect.CodeInternal, err)diff --git a/backend/api/v1/actuator_service_test.go b/backend/api/v1/actuator_service_test.gonew file mode 100644index 0000000000..ed091023fa--- /dev/null+++ b/backend/api/v1/actuator_service_test.go@@ -0,0 +1,100 @@+package v1++import (+ "context"+ "fmt"+ "slices"+ "testing"++ "connectrpc.com/connect"+ "github.com/stretchr/testify/require"+ "google.golang.org/protobuf/reflect/protoreflect"++ "github.com/bytebase/bytebase/backend/common"+ "github.com/bytebase/bytebase/backend/common/testcontainer"+ "github.com/bytebase/bytebase/backend/component/config"+ "github.com/bytebase/bytebase/backend/enterprise"+ storepb "github.com/bytebase/bytebase/backend/generated-go/store"+ v1pb "github.com/bytebase/bytebase/backend/generated-go/v1"+ "github.com/bytebase/bytebase/backend/migrator"+ "github.com/bytebase/bytebase/backend/store"+)++func TestAuthenticationInfoAndActuatorBoundary(t *testing.T) {+ ctx := context.Background()+ container := testcontainer.GetTestPgContainer(ctx, t)+ t.Cleanup(func() { container.Close(ctx) })+ require.NoError(t, migrator.MigrateSchema(ctx, container.GetDB()))++ pgURL := fmt.Sprintf("host=%s port=%s user=postgres password=root-password database=postgres", container.GetHost(), container.GetPort())+ stores, err := store.New(ctx, pgURL, false)+ require.NoError(t, err)+ t.Cleanup(func() { require.NoError(t, stores.Close()) })++ licenseService, err := enterprise.NewLicenseService(common.ReleaseModeDev, stores, false, "")+ require.NoError(t, err)+ profile := &config.Profile{+ Version: "9.9.9",+ GitCommit: "sensitive-commit",+ ExternalURL: "https://bytebase.example.com",+ }+ actuatorService := NewActuatorService(stores, profile, nil, licenseService, nil)+ authService := NewAuthService(stores, "test-secret", licenseService, profile, nil)++ publicResponse, err := authService.GetAuthenticationRestriction(ctx, connect.NewRequest(&v1pb.GetAuthenticationRestrictionRequest{}))+ require.NoError(t, err)++ var populated []string+ publicResponse.Msg.ProtoReflect().Range(func(field protoreflect.FieldDescriptor, _ protoreflect.Value) bool {+ populated = append(populated, string(field.Name()))+ return true+ })+ slices.Sort(populated)+ require.Equal(t, []string{"restriction"}, populated)+ require.Empty(t, publicResponse.Msg.Workspace)++ profile.SaaS = true+ saasPublicResponse, err := authService.GetAuthenticationRestriction(ctx, connect.NewRequest(&v1pb.GetAuthenticationRestrictionRequest{}))+ require.NoError(t, err)+ require.True(t, saasPublicResponse.Msg.Restriction.DisallowSignup)+ require.True(t, saasPublicResponse.Msg.Restriction.DisallowPasswordSignin)+ profile.SaaS = false++ const workspaceID = "actuator-auth-boundary"+ _, err = stores.CreateWorkspace(ctx, &store.WorkspaceMessage{+ ResourceID: workspaceID,+ Payload: &storepb.WorkspacePayload{Title: "Actuator auth boundary"},+ }, "[email protected]")+ require.NoError(t, err)++ publicResponse, err = authService.GetAuthenticationRestriction(ctx, connect.NewRequest(&v1pb.GetAuthenticationRestrictionRequest{}))+ require.NoError(t, err)+ populated = nil+ publicResponse.Msg.ProtoReflect().Range(func(field protoreflect.FieldDescriptor, _ protoreflect.Value) bool {+ populated = append(populated, string(field.Name()))+ return true+ })+ slices.Sort(populated)+ require.Equal(t, []string{"restriction", "workspace"}, populated)+ require.Equal(t, common.FormatWorkspace(workspaceID), publicResponse.Msg.Workspace)++ _, err = actuatorService.GetActuatorInfo(ctx, connect.NewRequest(&v1pb.GetActuatorInfoRequest{}))+ require.Equal(t, connect.CodeUnauthenticated, connect.CodeOf(err))++ user, err := stores.CreateUser(ctx, &store.UserMessage{+ Email: "[email protected]",+ Name: "Admin",+ PasswordHash: "unused",+ Profile: &storepb.UserProfile{},+ })+ require.NoError(t, err)+ authenticatedCtx := context.WithValue(ctx, common.UserContextKey, user)+ authenticatedCtx = context.WithValue(authenticatedCtx, common.WorkspaceIDContextKey, workspaceID)++ privateResponse, err := actuatorService.GetActuatorInfo(authenticatedCtx, connect.NewRequest(&v1pb.GetActuatorInfoRequest{}))+ require.NoError(t, err)+ require.Equal(t, "9.9.9", privateResponse.Msg.Version)+ require.Equal(t, "sensitive-commit", privateResponse.Msg.GitCommit)+ require.Equal(t, common.FormatWorkspace(workspaceID), privateResponse.Msg.Workspace)+ require.NotEmpty(t, privateResponse.Msg.DefaultProject)+}diff --git a/backend/api/v1/auth_service.go b/backend/api/v1/auth_service.goindex 7e8f4db8b9..be63f993f6 100644--- a/backend/api/v1/auth_service.go+++ b/backend/api/v1/auth_service.go@@ -136,6 +136,41 @@ func NewAuthService(store *store.Store, secret string, licenseService *enterpris}}+// GetAuthenticationRestriction returns the public restrictions needed by authentication flows.+func (s *AuthService) GetAuthenticationRestriction(+ ctx context.Context,+ req *connect.Request[v1pb.GetAuthenticationRestrictionRequest],+) (*connect.Response[v1pb.AuthenticationInfo], error) {+ workspaceID := ""+ if req.Msg.Workspace != "" {+ id, err := common.GetWorkspaceID(req.Msg.Workspace)+ if err != nil {+ return nil, connect.NewError(connect.CodeInvalidArgument, err)+ }+ workspaceID = id+ }+ if workspaceID == "" && !s.profile.SaaS {+ id, err := s.store.GetWorkspaceID(ctx)+ if err != nil {+ return nil, connect.NewError(connect.CodeInternal, err)+ }+ workspaceID = id+ }++ restriction, err := getAccountRestriction(ctx, s.store, s.licenseService, s.profile.SaaS, workspaceID)+ if err != nil {+ return nil, err+ }++ info := &v1pb.AuthenticationInfo{+ Restriction: restriction,+ }+ if workspaceID != "" {+ info.Workspace = common.FormatWorkspace(workspaceID)+ }+ return connect.NewResponse(info), nil+}+// Login is the auth login method including SSO.func (s *AuthService) Login(ctx context.Context, req *connect.Request[v1pb.LoginRequest]) (*connect.Response[v1pb.LoginResponse], error) {request := req.Msgdiff --git a/backend/generated-go/v1/actuator_service.pb.go b/backend/generated-go/v1/actuator_service.pb.goindex 7c95fb758b..d5dcc82ce7 100644--- a/backend/generated-go/v1/actuator_service.pb.go+++ b/backend/generated-go/v1/actuator_service.pb.go@@ -63,12 +63,7 @@ func (*SetupSampleRequest) Descriptor() ([]byte, []int) {// Request message for getting actuator information.type GetActuatorInfoRequest struct {- state protoimpl.MessageState `protogen:"open.v1"`- // 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 `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`+ state protoimpl.MessageState `protogen:"open.v1"`unknownFields protoimpl.UnknownFieldssizeCache protoimpl.SizeCache}@@ -103,95 +98,6 @@ func (*GetActuatorInfoRequest) Descriptor() ([]byte, []int) {return file_v1_actuator_service_proto_rawDescGZIP(), []int{1}}-func (x *GetActuatorInfoRequest) GetName() string {- if x != nil {- return x.Name- }- return ""-}--type Restriction struct {- state protoimpl.MessageState `protogen:"open.v1"`- // Whether self-service user signup is disabled.- DisallowSignup bool `protobuf:"varint,1,opt,name=disallow_signup,json=disallowSignup,proto3" json:"disallow_signup,omitempty"`- // Whether password sign-in is disabled for all end users.- DisallowPasswordSignin bool `protobuf:"varint,2,opt,name=disallow_password_signin,json=disallowPasswordSignin,proto3" json:"disallow_password_signin,omitempty"`- // Password complexity and restriction requirements.- PasswordRestriction *WorkspaceProfileSetting_PasswordRestriction `protobuf:"bytes,3,opt,name=password_restriction,json=passwordRestriction,proto3" json:"password_restriction,omitempty"`- // Whether email + 6-digit code signin is enabled for this workspace.- AllowEmailCodeSignin bool `protobuf:"varint,4,opt,name=allow_email_code_signin,json=allowEmailCodeSignin,proto3" json:"allow_email_code_signin,omitempty"`- // Whether password reset via email is available for this workspace.- // True when the workspace (or deployment) has an email setting configured.- PasswordResetEnabled bool `protobuf:"varint,5,opt,name=password_reset_enabled,json=passwordResetEnabled,proto3" json:"password_reset_enabled,omitempty"`- unknownFields protoimpl.UnknownFields- sizeCache protoimpl.SizeCache-}--func (x *Restriction) Reset() {- *x = Restriction{}- mi := &file_v1_actuator_service_proto_msgTypes[2]- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))- ms.StoreMessageInfo(mi)-}--func (x *Restriction) String() string {- return protoimpl.X.MessageStringOf(x)-}--func (*Restriction) ProtoMessage() {}--func (x *Restriction) ProtoReflect() protoreflect.Message {- mi := &file_v1_actuator_service_proto_msgTypes[2]- if x != nil {- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))- if ms.LoadMessageInfo() == nil {- ms.StoreMessageInfo(mi)- }- return ms- }- return mi.MessageOf(x)-}--// Deprecated: Use Restriction.ProtoReflect.Descriptor instead.-func (*Restriction) Descriptor() ([]byte, []int) {- return file_v1_actuator_service_proto_rawDescGZIP(), []int{2}-}--func (x *Restriction) GetDisallowSignup() bool {- if x != nil {- return x.DisallowSignup- }- return false-}--func (x *Restriction) GetDisallowPasswordSignin() bool {- if x != nil {- return x.DisallowPasswordSignin- }- return false-}--func (x *Restriction) GetPasswordRestriction() *WorkspaceProfileSetting_PasswordRestriction {- if x != nil {- return x.PasswordRestriction- }- return nil-}--func (x *Restriction) GetAllowEmailCodeSignin() bool {- if x != nil {- return x.AllowEmailCodeSignin- }- return false-}--func (x *Restriction) GetPasswordResetEnabled() bool {- if x != nil {- return x.PasswordResetEnabled- }- return false-}-// System information and configuration for the Bytebase instance.// Actuator concept is similar to the Spring Boot Actuator.type ActuatorInfo struct {@@ -200,14 +106,8 @@ type ActuatorInfo struct {Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"`// The git commit hash of the build.GitCommit string `protobuf:"bytes,2,opt,name=git_commit,json=gitCommit,proto3" json:"git_commit,omitempty"`- // Whether the Bytebase instance is running in read-only mode.- Readonly bool `protobuf:"varint,3,opt,name=readonly,proto3" json:"readonly,omitempty"`// Whether the Bytebase instance is running in SaaS mode where some features cannot be edited by users.Saas bool `protobuf:"varint,4,opt,name=saas,proto3" json:"saas,omitempty"`- // The host address of the Bytebase instance.- Host string `protobuf:"bytes,6,opt,name=host,proto3" json:"host,omitempty"`- // The port number of the Bytebase instance.- Port string `protobuf:"bytes,7,opt,name=port,proto3" json:"port,omitempty"`// The external URL where users or webhook callbacks access Bytebase.ExternalUrl string `protobuf:"bytes,8,opt,name=external_url,json=externalUrl,proto3" json:"external_url,omitempty"`// The last time any API call was made, refreshed on each request.@@ -217,10 +117,6 @@ type ActuatorInfo struct {Workspace string `protobuf:"bytes,13,opt,name=workspace,proto3" json:"workspace,omitempty"`// List of features that are not licensed.UnlicensedFeatures []string `protobuf:"bytes,15,rep,name=unlicensed_features,json=unlicensedFeatures,proto3" json:"unlicensed_features,omitempty"`- // Whether the Bytebase instance is running in Docker.- Docker bool `protobuf:"varint,18,opt,name=docker,proto3" json:"docker,omitempty"`- // The number of activated users.- ActivatedUserCount int32 `protobuf:"varint,19,opt,name=activated_user_count,json=activatedUserCount,proto3" json:"activated_user_count,omitempty"`// The number of activated database instances.ActivatedInstanceCount int32 `protobuf:"varint,20,opt,name=activated_instance_count,json=activatedInstanceCount,proto3" json:"activated_instance_count,omitempty"`// The total number of database instances.@@ -230,8 +126,7 @@ type ActuatorInfo struct {// Whether the external URL is set via command-line flag (and thus cannot be changed via UI).ExternalUrlFromFlag bool `protobuf:"varint,23,opt,name=external_url_from_flag,json=externalUrlFromFlag,proto3" json:"external_url_from_flag,omitempty"`// The number of active replicas (servers sharing the same database).- ReplicaCount int32 `protobuf:"varint,24,opt,name=replica_count,json=replicaCount,proto3" json:"replica_count,omitempty"`- Restriction *Restriction `protobuf:"bytes,25,opt,name=restriction,proto3" json:"restriction,omitempty"`+ ReplicaCount int32 `protobuf:"varint,24,opt,name=replica_count,json=replicaCount,proto3" json:"replica_count,omitempty"`// The default project for unassigned databases.// Format: projects/{id}DefaultProject string `protobuf:"bytes,26,opt,name=default_project,json=defaultProject,proto3" json:"default_project,omitempty"`@@ -245,7 +140,7 @@ type ActuatorInfo struct {func (x *ActuatorInfo) Reset() {*x = ActuatorInfo{}- mi := &file_v1_actuator_service_proto_msgTypes[3]+ mi := &file_v1_actuator_service_proto_msgTypes[2]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -257,7 +152,7 @@ func (x *ActuatorInfo) String() string {func (*ActuatorInfo) ProtoMessage() {}func (x *ActuatorInfo) ProtoReflect() protoreflect.Message {- mi := &file_v1_actuator_service_proto_msgTypes[3]+ mi := &file_v1_actuator_service_proto_msgTypes[2]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -270,7 +165,7 @@ func (x *ActuatorInfo) ProtoReflect() protoreflect.Message {// Deprecated: Use ActuatorInfo.ProtoReflect.Descriptor instead.func (*ActuatorInfo) Descriptor() ([]byte, []int) {- return file_v1_actuator_service_proto_rawDescGZIP(), []int{3}+ return file_v1_actuator_service_proto_rawDescGZIP(), []int{2}}func (x *ActuatorInfo) GetVersion() string {@@ -287,13 +182,6 @@ func (x *ActuatorInfo) GetGitCommit() string {return ""}-func (x *ActuatorInfo) GetReadonly() bool {- if x != nil {- return x.Readonly- }- return false-}-func (x *ActuatorInfo) GetSaas() bool {if x != nil {return x.Saas@@ -301,20 +189,6 @@ func (x *ActuatorInfo) GetSaas() bool {return false}-func (x *ActuatorInfo) GetHost() string {- if x != nil {- return x.Host- }- return ""-}--func (x *ActuatorInfo) GetPort() string {- if x != nil {- return x.Port- }- return ""-}-func (x *ActuatorInfo) GetExternalUrl() string {if x != nil {return x.ExternalUrl@@ -343,20 +217,6 @@ func (x *ActuatorInfo) GetUnlicensedFeatures() []string {return nil}-func (x *ActuatorInfo) GetDocker() bool {- if x != nil {- return x.Docker- }- return false-}--func (x *ActuatorInfo) GetActivatedUserCount() int32 {- if x != nil {- return x.ActivatedUserCount- }- return 0-}-func (x *ActuatorInfo) GetActivatedInstanceCount() int32 {if x != nil {return x.ActivatedInstanceCount@@ -392,13 +252,6 @@ func (x *ActuatorInfo) GetReplicaCount() int32 {return 0}-func (x *ActuatorInfo) GetRestriction() *Restriction {- if x != nil {- return x.Restriction- }- return nil-}-func (x *ActuatorInfo) GetDefaultProject() string {if x != nil {return x.DefaultProject@@ -424,44 +277,30 @@ var File_v1_actuator_service_proto protoreflect.FileDescriptorconst file_v1_actuator_service_proto_rawDesc = "" +"\n" +- "\x19v1/actuator_service.proto\x12\vbytebase.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x13v1/annotation.proto\x1a\x18v1/setting_service.proto\"\x14\n" +- "\x12SetupSampleRequest\"I\n" +- "\x16GetActuatorInfoRequest\x12/\n" +- "\x04name\x18\x01 \x01(\tB\x1b\xfaA\x18\n" +- "\x16bytebase.com/WorkspaceR\x04name\"\xe3\x02\n" +- "\vRestriction\x12,\n" +- "\x0fdisallow_signup\x18\x01 \x01(\bB\x03\xe0A\x03R\x0edisallowSignup\x12=\n" +- "\x18disallow_password_signin\x18\x02 \x01(\bB\x03\xe0A\x03R\x16disallowPasswordSignin\x12p\n" +- "\x14password_restriction\x18\x03 \x01(\v28.bytebase.v1.WorkspaceProfileSetting.PasswordRestrictionB\x03\xe0A\x03R\x13passwordRestriction\x12:\n" +- "\x17allow_email_code_signin\x18\x04 \x01(\bB\x03\xe0A\x03R\x14allowEmailCodeSignin\x129\n" +- "\x16password_reset_enabled\x18\x05 \x01(\bB\x03\xe0A\x03R\x14passwordResetEnabled\"\xe2\a\n" ++ "\x19v1/actuator_service.proto\x12\vbytebase.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x13v1/annotation.proto\"\x14\n" ++ "\x12SetupSampleRequest\"\x18\n" ++ "\x16GetActuatorInfoRequest\"\x80\x06\n" +"\fActuatorInfo\x12\x1d\n" +"\aversion\x18\x01 \x01(\tB\x03\xe0A\x03R\aversion\x12\"\n" +"\n" +- "git_commit\x18\x02 \x01(\tB\x03\xe0A\x03R\tgitCommit\x12\x1f\n" +- "\breadonly\x18\x03 \x01(\bB\x03\xe0A\x03R\breadonly\x12\x17\n" +- "\x04saas\x18\x04 \x01(\bB\x03\xe0A\x03R\x04saas\x12\x17\n" +- "\x04host\x18\x06 \x01(\tB\x03\xe0A\x03R\x04host\x12\x17\n" +- "\x04port\x18\a \x01(\tB\x03\xe0A\x03R\x04port\x12&\n" ++ "git_commit\x18\x02 \x01(\tB\x03\xe0A\x03R\tgitCommit\x12\x17\n" ++ "\x04saas\x18\x04 \x01(\bB\x03\xe0A\x03R\x04saas\x12&\n" +"\fexternal_url\x18\b \x01(\tB\x03\xe0A\x03R\vexternalUrl\x12I\n" +"\x10last_active_time\x18\v \x01(\v2\x1a.google.protobuf.TimestampB\x03\xe0A\x03R\x0elastActiveTime\x12!\n" +"\tworkspace\x18\r \x01(\tB\x03\xe0A\x03R\tworkspace\x124\n" +- "\x13unlicensed_features\x18\x0f \x03(\tB\x03\xe0A\x03R\x12unlicensedFeatures\x12\x1b\n" +- "\x06docker\x18\x12 \x01(\bB\x03\xe0A\x03R\x06docker\x125\n" +- "\x14activated_user_count\x18\x13 \x01(\x05B\x03\xe0A\x03R\x12activatedUserCount\x12=\n" ++ "\x13unlicensed_features\x18\x0f \x03(\tB\x03\xe0A\x03R\x12unlicensedFeatures\x12=\n" +"\x18activated_instance_count\x18\x14 \x01(\x05B\x03\xe0A\x03R\x16activatedInstanceCount\x125\n" +"\x14total_instance_count\x18\x15 \x01(\x05B\x03\xe0A\x03R\x12totalInstanceCount\x12(\n" +"\renable_sample\x18\x16 \x01(\bB\x03\xe0A\x03R\fenableSample\x128\n" +"\x16external_url_from_flag\x18\x17 \x01(\bB\x03\xe0A\x03R\x13externalUrlFromFlag\x12(\n" +- "\rreplica_count\x18\x18 \x01(\x05B\x03\xe0A\x03R\freplicaCount\x12?\n" +- "\vrestriction\x18\x19 \x01(\v2\x18.bytebase.v1.RestrictionB\x03\xe0A\x03R\vrestriction\x12,\n" ++ "\rreplica_count\x18\x18 \x01(\x05B\x03\xe0A\x03R\freplicaCount\x12,\n" +"\x0fdefault_project\x18\x1a \x01(\tB\x03\xe0A\x03R\x0edefaultProject\x12.\n" +"\x11user_count_in_iam\x18\x1b \x01(\x05B\x03\xe0A\x03R\x0euserCountInIam\x126\n" +- "\x15active_vcs_user_count\x18\x1c \x01(\x05B\x03\xe0A\x03R\x12activeVcsUserCountJ\x04\b\x05\x10\x06J\x04\b\t\x10\n" ++ "\x15active_vcs_user_count\x18\x1c \x01(\x05B\x03\xe0A\x03R\x12activeVcsUserCountJ\x04\b\x03\x10\x04J\x04\b\x05\x10\bJ\x04\b\t\x10\n" +"J\x04\b\n" +- "\x10\vJ\x04\b\f\x10\rJ\x04\b\x10\x10\x11J\x04\b\x11\x10\x12J\x04\b\x0e\x10\x0f2\xb9\x02\n" +- "\x0fActuatorService\x12\x9c\x01\n" +- "\x0fGetActuatorInfo\x12#.bytebase.v1.GetActuatorInfoRequest\x1a\x19.bytebase.v1.ActuatorInfo\"I\xdaA\x00\x80\xea0\x01\x82\xd3\xe4\x93\x02<Z'\x12%/v1/{name=workspaces/*}/actuator/info\x12\x11/v1/actuator/info\x12\x86\x01\n" ++ "\x10\vJ\x04\b\f\x10\rJ\x04\b\x0e\x10\x0fJ\x04\b\x10\x10\x14J\x04\b\x19\x10\x1a2\x8b\x02\n" ++ "\x0fActuatorService\x12o\n" ++ "\x0fGetActuatorInfo\x12#.bytebase.v1.GetActuatorInfoRequest\x1a\x19.bytebase.v1.ActuatorInfo\"\x1c\xdaA\x00\x82\xd3\xe4\x93\x02\x13\x12\x11/v1/actuator/info\x12\x86\x01\n" +"\vSetupSample\x12\x1f.bytebase.v1.SetupSampleRequest\x1a\x16.google.protobuf.Empty\">\x8a\xea0\x12bb.projects.create\x90\xea0\x01\x98\xea0\x01\x82\xd3\xe4\x93\x02\x1a\"\x18/v1/actuator:setupSampleB\xaa\x01\n" +"\x0fcom.bytebase.v1B\x14ActuatorServiceProtoP\x01Z4github.com/bytebase/bytebase/backend/generated-go/v1\xa2\x02\x03BXX\xaa\x02\vBytebase.V1\xca\x02\vBytebase\\V1\xe2\x02\x17Bytebase\\V1\\GPBMetadata\xea\x02\fBytebase::V1b\x06proto3"@@ -477,29 +316,25 @@ func file_v1_actuator_service_proto_rawDescGZIP() []byte {return file_v1_actuator_service_proto_rawDescData}-var file_v1_actuator_service_proto_msgTypes = make([]protoimpl.MessageInfo, 4)+var file_v1_actuator_service_proto_msgTypes = make([]protoimpl.MessageInfo, 3)var file_v1_actuator_service_proto_goTypes = []any{- (*SetupSampleRequest)(nil), // 0: bytebase.v1.SetupSampleRequest- (*GetActuatorInfoRequest)(nil), // 1: bytebase.v1.GetActuatorInfoRequest- (*Restriction)(nil), // 2: bytebase.v1.Restriction- (*ActuatorInfo)(nil), // 3: bytebase.v1.ActuatorInfo- (*WorkspaceProfileSetting_PasswordRestriction)(nil), // 4: bytebase.v1.WorkspaceProfileSetting.PasswordRestriction- (*timestamppb.Timestamp)(nil), // 5: google.protobuf.Timestamp- (*emptypb.Empty)(nil), // 6: google.protobuf.Empty+ (*SetupSampleRequest)(nil), // 0: bytebase.v1.SetupSampleRequest+ (*GetActuatorInfoRequest)(nil), // 1: bytebase.v1.GetActuatorInfoRequest+ (*ActuatorInfo)(nil), // 2: bytebase.v1.ActuatorInfo+ (*timestamppb.Timestamp)(nil), // 3: google.protobuf.Timestamp+ (*emptypb.Empty)(nil), // 4: google.protobuf.Empty}var file_v1_actuator_service_proto_depIdxs = []int32{- 4, // 0: bytebase.v1.Restriction.password_restriction:type_name -> bytebase.v1.WorkspaceProfileSetting.PasswordRestriction- 5, // 1: bytebase.v1.ActuatorInfo.last_active_time:type_name -> google.protobuf.Timestamp- 2, // 2: bytebase.v1.ActuatorInfo.restriction:type_name -> bytebase.v1.Restriction- 1, // 3: bytebase.v1.ActuatorService.GetActuatorInfo:input_type -> bytebase.v1.GetActuatorInfoRequest- 0, // 4: bytebase.v1.ActuatorService.SetupSample:input_type -> bytebase.v1.SetupSampleRequest- 3, // 5: bytebase.v1.ActuatorService.GetActuatorInfo:output_type -> bytebase.v1.ActuatorInfo- 6, // 6: bytebase.v1.ActuatorService.SetupSample:output_type -> google.protobuf.Empty- 5, // [5:7] is the sub-list for method output_type- 3, // [3:5] is the sub-list for method input_type- 3, // [3:3] is the sub-list for extension type_name- 3, // [3:3] is the sub-list for extension extendee- 0, // [0:3] is the sub-list for field type_name+ 3, // 0: bytebase.v1.ActuatorInfo.last_active_time:type_name -> google.protobuf.Timestamp+ 1, // 1: bytebase.v1.ActuatorService.GetActuatorInfo:input_type -> bytebase.v1.GetActuatorInfoRequest+ 0, // 2: bytebase.v1.ActuatorService.SetupSample:input_type -> bytebase.v1.SetupSampleRequest+ 2, // 3: bytebase.v1.ActuatorService.GetActuatorInfo:output_type -> bytebase.v1.ActuatorInfo+ 4, // 4: bytebase.v1.ActuatorService.SetupSample:output_type -> google.protobuf.Empty+ 3, // [3:5] is the sub-list for method output_type+ 1, // [1:3] is the sub-list for method input_type+ 1, // [1:1] is the sub-list for extension type_name+ 1, // [1:1] is the sub-list for extension extendee+ 0, // [0:1] is the sub-list for field type_name}func init() { file_v1_actuator_service_proto_init() }@@ -508,14 +343,13 @@ func file_v1_actuator_service_proto_init() {return}file_v1_annotation_proto_init()- file_v1_setting_service_proto_init()type x struct{}out := protoimpl.TypeBuilder{File: protoimpl.DescBuilder{GoPackagePath: reflect.TypeOf(x{}).PkgPath(),RawDescriptor: unsafe.Slice(unsafe.StringData(file_v1_actuator_service_proto_rawDesc), len(file_v1_actuator_service_proto_rawDesc)),NumEnums: 0,- NumMessages: 4,+ NumMessages: 3,NumExtensions: 0,NumServices: 1,},diff --git a/backend/generated-go/v1/actuator_service.pb.gw.go b/backend/generated-go/v1/actuator_service.pb.gw.goindex fe7ccd6c59..1bae2ff21a 100644--- a/backend/generated-go/v1/actuator_service.pb.gw.go+++ b/backend/generated-go/v1/actuator_service.pb.gw.go@@ -35,19 +35,11 @@ var (_ = metadata.Join)-var filter_ActuatorService_GetActuatorInfo_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}-func request_ActuatorService_GetActuatorInfo_0(ctx context.Context, marshaler runtime.Marshaler, client ActuatorServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {var (protoReq GetActuatorInfoRequestmetadata runtime.ServerMetadata)- if err := req.ParseForm(); err != nil {- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)- }- if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ActuatorService_GetActuatorInfo_0); err != nil {- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)- }if req.Body != nil {_, _ = io.Copy(io.Discard, req.Body)}@@ -60,51 +52,6 @@ func local_request_ActuatorService_GetActuatorInfo_0(ctx context.Context, marshaprotoReq GetActuatorInfoRequestmetadata runtime.ServerMetadata)- if err := req.ParseForm(); err != nil {- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)- }- if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ActuatorService_GetActuatorInfo_0); err != nil {- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)- }- msg, err := server.GetActuatorInfo(ctx, &protoReq)- return msg, metadata, err-}--func request_ActuatorService_GetActuatorInfo_1(ctx context.Context, marshaler runtime.Marshaler, client ActuatorServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {- var (- protoReq GetActuatorInfoRequest- metadata runtime.ServerMetadata- err error- )- val, ok := pathParams["name"]- if !ok {- return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name")- }- protoReq.Name, err = runtime.String(val)- if err != nil {- return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err)- }- if req.Body != nil {- _, _ = io.Copy(io.Discard, req.Body)- }- msg, err := client.GetActuatorInfo(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))- return msg, metadata, err-}--func local_request_ActuatorService_GetActuatorInfo_1(ctx context.Context, marshaler runtime.Marshaler, server ActuatorServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {- var (- protoReq GetActuatorInfoRequest- metadata runtime.ServerMetadata- err error- )- val, ok := pathParams["name"]- if !ok {- return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name")- }- protoReq.Name, err = runtime.String(val)- if err != nil {- return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err)- }msg, err := server.GetActuatorInfo(ctx, &protoReq)return msg, metadata, err}@@ -156,26 +103,6 @@ func RegisterActuatorServiceHandlerServer(ctx context.Context, mux *runtime.Serv}forward_ActuatorService_GetActuatorInfo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)})- mux.Handle(http.MethodGet, pattern_ActuatorService_GetActuatorInfo_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {- ctx, cancel := context.WithCancel(req.Context())- defer cancel()- var stream runtime.ServerTransportStream- ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)- inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)- annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/bytebase.v1.ActuatorService/GetActuatorInfo", runtime.WithHTTPPathPattern("/v1/{name=workspaces/*}/actuator/info"))- if err != nil {- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)- return- }- resp, md, err := local_request_ActuatorService_GetActuatorInfo_1(annotatedContext, inboundMarshaler, server, req, pathParams)- md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())- annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)- if err != nil {- runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)- return- }- forward_ActuatorService_GetActuatorInfo_1(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)- })mux.Handle(http.MethodPost, pattern_ActuatorService_SetupSample_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {ctx, cancel := context.WithCancel(req.Context())defer cancel()@@ -253,23 +180,6 @@ func RegisterActuatorServiceHandlerClient(ctx context.Context, mux *runtime.Serv}forward_ActuatorService_GetActuatorInfo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)})- mux.Handle(http.MethodGet, pattern_ActuatorService_GetActuatorInfo_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {- ctx, cancel := context.WithCancel(req.Context())- defer cancel()- inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)- annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/bytebase.v1.ActuatorService/GetActuatorInfo", runtime.WithHTTPPathPattern("/v1/{name=workspaces/*}/actuator/info"))- if err != nil {- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)- return- }- resp, md, err := request_ActuatorService_GetActuatorInfo_1(annotatedContext, inboundMarshaler, client, req, pathParams)- annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)- if err != nil {- runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)- return- }- forward_ActuatorService_GetActuatorInfo_1(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)- })mux.Handle(http.MethodPost, pattern_ActuatorService_SetupSample_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {ctx, cancel := context.WithCancel(req.Context())defer cancel()@@ -292,12 +202,10 @@ func RegisterActuatorServiceHandlerClient(ctx context.Context, mux *runtime.Servvar (pattern_ActuatorService_GetActuatorInfo_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "actuator", "info"}, ""))- pattern_ActuatorService_GetActuatorInfo_1 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 2, 5, 2, 2, 3, 2, 4}, []string{"v1", "workspaces", "name", "actuator", "info"}, ""))pattern_ActuatorService_SetupSample_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "actuator"}, "setupSample")))var (forward_ActuatorService_GetActuatorInfo_0 = runtime.ForwardResponseMessage- forward_ActuatorService_GetActuatorInfo_1 = runtime.ForwardResponseMessageforward_ActuatorService_SetupSample_0 = runtime.ForwardResponseMessage)diff --git a/backend/generated-go/v1/actuator_service_equal.pb.go b/backend/generated-go/v1/actuator_service_equal.pb.goindex 085035cfa0..5b34ed1a4f 100644--- a/backend/generated-go/v1/actuator_service_equal.pb.go+++ b/backend/generated-go/v1/actuator_service_equal.pb.go@@ -20,34 +20,6 @@ func (x *GetActuatorInfoRequest) Equal(y *GetActuatorInfoRequest) bool {if x == nil || y == nil {return x == nil && y == nil}- if x.Name != y.Name {- return false- }- return true-}--func (x *Restriction) Equal(y *Restriction) bool {- if x == y {- return true- }- if x == nil || y == nil {- return x == nil && y == nil- }- if x.DisallowSignup != y.DisallowSignup {- return false- }- if x.DisallowPasswordSignin != y.DisallowPasswordSignin {- return false- }- if !x.PasswordRestriction.Equal(y.PasswordRestriction) {- return false- }- if x.AllowEmailCodeSignin != y.AllowEmailCodeSignin {- return false- }- if x.PasswordResetEnabled != y.PasswordResetEnabled {- return false- }return true}@@ -64,18 +36,9 @@ func (x *ActuatorInfo) Equal(y *ActuatorInfo) bool {if x.GitCommit != y.GitCommit {return false}- if x.Readonly != y.Readonly {- return false- }if x.Saas != y.Saas {return false}- if x.Host != y.Host {- return false- }- if x.Port != y.Port {- return false- }if x.ExternalUrl != y.ExternalUrl {return false}@@ -93,12 +56,6 @@ func (x *ActuatorInfo) Equal(y *ActuatorInfo) bool {return false}}- if x.Docker != y.Docker {- return false- }- if x.ActivatedUserCount != y.ActivatedUserCount {- return false- }if x.ActivatedInstanceCount != y.ActivatedInstanceCount {return false}@@ -114,9 +71,6 @@ func (x *ActuatorInfo) Equal(y *ActuatorInfo) bool {if x.ReplicaCount != y.ReplicaCount {return false}- if !x.Restriction.Equal(y.Restriction) {- return false- }if x.DefaultProject != y.DefaultProject {return false}diff --git a/backend/generated-go/v1/actuator_service_grpc.pb.go b/backend/generated-go/v1/actuator_service_grpc.pb.goindex 1cf9b7e638..6feede96ae 100644--- a/backend/generated-go/v1/actuator_service_grpc.pb.go+++ b/backend/generated-go/v1/actuator_service_grpc.pb.go@@ -31,9 +31,8 @@ const (// ActuatorService manages system health and operational information.type ActuatorServiceClient interface {// 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+ // The workspace is resolved from the authenticated session.+ // Permissions required: None (authentication required)GetActuatorInfo(ctx context.Context, in *GetActuatorInfoRequest, opts ...grpc.CallOption) (*ActuatorInfo, error)// Sets up sample data for demonstration and testing purposes.// Permissions required: bb.projects.create@@ -75,9 +74,8 @@ func (c *actuatorServiceClient) SetupSample(ctx context.Context, in *SetupSample// ActuatorService manages system health and operational information.type ActuatorServiceServer interface {// 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+ // The workspace is resolved from the authenticated session.+ // Permissions required: None (authentication required)GetActuatorInfo(context.Context, *GetActuatorInfoRequest) (*ActuatorInfo, error)// Sets up sample data for demonstration and testing purposes.// Permissions required: bb.projects.creatediff --git a/backend/generated-go/v1/auth_service.pb.go b/backend/generated-go/v1/auth_service.pb.goindex 25a98cdf0b..21de147cab 100644--- a/backend/generated-go/v1/auth_service.pb.go+++ b/backend/generated-go/v1/auth_service.pb.go@@ -23,6 +23,191 @@ const (_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20))+type GetAuthenticationRestrictionRequest struct {+ state protoimpl.MessageState `protogen:"open.v1"`+ // Optional. The workspace whose authentication policy should be returned.+ // Format: workspaces/{workspace}+ // When unset, self-hosted resolves the singleton workspace and SaaS uses+ // the deployment-level defaults.+ Workspace string `protobuf:"bytes,1,opt,name=workspace,proto3" json:"workspace,omitempty"`+ unknownFields protoimpl.UnknownFields+ sizeCache protoimpl.SizeCache+}++func (x *GetAuthenticationRestrictionRequest) Reset() {+ *x = GetAuthenticationRestrictionRequest{}+ mi := &file_v1_auth_service_proto_msgTypes[0]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+}++func (x *GetAuthenticationRestrictionRequest) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*GetAuthenticationRestrictionRequest) ProtoMessage() {}++func (x *GetAuthenticationRestrictionRequest) ProtoReflect() protoreflect.Message {+ mi := &file_v1_auth_service_proto_msgTypes[0]+ if x != nil {+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ if ms.LoadMessageInfo() == nil {+ ms.StoreMessageInfo(mi)+ }+ return ms+ }+ return mi.MessageOf(x)+}++// Deprecated: Use GetAuthenticationRestrictionRequest.ProtoReflect.Descriptor instead.+func (*GetAuthenticationRestrictionRequest) Descriptor() ([]byte, []int) {+ return file_v1_auth_service_proto_rawDescGZIP(), []int{0}+}++func (x *GetAuthenticationRestrictionRequest) GetWorkspace() string {+ if x != nil {+ return x.Workspace+ }+ return ""+}++type AuthenticationInfo struct {+ state protoimpl.MessageState `protogen:"open.v1"`+ // The workspace used for authentication, when one can be resolved.+ // Format: workspaces/{workspace}+ Workspace string `protobuf:"bytes,1,opt,name=workspace,proto3" json:"workspace,omitempty"`+ // The effective authentication restrictions.+ Restriction *Restriction `protobuf:"bytes,2,opt,name=restriction,proto3" json:"restriction,omitempty"`+ unknownFields protoimpl.UnknownFields+ sizeCache protoimpl.SizeCache+}++func (x *AuthenticationInfo) Reset() {+ *x = AuthenticationInfo{}+ mi := &file_v1_auth_service_proto_msgTypes[1]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+}++func (x *AuthenticationInfo) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*AuthenticationInfo) ProtoMessage() {}++func (x *AuthenticationInfo) ProtoReflect() protoreflect.Message {+ mi := &file_v1_auth_service_proto_msgTypes[1]+ if x != nil {+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ if ms.LoadMessageInfo() == nil {+ ms.StoreMessageInfo(mi)+ }+ return ms+ }+ return mi.MessageOf(x)+}++// Deprecated: Use AuthenticationInfo.ProtoReflect.Descriptor instead.+func (*AuthenticationInfo) Descriptor() ([]byte, []int) {+ return file_v1_auth_service_proto_rawDescGZIP(), []int{1}+}++func (x *AuthenticationInfo) GetWorkspace() string {+ if x != nil {+ return x.Workspace+ }+ return ""+}++func (x *AuthenticationInfo) GetRestriction() *Restriction {+ if x != nil {+ return x.Restriction+ }+ return nil+}++type Restriction struct {+ state protoimpl.MessageState `protogen:"open.v1"`+ // Whether self-service user signup is disabled.+ DisallowSignup bool `protobuf:"varint,1,opt,name=disallow_signup,json=disallowSignup,proto3" json:"disallow_signup,omitempty"`+ // Whether password sign-in is disabled for all end users.+ DisallowPasswordSignin bool `protobuf:"varint,2,opt,name=disallow_password_signin,json=disallowPasswordSignin,proto3" json:"disallow_password_signin,omitempty"`+ // Password complexity and restriction requirements.+ PasswordRestriction *WorkspaceProfileSetting_PasswordRestriction `protobuf:"bytes,3,opt,name=password_restriction,json=passwordRestriction,proto3" json:"password_restriction,omitempty"`+ // Whether email + 6-digit code signin is enabled for this workspace.+ AllowEmailCodeSignin bool `protobuf:"varint,4,opt,name=allow_email_code_signin,json=allowEmailCodeSignin,proto3" json:"allow_email_code_signin,omitempty"`+ // Whether password reset via email is available for this workspace.+ // True when the workspace (or deployment) has an email setting configured.+ PasswordResetEnabled bool `protobuf:"varint,5,opt,name=password_reset_enabled,json=passwordResetEnabled,proto3" json:"password_reset_enabled,omitempty"`+ unknownFields protoimpl.UnknownFields+ sizeCache protoimpl.SizeCache+}++func (x *Restriction) Reset() {+ *x = Restriction{}+ mi := &file_v1_auth_service_proto_msgTypes[2]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+}++func (x *Restriction) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*Restriction) ProtoMessage() {}++func (x *Restriction) ProtoReflect() protoreflect.Message {+ mi := &file_v1_auth_service_proto_msgTypes[2]+ if x != nil {+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ if ms.LoadMessageInfo() == nil {+ ms.StoreMessageInfo(mi)+ }+ return ms+ }+ return mi.MessageOf(x)+}++// Deprecated: Use Restriction.ProtoReflect.Descriptor instead.+func (*Restriction) Descriptor() ([]byte, []int) {+ return file_v1_auth_service_proto_rawDescGZIP(), []int{2}+}++func (x *Restriction) GetDisallowSignup() bool {+ if x != nil {+ return x.DisallowSignup+ }+ return false+}++func (x *Restriction) GetDisallowPasswordSignin() bool {+ if x != nil {+ return x.DisallowPasswordSignin+ }+ return false+}++func (x *Restriction) GetPasswordRestriction() *WorkspaceProfileSetting_PasswordRestriction {+ if x != nil {+ return x.PasswordRestriction+ }+ return nil+}++func (x *Restriction) GetAllowEmailCodeSignin() bool {+ if x != nil {+ return x.AllowEmailCodeSignin+ }+ return false+}++func (x *Restriction) GetPasswordResetEnabled() bool {+ if x != nil {+ return x.PasswordResetEnabled+ }+ return false+}+type LoginRequest struct {state protoimpl.MessageState `protogen:"open.v1"`// User's email address.@@ -58,7 +243,7 @@ type LoginRequest struct {func (x *LoginRequest) Reset() {*x = LoginRequest{}- mi := &file_v1_auth_service_proto_msgTypes[0]+ mi := &file_v1_auth_service_proto_msgTypes[3]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -70,7 +255,7 @@ func (x *LoginRequest) String() string {func (*LoginRequest) ProtoMessage() {}func (x *LoginRequest) ProtoReflect() protoreflect.Message {- mi := &file_v1_auth_service_proto_msgTypes[0]+ mi := &file_v1_auth_service_proto_msgTypes[3]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -83,7 +268,7 @@ func (x *LoginRequest) ProtoReflect() protoreflect.Message {// Deprecated: Use LoginRequest.ProtoReflect.Descriptor instead.func (*LoginRequest) Descriptor() ([]byte, []int) {- return file_v1_auth_service_proto_rawDescGZIP(), []int{0}+ return file_v1_auth_service_proto_rawDescGZIP(), []int{3}}func (x *LoginRequest) GetEmail() string {@@ -170,7 +355,7 @@ type IdentityProviderContext struct {func (x *IdentityProviderContext) Reset() {*x = IdentityProviderContext{}- mi := &file_v1_auth_service_proto_msgTypes[1]+ mi := &file_v1_auth_service_proto_msgTypes[4]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -182,7 +367,7 @@ func (x *IdentityProviderContext) String() string {func (*IdentityProviderContext) ProtoMessage() {}func (x *IdentityProviderContext) ProtoReflect() protoreflect.Message {- mi := &file_v1_auth_service_proto_msgTypes[1]+ mi := &file_v1_auth_service_proto_msgTypes[4]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -195,7 +380,7 @@ func (x *IdentityProviderContext) ProtoReflect() protoreflect.Message {// Deprecated: Use IdentityProviderContext.ProtoReflect.Descriptor instead.func (*IdentityProviderContext) Descriptor() ([]byte, []int) {- return file_v1_auth_service_proto_rawDescGZIP(), []int{1}+ return file_v1_auth_service_proto_rawDescGZIP(), []int{4}}func (x *IdentityProviderContext) GetContext() isIdentityProviderContext_Context {@@ -252,7 +437,7 @@ type OAuth2IdentityProviderContext struct {func (x *OAuth2IdentityProviderContext) Reset() {*x = OAuth2IdentityProviderContext{}- mi := &file_v1_auth_service_proto_msgTypes[2]+ mi := &file_v1_auth_service_proto_msgTypes[5]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -264,7 +449,7 @@ func (x *OAuth2IdentityProviderContext) String() string {func (*OAuth2IdentityProviderContext) ProtoMessage() {}func (x *OAuth2IdentityProviderContext) ProtoReflect() protoreflect.Message {- mi := &file_v1_auth_service_proto_msgTypes[2]+ mi := &file_v1_auth_service_proto_msgTypes[5]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -277,7 +462,7 @@ func (x *OAuth2IdentityProviderContext) ProtoReflect() protoreflect.Message {// Deprecated: Use OAuth2IdentityProviderContext.ProtoReflect.Descriptor instead.func (*OAuth2IdentityProviderContext) Descriptor() ([]byte, []int) {- return file_v1_auth_service_proto_rawDescGZIP(), []int{2}+ return file_v1_auth_service_proto_rawDescGZIP(), []int{5}}func (x *OAuth2IdentityProviderContext) GetCode() string {@@ -298,7 +483,7 @@ type OIDCIdentityProviderContext struct {func (x *OIDCIdentityProviderContext) Reset() {*x = OIDCIdentityProviderContext{}- mi := &file_v1_auth_service_proto_msgTypes[3]+ mi := &file_v1_auth_service_proto_msgTypes[6]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -310,7 +495,7 @@ func (x *OIDCIdentityProviderContext) String() string {func (*OIDCIdentityProviderContext) ProtoMessage() {}func (x *OIDCIdentityProviderContext) ProtoReflect() protoreflect.Message {- mi := &file_v1_auth_service_proto_msgTypes[3]+ mi := &file_v1_auth_service_proto_msgTypes[6]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -323,7 +508,7 @@ func (x *OIDCIdentityProviderContext) ProtoReflect() protoreflect.Message {// Deprecated: Use OIDCIdentityProviderContext.ProtoReflect.Descriptor instead.func (*OIDCIdentityProviderContext) Descriptor() ([]byte, []int) {- return file_v1_auth_service_proto_rawDescGZIP(), []int{3}+ return file_v1_auth_service_proto_rawDescGZIP(), []int{6}}func (x *OIDCIdentityProviderContext) GetCode() string {@@ -350,7 +535,7 @@ type LoginResponse struct {func (x *LoginResponse) Reset() {*x = LoginResponse{}- mi := &file_v1_auth_service_proto_msgTypes[4]+ mi := &file_v1_auth_service_proto_msgTypes[7]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -362,7 +547,7 @@ func (x *LoginResponse) String() string {func (*LoginResponse) ProtoMessage() {}func (x *LoginResponse) ProtoReflect() protoreflect.Message {- mi := &file_v1_auth_service_proto_msgTypes[4]+ mi := &file_v1_auth_service_proto_msgTypes[7]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -375,7 +560,7 @@ func (x *LoginResponse) ProtoReflect() protoreflect.Message {// Deprecated: Use LoginResponse.ProtoReflect.Descriptor instead.func (*LoginResponse) Descriptor() ([]byte, []int) {- return file_v1_auth_service_proto_rawDescGZIP(), []int{4}+ return file_v1_auth_service_proto_rawDescGZIP(), []int{7}}func (x *LoginResponse) GetToken() string {@@ -415,7 +600,7 @@ type LogoutRequest struct {func (x *LogoutRequest) Reset() {*x = LogoutRequest{}- mi := &file_v1_auth_service_proto_msgTypes[5]+ mi := &file_v1_auth_service_proto_msgTypes[8]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -427,7 +612,7 @@ func (x *LogoutRequest) String() string {func (*LogoutRequest) ProtoMessage() {}func (x *LogoutRequest) ProtoReflect() protoreflect.Message {- mi := &file_v1_auth_service_proto_msgTypes[5]+ mi := &file_v1_auth_service_proto_msgTypes[8]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -440,7 +625,7 @@ func (x *LogoutRequest) ProtoReflect() protoreflect.Message {// Deprecated: Use LogoutRequest.ProtoReflect.Descriptor instead.func (*LogoutRequest) Descriptor() ([]byte, []int) {- return file_v1_auth_service_proto_rawDescGZIP(), []int{5}+ return file_v1_auth_service_proto_rawDescGZIP(), []int{8}}type ExchangeTokenRequest struct {@@ -456,7 +641,7 @@ type ExchangeTokenRequest struct {func (x *ExchangeTokenRequest) Reset() {*x = ExchangeTokenRequest{}- mi := &file_v1_auth_service_proto_msgTypes[6]+ mi := &file_v1_auth_service_proto_msgTypes[9]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -468,7 +653,7 @@ func (x *ExchangeTokenRequest) String() string {func (*ExchangeTokenRequest) ProtoMessage() {}func (x *ExchangeTokenRequest) ProtoReflect() protoreflect.Message {- mi := &file_v1_auth_service_proto_msgTypes[6]+ mi := &file_v1_auth_service_proto_msgTypes[9]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -481,7 +666,7 @@ func (x *ExchangeTokenRequest) ProtoReflect() protoreflect.Message {// Deprecated: Use ExchangeTokenRequest.ProtoReflect.Descriptor instead.func (*ExchangeTokenRequest) Descriptor() ([]byte, []int) {- return file_v1_auth_service_proto_rawDescGZIP(), []int{6}+ return file_v1_auth_service_proto_rawDescGZIP(), []int{9}}func (x *ExchangeTokenRequest) GetToken() string {@@ -508,7 +693,7 @@ type ExchangeTokenResponse struct {func (x *ExchangeTokenResponse) Reset() {*x = ExchangeTokenResponse{}- mi := &file_v1_auth_service_proto_msgTypes[7]+ mi := &file_v1_auth_service_proto_msgTypes[10]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -520,7 +705,7 @@ func (x *ExchangeTokenResponse) String() string {func (*ExchangeTokenResponse) ProtoMessage() {}func (x *ExchangeTokenResponse) ProtoReflect() protoreflect.Message {- mi := &file_v1_auth_service_proto_msgTypes[7]+ mi := &file_v1_auth_service_proto_msgTypes[10]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -533,7 +718,7 @@ func (x *ExchangeTokenResponse) ProtoReflect() protoreflect.Message {// Deprecated: Use ExchangeTokenResponse.ProtoReflect.Descriptor instead.func (*ExchangeTokenResponse) Descriptor() ([]byte, []int) {- return file_v1_auth_service_proto_rawDescGZIP(), []int{7}+ return file_v1_auth_service_proto_rawDescGZIP(), []int{10}}func (x *ExchangeTokenResponse) GetAccessToken() string {@@ -557,7 +742,7 @@ type SignupRequest struct {func (x *SignupRequest) Reset() {*x = SignupRequest{}- mi := &file_v1_auth_service_proto_msgTypes[8]+ mi := &file_v1_auth_service_proto_msgTypes[11]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -569,7 +754,7 @@ func (x *SignupRequest) String() string {func (*SignupRequest) ProtoMessage() {}func (x *SignupRequest) ProtoReflect() protoreflect.Message {- mi := &file_v1_auth_service_proto_msgTypes[8]+ mi := &file_v1_auth_service_proto_msgTypes[11]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -582,7 +767,7 @@ func (x *SignupRequest) ProtoReflect() protoreflect.Message {// Deprecated: Use SignupRequest.ProtoReflect.Descriptor instead.func (*SignupRequest) Descriptor() ([]byte, []int) {- return file_v1_auth_service_proto_rawDescGZIP(), []int{8}+ return file_v1_auth_service_proto_rawDescGZIP(), []int{11}}func (x *SignupRequest) GetEmail() string {@@ -615,7 +800,7 @@ type RefreshRequest struct {func (x *RefreshRequest) Reset() {*x = RefreshRequest{}- mi := &file_v1_auth_service_proto_msgTypes[9]+ mi := &file_v1_auth_service_proto_msgTypes[12]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -627,7 +812,7 @@ func (x *RefreshRequest) String() string {func (*RefreshRequest) ProtoMessage() {}func (x *RefreshRequest) ProtoReflect() protoreflect.Message {- mi := &file_v1_auth_service_proto_msgTypes[9]+ mi := &file_v1_auth_service_proto_msgTypes[12]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -640,7 +825,7 @@ func (x *RefreshRequest) ProtoReflect() protoreflect.Message {// Deprecated: Use RefreshRequest.ProtoReflect.Descriptor instead.func (*RefreshRequest) Descriptor() ([]byte, []int) {- return file_v1_auth_service_proto_rawDescGZIP(), []int{9}+ return file_v1_auth_service_proto_rawDescGZIP(), []int{12}}// Response from refreshing the access token.@@ -652,7 +837,7 @@ type RefreshResponse struct {func (x *RefreshResponse) Reset() {*x = RefreshResponse{}- mi := &file_v1_auth_service_proto_msgTypes[10]+ mi := &file_v1_auth_service_proto_msgTypes[13]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -664,7 +849,7 @@ func (x *RefreshResponse) String() string {func (*RefreshResponse) ProtoMessage() {}func (x *RefreshResponse) ProtoReflect() protoreflect.Message {- mi := &file_v1_auth_service_proto_msgTypes[10]+ mi := &file_v1_auth_service_proto_msgTypes[13]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -677,7 +862,7 @@ func (x *RefreshResponse) ProtoReflect() protoreflect.Message {// Deprecated: Use RefreshResponse.ProtoReflect.Descriptor instead.func (*RefreshResponse) Descriptor() ([]byte, []int) {- return file_v1_auth_service_proto_rawDescGZIP(), []int{10}+ return file_v1_auth_service_proto_rawDescGZIP(), []int{13}}type RequestPasswordResetRequest struct {@@ -695,7 +880,7 @@ type RequestPasswordResetRequest struct {func (x *RequestPasswordResetRequest) Reset() {*x = RequestPasswordResetRequest{}- mi := &file_v1_auth_service_proto_msgTypes[11]+ mi := &file_v1_auth_service_proto_msgTypes[14]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -707,7 +892,7 @@ func (x *RequestPasswordResetRequest) String() string {func (*RequestPasswordResetRequest) ProtoMessage() {}func (x *RequestPasswordResetRequest) ProtoReflect() protoreflect.Message {- mi := &file_v1_auth_service_proto_msgTypes[11]+ mi := &file_v1_auth_service_proto_msgTypes[14]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -720,7 +905,7 @@ func (x *RequestPasswordResetRequest) ProtoReflect() protoreflect.Message {// Deprecated: Use RequestPasswordResetRequest.ProtoReflect.Descriptor instead.func (*RequestPasswordResetRequest) Descriptor() ([]byte, []int) {- return file_v1_auth_service_proto_rawDescGZIP(), []int{11}+ return file_v1_auth_service_proto_rawDescGZIP(), []int{14}}func (x *RequestPasswordResetRequest) GetEmail() string {@@ -751,7 +936,7 @@ type ResetPasswordRequest struct {func (x *ResetPasswordRequest) Reset() {*x = ResetPasswordRequest{}- mi := &file_v1_auth_service_proto_msgTypes[12]+ mi := &file_v1_auth_service_proto_msgTypes[15]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -763,7 +948,7 @@ func (x *ResetPasswordRequest) String() string {func (*ResetPasswordRequest) ProtoMessage() {}func (x *ResetPasswordRequest) ProtoReflect() protoreflect.Message {- mi := &file_v1_auth_service_proto_msgTypes[12]+ mi := &file_v1_auth_service_proto_msgTypes[15]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -776,7 +961,7 @@ func (x *ResetPasswordRequest) ProtoReflect() protoreflect.Message {// Deprecated: Use ResetPasswordRequest.ProtoReflect.Descriptor instead.func (*ResetPasswordRequest) Descriptor() ([]byte, []int) {- return file_v1_auth_service_proto_rawDescGZIP(), []int{12}+ return file_v1_auth_service_proto_rawDescGZIP(), []int{15}}func (x *ResetPasswordRequest) GetEmail() string {@@ -815,7 +1000,7 @@ type SendEmailLoginCodeRequest struct {func (x *SendEmailLoginCodeRequest) Reset() {*x = SendEmailLoginCodeRequest{}- mi := &file_v1_auth_service_proto_msgTypes[13]+ mi := &file_v1_auth_service_proto_msgTypes[16]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -827,7 +1012,7 @@ func (x *SendEmailLoginCodeRequest) String() string {func (*SendEmailLoginCodeRequest) ProtoMessage() {}func (x *SendEmailLoginCodeRequest) ProtoReflect() protoreflect.Message {- mi := &file_v1_auth_service_proto_msgTypes[13]+ mi := &file_v1_auth_service_proto_msgTypes[16]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -840,7 +1025,7 @@ func (x *SendEmailLoginCodeRequest) ProtoReflect() protoreflect.Message {// Deprecated: Use SendEmailLoginCodeRequest.ProtoReflect.Descriptor instead.func (*SendEmailLoginCodeRequest) Descriptor() ([]byte, []int) {- return file_v1_auth_service_proto_rawDescGZIP(), []int{13}+ return file_v1_auth_service_proto_rawDescGZIP(), []int{16}}func (x *SendEmailLoginCodeRequest) GetEmail() string {@@ -876,7 +1061,7 @@ type SwitchWorkspaceRequest struct {func (x *SwitchWorkspaceRequest) Reset() {*x = SwitchWorkspaceRequest{}- mi := &file_v1_auth_service_proto_msgTypes[14]+ mi := &file_v1_auth_service_proto_msgTypes[17]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -888,7 +1073,7 @@ func (x *SwitchWorkspaceRequest) String() string {func (*SwitchWorkspaceRequest) ProtoMessage() {}func (x *SwitchWorkspaceRequest) ProtoReflect() protoreflect.Message {- mi := &file_v1_auth_service_proto_msgTypes[14]+ mi := &file_v1_auth_service_proto_msgTypes[17]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -901,7 +1086,7 @@ func (x *SwitchWorkspaceRequest) ProtoReflect() protoreflect.Message {// Deprecated: Use SwitchWorkspaceRequest.ProtoReflect.Descriptor instead.func (*SwitchWorkspaceRequest) Descriptor() ([]byte, []int) {- return file_v1_auth_service_proto_rawDescGZIP(), []int{14}+ return file_v1_auth_service_proto_rawDescGZIP(), []int{17}}func (x *SwitchWorkspaceRequest) GetWorkspace() string {@@ -943,7 +1128,19 @@ var File_v1_auth_service_proto protoreflect.FileDescriptorconst file_v1_auth_service_proto_rawDesc = "" +"\n" +- "\x15v1/auth_service.proto\x12\vbytebase.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x13v1/annotation.proto\x1a\x15v1/user_service.proto\"\xbf\x03\n" ++ "\x15v1/auth_service.proto\x12\vbytebase.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x13v1/annotation.proto\x1a\x18v1/setting_service.proto\x1a\x15v1/user_service.proto\"`\n" ++ "#GetAuthenticationRestrictionRequest\x129\n" ++ "\tworkspace\x18\x01 \x01(\tB\x1b\xfaA\x18\n" ++ "\x16bytebase.com/WorkspaceR\tworkspace\"x\n" ++ "\x12AuthenticationInfo\x12!\n" ++ "\tworkspace\x18\x01 \x01(\tB\x03\xe0A\x03R\tworkspace\x12?\n" ++ "\vrestriction\x18\x02 \x01(\v2\x18.bytebase.v1.RestrictionB\x03\xe0A\x03R\vrestriction\"\xe3\x02\n" ++ "\vRestriction\x12,\n" ++ "\x0fdisallow_signup\x18\x01 \x01(\bB\x03\xe0A\x03R\x0edisallowSignup\x12=\n" ++ "\x18disallow_password_signin\x18\x02 \x01(\bB\x03\xe0A\x03R\x16disallowPasswordSignin\x12p\n" ++ "\x14password_restriction\x18\x03 \x01(\v28.bytebase.v1.WorkspaceProfileSetting.PasswordRestrictionB\x03\xe0A\x03R\x13passwordRestriction\x12:\n" ++ "\x17allow_email_code_signin\x18\x04 \x01(\bB\x03\xe0A\x03R\x14allowEmailCodeSignin\x129\n" ++ "\x16password_reset_enabled\x18\x05 \x01(\bB\x03\xe0A\x03R\x14passwordResetEnabled\"\xbf\x03\n" +"\fLoginRequest\x12\x14\n" +"\x05email\x18\x01 \x01(\tR\x05email\x12\x1a\n" +"\bpassword\x18\x02 \x01(\tR\bpassword\x12\x10\n" +@@ -1012,8 +1209,10 @@ const file_v1_auth_service_proto_rawDesc = "" +"\x0emfa_temp_token\x18\x05 \x01(\tH\x02R\fmfaTempToken\x88\x01\x01B\v\n" +"\t_otp_codeB\x10\n" +"\x0e_recovery_codeB\x11\n" +- "\x0f_mfa_temp_token2\xf4\b\n" +- "\vAuthService\x12i\n" ++ "\x0f_mfa_temp_token2\xbe\n" ++ "\n" ++ "\vAuthService\x12\xc7\x01\n" ++ "\x1cGetAuthenticationRestriction\x120.bytebase.v1.GetAuthenticationRestrictionRequest\x1a\x1f.bytebase.v1.AuthenticationInfo\"T\xdaA\x00\x80\xea0\x01\x82\xd3\xe4\x93\x02GZ/\x12-/v1/{workspace=workspaces/*}/auth/restriction\x12\x14/v1/auth/restriction\x12i\n" +"\x05Login\x12\x19.bytebase.v1.LoginRequest\x1a\x1a.bytebase.v1.LoginResponse\")\x80\xea0\x01\x98\xea0\x01\xa0\xea0\x03\xa8\xea0\x01\x82\xd3\xe4\x93\x02\x13:\x01*\"\x0e/v1/auth/login\x12h\n" +"\x06Logout\x12\x1a.bytebase.v1.LogoutRequest\x1a\x16.google.protobuf.Empty\"*\x80\xea0\x01\x98\xea0\x01\xa0\xea0\x03\xa8\xea0\x04\x82\xd3\xe4\x93\x02\x14:\x01*\"\x0f/v1/auth/logout\x12\x89\x01\n" +"\rExchangeToken\x12!.bytebase.v1.ExchangeTokenRequest\x1a\".bytebase.v1.ExchangeTokenResponse\"1\x80\xea0\x01\x98\xea0\x01\xa0\xea0\x03\xa8\xea0\x01\x82\xd3\xe4\x93\x02\x1b:\x01*\"\x16/v1/auth:exchangeToken\x12l\n" +@@ -1037,54 +1236,62 @@ func file_v1_auth_service_proto_rawDescGZIP() []byte {return file_v1_auth_service_proto_rawDescData}-var file_v1_auth_service_proto_msgTypes = make([]protoimpl.MessageInfo, 15)+var file_v1_auth_service_proto_msgTypes = make([]protoimpl.MessageInfo, 18)var file_v1_auth_service_proto_goTypes = []any{- (*LoginRequest)(nil), // 0: bytebase.v1.LoginRequest- (*IdentityProviderContext)(nil), // 1: bytebase.v1.IdentityProviderContext- (*OAuth2IdentityProviderContext)(nil), // 2: bytebase.v1.OAuth2IdentityProviderContext- (*OIDCIdentityProviderContext)(nil), // 3: bytebase.v1.OIDCIdentityProviderContext- (*LoginResponse)(nil), // 4: bytebase.v1.LoginResponse- (*LogoutRequest)(nil), // 5: bytebase.v1.LogoutRequest- (*ExchangeTokenRequest)(nil), // 6: bytebase.v1.ExchangeTokenRequest- (*ExchangeTokenResponse)(nil), // 7: bytebase.v1.ExchangeTokenResponse- (*SignupRequest)(nil), // 8: bytebase.v1.SignupRequest- (*RefreshRequest)(nil), // 9: bytebase.v1.RefreshRequest- (*RefreshResponse)(nil), // 10: bytebase.v1.RefreshResponse- (*RequestPasswordResetRequest)(nil), // 11: bytebase.v1.RequestPasswordResetRequest- (*ResetPasswordRequest)(nil), // 12: bytebase.v1.ResetPasswordRequest- (*SendEmailLoginCodeRequest)(nil), // 13: bytebase.v1.SendEmailLoginCodeRequest- (*SwitchWorkspaceRequest)(nil), // 14: bytebase.v1.SwitchWorkspaceRequest- (*User)(nil), // 15: bytebase.v1.User- (*emptypb.Empty)(nil), // 16: google.protobuf.Empty+ (*GetAuthenticationRestrictionRequest)(nil), // 0: bytebase.v1.GetAuthenticationRestrictionRequest+ (*AuthenticationInfo)(nil), // 1: bytebase.v1.AuthenticationInfo+ (*Restriction)(nil), // 2: bytebase.v1.Restriction+ (*LoginRequest)(nil), // 3: bytebase.v1.LoginRequest+ (*IdentityProviderContext)(nil), // 4: bytebase.v1.IdentityProviderContext+ (*OAuth2IdentityProviderContext)(nil), // 5: bytebase.v1.OAuth2IdentityProviderContext+ (*OIDCIdentityProviderContext)(nil), // 6: bytebase.v1.OIDCIdentityProviderContext+ (*LoginResponse)(nil), // 7: bytebase.v1.LoginResponse+ (*LogoutRequest)(nil), // 8: bytebase.v1.LogoutRequest+ (*ExchangeTokenRequest)(nil), // 9: bytebase.v1.ExchangeTokenRequest+ (*ExchangeTokenResponse)(nil), // 10: bytebase.v1.ExchangeTokenResponse+ (*SignupRequest)(nil), // 11: bytebase.v1.SignupRequest+ (*RefreshRequest)(nil), // 12: bytebase.v1.RefreshRequest+ (*RefreshResponse)(nil), // 13: bytebase.v1.RefreshResponse+ (*RequestPasswordResetRequest)(nil), // 14: bytebase.v1.RequestPasswordResetRequest+ (*ResetPasswordRequest)(nil), // 15: bytebase.v1.ResetPasswordRequest+ (*SendEmailLoginCodeRequest)(nil), // 16: bytebase.v1.SendEmailLoginCodeRequest+ (*SwitchWorkspaceRequest)(nil), // 17: bytebase.v1.SwitchWorkspaceRequest+ (*WorkspaceProfileSetting_PasswordRestriction)(nil), // 18: bytebase.v1.WorkspaceProfileSetting.PasswordRestriction+ (*User)(nil), // 19: bytebase.v1.User+ (*emptypb.Empty)(nil), // 20: google.protobuf.Empty}var file_v1_auth_service_proto_depIdxs = []int32{- 1, // 0: bytebase.v1.LoginRequest.idp_context:type_name -> bytebase.v1.IdentityProviderContext- 2, // 1: bytebase.v1.IdentityProviderContext.oauth2_context:type_name -> bytebase.v1.OAuth2IdentityProviderContext- 3, // 2: bytebase.v1.IdentityProviderContext.oidc_context:type_name -> bytebase.v1.OIDCIdentityProviderContext- 15, // 3: bytebase.v1.LoginResponse.user:type_name -> bytebase.v1.User- 0, // 4: bytebase.v1.AuthService.Login:input_type -> bytebase.v1.LoginRequest- 5, // 5: bytebase.v1.AuthService.Logout:input_type -> bytebase.v1.LogoutRequest- 6, // 6: bytebase.v1.AuthService.ExchangeToken:input_type -> bytebase.v1.ExchangeTokenRequest- 8, // 7: bytebase.v1.AuthService.Signup:input_type -> bytebase.v1.SignupRequest- 9, // 8: bytebase.v1.AuthService.Refresh:input_type -> bytebase.v1.RefreshRequest- 14, // 9: bytebase.v1.AuthService.SwitchWorkspace:input_type -> bytebase.v1.SwitchWorkspaceRequest- 11, // 10: bytebase.v1.AuthService.RequestPasswordReset:input_type -> bytebase.v1.RequestPasswordResetRequest- 12, // 11: bytebase.v1.AuthService.ResetPassword:input_type -> bytebase.v1.ResetPasswordRequest- 13, // 12: bytebase.v1.AuthService.SendEmailLoginCode:input_type -> bytebase.v1.SendEmailLoginCodeRequest- 4, // 13: bytebase.v1.AuthService.Login:output_type -> bytebase.v1.LoginResponse- 16, // 14: bytebase.v1.AuthService.Logout:output_type -> google.protobuf.Empty- 7, // 15: bytebase.v1.AuthService.ExchangeToken:output_type -> bytebase.v1.ExchangeTokenResponse- 4, // 16: bytebase.v1.AuthService.Signup:output_type -> bytebase.v1.LoginResponse- 10, // 17: bytebase.v1.AuthService.Refresh:output_type -> bytebase.v1.RefreshResponse- 4, // 18: bytebase.v1.AuthService.SwitchWorkspace:output_type -> bytebase.v1.LoginResponse- 16, // 19: bytebase.v1.AuthService.RequestPasswordReset:output_type -> google.protobuf.Empty- 16, // 20: bytebase.v1.AuthService.ResetPassword:output_type -> google.protobuf.Empty- 16, // 21: bytebase.v1.AuthService.SendEmailLoginCode:output_type -> google.protobuf.Empty- 13, // [13:22] is the sub-list for method output_type- 4, // [4:13] is the sub-list for method input_type- 4, // [4:4] is the sub-list for extension type_name- 4, // [4:4] is the sub-list for extension extendee- 0, // [0:4] is the sub-list for field type_name+ 2, // 0: bytebase.v1.AuthenticationInfo.restriction:type_name -> bytebase.v1.Restriction+ 18, // 1: bytebase.v1.Restriction.password_restriction:type_name -> bytebase.v1.WorkspaceProfileSetting.PasswordRestriction+ 4, // 2: bytebase.v1.LoginRequest.idp_context:type_name -> bytebase.v1.IdentityProviderContext+ 5, // 3: bytebase.v1.IdentityProviderContext.oauth2_context:type_name -> bytebase.v1.OAuth2IdentityProviderContext+ 6, // 4: bytebase.v1.IdentityProviderContext.oidc_context:type_name -> bytebase.v1.OIDCIdentityProviderContext+ 19, // 5: bytebase.v1.LoginResponse.user:type_name -> bytebase.v1.User+ 0, // 6: bytebase.v1.AuthService.GetAuthenticationRestriction:input_type -> bytebase.v1.GetAuthenticationRestrictionRequest+ 3, // 7: bytebase.v1.AuthService.Login:input_type -> bytebase.v1.LoginRequest+ 8, // 8: bytebase.v1.AuthService.Logout:input_type -> bytebase.v1.LogoutRequest+ 9, // 9: bytebase.v1.AuthService.ExchangeToken:input_type -> bytebase.v1.ExchangeTokenRequest+ 11, // 10: bytebase.v1.AuthService.Signup:input_type -> bytebase.v1.SignupRequest+ 12, // 11: bytebase.v1.AuthService.Refresh:input_type -> bytebase.v1.RefreshRequest+ 17, // 12: bytebase.v1.AuthService.SwitchWorkspace:input_type -> bytebase.v1.SwitchWorkspaceRequest+ 14, // 13: bytebase.v1.AuthService.RequestPasswordReset:input_type -> bytebase.v1.RequestPasswordResetRequest+ 15, // 14: bytebase.v1.AuthService.ResetPassword:input_type -> bytebase.v1.ResetPasswordRequest+ 16, // 15: bytebase.v1.AuthService.SendEmailLoginCode:input_type -> bytebase.v1.SendEmailLoginCodeRequest+ 1, // 16: bytebase.v1.AuthService.GetAuthenticationRestriction:output_type -> bytebase.v1.AuthenticationInfo+ 7, // 17: bytebase.v1.AuthService.Login:output_type -> bytebase.v1.LoginResponse+ 20, // 18: bytebase.v1.AuthService.Logout:output_type -> google.protobuf.Empty+ 10, // 19: bytebase.v1.AuthService.ExchangeToken:output_type -> bytebase.v1.ExchangeTokenResponse+ 7, // 20: bytebase.v1.AuthService.Signup:output_type -> bytebase.v1.LoginResponse+ 13, // 21: bytebase.v1.AuthService.Refresh:output_type -> bytebase.v1.RefreshResponse+ 7, // 22: bytebase.v1.AuthService.SwitchWorkspace:output_type -> bytebase.v1.LoginResponse+ 20, // 23: bytebase.v1.AuthService.RequestPasswordReset:output_type -> google.protobuf.Empty+ 20, // 24: bytebase.v1.AuthService.ResetPassword:output_type -> google.protobuf.Empty+ 20, // 25: bytebase.v1.AuthService.SendEmailLoginCode:output_type -> google.protobuf.Empty+ 16, // [16:26] is the sub-list for method output_type+ 6, // [6:16] 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}func init() { file_v1_auth_service_proto_init() }@@ -1093,23 +1300,24 @@ func file_v1_auth_service_proto_init() {return}file_v1_annotation_proto_init()+ file_v1_setting_service_proto_init()file_v1_user_service_proto_init()- file_v1_auth_service_proto_msgTypes[0].OneofWrappers = []any{}- file_v1_auth_service_proto_msgTypes[1].OneofWrappers = []any{+ file_v1_auth_service_proto_msgTypes[3].OneofWrappers = []any{}+ file_v1_auth_service_proto_msgTypes[4].OneofWrappers = []any{(*IdentityProviderContext_Oauth2Context)(nil),(*IdentityProviderContext_OidcContext)(nil),}- file_v1_auth_service_proto_msgTypes[4].OneofWrappers = []any{}- file_v1_auth_service_proto_msgTypes[11].OneofWrappers = []any{}- file_v1_auth_service_proto_msgTypes[13].OneofWrappers = []any{}+ file_v1_auth_service_proto_msgTypes[7].OneofWrappers = []any{}file_v1_auth_service_proto_msgTypes[14].OneofWrappers = []any{}+ file_v1_auth_service_proto_msgTypes[16].OneofWrappers = []any{}+ file_v1_auth_service_proto_msgTypes[17].OneofWrappers = []any{}type x struct{}out := protoimpl.TypeBuilder{File: protoimpl.DescBuilder{GoPackagePath: reflect.TypeOf(x{}).PkgPath(),RawDescriptor: unsafe.Slice(unsafe.StringData(file_v1_auth_service_proto_rawDesc), len(file_v1_auth_service_proto_rawDesc)),NumEnums: 0,- NumMessages: 15,+ NumMessages: 18,NumExtensions: 0,NumServices: 1,},diff --git a/backend/generated-go/v1/auth_service.pb.gw.go b/backend/generated-go/v1/auth_service.pb.gw.goindex ae1e8148bd..45c2506991 100644--- a/backend/generated-go/v1/auth_service.pb.gw.go+++ b/backend/generated-go/v1/auth_service.pb.gw.go@@ -35,6 +35,80 @@ var (_ = metadata.Join)+var filter_AuthService_GetAuthenticationRestriction_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}++func request_AuthService_GetAuthenticationRestriction_0(ctx context.Context, marshaler runtime.Marshaler, client AuthServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {+ var (+ protoReq GetAuthenticationRestrictionRequest+ metadata runtime.ServerMetadata+ )+ if err := req.ParseForm(); err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)+ }+ if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_AuthService_GetAuthenticationRestriction_0); err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)+ }+ if req.Body != nil {+ _, _ = io.Copy(io.Discard, req.Body)+ }+ msg, err := client.GetAuthenticationRestriction(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))+ return msg, metadata, err+}++func local_request_AuthService_GetAuthenticationRestriction_0(ctx context.Context, marshaler runtime.Marshaler, server AuthServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {+ var (+ protoReq GetAuthenticationRestrictionRequest+ metadata runtime.ServerMetadata+ )+ if err := req.ParseForm(); err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)+ }+ if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_AuthService_GetAuthenticationRestriction_0); err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)+ }+ msg, err := server.GetAuthenticationRestriction(ctx, &protoReq)+ return msg, metadata, err+}++func request_AuthService_GetAuthenticationRestriction_1(ctx context.Context, marshaler runtime.Marshaler, client AuthServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {+ var (+ protoReq GetAuthenticationRestrictionRequest+ metadata runtime.ServerMetadata+ err error+ )+ val, ok := pathParams["workspace"]+ if !ok {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "workspace")+ }+ protoReq.Workspace, err = runtime.String(val)+ if err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "workspace", err)+ }+ if req.Body != nil {+ _, _ = io.Copy(io.Discard, req.Body)+ }+ msg, err := client.GetAuthenticationRestriction(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))+ return msg, metadata, err+}++func local_request_AuthService_GetAuthenticationRestriction_1(ctx context.Context, marshaler runtime.Marshaler, server AuthServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {+ var (+ protoReq GetAuthenticationRestrictionRequest+ metadata runtime.ServerMetadata+ err error+ )+ val, ok := pathParams["workspace"]+ if !ok {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "workspace")+ }+ protoReq.Workspace, err = runtime.String(val)+ if err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "workspace", err)+ }+ msg, err := server.GetAuthenticationRestriction(ctx, &protoReq)+ return msg, metadata, err+}+func request_AuthService_Login_0(ctx context.Context, marshaler runtime.Marshaler, client AuthServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {var (protoReq LoginRequest@@ -284,6 +358,46 @@ func local_request_AuthService_SendEmailLoginCode_0(ctx context.Context, marshal// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterAuthServiceHandlerFromEndpoint instead.// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call.func RegisterAuthServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AuthServiceServer) error {+ mux.Handle(http.MethodGet, pattern_AuthService_GetAuthenticationRestriction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {+ ctx, cancel := context.WithCancel(req.Context())+ defer cancel()+ var stream runtime.ServerTransportStream+ ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)+ annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/bytebase.v1.AuthService/GetAuthenticationRestriction", runtime.WithHTTPPathPattern("/v1/auth/restriction"))+ if err != nil {+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)+ return+ }+ resp, md, err := local_request_AuthService_GetAuthenticationRestriction_0(annotatedContext, inboundMarshaler, server, req, pathParams)+ md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)+ if err != nil {+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)+ return+ }+ forward_AuthService_GetAuthenticationRestriction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)+ })+ mux.Handle(http.MethodGet, pattern_AuthService_GetAuthenticationRestriction_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {+ ctx, cancel := context.WithCancel(req.Context())+ defer cancel()+ var stream runtime.ServerTransportStream+ ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)+ annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/bytebase.v1.AuthService/GetAuthenticationRestriction", runtime.WithHTTPPathPattern("/v1/{workspace=workspaces/*}/auth/restriction"))+ if err != nil {+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)+ return+ }+ resp, md, err := local_request_AuthService_GetAuthenticationRestriction_1(annotatedContext, inboundMarshaler, server, req, pathParams)+ md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)+ if err != nil {+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)+ return+ }+ forward_AuthService_GetAuthenticationRestriction_1(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)+ })mux.Handle(http.MethodPost, pattern_AuthService_Login_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {ctx, cancel := context.WithCancel(req.Context())defer cancel()@@ -504,6 +618,40 @@ func RegisterAuthServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in// "AuthServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares.func RegisterAuthServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AuthServiceClient) error {+ mux.Handle(http.MethodGet, pattern_AuthService_GetAuthenticationRestriction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {+ ctx, cancel := context.WithCancel(req.Context())+ defer cancel()+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)+ annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/bytebase.v1.AuthService/GetAuthenticationRestriction", runtime.WithHTTPPathPattern("/v1/auth/restriction"))+ if err != nil {+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)+ return+ }+ resp, md, err := request_AuthService_GetAuthenticationRestriction_0(annotatedContext, inboundMarshaler, client, req, pathParams)+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)+ if err != nil {+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)+ return+ }+ forward_AuthService_GetAuthenticationRestriction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)+ })+ mux.Handle(http.MethodGet, pattern_AuthService_GetAuthenticationRestriction_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {+ ctx, cancel := context.WithCancel(req.Context())+ defer cancel()+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)+ annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/bytebase.v1.AuthService/GetAuthenticationRestriction", runtime.WithHTTPPathPattern("/v1/{workspace=workspaces/*}/auth/restriction"))+ if err != nil {+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)+ return+ }+ resp, md, err := request_AuthService_GetAuthenticationRestriction_1(annotatedContext, inboundMarshaler, client, req, pathParams)+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)+ if err != nil {+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)+ return+ }+ forward_AuthService_GetAuthenticationRestriction_1(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)+ })mux.Handle(http.MethodPost, pattern_AuthService_Login_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {ctx, cancel := context.WithCancel(req.Context())defer cancel()@@ -661,25 +809,29 @@ func RegisterAuthServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux}var (- pattern_AuthService_Login_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "auth", "login"}, ""))- pattern_AuthService_Logout_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "auth", "logout"}, ""))- pattern_AuthService_ExchangeToken_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "auth"}, "exchangeToken"))- pattern_AuthService_Signup_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "auth", "signup"}, ""))- pattern_AuthService_Refresh_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "auth", "refresh"}, ""))- pattern_AuthService_SwitchWorkspace_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "auth"}, "switchWorkspace"))- pattern_AuthService_RequestPasswordReset_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "auth"}, "requestPasswordReset"))- pattern_AuthService_ResetPassword_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "auth"}, "resetPassword"))- pattern_AuthService_SendEmailLoginCode_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "auth"}, "sendEmailLoginCode"))+ pattern_AuthService_GetAuthenticationRestriction_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "auth", "restriction"}, ""))+ pattern_AuthService_GetAuthenticationRestriction_1 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 2, 5, 2, 2, 3, 2, 4}, []string{"v1", "workspaces", "workspace", "auth", "restriction"}, ""))+ pattern_AuthService_Login_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "auth", "login"}, ""))+ pattern_AuthService_Logout_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "auth", "logout"}, ""))+ pattern_AuthService_ExchangeToken_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "auth"}, "exchangeToken"))+ pattern_AuthService_Signup_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "auth", "signup"}, ""))+ pattern_AuthService_Refresh_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "auth", "refresh"}, ""))+ pattern_AuthService_SwitchWorkspace_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "auth"}, "switchWorkspace"))+ pattern_AuthService_RequestPasswordReset_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "auth"}, "requestPasswordReset"))+ pattern_AuthService_ResetPassword_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "auth"}, "resetPassword"))+ pattern_AuthService_SendEmailLoginCode_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "auth"}, "sendEmailLoginCode")))var (- forward_AuthService_Login_0 = runtime.ForwardResponseMessage- forward_AuthService_Logout_0 = runtime.ForwardResponseMessage- forward_AuthService_ExchangeToken_0 = runtime.ForwardResponseMessage- forward_AuthService_Signup_0 = runtime.ForwardResponseMessage- forward_AuthService_Refresh_0 = runtime.ForwardResponseMessage- forward_AuthService_SwitchWorkspace_0 = runtime.ForwardResponseMessage- forward_AuthService_RequestPasswordReset_0 = runtime.ForwardResponseMessage- forward_AuthService_ResetPassword_0 = runtime.ForwardResponseMessage- forward_AuthService_SendEmailLoginCode_0 = runtime.ForwardResponseMessage+ forward_AuthService_GetAuthenticationRestriction_0 = runtime.ForwardResponseMessage+ forward_AuthService_GetAuthenticationRestriction_1 = runtime.ForwardResponseMessage+ forward_AuthService_Login_0 = runtime.ForwardResponseMessage+ forward_AuthService_Logout_0 = runtime.ForwardResponseMessage+ forward_AuthService_ExchangeToken_0 = runtime.ForwardResponseMessage+ forward_AuthService_Signup_0 = runtime.ForwardResponseMessage+ forward_AuthService_Refresh_0 = runtime.ForwardResponseMessage+ forward_AuthService_SwitchWorkspace_0 = runtime.ForwardResponseMessage+ forward_AuthService_RequestPasswordReset_0 = runtime.ForwardResponseMessage+ forward_AuthService_ResetPassword_0 = runtime.ForwardResponseMessage+ forward_AuthService_SendEmailLoginCode_0 = runtime.ForwardResponseMessage)diff --git a/backend/generated-go/v1/auth_service_equal.pb.go b/backend/generated-go/v1/auth_service_equal.pb.goindex c945552612..f8c3fc617d 100644--- a/backend/generated-go/v1/auth_service_equal.pb.go+++ b/backend/generated-go/v1/auth_service_equal.pb.go@@ -3,6 +3,60 @@package v1+func (x *GetAuthenticationRestrictionRequest) Equal(y *GetAuthenticationRestrictionRequest) bool {+ if x == y {+ return true+ }+ if x == nil || y == nil {+ return x == nil && y == nil+ }+ if x.Workspace != y.Workspace {+ return false+ }+ return true+}++func (x *AuthenticationInfo) Equal(y *AuthenticationInfo) bool {+ if x == y {+ return true+ }+ if x == nil || y == nil {+ return x == nil && y == nil+ }+ if x.Workspace != y.Workspace {+ return false+ }+ if !x.Restriction.Equal(y.Restriction) {+ return false+ }+ return true+}++func (x *Restriction) Equal(y *Restriction) bool {+ if x == y {+ return true+ }+ if x == nil || y == nil {+ return x == nil && y == nil+ }+ if x.DisallowSignup != y.DisallowSignup {+ return false+ }+ if x.DisallowPasswordSignin != y.DisallowPasswordSignin {+ return false+ }+ if !x.PasswordRestriction.Equal(y.PasswordRestriction) {+ return false+ }+ if x.AllowEmailCodeSignin != y.AllowEmailCodeSignin {+ return false+ }+ if x.PasswordResetEnabled != y.PasswordResetEnabled {+ return false+ }+ return true+}+func (x *LoginRequest) Equal(y *LoginRequest) bool {if x == y {return truediff --git a/backend/generated-go/v1/auth_service_grpc.pb.go b/backend/generated-go/v1/auth_service_grpc.pb.goindex ae8609c1cb..4dddf194bf 100644--- a/backend/generated-go/v1/auth_service_grpc.pb.go+++ b/backend/generated-go/v1/auth_service_grpc.pb.go@@ -20,15 +20,16 @@ import (const _ = grpc.SupportPackageIsVersion9const (- AuthService_Login_FullMethodName = "/bytebase.v1.AuthService/Login"- AuthService_Logout_FullMethodName = "/bytebase.v1.AuthService/Logout"- AuthService_ExchangeToken_FullMethodName = "/bytebase.v1.AuthService/ExchangeToken"- AuthService_Signup_FullMethodName = "/bytebase.v1.AuthService/Signup"- AuthService_Refresh_FullMethodName = "/bytebase.v1.AuthService/Refresh"- AuthService_SwitchWorkspace_FullMethodName = "/bytebase.v1.AuthService/SwitchWorkspace"- AuthService_RequestPasswordReset_FullMethodName = "/bytebase.v1.AuthService/RequestPasswordReset"- AuthService_ResetPassword_FullMethodName = "/bytebase.v1.AuthService/ResetPassword"- AuthService_SendEmailLoginCode_FullMethodName = "/bytebase.v1.AuthService/SendEmailLoginCode"+ AuthService_GetAuthenticationRestriction_FullMethodName = "/bytebase.v1.AuthService/GetAuthenticationRestriction"+ AuthService_Login_FullMethodName = "/bytebase.v1.AuthService/Login"+ AuthService_Logout_FullMethodName = "/bytebase.v1.AuthService/Logout"+ AuthService_ExchangeToken_FullMethodName = "/bytebase.v1.AuthService/ExchangeToken"+ AuthService_Signup_FullMethodName = "/bytebase.v1.AuthService/Signup"+ AuthService_Refresh_FullMethodName = "/bytebase.v1.AuthService/Refresh"+ AuthService_SwitchWorkspace_FullMethodName = "/bytebase.v1.AuthService/SwitchWorkspace"+ AuthService_RequestPasswordReset_FullMethodName = "/bytebase.v1.AuthService/RequestPasswordReset"+ AuthService_ResetPassword_FullMethodName = "/bytebase.v1.AuthService/ResetPassword"+ AuthService_SendEmailLoginCode_FullMethodName = "/bytebase.v1.AuthService/SendEmailLoginCode")// AuthServiceClient is the client API for AuthService service.@@ -37,6 +38,9 @@ const (//// AuthService handles user authentication operations.type AuthServiceClient interface {+ // Gets the effective restrictions needed to render authentication flows.+ // Permissions required: None+ GetAuthenticationRestriction(ctx context.Context, in *GetAuthenticationRestrictionRequest, opts ...grpc.CallOption) (*AuthenticationInfo, error)// Authenticates a user and returns access tokens.// Permissions required: NoneLogin(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*LoginResponse, error)@@ -79,6 +83,16 @@ func NewAuthServiceClient(cc grpc.ClientConnInterface) AuthServiceClient {return &authServiceClient{cc}}+func (c *authServiceClient) GetAuthenticationRestriction(ctx context.Context, in *GetAuthenticationRestrictionRequest, opts ...grpc.CallOption) (*AuthenticationInfo, error) {+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)+ out := new(AuthenticationInfo)+ err := c.cc.Invoke(ctx, AuthService_GetAuthenticationRestriction_FullMethodName, in, out, cOpts...)+ if err != nil {+ return nil, err+ }+ return out, nil+}+func (c *authServiceClient) Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*LoginResponse, error) {cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)out := new(LoginResponse)@@ -175,6 +189,9 @@ func (c *authServiceClient) SendEmailLoginCode(ctx context.Context, in *SendEmai//// AuthService handles user authentication operations.type AuthServiceServer interface {+ // Gets the effective restrictions needed to render authentication flows.+ // Permissions required: None+ GetAuthenticationRestriction(context.Context, *GetAuthenticationRestrictionRequest) (*AuthenticationInfo, error)// Authenticates a user and returns access tokens.// Permissions required: NoneLogin(context.Context, *LoginRequest) (*LoginResponse, error)@@ -217,6 +234,9 @@ type AuthServiceServer interface {// pointer dereference when methods are called.type UnimplementedAuthServiceServer struct{}+func (UnimplementedAuthServiceServer) GetAuthenticationRestriction(context.Context, *GetAuthenticationRestrictionRequest) (*AuthenticationInfo, error) {+ return nil, status.Error(codes.Unimplemented, "method GetAuthenticationRestriction not implemented")+}func (UnimplementedAuthServiceServer) Login(context.Context, *LoginRequest) (*LoginResponse, error) {return nil, status.Error(codes.Unimplemented, "method Login not implemented")}@@ -265,6 +285,24 @@ func RegisterAuthServiceServer(s grpc.ServiceRegistrar, srv AuthServiceServer) {s.RegisterService(&AuthService_ServiceDesc, srv)}+func _AuthService_GetAuthenticationRestriction_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {+ in := new(GetAuthenticationRestrictionRequest)+ if err := dec(in); err != nil {+ return nil, err+ }+ if interceptor == nil {+ return srv.(AuthServiceServer).GetAuthenticationRestriction(ctx, in)+ }+ info := &grpc.UnaryServerInfo{+ Server: srv,+ FullMethod: AuthService_GetAuthenticationRestriction_FullMethodName,+ }+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {+ return srv.(AuthServiceServer).GetAuthenticationRestriction(ctx, req.(*GetAuthenticationRestrictionRequest))+ }+ return interceptor(ctx, in, info, handler)+}+func _AuthService_Login_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {in := new(LoginRequest)if err := dec(in); err != nil {@@ -434,6 +472,10 @@ var AuthService_ServiceDesc = grpc.ServiceDesc{ServiceName: "bytebase.v1.AuthService",HandlerType: (*AuthServiceServer)(nil),Methods: []grpc.MethodDesc{+ {+ MethodName: "GetAuthenticationRestriction",+ Handler: _AuthService_GetAuthenticationRestriction_Handler,+ },{MethodName: "Login",Handler: _AuthService_Login_Handler,diff --git a/backend/generated-go/v1/v1connect/actuator_service.connect.go b/backend/generated-go/v1/v1connect/actuator_service.connect.goindex 6701061320..bf924bce8e 100644--- a/backend/generated-go/v1/v1connect/actuator_service.connect.go+++ b/backend/generated-go/v1/v1connect/actuator_service.connect.go@@ -45,9 +45,8 @@ const (// ActuatorServiceClient is a client for the bytebase.v1.ActuatorService service.type ActuatorServiceClient interface {// 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+ // The workspace is resolved from the authenticated session.+ // Permissions required: None (authentication required)GetActuatorInfo(context.Context, *connect.Request[v1.GetActuatorInfoRequest]) (*connect.Response[v1.ActuatorInfo], error)// Sets up sample data for demonstration and testing purposes.// Permissions required: bb.projects.create@@ -99,9 +98,8 @@ func (c *actuatorServiceClient) SetupSample(ctx context.Context, req *connect.Re// ActuatorServiceHandler is an implementation of the bytebase.v1.ActuatorService service.type ActuatorServiceHandler interface {// 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+ // The workspace is resolved from the authenticated session.+ // Permissions required: None (authentication required)GetActuatorInfo(context.Context, *connect.Request[v1.GetActuatorInfoRequest]) (*connect.Response[v1.ActuatorInfo], error)// Sets up sample data for demonstration and testing purposes.// Permissions required: bb.projects.creatediff --git a/backend/generated-go/v1/v1connect/auth_service.connect.go b/backend/generated-go/v1/v1connect/auth_service.connect.goindex d381f827a1..3d6a97b617 100644--- a/backend/generated-go/v1/v1connect/auth_service.connect.go+++ b/backend/generated-go/v1/v1connect/auth_service.connect.go@@ -34,6 +34,9 @@ const (// reflection-formatted method names, remove the leading slash and convert the remaining slash to a// period.const (+ // AuthServiceGetAuthenticationRestrictionProcedure is the fully-qualified name of the AuthService's+ // GetAuthenticationRestriction RPC.+ AuthServiceGetAuthenticationRestrictionProcedure = "/bytebase.v1.AuthService/GetAuthenticationRestriction"// AuthServiceLoginProcedure is the fully-qualified name of the AuthService's Login RPC.AuthServiceLoginProcedure = "/bytebase.v1.AuthService/Login"// AuthServiceLogoutProcedure is the fully-qualified name of the AuthService's Logout RPC.@@ -61,6 +64,9 @@ const (// AuthServiceClient is a client for the bytebase.v1.AuthService service.type AuthServiceClient interface {+ // Gets the effective restrictions needed to render authentication flows.+ // Permissions required: None+ GetAuthenticationRestriction(context.Context, *connect.Request[v1.GetAuthenticationRestrictionRequest]) (*connect.Response[v1.AuthenticationInfo], error)// Authenticates a user and returns access tokens.// Permissions required: NoneLogin(context.Context, *connect.Request[v1.LoginRequest]) (*connect.Response[v1.LoginResponse], error)@@ -106,6 +112,12 @@ func NewAuthServiceClient(httpClient connect.HTTPClient, baseURL string, opts ..baseURL = strings.TrimRight(baseURL, "/")authServiceMethods := v1.File_v1_auth_service_proto.Services().ByName("AuthService").Methods()return &authServiceClient{+ getAuthenticationRestriction: connect.NewClient[v1.GetAuthenticationRestrictionRequest, v1.AuthenticationInfo](+ httpClient,+ baseURL+AuthServiceGetAuthenticationRestrictionProcedure,+ connect.WithSchema(authServiceMethods.ByName("GetAuthenticationRestriction")),+ connect.WithClientOptions(opts...),+ ),login: connect.NewClient[v1.LoginRequest, v1.LoginResponse](httpClient,baseURL+AuthServiceLoginProcedure,@@ -165,15 +177,21 @@ func NewAuthServiceClient(httpClient connect.HTTPClient, baseURL string, opts ..// authServiceClient implements AuthServiceClient.type authServiceClient struct {- login *connect.Client[v1.LoginRequest, v1.LoginResponse]- logout *connect.Client[v1.LogoutRequest, emptypb.Empty]- exchangeToken *connect.Client[v1.ExchangeTokenRequest, v1.ExchangeTokenResponse]- signup *connect.Client[v1.SignupRequest, v1.LoginResponse]- refresh *connect.Client[v1.RefreshRequest, v1.RefreshResponse]- switchWorkspace *connect.Client[v1.SwitchWorkspaceRequest, v1.LoginResponse]- requestPasswordReset *connect.Client[v1.RequestPasswordResetRequest, emptypb.Empty]- resetPassword *connect.Client[v1.ResetPasswordRequest, emptypb.Empty]- sendEmailLoginCode *connect.Client[v1.SendEmailLoginCodeRequest, emptypb.Empty]+ getAuthenticationRestriction *connect.Client[v1.GetAuthenticationRestrictionRequest, v1.AuthenticationInfo]+ login *connect.Client[v1.LoginRequest, v1.LoginResponse]+ logout *connect.Client[v1.LogoutRequest, emptypb.Empty]+ exchangeToken *connect.Client[v1.ExchangeTokenRequest, v1.ExchangeTokenResponse]+ signup *connect.Client[v1.SignupRequest, v1.LoginResponse]+ refresh *connect.Client[v1.RefreshRequest, v1.RefreshResponse]+ switchWorkspace *connect.Client[v1.SwitchWorkspaceRequest, v1.LoginResponse]+ requestPasswordReset *connect.Client[v1.RequestPasswordResetRequest, emptypb.Empty]+ resetPassword *connect.Client[v1.ResetPasswordRequest, emptypb.Empty]+ sendEmailLoginCode *connect.Client[v1.SendEmailLoginCodeRequest, emptypb.Empty]+}++// GetAuthenticationRestriction calls bytebase.v1.AuthService.GetAuthenticationRestriction.+func (c *authServiceClient) GetAuthenticationRestriction(ctx context.Context, req *connect.Request[v1.GetAuthenticationRestrictionRequest]) (*connect.Response[v1.AuthenticationInfo], error) {+ return c.getAuthenticationRestriction.CallUnary(ctx, req)}// Login calls bytebase.v1.AuthService.Login.@@ -223,6 +241,9 @@ func (c *authServiceClient) SendEmailLoginCode(ctx context.Context, req *connect// AuthServiceHandler is an implementation of the bytebase.v1.AuthService service.type AuthServiceHandler interface {+ // Gets the effective restrictions needed to render authentication flows.+ // Permissions required: None+ GetAuthenticationRestriction(context.Context, *connect.Request[v1.GetAuthenticationRestrictionRequest]) (*connect.Response[v1.AuthenticationInfo], error)// Authenticates a user and returns access tokens.// Permissions required: NoneLogin(context.Context, *connect.Request[v1.LoginRequest]) (*connect.Response[v1.LoginResponse], error)@@ -264,6 +285,12 @@ type AuthServiceHandler interface {// and JSON codecs. They also support gzip compression.func NewAuthServiceHandler(svc AuthServiceHandler, opts ...connect.HandlerOption) (string, http.Handler) {authServiceMethods := v1.File_v1_auth_service_proto.Services().ByName("AuthService").Methods()+ authServiceGetAuthenticationRestrictionHandler := connect.NewUnaryHandler(+ AuthServiceGetAuthenticationRestrictionProcedure,+ svc.GetAuthenticationRestriction,+ connect.WithSchema(authServiceMethods.ByName("GetAuthenticationRestriction")),+ connect.WithHandlerOptions(opts...),+ )authServiceLoginHandler := connect.NewUnaryHandler(AuthServiceLoginProcedure,svc.Login,@@ -320,6 +347,8 @@ func NewAuthServiceHandler(svc AuthServiceHandler, opts ...connect.HandlerOption)return "/bytebase.v1.AuthService/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {switch r.URL.Path {+ case AuthServiceGetAuthenticationRestrictionProcedure:+ authServiceGetAuthenticationRestrictionHandler.ServeHTTP(w, r)case AuthServiceLoginProcedure:authServiceLoginHandler.ServeHTTP(w, r)case AuthServiceLogoutProcedure:@@ -347,6 +376,10 @@ func NewAuthServiceHandler(svc AuthServiceHandler, opts ...connect.HandlerOption// UnimplementedAuthServiceHandler returns CodeUnimplemented from all methods.type UnimplementedAuthServiceHandler struct{}+func (UnimplementedAuthServiceHandler) GetAuthenticationRestriction(context.Context, *connect.Request[v1.GetAuthenticationRestrictionRequest]) (*connect.Response[v1.AuthenticationInfo], error) {+ return nil, connect.NewError(connect.CodeUnimplemented, errors.New("bytebase.v1.AuthService.GetAuthenticationRestriction is not implemented"))+}+func (UnimplementedAuthServiceHandler) Login(context.Context, *connect.Request[v1.LoginRequest]) (*connect.Response[v1.LoginResponse], error) {return nil, connect.NewError(connect.CodeUnimplemented, errors.New("bytebase.v1.AuthService.Login is not implemented"))}diff --git a/backend/tests/tests.go b/backend/tests/tests.goindex 947c5914ab..df844ae371 100644--- a/backend/tests/tests.go+++ b/backend/tests/tests.go@@ -330,7 +330,7 @@ func (ctl *controller) waitForHealthz(ctx context.Context) error {for {select {case <-ticker.C:- _, err := ctl.actuatorServiceClient.GetActuatorInfo(ctx, &connect.Request[v1pb.GetActuatorInfoRequest]{})+ _, err := ctl.authServiceClient.GetAuthenticationRestriction(ctx, &connect.Request[v1pb.GetAuthenticationRestrictionRequest]{})if err != nil && status.Code(err) == codes.Unavailable {continue}diff --git a/backend/tests/user_test.go b/backend/tests/user_test.goindex b3a1d78bb1..607e0e55f5 100644--- a/backend/tests/user_test.go+++ b/backend/tests/user_test.go@@ -48,9 +48,7 @@ func TestDeleteUser(t *testing.T) {a.Error(err)a.ErrorContains(err, expectErrorMsg)- actuator, err := ctl.actuatorServiceClient.GetActuatorInfo(ctx, connect.NewRequest(&v1pb.GetActuatorInfoRequest{- Name: memberResp.Msg.Workspace,- }))+ actuator, err := ctl.actuatorServiceClient.GetActuatorInfo(ctx, connect.NewRequest(&v1pb.GetActuatorInfoRequest{}))a.NoError(err)serviceAccountResp, err := ctl.serviceAccountServiceClient.CreateServiceAccount(ctx, connect.NewRequest(&v1pb.CreateServiceAccountRequest{@@ -587,8 +585,8 @@ func TestGetCurrentUser_ServiceAccount(t *testing.T) {a.NoError(err)defer ctl.Close(ctx)- // Create a dummy user to get the workspace reference.- userResp, err := ctl.userServiceClient.CreateUser(ctx, connect.NewRequest(&v1pb.CreateUserRequest{+ // Create a dummy user before creating the service account.+ _, err = ctl.userServiceClient.CreateUser(ctx, connect.NewRequest(&v1pb.CreateUserRequest{User: &v1pb.User{Title: "dummy",Email: "[email protected]",@@ -596,12 +594,8 @@ func TestGetCurrentUser_ServiceAccount(t *testing.T) {},}))a.NoError(err)- workspace := userResp.Msg.Workspace-- // Get actuator info using the workspace reference.- actuator, err := ctl.actuatorServiceClient.GetActuatorInfo(ctx, connect.NewRequest(&v1pb.GetActuatorInfoRequest{- Name: workspace,- }))+ // Get actuator info for the authenticated workspace.+ actuator, err := ctl.actuatorServiceClient.GetActuatorInfo(ctx, connect.NewRequest(&v1pb.GetActuatorInfoRequest{}))a.NoError(err)// Create a service account.diff --git a/frontend/src/app/router/guard.test.ts b/frontend/src/app/router/guard.test.tsindex 5e5696da96..fb65c50a86 100644--- a/frontend/src/app/router/guard.test.ts+++ b/frontend/src/app/router/guard.test.ts@@ -10,6 +10,7 @@ const session = {requireMfa: false,hasTwoFa: false,isSaaSMode: false,+ disallowSignup: false,currentUser: undefined as { mfaEnabled: boolean } | undefined,// Mirrors the store default: PIPELINE until the workspace profile loads.databaseChangeMode: DatabaseChangeMode.PIPELINE,@@ -30,6 +31,9 @@ vi.mock("@/stores/app", () => ({getWorkspaceProfile: () => ({ requireMfa: session.requireMfa }),hasFeature: () => session.hasTwoFa,isSaaSMode: () => session.isSaaSMode,+ authenticationInfo: {+ restriction: { disallowSignup: session.disallowSignup },+ },currentUser: session.currentUser,appFeatures: {"bb.feature.database-change-mode": session.databaseChangeMode,@@ -67,6 +71,7 @@ beforeEach(() => {session.requireMfa = false;session.hasTwoFa = false;session.isSaaSMode = false;+ session.disallowSignup = false;session.currentUser = undefined;session.databaseChangeMode = DatabaseChangeMode.PIPELINE;vi.clearAllMocks();@@ -185,8 +190,8 @@ describe("rootGuard", () => {expect(resets.resetProjects).toHaveBeenCalled();});- test("redirects SaaS signup route to signin", () => {- session.isSaaSMode = true;+ test("redirects to signin when signup is disallowed", () => {+ session.disallowSignup = true;expect(location(diff --git a/frontend/src/app/router/guard.ts b/frontend/src/app/router/guard.tsindex 7625ced7a0..1a0e7dd2fd 100644--- a/frontend/src/app/router/guard.ts+++ b/frontend/src/app/router/guard.ts@@ -196,7 +196,10 @@ export function rootGuard({const store = useAppStore.getState();const isLoggedIn = store.isLoggedIn();- if (toName === AUTH_SIGNUP_MODULE && store.isSaaSMode()) {+ if (+ toName === AUTH_SIGNUP_MODULE &&+ store.authenticationInfo?.restriction?.disallowSignup+ ) {return redirect(resolvePath(AUTH_SIGNIN_MODULE, {query: Object.fromEntries(url.searchParams),diff --git a/frontend/src/app/router/lazyPage.test.tsx b/frontend/src/app/router/lazyPage.test.tsxindex fcea92a1bb..ae55bc8f46 100644--- a/frontend/src/app/router/lazyPage.test.tsx+++ b/frontend/src/app/router/lazyPage.test.tsx@@ -86,10 +86,10 @@ describe("lazyPage persistent parent routes", () => {await router.navigate(-1);await waitFor(() =>expect(screen.getByTestId("route-name")).toHaveTextContent(- "plan.rollout.stage"+ /^plan\.rollout\.stage$/));- expect(screen.getByTestId("task-id")).toHaveTextContent("");+ expect(screen.getByTestId("task-id")).toBeEmptyDOMElement();expect(screen.getByTestId("mount-id")).toHaveTextContent("1");await router.navigate(1);diff --git a/frontend/src/components/header/ProfileMenuTrigger.test.tsx b/frontend/src/components/header/ProfileMenuTrigger.test.tsxindex 2be7e7085a..31eaab0ee3 100644--- a/frontend/src/components/header/ProfileMenuTrigger.test.tsx+++ b/frontend/src/components/header/ProfileMenuTrigger.test.tsx@@ -120,7 +120,7 @@ vi.mock("@/hooks/useAppState", () => ({}),useServerInfo: () => ({enableSample: true,- activatedUserCount: 1,+ userCountInIam: 1,}),useSubscription: () => ({subscription: { plan: PlanType.FREE },diff --git a/frontend/src/components/header/ProfileMenuTrigger.tsx b/frontend/src/components/header/ProfileMenuTrigger.tsxindex 249423cafb..5020d066d7 100644--- a/frontend/src/components/header/ProfileMenuTrigger.tsx+++ b/frontend/src/components/header/ProfileMenuTrigger.tsx@@ -74,7 +74,7 @@ export function ProfileMenuTrigger({const quickStartEnabled =!hideQuickStart &&Boolean(serverInfo?.enableSample) &&- (serverInfo?.activatedUserCount ?? 0) <= 1;+ (serverInfo?.userCountInIam ?? 0) <= 1;const customLogo = workspace?.logo ?? "";const [open, setOpen] = useState(false);diff --git a/frontend/src/components/instance/InstanceFormBody.tsx b/frontend/src/components/instance/InstanceFormBody.tsxindex 425e9354c3..431d8b939b 100644--- a/frontend/src/components/instance/InstanceFormBody.tsx+++ b/frontend/src/components/instance/InstanceFormBody.tsx@@ -1111,9 +1111,7 @@ export function InstanceFormBody({ onOpenInfoPanel }: InstanceFormBodyProps) {.getState().updateInstance(instancePatch, ["activation"]);useAppStore.getState().updateDatabaseInstance(updated);- await useAppStore- .getState()- .fetchServerInfo(useAppStore.getState().workspaceResourceName());+ await useAppStore.getState().fetchServerInfo();pushNotification({module: "bytebase",style: "SUCCESS",diff --git a/frontend/src/lib/ga4.test.ts b/frontend/src/lib/ga4.test.tsindex 0195a63959..c923ef6529 100644--- a/frontend/src/lib/ga4.test.ts+++ b/frontend/src/lib/ga4.test.ts@@ -20,27 +20,17 @@ afterEach(() => {describe("initializeGA4", () => {test("does not load GA4 without a measurement ID", () => {- initializeGA4(true);+ initializeGA4();expect(document.querySelector(ga4ScriptSelector)).toBeNull();expect(window.dataLayer).toBeUndefined();expect(window.gtag).toBeUndefined();});- test("does not load GA4 outside SaaS mode", () => {+ test("loads the configured GA4 property", () => {vi.stubEnv("BB_GA4_MEASUREMENT_ID", "G-TEST");- initializeGA4(false);-- expect(document.querySelector(ga4ScriptSelector)).toBeNull();- expect(window.dataLayer).toBeUndefined();- expect(window.gtag).toBeUndefined();- });-- test("loads the shared GA4 property in SaaS mode", () => {- vi.stubEnv("BB_GA4_MEASUREMENT_ID", "G-TEST");-- initializeGA4(true);+ initializeGA4();const script = document.querySelector<HTMLScriptElement>(ga4ScriptSelector);expect(script?.async).toBe(true);@@ -68,7 +58,7 @@ describe("initializeGA4", () => {"/oauth/callback?code=secret&state=token#fragment");- initializeGA4(true);+ initializeGA4();expect(window.dataLayer?.[1]).toEqual(["config",diff --git a/frontend/src/lib/ga4.ts b/frontend/src/lib/ga4.tsindex 26792f6255..c8f3bc5c6b 100644--- a/frontend/src/lib/ga4.ts+++ b/frontend/src/lib/ga4.ts@@ -5,11 +5,11 @@ type GAWindow = Window & {gtag?: (...args: unknown[]) => void;};-export function initializeGA4(isSaaSMode: boolean): void {+export function initializeGA4(): void {const measurementId = import.meta.env.BB_GA4_MEASUREMENT_ID as| string| undefined;- if (!isSaaSMode || !measurementId || document.getElementById(GA4_SCRIPT_ID)) {+ if (!measurementId || document.getElementById(GA4_SCRIPT_ID)) {return;}diff --git a/frontend/src/lib/workspace.test.ts b/frontend/src/lib/workspace.test.tsnew file mode 100644index 0000000000..1f11d8b9b6--- /dev/null+++ b/frontend/src/lib/workspace.test.ts@@ -0,0 +1,37 @@+import { afterEach, beforeEach, describe, expect, test, vi } from "vitest";++const mocks = vi.hoisted(() => ({+ workspace: "workspaces/exposed-by-auth-info",+}));++vi.mock("@/stores/app", () => ({+ useAppStore: {+ getState: () => ({+ workspaceResourceName: () => mocks.workspace,+ }),+ },+}));++import { resolveWorkspaceName } from "./workspace";++beforeEach(() => {+ mocks.workspace = "workspaces/exposed-by-auth-info";+ window.history.replaceState(null, "", "/auth");+});++afterEach(() => {+ window.history.replaceState(null, "", "/");+});++describe("resolveWorkspaceName", () => {+ test("uses the workspace exposed by authentication info", () => {+ expect(resolveWorkspaceName()).toBe("workspaces/exposed-by-auth-info");+ });++ test("falls back to the workspace hint from the URL", () => {+ mocks.workspace = "";+ window.history.replaceState(null, "", "/auth?workspace=invited");++ expect(resolveWorkspaceName()).toBe("workspaces/invited");+ });+});diff --git a/frontend/src/lib/workspace.ts b/frontend/src/lib/workspace.tsindex 6f2a1965ea..48d8583c7b 100644--- a/frontend/src/lib/workspace.ts+++ b/frontend/src/lib/workspace.ts@@ -3,7 +3,8 @@ import { useAppStore } from "@/stores/app";/*** Resolve the active workspace resource name for auth flows (signin, MFA,* password reset/forgot, OAuth callback). Prefers the app store's resolved- * workspace (from server info); falls back to the `?workspace=<id>` URL query.+ * workspace (from authentication info); falls back to the+ * `?workspace=<id>` URL query.** Lives in the React layer (not `@/utils`) because it reads the Zustand app* store — keeping the app-store import out of the low-level `@/utils` barrel,diff --git a/frontend/src/main.ts b/frontend/src/main.tsindex 70ca0112b1..87f3709b95 100644--- a/frontend/src/main.ts+++ b/frontend/src/main.ts@@ -29,17 +29,18 @@ rewriteLegacyPath();const store = useAppStore.getState();// Load the authenticated session BEFORE mounting so the route guard sees the- // correct auth state on the very first navigation (the Vue bootstrap awaited- // fetchCurrentUser + server info the same way before mounting the router).+ // correct auth state on the very first navigation. Authentication info is+ // independent from the authenticated actuator response and is always loaded.const currentUser = await store.loadCurrentUser();- const initPromises: Promise<unknown>[] = [store.loadServerInfo()];+ const initPromises: Promise<unknown>[] = [store.loadAuthenticationInfo()];if (currentUser) {+ initPromises.push(store.loadServerInfo());initPromises.push(store.loadSubscription());initPromises.push(store.loadWorkspaceList());initPromises.push(store.loadWorkspaceProfile());}await Promise.all(initPromises);- initializeGA4(store.isSaaSMode());+ initializeGA4();const { mountReactRouterApp } = await import("./app/mountApp");await mountReactRouterApp("#app");diff --git a/frontend/src/routes/auth/PasswordForgotPage.test.tsx b/frontend/src/routes/auth/PasswordForgotPage.test.tsxindex 51954742ec..1be84d5fa1 100644--- a/frontend/src/routes/auth/PasswordForgotPage.test.tsx+++ b/frontend/src/routes/auth/PasswordForgotPage.test.tsx@@ -16,8 +16,10 @@ const mocks = vi.hoisted(() => {disallowPasswordSignin: false,};const appStoreState = {- serverInfo: { restriction } as { restriction: typeof restriction },- loadServerInfo: vi.fn().mockResolvedValue(undefined),+ authenticationInfo: { restriction } as {+ restriction: typeof restriction;+ },+ loadAuthenticationInfo: vi.fn().mockResolvedValue(undefined),};return {restriction,diff --git a/frontend/src/routes/auth/PasswordForgotPage.tsx b/frontend/src/routes/auth/PasswordForgotPage.tsxindex 1602b993d6..44094f6866 100644--- a/frontend/src/routes/auth/PasswordForgotPage.tsx+++ b/frontend/src/routes/auth/PasswordForgotPage.tsx@@ -22,17 +22,17 @@ export function PasswordForgotPage() {const [email, setEmail] = useState("");const [isLoading, setIsLoading] = useState(false);- const serverInfo = useAppStore((state) => state.serverInfo);+ const authenticationInfo = useAppStore((state) => state.authenticationInfo);const passwordResetEnabled =- serverInfo?.restriction?.passwordResetEnabled ?? false;+ authenticationInfo?.restriction?.passwordResetEnabled ?? false;const disallowPasswordSignin =- serverInfo?.restriction?.disallowPasswordSignin ?? false;+ authenticationInfo?.restriction?.disallowPasswordSignin ?? false;// This page renders outside any shell, so the workspace bootstrap hasn't- // populated the app store yet — load server info so the password-reset+ // populated the app store yet — load authentication info so password-reset// restriction flags resolve.useEffect(() => {- void useAppStore.getState().loadServerInfo();+ void useAppStore.getState().loadAuthenticationInfo();}, []);useEffect(() => {diff --git a/frontend/src/routes/auth/PasswordResetPage.test.tsx b/frontend/src/routes/auth/PasswordResetPage.test.tsxindex 797f2d3d79..7b192e8d0e 100644--- a/frontend/src/routes/auth/PasswordResetPage.test.tsx+++ b/frontend/src/routes/auth/PasswordResetPage.test.tsx@@ -9,7 +9,7 @@ import { beforeEach, describe, expect, test, vi } from "vitest";const mocks = vi.hoisted(() => ({appStoreState: {- serverInfo: {+ authenticationInfo: {restriction: {passwordRestriction: undefined as unknown,disallowPasswordSignin: false,@@ -48,7 +48,7 @@ vi.mock("@/stores/app", () => {const getState = () => ({...mocks.appStoreState,updateUser: mocks.updateUser,- loadServerInfo: vi.fn().mockResolvedValue(undefined),+ loadAuthenticationInfo: vi.fn().mockResolvedValue(undefined),login: mocks.login,setRequireResetPassword: mocks.setRequireResetPassword,workspaceResourceName: () => "",@@ -165,12 +165,8 @@ const setInputValue = (input: HTMLInputElement, value: string) => {beforeEach(async () => {vi.clearAllMocks();mocks.currentRoute.value.query = {};- mocks.appStoreState.serverInfo = {- restriction: {- passwordRestriction: undefined,- disallowPasswordSignin: false,- },- };+ mocks.appStoreState.authenticationInfo.restriction.disallowPasswordSignin =+ false;mocks.appStoreState.requireResetPassword = () => true;mocks.useAuthStore.mockReturnValue({setRequireResetPassword: vi.fn(),@@ -190,12 +186,8 @@ describe("PasswordResetPage", () => {test("code mode: redirects to signin when password signin is disallowed", () => {mocks.currentRoute.value.query = { email: "[email protected]" };- mocks.appStoreState.serverInfo = {- restriction: {- passwordRestriction: undefined,- disallowPasswordSignin: true,- },- };+ mocks.appStoreState.authenticationInfo.restriction.disallowPasswordSignin =+ true;const { render, unmount } = renderIntoContainer(<PasswordResetPage />);render();expect(mocks.routerReplace).toHaveBeenCalledWith({diff --git a/frontend/src/routes/auth/PasswordResetPage.tsx b/frontend/src/routes/auth/PasswordResetPage.tsxindex 43cd48ca5f..270bbf85ba 100644--- a/frontend/src/routes/auth/PasswordResetPage.tsx+++ b/frontend/src/routes/auth/PasswordResetPage.tsx@@ -35,18 +35,17 @@ export function PasswordResetPage() {const query = router.currentRoute.value.query;const codeMode = !!query.email;- const serverInfo = useAppStore((state) => state.serverInfo);- const passwordRestriction = serverInfo?.restriction?.passwordRestriction;- const disallowPasswordSignin =- serverInfo?.restriction?.disallowPasswordSignin ?? false;+ const authenticationInfo = useAppStore((state) => state.authenticationInfo);+ const restriction = authenticationInfo?.restriction;+ const passwordRestriction = restriction?.passwordRestriction;+ const disallowPasswordSignin = restriction?.disallowPasswordSignin ?? false;const requireResetPassword = useAppStore((s) => s.requireResetPassword());const currentUser = useCurrentUser();- // This page renders outside any shell, so the workspace bootstrap hasn't- // populated the app store yet — load server info so the password policy- // checks resolve.+ // Password policy comes from the authentication API in both public and+ // forced-reset flows.useEffect(() => {- void useAppStore.getState().loadServerInfo();+ void useAppStore.getState().loadAuthenticationInfo();}, []);const redirectQuery = () => {diff --git a/frontend/src/routes/auth/SigninPage.test.tsx b/frontend/src/routes/auth/SigninPage.test.tsxindex 928fc795b2..da0529d565 100644--- a/frontend/src/routes/auth/SigninPage.test.tsx+++ b/frontend/src/routes/auth/SigninPage.test.tsx@@ -10,6 +10,7 @@ import { IdentityProviderType } from "@/types/proto-es/v1/idp_service_pb";const mocks = vi.hoisted(() => ({routerPush: vi.fn(),+ routerReplace: vi.fn(),currentRoute: {value: { query: {} as Record<string, string | undefined> },},@@ -25,6 +26,8 @@ vi.mock("@/app/router", async (importOriginal) => ({...(await importOriginal<typeof import("@/app/router")>()),router: {push: mocks.routerPush,+ replace: mocks.routerReplace,+ resolve: (to: unknown) => ({ href: String(to), fullPath: String(to) }),currentRoute: mocks.currentRoute,},}));@@ -107,16 +110,15 @@ beforeEach(async () => {vi.clearAllMocks();mocks.currentRoute.value.query = {};mocks.actuatorStore = {- serverInfo: {+ authenticationInfo: {+ workspace: "workspaces/default",restriction: {disallowPasswordSignin: true,allowEmailCodeSignin: false,disallowSignup: false,},},- isSaaSMode: () => false,- activeUserCount: () => 1,- fetchServerInfo: vi.fn(async () => ({})),+ fetchAuthenticationInfo: vi.fn(async () => ({})),};mocks.identityProviderList = [{@@ -139,6 +141,58 @@ beforeEach(async () => {});describe("SigninPage", () => {+ test("redirects to signup when initial admin setup is required", async () => {+ mocks.actuatorStore = {+ authenticationInfo: {+ workspace: "",+ restriction: {+ disallowPasswordSignin: false,+ allowEmailCodeSignin: false,+ disallowSignup: false,+ },+ },+ fetchAuthenticationInfo: vi.fn(async () => ({})),+ };+ mocks.identityProviderList = [];+ mocks.listIdentityProviders.mockResolvedValue([]);++ const { render, unmount } = renderIntoContainer(<SigninPage />);+ render();+ await flushPromises();++ expect(mocks.routerReplace).toHaveBeenCalledWith({+ name: "auth.signup",+ });++ unmount();+ });++ test("does not redirect to initial setup when signup is disallowed", async () => {+ mocks.actuatorStore = {+ authenticationInfo: {+ workspace: "",+ restriction: {+ disallowPasswordSignin: false,+ allowEmailCodeSignin: false,+ disallowSignup: true,+ },+ },+ fetchAuthenticationInfo: vi.fn(async () => ({})),+ };+ mocks.identityProviderList = [];+ mocks.listIdentityProviders.mockResolvedValue([]);++ const { render, unmount } = renderIntoContainer(<SigninPage />);+ render();+ await flushPromises();++ expect(mocks.routerReplace).not.toHaveBeenCalledWith({+ name: "auth.signup",+ });++ unmount();+ });+test("renders a username text field for LDAP tabs", async () => {const { container, render, unmount } = renderIntoContainer(<SigninPage />);render();@@ -166,20 +220,18 @@ describe("SigninPage", () => {});test("renders flat OAuth-first layout when email code is the only method", async () => {- // The real cloud config: the SaaS override sets disallowSignup=true- // (it gates the password Signup RPC only) — email-code login still- // creates accounts for unknown emails, so the page is a signup surface.+ // Email-code can create an account, so its public surface always carries+ // the terms even when the restriction conservatively disallows signup.mocks.actuatorStore = {- serverInfo: {+ authenticationInfo: {+ workspace: "",restriction: {disallowPasswordSignin: true,allowEmailCodeSignin: true,disallowSignup: true,},},- isSaaSMode: () => true,- activeUserCount: () => 1,- fetchServerInfo: vi.fn(async () => ({})),+ fetchAuthenticationInfo: vi.fn(async () => ({})),};const idps = [{@@ -200,12 +252,16 @@ describe("SigninPage", () => {render();await flushPromises();+ expect(mocks.routerReplace).not.toHaveBeenCalledWith({+ name: "auth.signup",+ });+// Single method: no tab chrome at all.expect(container.querySelector('[role="tab"]')).toBeNull();expect(container.textContent).not.toContain("auth.sign-in.email-code-tab");- // Combined sign-in/sign-up copy and SaaS terms line.- expect(container.textContent).toContain("auth.sign-in.sign-in-or-create");+ // The restriction owns the signup copy; terms do not require SaaS mode.+ expect(container.textContent).toContain("auth.sign-in.sign-in-to-account");expect(container.textContent).toContain("auth.sign-in.tos");// OAuth buttons carry brand icons and "Continue with" copy.@@ -247,16 +303,15 @@ describe("SigninPage", () => {test("renders localized tab labels when multiple methods exist", async () => {mocks.actuatorStore = {- serverInfo: {+ authenticationInfo: {+ workspace: "workspaces/default",restriction: {disallowPasswordSignin: false,allowEmailCodeSignin: true,disallowSignup: false,},},- isSaaSMode: () => false,- activeUserCount: () => 1,- fetchServerInfo: vi.fn(async () => ({})),+ fetchAuthenticationInfo: vi.fn(async () => ({})),};mocks.identityProviderList = [];mocks.listIdentityProviders.mockResolvedValue([]);@@ -274,19 +329,18 @@ describe("SigninPage", () => {});test("hides terms line and signup copy on a re-auth surface", async () => {- // SessionExpiredSurface passes allowSignup={false}: same SaaS config,+ // SessionExpiredSurface passes allowSignup={false}: same email-code config,// but the user already has an account — no signup copy, no terms line.mocks.actuatorStore = {- serverInfo: {+ authenticationInfo: {+ workspace: "",restriction: {disallowPasswordSignin: true,allowEmailCodeSignin: true,disallowSignup: true,},},- isSaaSMode: () => true,- activeUserCount: () => 1,- fetchServerInfo: vi.fn(async () => ({})),+ fetchAuthenticationInfo: vi.fn(async () => ({})),};mocks.identityProviderList = [];mocks.listIdentityProviders.mockResolvedValue([]);@@ -306,18 +360,17 @@ describe("SigninPage", () => {unmount();});- test("hides terms line and signup copy outside SaaS mode", async () => {+ test("shows terms for email code without SaaS mode", async () => {mocks.actuatorStore = {- serverInfo: {+ authenticationInfo: {+ workspace: "workspaces/default",restriction: {disallowPasswordSignin: true,allowEmailCodeSignin: true,disallowSignup: true,},},- isSaaSMode: () => false,- activeUserCount: () => 1,- fetchServerInfo: vi.fn(async () => ({})),+ fetchAuthenticationInfo: vi.fn(async () => ({})),};mocks.identityProviderList = [];mocks.listIdentityProviders.mockResolvedValue([]);@@ -326,7 +379,7 @@ describe("SigninPage", () => {render();await flushPromises();- expect(container.textContent).not.toContain("auth.sign-in.tos");+ expect(container.textContent).toContain("auth.sign-in.tos");expect(container.textContent).toContain("auth.sign-in.sign-in-to-account");expect(container.textContent).not.toContain("auth.sign-in.sign-in-or-create"diff --git a/frontend/src/routes/auth/SigninPage.tsx b/frontend/src/routes/auth/SigninPage.tsxindex 11eabe560c..3be9d0df3c 100644--- a/frontend/src/routes/auth/SigninPage.tsx+++ b/frontend/src/routes/auth/SigninPage.tsx@@ -42,16 +42,18 @@ export function SigninPage(props: SigninPageProps) {const [isLoading, setIsLoading] = useState(false);const [initialized, setInitialized] = useState(false);- const serverInfo = useAppStore((s) => s.serverInfo);- const isSaaSMode = useAppStore((s) => s.isSaaSMode());- const activeUserCount = useAppStore((s) => s.activeUserCount());+ const authenticationInfo = useAppStore((s) => s.authenticationInfo);const identityProviders = useIdentityProviderList();const query = router.currentRoute.value.query;const invitedEmail = (query.email as string | undefined) ?? "";const disallowSignup =- !allowSignupProp || !!serverInfo?.restriction?.disallowSignup;+ !allowSignupProp || !!authenticationInfo?.restriction?.disallowSignup;+ const needsInitialSetup = authenticationInfo+ ? !authenticationInfo.workspace &&+ !authenticationInfo.restriction?.disallowSignup+ : false;const separatedIdps = identityProviders.filter((idp) => idp.type !== IdentityProviderType.LDAP@@ -61,19 +63,21 @@ export function SigninPage(props: SigninPageProps) {);const defaultTab = (() => {- if (serverInfo?.restriction?.allowEmailCodeSignin) return "email-code";- if (!serverInfo?.restriction?.disallowPasswordSignin) return "standard";+ if (authenticationInfo?.restriction?.allowEmailCodeSignin)+ return "email-code";+ if (!authenticationInfo?.restriction?.disallowPasswordSignin)+ return "standard";if (groupedIdps.length > 0) return groupedIdps[0].name;return "standard";})();- // Redirect to signup when an admin setup is needed.+ // A self-hosted server without a workspace needs its initial administrator.useEffect(() => {if (!initialized) return;- if (activeUserCount === 0 && !disallowSignup && !isSaaSMode) {+ if (needsInitialSetup && !disallowSignup) {router.replace({ name: AUTH_SIGNUP_MODULE });}- }, [initialized, activeUserCount, disallowSignup, isSaaSMode]);+ }, [initialized, needsInitialSetup, disallowSignup]);const trySigninWithIdp = async (idp: IdentityProvider) => {try {@@ -102,7 +106,7 @@ export function SigninPage(props: SigninPageProps) {}};- // Initial load: fetch server info + IDPs + handle `idp` query param.+ // Initial load: fetch authentication info + IDPs + handle `idp` query param.// Ref guard is critical — the `?idp=<name>` path triggers an SSO redirect// via `trySigninWithIdp`, which must not fire twice under StrictMode.const initRef = useRef(false);@@ -116,7 +120,7 @@ export function SigninPage(props: SigninPageProps) {try {const [idpList] = await Promise.all([listIdentityProviders(workspaceName),- useAppStore.getState().fetchServerInfo(workspaceName),+ useAppStore.getState().fetchAuthenticationInfo(workspaceName),]);if (idpList.length === 0 && workspaceName) {await listIdentityProviders();@@ -160,7 +164,7 @@ export function SigninPage(props: SigninPageProps) {label: string;panel: React.ReactNode;}[] = [];- if (!serverInfo?.restriction?.disallowPasswordSignin) {+ if (!authenticationInfo?.restriction?.disallowPasswordSignin) {methods.push({value: "standard",label: t("auth.sign-in.standard-tab"),@@ -185,7 +189,7 @@ export function SigninPage(props: SigninPageProps) {),});}- if (serverInfo?.restriction?.allowEmailCodeSignin) {+ if (authenticationInfo?.restriction?.allowEmailCodeSignin) {methods.push({value: "email-code",label: t("auth.sign-in.email-code-tab"),@@ -210,15 +214,13 @@ export function SigninPage(props: SigninPageProps) {});}- // The email-code flow signs an unknown email up on the spot, so the page- // doubles as the signup surface — the copy and the terms line reflect that.- // On SaaS the restriction reports disallowSignup=true, but that flag only- // gates the password Signup RPC, not email-code onboarding.+ const emailCodeEnabled = methods.some(({ value }) => value === "email-code");const combinedSignupSurface =methods.length === 1 &&methods[0].value === "email-code" &&allowSignupProp &&- (isSaaSMode || !serverInfo?.restriction?.disallowSignup);+ !authenticationInfo?.restriction?.disallowSignup;+ const showTerms = allowSignupProp && emailCodeEnabled;return (<>@@ -287,7 +289,7 @@ export function SigninPage(props: SigninPageProps) {</div>)}- {isSaaSMode && combinedSignupSurface && (+ {showTerms && (<p className="mt-6 text-center text-xs text-control-light leading-5"><Transi18nKey="auth.sign-in.tos"diff --git a/frontend/src/routes/auth/SignupPage.test.tsx b/frontend/src/routes/auth/SignupPage.test.tsxindex b1fc58f26c..734bd8dcec 100644--- a/frontend/src/routes/auth/SignupPage.test.tsx+++ b/frontend/src/routes/auth/SignupPage.test.tsx@@ -8,11 +8,12 @@ import { beforeEach, describe, expect, test, vi } from "vitest";).IS_REACT_ACT_ENVIRONMENT = true;const mocks = vi.hoisted(() => ({- activeUserCount: 0,+ workspace: "workspaces/default",+ disallowSignup: false,currentRoute: {value: { query: {} as Record<string, string | undefined> },},- loadServerInfo: vi.fn(),+ loadAuthenticationInfo: vi.fn(),replace: vi.fn(),resolve: vi.fn(() => ({ href: "/signin" })),signup: vi.fn(),@@ -29,11 +30,11 @@ vi.mock("@/app/router", async (importOriginal) => ({vi.mock("@/stores/app", () => {const getState = () => ({- activeUserCount: () => mocks.activeUserCount,- loadServerInfo: mocks.loadServerInfo,- serverInfo: {+ loadAuthenticationInfo: mocks.loadAuthenticationInfo,+ authenticationInfo: {+ workspace: mocks.workspace,restriction: {- disallowSignup: false,+ disallowSignup: mocks.disallowSignup,},},signup: mocks.signup,@@ -90,14 +91,13 @@ const renderIntoContainer = (element: ReactElement) => {beforeEach(async () => {vi.clearAllMocks();- mocks.activeUserCount = 0;+ mocks.workspace = "workspaces/default";+ mocks.disallowSignup = false;({ SignupPage } = await import("./SignupPage"));});describe("SignupPage", () => {test("centers the regular sign-up title", () => {- mocks.activeUserCount = 1;-const { container, render, unmount } = renderIntoContainer(<SignupPage />);render();@@ -109,6 +109,8 @@ describe("SignupPage", () => {});test("centers the admin setup title", () => {+ mocks.workspace = "";+const { container, render, unmount } = renderIntoContainer(<SignupPage />);render();@@ -120,4 +122,21 @@ describe("SignupPage", () => {unmount();});++ test("does not enter initial setup when signup is disallowed", () => {+ mocks.workspace = "";+ mocks.disallowSignup = true;++ const { container, render, unmount } = renderIntoContainer(<SignupPage />);+ render();++ expect(container.querySelector("h2")?.textContent).toBe(+ "auth.sign-up.title"+ );+ expect(container.textContent).not.toContain(+ "auth.sign-up.accept-terms-and-policy"+ );++ unmount();+ });});diff --git a/frontend/src/routes/auth/SignupPage.tsx b/frontend/src/routes/auth/SignupPage.tsxindex 63a7bceacf..05ed1d907f 100644--- a/frontend/src/routes/auth/SignupPage.tsx+++ b/frontend/src/routes/auth/SignupPage.tsx@@ -23,33 +23,36 @@ export function SignupPage() {const [nameManuallyEdited, setNameManuallyEdited] = useState(false);const [isLoading, setIsLoading] = useState(false);- const activeUserCount = useAppStore((s) => s.activeUserCount());- const serverInfo = useAppStore((s) => s.serverInfo);- const needAdminSetup = activeUserCount === 0;+ const authenticationInfo = useAppStore((s) => s.authenticationInfo);+ const needsInitialSetup = authenticationInfo+ ? !authenticationInfo.workspace &&+ !authenticationInfo.restriction?.disallowSignup+ : false;// This page renders outside any shell, so the workspace bootstrap hasn't- // populated the app store yet — load server info so the active-user count- // and signup restriction flags resolve.+ // populated the app store yet — load authentication info so the setup and+ // signup restriction flags resolve.useEffect(() => {- void useAppStore.getState().loadServerInfo();+ void useAppStore.getState().loadAuthenticationInfo();}, []);const [acceptTermsAndPolicy, setAcceptTermsAndPolicy] = useState(- !needAdminSetup+ !needsInitialSetup);const query = router.currentRoute.value.query;useEffect(() => {- if (!needAdminSetup && serverInfo?.restriction?.disallowSignup) {+ if (!needsInitialSetup && authenticationInfo?.restriction?.disallowSignup) {router.replace({ name: AUTH_SIGNIN_MODULE, query });}- if (needAdminSetup) {+ if (needsInitialSetup) {setAcceptTermsAndPolicy(false);}}, []);- const passwordRestriction = serverInfo?.restriction?.passwordRestriction;+ const passwordRestriction =+ authenticationInfo?.restriction?.passwordRestriction;const validation = computePasswordValidation(password,passwordConfirm,@@ -63,7 +66,7 @@ export function SignupPage() {!validation.hint &&!validation.mismatch &&acceptTermsAndPolicy &&- !serverInfo?.restriction?.disallowSignup;+ !authenticationInfo?.restriction?.disallowSignup;const onEmailChange = (value: string) => {const normalized = value.trim().toLowerCase();@@ -109,7 +112,7 @@ export function SignupPage() {<div><BytebaseLogo className="mx-auto" /><h2 className="text-2xl leading-9 font-medium text-main text-center mt-4">- {needAdminSetup ? (+ {needsInitialSetup ? (<Transi18nKey="auth.sign-up.admin-title"components={{@@ -171,7 +174,7 @@ export function SignupPage() {</div></div>- {needAdminSetup && (+ {needsInitialSetup && (<div className="w-full flex flex-row justify-start items-start gap-x-2"><Checkboxchecked={acceptTermsAndPolicy}@@ -212,7 +215,7 @@ export function SignupPage() {className="w-full"disabled={!allowSignup || isLoading}>- {needAdminSetup+ {needsInitialSetup? t("auth.sign-up.create-admin-account"): t("common.sign-up")}</Button>@@ -220,7 +223,7 @@ export function SignupPage() {</form></div>- {!needAdminSetup && (+ {!needsInitialSetup && (<AuthDivider className="mt-6"><span className="pl-2 bg-white text-control">{t("auth.sign-up.existing-user")}diff --git a/frontend/src/stores/app/auth.ts b/frontend/src/stores/app/auth.tsindex 23843ce670..a0d1e97858 100644--- a/frontend/src/stores/app/auth.ts+++ b/frontend/src/stores/app/auth.ts@@ -62,6 +62,30 @@ export const createAuthSlice: AppSliceCreator<AuthSlice> = (set, get) => ({authSessionKey: uniqueId(),isSelfEmailUpdate: false,+ loadAuthenticationInfo: async () => {+ const existing = get().authenticationInfo;+ if (existing) return existing;+ const pending = get().authenticationInfoRequest;+ if (pending) return pending;+ const request = get()+ .fetchAuthenticationInfo()+ .finally(() => set({ authenticationInfoRequest: undefined }));+ set({ authenticationInfoRequest: request });+ return request;+ },++ fetchAuthenticationInfo: async (workspace) => {+ try {+ const info = await authServiceClientConnect.getAuthenticationRestriction({+ workspace: workspace ?? get().currentUser?.workspace ?? "",+ });+ set({ authenticationInfo: info });+ return info;+ } catch {+ return undefined;+ }+ },+isLoggedIn: () => {const name = get().currentUserName;return Boolean(name) && name !== UNKNOWN_USER_NAME;@@ -160,7 +184,7 @@ export const createAuthSlice: AppSliceCreator<AuthSlice> = (set, get) => ({}get().setRequireResetPassword(resp.requireResetPassword);- await get().fetchServerInfo(user?.workspace);+ await get().fetchServerInfo();// Re-fetch the current workspace now that we're authenticated.await get().loadWorkspace();// `rootGuard` decides where "/" goes, and it reads the workspace change@@ -207,7 +231,7 @@ export const createAuthSlice: AppSliceCreator<AuthSlice> = (set, get) => ({return;}- await get().fetchServerInfo(user?.workspace);+ await get().fetchServerInfo();// See `login()`. Loaded above the onboarding branch because `SetupPage`// reads the change mode too, and its skip button navigates to "/".await get().loadWorkspaceProfile(true);diff --git a/frontend/src/stores/app/index.test.ts b/frontend/src/stores/app/index.test.tsindex 856641b1ba..07b910482e 100644--- a/frontend/src/stores/app/index.test.ts+++ b/frontend/src/stores/app/index.test.ts@@ -8,6 +8,7 @@ import {AccessGrantSchema,} from "@/types/proto-es/v1/access_grant_service_pb";import { ActuatorInfoSchema } from "@/types/proto-es/v1/actuator_service_pb";+import { AuthenticationInfoSchema } from "@/types/proto-es/v1/auth_service_pb";import {ChangelogSchema,ChangelogView,@@ -102,6 +103,7 @@ const mocks = vi.hoisted(() => ({}),signup: vi.fn(),+ getAuthenticationRestriction: vi.fn(),getActuatorInfo: vi.fn(),getWorkspace: vi.fn(),updateWorkspace: vi.fn(),@@ -191,6 +193,7 @@ vi.mock("@/api", () => ({getActuatorInfo: mocks.getActuatorInfo,},authServiceClientConnect: {+ getAuthenticationRestriction: mocks.getAuthenticationRestriction,login: mocks.login,logout: mocks.logout,signup: mocks.signup,@@ -607,10 +610,10 @@ describe("useAppStore", () => {vi.stubGlobal("location", { search: "?redirect=%2Fprojects%2Ffoo" });mocks.signup.mockResolvedValue({});mocks.getCurrentUser.mockResolvedValue(user);- // activeUserCount > 1 so `enableOnboarding()` is false and signup navigates.+ // userCountInIam > 1 so `enableOnboarding()` is false and signup navigates.mocks.getActuatorInfo.mockResolvedValue({workspace: user.workspace,- activatedUserCount: 2,+ userCountInIam: 2,});mocks.getSetting.mockResolvedValue(createProto(SettingSchema, {@@ -646,7 +649,7 @@ describe("useAppStore", () => {mocks.getCurrentUser.mockResolvedValue(user);mocks.getActuatorInfo.mockResolvedValue({workspace: user.workspace,- activatedUserCount: 2,+ userCountInIam: 2,});mocks.getSetting.mockResolvedValue(createProto(SettingSchema, {@@ -1012,34 +1015,41 @@ describe("useAppStore", () => {]);});- test("create archive and restore update activated user count when server info is loaded", async () => {+ test("create archive and restore refresh the IAM user count", async () => {mocks.createUser.mockResolvedValue(userA);mocks.deleteUser.mockResolvedValue({});mocks.undeleteUser.mockResolvedValue(userA);+ mocks.getActuatorInfo+ .mockResolvedValueOnce(+ createProto(ActuatorInfoSchema, { userCountInIam: 7 })+ )+ .mockResolvedValueOnce(+ createProto(ActuatorInfoSchema, { userCountInIam: 6 })+ )+ .mockResolvedValueOnce(+ createProto(ActuatorInfoSchema, { userCountInIam: 7 })+ )+ .mockResolvedValueOnce(+ createProto(ActuatorInfoSchema, { userCountInIam: 0 })+ );const store = createAppStore();store.setState({serverInfo: createProto(ActuatorInfoSchema, {- activatedUserCount: 2,+ userCountInIam: 2,}),});await store.getState().createUser(userA);- expect(store.getState().serverInfo?.activatedUserCount).toBe(3);+ expect(store.getState().serverInfo?.userCountInIam).toBe(7);await store.getState().archiveUser(userA.name);- expect(store.getState().serverInfo?.activatedUserCount).toBe(2);+ expect(store.getState().serverInfo?.userCountInIam).toBe(6);await store.getState().restoreUser(userA.name);- expect(store.getState().serverInfo?.activatedUserCount).toBe(3);-- store.setState({- serverInfo: createProto(ActuatorInfoSchema, {- activatedUserCount: 0,- }),- });+ expect(store.getState().serverInfo?.userCountInIam).toBe(7);await store.getState().archiveUser(userA.name);- expect(store.getState().serverInfo?.activatedUserCount).toBe(0);+ expect(store.getState().serverInfo?.userCountInIam).toBe(0);});test("lists, upserts, and deletes roles", async () => {@@ -1859,6 +1869,26 @@ describe("useAppStore", () => {expect(store.getState().userCountInIam()).toBe(7);});+ test("loads authentication info without fetching actuator info", async () => {+ const info = createProto(AuthenticationInfoSchema, {+ workspace: "workspaces/pre-login",+ });+ mocks.getAuthenticationRestriction.mockResolvedValue(info);+ const store = createAppStore();++ await store.getState().loadAuthenticationInfo();++ expect(mocks.getAuthenticationRestriction).toHaveBeenCalledWith({+ workspace: "",+ });+ expect(mocks.getActuatorInfo).not.toHaveBeenCalled();+ expect(store.getState().authenticationInfo).toBe(info);+ expect(store.getState().isSaaSMode()).toBe(false);+ expect(store.getState().workspaceResourceName()).toBe(+ "workspaces/pre-login"+ );+ });+test("derives subscription limits and feature state", () => {const store = createAppStore();store.setState({diff --git a/frontend/src/stores/app/types.ts b/frontend/src/stores/app/types.tsindex 2dcb7a7a4b..b6beb20bea 100644--- a/frontend/src/stores/app/types.ts+++ b/frontend/src/stores/app/types.ts@@ -7,7 +7,10 @@ import type { Permission } from "@/types/iam/permission";import type { NotificationCreate } from "@/types/notification";import type { AccessGrant } from "@/types/proto-es/v1/access_grant_service_pb";import type { ActuatorInfo } from "@/types/proto-es/v1/actuator_service_pb";-import type { LoginRequest } from "@/types/proto-es/v1/auth_service_pb";+import type {+ AuthenticationInfo,+ LoginRequest,+} from "@/types/proto-es/v1/auth_service_pb";import type {Changelog,ChangelogView,@@ -177,6 +180,8 @@ export type ListAccessGrantsParams = {};export type AuthSlice = {+ authenticationInfo?: AuthenticationInfo;+ authenticationInfoRequest?: Promise<AuthenticationInfo | undefined>;currentUser?: User;currentUserRequest?: Promise<User | undefined>;// Resource name `users/{email}` of the signed-in user. Mirrors the legacy@@ -185,6 +190,10 @@ export type AuthSlice = {unauthenticatedOccurred: boolean;authSessionKey: string;isSelfEmailUpdate: boolean;+ loadAuthenticationInfo: () => Promise<AuthenticationInfo | undefined>;+ fetchAuthenticationInfo: (+ workspace?: string+ ) => Promise<AuthenticationInfo | undefined>;loadCurrentUser: () => Promise<User | undefined>;isLoggedIn: () => boolean;requireResetPassword: () => boolean;@@ -228,11 +237,7 @@ export type WorkspaceSlice = {paymentInfo?: PaymentInfo;loadServerInfo: () => Promise<ActuatorInfo | undefined>;refreshServerInfo: () => Promise<ActuatorInfo | undefined>;- // Alias for the legacy Pinia `actuatorStore.fetchServerInfo(workspace?)`- // so consumers map 1:1. Delegates to the slice's refresh path.- fetchServerInfo: (- workspaceResourceName?: string- ) => Promise<ActuatorInfo | undefined>;+ fetchServerInfo: () => Promise<ActuatorInfo | undefined>;loadWorkspace: () => Promise<Workspace | undefined>;loadWorkspaceList: () => Promise<Workspace[]>;updateWorkspace: (@@ -302,7 +307,6 @@ export type WorkspaceSlice = {totalInstanceCount: () => number;userCountInIam: () => number;activeVcsUserCount: () => number;- activeUserCount: () => number;enableOnboarding: () => boolean;quickStartEnabled: () => boolean;setupSample: () => Promise<void>;diff --git a/frontend/src/stores/app/user.ts b/frontend/src/stores/app/user.tsindex 19d272f828..699d8b8a49 100644--- a/frontend/src/stores/app/user.ts+++ b/frontend/src/stores/app/user.ts@@ -47,23 +47,6 @@ export const buildUserFilter = (params: UserFilter) => {};export const createUserSlice: AppSliceCreator<UserSlice> = (set, get) => {- const adjustActivatedUserCount = (delta: number) => {- set((state) => {- if (!state.serverInfo) {- return {};- }- return {- serverInfo: {- ...state.serverInfo,- activatedUserCount: Math.max(- 0,- state.serverInfo.activatedUserCount + delta- ),- },- };- });- };-return {usersByName: { [allUsersUser().name]: allUsersUser() },userRequests: {},@@ -195,7 +178,9 @@ export const createUserSlice: AppSliceCreator<UserSlice> = (set, get) => {set((state) => ({usersByName: { ...state.usersByName, [response.name]: response },}));- adjustActivatedUserCount(1);+ await get()+ .refreshServerInfo()+ .catch(() => undefined);return response;},@@ -277,7 +262,9 @@ export const createUserSlice: AppSliceCreator<UserSlice> = (set, get) => {},};});- adjustActivatedUserCount(-1);+ await get()+ .refreshServerInfo()+ .catch(() => undefined);},restoreUser: async (name) => {@@ -289,7 +276,9 @@ export const createUserSlice: AppSliceCreator<UserSlice> = (set, get) => {set((state) => ({usersByName: { ...state.usersByName, [response.name]: response },}));- adjustActivatedUserCount(1);+ await get()+ .refreshServerInfo()+ .catch(() => undefined);return response;},};diff --git a/frontend/src/stores/app/workspace.ts b/frontend/src/stores/app/workspace.tsindex 163a4aaa03..faa1269032 100644--- a/frontend/src/stores/app/workspace.ts+++ b/frontend/src/stores/app/workspace.ts@@ -209,7 +209,7 @@ export const createWorkspaceSlice: AppSliceCreator<WorkspaceSlice> = (const pending = get().serverInfoRequest;if (pending) return pending;const request = actuatorServiceClientConnect- .getActuatorInfo({ name: get().currentUser?.workspace ?? "" })+ .getActuatorInfo({}).then((info) => {set({serverInfo: info,@@ -227,9 +227,7 @@ export const createWorkspaceSlice: AppSliceCreator<WorkspaceSlice> = (},refreshServerInfo: async () => {- const info = await actuatorServiceClientConnect.getActuatorInfo({- name: get().currentUser?.workspace ?? get().serverInfo?.workspace ?? "",- });+ const info = await actuatorServiceClientConnect.getActuatorInfo({});set({ serverInfo: info, serverInfoTs: Date.now() });return info;},@@ -658,7 +656,8 @@ export const createWorkspaceSlice: AppSliceCreator<WorkspaceSlice> = (isSaaSMode: () => get().serverInfo?.saas ?? false,- workspaceResourceName: () => get().serverInfo?.workspace ?? "",+ workspaceResourceName: () =>+ get().serverInfo?.workspace ?? get().authenticationInfo?.workspace ?? "",externalUrl: () => get().serverInfo?.externalUrl ?? "",@@ -687,10 +686,7 @@ export const createWorkspaceSlice: AppSliceCreator<WorkspaceSlice> = (activeVcsUserCount: () => get().serverInfo?.activeVcsUserCount ?? 0,- activeUserCount: () => get().serverInfo?.activatedUserCount ?? 0,-- enableOnboarding: () =>- get().activeUserCount() === 1 && !get().isSaaSMode(),+ enableOnboarding: () => get().userCountInIam() === 1 && !get().isSaaSMode(),quickStartEnabled: () => {if (get().appFeatures["bb.feature.hide-quick-start"]) {@@ -699,18 +695,15 @@ export const createWorkspaceSlice: AppSliceCreator<WorkspaceSlice> = (if (!get().serverInfo?.enableSample) {return false;}- return get().activeUserCount() <= 1;+ return get().userCountInIam() <= 1;},setupSample: async () => {await actuatorServiceClientConnect.setupSample({});},- // Alias for the legacy Pinia `actuatorStore.fetchServerInfo(workspace?)`.- fetchServerInfo: async (workspaceResourceName) => {- const info = await actuatorServiceClientConnect.getActuatorInfo({- name: workspaceResourceName ?? get().serverInfo?.workspace ?? "",- });+ fetchServerInfo: async () => {+ const info = await actuatorServiceClientConnect.getActuatorInfo({});set({ serverInfo: info, serverInfoTs: Date.now() });return info;},@@ -759,7 +752,7 @@ export const createWorkspaceSlice: AppSliceCreator<WorkspaceSlice> = (),});// Refresh the latest server info (mirrors the Pinia store).- await get().fetchServerInfo(get().workspaceResourceName());+ await get().fetchServerInfo();},fetchEnvironments: async (force = false) => {diff --git a/frontend/src/types/proto-es/v1/actuator_service_pb.d.ts b/frontend/src/types/proto-es/v1/actuator_service_pb.d.tsindex a679d1916b..b8be772db8 100644--- a/frontend/src/types/proto-es/v1/actuator_service_pb.d.ts+++ b/frontend/src/types/proto-es/v1/actuator_service_pb.d.ts@@ -4,7 +4,6 @@import type { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2";import type { Message } from "@bufbuild/protobuf";-import type { WorkspaceProfileSetting_PasswordRestriction } from "./setting_service_pb";import type { EmptySchema, Timestamp } from "@bufbuild/protobuf/wkt";/**@@ -32,15 +31,6 @@ export declare const SetupSampleRequestSchema: GenMessage<SetupSampleRequest>;* @generated from message bytebase.v1.GetActuatorInfoRequest*/export declare type GetActuatorInfoRequest = Message<"bytebase.v1.GetActuatorInfoRequest"> & {- /**- * 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).- *- * @generated from field: string name = 1;- */- name: string;};/**@@ -49,53 +39,6 @@ export declare type GetActuatorInfoRequest = Message<"bytebase.v1.GetActuatorInf*/export declare const GetActuatorInfoRequestSchema: GenMessage<GetActuatorInfoRequest>;-/**- * @generated from message bytebase.v1.Restriction- */-export declare type Restriction = Message<"bytebase.v1.Restriction"> & {- /**- * Whether self-service user signup is disabled.- *- * @generated from field: bool disallow_signup = 1;- */- disallowSignup: boolean;-- /**- * Whether password sign-in is disabled for all end users.- *- * @generated from field: bool disallow_password_signin = 2;- */- disallowPasswordSignin: boolean;-- /**- * Password complexity and restriction requirements.- *- * @generated from field: bytebase.v1.WorkspaceProfileSetting.PasswordRestriction password_restriction = 3;- */- passwordRestriction?: WorkspaceProfileSetting_PasswordRestriction | undefined;-- /**- * Whether email + 6-digit code signin is enabled for this workspace.- *- * @generated from field: bool allow_email_code_signin = 4;- */- allowEmailCodeSignin: boolean;-- /**- * Whether password reset via email is available for this workspace.- * True when the workspace (or deployment) has an email setting configured.- *- * @generated from field: bool password_reset_enabled = 5;- */- passwordResetEnabled: boolean;-};--/**- * Describes the message bytebase.v1.Restriction.- * Use `create(RestrictionSchema)` to create a new message.- */-export declare const RestrictionSchema: GenMessage<Restriction>;-/*** System information and configuration for the Bytebase instance.* Actuator concept is similar to the Spring Boot Actuator.@@ -117,13 +60,6 @@ export declare type ActuatorInfo = Message<"bytebase.v1.ActuatorInfo"> & {*/gitCommit: string;- /**- * Whether the Bytebase instance is running in read-only mode.- *- * @generated from field: bool readonly = 3;- */- readonly: boolean;-/*** Whether the Bytebase instance is running in SaaS mode where some features cannot be edited by users.*@@ -131,20 +67,6 @@ export declare type ActuatorInfo = Message<"bytebase.v1.ActuatorInfo"> & {*/saas: boolean;- /**- * The host address of the Bytebase instance.- *- * @generated from field: string host = 6;- */- host: string;-- /**- * The port number of the Bytebase instance.- *- * @generated from field: string port = 7;- */- port: string;-/*** The external URL where users or webhook callbacks access Bytebase.*@@ -174,20 +96,6 @@ export declare type ActuatorInfo = Message<"bytebase.v1.ActuatorInfo"> & {*/unlicensedFeatures: string[];- /**- * Whether the Bytebase instance is running in Docker.- *- * @generated from field: bool docker = 18;- */- docker: boolean;-- /**- * The number of activated users.- *- * @generated from field: int32 activated_user_count = 19;- */- activatedUserCount: number;-/*** The number of activated database instances.*@@ -223,11 +131,6 @@ export declare type ActuatorInfo = Message<"bytebase.v1.ActuatorInfo"> & {*/replicaCount: number;- /**- * @generated from field: bytebase.v1.Restriction restriction = 25;- */- restriction?: Restriction | undefined;-/*** The default project for unassigned databases.* Format: projects/{id}@@ -265,9 +168,8 @@ export declare const ActuatorInfoSchema: GenMessage<ActuatorInfo>;export declare const ActuatorService: GenService<{/*** 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+ * The workspace is resolved from the authenticated session.+ * Permissions required: None (authentication required)** @generated from rpc bytebase.v1.ActuatorService.GetActuatorInfo*/diff --git a/frontend/src/types/proto-es/v1/actuator_service_pb.js b/frontend/src/types/proto-es/v1/actuator_service_pb.jsindex b7aa99f725..395d1606e9 100644--- a/frontend/src/types/proto-es/v1/actuator_service_pb.js+++ b/frontend/src/types/proto-es/v1/actuator_service_pb.js@@ -6,16 +6,14 @@ import { fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv2import { file_google_api_annotations } from "../google/api/annotations_pb";import { file_google_api_client } from "../google/api/client_pb";import { file_google_api_field_behavior } from "../google/api/field_behavior_pb";-import { file_google_api_resource } from "../google/api/resource_pb";import { file_google_protobuf_empty, file_google_protobuf_timestamp } from "@bufbuild/protobuf/wkt";import { file_v1_annotation } from "./annotation_pb";-import { file_v1_setting_service } from "./setting_service_pb";/*** Describes the file v1/actuator_service.proto.*/export const file_v1_actuator_service = /*@__PURE__*/- fileDesc("Chl2MS9hY3R1YXRvcl9zZXJ2aWNlLnByb3RvEgtieXRlYmFzZS52MSIUChJTZXR1cFNhbXBsZVJlcXVlc3QiQwoWR2V0QWN0dWF0b3JJbmZvUmVxdWVzdBIpCgRuYW1lGAEgASgJQhv6QRgKFmJ5dGViYXNlLmNvbS9Xb3Jrc3BhY2Ui+gEKC1Jlc3RyaWN0aW9uEhwKD2Rpc2FsbG93X3NpZ251cBgBIAEoCEID4EEDEiUKGGRpc2FsbG93X3Bhc3N3b3JkX3NpZ25pbhgCIAEoCEID4EEDElsKFHBhc3N3b3JkX3Jlc3RyaWN0aW9uGAMgASgLMjguYnl0ZWJhc2UudjEuV29ya3NwYWNlUHJvZmlsZVNldHRpbmcuUGFzc3dvcmRSZXN0cmljdGlvbkID4EEDEiQKF2FsbG93X2VtYWlsX2NvZGVfc2lnbmluGAQgASgIQgPgQQMSIwoWcGFzc3dvcmRfcmVzZXRfZW5hYmxlZBgFIAEoCEID4EEDIrwFCgxBY3R1YXRvckluZm8SFAoHdmVyc2lvbhgBIAEoCUID4EEDEhcKCmdpdF9jb21taXQYAiABKAlCA+BBAxIVCghyZWFkb25seRgDIAEoCEID4EEDEhEKBHNhYXMYBCABKAhCA+BBAxIRCgRob3N0GAYgASgJQgPgQQMSEQoEcG9ydBgHIAEoCUID4EEDEhkKDGV4dGVybmFsX3VybBgIIAEoCUID4EEDEjkKEGxhc3RfYWN0aXZlX3RpbWUYCyABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wQgPgQQMSFgoJd29ya3NwYWNlGA0gASgJQgPgQQMSIAoTdW5saWNlbnNlZF9mZWF0dXJlcxgPIAMoCUID4EEDEhMKBmRvY2tlchgSIAEoCEID4EEDEiEKFGFjdGl2YXRlZF91c2VyX2NvdW50GBMgASgFQgPgQQMSJQoYYWN0aXZhdGVkX2luc3RhbmNlX2NvdW50GBQgASgFQgPgQQMSIQoUdG90YWxfaW5zdGFuY2VfY291bnQYFSABKAVCA+BBAxIaCg1lbmFibGVfc2FtcGxlGBYgASgIQgPgQQMSIwoWZXh0ZXJuYWxfdXJsX2Zyb21fZmxhZxgXIAEoCEID4EEDEhoKDXJlcGxpY2FfY291bnQYGCABKAVCA+BBAxIyCgtyZXN0cmljdGlvbhgZIAEoCzIYLmJ5dGViYXNlLnYxLlJlc3RyaWN0aW9uQgPgQQMSHAoPZGVmYXVsdF9wcm9qZWN0GBogASgJQgPgQQMSHgoRdXNlcl9jb3VudF9pbl9pYW0YGyABKAVCA+BBAxIiChVhY3RpdmVfdmNzX3VzZXJfY291bnQYHCABKAVCA+BBA0oECAUQBkoECAkQCkoECAoQC0oECAwQDUoECBAQEUoECBEQEkoECA4QDzK5AgoPQWN0dWF0b3JTZXJ2aWNlEpwBCg9HZXRBY3R1YXRvckluZm8SIy5ieXRlYmFzZS52MS5HZXRBY3R1YXRvckluZm9SZXF1ZXN0GhkuYnl0ZWJhc2UudjEuQWN0dWF0b3JJbmZvIknaQQCA6jABgtPkkwI8WicSJS92MS97bmFtZT13b3Jrc3BhY2VzLyp9L2FjdHVhdG9yL2luZm8SES92MS9hY3R1YXRvci9pbmZvEoYBCgtTZXR1cFNhbXBsZRIfLmJ5dGViYXNlLnYxLlNldHVwU2FtcGxlUmVxdWVzdBoWLmdvb2dsZS5wcm90b2J1Zi5FbXB0eSI+iuowEmJiLnByb2plY3RzLmNyZWF0ZZDqMAGY6jABgtPkkwIaIhgvdjEvYWN0dWF0b3I6c2V0dXBTYW1wbGVCqgEKD2NvbS5ieXRlYmFzZS52MUIUQWN0dWF0b3JTZXJ2aWNlUHJvdG9QAVo0Z2l0aHViLmNvbS9ieXRlYmFzZS9ieXRlYmFzZS9iYWNrZW5kL2dlbmVyYXRlZC1nby92MaICA0JYWKoCC0J5dGViYXNlLlYxygILQnl0ZWJhc2VcVjHiAhdCeXRlYmFzZVxWMVxHUEJNZXRhZGF0YeoCDEJ5dGViYXNlOjpWMWIGcHJvdG8z", [file_google_api_annotations, file_google_api_client, file_google_api_field_behavior, file_google_api_resource, file_google_protobuf_empty, file_google_protobuf_timestamp, file_v1_annotation, file_v1_setting_service]);+ fileDesc("Chl2MS9hY3R1YXRvcl9zZXJ2aWNlLnByb3RvEgtieXRlYmFzZS52MSIUChJTZXR1cFNhbXBsZVJlcXVlc3QiGAoWR2V0QWN0dWF0b3JJbmZvUmVxdWVzdCKZBAoMQWN0dWF0b3JJbmZvEhQKB3ZlcnNpb24YASABKAlCA+BBAxIXCgpnaXRfY29tbWl0GAIgASgJQgPgQQMSEQoEc2FhcxgEIAEoCEID4EEDEhkKDGV4dGVybmFsX3VybBgIIAEoCUID4EEDEjkKEGxhc3RfYWN0aXZlX3RpbWUYCyABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wQgPgQQMSFgoJd29ya3NwYWNlGA0gASgJQgPgQQMSIAoTdW5saWNlbnNlZF9mZWF0dXJlcxgPIAMoCUID4EEDEiUKGGFjdGl2YXRlZF9pbnN0YW5jZV9jb3VudBgUIAEoBUID4EEDEiEKFHRvdGFsX2luc3RhbmNlX2NvdW50GBUgASgFQgPgQQMSGgoNZW5hYmxlX3NhbXBsZRgWIAEoCEID4EEDEiMKFmV4dGVybmFsX3VybF9mcm9tX2ZsYWcYFyABKAhCA+BBAxIaCg1yZXBsaWNhX2NvdW50GBggASgFQgPgQQMSHAoPZGVmYXVsdF9wcm9qZWN0GBogASgJQgPgQQMSHgoRdXNlcl9jb3VudF9pbl9pYW0YGyABKAVCA+BBAxIiChVhY3RpdmVfdmNzX3VzZXJfY291bnQYHCABKAVCA+BBA0oECAMQBEoECAUQCEoECAkQCkoECAoQC0oECAwQDUoECA4QD0oECBAQFEoECBkQGjKLAgoPQWN0dWF0b3JTZXJ2aWNlEm8KD0dldEFjdHVhdG9ySW5mbxIjLmJ5dGViYXNlLnYxLkdldEFjdHVhdG9ySW5mb1JlcXVlc3QaGS5ieXRlYmFzZS52MS5BY3R1YXRvckluZm8iHNpBAILT5JMCExIRL3YxL2FjdHVhdG9yL2luZm8ShgEKC1NldHVwU2FtcGxlEh8uYnl0ZWJhc2UudjEuU2V0dXBTYW1wbGVSZXF1ZXN0GhYuZ29vZ2xlLnByb3RvYnVmLkVtcHR5Ij6K6jASYmIucHJvamVjdHMuY3JlYXRlkOowAZjqMAGC0+STAhoiGC92MS9hY3R1YXRvcjpzZXR1cFNhbXBsZUKqAQoPY29tLmJ5dGViYXNlLnYxQhRBY3R1YXRvclNlcnZpY2VQcm90b1ABWjRnaXRodWIuY29tL2J5dGViYXNlL2J5dGViYXNlL2JhY2tlbmQvZ2VuZXJhdGVkLWdvL3YxogIDQlhYqgILQnl0ZWJhc2UuVjHKAgtCeXRlYmFzZVxWMeICF0J5dGViYXNlXFYxXEdQQk1ldGFkYXRh6gIMQnl0ZWJhc2U6OlYxYgZwcm90bzM", [file_google_api_annotations, file_google_api_client, file_google_api_field_behavior, file_google_protobuf_empty, file_google_protobuf_timestamp, file_v1_annotation]);/*** Describes the message bytebase.v1.SetupSampleRequest.@@ -31,19 +29,12 @@ export const SetupSampleRequestSchema = /*@__PURE__*/export const GetActuatorInfoRequestSchema = /*@__PURE__*/messageDesc(file_v1_actuator_service, 1);-/**- * Describes the message bytebase.v1.Restriction.- * Use `create(RestrictionSchema)` to create a new message.- */-export const RestrictionSchema = /*@__PURE__*/- messageDesc(file_v1_actuator_service, 2);-/*** Describes the message bytebase.v1.ActuatorInfo.* Use `create(ActuatorInfoSchema)` to create a new message.*/export const ActuatorInfoSchema = /*@__PURE__*/- messageDesc(file_v1_actuator_service, 3);+ messageDesc(file_v1_actuator_service, 2);/*** ActuatorService manages system health and operational information.diff --git a/frontend/src/types/proto-es/v1/auth_service_pb.d.ts b/frontend/src/types/proto-es/v1/auth_service_pb.d.tsindex c448b75752..72328769f8 100644--- a/frontend/src/types/proto-es/v1/auth_service_pb.d.ts+++ b/frontend/src/types/proto-es/v1/auth_service_pb.d.ts@@ -4,6 +4,7 @@import type { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2";import type { Message } from "@bufbuild/protobuf";+import type { WorkspaceProfileSetting_PasswordRestriction } from "./setting_service_pb";import type { User } from "./user_service_pb";import type { EmptySchema } from "@bufbuild/protobuf/wkt";@@ -12,6 +13,100 @@ import type { EmptySchema } from "@bufbuild/protobuf/wkt";*/export declare const file_v1_auth_service: GenFile;+/**+ * @generated from message bytebase.v1.GetAuthenticationRestrictionRequest+ */+export declare type GetAuthenticationRestrictionRequest = Message<"bytebase.v1.GetAuthenticationRestrictionRequest"> & {+ /**+ * Optional. The workspace whose authentication policy should be returned.+ * Format: workspaces/{workspace}+ * When unset, self-hosted resolves the singleton workspace and SaaS uses+ * the deployment-level defaults.+ *+ * @generated from field: string workspace = 1;+ */+ workspace: string;+};++/**+ * Describes the message bytebase.v1.GetAuthenticationRestrictionRequest.+ * Use `create(GetAuthenticationRestrictionRequestSchema)` to create a new message.+ */+export declare const GetAuthenticationRestrictionRequestSchema: GenMessage<GetAuthenticationRestrictionRequest>;++/**+ * @generated from message bytebase.v1.AuthenticationInfo+ */+export declare type AuthenticationInfo = Message<"bytebase.v1.AuthenticationInfo"> & {+ /**+ * The workspace used for authentication, when one can be resolved.+ * Format: workspaces/{workspace}+ *+ * @generated from field: string workspace = 1;+ */+ workspace: string;++ /**+ * The effective authentication restrictions.+ *+ * @generated from field: bytebase.v1.Restriction restriction = 2;+ */+ restriction?: Restriction | undefined;+};++/**+ * Describes the message bytebase.v1.AuthenticationInfo.+ * Use `create(AuthenticationInfoSchema)` to create a new message.+ */+export declare const AuthenticationInfoSchema: GenMessage<AuthenticationInfo>;++/**+ * @generated from message bytebase.v1.Restriction+ */+export declare type Restriction = Message<"bytebase.v1.Restriction"> & {+ /**+ * Whether self-service user signup is disabled.+ *+ * @generated from field: bool disallow_signup = 1;+ */+ disallowSignup: boolean;++ /**+ * Whether password sign-in is disabled for all end users.+ *+ * @generated from field: bool disallow_password_signin = 2;+ */+ disallowPasswordSignin: boolean;++ /**+ * Password complexity and restriction requirements.+ *+ * @generated from field: bytebase.v1.WorkspaceProfileSetting.PasswordRestriction password_restriction = 3;+ */+ passwordRestriction?: WorkspaceProfileSetting_PasswordRestriction | undefined;++ /**+ * Whether email + 6-digit code signin is enabled for this workspace.+ *+ * @generated from field: bool allow_email_code_signin = 4;+ */+ allowEmailCodeSignin: boolean;++ /**+ * Whether password reset via email is available for this workspace.+ * True when the workspace (or deployment) has an email setting configured.+ *+ * @generated from field: bool password_reset_enabled = 5;+ */+ passwordResetEnabled: boolean;+};++/**+ * Describes the message bytebase.v1.Restriction.+ * Use `create(RestrictionSchema)` to create a new message.+ */+export declare const RestrictionSchema: GenMessage<Restriction>;+/*** @generated from message bytebase.v1.LoginRequest*/@@ -473,6 +568,17 @@ export declare const SwitchWorkspaceRequestSchema: GenMessage<SwitchWorkspaceReq* @generated from service bytebase.v1.AuthService*/export declare const AuthService: GenService<{+ /**+ * Gets the effective restrictions needed to render authentication flows.+ * Permissions required: None+ *+ * @generated from rpc bytebase.v1.AuthService.GetAuthenticationRestriction+ */+ getAuthenticationRestriction: {+ methodKind: "unary";+ input: typeof GetAuthenticationRestrictionRequestSchema;+ output: typeof AuthenticationInfoSchema;+ },/*** Authenticates a user and returns access tokens.* Permissions required: Nonediff --git a/frontend/src/types/proto-es/v1/auth_service_pb.js b/frontend/src/types/proto-es/v1/auth_service_pb.jsindex 4e6af8552f..6455d6d266 100644--- a/frontend/src/types/proto-es/v1/auth_service_pb.js+++ b/frontend/src/types/proto-es/v1/auth_service_pb.js@@ -4,120 +4,145 @@import { fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv2";import { file_google_api_annotations } from "../google/api/annotations_pb";+import { file_google_api_client } from "../google/api/client_pb";+import { file_google_api_field_behavior } from "../google/api/field_behavior_pb";+import { file_google_api_resource } from "../google/api/resource_pb";import { file_google_protobuf_empty } from "@bufbuild/protobuf/wkt";import { file_v1_annotation } from "./annotation_pb";+import { file_v1_setting_service } from "./setting_service_pb";import { file_v1_user_service } from "./user_service_pb";/*** Describes the file v1/auth_service.proto.*/export const file_v1_auth_service = /*@__PURE__*/- fileDesc("ChV2MS9hdXRoX3NlcnZpY2UucHJvdG8SC2J5dGViYXNlLnYxItkCCgxMb2dpblJlcXVlc3QSDQoFZW1haWwYASABKAkSEAoIcGFzc3dvcmQYAiABKAkSCwoDd2ViGAMgASgIEhAKCGlkcF9uYW1lGAQgASgJEjkKC2lkcF9jb250ZXh0GAUgASgLMiQuYnl0ZWJhc2UudjEuSWRlbnRpdHlQcm92aWRlckNvbnRleHQSFQoIb3RwX2NvZGUYBiABKAlIAIgBARIaCg1yZWNvdmVyeV9jb2RlGAcgASgJSAGIAQESGwoObWZhX3RlbXBfdG9rZW4YCCABKAlIAogBARIXCgplbWFpbF9jb2RlGAkgASgJSAOIAQESFgoJd29ya3NwYWNlGAogASgJSASIAQFCCwoJX290cF9jb2RlQhAKDl9yZWNvdmVyeV9jb2RlQhEKD19tZmFfdGVtcF90b2tlbkINCgtfZW1haWxfY29kZUIMCgpfd29ya3NwYWNlIqwBChdJZGVudGl0eVByb3ZpZGVyQ29udGV4dBJECg5vYXV0aDJfY29udGV4dBgBIAEoCzIqLmJ5dGViYXNlLnYxLk9BdXRoMklkZW50aXR5UHJvdmlkZXJDb250ZXh0SAASQAoMb2lkY19jb250ZXh0GAIgASgLMiguYnl0ZWJhc2UudjEuT0lEQ0lkZW50aXR5UHJvdmlkZXJDb250ZXh0SABCCQoHY29udGV4dCItCh1PQXV0aDJJZGVudGl0eVByb3ZpZGVyQ29udGV4dBIMCgRjb2RlGAEgASgJIisKG09JRENJZGVudGl0eVByb3ZpZGVyQ29udGV4dBIMCgRjb2RlGAEgASgJIo8BCg1Mb2dpblJlc3BvbnNlEg0KBXRva2VuGAEgASgJEhsKDm1mYV90ZW1wX3Rva2VuGAIgASgJSACIAQESHgoWcmVxdWlyZV9yZXNldF9wYXNzd29yZBgDIAEoCBIfCgR1c2VyGAQgASgLMhEuYnl0ZWJhc2UudjEuVXNlckIRCg9fbWZhX3RlbXBfdG9rZW4iDwoNTG9nb3V0UmVxdWVzdCI0ChRFeGNoYW5nZVRva2VuUmVxdWVzdBINCgV0b2tlbhgBIAEoCRINCgVlbWFpbBgCIAEoCSItChVFeGNoYW5nZVRva2VuUmVzcG9uc2USFAoMYWNjZXNzX3Rva2VuGAEgASgJIj8KDVNpZ251cFJlcXVlc3QSDQoFZW1haWwYASABKAkSEAoIcGFzc3dvcmQYAiABKAkSDQoFdGl0bGUYAyABKAkiEAoOUmVmcmVzaFJlcXVlc3QiEQoPUmVmcmVzaFJlc3BvbnNlIlIKG1JlcXVlc3RQYXNzd29yZFJlc2V0UmVxdWVzdBINCgVlbWFpbBgBIAEoCRIWCgl3b3Jrc3BhY2UYAiABKAlIAIgBAUIMCgpfd29ya3NwYWNlIkkKFFJlc2V0UGFzc3dvcmRSZXF1ZXN0Eg0KBWVtYWlsGAEgASgJEgwKBGNvZGUYAiABKAkSFAoMbmV3X3Bhc3N3b3JkGAMgASgJIlAKGVNlbmRFbWFpbExvZ2luQ29kZVJlcXVlc3QSDQoFZW1haWwYASABKAkSFgoJd29ya3NwYWNlGAIgASgJSACIAQFCDAoKX3dvcmtzcGFjZSK6AQoWU3dpdGNoV29ya3NwYWNlUmVxdWVzdBIRCgl3b3Jrc3BhY2UYASABKAkSCwoDd2ViGAIgASgIEhUKCG90cF9jb2RlGAMgASgJSACIAQESGgoNcmVjb3ZlcnlfY29kZRgEIAEoCUgBiAEBEhsKDm1mYV90ZW1wX3Rva2VuGAUgASgJSAKIAQFCCwoJX290cF9jb2RlQhAKDl9yZWNvdmVyeV9jb2RlQhEKD19tZmFfdGVtcF90b2tlbjL0CAoLQXV0aFNlcnZpY2USaQoFTG9naW4SGS5ieXRlYmFzZS52MS5Mb2dpblJlcXVlc3QaGi5ieXRlYmFzZS52MS5Mb2dpblJlc3BvbnNlIimA6jABmOowAaDqMAOo6jABgtPkkwITOgEqIg4vdjEvYXV0aC9sb2dpbhJoCgZMb2dvdXQSGi5ieXRlYmFzZS52MS5Mb2dvdXRSZXF1ZXN0GhYuZ29vZ2xlLnByb3RvYnVmLkVtcHR5IiqA6jABmOowAaDqMAOo6jAEgtPkkwIUOgEqIg8vdjEvYXV0aC9sb2dvdXQSiQEKDUV4Y2hhbmdlVG9rZW4SIS5ieXRlYmFzZS52MS5FeGNoYW5nZVRva2VuUmVxdWVzdBoiLmJ5dGViYXNlLnYxLkV4Y2hhbmdlVG9rZW5SZXNwb25zZSIxgOowAZjqMAGg6jADqOowAYLT5JMCGzoBKiIWL3YxL2F1dGg6ZXhjaGFuZ2VUb2tlbhJsCgZTaWdudXASGi5ieXRlYmFzZS52MS5TaWdudXBSZXF1ZXN0GhouYnl0ZWJhc2UudjEuTG9naW5SZXNwb25zZSIqgOowAZjqMAGg6jADqOowAYLT5JMCFDoBKiIPL3YxL2F1dGgvc2lnbnVwEm0KB1JlZnJlc2gSGy5ieXRlYmFzZS52MS5SZWZyZXNoUmVxdWVzdBocLmJ5dGViYXNlLnYxLlJlZnJlc2hSZXNwb25zZSIngOowAaDqMAOo6jABgtPkkwIVOgEqIhAvdjEvYXV0aC9yZWZyZXNoEoMBCg9Td2l0Y2hXb3Jrc3BhY2USIy5ieXRlYmFzZS52MS5Td2l0Y2hXb3Jrc3BhY2VSZXF1ZXN0GhouYnl0ZWJhc2UudjEuTG9naW5SZXNwb25zZSIvkOowAqDqMAOo6jABgtPkkwIdOgEqIhgvdjEvYXV0aDpzd2l0Y2hXb3Jrc3BhY2USkgEKFFJlcXVlc3RQYXNzd29yZFJlc2V0EiguYnl0ZWJhc2UudjEuUmVxdWVzdFBhc3N3b3JkUmVzZXRSZXF1ZXN0GhYuZ29vZ2xlLnByb3RvYnVmLkVtcHR5IjiA6jABmOowAaDqMAOo6jACgtPkkwIiOgEqIh0vdjEvYXV0aDpyZXF1ZXN0UGFzc3dvcmRSZXNldBJ9Cg1SZXNldFBhc3N3b3JkEiEuYnl0ZWJhc2UudjEuUmVzZXRQYXNzd29yZFJlcXVlc3QaFi5nb29nbGUucHJvdG9idWYuRW1wdHkiMYDqMAGY6jABoOowA6jqMAKC0+STAhs6ASoiFi92MS9hdXRoOnJlc2V0UGFzc3dvcmQSjAEKElNlbmRFbWFpbExvZ2luQ29kZRImLmJ5dGViYXNlLnYxLlNlbmRFbWFpbExvZ2luQ29kZVJlcXVlc3QaFi5nb29nbGUucHJvdG9idWYuRW1wdHkiNoDqMAGY6jABoOowA6jqMAKC0+STAiA6ASoiGy92MS9hdXRoOnNlbmRFbWFpbExvZ2luQ29kZUKmAQoPY29tLmJ5dGViYXNlLnYxQhBBdXRoU2VydmljZVByb3RvUAFaNGdpdGh1Yi5jb20vYnl0ZWJhc2UvYnl0ZWJhc2UvYmFja2VuZC9nZW5lcmF0ZWQtZ28vdjGiAgNCWFiqAgtCeXRlYmFzZS5WMcoCC0J5dGViYXNlXFYx4gIXQnl0ZWJhc2VcVjFcR1BCTWV0YWRhdGHqAgxCeXRlYmFzZTo6VjFiBnByb3RvMw", [file_google_api_annotations, file_google_protobuf_empty, file_v1_annotation, file_v1_user_service]);+ fileDesc("ChV2MS9hdXRoX3NlcnZpY2UucHJvdG8SC2J5dGViYXNlLnYxIlUKI0dldEF1dGhlbnRpY2F0aW9uUmVzdHJpY3Rpb25SZXF1ZXN0Ei4KCXdvcmtzcGFjZRgBIAEoCUIb+kEYChZieXRlYmFzZS5jb20vV29ya3NwYWNlImAKEkF1dGhlbnRpY2F0aW9uSW5mbxIWCgl3b3Jrc3BhY2UYASABKAlCA+BBAxIyCgtyZXN0cmljdGlvbhgCIAEoCzIYLmJ5dGViYXNlLnYxLlJlc3RyaWN0aW9uQgPgQQMi+gEKC1Jlc3RyaWN0aW9uEhwKD2Rpc2FsbG93X3NpZ251cBgBIAEoCEID4EEDEiUKGGRpc2FsbG93X3Bhc3N3b3JkX3NpZ25pbhgCIAEoCEID4EEDElsKFHBhc3N3b3JkX3Jlc3RyaWN0aW9uGAMgASgLMjguYnl0ZWJhc2UudjEuV29ya3NwYWNlUHJvZmlsZVNldHRpbmcuUGFzc3dvcmRSZXN0cmljdGlvbkID4EEDEiQKF2FsbG93X2VtYWlsX2NvZGVfc2lnbmluGAQgASgIQgPgQQMSIwoWcGFzc3dvcmRfcmVzZXRfZW5hYmxlZBgFIAEoCEID4EEDItkCCgxMb2dpblJlcXVlc3QSDQoFZW1haWwYASABKAkSEAoIcGFzc3dvcmQYAiABKAkSCwoDd2ViGAMgASgIEhAKCGlkcF9uYW1lGAQgASgJEjkKC2lkcF9jb250ZXh0GAUgASgLMiQuYnl0ZWJhc2UudjEuSWRlbnRpdHlQcm92aWRlckNvbnRleHQSFQoIb3RwX2NvZGUYBiABKAlIAIgBARIaCg1yZWNvdmVyeV9jb2RlGAcgASgJSAGIAQESGwoObWZhX3RlbXBfdG9rZW4YCCABKAlIAogBARIXCgplbWFpbF9jb2RlGAkgASgJSAOIAQESFgoJd29ya3NwYWNlGAogASgJSASIAQFCCwoJX290cF9jb2RlQhAKDl9yZWNvdmVyeV9jb2RlQhEKD19tZmFfdGVtcF90b2tlbkINCgtfZW1haWxfY29kZUIMCgpfd29ya3NwYWNlIqwBChdJZGVudGl0eVByb3ZpZGVyQ29udGV4dBJECg5vYXV0aDJfY29udGV4dBgBIAEoCzIqLmJ5dGViYXNlLnYxLk9BdXRoMklkZW50aXR5UHJvdmlkZXJDb250ZXh0SAASQAoMb2lkY19jb250ZXh0GAIgASgLMiguYnl0ZWJhc2UudjEuT0lEQ0lkZW50aXR5UHJvdmlkZXJDb250ZXh0SABCCQoHY29udGV4dCItCh1PQXV0aDJJZGVudGl0eVByb3ZpZGVyQ29udGV4dBIMCgRjb2RlGAEgASgJIisKG09JRENJZGVudGl0eVByb3ZpZGVyQ29udGV4dBIMCgRjb2RlGAEgASgJIo8BCg1Mb2dpblJlc3BvbnNlEg0KBXRva2VuGAEgASgJEhsKDm1mYV90ZW1wX3Rva2VuGAIgASgJSACIAQESHgoWcmVxdWlyZV9yZXNldF9wYXNzd29yZBgDIAEoCBIfCgR1c2VyGAQgASgLMhEuYnl0ZWJhc2UudjEuVXNlckIRCg9fbWZhX3RlbXBfdG9rZW4iDwoNTG9nb3V0UmVxdWVzdCI0ChRFeGNoYW5nZVRva2VuUmVxdWVzdBINCgV0b2tlbhgBIAEoCRINCgVlbWFpbBgCIAEoCSItChVFeGNoYW5nZVRva2VuUmVzcG9uc2USFAoMYWNjZXNzX3Rva2VuGAEgASgJIj8KDVNpZ251cFJlcXVlc3QSDQoFZW1haWwYASABKAkSEAoIcGFzc3dvcmQYAiABKAkSDQoFdGl0bGUYAyABKAkiEAoOUmVmcmVzaFJlcXVlc3QiEQoPUmVmcmVzaFJlc3BvbnNlIlIKG1JlcXVlc3RQYXNzd29yZFJlc2V0UmVxdWVzdBINCgVlbWFpbBgBIAEoCRIWCgl3b3Jrc3BhY2UYAiABKAlIAIgBAUIMCgpfd29ya3NwYWNlIkkKFFJlc2V0UGFzc3dvcmRSZXF1ZXN0Eg0KBWVtYWlsGAEgASgJEgwKBGNvZGUYAiABKAkSFAoMbmV3X3Bhc3N3b3JkGAMgASgJIlAKGVNlbmRFbWFpbExvZ2luQ29kZVJlcXVlc3QSDQoFZW1haWwYASABKAkSFgoJd29ya3NwYWNlGAIgASgJSACIAQFCDAoKX3dvcmtzcGFjZSK6AQoWU3dpdGNoV29ya3NwYWNlUmVxdWVzdBIRCgl3b3Jrc3BhY2UYASABKAkSCwoDd2ViGAIgASgIEhUKCG90cF9jb2RlGAMgASgJSACIAQESGgoNcmVjb3ZlcnlfY29kZRgEIAEoCUgBiAEBEhsKDm1mYV90ZW1wX3Rva2VuGAUgASgJSAKIAQFCCwoJX290cF9jb2RlQhAKDl9yZWNvdmVyeV9jb2RlQhEKD19tZmFfdGVtcF90b2tlbjK+CgoLQXV0aFNlcnZpY2USxwEKHEdldEF1dGhlbnRpY2F0aW9uUmVzdHJpY3Rpb24SMC5ieXRlYmFzZS52MS5HZXRBdXRoZW50aWNhdGlvblJlc3RyaWN0aW9uUmVxdWVzdBofLmJ5dGViYXNlLnYxLkF1dGhlbnRpY2F0aW9uSW5mbyJU2kEAgOowAYLT5JMCR1ovEi0vdjEve3dvcmtzcGFjZT13b3Jrc3BhY2VzLyp9L2F1dGgvcmVzdHJpY3Rpb24SFC92MS9hdXRoL3Jlc3RyaWN0aW9uEmkKBUxvZ2luEhkuYnl0ZWJhc2UudjEuTG9naW5SZXF1ZXN0GhouYnl0ZWJhc2UudjEuTG9naW5SZXNwb25zZSIpgOowAZjqMAGg6jADqOowAYLT5JMCEzoBKiIOL3YxL2F1dGgvbG9naW4SaAoGTG9nb3V0EhouYnl0ZWJhc2UudjEuTG9nb3V0UmVxdWVzdBoWLmdvb2dsZS5wcm90b2J1Zi5FbXB0eSIqgOowAZjqMAGg6jADqOowBILT5JMCFDoBKiIPL3YxL2F1dGgvbG9nb3V0EokBCg1FeGNoYW5nZVRva2VuEiEuYnl0ZWJhc2UudjEuRXhjaGFuZ2VUb2tlblJlcXVlc3QaIi5ieXRlYmFzZS52MS5FeGNoYW5nZVRva2VuUmVzcG9uc2UiMYDqMAGY6jABoOowA6jqMAGC0+STAhs6ASoiFi92MS9hdXRoOmV4Y2hhbmdlVG9rZW4SbAoGU2lnbnVwEhouYnl0ZWJhc2UudjEuU2lnbnVwUmVxdWVzdBoaLmJ5dGViYXNlLnYxLkxvZ2luUmVzcG9uc2UiKoDqMAGY6jABoOowA6jqMAGC0+STAhQ6ASoiDy92MS9hdXRoL3NpZ251cBJtCgdSZWZyZXNoEhsuYnl0ZWJhc2UudjEuUmVmcmVzaFJlcXVlc3QaHC5ieXRlYmFzZS52MS5SZWZyZXNoUmVzcG9uc2UiJ4DqMAGg6jADqOowAYLT5JMCFToBKiIQL3YxL2F1dGgvcmVmcmVzaBKDAQoPU3dpdGNoV29ya3NwYWNlEiMuYnl0ZWJhc2UudjEuU3dpdGNoV29ya3NwYWNlUmVxdWVzdBoaLmJ5dGViYXNlLnYxLkxvZ2luUmVzcG9uc2UiL5DqMAKg6jADqOowAYLT5JMCHToBKiIYL3YxL2F1dGg6c3dpdGNoV29ya3NwYWNlEpIBChRSZXF1ZXN0UGFzc3dvcmRSZXNldBIoLmJ5dGViYXNlLnYxLlJlcXVlc3RQYXNzd29yZFJlc2V0UmVxdWVzdBoWLmdvb2dsZS5wcm90b2J1Zi5FbXB0eSI4gOowAZjqMAGg6jADqOowAoLT5JMCIjoBKiIdL3YxL2F1dGg6cmVxdWVzdFBhc3N3b3JkUmVzZXQSfQoNUmVzZXRQYXNzd29yZBIhLmJ5dGViYXNlLnYxLlJlc2V0UGFzc3dvcmRSZXF1ZXN0GhYuZ29vZ2xlLnByb3RvYnVmLkVtcHR5IjGA6jABmOowAaDqMAOo6jACgtPkkwIbOgEqIhYvdjEvYXV0aDpyZXNldFBhc3N3b3JkEowBChJTZW5kRW1haWxMb2dpbkNvZGUSJi5ieXRlYmFzZS52MS5TZW5kRW1haWxMb2dpbkNvZGVSZXF1ZXN0GhYuZ29vZ2xlLnByb3RvYnVmLkVtcHR5IjaA6jABmOowAaDqMAOo6jACgtPkkwIgOgEqIhsvdjEvYXV0aDpzZW5kRW1haWxMb2dpbkNvZGVCpgEKD2NvbS5ieXRlYmFzZS52MUIQQXV0aFNlcnZpY2VQcm90b1ABWjRnaXRodWIuY29tL2J5dGViYXNlL2J5dGViYXNlL2JhY2tlbmQvZ2VuZXJhdGVkLWdvL3YxogIDQlhYqgILQnl0ZWJhc2UuVjHKAgtCeXRlYmFzZVxWMeICF0J5dGViYXNlXFYxXEdQQk1ldGFkYXRh6gIMQnl0ZWJhc2U6OlYxYgZwcm90bzM", [file_google_api_annotations, file_google_api_client, file_google_api_field_behavior, file_google_api_resource, file_google_protobuf_empty, file_v1_annotation, file_v1_setting_service, file_v1_user_service]);++/**+ * Describes the message bytebase.v1.GetAuthenticationRestrictionRequest.+ * Use `create(GetAuthenticationRestrictionRequestSchema)` to create a new message.+ */+export const GetAuthenticationRestrictionRequestSchema = /*@__PURE__*/+ messageDesc(file_v1_auth_service, 0);++/**+ * Describes the message bytebase.v1.AuthenticationInfo.+ * Use `create(AuthenticationInfoSchema)` to create a new message.+ */+export const AuthenticationInfoSchema = /*@__PURE__*/+ messageDesc(file_v1_auth_service, 1);++/**+ * Describes the message bytebase.v1.Restriction.+ * Use `create(RestrictionSchema)` to create a new message.+ */+export const RestrictionSchema = /*@__PURE__*/+ messageDesc(file_v1_auth_service, 2);/*** Describes the message bytebase.v1.LoginRequest.* Use `create(LoginRequestSchema)` to create a new message.*/export const LoginRequestSchema = /*@__PURE__*/- messageDesc(file_v1_auth_service, 0);+ messageDesc(file_v1_auth_service, 3);/*** Describes the message bytebase.v1.IdentityProviderContext.* Use `create(IdentityProviderContextSchema)` to create a new message.*/export const IdentityProviderContextSchema = /*@__PURE__*/- messageDesc(file_v1_auth_service, 1);+ messageDesc(file_v1_auth_service, 4);/*** Describes the message bytebase.v1.OAuth2IdentityProviderContext.* Use `create(OAuth2IdentityProviderContextSchema)` to create a new message.*/export const OAuth2IdentityProviderContextSchema = /*@__PURE__*/- messageDesc(file_v1_auth_service, 2);+ messageDesc(file_v1_auth_service, 5);/*** Describes the message bytebase.v1.OIDCIdentityProviderContext.* Use `create(OIDCIdentityProviderContextSchema)` to create a new message.*/export const OIDCIdentityProviderContextSchema = /*@__PURE__*/- messageDesc(file_v1_auth_service, 3);+ messageDesc(file_v1_auth_service, 6);/*** Describes the message bytebase.v1.LoginResponse.* Use `create(LoginResponseSchema)` to create a new message.*/export const LoginResponseSchema = /*@__PURE__*/- messageDesc(file_v1_auth_service, 4);+ messageDesc(file_v1_auth_service, 7);/*** Describes the message bytebase.v1.LogoutRequest.* Use `create(LogoutRequestSchema)` to create a new message.*/export const LogoutRequestSchema = /*@__PURE__*/- messageDesc(file_v1_auth_service, 5);+ messageDesc(file_v1_auth_service, 8);/*** Describes the message bytebase.v1.ExchangeTokenRequest.* Use `create(ExchangeTokenRequestSchema)` to create a new message.*/export const ExchangeTokenRequestSchema = /*@__PURE__*/- messageDesc(file_v1_auth_service, 6);+ messageDesc(file_v1_auth_service, 9);/*** Describes the message bytebase.v1.ExchangeTokenResponse.* Use `create(ExchangeTokenResponseSchema)` to create a new message.*/export const ExchangeTokenResponseSchema = /*@__PURE__*/- messageDesc(file_v1_auth_service, 7);+ messageDesc(file_v1_auth_service, 10);/*** Describes the message bytebase.v1.SignupRequest.* Use `create(SignupRequestSchema)` to create a new message.*/export const SignupRequestSchema = /*@__PURE__*/- messageDesc(file_v1_auth_service, 8);+ messageDesc(file_v1_auth_service, 11);/*** Describes the message bytebase.v1.RefreshRequest.* Use `create(RefreshRequestSchema)` to create a new message.*/export const RefreshRequestSchema = /*@__PURE__*/- messageDesc(file_v1_auth_service, 9);+ messageDesc(file_v1_auth_service, 12);/*** Describes the message bytebase.v1.RefreshResponse.* Use `create(RefreshResponseSchema)` to create a new message.*/export const RefreshResponseSchema = /*@__PURE__*/- messageDesc(file_v1_auth_service, 10);+ messageDesc(file_v1_auth_service, 13);/*** Describes the message bytebase.v1.RequestPasswordResetRequest.* Use `create(RequestPasswordResetRequestSchema)` to create a new message.*/export const RequestPasswordResetRequestSchema = /*@__PURE__*/- messageDesc(file_v1_auth_service, 11);+ messageDesc(file_v1_auth_service, 14);/*** Describes the message bytebase.v1.ResetPasswordRequest.* Use `create(ResetPasswordRequestSchema)` to create a new message.*/export const ResetPasswordRequestSchema = /*@__PURE__*/- messageDesc(file_v1_auth_service, 12);+ messageDesc(file_v1_auth_service, 15);/*** Describes the message bytebase.v1.SendEmailLoginCodeRequest.* Use `create(SendEmailLoginCodeRequestSchema)` to create a new message.*/export const SendEmailLoginCodeRequestSchema = /*@__PURE__*/- messageDesc(file_v1_auth_service, 13);+ messageDesc(file_v1_auth_service, 16);/*** Describes the message bytebase.v1.SwitchWorkspaceRequest.* Use `create(SwitchWorkspaceRequestSchema)` to create a new message.*/export const SwitchWorkspaceRequestSchema = /*@__PURE__*/- messageDesc(file_v1_auth_service, 14);+ messageDesc(file_v1_auth_service, 17);/*** AuthService handles user authentication operations.diff --git a/proto/gen/grpc-doc/openapi.yaml b/proto/gen/grpc-doc/openapi.yamlindex aef1ac6329..c5c2c34170 100644--- a/proto/gen/grpc-doc/openapi.yaml+++ b/proto/gen/grpc-doc/openapi.yaml@@ -131,21 +131,9 @@ paths:summary: GetActuatorInfodescription: |-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+ The workspace is resolved from the authenticated session.+ Permissions required: None (authentication required)operationId: ActuatorService_GetActuatorInfo- parameters:- - name: name- in: query- description: |-- 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).- schema:- type: string- title: nameresponses:"200":description: Success@@ -301,6 +289,33 @@ paths:application/json:schema:$ref: '#/components/schemas/bytebase.v1.RefreshResponse'+ /v1/auth/restriction:+ get:+ tags:+ - AuthService+ summary: GetAuthenticationRestriction+ description: |-+ Gets the effective restrictions needed to render authentication flows.+ Permissions required: None+ operationId: AuthService_GetAuthenticationRestriction+ parameters:+ - name: workspace+ in: query+ description: |-+ Optional. The workspace whose authentication policy should be returned.+ Format: workspaces/{workspace}+ When unset, self-hosted resolves the singleton workspace and SaaS uses+ the deployment-level defaults.+ schema:+ type: string+ title: workspace+ responses:+ "200":+ description: Success+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/bytebase.v1.AuthenticationInfo'/v1/auth/signup:post:tags:@@ -17585,17 +17600,15 @@ paths:application/json:schema:$ref: '#/components/schemas/bytebase.v1.Workspace'- /v1/workspaces/{workspace}/actuator/info:+ /v1/workspaces/{workspace}/auth/restriction:get:tags:- - ActuatorService- summary: GetActuatorInfo+ - AuthService+ summary: GetAuthenticationRestrictiondescription: |-- 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.+ Gets the effective restrictions needed to render authentication flows.Permissions required: None- operationId: ActuatorService_GetActuatorInfo2+ operationId: AuthService_GetAuthenticationRestriction2parameters:- name: workspacein: path@@ -17609,7 +17622,7 @@ paths:content:application/json:schema:- $ref: '#/components/schemas/bytebase.v1.ActuatorInfo'+ $ref: '#/components/schemas/bytebase.v1.AuthenticationInfo'/v1/workspaces/{workspace}/databases:get:tags:@@ -18881,26 +18894,11 @@ components:title: git_commitdescription: The git commit hash of the build.readOnly: true- readonly:- type: boolean- title: readonly- description: Whether the Bytebase instance is running in read-only mode.- readOnly: truesaas:type: booleantitle: saasdescription: Whether the Bytebase instance is running in SaaS mode where some features cannot be edited by users.readOnly: true- host:- type: string- title: host- description: The host address of the Bytebase instance.- readOnly: true- port:- type: string- title: port- description: The port number of the Bytebase instance.- readOnly: trueexternalUrl:type: stringtitle: external_url@@ -18926,17 +18924,6 @@ components:title: unlicensed_featuresdescription: List of features that are not licensed.readOnly: true- docker:- type: boolean- title: docker- description: Whether the Bytebase instance is running in Docker.- readOnly: true- activatedUserCount:- type: integer- title: activated_user_count- format: int32- description: The number of activated users.- readOnly: trueactivatedInstanceCount:type: integertitle: activated_instance_count@@ -18965,10 +18952,6 @@ components:format: int32description: The number of active replicas (servers sharing the same database).readOnly: true- restriction:- title: restriction- readOnly: true- $ref: '#/components/schemas/bytebase.v1.Restriction'defaultProject:type: stringtitle: default_project@@ -19608,6 +19591,23 @@ components:- IAM- CUSTOMdescription: Authorization method for RPC calls.+ bytebase.v1.AuthenticationInfo:+ type: object+ properties:+ workspace:+ type: string+ title: workspace+ description: |-+ The workspace used for authentication, when one can be resolved.+ Format: workspaces/{workspace}+ readOnly: true+ restriction:+ title: restriction+ description: The effective authentication restrictions.+ readOnly: true+ $ref: '#/components/schemas/bytebase.v1.Restriction'+ title: AuthenticationInfo+ additionalProperties: falsebytebase.v1.BatchCancelTaskRunsRequest:type: objectproperties:@@ -22898,19 +22898,23 @@ components:- nameadditionalProperties: falsebytebase.v1.GetActuatorInfoRequest:+ type: object+ title: GetActuatorInfoRequest+ additionalProperties: false+ description: Request message for getting actuator information.+ bytebase.v1.GetAuthenticationRestrictionRequest:type: objectproperties:- name:+ workspace:type: string- title: name+ title: workspacedescription: |-- Optional. The workspace to scope the response to.+ Optional. The workspace whose authentication policy should be returned.Format: workspaces/{workspace}- When unset, the workspace is resolved from the request context (self-hosted)- or no workspace-scoped fields are returned (SaaS).- title: GetActuatorInfoRequest+ When unset, self-hosted resolves the singleton workspace and SaaS uses+ the deployment-level defaults.+ title: GetAuthenticationRestrictionRequestadditionalProperties: false- description: Request message for getting actuator information.bytebase.v1.GetChangelogRequest:type: objectproperties:@@ -33965,6 +33969,12 @@ security: []tags:- name: AccessGrantServicedescription: AccessGrantService manages temporary access grants within projects.+ - name: ActuatorService+ description: ActuatorService manages system health and operational information.+ - name: AIService+ description: AIService provides AI chat capabilities for the page agent.+ - name: AuditLogService+ description: AuditLogService manages audit logs for system activities and API calls.- name: RolloutServicedescription: RolloutService manages the execution of deployment plans.- name: QueryHistoryService@@ -33977,12 +33987,6 @@ tags:description: IssueService manages issues for tracking database changes and tasks.- name: SettingServicedescription: SettingService manages workspace-level settings and configurations.- - name: ActuatorService- description: ActuatorService manages system health and operational information.- - name: AIService- description: AIService provides AI chat capabilities for the page agent.- - name: AuditLogService- description: AuditLogService manages audit logs for system activities and API calls.- name: UserServicedescription: UserService manages user accounts and authentication.- name: AuthServicediff --git a/proto/gen/grpc-doc/v1/README.md b/proto/gen/grpc-doc/v1/README.mdindex 43506bccfa..408ad26c9e 100644--- a/proto/gen/grpc-doc/v1/README.md+++ b/proto/gen/grpc-doc/v1/README.md@@ -30,6 +30,25 @@- [AccessGrantService](#bytebase-v1-AccessGrantService)+- [v1/actuator_service.proto](#v1_actuator_service-proto)+ - [ActuatorInfo](#bytebase-v1-ActuatorInfo)+ - [GetActuatorInfoRequest](#bytebase-v1-GetActuatorInfoRequest)+ - [SetupSampleRequest](#bytebase-v1-SetupSampleRequest)++ - [ActuatorService](#bytebase-v1-ActuatorService)++- [v1/ai_service.proto](#v1_ai_service-proto)+ - [AIChatMessage](#bytebase-v1-AIChatMessage)+ - [AIChatRequest](#bytebase-v1-AIChatRequest)+ - [AIChatResponse](#bytebase-v1-AIChatResponse)+ - [AIChatToolCall](#bytebase-v1-AIChatToolCall)+ - [AIChatToolDefinition](#bytebase-v1-AIChatToolDefinition)+ - [AIChatUsage](#bytebase-v1-AIChatUsage)++ - [AIChatMessageRole](#bytebase-v1-AIChatMessageRole)++ - [AIService](#bytebase-v1-AIService)+- [v1/common.proto](#v1_common-proto)- [PermissionDeniedDetail](#bytebase-v1-PermissionDeniedDetail)- [Position](#bytebase-v1-Position)@@ -45,6 +64,30 @@- [VCSType](#bytebase-v1-VCSType)- [WebhookType](#bytebase-v1-WebhookType)+- [v1/iam_policy.proto](#v1_iam_policy-proto)+ - [Binding](#bytebase-v1-Binding)+ - [BindingDelta](#bytebase-v1-BindingDelta)+ - [GetIamPolicyRequest](#bytebase-v1-GetIamPolicyRequest)+ - [IamPolicy](#bytebase-v1-IamPolicy)+ - [PolicyDelta](#bytebase-v1-PolicyDelta)+ - [SetIamPolicyRequest](#bytebase-v1-SetIamPolicyRequest)++ - [BindingDelta.Action](#bytebase-v1-BindingDelta-Action)++- [v1/audit_log_service.proto](#v1_audit_log_service-proto)+ - [AuditData](#bytebase-v1-AuditData)+ - [AuditLog](#bytebase-v1-AuditLog)+ - [ExportAuditLogsRequest](#bytebase-v1-ExportAuditLogsRequest)+ - [ExportAuditLogsResponse](#bytebase-v1-ExportAuditLogsResponse)+ - [MCPDelegation](#bytebase-v1-MCPDelegation)+ - [RequestMetadata](#bytebase-v1-RequestMetadata)+ - [SearchAuditLogsRequest](#bytebase-v1-SearchAuditLogsRequest)+ - [SearchAuditLogsResponse](#bytebase-v1-SearchAuditLogsResponse)++ - [AuditLog.Severity](#bytebase-v1-AuditLog-Severity)++ - [AuditLogService](#bytebase-v1-AuditLogService)+- [v1/rollout_service.proto](#v1_rollout_service-proto)- [BatchCancelTaskRunsRequest](#bytebase-v1-BatchCancelTaskRunsRequest)- [BatchCancelTaskRunsResponse](#bytebase-v1-BatchCancelTaskRunsResponse)@@ -260,50 +303,6 @@- [SettingService](#bytebase-v1-SettingService)-- [v1/actuator_service.proto](#v1_actuator_service-proto)- - [ActuatorInfo](#bytebase-v1-ActuatorInfo)- - [GetActuatorInfoRequest](#bytebase-v1-GetActuatorInfoRequest)- - [Restriction](#bytebase-v1-Restriction)- - [SetupSampleRequest](#bytebase-v1-SetupSampleRequest)-- - [ActuatorService](#bytebase-v1-ActuatorService)--- [v1/ai_service.proto](#v1_ai_service-proto)- - [AIChatMessage](#bytebase-v1-AIChatMessage)- - [AIChatRequest](#bytebase-v1-AIChatRequest)- - [AIChatResponse](#bytebase-v1-AIChatResponse)- - [AIChatToolCall](#bytebase-v1-AIChatToolCall)- - [AIChatToolDefinition](#bytebase-v1-AIChatToolDefinition)- - [AIChatUsage](#bytebase-v1-AIChatUsage)-- - [AIChatMessageRole](#bytebase-v1-AIChatMessageRole)-- - [AIService](#bytebase-v1-AIService)--- [v1/iam_policy.proto](#v1_iam_policy-proto)- - [Binding](#bytebase-v1-Binding)- - [BindingDelta](#bytebase-v1-BindingDelta)- - [GetIamPolicyRequest](#bytebase-v1-GetIamPolicyRequest)- - [IamPolicy](#bytebase-v1-IamPolicy)- - [PolicyDelta](#bytebase-v1-PolicyDelta)- - [SetIamPolicyRequest](#bytebase-v1-SetIamPolicyRequest)-- - [BindingDelta.Action](#bytebase-v1-BindingDelta-Action)--- [v1/audit_log_service.proto](#v1_audit_log_service-proto)- - [AuditData](#bytebase-v1-AuditData)- - [AuditLog](#bytebase-v1-AuditLog)- - [ExportAuditLogsRequest](#bytebase-v1-ExportAuditLogsRequest)- - [ExportAuditLogsResponse](#bytebase-v1-ExportAuditLogsResponse)- - [MCPDelegation](#bytebase-v1-MCPDelegation)- - [RequestMetadata](#bytebase-v1-RequestMetadata)- - [SearchAuditLogsRequest](#bytebase-v1-SearchAuditLogsRequest)- - [SearchAuditLogsResponse](#bytebase-v1-SearchAuditLogsResponse)-- - [AuditLog.Severity](#bytebase-v1-AuditLog-Severity)-- - [AuditLogService](#bytebase-v1-AuditLogService)-- [v1/user_service.proto](#v1_user_service-proto)- [BatchGetUsersRequest](#bytebase-v1-BatchGetUsersRequest)- [BatchGetUsersResponse](#bytebase-v1-BatchGetUsersResponse)@@ -321,8 +320,10 @@- [UserService](#bytebase-v1-UserService)- [v1/auth_service.proto](#v1_auth_service-proto)+ - [AuthenticationInfo](#bytebase-v1-AuthenticationInfo)- [ExchangeTokenRequest](#bytebase-v1-ExchangeTokenRequest)- [ExchangeTokenResponse](#bytebase-v1-ExchangeTokenResponse)+ - [GetAuthenticationRestrictionRequest](#bytebase-v1-GetAuthenticationRestrictionRequest)- [IdentityProviderContext](#bytebase-v1-IdentityProviderContext)- [LoginRequest](#bytebase-v1-LoginRequest)- [LoginResponse](#bytebase-v1-LoginResponse)@@ -333,6 +334,7 @@- [RefreshResponse](#bytebase-v1-RefreshResponse)- [RequestPasswordResetRequest](#bytebase-v1-RequestPasswordResetRequest)- [ResetPasswordRequest](#bytebase-v1-ResetPasswordRequest)+ - [Restriction](#bytebase-v1-Restriction)- [SendEmailLoginCodeRequest](#bytebase-v1-SendEmailLoginCodeRequest)- [SignupRequest](#bytebase-v1-SignupRequest)- [SwitchWorkspaceRequest](#bytebase-v1-SwitchWorkspaceRequest)@@ -1074,1637 +1076,1566 @@ AccessGrantService manages temporary access grants within projects.-<a name="v1_common-proto"></a>+<a name="v1_actuator_service-proto"></a><p align="right"><a href="#top">Top</a></p>-## v1/common.proto+## v1/actuator_service.proto-<a name="bytebase-v1-PermissionDeniedDetail"></a>+<a name="bytebase-v1-ActuatorInfo"></a>-### PermissionDeniedDetail-PermissionDeniedDetail provides structured information about permission failures.-Used as error detail when returning CodePermissionDenied errors.+### ActuatorInfo+System information and configuration for the Bytebase instance.+Actuator concept is similar to the Spring Boot Actuator.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| method | [string](#string) | | The API method that was called. |-| required_permissions | [string](#string) | repeated | The permissions required but not granted to the user. |-| resources | [string](#string) | repeated | The resources the user was trying to access. |+| version | [string](#string) | | The Bytebase server version. |+| git_commit | [string](#string) | | The git commit hash of the build. |+| saas | [bool](#bool) | | Whether the Bytebase instance is running in SaaS mode where some features cannot be edited by users. |+| 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. |+| 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). |+| 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). |+| active_vcs_user_count | [int32](#int32) | | The number of active VCS users seen in the active window. |-<a name="bytebase-v1-Position"></a>+<a name="bytebase-v1-GetActuatorInfoRequest"></a>-### Position-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)-- GitHub Actions uses 1-based (https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#setting-an-error-message)-- Most text editors display 1-based positions to users-Note: LSP uses 0-based (https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#position),-but we follow the canonical user-facing standards.+### GetActuatorInfoRequest+Request message for getting actuator information.-Handling unknown positions:-- If the entire position is unknown, leave this field as nil/undefined-- If only line is known, set line and leave column as 0 (e.g., line=5, column=0)-- If only column is known (rare), set column and leave line as 0-Frontends should check for nil/undefined/zero values and handle them appropriately.-| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| line | [int32](#int32) | | Line position in a text (one-based). First line of the text is line 1. A value of 0 indicates the line information is unknown. |-| column | [int32](#int32) | | Column position in a text (one-based). Column is measured in Unicode code points (characters/runes), not bytes or grapheme clusters. First character of the line is column 1. A value of 0 indicates the column information is unknown.-Examples: - "SELECT * FROM t" - column 8 is '*' - "SELECT 你好 FROM t" - column 8 is '你' (even though it's at byte offset 7) - "SELECT 😀 FROM t" - column 8 is '😀' (even though it's 4 bytes in UTF-8) |+<a name="bytebase-v1-SetupSampleRequest"></a>+### SetupSampleRequest+Request message for setting up sample data.-<a name="bytebase-v1-Range"></a>-### Range-Range represents a span within a text or sequence.-Whether the indices are byte offsets or character indices depends on the context.-Check the documentation of the field using Range for specific semantics.-| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| start | [int32](#int32) | | Start index (inclusive). |-| end | [int32](#int32) | | End index (exclusive). |-+<a name="bytebase-v1-ActuatorService"></a>-<a name="bytebase-v1-ApprovalStatus"></a>+### ActuatorService+ActuatorService manages system health and operational information.-### 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.+| 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. The workspace is resolved from the authenticated session. Permissions required: None (authentication required) |+| 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 |-| Name | Number | Description |-| ---- | ------ | ----------- |-| APPROVAL_STATUS_UNSPECIFIED | 0 | No approval workflow has started, including for a linked draft issue. |-| 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-Database engine type.+<a name="v1_ai_service-proto"></a>+<p align="right"><a href="#top">Top</a></p>-| Name | Number | Description |-| ---- | ------ | ----------- |-| ENGINE_UNSPECIFIED | 0 | Unspecified database engine. |-| CLICKHOUSE | 1 | ClickHouse columnar database. |-| MYSQL | 2 | MySQL relational database. |-| POSTGRES | 3 | PostgreSQL relational database. |-| SNOWFLAKE | 4 | Snowflake cloud data warehouse. |-| TIDB | 6 | TiDB distributed SQL database. |-| MONGODB | 7 | MongoDB document database. |-| REDIS | 8 | Redis key-value store. |-| ORACLE | 9 | Oracle relational database. |-| SPANNER | 10 | Google Cloud Spanner distributed database. |-| MSSQL | 11 | Microsoft SQL Server relational database. |-| REDSHIFT | 12 | Amazon Redshift data warehouse. |-| MARIADB | 13 | MariaDB relational database. |-| OCEANBASE | 14 | OceanBase distributed database. |-| STARROCKS | 15 | StarRocks analytics database. |-| DORIS | 16 | Apache Doris analytics database. |-| HIVE | 17 | Apache Hive data warehouse. |-| ELASTICSEARCH | 18 | Elasticsearch search engine. |-| BIGQUERY | 19 | Google BigQuery data warehouse. |-| DYNAMODB | 20 | Amazon DynamoDB NoSQL database. |-| DATABRICKS | 21 | Databricks lakehouse platform. |-| COCKROACHDB | 22 | CockroachDB distributed SQL database. |-| COSMOSDB | 23 | Azure Cosmos DB multi-model database. |-| TRINO | 24 | Trino distributed SQL query engine. |-| CASSANDRA | 25 | Apache Cassandra NoSQL database. |+## v1/ai_service.proto-<a name="bytebase-v1-ExportFormat"></a>+<a name="bytebase-v1-AIChatMessage"></a>-### ExportFormat-Data export format.+### AIChatMessage+A single message in the conversation.-| Name | Number | Description |-| ---- | ------ | ----------- |-| FORMAT_UNSPECIFIED | 0 | Unspecified export format. |-| CSV | 1 | Comma-separated values format. |-| JSON | 2 | JavaScript Object Notation format. |-| SQL | 3 | SQL statements format. |-| XLSX | 4 | Microsoft Excel spreadsheet format. |+| 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. |-<a name="bytebase-v1-IssueStatus"></a>-### IssueStatus-The status of an issue.-Lives at the top level so both plan_service.proto and issue_service.proto-can reference it without a circular import.-| 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-AIChatRequest"></a>-<a name="bytebase-v1-RiskLevel"></a>+### AIChatRequest+Request message for AIService.Chat.-### RiskLevel-RiskLevel is the risk level.-| Name | Number | Description |-| ---- | ------ | ----------- |-| RISK_LEVEL_UNSPECIFIED | 0 | Unspecified risk level. |-| LOW | 1 | Low risk operation. |-| MODERATE | 2 | Moderate risk operation. |-| HIGH | 3 | High risk operation. |+| 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-State"></a>-### State-Resource lifecycle state.-| Name | Number | Description |-| ---- | ------ | ----------- |-| STATE_UNSPECIFIED | 0 | |-| ACTIVE | 1 | Resource is active and operational. |-| DELETED | 2 | Resource is soft-deleted but may be recoverable. |+<a name="bytebase-v1-AIChatResponse"></a>+### AIChatResponse+Response message for AIService.Chat.-<a name="bytebase-v1-StatementType"></a>-### StatementType-StatementType represents the type of SQL statement.+| 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. |-| Name | Number | Description |-| ---- | ------ | ----------- |-| STATEMENT_TYPE_UNSPECIFIED | 0 | |-| CREATE_DATABASE | 1 | DDL - CREATE statements |-| CREATE_TABLE | 2 | |-| CREATE_VIEW | 3 | |-| CREATE_INDEX | 4 | |-| CREATE_SEQUENCE | 5 | |-| CREATE_SCHEMA | 6 | |-| CREATE_FUNCTION | 7 | |-| CREATE_TRIGGER | 8 | |-| CREATE_PROCEDURE | 9 | |-| CREATE_EVENT | 10 | |-| CREATE_EXTENSION | 11 | |-| CREATE_TYPE | 12 | |-| DROP_DATABASE | 20 | DDL - DROP statements |-| DROP_TABLE | 21 | |-| DROP_VIEW | 22 | |-| DROP_INDEX | 23 | |-| DROP_SEQUENCE | 24 | |-| DROP_SCHEMA | 25 | |-| DROP_FUNCTION | 26 | |-| DROP_TRIGGER | 27 | |-| DROP_PROCEDURE | 28 | |-| DROP_EVENT | 29 | |-| DROP_EXTENSION | 30 | |-| DROP_TYPE | 31 | |-| ALTER_DATABASE | 40 | DDL - ALTER statements |-| ALTER_TABLE | 41 | |-| ALTER_VIEW | 42 | |-| ALTER_SEQUENCE | 43 | |-| ALTER_EVENT | 44 | |-| ALTER_TYPE | 45 | |-| ALTER_INDEX | 46 | |-| TRUNCATE | 50 | DDL - Other |-| RENAME | 51 | |-| RENAME_INDEX | 52 | |-| RENAME_SCHEMA | 53 | |-| RENAME_SEQUENCE | 54 | |-| COMMENT | 55 | |-| INSERT | 60 | DML statements |-| UPDATE | 61 | |-| DELETE | 62 | |-<a name="bytebase-v1-VCSType"></a>-### VCSType-Version control system type.-| Name | Number | Description |-| ---- | ------ | ----------- |-| VCS_TYPE_UNSPECIFIED | 0 | Unspecified VCS type. |-| GITHUB | 1 | GitHub version control platform. |-| GITLAB | 2 | GitLab version control platform. |-| BITBUCKET | 3 | Bitbucket version control platform. |-| AZURE_DEVOPS | 4 | Azure DevOps version control platform. |+<a name="bytebase-v1-AIChatToolCall"></a>+### AIChatToolCall+A tool call made by the AI.-<a name="bytebase-v1-WebhookType"></a>+| 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. |-### WebhookType-Webhook integration type.-| Name | Number | Description |-| ---- | ------ | ----------- |-| WEBHOOK_TYPE_UNSPECIFIED | 0 | Unspecified type. |-| SLACK | 1 | Slack integration. |-| DISCORD | 2 | Discord integration. |-| TEAMS | 3 | Microsoft Teams integration. |-| DINGTALK | 4 | DingTalk integration. |-| FEISHU | 5 | Feishu integration. |-| WECOM | 6 | WeCom (WeChat Work) integration. |-| LARK | 7 | Lark integration. |-| GOOGLE_CHAT | 8 | Google Chat integration. |---+<a name="bytebase-v1-AIChatToolDefinition"></a>+### AIChatToolDefinition+A tool definition that the AI can invoke.-<a name="v1_rollout_service-proto"></a>-<p align="right"><a href="#top">Top</a></p>+| 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. |-## v1/rollout_service.proto-<a name="bytebase-v1-BatchCancelTaskRunsRequest"></a>-### BatchCancelTaskRunsRequest+<a name="bytebase-v1-AIChatUsage"></a>++### AIChatUsage+Token usage for a single AI provider call.| 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} |+| total_tokens | [int32](#int32) | | Total tokens used by the provider call. |-<a name="bytebase-v1-BatchCancelTaskRunsResponse"></a>-### BatchCancelTaskRunsResponse+<a name="bytebase-v1-AIChatMessageRole"></a>+### 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. |-<a name="bytebase-v1-BatchRunTasksRequest"></a>-### BatchRunTasksRequest+<a name="bytebase-v1-AIService"></a>-| 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. |+### 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-BatchRunTasksResponse"></a>+<a name="v1_common-proto"></a>+<p align="right"><a href="#top">Top</a></p>-### BatchRunTasksResponse+## v1/common.proto+<a name="bytebase-v1-PermissionDeniedDetail"></a>+### PermissionDeniedDetail+PermissionDeniedDetail provides structured information about permission failures.+Used as error detail when returning CodePermissionDenied errors.+| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| method | [string](#string) | | The API method that was called. |+| required_permissions | [string](#string) | repeated | The permissions required but not granted to the user. |+| resources | [string](#string) | repeated | The resources the user was trying to access. |-<a name="bytebase-v1-BatchSkipTasksRequest"></a>-### BatchSkipTasksRequest-| 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. |+<a name="bytebase-v1-Position"></a>+### Position+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)+- GitHub Actions uses 1-based (https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#setting-an-error-message)+- Most text editors display 1-based positions to users+Note: LSP uses 0-based (https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#position),+but we follow the canonical user-facing standards.+Handling unknown positions:+- If the entire position is unknown, leave this field as nil/undefined+- If only line is known, set line and leave column as 0 (e.g., line=5, column=0)+- If only column is known (rare), set column and leave line as 0+Frontends should check for nil/undefined/zero values and handle them appropriately.+| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| line | [int32](#int32) | | Line position in a text (one-based). First line of the text is line 1. A value of 0 indicates the line information is unknown. |+| column | [int32](#int32) | | Column position in a text (one-based). Column is measured in Unicode code points (characters/runes), not bytes or grapheme clusters. First character of the line is column 1. A value of 0 indicates the column information is unknown.-<a name="bytebase-v1-BatchSkipTasksResponse"></a>+Examples: - "SELECT * FROM t" - column 8 is '*' - "SELECT 你好 FROM t" - column 8 is '你' (even though it's at byte offset 7) - "SELECT 😀 FROM t" - column 8 is '😀' (even though it's 4 bytes in UTF-8) |-### BatchSkipTasksResponse+<a name="bytebase-v1-Range"></a>+### Range+Range represents a span within a text or sequence.+Whether the indices are byte offsets or character indices depends on the context.+Check the documentation of the field using Range for specific semantics.-<a name="bytebase-v1-CreateRolloutRequest"></a>-### CreateRolloutRequest+| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| start | [int32](#int32) | | Start index (inclusive). |+| end | [int32](#int32) | | End index (exclusive). |-| 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. |+<a name="bytebase-v1-ApprovalStatus"></a>-<a name="bytebase-v1-GetRolloutRequest"></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.-### GetRolloutRequest+| Name | Number | Description |+| ---- | ------ | ----------- |+| APPROVAL_STATUS_UNSPECIFIED | 0 | No approval workflow has started, including for a linked draft issue. |+| 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. |-| 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 |+<a name="bytebase-v1-Engine"></a>+### Engine+Database engine type.+| Name | Number | Description |+| ---- | ------ | ----------- |+| ENGINE_UNSPECIFIED | 0 | Unspecified database engine. |+| CLICKHOUSE | 1 | ClickHouse columnar database. |+| MYSQL | 2 | MySQL relational database. |+| POSTGRES | 3 | PostgreSQL relational database. |+| SNOWFLAKE | 4 | Snowflake cloud data warehouse. |+| TIDB | 6 | TiDB distributed SQL database. |+| MONGODB | 7 | MongoDB document database. |+| REDIS | 8 | Redis key-value store. |+| ORACLE | 9 | Oracle relational database. |+| SPANNER | 10 | Google Cloud Spanner distributed database. |+| MSSQL | 11 | Microsoft SQL Server relational database. |+| REDSHIFT | 12 | Amazon Redshift data warehouse. |+| MARIADB | 13 | MariaDB relational database. |+| OCEANBASE | 14 | OceanBase distributed database. |+| STARROCKS | 15 | StarRocks analytics database. |+| DORIS | 16 | Apache Doris analytics database. |+| HIVE | 17 | Apache Hive data warehouse. |+| ELASTICSEARCH | 18 | Elasticsearch search engine. |+| BIGQUERY | 19 | Google BigQuery data warehouse. |+| DYNAMODB | 20 | Amazon DynamoDB NoSQL database. |+| DATABRICKS | 21 | Databricks lakehouse platform. |+| COCKROACHDB | 22 | CockroachDB distributed SQL database. |+| COSMOSDB | 23 | Azure Cosmos DB multi-model database. |+| TRINO | 24 | Trino distributed SQL query engine. |+| CASSANDRA | 25 | Apache Cassandra NoSQL database. |+<a name="bytebase-v1-ExportFormat"></a>-<a name="bytebase-v1-GetTaskRunLogRequest"></a>+### ExportFormat+Data export format.-### GetTaskRunLogRequest+| Name | Number | Description |+| ---- | ------ | ----------- |+| FORMAT_UNSPECIFIED | 0 | Unspecified export format. |+| CSV | 1 | Comma-separated values format. |+| JSON | 2 | JavaScript Object Notation format. |+| SQL | 3 | SQL statements format. |+| XLSX | 4 | Microsoft Excel spreadsheet format. |-| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| parent | [string](#string) | | Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun} |+<a name="bytebase-v1-IssueStatus"></a>+### IssueStatus+The status of an issue.+Lives at the top level so both plan_service.proto and issue_service.proto+can reference it without a circular import.+| 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-RiskLevel"></a>-<a name="bytebase-v1-GetTaskRunRequest"></a>+### RiskLevel+RiskLevel is the risk level.-### GetTaskRunRequest+| Name | Number | Description |+| ---- | ------ | ----------- |+| RISK_LEVEL_UNSPECIFIED | 0 | Unspecified risk level. |+| LOW | 1 | Low risk operation. |+| MODERATE | 2 | Moderate risk operation. |+| HIGH | 3 | High risk operation. |-| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| name | [string](#string) | | Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun} |+<a name="bytebase-v1-State"></a>+### State+Resource lifecycle state.+| Name | Number | Description |+| ---- | ------ | ----------- |+| STATE_UNSPECIFIED | 0 | |+| ACTIVE | 1 | Resource is active and operational. |+| DELETED | 2 | Resource is soft-deleted but may be recoverable. |+<a name="bytebase-v1-StatementType"></a>-<a name="bytebase-v1-GetTaskRunSessionRequest"></a>+### StatementType+StatementType represents the type of SQL statement.-### GetTaskRunSessionRequest+| Name | Number | Description |+| ---- | ------ | ----------- |+| STATEMENT_TYPE_UNSPECIFIED | 0 | |+| CREATE_DATABASE | 1 | DDL - CREATE statements |+| CREATE_TABLE | 2 | |+| CREATE_VIEW | 3 | |+| CREATE_INDEX | 4 | |+| CREATE_SEQUENCE | 5 | |+| CREATE_SCHEMA | 6 | |+| CREATE_FUNCTION | 7 | |+| CREATE_TRIGGER | 8 | |+| CREATE_PROCEDURE | 9 | |+| CREATE_EVENT | 10 | |+| CREATE_EXTENSION | 11 | |+| CREATE_TYPE | 12 | |+| DROP_DATABASE | 20 | DDL - DROP statements |+| DROP_TABLE | 21 | |+| DROP_VIEW | 22 | |+| DROP_INDEX | 23 | |+| DROP_SEQUENCE | 24 | |+| DROP_SCHEMA | 25 | |+| DROP_FUNCTION | 26 | |+| DROP_TRIGGER | 27 | |+| DROP_PROCEDURE | 28 | |+| DROP_EVENT | 29 | |+| DROP_EXTENSION | 30 | |+| DROP_TYPE | 31 | |+| ALTER_DATABASE | 40 | DDL - ALTER statements |+| ALTER_TABLE | 41 | |+| ALTER_VIEW | 42 | |+| ALTER_SEQUENCE | 43 | |+| ALTER_EVENT | 44 | |+| ALTER_TYPE | 45 | |+| ALTER_INDEX | 46 | |+| TRUNCATE | 50 | DDL - Other |+| RENAME | 51 | |+| RENAME_INDEX | 52 | |+| RENAME_SCHEMA | 53 | |+| RENAME_SEQUENCE | 54 | |+| COMMENT | 55 | |+| INSERT | 60 | DML statements |+| UPDATE | 61 | |+| DELETE | 62 | |-| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| parent | [string](#string) | | Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun} |+<a name="bytebase-v1-VCSType"></a>+### VCSType+Version control system type.+| Name | Number | Description |+| ---- | ------ | ----------- |+| VCS_TYPE_UNSPECIFIED | 0 | Unspecified VCS type. |+| GITHUB | 1 | GitHub version control platform. |+| GITLAB | 2 | GitLab version control platform. |+| BITBUCKET | 3 | Bitbucket version control platform. |+| AZURE_DEVOPS | 4 | Azure DevOps version control platform. |+<a name="bytebase-v1-WebhookType"></a>-<a name="bytebase-v1-ListRolloutsRequest"></a>+### WebhookType+Webhook integration type.-### ListRolloutsRequest+| Name | Number | Description |+| ---- | ------ | ----------- |+| WEBHOOK_TYPE_UNSPECIFIED | 0 | Unspecified type. |+| SLACK | 1 | Slack integration. |+| DISCORD | 2 | Discord integration. |+| TEAMS | 3 | Microsoft Teams integration. |+| DINGTALK | 4 | DingTalk integration. |+| FEISHU | 5 | Feishu integration. |+| WECOM | 6 | WeCom (WeChat Work) integration. |+| LARK | 7 | Lark integration. |+| GOOGLE_CHAT | 8 | Google Chat integration. |-| 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.-For example: update_time >= "2025-01-02T15:04:05Z07:00" task_type in ["DATABASE_MIGRATE", "DATABASE_CREATE"] |+<a name="v1_iam_policy-proto"></a>+<p align="right"><a href="#top">Top</a></p>+## v1/iam_policy.proto-<a name="bytebase-v1-ListRolloutsResponse"></a>-### ListRolloutsResponse+<a name="bytebase-v1-Binding"></a>++### Binding+Binding associates members with a role and optional conditions.| 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. |+| 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 any role with SQL Editor read (e.g. "roles/sqlEditorUser", "roles/sqlEditorReadUser") or write (bb.sql.ddl / bb.sql.dml) access, support "==" operator. resource.schema_name: the schema name, used by any role with SQL Editor read or write (bb.sql.ddl / bb.sql.dml) access; for writes it is evaluated per write-target table, support "==" operator. resource.table_name: the table name, used by any role with SQL Editor read or write (bb.sql.ddl / bb.sql.dml) access; for writes it is evaluated per write-target table, 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}")`.+Known limitations of table/schema-scoped DDL/DML grants: - The scope only gates the write target, not the read sources of a write: e.g. `INSERT INTO granted_table SELECT * FROM other_table` may read `other_table` without a grant on it, so a table-scoped write grant is not an exfiltration boundary. - It must be paired with a database/project-level read grant: a table-scoped grant alone does not satisfy the SQL Editor query method permission (bb.databases.get). - A resource.schema_name-scoped grant only authorizes a write whose schema is unambiguous — qualify the table (schema.table) or select the schema for the SQL Editor session. An unqualified write whose effective schema cannot be determined ahead of execution is denied (qualify it, or use a table-only grant). - Multi-statement batches are authorized at the database level: an earlier statement can rebind the session's default schema or database mid-batch, so per-table/schema scoping is dropped and a table/schema-scoped grant requires a database-level grant. The database-level check is still per target database — a qualified cross-database write is gated by a grant on its own database, not the request database — but an unqualified write whose session default is rebound mid-batch is evaluated against the database it literally names, so qualify cross-database writes or run them as single statements. - A write target in a different project than the SQL-Editor session's database is denied: the per-target check evaluates the session project's IAM policy, so a cross-project write is failed closed (to write it, open the SQL Editor on a database in the target project). - Enforcement is on the statement's literal write target; writes routed elsewhere by a view/synonym, or into a temporary schema (e.g. pg_temp), are evaluated against what the statement names, not the ultimate base object. - Write-target gating uses an ALLOWLIST of statement types the resolver models. It does NOT cover every syntactically-identifiable cross-database write; statement types off the allowlist are authorized against the request database. The allowlist is: - Modeled table/data writes (per-table/schema-scopable): INSERT/UPDATE/DELETE/TRUNCATE/MERGE, LOAD DATA, IMPORT INTO, CREATE TABLE AS / SELECT INTO, and table-level CREATE/DROP/ALTER/RENAME/index. - Modeled non-table object DDL (gated at the DATABASE level by the object's own explicit database/schema qualifier; an unqualified name keeps the request-database check): CREATE/ALTER/DROP of view, procedure/function/routine, trigger, sequence, synonym, type, and (Oracle) package and cluster; plus Oracle ALTER/DROP MATERIALIZED VIEW (Oracle CREATE MATERIALIZED VIEW is not modeled — see below). NOT modeled (these fall back to the request-database check, so a qualified cross-database one is authorized against the request database): MySQL CREATE TRIGGER and CREATE/ALTER/DROP EVENT (bare-string AST names); MSSQL ALTER of view/procedure/function/trigger (no ALTER node in the grammar); Oracle CREATE MATERIALIZED VIEW and the niche object DDL — dimension, attribute dimension, hierarchy, analytic view, JSON duality view, materialized zonemap, operator, in-memory join group, property graph, vector index, index type, domain; COPY ... FROM; and engine-specific bulk-load / deprecated text writes. A structural "write-target object database" extraction layer to remove this allowlist dependence is tracked as a follow-up. - Out of scope (read sources / indirect effects): the tables a write READS (INSERT … SELECT, MERGE … USING, CREATE TABLE AS … SELECT) and objects reached indirectly via views/synonyms/function bodies/triggers are NOT gated. Invariant: for a statement ON the modeled allowlist that explicitly names a different database as its write target, the ACL uses that target database, not the request database. Statement types OFF the allowlist are authorized against the request database.+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-ListTaskRunsRequest"></a>-### ListTaskRunsRequest+<a name="bytebase-v1-BindingDelta"></a>++### BindingDelta+A single change to a binding.+| 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. |-+| 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-ListTaskRunsResponse"></a>-### ListTaskRunsResponse+<a name="bytebase-v1-GetIamPolicyRequest"></a>+### GetIamPolicyRequest+Request message for getting an IAM policy.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| task_runs | [TaskRun](#bytebase-v1-TaskRun) | repeated | The taskRuns from the specified request. |-+| resource | [string](#string) | | The name of the resource to get the IAM policy. Format: projects/{project} Format: workspaces/{workspace} |-<a name="bytebase-v1-PreviewTaskRunRollbackRequest"></a>-### PreviewTaskRunRollbackRequest+<a name="bytebase-v1-IamPolicy"></a>+### IamPolicy+IAM policy that binds members to roles.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun} |-+| 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-PreviewTaskRunRollbackResponse"></a>-### PreviewTaskRunRollbackResponse+<a name="bytebase-v1-PolicyDelta"></a>+### PolicyDelta+Describes changes between two IAM policies.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| statement | [string](#string) | | The rollback SQL statement that would undo the task run. |-+| binding_deltas | [BindingDelta](#bytebase-v1-BindingDelta) | repeated | The delta for Bindings between two policies. |-<a name="bytebase-v1-Rollout"></a>-### Rollout+<a name="bytebase-v1-SetIamPolicyRequest"></a>+### SetIamPolicyRequest+Request message for setting an IAM policy.| 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) | | |+| 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. |-<a name="bytebase-v1-Stage"></a>-### Stage+<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. |-| 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. |-<a name="bytebase-v1-Task"></a>-### Task+<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>++### AuditData+Additional audit data specific to certain operations.+| 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) | | |-| 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. |+| policy_delta | [PolicyDelta](#bytebase-v1-PolicyDelta) | | Changes to IAM policies. |-<a name="bytebase-v1-Task-DatabaseCreate"></a>+<a name="bytebase-v1-AuditLog"></a>-### Task.DatabaseCreate-Payload for creating a new database.+### AuditLog+Audit log entry recording system activity or API call.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| sheet | [string](#string) | | Format: projects/{project}/sheets/{sheet} |+| 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. |+| mcp_delegation | [MCPDelegation](#bytebase-v1-MCPDelegation) | | MCP delegation provenance. Present exactly when the audited call arrived through the MCP server's delegated credential; never set for public API calls. Presence of this message is the MCP-origin marker. |-<a name="bytebase-v1-Task-DatabaseUpdate"></a>+<a name="bytebase-v1-ExportAuditLogsRequest"></a>-### Task.DatabaseUpdate-Payload for updating a database schema.+### ExportAuditLogsRequest+Request message for exporting audit logs.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| sheet | [string](#string) | | Format: projects/{project}/sheets/{sheet} |-| release | [string](#string) | | Format: projects/{project}/releases/{release} |-+| 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-TaskRun"></a>-### TaskRun+<a name="bytebase-v1-ExportAuditLogsResponse"></a>+### ExportAuditLogsResponse+Response message for exporting audit logs.| 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. |-| 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. |+| 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-TaskRun-SchedulerInfo"></a>+<a name="bytebase-v1-MCPDelegation"></a>-### TaskRun.SchedulerInfo-Information about task run scheduling.+### MCPDelegation+Provenance of a call that reached the API through the MCP (Model Context+Protocol) server's delegated credential. The values are copied verbatim from+the verified credential's grant state; empty fields record that the grant+stored nothing (legacy sessions), never a resolved or synthesized value.| 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. |+| scope | [string](#string) | | The OAuth2 grant's consented scope, e.g. "mcp:read-only". Empty when the grant recorded no scope. |+| resource | [string](#string) | | The grant's stored MCP resource URI. Empty for pre-grant legacy sessions. |+| client_id | [string](#string) | | The OAuth2 client the grant was consented to. Empty for legacy web-session tokens at /mcp. |+| correlation_id | [string](#string) | | Correlates the audit rows an MCP session produces. Minted at the /mcp boundary and session-scoped: the MCP SDK hands tool handlers the initialize-time context, so one MCP session carries one correlation ID across all of its tool calls. |-<a name="bytebase-v1-TaskRun-SchedulerInfo-WaitingCause"></a>+<a name="bytebase-v1-RequestMetadata"></a>-### TaskRun.SchedulerInfo.WaitingCause-Information about why a task run is waiting.+### RequestMetadata+Metadata about the incoming request.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| parallel_tasks_limit | [bool](#bool) | | Waiting due to parallel tasks limit. |-+| 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-TaskRunLog"></a>-### TaskRunLog+<a name="bytebase-v1-SearchAuditLogsRequest"></a>+### SearchAuditLogsRequest+Request message for searching audit logs.| 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. |+| 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.++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-TaskRunLogEntry"></a>-### TaskRunLogEntry+<a name="bytebase-v1-SearchAuditLogsResponse"></a>+### SearchAuditLogsResponse+Response message for searching audit logs.| 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). |----+| 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="bytebase-v1-TaskRunLogEntry-CommandExecute"></a>-### 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-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. |-<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-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-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_rollout_service-proto"></a>+<p align="right"><a href="#top">Top</a></p>+## v1/rollout_service.proto+<a name="bytebase-v1-BatchCancelTaskRunsRequest"></a>-<a name="bytebase-v1-TaskRunLogEntry-DatabaseSync"></a>+### BatchCancelTaskRunsRequest-### TaskRunLogEntry.DatabaseSync-Database synchronization details.| 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. |+| 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-TaskRunLogEntry-GhostMigration"></a>+<a name="bytebase-v1-BatchCancelTaskRunsResponse"></a>-### TaskRunLogEntry.GhostMigration-gh-ost migration details.+### BatchCancelTaskRunsResponse-| 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. |+<a name="bytebase-v1-BatchRunTasksRequest"></a>-<a name="bytebase-v1-TaskRunLogEntry-PriorBackup"></a>+### BatchRunTasksRequest-### TaskRunLogEntry.PriorBackup-Prior backup operation details.| 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. |+| 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-TaskRunLogEntry-PriorBackup-PriorBackupDetail"></a>+<a name="bytebase-v1-BatchRunTasksResponse"></a>-### TaskRunLogEntry.PriorBackup.PriorBackupDetail-Prior backup detail for rollback purposes.+### BatchRunTasksResponse-| 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-BatchSkipTasksRequest"></a>-<a name="bytebase-v1-TaskRunLogEntry-PriorBackup-PriorBackupDetail-Item"></a>+### BatchSkipTasksRequest-### TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item-A single backup table mapping.| 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. |+| 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-TaskRunLogEntry-PriorBackup-PriorBackupDetail-Item-Table"></a>+<a name="bytebase-v1-BatchSkipTasksResponse"></a>-### TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item.Table-Table information.+### BatchSkipTasksResponse-| 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. |+<a name="bytebase-v1-CreateRolloutRequest"></a>-<a name="bytebase-v1-TaskRunLogEntry-ReleaseFileExecute"></a>+### CreateRolloutRequest-### TaskRunLogEntry.ReleaseFileExecute-Release file execution details.| 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"). |+| 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-GetRolloutRequest"></a>-<a name="bytebase-v1-TaskRunLogEntry-RetryInfo"></a>+### GetRolloutRequest-### TaskRunLogEntry.RetryInfo-Retry information for failed operations.| 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 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-TaskRunLogEntry-SchemaDump"></a>+<a name="bytebase-v1-GetTaskRunLogRequest"></a>++### GetTaskRunLogRequest-### TaskRunLogEntry.SchemaDump-Schema dump operation details.| 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. |+| parent | [string](#string) | | Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun} |-<a name="bytebase-v1-TaskRunLogEntry-TransactionControl"></a>+<a name="bytebase-v1-GetTaskRunRequest"></a>++### GetTaskRunRequest-### TaskRunLogEntry.TransactionControl-Transaction control operation details.| 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. |+| name | [string](#string) | | Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun} |-<a name="bytebase-v1-TaskRunSession"></a>+<a name="bytebase-v1-GetTaskRunSessionRequest"></a>-### TaskRunSession+### GetTaskRunSessionRequest| 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. |+| parent | [string](#string) | | Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun} |-<a name="bytebase-v1-TaskRunSession-Postgres"></a>+<a name="bytebase-v1-ListRolloutsRequest"></a>++### ListRolloutsRequest-### 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`. |+| 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_CREATE"] |-<a name="bytebase-v1-TaskRunSession-Postgres-Session"></a>-### TaskRunSession.Postgres.Session-PostgreSQL session information read from `pg_stat_activity`.+<a name="bytebase-v1-ListRolloutsResponse"></a>++### ListRolloutsResponse+| 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. |-+| 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-Task-Status"></a>+<a name="bytebase-v1-ListTaskRunsRequest"></a>-### Task.Status+### ListTaskRunsRequest-| 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 |+| ----- | ---- | ----- | ----------- |+| 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-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. |+<a name="bytebase-v1-ListTaskRunsResponse"></a>+### ListTaskRunsResponse-<a name="bytebase-v1-TaskRun-Status"></a>-### TaskRun.Status+| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| task_runs | [TaskRun](#bytebase-v1-TaskRun) | repeated | The taskRuns from the specified request. |-| 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>-### 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-PreviewTaskRunRollbackRequest"></a>+### PreviewTaskRunRollbackRequest-<a name="bytebase-v1-TaskRunLogEntry-Type"></a>-### TaskRunLogEntry.Type-The type of log entry.+| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| name | [string](#string) | | Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun} |-| 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-RolloutService"></a>+<a name="bytebase-v1-PreviewTaskRunRollbackResponse"></a>-### RolloutService-RolloutService manages the execution of deployment plans.+### PreviewTaskRunRollbackResponse-| 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 |-| 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 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 user with rollout policy role for the environment) |-| BatchCancelTaskRuns | [BatchCancelTaskRunsRequest](#bytebase-v1-BatchCancelTaskRunsRequest) | [BatchCancelTaskRunsResponse](#bytebase-v1-BatchCancelTaskRunsResponse) | Cancels multiple task runs. PENDING and AVAILABLE task runs are moved to CANCELED synchronously. RUNNING task runs receive a best-effort cancellation request and may continue running if the request is missed or the executor does not stop. The response does not report which task runs were actually canceled. Permissions required: bb.taskRuns.create (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 |+| ----- | ---- | ----- | ----------- |+| statement | [string](#string) | | The rollback SQL statement that would undo the task run. |-<a name="v1_query_history_service-proto"></a>-<p align="right"><a href="#top">Top</a></p>-## v1/query_history_service.proto-<a name="bytebase-v1-GetQueryHistoryRequest"></a>+<a name="bytebase-v1-Rollout"></a>-### GetQueryHistoryRequest+### Rollout| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The name of the query history to retrieve. Format: projects/{project}/queryHistories/{id} |+| 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-ListQueryHistoriesRequest"></a>+<a name="bytebase-v1-Stage"></a>-### ListQueryHistoriesRequest+### Stage| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| parent | [string](#string) | | The parent project whose query histories are listed. Format: projects/{project} Use "projects/-" to list query histories across all projects (https://google.aip.dev/159); this requires the bb.queryHistories.list permission on the workspace. |-| 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 `ListQueryHistories` call. Provide this to retrieve the subsequent page. |-| filter | [string](#string) | | Filter is the filter to apply on the list query histories. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec--Supported filter: - creator: the user full name in "users/{email}" format, support "==" operator.--For example: creator == "users/{email}" |+| 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-ListQueryHistoriesResponse"></a>+<a name="bytebase-v1-Task"></a>-### ListQueryHistoriesResponse+### Task| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| query_histories | [QueryHistory](#bytebase-v1-QueryHistory) | repeated | The list of query histories. |-| 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 `ListQueryHistories` method to retrieve the next page of history. |-+| 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) | | |+| 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-QueryHistory"></a>-### QueryHistory+<a name="bytebase-v1-Task-DatabaseCreate"></a>+### Task.DatabaseCreate+Payload for creating a new database.| 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) | | |-+| sheet | [string](#string) | | Format: projects/{project}/sheets/{sheet} |-<a name="bytebase-v1-SearchQueryHistoriesRequest"></a>-### SearchQueryHistoriesRequest+<a name="bytebase-v1-Task-DatabaseUpdate"></a>+### Task.DatabaseUpdate+Payload for updating a database schema.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| parent | [string](#string) | | The parent project to search query histories in. Format: projects/{project} The AIP-159 wildcard "projects/-" is not supported; use ListQueryHistories for cross-project reads. |-| 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") |+| sheet | [string](#string) | | Format: projects/{project}/sheets/{sheet} |+| release | [string](#string) | | Format: projects/{project}/releases/{release} |-<a name="bytebase-v1-SearchQueryHistoriesResponse"></a>+<a name="bytebase-v1-TaskRun"></a>-### SearchQueryHistoriesResponse+### TaskRun| 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. |-+| ----- | ---- | ----- | ----------- |+| 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. |+| 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-QueryHistory-Type"></a>+<a name="bytebase-v1-TaskRun-SchedulerInfo"></a>-### QueryHistory.Type+### TaskRun.SchedulerInfo+Information about task run scheduling.-| Name | Number | Description |-| ---- | ------ | ----------- |-| TYPE_UNSPECIFIED | 0 | Unspecified query history type. |-| QUERY | 1 | Query execution for data retrieval. |-| EXPORT | 2 | Data export operation to file. |+| 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. |---<a name="bytebase-v1-QueryHistoryService"></a>-### QueryHistoryService-QueryHistoryService manages query history records of SQL Editor queries and exports.+<a name="bytebase-v1-TaskRun-SchedulerInfo-WaitingCause"></a>-| Method Name | Request Type | Response Type | Description |-| ----------- | ------------ | ------------- | ------------|-| 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) |-| ListQueryHistories | [ListQueryHistoriesRequest](#bytebase-v1-ListQueryHistoriesRequest) | [ListQueryHistoriesResponse](#bytebase-v1-ListQueryHistoriesResponse) | ListQueryHistories lists query histories of all users in a project. Permissions required: bb.queryHistories.list |-| GetQueryHistory | [GetQueryHistoryRequest](#bytebase-v1-GetQueryHistoryRequest) | [QueryHistory](#bytebase-v1-QueryHistory) | GetQueryHistory gets a single query history for the caller. Permissions required: None (only returns the caller's own query history) |+### 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. |-<a name="v1_sql_service-proto"></a>-<p align="right"><a href="#top">Top</a></p>-## v1/sql_service.proto-<a name="bytebase-v1-AdminExecuteRequest"></a>+<a name="bytebase-v1-TaskRunLog"></a>-### AdminExecuteRequest+### TaskRunLog| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The name is the instance name to execute the query against. Format: instances/{instance}/databases/{databaseName} |-| statement | [string](#string) | | The SQL statement to execute. |-| limit | [int32](#int32) | | The maximum number of rows to return. |-| schema | [string](#string) | optional | The default schema to execute the statement. Equals to the current schema in Oracle and search path in Postgres. |-| container | [string](#string) | optional | Container is the container name to execute the query against, used for CosmosDB only. |+| name | [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-AdminExecuteResponse"></a>+<a name="bytebase-v1-TaskRunLogEntry"></a>-### AdminExecuteResponse+### TaskRunLogEntry| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| results | [QueryResult](#bytebase-v1-QueryResult) | repeated | The query results. |-+| 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). |-<a name="bytebase-v1-Advice"></a>-### Advice+<a name="bytebase-v1-TaskRunLogEntry-CommandExecute"></a>+### TaskRunLogEntry.CommandExecute+Command execution details.| 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. |-+| 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-ExportRequest"></a>-### ExportRequest+<a name="bytebase-v1-TaskRunLogEntry-CommandExecute-CommandResponse"></a>+### TaskRunLogEntry.CommandExecute.CommandResponse+Command execution response.| 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} |-| 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. |-| container | [string](#string) | optional | Container is the container name to execute the query against, used for CosmosDB only. |-+| 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-ExportResponse"></a>-### ExportResponse+<a name="bytebase-v1-TaskRunLogEntry-ComputeDiff"></a>+### TaskRunLogEntry.ComputeDiff+Schema diff computation details.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| content | [bytes](#bytes) | | The export file content. |-| applied_access_grant | [string](#string) | | The just-in-time access grant applied to this export, if any. Format: projects/{project}/accessGrants/{accessGrant}. Empty when the user was authorized through normal ACL rather than a grant. |-+| 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="bytebase-v1-MaskingReason"></a>-### MaskingReason+<a name="bytebase-v1-TaskRunLogEntry-DatabaseSync"></a>+### TaskRunLogEntry.DatabaseSync+Database synchronization details.| 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). |-+| 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-QueryOption"></a>-### QueryOption+<a name="bytebase-v1-TaskRunLogEntry-GhostMigration"></a>+### TaskRunLogEntry.GhostMigration+gh-ost migration details.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| redis_run_commands_on | [QueryOption.RedisRunCommandsOn](#bytebase-v1-QueryOption-RedisRunCommandsOn) | | |-| mssql_explain_format | [QueryOption.MSSQLExplainFormat](#bytebase-v1-QueryOption-MSSQLExplainFormat) | | |-+| 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-QueryRequest"></a>-### QueryRequest+<a name="bytebase-v1-TaskRunLogEntry-PriorBackup"></a>+### TaskRunLogEntry.PriorBackup+Prior backup operation details.| 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. |-+| 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-QueryResponse"></a>-### QueryResponse+<a name="bytebase-v1-TaskRunLogEntry-PriorBackup-PriorBackupDetail"></a>+### TaskRunLogEntry.PriorBackup.PriorBackupDetail+Prior backup detail for rollback purposes.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| results | [QueryResult](#bytebase-v1-QueryResult) | repeated | The query results. |-| applied_access_grant | [string](#string) | | The just-in-time access grant applied to this query, if any. Format: projects/{project}/accessGrants/{accessGrant}. Empty when the user was authorized through normal ACL rather than a grant. |-+| items | [TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item](#bytebase-v1-TaskRunLogEntry-PriorBackup-PriorBackupDetail-Item) | repeated | The list of backed up tables. |-<a name="bytebase-v1-QueryResult"></a>-### QueryResult+<a name="bytebase-v1-TaskRunLogEntry-PriorBackup-PriorBackupDetail-Item"></a>+### TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item+A single backup table mapping.| 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). |+| 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-QueryResult-CommandError"></a>+<a name="bytebase-v1-TaskRunLogEntry-PriorBackup-PriorBackupDetail-Item-Table"></a>-### QueryResult.CommandError-Permission denied with resource information or disallowed command_type.-Either resources or command_type is available.+### TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item.Table+Table information.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| command_type | [QueryResult.CommandError.Type](#bytebase-v1-QueryResult-CommandError-Type) | | Disallowed command_type. |-+| 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-QueryResult-Message"></a>-### QueryResult.Message+<a name="bytebase-v1-TaskRunLogEntry-ReleaseFileExecute"></a>+### TaskRunLogEntry.ReleaseFileExecute+Release file execution details.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| level | [QueryResult.Message.Level](#bytebase-v1-QueryResult-Message-Level) | | |-| content | [string](#string) | | |+| 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-QueryResult-PostgresError"></a>+<a name="bytebase-v1-TaskRunLogEntry-RetryInfo"></a>-### QueryResult.PostgresError-refer https://www.postgresql.org/docs/11/protocol-error-fields.html-for field description.+### TaskRunLogEntry.RetryInfo+Retry information for failed operations.| 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) | | |+| 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-QueryResult-SyntaxError"></a>+<a name="bytebase-v1-TaskRunLogEntry-SchemaDump"></a>-### QueryResult.SyntaxError-Syntax error with position information for editor highlighting+### TaskRunLogEntry.SchemaDump+Schema dump operation details.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| start_position | [Position](#bytebase-v1-Position) | | Position information for highlighting in editor |-+| 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-QueryRow"></a>-### QueryRow+<a name="bytebase-v1-TaskRunLogEntry-TransactionControl"></a>+### TaskRunLogEntry.TransactionControl+Transaction control operation details.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| values | [RowValue](#bytebase-v1-RowValue) | repeated | Row values of the query result. |+| 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-RowValue"></a>+<a name="bytebase-v1-TaskRunSession"></a>-### RowValue+### TaskRunSession| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| null_value | [google.protobuf.NullValue](#google-protobuf-NullValue) | | |-| bool_value | [bool](#bool) | | |-| bytes_value | [bytes](#bytes) | | |-| double_value | [double](#double) | | |-| float_value | [float](#float) | | |-| int32_value | [int32](#int32) | | |-| int64_value | [int64](#int64) | | |-| string_value | [string](#string) | | |-| uint32_value | [uint32](#uint32) | | |-| uint64_value | [uint64](#uint64) | | |-| value_value | [google.protobuf.Value](#google-protobuf-Value) | | value_value is used for Spanner and TUPLE ARRAY MAP in Clickhouse only. |-| timestamp_value | [RowValue.Timestamp](#bytebase-v1-RowValue-Timestamp) | | timestamp_value is used for the timestamp without time zone data type, meaning it only includes the timestamp without any time zone or location info. Although it may be expressed as a UTC value, it should be seen as a timestamp missing location context. |-| timestamp_tz_value | [RowValue.TimestampTZ](#bytebase-v1-RowValue-TimestampTZ) | | timestamp_tz_value is used for the timestamptz data type, which accurately represents the timestamp with location information. |-+| name | [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-RowValue-Timestamp"></a>-### RowValue.Timestamp+<a name="bytebase-v1-TaskRunSession-Postgres"></a>+### TaskRunSession.Postgres+PostgreSQL session information.| 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. |-+| 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-RowValue-TimestampTZ"></a>-### RowValue.TimestampTZ+<a name="bytebase-v1-TaskRunSession-Postgres-Session"></a>+### TaskRunSession.Postgres.Session+PostgreSQL session information read from `pg_stat_activity`.| 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) | | |+| 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. |@@ -2713,87 +2644,86 @@ Syntax error with position information for editor highlighting-<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. |--+<a name="bytebase-v1-Task-Status"></a>-<a name="bytebase-v1-Advice-RuleType"></a>+### Task.Status-### 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. |+| 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-QueryOption-MSSQLExplainFormat"></a>+<a name="bytebase-v1-Task-Type"></a>-### QueryOption.MSSQLExplainFormat+### Task.Type| 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 |+| 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. |-<a name="bytebase-v1-QueryOption-RedisRunCommandsOn"></a>+<a name="bytebase-v1-TaskRun-Status"></a>-### QueryOption.RedisRunCommandsOn+### TaskRun.Status| 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. |-+| 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-QueryResult-CommandError-Type"></a>-### QueryResult.CommandError.Type+<a name="bytebase-v1-TaskRunLogEntry-TransactionControl-Type"></a>+### TaskRunLogEntry.TransactionControl.Type+Transaction control type.| Name | Number | Description || ---- | ------ | ----------- |-| TYPE_UNSPECIFIED | 0 | |-| DDL | 1 | |-| DML | 2 | |-| NON_READ_ONLY | 3 | |-+| TYPE_UNSPECIFIED | 0 | Unspecified type. |+| BEGIN | 1 | Begin transaction. |+| COMMIT | 2 | Commit transaction. |+| ROLLBACK | 3 | Rollback transaction. |-<a name="bytebase-v1-QueryResult-Message-Level"></a>-### QueryResult.Message.Level+<a name="bytebase-v1-TaskRunLogEntry-Type"></a>+### TaskRunLogEntry.Type+The type of log entry.| Name | Number | Description || ---- | ------ | ----------- |-| LEVEL_UNSPECIFIED | 0 | Unspecified message level. |-| INFO | 1 | Informational message. |-| WARNING | 2 | Warning message indicating potential issues. |-| DEBUG | 3 | Debug message for development and troubleshooting. |-| LOG | 4 | General log message. |-| NOTICE | 5 | Notice message for important information. |-| EXCEPTION | 6 | Exception message indicating error conditions. |+| TYPE_UNSPECIFIED | 0 | Unspecified type. |+| 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. |@@ -2801,924 +2731,1012 @@ RuleType indicates the source of the linting rule.-<a name="bytebase-v1-SQLService"></a>+<a name="bytebase-v1-RolloutService"></a>-### SQLService-SQLService executes SQL queries and manages query operations.+### RolloutService+RolloutService manages the execution of deployment plans.| 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) | Deprecated: use QueryHistoryService.SearchQueryHistories instead. Delegating alias kept for upgrade transition; will be removed in a future release. No HTTP binding: the REST route is served by QueryHistoryService. Permissions required: None (only returns caller's own query histories) |-| ListQueryHistories | [ListQueryHistoriesRequest](#bytebase-v1-ListQueryHistoriesRequest) | [ListQueryHistoriesResponse](#bytebase-v1-ListQueryHistoriesResponse) | Deprecated: use QueryHistoryService.ListQueryHistories instead. Delegating alias kept for upgrade transition; will be removed in a future release. No HTTP binding: the REST route is served by QueryHistoryService. Permissions required: bb.queryHistories.list |-| GetQueryHistory | [GetQueryHistoryRequest](#bytebase-v1-GetQueryHistoryRequest) | [QueryHistory](#bytebase-v1-QueryHistory) | Deprecated: use QueryHistoryService.GetQueryHistory instead. Delegating alias kept for upgrade transition; will be removed in a future release. No HTTP binding: the REST route is served by QueryHistoryService. Permissions required: None (only returns the caller's own query history) |-| Export | [ExportRequest](#bytebase-v1-ExportRequest) | [ExportResponse](#bytebase-v1-ExportResponse) | Exports query results to a file format. Permissions required: bb.databases.get |+| 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 |+| 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 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 user with rollout policy role for the environment) |+| BatchCancelTaskRuns | [BatchCancelTaskRunsRequest](#bytebase-v1-BatchCancelTaskRunsRequest) | [BatchCancelTaskRunsResponse](#bytebase-v1-BatchCancelTaskRunsResponse) | Cancels multiple task runs. PENDING and AVAILABLE task runs are moved to CANCELED synchronously. RUNNING task runs receive a best-effort cancellation request and may continue running if the request is missed or the executor does not stop. The response does not report which task runs were actually canceled. Permissions required: bb.taskRuns.create (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 |-<a name="v1_plan_service-proto"></a>+<a name="v1_query_history_service-proto"></a><p align="right"><a href="#top">Top</a></p>-## v1/plan_service.proto+## v1/query_history_service.proto-<a name="bytebase-v1-CancelPlanCheckRunRequest"></a>+<a name="bytebase-v1-GetQueryHistoryRequest"></a>-### CancelPlanCheckRunRequest+### GetQueryHistoryRequest| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The name of the plan check run to cancel. Format: projects/{project}/plans/{plan}/planCheckRun |+| name | [string](#string) | | The name of the query history to retrieve. Format: projects/{project}/queryHistories/{id} |-<a name="bytebase-v1-CancelPlanCheckRunResponse"></a>+<a name="bytebase-v1-ListQueryHistoriesRequest"></a>++### ListQueryHistoriesRequest++++| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| parent | [string](#string) | | The parent project whose query histories are listed. Format: projects/{project} Use "projects/-" to list query histories across all projects (https://google.aip.dev/159); this requires the bb.queryHistories.list permission on the workspace. |+| 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 `ListQueryHistories` call. Provide this to retrieve the subsequent page. |+| filter | [string](#string) | | Filter is the filter to apply on the list query histories. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec++Supported filter: - creator: the user full name in "users/{email}" format, support "==" operator.++For example: creator == "users/{email}" |+++++++<a name="bytebase-v1-ListQueryHistoriesResponse"></a>++### ListQueryHistoriesResponse++++| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| query_histories | [QueryHistory](#bytebase-v1-QueryHistory) | repeated | The list of query histories. |+| 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 `ListQueryHistories` method to retrieve the next page of history. |+++++++<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-SearchQueryHistoriesRequest"></a>++### SearchQueryHistoriesRequest++++| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| parent | [string](#string) | | The parent project to search query histories in. Format: projects/{project} The AIP-159 wildcard "projects/-" is not supported; use ListQueryHistories for cross-project reads. |+| 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-### CancelPlanCheckRunResponse+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-CreatePlanRequest"></a>+<a name="bytebase-v1-SearchQueryHistoriesResponse"></a>-### CreatePlanRequest+### SearchQueryHistoriesResponse| 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. |+| 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-GetPlanCheckRunRequest"></a>-### GetPlanCheckRunRequest+<a name="bytebase-v1-QueryHistory-Type"></a>+### QueryHistory.Type-| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The name of the plan check run to retrieve. Format: projects/{project}/plans/{plan}/planCheckRun |+| 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-GetPlanRequest"></a>-### GetPlanRequest+<a name="bytebase-v1-QueryHistoryService"></a>+### QueryHistoryService+QueryHistoryService manages query history records of SQL Editor queries and exports.-| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The name of the plan to retrieve. Format: projects/{project}/plans/{plan} |+| Method Name | Request Type | Response Type | Description |+| ----------- | ------------ | ------------- | ------------|+| 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) |+| ListQueryHistories | [ListQueryHistoriesRequest](#bytebase-v1-ListQueryHistoriesRequest) | [ListQueryHistoriesResponse](#bytebase-v1-ListQueryHistoriesResponse) | ListQueryHistories lists query histories of all users in a project. Permissions required: bb.queryHistories.list |+| GetQueryHistory | [GetQueryHistoryRequest](#bytebase-v1-GetQueryHistoryRequest) | [QueryHistory](#bytebase-v1-QueryHistory) | GetQueryHistory gets a single query history for the caller. Permissions required: None (only returns the caller's own query history) |+<a name="v1_sql_service-proto"></a>+<p align="right"><a href="#top">Top</a></p>-<a name="bytebase-v1-ListPlansRequest"></a>+## v1/sql_service.proto-### ListPlansRequest+<a name="bytebase-v1-AdminExecuteRequest"></a>-| 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.+### AdminExecuteRequest-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: - 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". - 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" or "change_database_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" title == "My Plan" title.contains("database migration") spec_type == "change_database_config" state == "ACTIVE" |+| 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. |-<a name="bytebase-v1-ListPlansResponse"></a>+<a name="bytebase-v1-AdminExecuteResponse"></a>-### ListPlansResponse+### AdminExecuteResponse| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| plans | [Plan](#bytebase-v1-Plan) | repeated | The plans from the specified request. |-| next_page_token | [string](#string) | | A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. |+| results | [QueryResult](#bytebase-v1-QueryResult) | repeated | The query results. |-<a name="bytebase-v1-Plan"></a>+<a name="bytebase-v1-Advice"></a>-### Plan+### Advice| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The name of the plan. `plan` is a system generated ID. Format: projects/{project}/plans/{plan} |-| state | [State](#bytebase-v1-State) | | The state of the plan. |-| issue | [string](#string) | | The issue associated with the plan. Can be empty. Format: projects/{project}/issues/{issue} |-| 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 or the linked issue is a draft. |-| 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. |-| issue_status | [IssueStatus](#bytebase-v1-IssueStatus) | | The lifecycle status of the linked issue. Unspecified when no linked issue exists. |+| 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-Plan-ChangeDatabaseConfig"></a>+<a name="bytebase-v1-ExportRequest"></a>-### Plan.ChangeDatabaseConfig+### ExportRequest| 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 name is the resource name to execute the export against. Format: instances/{instance}/databases/{database} Format: instances/{instance} |+| 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. |+| container | [string](#string) | optional | Container is the container name to execute the query against, used for CosmosDB only. |-<a name="bytebase-v1-Plan-CreateDatabaseConfig"></a>+<a name="bytebase-v1-ExportResponse"></a>-### Plan.CreateDatabaseConfig+### ExportResponse| 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. |+| content | [bytes](#bytes) | | The export file content. |+| applied_access_grant | [string](#string) | | The just-in-time access grant applied to this export, if any. Format: projects/{project}/accessGrants/{accessGrant}. Empty when the user was authorized through normal ACL rather than a grant. |-<a name="bytebase-v1-Plan-PlanCheckRunStatusCountEntry"></a>+<a name="bytebase-v1-MaskingReason"></a>-### Plan.PlanCheckRunStatusCountEntry+### MaskingReason| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| key | [string](#string) | | |-| value | [int32](#int32) | | |+| semantic_type_id | [string](#string) | | The semantic type that triggered masking (e.g., "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). |-<a name="bytebase-v1-Plan-RolloutStageSummary"></a>+<a name="bytebase-v1-QueryOption"></a>-### Plan.RolloutStageSummary+### QueryOption| 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. |+| redis_run_commands_on | [QueryOption.RedisRunCommandsOn](#bytebase-v1-QueryOption-RedisRunCommandsOn) | | |+| mssql_explain_format | [QueryOption.MSSQLExplainFormat](#bytebase-v1-QueryOption-MSSQLExplainFormat) | | |-<a name="bytebase-v1-Plan-Spec"></a>+<a name="bytebase-v1-QueryRequest"></a>-### Plan.Spec+### QueryRequest| 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) | | |+| 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-Plan-TaskStatusCount"></a>+<a name="bytebase-v1-QueryResponse"></a>-### Plan.TaskStatusCount+### QueryResponse| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| status | [Task.Status](#bytebase-v1-Task-Status) | | The task status. |-| count | [int32](#int32) | | The number of tasks in the status. |+| results | [QueryResult](#bytebase-v1-QueryResult) | repeated | The query results. |+| applied_access_grant | [string](#string) | | The just-in-time access grant applied to this query, if any. Format: projects/{project}/accessGrants/{accessGrant}. Empty when the user was authorized through normal ACL rather than a grant. |-<a name="bytebase-v1-PlanCheckRun"></a>+<a name="bytebase-v1-QueryResult"></a>-### PlanCheckRun+### QueryResult| 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) | | |-+| 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-PlanCheckRun-Result"></a>-### PlanCheckRun.Result+<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 || ----- | ---- | ----- | ----------- |-| 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) | | |+| command_type | [QueryResult.CommandError.Type](#bytebase-v1-QueryResult-CommandError-Type) | | Disallowed command_type. |-<a name="bytebase-v1-PlanCheckRun-Result-SqlReviewReport"></a>+<a name="bytebase-v1-QueryResult-Message"></a>-### PlanCheckRun.Result.SqlReviewReport+### QueryResult.Message| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| start_position | [Position](#bytebase-v1-Position) | | Position of the SQL statement. |-| end_position | [Position](#bytebase-v1-Position) | | |-+| level | [QueryResult.Message.Level](#bytebase-v1-QueryResult-Message-Level) | | |+| content | [string](#string) | | |-<a name="bytebase-v1-PlanCheckRun-Result-SqlSummaryReport"></a>-### PlanCheckRun.Result.SqlSummaryReport+<a name="bytebase-v1-QueryResult-PostgresError"></a>+### QueryResult.PostgresError+refer https://www.postgresql.org/docs/11/protocol-error-fields.html+for field description.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| statement_types | [StatementType](#bytebase-v1-StatementType) | repeated | statement_types are the types of statements that are found in the sql. |-| affected_rows | [int64](#int64) | | |-+| severity | [string](#string) | | |+| code | [string](#string) | | |+| message | [string](#string) | | |+| detail | [string](#string) | | |+| hint | [string](#string) | | |+| position | [int32](#int32) | | |+| internal_position | [int32](#int32) | | |+| internal_query | [string](#string) | | |+| where | [string](#string) | | |+| schema_name | [string](#string) | | |+| table_name | [string](#string) | | |+| column_name | [string](#string) | | |+| data_type_name | [string](#string) | | |+| constraint_name | [string](#string) | | |+| file | [string](#string) | | |+| line | [int32](#int32) | | |+| routine | [string](#string) | | |-<a name="bytebase-v1-RunPlanChecksRequest"></a>-### RunPlanChecksRequest+<a name="bytebase-v1-QueryResult-SyntaxError"></a>+### QueryResult.SyntaxError+Syntax error with position information for editor highlighting| 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. |+| start_position | [Position](#bytebase-v1-Position) | | Position information for highlighting in editor |-<a name="bytebase-v1-RunPlanChecksResponse"></a>+<a name="bytebase-v1-QueryRow"></a>++### QueryRow+-### RunPlanChecksResponse+| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| values | [RowValue](#bytebase-v1-RowValue) | repeated | Row values of the query result. |-<a name="bytebase-v1-UpdatePlanRequest"></a>+<a name="bytebase-v1-RowValue"></a>-### UpdatePlanRequest+### RowValue| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| 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. |--+| 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-PlanCheckRun-Result-Type"></a>-### PlanCheckRun.Result.Type+<a name="bytebase-v1-RowValue-Timestamp"></a>+### RowValue.Timestamp-| Name | Number | Description |-| ---- | ------ | ----------- |-| TYPE_UNSPECIFIED | 0 | |-| STATEMENT_ADVISE | 1 | |-| STATEMENT_SUMMARY_REPORT | 2 | |-| GHOST_SYNC | 3 | |+| 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. |-<a name="bytebase-v1-PlanCheckRun-Status"></a>-### PlanCheckRun.Status-| Name | Number | Description |-| ---- | ------ | ----------- |-| STATUS_UNSPECIFIED | 0 | |-| RUNNING | 1 | |-| DONE | 2 | |-| FAILED | 3 | |-| CANCELED | 4 | |-+<a name="bytebase-v1-RowValue-TimestampTZ"></a>-+### RowValue.TimestampTZ-<a name="bytebase-v1-PlanService"></a>-### PlanService-PlanService manages deployment plans for database changes.+| 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) | | |-| 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 |--<a name="v1_issue_service-proto"></a>-<p align="right"><a href="#top">Top</a></p>-## v1/issue_service.proto+<a name="bytebase-v1-Advice-Level"></a>-<a name="bytebase-v1-ApprovalFlow"></a>+### Advice.Level+Level represents the severity level of the advice.-### ApprovalFlow+| 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 |-| ----- | ---- | ----- | ----------- |-| roles | [string](#string) | repeated | The roles required for approval in order. |+<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-QueryOption-MSSQLExplainFormat"></a>-<a name="bytebase-v1-ApprovalTemplate"></a>+### QueryOption.MSSQLExplainFormat-### ApprovalTemplate+| 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 |-| 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-QueryOption-RedisRunCommandsOn"></a>+### 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-ApproveIssueRequest"></a>-### ApproveIssueRequest+<a name="bytebase-v1-QueryResult-CommandError-Type"></a>+### QueryResult.CommandError.Type-| 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. |+| Name | Number | Description |+| ---- | ------ | ----------- |+| TYPE_UNSPECIFIED | 0 | |+| DDL | 1 | |+| DML | 2 | |+| NON_READ_ONLY | 3 | |+<a name="bytebase-v1-QueryResult-Message-Level"></a>+### QueryResult.Message.Level-<a name="bytebase-v1-BatchUpdateIssuesStatusRequest"></a>+| 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. |-### BatchUpdateIssuesStatusRequest-| 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. |+<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) | Deprecated: use QueryHistoryService.SearchQueryHistories instead. Delegating alias kept for upgrade transition; will be removed in a future release. No HTTP binding: the REST route is served by QueryHistoryService. Permissions required: None (only returns caller's own query histories) |+| ListQueryHistories | [ListQueryHistoriesRequest](#bytebase-v1-ListQueryHistoriesRequest) | [ListQueryHistoriesResponse](#bytebase-v1-ListQueryHistoriesResponse) | Deprecated: use QueryHistoryService.ListQueryHistories instead. Delegating alias kept for upgrade transition; will be removed in a future release. No HTTP binding: the REST route is served by QueryHistoryService. Permissions required: bb.queryHistories.list |+| GetQueryHistory | [GetQueryHistoryRequest](#bytebase-v1-GetQueryHistoryRequest) | [QueryHistory](#bytebase-v1-QueryHistory) | Deprecated: use QueryHistoryService.GetQueryHistory instead. Delegating alias kept for upgrade transition; will be removed in a future release. No HTTP binding: the REST route is served by QueryHistoryService. Permissions required: None (only returns the caller's own query history) |+| Export | [ExportRequest](#bytebase-v1-ExportRequest) | [ExportResponse](#bytebase-v1-ExportResponse) | Exports query results to a file format. Permissions required: bb.databases.get |-<a name="bytebase-v1-BatchUpdateIssuesStatusResponse"></a>-### BatchUpdateIssuesStatusResponse+<a name="v1_plan_service-proto"></a>+<p align="right"><a href="#top">Top</a></p>+## v1/plan_service.proto-<a name="bytebase-v1-CreateIssueCommentRequest"></a>+<a name="bytebase-v1-CancelPlanCheckRunRequest"></a>-### CreateIssueCommentRequest+### CancelPlanCheckRunRequest| 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. |--+| name | [string](#string) | | The name of the plan check run to cancel. Format: projects/{project}/plans/{plan}/planCheckRun |-<a name="bytebase-v1-CreateIssueRequest"></a>-### CreateIssueRequest+<a name="bytebase-v1-CancelPlanCheckRunResponse"></a>+### CancelPlanCheckRunResponse-| 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. |-<a name="bytebase-v1-GetIssueRequest"></a>+<a name="bytebase-v1-CreatePlanRequest"></a>-### GetIssueRequest+### CreatePlanRequest| 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) | | 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-Issue"></a>+<a name="bytebase-v1-GetPlanCheckRunRequest"></a>-### Issue+### GetPlanCheckRunRequest| 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 | [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} |-| draft | [bool](#bool) | | Whether this issue is a Draft Review Issue. |+| name | [string](#string) | | The name of the plan check run to retrieve. Format: projects/{project}/plans/{plan}/planCheckRun |-<a name="bytebase-v1-Issue-Approver"></a>+<a name="bytebase-v1-GetPlanRequest"></a>++### GetPlanRequest-### 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] |+| name | [string](#string) | | The name of the plan to retrieve. Format: projects/{project}/plans/{plan} |-<a name="bytebase-v1-IssueComment"></a>+<a name="bytebase-v1-ListPlansRequest"></a>++### ListPlansRequest-### 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_update | [IssueComment.PlanUpdate](#bytebase-v1-IssueComment-PlanUpdate) | | Plan update event. |-| review_submission | [IssueComment.ReviewSubmission](#bytebase-v1-IssueComment-ReviewSubmission) | | Review submission event. |-----+| 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.-<a name="bytebase-v1-IssueComment-Approval"></a>+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-### IssueComment.Approval-Approval event information.+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". - 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" or "change_database_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" title == "My Plan" title.contains("database migration") spec_type == "change_database_config" state == "ACTIVE" |-| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| status | [IssueComment.Approval.Status](#bytebase-v1-IssueComment-Approval-Status) | | The approval status. |+<a name="bytebase-v1-ListPlansResponse"></a>-<a name="bytebase-v1-IssueComment-IssueUpdate"></a>+### ListPlansResponse-### 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 | |+| plans | [Plan](#bytebase-v1-Plan) | repeated | The plans from the specified request. |+| next_page_token | [string](#string) | | A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. |-<a name="bytebase-v1-IssueComment-PlanUpdate"></a>+<a name="bytebase-v1-Plan"></a>++### Plan-### 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 || ----- | ---- | ----- | ----------- |-| from_specs | [Plan.Spec](#bytebase-v1-Plan-Spec) | repeated | |-| to_specs | [Plan.Spec](#bytebase-v1-Plan-Spec) | repeated | |+| 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 or the linked issue is a draft. |+| 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. |+| issue_status | [IssueStatus](#bytebase-v1-IssueStatus) | | The lifecycle status of the linked issue. Unspecified when no linked issue exists. |-<a name="bytebase-v1-IssueComment-ReviewSubmission"></a>+<a name="bytebase-v1-Plan-ChangeDatabaseConfig"></a>++### Plan.ChangeDatabaseConfig-### IssueComment.ReviewSubmission-Review submission event information.+| 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. |-<a name="bytebase-v1-ListIssueCommentsRequest"></a>-### ListIssueCommentsRequest++<a name="bytebase-v1-Plan-CreateDatabaseConfig"></a>++### Plan.CreateDatabaseConfig| 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. |+| 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-ListIssueCommentsResponse"></a>+<a name="bytebase-v1-Plan-PlanCheckRunStatusCountEntry"></a>-### ListIssueCommentsResponse+### Plan.PlanCheckRunStatusCountEntry| 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. |+| key | [string](#string) | | |+| value | [int32](#int32) | | |-<a name="bytebase-v1-ListIssuesRequest"></a>+<a name="bytebase-v1-Plan-RolloutStageSummary"></a>-### ListIssuesRequest+### Plan.RolloutStageSummary| 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" |+| 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-ListIssuesResponse"></a>+<a name="bytebase-v1-Plan-Spec"></a>-### ListIssuesResponse+### Plan.Spec| 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. |+| 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) | | |-<a name="bytebase-v1-RejectIssueRequest"></a>+<a name="bytebase-v1-Plan-TaskStatusCount"></a>-### RejectIssueRequest+### Plan.TaskStatusCount| 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. |+| status | [Task.Status](#bytebase-v1-Task-Status) | | The task status. |+| count | [int32](#int32) | | The number of tasks in the status. |-<a name="bytebase-v1-RequestIssueRequest"></a>+<a name="bytebase-v1-PlanCheckRun"></a>-### RequestIssueRequest+### PlanCheckRun| 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. |+| 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) | | |-<a name="bytebase-v1-RetryIssueApprovalRequest"></a>+<a name="bytebase-v1-PlanCheckRun-Result"></a>-### RetryIssueApprovalRequest+### PlanCheckRun.Result| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The name of the issue whose approval-finding should be retried. Format: projects/{project}/issues/{issue} |+| 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-RoleGrant"></a>+<a name="bytebase-v1-PlanCheckRun-Result-SqlReviewReport"></a>-### RoleGrant+### PlanCheckRun.Result.SqlReviewReport| 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. |+| start_position | [Position](#bytebase-v1-Position) | | Position of the SQL statement. |+| end_position | [Position](#bytebase-v1-Position) | | |-<a name="bytebase-v1-SearchIssuesRequest"></a>+<a name="bytebase-v1-PlanCheckRun-Result-SqlSummaryReport"></a>-### SearchIssuesRequest+### PlanCheckRun.Result.SqlSummaryReport| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| parent | [string](#string) | | The parent, which owns this collection of issues. Format: projects/{project} Use the wildcard "projects/-" to search across collections (AIP-159); the result is restricted to the projects where the caller holds bb.issues.get. For a concrete project, the caller must hold bb.issues.get on that project or the request is denied. |-| 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" |+| 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="bytebase-v1-SearchIssuesResponse"></a>+<a name="bytebase-v1-RunPlanChecksRequest"></a>-### SearchIssuesResponse+### RunPlanChecksRequest| 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) | | 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-UpdateIssueCommentRequest"></a>-### UpdateIssueCommentRequest+<a name="bytebase-v1-RunPlanChecksResponse"></a>+### RunPlanChecksResponse-| 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. |-<a name="bytebase-v1-UpdateIssueRequest"></a>+<a name="bytebase-v1-UpdatePlanRequest"></a>-### UpdateIssueRequest+### UpdatePlanRequest| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| issue | [Issue](#bytebase-v1-Issue) | | The issue to update.+| plan | [Plan](#bytebase-v1-Plan) | | The plan to update.-The issue's `name` field is used to identify the issue to update. Format: projects/{project}/issues/{issue} |+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 issue is not found, a new issue will be created. In this situation, `update_mask` is ignored. |+| 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. |@@ -3727,45 +3745,32 @@ The issue's `name` field is used to identify the issue to update. Format: pr-<a name="bytebase-v1-Issue-Approver-Status"></a>--### 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-PlanCheckRun-Result-Type"></a>-<a name="bytebase-v1-Issue-Type"></a>+### PlanCheckRun.Result.Type-### 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. |-| ACCESS_GRANT | 4 | Temporary access grant request. |+| TYPE_UNSPECIFIED | 0 | |+| STATEMENT_ADVISE | 1 | |+| STATEMENT_SUMMARY_REPORT | 2 | |+| GHOST_SYNC | 3 | |-<a name="bytebase-v1-IssueComment-Approval-Status"></a>+<a name="bytebase-v1-PlanCheckRun-Status"></a>++### PlanCheckRun.Status-### IssueComment.Approval.Status-Approval status values.| Name | Number | Description || ---- | ------ | ----------- |-| STATUS_UNSPECIFIED | 0 | Unspecified status. |-| PENDING | 1 | Approval pending. |-| APPROVED | 2 | Approved. |-| REJECTED | 3 | Rejected. |+| STATUS_UNSPECIFIED | 0 | |+| RUNNING | 1 | |+| DONE | 2 | |+| FAILED | 3 | |+| CANCELED | 4 | |@@ -3773,1522 +3778,1487 @@ Approval status values.-<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-PlanService"></a>++### PlanService+PlanService manages deployment plans for database changes.++| Method Name | Request Type | Response Type | Description |+| ----------- | ------------ | ------------- | ------------|+| GetPlan | [GetPlanRequest](#bytebase-v1-GetPlanRequest) | [Plan](#bytebase-v1-Plan) | Retrieves a deployment plan by name. Permissions required: bb.plans.get |+| ListPlans | [ListPlansRequest](#bytebase-v1-ListPlansRequest) | [ListPlansResponse](#bytebase-v1-ListPlansResponse) | Lists deployment plans in a project. Permissions required: bb.plans.list |+| 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 |-<a name="v1_setting_service-proto"></a>+<a name="v1_issue_service-proto"></a><p align="right"><a href="#top">Top</a></p>-## v1/setting_service.proto+## v1/issue_service.proto-<a name="bytebase-v1-AISetting"></a>+<a name="bytebase-v1-ApprovalFlow"></a>-### AISetting+### ApprovalFlow| 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) | | |+| roles | [string](#string) | repeated | The roles required for approval in order. |-<a name="bytebase-v1-Algorithm"></a>+<a name="bytebase-v1-ApprovalTemplate"></a>-### Algorithm+### ApprovalTemplate| 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) | | |+| 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-Algorithm-FullMask"></a>+<a name="bytebase-v1-ApproveIssueRequest"></a>-### Algorithm.FullMask+### ApproveIssueRequest| 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. |+| 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-Algorithm-InnerOuterMask"></a>+<a name="bytebase-v1-BatchUpdateIssuesStatusRequest"></a>-### Algorithm.InnerOuterMask+### BatchUpdateIssuesStatusRequest| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| prefix_len | [int32](#int32) | | |-| suffix_len | [int32](#int32) | | |-| type | [Algorithm.InnerOuterMask.MaskType](#bytebase-v1-Algorithm-InnerOuterMask-MaskType) | | |-| substitution | [string](#string) | | |+| 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. |-<a name="bytebase-v1-Algorithm-MD5Mask"></a>+<a name="bytebase-v1-BatchUpdateIssuesStatusResponse"></a>++### BatchUpdateIssuesStatusResponse+-### Algorithm.MD5Mask++++++<a name="bytebase-v1-CreateIssueCommentRequest"></a>++### CreateIssueCommentRequest| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| salt | [string](#string) | | salt is the salt value to generate a different hash that with the word alone. |+| 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-Algorithm-RangeMask"></a>+<a name="bytebase-v1-CreateIssueRequest"></a>-### Algorithm.RangeMask+### CreateIssueRequest| 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. |+| 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-Algorithm-RangeMask-Slice"></a>+<a name="bytebase-v1-GetIssueRequest"></a>-### Algorithm.RangeMask.Slice+### GetIssueRequest| 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). |+| 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. |-<a name="bytebase-v1-Announcement"></a>+<a name="bytebase-v1-Issue"></a>-### Announcement+### Issue| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| text | [string](#string) | | The text of announcement |-| link | [string](#string) | | The optional link, user can follow the link to check extra details |-| theme | [Announcement.AnnouncementTheme](#bytebase-v1-Announcement-AnnouncementTheme) | | Banner colors. Built-in presets (info/warning/critical) are a frontend-only concept that seeds these colors; the store only holds them. |-+| 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} |+| draft | [bool](#bool) | | Whether this issue is a Draft Review Issue. |-<a name="bytebase-v1-Announcement-AnnouncementTheme"></a>-### Announcement.AnnouncementTheme+<a name="bytebase-v1-Issue-Approver"></a>+### Issue.Approver+Approvers and their approval status for the issue.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| background | [google.type.Color](#google-type-Color) | | |-| text | [google.type.Color](#google-type-Color) | | |-+| status | [Issue.Approver.Status](#bytebase-v1-Issue-Approver-Status) | | The new status. |+| principal | [string](#string) | | Format: users/[email protected] |-<a name="bytebase-v1-AppIMSetting"></a>-### AppIMSetting+<a name="bytebase-v1-IssueComment"></a>+### IssueComment+A comment on an issue.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| settings | [AppIMSetting.IMSetting](#bytebase-v1-AppIMSetting-IMSetting) | repeated | |-+| 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. |+| review_submission | [IssueComment.ReviewSubmission](#bytebase-v1-IssueComment-ReviewSubmission) | | Review submission event. |-<a name="bytebase-v1-AppIMSetting-DingTalk"></a>-### AppIMSetting.DingTalk+<a name="bytebase-v1-IssueComment-Approval"></a>+### IssueComment.Approval+Approval event information.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| client_id | [string](#string) | | |-| client_secret | [string](#string) | | |-| robot_code | [string](#string) | | |-+| status | [IssueComment.Approval.Status](#bytebase-v1-IssueComment-Approval-Status) | | The approval status. |-<a name="bytebase-v1-AppIMSetting-Feishu"></a>-### AppIMSetting.Feishu+<a name="bytebase-v1-IssueComment-IssueUpdate"></a>+### IssueComment.IssueUpdate+Issue update event information.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| app_id | [string](#string) | | |-| app_secret | [string](#string) | | |-+| 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-AppIMSetting-IMSetting"></a>-### AppIMSetting.IMSetting+<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 || ----- | ---- | ----- | ----------- |-| 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) | | |+| from_specs | [Plan.Spec](#bytebase-v1-Plan-Spec) | repeated | |+| to_specs | [Plan.Spec](#bytebase-v1-Plan-Spec) | repeated | |-<a name="bytebase-v1-AppIMSetting-Lark"></a>+<a name="bytebase-v1-IssueComment-ReviewSubmission"></a>++### IssueComment.ReviewSubmission+Review submission event information.++-### AppIMSetting.Lark++++<a name="bytebase-v1-ListIssueCommentsRequest"></a>++### ListIssueCommentsRequest| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| app_id | [string](#string) | | |-| app_secret | [string](#string) | | |+| 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-AppIMSetting-Slack"></a>+<a name="bytebase-v1-ListIssueCommentsResponse"></a>-### AppIMSetting.Slack+### ListIssueCommentsResponse| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| token | [string](#string) | | |+| 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-AppIMSetting-Teams"></a>+<a name="bytebase-v1-ListIssuesRequest"></a>-### AppIMSetting.Teams+### ListIssuesRequest| 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. |+| 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" |-<a name="bytebase-v1-AppIMSetting-Wecom"></a>-### AppIMSetting.Wecom+<a name="bytebase-v1-ListIssuesResponse"></a>++### ListIssuesResponse| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| corp_id | [string](#string) | | |-| agent_id | [string](#string) | | |-| secret | [string](#string) | | |+| 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-DataClassificationSetting"></a>+<a name="bytebase-v1-RejectIssueRequest"></a>-### DataClassificationSetting+### RejectIssueRequest| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| configs | [DataClassificationSetting.DataClassificationConfig](#bytebase-v1-DataClassificationSetting-DataClassificationConfig) | repeated | |+| 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-DataClassificationSetting-DataClassificationConfig"></a>+<a name="bytebase-v1-RequestIssueRequest"></a>-### DataClassificationSetting.DataClassificationConfig+### RequestIssueRequest| 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. |+| 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-DataClassificationSetting-DataClassificationConfig-ClassificationEntry"></a>+<a name="bytebase-v1-RetryIssueApprovalRequest"></a>-### DataClassificationSetting.DataClassificationConfig.ClassificationEntry+### RetryIssueApprovalRequest| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| key | [string](#string) | | |-| value | [DataClassificationSetting.DataClassificationConfig.DataClassification](#bytebase-v1-DataClassificationSetting-DataClassificationConfig-DataClassification) | | |+| name | [string](#string) | | The name of the issue whose approval-finding should be retried. Format: projects/{project}/issues/{issue} |-<a name="bytebase-v1-DataClassificationSetting-DataClassificationConfig-DataClassification"></a>+<a name="bytebase-v1-RoleGrant"></a>-### DataClassificationSetting.DataClassificationConfig.DataClassification+### RoleGrant| 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. |+| 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-DataClassificationSetting-DataClassificationConfig-Level"></a>+<a name="bytebase-v1-SearchIssuesRequest"></a>-### DataClassificationSetting.DataClassificationConfig.Level+### SearchIssuesRequest| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| title | [string](#string) | | |-| level | [int32](#int32) | | The numeric level for ordering. Higher = more sensitive. |+| parent | [string](#string) | | The parent, which owns this collection of issues. Format: projects/{project} Use the wildcard "projects/-" to search across collections (AIP-159); the result is restricted to the projects where the caller holds bb.issues.get. For a concrete project, the caller must hold bb.issues.get on that project or the request is denied. |+| 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" |-<a name="bytebase-v1-EmailSetting"></a>+<a name="bytebase-v1-SearchIssuesResponse"></a>-### EmailSetting+### SearchIssuesResponse| 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) | | |+| 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-EmailSetting-SMTPConfig"></a>+<a name="bytebase-v1-UpdateIssueCommentRequest"></a>-### EmailSetting.SMTPConfig+### UpdateIssueCommentRequest| 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) | | |+| 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-EnvironmentSetting"></a>+<a name="bytebase-v1-UpdateIssueRequest"></a>-### EnvironmentSetting+### UpdateIssueRequest| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| environments | [EnvironmentSetting.Environment](#bytebase-v1-EnvironmentSetting-Environment) | repeated | |---+| 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-EnvironmentSetting-Environment"></a>-### EnvironmentSetting.Environment-| 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 | [google.type.Color](#google-type-Color) | | |+<a name="bytebase-v1-Issue-Approver-Status"></a>+### 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-EnvironmentSetting-Environment-TagsEntry"></a>-### EnvironmentSetting.Environment.TagsEntry+<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. |+| ACCESS_GRANT | 4 | Temporary access grant request. |-| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| key | [string](#string) | | |-| value | [string](#string) | | |+<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-GetSettingRequest"></a>-### GetSettingRequest-The request message for getting a setting.-| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The resource name of the setting. |+<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-GetSettingResponse"></a>-### GetSettingResponse-The response message for getting a setting.-| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| setting | [Setting](#bytebase-v1-Setting) | | |+<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-ListSettingsRequest"></a>-### ListSettingsRequest+| 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) | | |-<a name="bytebase-v1-ListSettingsResponse"></a>+<a name="bytebase-v1-Algorithm"></a>-### ListSettingsResponse+### Algorithm| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| settings | [Setting](#bytebase-v1-Setting) | repeated | The settings from the specified request. |+| 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-SQLEditorThemeSetting"></a>+<a name="bytebase-v1-Algorithm-FullMask"></a>-### SQLEditorThemeSetting+### Algorithm.FullMask| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| id | [string](#string) | | |-| name | [string](#string) | | |-| monaco_base | [string](#string) | | |-| tokens | [SQLEditorThemeSetting.TokensEntry](#bytebase-v1-SQLEditorThemeSetting-TokensEntry) | repeated | CSS token colors. |+| 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-SQLEditorThemeSetting-TokensEntry"></a>+<a name="bytebase-v1-Algorithm-InnerOuterMask"></a>-### SQLEditorThemeSetting.TokensEntry+### Algorithm.InnerOuterMask| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| key | [string](#string) | | |-| value | [google.type.Color](#google-type-Color) | | |+| prefix_len | [int32](#int32) | | |+| suffix_len | [int32](#int32) | | |+| type | [Algorithm.InnerOuterMask.MaskType](#bytebase-v1-Algorithm-InnerOuterMask-MaskType) | | |+| substitution | [string](#string) | | |-<a name="bytebase-v1-SemanticTypeSetting"></a>+<a name="bytebase-v1-Algorithm-MD5Mask"></a>-### SemanticTypeSetting+### Algorithm.MD5Mask| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| types | [SemanticTypeSetting.SemanticType](#bytebase-v1-SemanticTypeSetting-SemanticType) | repeated | |+| salt | [string](#string) | | salt is the salt value to generate a different hash that with the word alone. |-<a name="bytebase-v1-SemanticTypeSetting-SemanticType"></a>+<a name="bytebase-v1-Algorithm-RangeMask"></a>-### SemanticTypeSetting.SemanticType+### Algorithm.RangeMask| 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. |+| 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-Setting"></a>+<a name="bytebase-v1-Algorithm-RangeMask-Slice"></a>++### Algorithm.RangeMask.Slice-### 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. |+| 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-SettingValue"></a>+<a name="bytebase-v1-Announcement"></a>++### Announcement-### 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) | | |+| text | [string](#string) | | The text of announcement |+| link | [string](#string) | | The optional link, user can follow the link to check extra details |+| theme | [Announcement.AnnouncementTheme](#bytebase-v1-Announcement-AnnouncementTheme) | | Banner colors. Built-in presets (info/warning/critical) are a frontend-only concept that seeds these colors; the store only holds them. |-<a name="bytebase-v1-TestEmailSettingRequest"></a>+<a name="bytebase-v1-Announcement-AnnouncementTheme"></a>-### TestEmailSettingRequest+### Announcement.AnnouncementTheme| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| parent | [string](#string) | | |-| email_setting | [EmailSetting](#bytebase-v1-EmailSetting) | | |-| to | [string](#string) | | |+| background | [google.type.Color](#google-type-Color) | | |+| text | [google.type.Color](#google-type-Color) | | |-<a name="bytebase-v1-TestEmailSettingResponse"></a>+<a name="bytebase-v1-AppIMSetting"></a>-### TestEmailSettingResponse+### AppIMSetting| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| success | [bool](#bool) | | |-| error | [string](#string) | | |+| settings | [AppIMSetting.IMSetting](#bytebase-v1-AppIMSetting-IMSetting) | repeated | |-<a name="bytebase-v1-UpdateSettingRequest"></a>+<a name="bytebase-v1-AppIMSetting-DingTalk"></a>++### AppIMSetting.DingTalk-### 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) | | |+| client_id | [string](#string) | | |+| client_secret | [string](#string) | | |+| robot_code | [string](#string) | | |-<a name="bytebase-v1-WorkspaceApprovalSetting"></a>+<a name="bytebase-v1-AppIMSetting-Feishu"></a>-### WorkspaceApprovalSetting+### AppIMSetting.Feishu| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| rules | [WorkspaceApprovalSetting.Rule](#bytebase-v1-WorkspaceApprovalSetting-Rule) | repeated | |+| app_id | [string](#string) | | |+| app_secret | [string](#string) | | |-<a name="bytebase-v1-WorkspaceApprovalSetting-Rule"></a>+<a name="bytebase-v1-AppIMSetting-IMSetting"></a>-### WorkspaceApprovalSetting.Rule+### AppIMSetting.IMSetting| 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--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 REQUEST_ROLE, support: resource.project_id, request.expiration_days, request.role When source is REQUEST_ACCESS, support: resource.environment_id, resource.project_id, resource.db_engine, resource.database_name, resource.schema_name, resource.table_name, request.unmask, request.data_export--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) | | |+| 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-WorkspaceProfileSetting"></a>+<a name="bytebase-v1-AppIMSetting-Lark"></a>-### WorkspaceProfileSetting+### AppIMSetting.Lark| 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_request_expiration | [google.protobuf.Duration](#google-protobuf-Duration) | | The max expiration duration for data access requests. |-| 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 password sign-in is disabled for all end users. |-| 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. |-| 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. |-| sql_editor_theme_id | [string](#string) | | Enforced SQL Editor theme id: OPAQUE — a frontend-resolved built-in preset id OR a custom theme's uuid. Empty ⇒ default light. |-| sql_editor_custom_theme | [SQLEditorThemeSetting](#bytebase-v1-SQLEditorThemeSetting) | | The enforced CUSTOM theme's full definition — present ONLY when sql_editor_theme_id is a custom uuid. tokens is always complete. |-| maximum_role_expiration | [google.protobuf.Duration](#google-protobuf-Duration) | | The max expiration duration for request role. Deprecated: use just-in-time access request flows instead. |-| mcp_capability | [WorkspaceProfileSetting.MCPCapability](#bytebase-v1-WorkspaceProfileSetting-MCPCapability) | | The maximum capability available to MCP (Model Context Protocol) sessions in this workspace, acting as an admin-set ceiling. Unset is treated as READ_WRITE for backward compatibility; DISABLED rejects all MCP connections. Writing MCP_CAPABILITY_UNSPECIFIED explicitly is rejected — omit the update mask path to leave the ceiling unset. |-| directory_sync_token_configured | [bool](#bool) | | Whether a directory sync token has been generated for this workspace. The token itself is never returned; this only lets the UI decide between offering "generate" and "regenerate". |+| app_id | [string](#string) | | |+| app_secret | [string](#string) | | |-<a name="bytebase-v1-WorkspaceProfileSetting-PasswordRestriction"></a>+<a name="bytebase-v1-AppIMSetting-Slack"></a>-### WorkspaceProfileSetting.PasswordRestriction+### AppIMSetting.Slack| 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. |------+| token | [string](#string) | | |-<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-AppIMSetting-Teams"></a>+### AppIMSetting.Teams-<a name="bytebase-v1-Algorithm-InnerOuterMask-MaskType"></a>-### Algorithm.InnerOuterMask.MaskType+| 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 |-| ---- | ------ | ----------- |-| MASK_TYPE_UNSPECIFIED | 0 | |-| INNER | 1 | |-| OUTER | 2 | |-<a name="bytebase-v1-DatabaseChangeMode"></a>-### DatabaseChangeMode+<a name="bytebase-v1-AppIMSetting-Wecom"></a>-| 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. |+### AppIMSetting.Wecom-<a name="bytebase-v1-EmailSetting-SMTPConfig-Authentication"></a>+| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| corp_id | [string](#string) | | |+| agent_id | [string](#string) | | |+| secret | [string](#string) | | |-### EmailSetting.SMTPConfig.Authentication-| Name | Number | Description |-| ---- | ------ | ----------- |-| AUTHENTICATION_UNSPECIFIED | 0 | |-| AUTHENTICATION_NONE | 1 | |-| PLAIN | 2 | |-| LOGIN | 3 | |-| CRAM_MD5 | 4 | |-<a name="bytebase-v1-EmailSetting-SMTPConfig-Encryption"></a>+<a name="bytebase-v1-DataClassificationSetting"></a>-### EmailSetting.SMTPConfig.Encryption+### DataClassificationSetting-| Name | Number | Description |-| ---- | ------ | ----------- |-| ENCRYPTION_UNSPECIFIED | 0 | |-| ENCRYPTION_NONE | 1 | |-| STARTTLS | 2 | |-| SSL_TLS | 3 | |+| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| configs | [DataClassificationSetting.DataClassificationConfig](#bytebase-v1-DataClassificationSetting-DataClassificationConfig) | repeated | |-<a name="bytebase-v1-EmailSetting-Type"></a>-### EmailSetting.Type-| Name | Number | Description |-| ---- | ------ | ----------- |-| TYPE_UNSPECIFIED | 0 | |-| SMTP | 1 | |+<a name="bytebase-v1-DataClassificationSetting-DataClassificationConfig"></a>+### DataClassificationSetting.DataClassificationConfig-<a name="bytebase-v1-Setting-SettingName"></a>-### Setting.SettingName+| 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. |-| 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-WorkspaceApprovalSetting-Rule-Source"></a>-### WorkspaceApprovalSetting.Rule.Source+<a name="bytebase-v1-DataClassificationSetting-DataClassificationConfig-ClassificationEntry"></a>-| Name | Number | Description |-| ---- | ------ | ----------- |-| SOURCE_UNSPECIFIED | 0 | |-| CHANGE_DATABASE | 1 | |-| CREATE_DATABASE | 2 | |-| REQUEST_ROLE | 4 | |-| REQUEST_ACCESS | 5 | |+### DataClassificationSetting.DataClassificationConfig.ClassificationEntry-<a name="bytebase-v1-WorkspaceProfileSetting-MCPCapability"></a>+| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| key | [string](#string) | | |+| value | [DataClassificationSetting.DataClassificationConfig.DataClassification](#bytebase-v1-DataClassificationSetting-DataClassificationConfig-DataClassification) | | |-### WorkspaceProfileSetting.MCPCapability-MCPCapability is the maximum capability an MCP (Model Context Protocol)-session may have in the workspace. It is a ceiling: a session runs at this-level or lower. Unset (UNSPECIFIED) is treated as READ_WRITE so existing-workspaces are unaffected.-| Name | Number | Description |-| ---- | ------ | ----------- |-| MCP_CAPABILITY_UNSPECIFIED | 0 | |-| DISABLED | 1 | MCP connections are rejected. |-| READ_ONLY | 3 | MCP may inspect metadata and run read-only queries. Not enforceable yet: until per-tool enforcement ships, this fails closed and refuses all MCP connections, the same as DISABLED. |-| READ_WRITE | 4 | MCP may perform mutations, still bounded by the user's RBAC. |--+<a name="bytebase-v1-DataClassificationSetting-DataClassificationConfig-DataClassification"></a>-<a name="bytebase-v1-SettingService"></a>+### DataClassificationSetting.DataClassificationConfig.DataClassification-### 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 |+| ----- | ---- | ----- | ----------- |+| 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="v1_actuator_service-proto"></a>-<p align="right"><a href="#top">Top</a></p>-## v1/actuator_service.proto+<a name="bytebase-v1-DataClassificationSetting-DataClassificationConfig-Level"></a>-<a name="bytebase-v1-ActuatorInfo"></a>+### DataClassificationSetting.DataClassificationConfig.Level-### 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. |-| 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). |-| active_vcs_user_count | [int32](#int32) | | The number of active VCS users seen in the active window. |+| title | [string](#string) | | |+| level | [int32](#int32) | | The numeric level for ordering. Higher = more sensitive. |-<a name="bytebase-v1-GetActuatorInfoRequest"></a>+<a name="bytebase-v1-EmailSetting"></a>++### EmailSetting-### 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). |+| 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-Restriction"></a>+<a name="bytebase-v1-EmailSetting-SMTPConfig"></a>++### EmailSetting.SMTPConfig-### Restriction+| 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) | | |-| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| disallow_signup | [bool](#bool) | | Whether self-service user signup is disabled. |-| disallow_password_signin | [bool](#bool) | | Whether password sign-in is disabled for all end users. |-| 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-EnvironmentSetting"></a>-<a name="bytebase-v1-SetupSampleRequest"></a>+### EnvironmentSetting-### SetupSampleRequest-Request message for setting up sample data.+| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| environments | [EnvironmentSetting.Environment](#bytebase-v1-EnvironmentSetting-Environment) | repeated | |---+<a name="bytebase-v1-EnvironmentSetting-Environment"></a>-<a name="bytebase-v1-ActuatorService"></a>+### EnvironmentSetting.Environment-### 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 |-+| 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 | [google.type.Color](#google-type-Color) | | |-<a name="v1_ai_service-proto"></a>-<p align="right"><a href="#top">Top</a></p>-## v1/ai_service.proto+<a name="bytebase-v1-EnvironmentSetting-Environment-TagsEntry"></a>-<a name="bytebase-v1-AIChatMessage"></a>+### EnvironmentSetting.Environment.TagsEntry-### AIChatMessage-A single message in the conversation.| 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. |+| key | [string](#string) | | |+| value | [string](#string) | | |-<a name="bytebase-v1-AIChatRequest"></a>+<a name="bytebase-v1-GetSettingRequest"></a>-### AIChatRequest-Request message for AIService.Chat.+### GetSettingRequest+The request message for getting a setting.| 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. |+| name | [string](#string) | | The resource name of the setting. |-<a name="bytebase-v1-AIChatResponse"></a>+<a name="bytebase-v1-GetSettingResponse"></a>-### AIChatResponse-Response message for AIService.Chat.+### GetSettingResponse+The response message for getting a setting.| 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. |+| setting | [Setting](#bytebase-v1-Setting) | | |-<a name="bytebase-v1-AIChatToolCall"></a>+<a name="bytebase-v1-ListSettingsRequest"></a>-### AIChatToolCall-A tool call made by the AI.+### ListSettingsRequest-| 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="bytebase-v1-ListSettingsResponse"></a>-<a name="bytebase-v1-AIChatToolDefinition"></a>+### ListSettingsResponse-### 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. |+| settings | [Setting](#bytebase-v1-Setting) | repeated | The settings from the specified request. |-<a name="bytebase-v1-AIChatUsage"></a>+<a name="bytebase-v1-SQLEditorThemeSetting"></a>++### SQLEditorThemeSetting-### AIChatUsage-Token usage for a single AI provider call.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| total_tokens | [int32](#int32) | | Total tokens used by the provider call. |+| id | [string](#string) | | |+| name | [string](#string) | | |+| monaco_base | [string](#string) | | |+| tokens | [SQLEditorThemeSetting.TokensEntry](#bytebase-v1-SQLEditorThemeSetting-TokensEntry) | repeated | CSS token colors. |-+<a name="bytebase-v1-SQLEditorThemeSetting-TokensEntry"></a>-<a name="bytebase-v1-AIChatMessageRole"></a>+### SQLEditorThemeSetting.TokensEntry-### 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 |+| ----- | ---- | ----- | ----------- |+| key | [string](#string) | | |+| value | [google.type.Color](#google-type-Color) | | |---<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-SemanticTypeSetting"></a>-+### SemanticTypeSetting-<a name="v1_iam_policy-proto"></a>-<p align="right"><a href="#top">Top</a></p>+| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| types | [SemanticTypeSetting.SemanticType](#bytebase-v1-SemanticTypeSetting-SemanticType) | repeated | |-## v1/iam_policy.proto-<a name="bytebase-v1-Binding"></a>-### Binding-Binding associates members with a role and optional conditions.+<a name="bytebase-v1-SemanticTypeSetting-SemanticType"></a>-| 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+### SemanticTypeSetting.SemanticType-Support variables: resource.database: the database full name in "instances/{instance}/databases/{database}" format, used by any role with SQL Editor read (e.g. "roles/sqlEditorUser", "roles/sqlEditorReadUser") or write (bb.sql.ddl / bb.sql.dml) access, support "==" operator. resource.schema_name: the schema name, used by any role with SQL Editor read or write (bb.sql.ddl / bb.sql.dml) access; for writes it is evaluated per write-target table, support "==" operator. resource.table_name: the table name, used by any role with SQL Editor read or write (bb.sql.ddl / bb.sql.dml) access; for writes it is evaluated per write-target table, 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}")`.-Known limitations of table/schema-scoped DDL/DML grants: - The scope only gates the write target, not the read sources of a write: e.g. `INSERT INTO granted_table SELECT * FROM other_table` may read `other_table` without a grant on it, so a table-scoped write grant is not an exfiltration boundary. - It must be paired with a database/project-level read grant: a table-scoped grant alone does not satisfy the SQL Editor query method permission (bb.databases.get). - A resource.schema_name-scoped grant only authorizes a write whose schema is unambiguous — qualify the table (schema.table) or select the schema for the SQL Editor session. An unqualified write whose effective schema cannot be determined ahead of execution is denied (qualify it, or use a table-only grant). - Multi-statement batches are authorized at the database level: an earlier statement can rebind the session's default schema or database mid-batch, so per-table/schema scoping is dropped and a table/schema-scoped grant requires a database-level grant. The database-level check is still per target database — a qualified cross-database write is gated by a grant on its own database, not the request database — but an unqualified write whose session default is rebound mid-batch is evaluated against the database it literally names, so qualify cross-database writes or run them as single statements. - A write target in a different project than the SQL-Editor session's database is denied: the per-target check evaluates the session project's IAM policy, so a cross-project write is failed closed (to write it, open the SQL Editor on a database in the target project). - Enforcement is on the statement's literal write target; writes routed elsewhere by a view/synonym, or into a temporary schema (e.g. pg_temp), are evaluated against what the statement names, not the ultimate base object. - Write-target gating uses an ALLOWLIST of statement types the resolver models. It does NOT cover every syntactically-identifiable cross-database write; statement types off the allowlist are authorized against the request database. The allowlist is: - Modeled table/data writes (per-table/schema-scopable): INSERT/UPDATE/DELETE/TRUNCATE/MERGE, LOAD DATA, IMPORT INTO, CREATE TABLE AS / SELECT INTO, and table-level CREATE/DROP/ALTER/RENAME/index. - Modeled non-table object DDL (gated at the DATABASE level by the object's own explicit database/schema qualifier; an unqualified name keeps the request-database check): CREATE/ALTER/DROP of view, procedure/function/routine, trigger, sequence, synonym, type, and (Oracle) package and cluster; plus Oracle ALTER/DROP MATERIALIZED VIEW (Oracle CREATE MATERIALIZED VIEW is not modeled — see below). NOT modeled (these fall back to the request-database check, so a qualified cross-database one is authorized against the request database): MySQL CREATE TRIGGER and CREATE/ALTER/DROP EVENT (bare-string AST names); MSSQL ALTER of view/procedure/function/trigger (no ALTER node in the grammar); Oracle CREATE MATERIALIZED VIEW and the niche object DDL — dimension, attribute dimension, hierarchy, analytic view, JSON duality view, materialized zonemap, operator, in-memory join group, property graph, vector index, index type, domain; COPY ... FROM; and engine-specific bulk-load / deprecated text writes. A structural "write-target object database" extraction layer to remove this allowlist dependence is tracked as a follow-up. - Out of scope (read sources / indirect effects): the tables a write READS (INSERT … SELECT, MERGE … USING, CREATE TABLE AS … SELECT) and objects reached indirectly via views/synonyms/function bodies/triggers are NOT gated. Invariant: for a statement ON the modeled allowlist that explicitly names a different database as its write target, the ACL uses that target database, not the request database. Statement types OFF the allowlist are authorized against the request database.-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. |+| 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. |-<a name="bytebase-v1-BindingDelta"></a>+<a name="bytebase-v1-Setting"></a>-### BindingDelta-A single change to a binding.+### Setting+The schema of setting.| 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. |+| 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-GetIamPolicyRequest"></a>+<a name="bytebase-v1-SettingValue"></a>-### GetIamPolicyRequest-Request message for getting an IAM policy.+### SettingValue+The data in setting value.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| resource | [string](#string) | | The name of the resource to get the IAM policy. Format: projects/{project} Format: workspaces/{workspace} |+| 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-IamPolicy"></a>+<a name="bytebase-v1-TestEmailSettingRequest"></a>++### TestEmailSettingRequest-### 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. |+| parent | [string](#string) | | |+| email_setting | [EmailSetting](#bytebase-v1-EmailSetting) | | |+| to | [string](#string) | | |-<a name="bytebase-v1-PolicyDelta"></a>+<a name="bytebase-v1-TestEmailSettingResponse"></a>++### TestEmailSettingResponse-### PolicyDelta-Describes changes between two IAM policies.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| binding_deltas | [BindingDelta](#bytebase-v1-BindingDelta) | repeated | The delta for Bindings between two policies. |+| success | [bool](#bool) | | |+| error | [string](#string) | | |-<a name="bytebase-v1-SetIamPolicyRequest"></a>+<a name="bytebase-v1-UpdateSettingRequest"></a>-### SetIamPolicyRequest-Request message for setting an IAM policy.+### UpdateSettingRequest+The request message for updating or creating a setting.| 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. |+| 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) | | |-+<a name="bytebase-v1-WorkspaceApprovalSetting"></a>-<a name="bytebase-v1-BindingDelta-Action"></a>+### WorkspaceApprovalSetting-### 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. |+| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| rules | [WorkspaceApprovalSetting.Rule](#bytebase-v1-WorkspaceApprovalSetting-Rule) | repeated | |----<a name="v1_audit_log_service-proto"></a>-<p align="right"><a href="#top">Top</a></p>+<a name="bytebase-v1-WorkspaceApprovalSetting-Rule"></a>-## v1/audit_log_service.proto+### WorkspaceApprovalSetting.Rule-<a name="bytebase-v1-AuditData"></a>+| 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-### AuditData-Additional audit data specific to certain operations.+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 REQUEST_ROLE, support: resource.project_id, request.expiration_days, request.role When source is REQUEST_ACCESS, support: resource.environment_id, resource.project_id, resource.db_engine, resource.database_name, resource.schema_name, resource.table_name, request.unmask, request.data_export++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) | | |-| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| policy_delta | [PolicyDelta](#bytebase-v1-PolicyDelta) | | Changes to IAM policies. |+<a name="bytebase-v1-WorkspaceProfileSetting"></a>-<a name="bytebase-v1-AuditLog"></a>+### WorkspaceProfileSetting-### AuditLog-Audit log entry recording system activity or API call.| 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. |-| mcp_delegation | [MCPDelegation](#bytebase-v1-MCPDelegation) | | MCP delegation provenance. Present exactly when the audited call arrived through the MCP server's delegated credential; never set for public API calls. Presence of this message is the MCP-origin marker. |+| 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_request_expiration | [google.protobuf.Duration](#google-protobuf-Duration) | | The max expiration duration for data access requests. |+| 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 password sign-in is disabled for all end users. |+| 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. |+| 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. |+| sql_editor_theme_id | [string](#string) | | Enforced SQL Editor theme id: OPAQUE — a frontend-resolved built-in preset id OR a custom theme's uuid. Empty ⇒ default light. |+| sql_editor_custom_theme | [SQLEditorThemeSetting](#bytebase-v1-SQLEditorThemeSetting) | | The enforced CUSTOM theme's full definition — present ONLY when sql_editor_theme_id is a custom uuid. tokens is always complete. |+| maximum_role_expiration | [google.protobuf.Duration](#google-protobuf-Duration) | | The max expiration duration for request role. Deprecated: use just-in-time access request flows instead. |+| mcp_capability | [WorkspaceProfileSetting.MCPCapability](#bytebase-v1-WorkspaceProfileSetting-MCPCapability) | | The maximum capability available to MCP (Model Context Protocol) sessions in this workspace, acting as an admin-set ceiling. Unset is treated as READ_WRITE for backward compatibility; DISABLED rejects all MCP connections. Writing MCP_CAPABILITY_UNSPECIFIED explicitly is rejected — omit the update mask path to leave the ceiling unset. |+| directory_sync_token_configured | [bool](#bool) | | Whether a directory sync token has been generated for this workspace. The token itself is never returned; this only lets the UI decide between offering "generate" and "regenerate". |-<a name="bytebase-v1-ExportAuditLogsRequest"></a>+<a name="bytebase-v1-WorkspaceProfileSetting-PasswordRestriction"></a>++### WorkspaceProfileSetting.PasswordRestriction-### ExportAuditLogsRequest-Request message for exporting audit logs.| 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. |+| 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-ExportAuditLogsResponse"></a>-### ExportAuditLogsResponse-Response message for exporting audit logs.+<a name="bytebase-v1-AISetting-Provider"></a>-| 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. |+### AISetting.Provider+| Name | Number | Description |+| ---- | ------ | ----------- |+| PROVIDER_UNSPECIFIED | 0 | |+| OPEN_AI | 1 | |+| CLAUDE | 2 | |+| GEMINI | 3 | |+| AZURE_OPENAI | 4 | |+<a name="bytebase-v1-Algorithm-InnerOuterMask-MaskType"></a>-<a name="bytebase-v1-MCPDelegation"></a>+### Algorithm.InnerOuterMask.MaskType-### MCPDelegation-Provenance of a call that reached the API through the MCP (Model Context-Protocol) server's delegated credential. The values are copied verbatim from-the verified credential's grant state; empty fields record that the grant-stored nothing (legacy sessions), never a resolved or synthesized value.+| Name | Number | Description |+| ---- | ------ | ----------- |+| MASK_TYPE_UNSPECIFIED | 0 | |+| INNER | 1 | |+| OUTER | 2 | |-| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| scope | [string](#string) | | The OAuth2 grant's consented scope, e.g. "mcp:read-only". Empty when the grant recorded no scope. |-| resource | [string](#string) | | The grant's stored MCP resource URI. Empty for pre-grant legacy sessions. |-| client_id | [string](#string) | | The OAuth2 client the grant was consented to. Empty for legacy web-session tokens at /mcp. |-| correlation_id | [string](#string) | | Correlates the audit rows an MCP session produces. Minted at the /mcp boundary and session-scoped: the MCP SDK hands tool handlers the initialize-time context, so one MCP session carries one correlation ID across all of its tool calls. |+<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-RequestMetadata"></a>-### RequestMetadata-Metadata about the incoming request.+<a name="bytebase-v1-EmailSetting-SMTPConfig-Authentication"></a>++### EmailSetting.SMTPConfig.Authentication-| 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. |+| Name | Number | Description |+| ---- | ------ | ----------- |+| AUTHENTICATION_UNSPECIFIED | 0 | |+| AUTHENTICATION_NONE | 1 | |+| PLAIN | 2 | |+| LOGIN | 3 | |+| CRAM_MD5 | 4 | |+<a name="bytebase-v1-EmailSetting-SMTPConfig-Encryption"></a>+### EmailSetting.SMTPConfig.Encryption-<a name="bytebase-v1-SearchAuditLogsRequest"></a>-### SearchAuditLogsRequest-Request message for searching audit logs.+| Name | Number | Description |+| ---- | ------ | ----------- |+| ENCRYPTION_UNSPECIFIED | 0 | |+| ENCRYPTION_NONE | 1 | |+| STARTTLS | 2 | |+| SSL_TLS | 3 | |-| 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.+<a name="bytebase-v1-EmailSetting-Type"></a>++### EmailSetting.Type-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. |+| Name | Number | Description |+| ---- | ------ | ----------- |+| TYPE_UNSPECIFIED | 0 | |+| SMTP | 1 | |+<a name="bytebase-v1-Setting-SettingName"></a>+### Setting.SettingName-<a name="bytebase-v1-SearchAuditLogsResponse"></a>-### SearchAuditLogsResponse-Response message for searching audit logs.+| 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 | |-| 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="bytebase-v1-WorkspaceApprovalSetting-Rule-Source"></a>+### WorkspaceApprovalSetting.Rule.Source+| Name | Number | Description |+| ---- | ------ | ----------- |+| SOURCE_UNSPECIFIED | 0 | |+| CHANGE_DATABASE | 1 | |+| CREATE_DATABASE | 2 | |+| REQUEST_ROLE | 4 | |+| REQUEST_ACCESS | 5 | |--<a name="bytebase-v1-AuditLog-Severity"></a>+<a name="bytebase-v1-WorkspaceProfileSetting-MCPCapability"></a>-### AuditLog.Severity-Severity level for audit log entries.+### WorkspaceProfileSetting.MCPCapability+MCPCapability is the maximum capability an MCP (Model Context Protocol)+session may have in the workspace. It is a ceiling: a session runs at this+level or lower. Unset (UNSPECIFIED) is treated as READ_WRITE so existing+workspaces are unaffected.| 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. |+| MCP_CAPABILITY_UNSPECIFIED | 0 | |+| DISABLED | 1 | MCP connections are rejected. |+| READ_ONLY | 3 | MCP may inspect metadata and run read-only queries. Not enforceable yet: until per-tool enforcement ships, this fails closed and refuses all MCP connections, the same as DISABLED. |+| READ_WRITE | 4 | MCP may perform mutations, still bounded by the user's RBAC. |@@ -5296,15 +5266,17 @@ Severity level for audit log entries.-<a name="bytebase-v1-AuditLogService"></a>+<a name="bytebase-v1-SettingService"></a>-### AuditLogService-AuditLogService manages audit logs for system activities and API calls.+### SettingService+SettingService manages workspace-level settings and configurations.| 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 |+| 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 |@@ -5564,6 +5536,22 @@ UserService manages user accounts and authentication.+<a name="bytebase-v1-AuthenticationInfo"></a>++### AuthenticationInfo++++| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| workspace | [string](#string) | | The workspace used for authentication, when one can be resolved. Format: workspaces/{workspace} |+| restriction | [Restriction](#bytebase-v1-Restriction) | | The effective authentication restrictions. |++++++<a name="bytebase-v1-ExchangeTokenRequest"></a>### ExchangeTokenRequest@@ -5595,6 +5583,21 @@ UserService manages user accounts and authentication.+<a name="bytebase-v1-GetAuthenticationRestrictionRequest"></a>++### GetAuthenticationRestrictionRequest++++| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| workspace | [string](#string) | | Optional. The workspace whose authentication policy should be returned. Format: workspaces/{workspace} When unset, self-hosted resolves the singleton workspace and SaaS uses the deployment-level defaults. |++++++<a name="bytebase-v1-IdentityProviderContext"></a>### IdentityProviderContext@@ -5746,6 +5749,25 @@ Response from refreshing the access token.+<a name="bytebase-v1-Restriction"></a>++### Restriction++++| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| disallow_signup | [bool](#bool) | | Whether self-service user signup is disabled. |+| disallow_password_signin | [bool](#bool) | | Whether password sign-in is disabled for all end users. |+| 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-SendEmailLoginCodeRequest"></a>### SendEmailLoginCodeRequest@@ -5811,6 +5833,7 @@ AuthService handles user authentication operations.| Method Name | Request Type | Response Type | Description || ----------- | ------------ | ------------- | ------------|+| GetAuthenticationRestriction | [GetAuthenticationRestrictionRequest](#bytebase-v1-GetAuthenticationRestrictionRequest) | [AuthenticationInfo](#bytebase-v1-AuthenticationInfo) | Gets the effective restrictions needed to render authentication flows. Permissions required: None || 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) |@@ -12580,4 +12603,3 @@ WorkspaceService manages workspace-level operations and profile.| <a name="bool" /> bool | | bool | boolean | boolean | bool | bool | boolean | TrueClass/FalseClass || <a name="string" /> string | A string must always contain UTF-8 encoded or 7-bit ASCII text. | string | String | str/unicode | string | string | string | String (UTF-8) || <a name="bytes" /> bytes | May contain any arbitrary sequence of bytes. | string | ByteString | str | []byte | ByteString | string | String (ASCII-8BIT) |-diff --git a/proto/gen/grpc-doc/v1/index.html b/proto/gen/grpc-doc/v1/index.htmlindex 617dfe2a44..159082d255 100644--- a/proto/gen/grpc-doc/v1/index.html+++ b/proto/gen/grpc-doc/v1/index.html@@ -177,12 +177,12 @@<li><a href="#v1%2fannotation.proto">v1/annotation.proto</a><ul>--++<li><a href="#bytebase.v1.AuthMethod"><span class="badge">E</span>AuthMethod</a></li>-+<li><a href="#bytebase.v1.MCPForbiddenReason"><span class="badge">E</span>MCPForbiddenReason</a></li>@@ -276,6 +276,76 @@</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>+ </li>++ <li>+ <a href="#bytebase.v1.GetActuatorInfoRequest"><span class="badge">M</span>GetActuatorInfoRequest</a>+ </li>++ <li>+ <a href="#bytebase.v1.SetupSampleRequest"><span class="badge">M</span>SetupSampleRequest</a>+ </li>+++++ <li>+ <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.AIChatMessage"><span class="badge">M</span>AIChatMessage</a>+ </li>++ <li>+ <a href="#bytebase.v1.AIChatRequest"><span class="badge">M</span>AIChatRequest</a>+ </li>++ <li>+ <a href="#bytebase.v1.AIChatResponse"><span class="badge">M</span>AIChatResponse</a>+ </li>++ <li>+ <a href="#bytebase.v1.AIChatToolCall"><span class="badge">M</span>AIChatToolCall</a>+ </li>++ <li>+ <a href="#bytebase.v1.AIChatToolDefinition"><span class="badge">M</span>AIChatToolDefinition</a>+ </li>++ <li>+ <a href="#bytebase.v1.AIChatUsage"><span class="badge">M</span>AIChatUsage</a>+ </li>+++ <li>+ <a href="#bytebase.v1.AIChatMessageRole"><span class="badge">E</span>AIChatMessageRole</a>+ </li>++++ <li>+ <a href="#bytebase.v1.AIService"><span class="badge">S</span>AIService</a>+ </li>++ </ul>+ </li>++<li><a href="#v1%2fcommon.proto">v1/common.proto</a><ul>@@ -335,6 +405,96 @@</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>+ </li>++ <li>+ <a href="#bytebase.v1.BindingDelta"><span class="badge">M</span>BindingDelta</a>+ </li>++ <li>+ <a href="#bytebase.v1.GetIamPolicyRequest"><span class="badge">M</span>GetIamPolicyRequest</a>+ </li>++ <li>+ <a href="#bytebase.v1.IamPolicy"><span class="badge">M</span>IamPolicy</a>+ </li>++ <li>+ <a href="#bytebase.v1.PolicyDelta"><span class="badge">M</span>PolicyDelta</a>+ </li>++ <li>+ <a href="#bytebase.v1.SetIamPolicyRequest"><span class="badge">M</span>SetIamPolicyRequest</a>+ </li>+++ <li>+ <a href="#bytebase.v1.BindingDelta.Action"><span class="badge">E</span>BindingDelta.Action</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>+ </li>++ <li>+ <a href="#bytebase.v1.AuditLog"><span class="badge">M</span>AuditLog</a>+ </li>++ <li>+ <a href="#bytebase.v1.ExportAuditLogsRequest"><span class="badge">M</span>ExportAuditLogsRequest</a>+ </li>++ <li>+ <a href="#bytebase.v1.ExportAuditLogsResponse"><span class="badge">M</span>ExportAuditLogsResponse</a>+ </li>++ <li>+ <a href="#bytebase.v1.MCPDelegation"><span class="badge">M</span>MCPDelegation</a>+ </li>++ <li>+ <a href="#bytebase.v1.RequestMetadata"><span class="badge">M</span>RequestMetadata</a>+ </li>++ <li>+ <a href="#bytebase.v1.SearchAuditLogsRequest"><span class="badge">M</span>SearchAuditLogsRequest</a>+ </li>++ <li>+ <a href="#bytebase.v1.SearchAuditLogsResponse"><span class="badge">M</span>SearchAuditLogsResponse</a>+ </li>+++ <li>+ <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%2frollout_service.proto">v1/rollout_service.proto</a><ul>@@ -1165,170 +1325,6 @@</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>- </li>-- <li>- <a href="#bytebase.v1.GetActuatorInfoRequest"><span class="badge">M</span>GetActuatorInfoRequest</a>- </li>-- <li>- <a href="#bytebase.v1.Restriction"><span class="badge">M</span>Restriction</a>- </li>-- <li>- <a href="#bytebase.v1.SetupSampleRequest"><span class="badge">M</span>SetupSampleRequest</a>- </li>----- <li>- <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.AIChatMessage"><span class="badge">M</span>AIChatMessage</a>- </li>-- <li>- <a href="#bytebase.v1.AIChatRequest"><span class="badge">M</span>AIChatRequest</a>- </li>-- <li>- <a href="#bytebase.v1.AIChatResponse"><span class="badge">M</span>AIChatResponse</a>- </li>-- <li>- <a href="#bytebase.v1.AIChatToolCall"><span class="badge">M</span>AIChatToolCall</a>- </li>-- <li>- <a href="#bytebase.v1.AIChatToolDefinition"><span class="badge">M</span>AIChatToolDefinition</a>- </li>-- <li>- <a href="#bytebase.v1.AIChatUsage"><span class="badge">M</span>AIChatUsage</a>- </li>--- <li>- <a href="#bytebase.v1.AIChatMessageRole"><span class="badge">E</span>AIChatMessageRole</a>- </li>---- <li>- <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.Binding"><span class="badge">M</span>Binding</a>- </li>-- <li>- <a href="#bytebase.v1.BindingDelta"><span class="badge">M</span>BindingDelta</a>- </li>-- <li>- <a href="#bytebase.v1.GetIamPolicyRequest"><span class="badge">M</span>GetIamPolicyRequest</a>- </li>-- <li>- <a href="#bytebase.v1.IamPolicy"><span class="badge">M</span>IamPolicy</a>- </li>-- <li>- <a href="#bytebase.v1.PolicyDelta"><span class="badge">M</span>PolicyDelta</a>- </li>-- <li>- <a href="#bytebase.v1.SetIamPolicyRequest"><span class="badge">M</span>SetIamPolicyRequest</a>- </li>--- <li>- <a href="#bytebase.v1.BindingDelta.Action"><span class="badge">E</span>BindingDelta.Action</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>- </li>-- <li>- <a href="#bytebase.v1.AuditLog"><span class="badge">M</span>AuditLog</a>- </li>-- <li>- <a href="#bytebase.v1.ExportAuditLogsRequest"><span class="badge">M</span>ExportAuditLogsRequest</a>- </li>-- <li>- <a href="#bytebase.v1.ExportAuditLogsResponse"><span class="badge">M</span>ExportAuditLogsResponse</a>- </li>-- <li>- <a href="#bytebase.v1.MCPDelegation"><span class="badge">M</span>MCPDelegation</a>- </li>-- <li>- <a href="#bytebase.v1.RequestMetadata"><span class="badge">M</span>RequestMetadata</a>- </li>-- <li>- <a href="#bytebase.v1.SearchAuditLogsRequest"><span class="badge">M</span>SearchAuditLogsRequest</a>- </li>-- <li>- <a href="#bytebase.v1.SearchAuditLogsResponse"><span class="badge">M</span>SearchAuditLogsResponse</a>- </li>--- <li>- <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>@@ -1383,7 +1379,7 @@-+<li><a href="#bytebase.v1.UserService"><span class="badge">S</span>UserService</a></li>@@ -1396,6 +1392,10 @@<a href="#v1%2fauth_service.proto">v1/auth_service.proto</a><ul>+ <li>+ <a href="#bytebase.v1.AuthenticationInfo"><span class="badge">M</span>AuthenticationInfo</a>+ </li>+<li><a href="#bytebase.v1.ExchangeTokenRequest"><span class="badge">M</span>ExchangeTokenRequest</a></li>@@ -1404,6 +1404,10 @@<a href="#bytebase.v1.ExchangeTokenResponse"><span class="badge">M</span>ExchangeTokenResponse</a></li>+ <li>+ <a href="#bytebase.v1.GetAuthenticationRestrictionRequest"><span class="badge">M</span>GetAuthenticationRestrictionRequest</a>+ </li>+<li><a href="#bytebase.v1.IdentityProviderContext"><span class="badge">M</span>IdentityProviderContext</a></li>@@ -1444,6 +1448,10 @@<a href="#bytebase.v1.ResetPasswordRequest"><span class="badge">M</span>ResetPasswordRequest</a></li>+ <li>+ <a href="#bytebase.v1.Restriction"><span class="badge">M</span>Restriction</a>+ </li>+<li><a href="#bytebase.v1.SendEmailLoginCodeRequest"><span class="badge">M</span>SendEmailLoginCodeRequest</a></li>@@ -1455,7 +1463,7 @@<li><a href="#bytebase.v1.SwitchWorkspaceRequest"><span class="badge">M</span>SwitchWorkspaceRequest</a></li>-+@@ -3503,7 +3511,7 @@ Format: instances/{instance}/databases/{database} </p></td><td></td><td><p>The container name to execute the query against, used for CosmosDB only. </p></td></tr>-+</tbody></table>@@ -3992,13 +4000,13 @@ whether the grant is still valid or has expired.</p></td><div class="file-heading">- <h2 id="v1/common.proto">v1/common.proto</h2><a href="#title">Top</a>+ <h2 id="v1/actuator_service.proto">v1/actuator_service.proto</h2><a href="#title">Top</a></div><p></p>- <h3 id="bytebase.v1.PermissionDeniedDetail">PermissionDeniedDetail</h3>- <p>PermissionDeniedDetail provides structured information about permission failures.</p><p>Used as error detail when returning CodePermissionDenied errors.</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">@@ -4008,315 +4016,859 @@ whether the grant is still valid or has expired.</p></td><tbody><tr>- <td>method</td>+ <td>version</td><td><a href="#string">string</a></td><td></td>- <td><p>The API method that was called. </p></td>+ <td><p>The Bytebase server version. </p></td></tr><tr>- <td>required_permissions</td>+ <td>git_commit</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The git commit hash of the build. </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>+ </tr>++ <tr>+ <td>external_url</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>+ </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>++ <tr>+ <td>unlicensed_features</td><td><a href="#string">string</a></td><td>repeated</td>- <td><p>The permissions required but not granted to the user. </p></td>+ <td><p>List of features that are not licensed. </p></td></tr><tr>- <td>resources</td>+ <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>++ <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>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>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>++ <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>default_project</td>+ <td><a href="#string">string</a></td>+ <td></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>++ <tr>+ <td>active_vcs_user_count</td>+ <td><a href="#int32">int32</a></td>+ <td></td>+ <td><p>The number of active VCS users seen in the active window. </p></td>+ </tr>++ </tbody>+ </table>++++++ <h3 id="bytebase.v1.GetActuatorInfoRequest">GetActuatorInfoRequest</h3>+ <p>Request message for getting actuator information.</p>++++++ <h3 id="bytebase.v1.SetupSampleRequest">SetupSampleRequest</h3>+ <p>Request message for setting up sample data.</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>+ </thead>+ <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.+The workspace is resolved from the authenticated session.+Permissions required: None (authentication required)</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>+ </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>GetActuatorInfo</td>+ <td>GET</td>+ <td>/v1/actuator/info</td>+ <td></td>+ </tr>+++++ <tr>+ <td>SetupSample</td>+ <td>POST</td>+ <td>/v1/actuator:setupSample</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>The resources the user was trying to access. </p></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.Position">Position</h3>- <p>Position in a text expressed as one-based line and one-based column.</p><p>We use 1-based numbering to match the majority of industry standards:</p><p>- Monaco Editor uses 1-based (https://microsoft.github.io/monaco-editor/typedoc/interfaces/IPosition.html)</p><p>- GitHub Actions uses 1-based (https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#setting-an-error-message)</p><p>- Most text editors display 1-based positions to users</p><p>Note: LSP uses 0-based (https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#position),</p><p>but we follow the canonical user-facing standards.</p><p>Handling unknown positions:</p><p>- If the entire position is unknown, leave this field as nil/undefined</p><p>- If only line is known, set line and leave column as 0 (e.g., line=5, column=0)</p><p>- If only column is known (rare), set column and leave line as 0</p><p>Frontends should check for nil/undefined/zero values and handle them appropriately.</p>-+++ <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>line</td>- <td><a href="#int32">int32</a></td>+ <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>+++ <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>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>++++++ <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>Line position in a text (one-based).-First line of the text is line 1.-A value of 0 indicates the line information is unknown. </p></td>+ <td><p>The unique ID of this tool call. </p></td></tr>-+<tr>- <td>column</td>- <td><a href="#int32">int32</a></td>+ <td>name</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>Column position in a text (one-based).-Column is measured in Unicode code points (characters/runes), not bytes or grapheme clusters.-First character of the line is column 1.-A value of 0 indicates the column information is unknown.+ <td><p>The name of the tool to call. </p></td>+ </tr>-Examples:-- "SELECT * FROM t" - column 8 is '*'-- "SELECT 你好 FROM t" - column 8 is '你' (even though it's at byte offset 7)-- "SELECT 😀 FROM t" - column 8 is '😀' (even though it's 4 bytes in UTF-8) </p></td>+ <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.Range">Range</h3>- <p>Range represents a span within a text or sequence.</p><p>Whether the indices are byte offsets or character indices depends on the context.</p><p>Check the documentation of the field using Range for specific semantics.</p>-+++ <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>start</td>- <td><a href="#int32">int32</a></td>+ <td>name</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>Start index (inclusive). </p></td>+ <td><p>The name of the tool. </p></td></tr>-+<tr>- <td>end</td>+ <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>+ </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>End index (exclusive). </p></td>+ <td><p>Total tokens used by the provider call. </p></td></tr>-+</tbody></table>----- <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>+++++ <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>APPROVAL_STATUS_UNSPECIFIED</td>+ <td>AI_CHAT_MESSAGE_ROLE_UNSPECIFIED</td><td>0</td>- <td><p>No approval workflow has started, including for a linked draft issue.</p></td>+ <td><p>Unspecified role.</p></td></tr><tr>- <td>CHECKING</td>+ <td>AI_CHAT_MESSAGE_ROLE_SYSTEM</td><td>1</td>- <td><p>Approval checks are being evaluated.</p></td>+ <td><p>System message providing instructions.</p></td></tr><tr>- <td>PENDING</td>+ <td>AI_CHAT_MESSAGE_ROLE_USER</td><td>2</td>- <td><p>Approval is pending.</p></td>+ <td><p>User message.</p></td></tr><tr>- <td>APPROVED</td>+ <td>AI_CHAT_MESSAGE_ROLE_ASSISTANT</td><td>3</td>- <td><p>Issue has been approved.</p></td>+ <td><p>Assistant (AI) message.</p></td></tr><tr>- <td>REJECTED</td>+ <td>AI_CHAT_MESSAGE_ROLE_TOOL</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>+ <td><p>Tool result message.</p></td></tr></tbody></table>- <h3 id="bytebase.v1.Engine">Engine</h3>- <p>Database engine type.</p>+++++ <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>Name</td><td>Number</td><td>Description</td></tr>+ <tr><td>Method Name</td><td>Request Type</td><td>Response Type</td><td>Description</td></tr></thead><tbody><tr>- <td>ENGINE_UNSPECIFIED</td>- <td>0</td>- <td><p>Unspecified database engine.</p></td>+ <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>CLICKHOUSE</td>- <td>1</td>- <td><p>ClickHouse columnar database.</p></td>- </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>+++++ <div class="file-heading">+ <h2 id="v1/common.proto">v1/common.proto</h2><a href="#title">Top</a>+ </div>+ <p></p>+++ <h3 id="bytebase.v1.PermissionDeniedDetail">PermissionDeniedDetail</h3>+ <p>PermissionDeniedDetail provides structured information about permission failures.</p><p>Used as error detail when returning CodePermissionDenied errors.</p>+++ <table class="field-table">+ <thead>+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>method</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The API method that was called. </p></td>+ </tr>++ <tr>+ <td>required_permissions</td>+ <td><a href="#string">string</a></td>+ <td>repeated</td>+ <td><p>The permissions required but not granted to the user. </p></td>+ </tr>++ <tr>+ <td>resources</td>+ <td><a href="#string">string</a></td>+ <td>repeated</td>+ <td><p>The resources the user was trying to access. </p></td>+ </tr>++ </tbody>+ </table>++++++ <h3 id="bytebase.v1.Position">Position</h3>+ <p>Position in a text expressed as one-based line and one-based column.</p><p>We use 1-based numbering to match the majority of industry standards:</p><p>- Monaco Editor uses 1-based (https://microsoft.github.io/monaco-editor/typedoc/interfaces/IPosition.html)</p><p>- GitHub Actions uses 1-based (https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#setting-an-error-message)</p><p>- Most text editors display 1-based positions to users</p><p>Note: LSP uses 0-based (https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#position),</p><p>but we follow the canonical user-facing standards.</p><p>Handling unknown positions:</p><p>- If the entire position is unknown, leave this field as nil/undefined</p><p>- If only line is known, set line and leave column as 0 (e.g., line=5, column=0)</p><p>- If only column is known (rare), set column and leave line as 0</p><p>Frontends should check for nil/undefined/zero values and handle them appropriately.</p>+++ <table class="field-table">+ <thead>+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>line</td>+ <td><a href="#int32">int32</a></td>+ <td></td>+ <td><p>Line position in a text (one-based).+First line of the text is line 1.+A value of 0 indicates the line information is unknown. </p></td>+ </tr>++ <tr>+ <td>column</td>+ <td><a href="#int32">int32</a></td>+ <td></td>+ <td><p>Column position in a text (one-based).+Column is measured in Unicode code points (characters/runes), not bytes or grapheme clusters.+First character of the line is column 1.+A value of 0 indicates the column information is unknown.++Examples:+- "SELECT * FROM t" - column 8 is '*'+- "SELECT 你好 FROM t" - column 8 is '你' (even though it's at byte offset 7)+- "SELECT 😀 FROM t" - column 8 is '😀' (even though it's 4 bytes in UTF-8) </p></td>+ </tr>++ </tbody>+ </table>++++++ <h3 id="bytebase.v1.Range">Range</h3>+ <p>Range represents a span within a text or sequence.</p><p>Whether the indices are byte offsets or character indices depends on the context.</p><p>Check the documentation of the field using Range for specific semantics.</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><a href="#int32">int32</a></td>+ <td></td>+ <td><p>Start index (inclusive). </p></td>+ </tr>++ <tr>+ <td>end</td>+ <td><a href="#int32">int32</a></td>+ <td></td>+ <td><p>End index (exclusive). </p></td>+ </tr>++ </tbody>+ </table>++++++++ <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>+ </thead>+ <tbody>++ <tr>+ <td>APPROVAL_STATUS_UNSPECIFIED</td>+ <td>0</td>+ <td><p>No approval workflow has started, including for a linked draft issue.</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.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>ENGINE_UNSPECIFIED</td>+ <td>0</td>+ <td><p>Unspecified database engine.</p></td>+ </tr>++ <tr>+ <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>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>-+<tr><td>REDIS</td><td>8</td><td><p>Redis key-value store.</p></td></tr>-+<tr><td>ORACLE</td><td>9</td><td><p>Oracle relational database.</p></td></tr>-+<tr><td>SPANNER</td><td>10</td><td><p>Google Cloud Spanner distributed database.</p></td></tr>-+<tr><td>MSSQL</td><td>11</td><td><p>Microsoft SQL Server relational database.</p></td></tr>-+<tr><td>REDSHIFT</td><td>12</td><td><p>Amazon Redshift data warehouse.</p></td></tr>-+<tr><td>MARIADB</td><td>13</td><td><p>MariaDB relational database.</p></td></tr>-+<tr><td>OCEANBASE</td><td>14</td><td><p>OceanBase distributed database.</p></td></tr>-+<tr><td>STARROCKS</td><td>15</td><td><p>StarRocks analytics database.</p></td></tr>-+<tr><td>DORIS</td><td>16</td><td><p>Apache Doris analytics database.</p></td></tr>-+<tr><td>HIVE</td><td>17</td><td><p>Apache Hive data warehouse.</p></td></tr>-+<tr><td>ELASTICSEARCH</td><td>18</td><td><p>Elasticsearch search engine.</p></td></tr>-+<tr><td>BIGQUERY</td><td>19</td><td><p>Google BigQuery data warehouse.</p></td></tr>-+<tr><td>DYNAMODB</td><td>20</td><td><p>Amazon DynamoDB NoSQL database.</p></td></tr>-+<tr><td>DATABRICKS</td><td>21</td><td><p>Databricks lakehouse platform.</p></td></tr>-+<tr><td>COCKROACHDB</td><td>22</td><td><p>CockroachDB distributed SQL database.</p></td></tr>-+<tr><td>COSMOSDB</td><td>23</td><td><p>Azure Cosmos DB multi-model database.</p></td></tr>-+<tr><td>TRINO</td><td>24</td><td><p>Trino distributed SQL query engine.</p></td></tr>-+<tr><td>CASSANDRA</td><td>25</td><td><p>Apache Cassandra NoSQL database.</p></td></tr>-+</tbody></table>-+<h3 id="bytebase.v1.ExportFormat">ExportFormat</h3><p>Data export format.</p><table class="enum-table">@@ -4324,40 +4876,40 @@ Examples:<tr><td>Name</td><td>Number</td><td>Description</td></tr></thead><tbody>-+<tr><td>FORMAT_UNSPECIFIED</td><td>0</td><td><p>Unspecified export format.</p></td></tr>-+<tr><td>CSV</td><td>1</td><td><p>Comma-separated values format.</p></td></tr>-+<tr><td>JSON</td><td>2</td><td><p>JavaScript Object Notation format.</p></td></tr>-+<tr><td>SQL</td><td>3</td><td><p>SQL statements format.</p></td></tr>-+<tr><td>XLSX</td><td>4</td><td><p>Microsoft Excel spreadsheet format.</p></td></tr>-+</tbody></table>-+<h3 id="bytebase.v1.IssueStatus">IssueStatus</h3><p>The status of an issue.</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">@@ -4365,34 +4917,34 @@ Examples:<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.RiskLevel">RiskLevel</h3><p>RiskLevel is the risk level.</p><table class="enum-table">@@ -4400,7 +4952,7 @@ Examples:<tr><td>Name</td><td>Number</td><td>Description</td></tr></thead><tbody>-+<tr><td>RISK_LEVEL_UNSPECIFIED</td><td>0</td>@@ -4804,36 +5356,36 @@ Examples:<td>6</td><td><p>WeCom (WeChat Work) integration.</p></td></tr>-+<tr><td>LARK</td><td>7</td><td><p>Lark integration.</p></td></tr>-+<tr><td>GOOGLE_CHAT</td><td>8</td><td><p>Google Chat integration.</p></td></tr>-+</tbody></table>--++--++<div class="file-heading">- <h2 id="v1/rollout_service.proto">v1/rollout_service.proto</h2><a href="#title">Top</a>+ <h2 id="v1/iam_policy.proto">v1/iam_policy.proto</h2><a href="#title">Top</a></div><p></p>-- <h3 id="bytebase.v1.BatchCancelTaskRunsRequest">BatchCancelTaskRunsRequest</h3>- <p></p>++ <h3 id="bytebase.v1.Binding">Binding</h3>+ <p>Binding associates members with a role and optional conditions.</p><table class="field-table">@@ -4843,20 +5395,66 @@ Examples:<tbody><tr>- <td>parent</td>+ <td>role</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>+ <td><p>The role that is assigned to the members.+Format: roles/{role} </p></td></tr><tr>- <td>task_runs</td>+ <td>members</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>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>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++Support variables:+resource.database: the database full name in "instances/{instance}/databases/{database}" format, used by any role with SQL Editor read (e.g. "roles/sqlEditorUser", "roles/sqlEditorReadUser") or write (bb.sql.ddl / bb.sql.dml) access, support "==" operator.+resource.schema_name: the schema name, used by any role with SQL Editor read or write (bb.sql.ddl / bb.sql.dml) access; for writes it is evaluated per write-target table, support "==" operator.+resource.table_name: the table name, used by any role with SQL Editor read or write (bb.sql.ddl / bb.sql.dml) access; for writes it is evaluated per write-target table, 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}")`.++Known limitations of table/schema-scoped DDL/DML grants:+- The scope only gates the write target, not the read sources of a write: e.g. `INSERT INTO granted_table SELECT * FROM other_table` may read `other_table` without a grant on it, so a table-scoped write grant is not an exfiltration boundary.+- It must be paired with a database/project-level read grant: a table-scoped grant alone does not satisfy the SQL Editor query method permission (bb.databases.get).+- A resource.schema_name-scoped grant only authorizes a write whose schema is unambiguous — qualify the table (schema.table) or select the schema for the SQL Editor session. An unqualified write whose effective schema cannot be determined ahead of execution is denied (qualify it, or use a table-only grant).+- Multi-statement batches are authorized at the database level: an earlier statement can rebind the session's default schema or database mid-batch, so per-table/schema scoping is dropped and a table/schema-scoped grant requires a database-level grant. The database-level check is still per target database — a qualified cross-database write is gated by a grant on its own database, not the request database — but an unqualified write whose session default is rebound mid-batch is evaluated against the database it literally names, so qualify cross-database writes or run them as single statements.+- A write target in a different project than the SQL-Editor session's database is denied: the per-target check evaluates the session project's IAM policy, so a cross-project write is failed closed (to write it, open the SQL Editor on a database in the target project).+- Enforcement is on the statement's literal write target; writes routed elsewhere by a view/synonym, or into a temporary schema (e.g. pg_temp), are evaluated against what the statement names, not the ultimate base object.+- Write-target gating uses an ALLOWLIST of statement types the resolver models. It does NOT cover every syntactically-identifiable cross-database write; statement types off the allowlist are authorized against the request database. The allowlist is:+ - Modeled table/data writes (per-table/schema-scopable): INSERT/UPDATE/DELETE/TRUNCATE/MERGE, LOAD DATA, IMPORT INTO, CREATE TABLE AS / SELECT INTO, and table-level CREATE/DROP/ALTER/RENAME/index.+ - Modeled non-table object DDL (gated at the DATABASE level by the object's own explicit database/schema qualifier; an unqualified name keeps the request-database check): CREATE/ALTER/DROP of view, procedure/function/routine, trigger, sequence, synonym, type, and (Oracle) package and cluster; plus Oracle ALTER/DROP MATERIALIZED VIEW (Oracle CREATE MATERIALIZED VIEW is not modeled — see below).+ NOT modeled (these fall back to the request-database check, so a qualified cross-database one is authorized against the request database): MySQL CREATE TRIGGER and CREATE/ALTER/DROP EVENT (bare-string AST names); MSSQL ALTER of view/procedure/function/trigger (no ALTER node in the grammar); Oracle CREATE MATERIALIZED VIEW and the niche object DDL — dimension, attribute dimension, hierarchy, analytic view, JSON duality view, materialized zonemap, operator, in-memory join group, property graph, vector index, index type, domain; COPY ... FROM; and engine-specific bulk-load / deprecated text writes. A structural "write-target object database" extraction layer to remove this allowlist dependence is tracked as a follow-up.+ - Out of scope (read sources / indirect effects): the tables a write READS (INSERT … SELECT, MERGE … USING, CREATE TABLE AS … SELECT) and objects reached indirectly via views/synonyms/function bodies/triggers are NOT gated.+ Invariant: for a statement ON the modeled allowlist that explicitly names a different database as its write target, the ACL uses that target database, not the request database. Statement types OFF the allowlist are authorized against the request database.++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>@@ -4866,15 +5464,8 @@ Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/task- <h3 id="bytebase.v1.BatchCancelTaskRunsResponse">BatchCancelTaskRunsResponse</h3>- <p></p>------ <h3 id="bytebase.v1.BatchRunTasksRequest">BatchRunTasksRequest</h3>- <p></p>+ <h3 id="bytebase.v1.BindingDelta">BindingDelta</h3>+ <p>A single change to a binding.</p><table class="field-table">@@ -4884,33 +5475,32 @@ Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/task<tbody><tr>- <td>parent</td>- <td><a href="#string">string</a></td>+ <td>action</td>+ <td><a href="#bytebase.v1.BindingDelta.Action">BindingDelta.Action</a></td><td></td>- <td><p>The stage name for the tasks.-Format: projects/{project}/plans/{plan}/rollout/stages/{stage} </p></td>+ <td><p>The action that was performed on a Binding. </p></td></tr><tr>- <td>tasks</td>+ <td>role</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>+ <td></td>+ <td><p>Role that is assigned to `members`.+For example, `roles/projectOwner`. </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>+ <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>skip_prior_backup</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>If true, skip prior backup for this run even if the task has prior backup enabled. </p></td>+ <td><p>The condition that is associated with this binding. </p></td></tr></tbody>@@ -4920,17 +5510,10 @@ Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task} </p>- <h3 id="bytebase.v1.BatchRunTasksResponse">BatchRunTasksResponse</h3>- <p></p>--+ <h3 id="bytebase.v1.GetIamPolicyRequest">GetIamPolicyRequest</h3>+ <p>Request message for getting an IAM policy.</p>--- <h3 id="bytebase.v1.BatchSkipTasksRequest">BatchSkipTasksRequest</h3>- <p></p>-<table class="field-table"><thead><tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>@@ -4938,26 +5521,12 @@ 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>resource</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 resource to get the IAM policy.+Format: projects/{project}+Format: workspaces/{workspace} </p></td></tr></tbody>@@ -4967,15 +5536,8 @@ 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>- <p></p>+ <h3 id="bytebase.v1.IamPolicy">IamPolicy</h3>+ <p>IAM policy that binds members to roles.</p><table class="field-table">@@ -4985,21 +5547,20 @@ 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 parent plan for which this rollout will be created.-Format: projects/{project}/plans/{plan} </p></td>+ <td>bindings</td>+ <td><a href="#bytebase.v1.Binding">Binding</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>target</td>+ <td>etag</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>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>@@ -5009,8 +5570,8 @@ If set to "", no stages are created. </p></td>- <h3 id="bytebase.v1.GetRolloutRequest">GetRolloutRequest</h3>- <p></p>+ <h3 id="bytebase.v1.PolicyDelta">PolicyDelta</h3>+ <p>Describes changes between two IAM policies.</p><table class="field-table">@@ -5020,12 +5581,10 @@ If set to "", no stages are created. </p></td><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>+ <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></tr></tbody>@@ -5035,8 +5594,8 @@ Format: projects/{project}/plans/{plan}/rollout </p></td>- <h3 id="bytebase.v1.GetTaskRunLogRequest">GetTaskRunLogRequest</h3>- <p></p>+ <h3 id="bytebase.v1.SetIamPolicyRequest">SetIamPolicyRequest</h3>+ <p>Request message for setting an IAM policy.</p><table class="field-table">@@ -5046,21 +5605,80 @@ Format: projects/{project}/plans/{plan}/rollout </p></td><tbody><tr>- <td>parent</td>+ <td>resource</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 resource to set the IAM policy.+Format: projects/{project}+Format: workspaces/{workspace} </p></td>+ </tr>++ <tr>+ <td>policy</td>+ <td><a href="#bytebase.v1.IamPolicy">IamPolicy</a></td>+ <td></td>+ <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>---- <h3 id="bytebase.v1.GetTaskRunRequest">GetTaskRunRequest</h3>- <p></p>++++++ <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><table class="field-table">@@ -5070,10 +5688,10 @@ Format: projects/{project}/plans/{plan}/rollout </p></td><tbody><tr>- <td>name</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>Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun} </p></td>+ <td><p>Changes to IAM policies. </p></td></tr></tbody>@@ -5083,8 +5701,8 @@ Format: projects/{project}/plans/{plan}/rollout </p></td>- <h3 id="bytebase.v1.GetTaskRunSessionRequest">GetTaskRunSessionRequest</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">@@ -5094,10 +5712,102 @@ 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 log.+Formats:+- projects/{project}/auditLogs/{uid}+- workspaces/{workspace}/auditLogs/{uid} </p></td>+ </tr>++ <tr>+ <td>create_time</td>+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>+ <td></td>+ <td><p>The timestamp when the audit log was created. </p></td>+ </tr>++ <tr>+ <td>user</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The user who performed the action.+Format: users/{email} </p></td>+ </tr>++ <tr>+ <td>method</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>+ </tr>++ <tr>+ <td>severity</td>+ <td><a href="#bytebase.v1.AuditLog.Severity">AuditLog.Severity</a></td>+ <td></td>+ <td><p>The severity level of this audit log entry. </p></td>+ </tr>++ <tr>+ <td>resource</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The resource associated with this audit log. </p></td>+ </tr>++ <tr>+ <td>request</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The request payload in JSON format. </p></td>+ </tr>++ <tr>+ <td>response</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>+ </tr>++ <tr>+ <td>status</td>+ <td><a href="#google.rpc.Status">google.rpc.Status</a></td>+ <td></td>+ <td><p>The status of the operation. </p></td>+ </tr>++ <tr>+ <td>latency</td>+ <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>+ <td></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>++ <tr>+ <td>mcp_delegation</td>+ <td><a href="#bytebase.v1.MCPDelegation">MCPDelegation</a></td>+ <td></td>+ <td><p>MCP delegation provenance. Present exactly when the audited call arrived+through the MCP server's delegated credential; never set for public API+calls. Presence of this message is the MCP-origin marker. </p></td></tr></tbody>@@ -5107,8 +5817,8 @@ Format: projects/{project}/plans/{plan}/rollout </p></td>- <h3 id="bytebase.v1.ListRolloutsRequest">ListRolloutsRequest</h3>- <p></p>+ <h3 id="bytebase.v1.ExportAuditLogsRequest">ExportAuditLogsRequest</h3>+ <p>Request message for exporting audit logs.</p><table class="field-table">@@ -5121,46 +5831,51 @@ Format: projects/{project}/plans/{plan}/rollout </p></td><td>parent</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> </p></td></tr><tr>- <td>page_size</td>- <td><a href="#int32">int32</a></td>+ <td>filter</td>+ <td><a href="#string">string</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 filter of the log. It should be a valid CEL expression.+Check the filter field in the SearchAuditLogsRequest message. </p></td></tr><tr>- <td>page_token</td>+ <td>order_by</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><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>filter</td>- <td><a href="#string">string</a></td>+ <td>format</td>+ <td><a href="#bytebase.v1.ExportFormat">ExportFormat</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.+ <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>-For example:-update_time >= "2025-01-02T15:04:05Z07:00"-task_type in ["DATABASE_MIGRATE", "DATABASE_CREATE"] </p></td>+ <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>@@ -5170,8 +5885,8 @@ task_type in ["DATABASE_MIGRATE", "DATABASE_CREATE"] </p></td>- <h3 id="bytebase.v1.ListRolloutsResponse">ListRolloutsResponse</h3>- <p></p>+ <h3 id="bytebase.v1.ExportAuditLogsResponse">ExportAuditLogsResponse</h3>+ <p>Response message for exporting audit logs.</p><table class="field-table">@@ -5181,18 +5896,19 @@ task_type in ["DATABASE_MIGRATE", "DATABASE_CREATE"] </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>content</td>+ <td><a href="#bytes">bytes</a></td>+ <td></td>+ <td><p>The exported audit log content in the requested format. </p></td></tr><tr><td>next_page_token</td><td><a href="#string">string</a></td><td></td>- <td><p>A token, which can be sent as `page_token` to retrieve the next page.-If this field is omitted, there are no subsequent pages. </p></td>+ <td><p>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>@@ -5202,8 +5918,8 @@ If this field is omitted, there are no subsequent pages. </p></td>- <h3 id="bytebase.v1.ListTaskRunsRequest">ListTaskRunsRequest</h3>- <p></p>+ <h3 id="bytebase.v1.MCPDelegation">MCPDelegation</h3>+ <p>Provenance of a call that reached the API through the MCP (Model Context</p><p>Protocol) server's delegated credential. The values are copied verbatim from</p><p>the verified credential's grant state; empty fields record that the grant</p><p>stored nothing (legacy sessions), never a resolved or synthesized value.</p><table class="field-table">@@ -5213,12 +5929,37 @@ If this field is omitted, there are no subsequent pages. </p></td><tbody><tr>- <td>parent</td>+ <td>scope</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>The OAuth2 grant's consented scope, e.g. "mcp:read-only".+Empty when the grant recorded no scope. </p></td>+ </tr>++ <tr>+ <td>resource</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The grant's stored MCP resource URI.+Empty for pre-grant legacy sessions. </p></td>+ </tr>++ <tr>+ <td>client_id</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The OAuth2 client the grant was consented to.+Empty for legacy web-session tokens at /mcp. </p></td>+ </tr>++ <tr>+ <td>correlation_id</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>Correlates the audit rows an MCP session produces. Minted at the /mcp+boundary and session-scoped: the MCP SDK hands tool handlers the+initialize-time context, so one MCP session carries one correlation ID+across all of its tool calls. </p></td></tr></tbody>@@ -5228,8 +5969,8 @@ Use "projects/{project}/plans/{plan}/rollout/stages/-/tasks/-" to list a- <h3 id="bytebase.v1.ListTaskRunsResponse">ListTaskRunsResponse</h3>- <p></p>+ <h3 id="bytebase.v1.RequestMetadata">RequestMetadata</h3>+ <p>Metadata about the incoming request.</p><table class="field-table">@@ -5239,112 +5980,91 @@ Use "projects/{project}/plans/{plan}/rollout/stages/-/tasks/-" to list a<tbody><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>+ <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>- </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>name</td>+ <td>caller_supplied_user_agent</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 user agent string provided by the caller.+This is supplied by the client and is not authenticated. </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><a href="#string">string</a></td>- <td></td>- <td><p>The rollback SQL statement that would undo the task run. </p></td>- </tr>-- </tbody>- </table>---- <h3 id="bytebase.v1.Rollout">Rollout</h3>- <p></p>+ <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>name</td>+ <td>parent</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>+ <td><p> </p></td></tr><tr>- <td>title</td>+ <td>filter</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>+ <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>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>+ <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>create_time</td>- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>+ <td>page_size</td>+ <td><a href="#int32">int32</a></td><td></td>- <td><p> </p></td>+ <td><p>The maximum number of 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>update_time</td>- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</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 `SearchLogs` call.+Provide this to retrieve the subsequent page. </p></td></tr></tbody>@@ -5354,59 +6074,202 @@ 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.SearchAuditLogsResponse">SearchAuditLogsResponse</h3>+ <p>Response 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>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>+ <td>audit_logs</td>+ <td><a href="#bytebase.v1.AuditLog">AuditLog</a></td>+ <td>repeated</td>+ <td><p> </p></td></tr>-+<tr>- <td>id</td>+ <td>next_page_token</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>+ <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>+ </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>+ <thead>+ <tr>+ <td>Method Name</td>+ <td>Method</td>+ <td>Pattern</td>+ <td>Body</td>+ </tr>+ </thead>+ <tbody>+- <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>+ <tr>+ <td>SearchAuditLogs</td>+ <td>POST</td>+ <td>/v1/{parent=projects/*}/auditLogs:search</td>+ <td>*</td>+ </tr>++ <tr>+ <td>SearchAuditLogs</td>+ <td>POST</td>+ <td>/v1/auditLogs:search</td>+ <td>*</td>+ </tr>+++++ <tr>+ <td>ExportAuditLogs</td>+ <td>POST</td>+ <td>/v1/{parent=projects/*}/auditLogs:export</td>+ <td>*</td>+ </tr>+ <tr>+ <td>ExportAuditLogs</td>+ <td>POST</td>+ <td>/v1/auditLogs:export</td>+ <td>*</td>+ </tr>++</tbody></table>---- <h3 id="bytebase.v1.Task">Task</h3>+++ <div class="file-heading">+ <h2 id="v1/rollout_service.proto">v1/rollout_service.proto</h2><a href="#title">Top</a>+ </div>+ <p></p>+++ <h3 id="bytebase.v1.BatchCancelTaskRunsRequest">BatchCancelTaskRunsRequest</h3><p></p>-+<table class="field-table"><thead><tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>@@ -5414,253 +6277,213 @@ Format: environments/{environment} for valid environments, or "environments/<tbody><tr>- <td>name</td>+ <td>parent</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>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>spec_id</td>+ <td>task_runs</td><td><a href="#string">string</a></td>- <td></td>- <td><p>A UUID4 string that uniquely identifies the Spec. </p></td>+ <td>repeated</td>+ <td><p>The taskRuns to cancel.+Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun} </p></td></tr>- <tr>- <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>+ </tbody>+ </table>++++++ <h3 id="bytebase.v1.BatchCancelTaskRunsResponse">BatchCancelTaskRunsResponse</h3>+ <p></p>++++++ <h3 id="bytebase.v1.BatchRunTasksRequest">BatchRunTasksRequest</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>skipped_reason</td>+ <td>parent</td><td><a href="#string">string</a></td><td></td>- <td><p>The reason why the task was skipped. </p></td>- </tr>-- <tr>- <td>type</td>- <td><a href="#bytebase.v1.Task.Type">Task.Type</a></td>- <td></td>- <td><p> </p></td>+ <td><p>The stage name for the tasks.+Format: projects/{project}/plans/{plan}/rollout/stages/{stage} </p></td></tr><tr>- <td>target</td>+ <td>tasks</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>+ <td>repeated</td>+ <td><p>The tasks to run.+Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task} </p></td></tr>-+<tr>- <td>update_time</td>+ <td>run_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>+ <td><p>The task run should run after run_time. </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>skip_prior_backup</td>+ <td><a href="#bool">bool</a></td>+ <td></td>+ <td><p>If true, skip prior backup for this run even if the task has prior backup enabled. </p></td></tr>-+</tbody></table>---- <h3 id="bytebase.v1.Task.DatabaseCreate">Task.DatabaseCreate</h3>- <p>Payload for creating a new database.</p>-+++ <h3 id="bytebase.v1.BatchRunTasksResponse">BatchRunTasksResponse</h3>+ <p></p>++++++ <h3 id="bytebase.v1.BatchSkipTasksRequest">BatchSkipTasksRequest</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 stage name for the tasks.+Format: projects/{project}/plans/{plan}/rollout/stages/{stage} </p></td>+ </tr><tr>- <td>sheet</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>Format: projects/{project}/sheets/{sheet} </p></td>+ <td><p>The reason for skipping the tasks. </p></td></tr></tbody></table>---- <h3 id="bytebase.v1.Task.DatabaseUpdate">Task.DatabaseUpdate</h3>- <p>Payload for updating a database schema.</p>-+++ <h3 id="bytebase.v1.BatchSkipTasksResponse">BatchSkipTasksResponse</h3>+ <p></p>++++++ <h3 id="bytebase.v1.CreateRolloutRequest">CreateRolloutRequest</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>sheet</td>+ <td>parent</td><td><a href="#string">string</a></td><td></td>- <td><p>Format: projects/{project}/sheets/{sheet} </p></td>+ <td><p>The parent plan for which this rollout will be created.+Format: projects/{project}/plans/{plan} </p></td></tr>-+<tr>- <td>release</td>+ <td>target</td><td><a href="#string">string</a></td>- <td></td>- <td><p>Format: projects/{project}/releases/{release} </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></table>---- <h3 id="bytebase.v1.TaskRun">TaskRun</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>Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun} </p></td>- </tr>-- <tr>- <td>creator</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>Format: users/[email protected] </p></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>-- <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>- </tr>-- <tr>- <td>detail</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>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></table>---- <h3 id="bytebase.v1.TaskRun.SchedulerInfo">TaskRun.SchedulerInfo</h3>- <p>Information about task run scheduling.</p>-+++ <h3 id="bytebase.v1.GetTaskRunLogRequest">GetTaskRunLogRequest</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>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>parent</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>The cause for the task run waiting. </p></td>+ <td><p>Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun} </p></td></tr></tbody>@@ -5670,31 +6493,31 @@ 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.GetTaskRunRequest">GetTaskRunRequest</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>parallel_tasks_limit</td>- <td><a href="#bool">bool</a></td>+ <td>name</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>Waiting due to parallel tasks limit. </p></td>+ <td><p>Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun} </p></td></tr>-+</tbody></table>--++- <h3 id="bytebase.v1.TaskRunLog">TaskRunLog</h3>+ <h3 id="bytebase.v1.GetTaskRunSessionRequest">GetTaskRunSessionRequest</h3><p></p>@@ -5705,17 +6528,10 @@ This can only be set when creating the task run calling BatchRunTasks. </p></td><tbody><tr>- <td>name</td>+ <td>parent</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>- </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><p>Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun} </p></td></tr></tbody>@@ -5723,9 +6539,9 @@ 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.ListRolloutsRequest">ListRolloutsRequest</h3><p></p>@@ -5736,87 +6552,49 @@ 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>parent</td><td><a href="#string">string</a></td><td></td>- <td><p>The replica ID for this log entry. </p></td>- </tr>-- <tr>- <td>schema_dump</td>- <td><a href="#bytebase.v1.TaskRunLogEntry.SchemaDump">TaskRunLogEntry.SchemaDump</a></td>- <td></td>- <td><p>Schema dump details (if type is SCHEMA_DUMP). </p></td>- </tr>-- <tr>- <td>command_execute</td>- <td><a href="#bytebase.v1.TaskRunLogEntry.CommandExecute">TaskRunLogEntry.CommandExecute</a></td>- <td></td>- <td><p>Command execution details (if type is COMMAND_EXECUTE). </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>-- <tr>- <td>transaction_control</td>- <td><a href="#bytebase.v1.TaskRunLogEntry.TransactionControl">TaskRunLogEntry.TransactionControl</a></td>- <td></td>- <td><p>Transaction control details (if type is TRANSACTION_CONTROL). </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>- </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>+ <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>compute_diff</td>- <td><a href="#bytebase.v1.TaskRunLogEntry.ComputeDiff">TaskRunLogEntry.ComputeDiff</a></td>+ <td>page_size</td>+ <td><a href="#int32">int32</a></td><td></td>- <td><p>Compute diff details (if type is COMPUTE_DIFF). </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>release_file_execute</td>- <td><a href="#bytebase.v1.TaskRunLogEntry.ReleaseFileExecute">TaskRunLogEntry.ReleaseFileExecute</a></td>+ <td>page_token</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>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>ghost_migration</td>- <td><a href="#bytebase.v1.TaskRunLogEntry.GhostMigration">TaskRunLogEntry.GhostMigration</a></td>+ <td>filter</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>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_CREATE"] </p></td></tr></tbody>@@ -5826,8 +6604,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.ListRolloutsResponse">ListRolloutsResponse</h3>+ <p></p><table class="field-table">@@ -5837,33 +6615,18 @@ 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></td>- <td><p>When the command was logged. </p></td>- </tr>-- <tr>- <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>+ <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>statement</td>+ <td>next_page_token</td><td><a href="#string">string</a></td><td></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>+ <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>@@ -5873,94 +6636,60 @@ Example: For "SELECT 你好;" in a UTF-8 sheet, range [0, 13) represents- <h3 id="bytebase.v1.TaskRunLogEntry.CommandExecute.CommandResponse">TaskRunLogEntry.CommandExecute.CommandResponse</h3>- <p>Command execution response.</p>+ <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>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>parent</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>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 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>-+</tbody></table>---- <h3 id="bytebase.v1.TaskRunLogEntry.ComputeDiff">TaskRunLogEntry.ComputeDiff</h3>- <p>Schema diff computation details.</p>-+++ <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>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><a href="#string">string</a></td>- <td></td>- <td><p>Error message if computation failed. </p></td>+ <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>-+</tbody></table>---- <h3 id="bytebase.v1.TaskRunLogEntry.DatabaseSync">TaskRunLogEntry.DatabaseSync</h3>- <p>Database synchronization details.</p>-+++ <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>@@ -5968,62 +6697,34 @@ 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>name</td><td><a href="#string">string</a></td><td></td>- <td><p>Error message if sync failed. </p></td>+ <td><p>Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun} </p></td></tr></tbody></table>---- <h3 id="bytebase.v1.TaskRunLogEntry.GhostMigration">TaskRunLogEntry.GhostMigration</h3>- <p>gh-ost migration details.</p>-+++ <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>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>statement</td><td><a href="#string">string</a></td><td></td>- <td><p>Error message if the gh-ost migration failed. </p></td>+ <td><p>The rollback SQL statement that would undo the task run. </p></td></tr></tbody>@@ -6031,10 +6732,10 @@ 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.Rollout">Rollout</h3>+ <p></p><table class="field-table">@@ -6044,55 +6745,40 @@ 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>name</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>When the backup started. </p></td>+ <td><p>The resource name of the rollout.+Format: projects/{project}/plans/{plan}/rollout </p></td></tr><tr>- <td>end_time</td>- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>+ <td>title</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>When the backup ended. </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>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>+ <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>error</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>Error message if the backup failed. </p></td>+ <td><p> </p></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>+ <td>update_time</td>+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>+ <td></td>+ <td><p> </p></td></tr></tbody>@@ -6102,8 +6788,8 @@ Example: For "SELECT 你好;" in a UTF-8 sheet, range [0, 13) represents- <h3 id="bytebase.v1.TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item">TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item</h3>- <p>A single backup table mapping.</p>+ <h3 id="bytebase.v1.Stage">Stage</h3>+ <p></p><table class="field-table">@@ -6113,31 +6799,35 @@ 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>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>target_table</td>- <td><a href="#bytebase.v1.TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item.Table">TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item.Table</a></td>+ <td>id</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>The target backup table information. </p></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>start_position</td>- <td><a href="#bytebase.v1.Position">Position</a></td>+ <td>environment</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>The start position in the SQL statement. </p></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>end_position</td>- <td><a href="#bytebase.v1.Position">Position</a></td>- <td></td>- <td><p>The end position in the SQL statement. </p></td>+ <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>@@ -6145,10 +6835,10 @@ 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.Task">Task</h3>+ <p></p><table class="field-table">@@ -6158,2367 +6848,1199 @@ Example: For "SELECT 你好;" in a UTF-8 sheet, range [0, 13) represents<tbody><tr>- <td>database</td>+ <td>name</td><td><a href="#string">string</a></td><td></td>- <td><p>The database information.-Format: instances/{instance}/databases/{database} </p></td>+ <td><p>Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task} </p></td></tr>-+<tr>- <td>schema</td>+ <td>spec_id</td><td><a href="#string">string</a></td><td></td>- <td><p>The schema name. </p></td>+ <td><p>A UUID4 string that uniquely identifies the Spec. </p></td></tr><tr>- <td>table</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>skipped_reason</td><td><a href="#string">string</a></td><td></td>- <td><p>The table name. </p></td>+ <td><p>The reason why the task was skipped. </p></td>+ </tr>++ <tr>+ <td>type</td>+ <td><a href="#bytebase.v1.Task.Type">Task.Type</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>target</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>Format: instances/{instance} 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>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>---- <h3 id="bytebase.v1.TaskRunLogEntry.ReleaseFileExecute">TaskRunLogEntry.ReleaseFileExecute</h3>- <p>Release file execution details.</p>-+++ <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>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>sheet</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><p>Format: projects/{project}/sheets/{sheet} </p></td></tr></tbody></table>---- <h3 id="bytebase.v1.TaskRunLogEntry.RetryInfo">TaskRunLogEntry.RetryInfo</h3>- <p>Retry information for failed operations.</p>-+++ <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>error</td>+ <td>sheet</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>+ <td><p>Format: projects/{project}/sheets/{sheet} </p></td></tr><tr>- <td>maximum_retries</td>- <td><a href="#int32">int32</a></td>+ <td>release</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>Maximum number of retries allowed. </p></td>+ <td><p>Format: projects/{project}/releases/{release} </p></td></tr></tbody></table>---- <h3 id="bytebase.v1.TaskRunLogEntry.SchemaDump">TaskRunLogEntry.SchemaDump</h3>- <p>Schema dump operation details.</p>-+++ <h3 id="bytebase.v1.TaskRun">TaskRun</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>Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun} </p></td>+ </tr><tr>- <td>start_time</td>- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>+ <td>creator</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>When the schema dump started. </p></td>+ <td><p>Format: users/[email protected] </p></td></tr><tr>- <td>end_time</td>+ <td>create_time</td><td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td><td></td>- <td><p>When the schema dump ended. </p></td>+ <td><p> </p></td></tr>-+<tr>- <td>error</td>+ <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>+ </tr>++ <tr>+ <td>detail</td><td><a href="#string">string</a></td><td></td>- <td><p>Error message if the schema dump failed. </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>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></table>---- <h3 id="bytebase.v1.TaskRunLogEntry.TransactionControl">TaskRunLogEntry.TransactionControl</h3>- <p>Transaction control operation details.</p>-+++ <h3 id="bytebase.v1.TaskRun.SchedulerInfo">TaskRun.SchedulerInfo</h3>+ <p>Information about task run scheduling.</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.TaskRunLogEntry.TransactionControl.Type">TaskRunLogEntry.TransactionControl.Type</a></td>+ <td>report_time</td>+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td><td></td>- <td><p>The type of transaction control. </p></td>+ <td><p>The time when the scheduling info was reported. </p></td></tr>-+<tr>- <td>error</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>Error message if the operation failed. </p></td>+ <td><p>The cause for the task run waiting. </p></td></tr></tbody></table>---- <h3 id="bytebase.v1.TaskRunSession">TaskRunSession</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"><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>Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun}/session </p></td>- </tr>-+<tr>- <td>postgres</td>- <td><a href="#bytebase.v1.TaskRunSession.Postgres">TaskRunSession.Postgres</a></td>+ <td>parallel_tasks_limit</td>+ <td><a href="#bool">bool</a></td><td></td>- <td><p>PostgreSQL session information. </p></td>+ <td><p>Waiting due to parallel tasks limit. </p></td></tr>-+</tbody></table>---- <h3 id="bytebase.v1.TaskRunSession.Postgres">TaskRunSession.Postgres</h3>- <p>PostgreSQL session information.</p>-+++ <h3 id="bytebase.v1.TaskRunLog">TaskRunLog</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>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>Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun}/log </p></td></tr>-+<tr>- <td>blocked_sessions</td>- <td><a href="#bytebase.v1.TaskRunSession.Postgres.Session">TaskRunSession.Postgres.Session</a></td>+ <td>entries</td>+ <td><a href="#bytebase.v1.TaskRunLogEntry">TaskRunLogEntry</a></td><td>repeated</td>- <td><p>`blocked_sessions` are blocked by `session`. </p></td>+ <td><p>The log entries for this task run. </p></td></tr>-+</tbody></table>--++- <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.TaskRunLogEntry">TaskRunLogEntry</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>pid</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>Process ID of the session. </p></td>+ <td><p>The type of this log entry. </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>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>query</td>+ <td>replica_id</td><td><a href="#string">string</a></td><td></td>- <td><p>Current query being executed. </p></td>+ <td><p>The replica ID for this log entry. </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>+ <td>schema_dump</td>+ <td><a href="#bytebase.v1.TaskRunLogEntry.SchemaDump">TaskRunLogEntry.SchemaDump</a></td>+ <td></td>+ <td><p>Schema dump details (if type is SCHEMA_DUMP). </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>+ <td>command_execute</td>+ <td><a href="#bytebase.v1.TaskRunLogEntry.CommandExecute">TaskRunLogEntry.CommandExecute</a></td>+ <td></td>+ <td><p>Command execution details (if type is COMMAND_EXECUTE). </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>+ <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>datname</td>- <td><a href="#string">string</a></td>- <td>optional</td>- <td><p>Database name. </p></td>+ <td>transaction_control</td>+ <td><a href="#bytebase.v1.TaskRunLogEntry.TransactionControl">TaskRunLogEntry.TransactionControl</a></td>+ <td></td>+ <td><p>Transaction control details (if type is TRANSACTION_CONTROL). </p></td></tr>-+<tr>- <td>usename</td>- <td><a href="#string">string</a></td>- <td>optional</td>- <td><p>User name. </p></td>+ <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></tr>-+<tr>- <td>application_name</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>Application name. </p></td>+ <td><p>Retry information details (if type is RETRY_INFO). </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>compute_diff</td>+ <td><a href="#bytebase.v1.TaskRunLogEntry.ComputeDiff">TaskRunLogEntry.ComputeDiff</a></td>+ <td></td>+ <td><p>Compute diff details (if type is COMPUTE_DIFF). </p></td></tr>-+<tr>- <td>client_port</td>- <td><a href="#string">string</a></td>- <td>optional</td>- <td><p>Client port number. </p></td>+ <td>release_file_execute</td>+ <td><a href="#bytebase.v1.TaskRunLogEntry.ReleaseFileExecute">TaskRunLogEntry.ReleaseFileExecute</a></td>+ <td></td>+ <td><p>Release file execution details (if type is RELEASE_FILE_EXECUTE). </p></td></tr>-+<tr>- <td>backend_start</td>- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>+ <td>ghost_migration</td>+ <td><a href="#bytebase.v1.TaskRunLogEntry.GhostMigration">TaskRunLogEntry.GhostMigration</a></td><td></td>- <td><p>When the backend process started. </p></td>+ <td><p>gh-ost migration details (if type is GHOST_MIGRATION). </p></td></tr>-++ </tbody>+ </table>++++++ <h3 id="bytebase.v1.TaskRunLogEntry.CommandExecute">TaskRunLogEntry.CommandExecute</h3>+ <p>Command execution details.</p>+++ <table class="field-table">+ <thead>+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>+ </thead>+ <tbody>+<tr>- <td>xact_start</td>+ <td>log_time</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></td>+ <td><p>When the command was logged. </p></td></tr>-+<tr>- <td>query_start</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>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>+ </table>++++++ <h3 id="bytebase.v1.TaskRunLogEntry.CommandExecute.CommandResponse">TaskRunLogEntry.CommandExecute.CommandResponse</h3>+ <p>Command execution response.</p>+++ <table class="field-table">+ <thead>+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>log_time</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></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>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></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>-- </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.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</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 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 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 task runs.-PENDING and AVAILABLE task runs are moved to CANCELED synchronously. RUNNING task runs receive-a best-effort cancellation request and may continue running if the request is missed or the-executor does not stop. The response does not report which task runs were actually canceled.-Permissions required: bb.taskRuns.create (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>- </tr>----- <tr>- <td>GetTaskRun</td>- <td>GET</td>- <td>/v1/{name=projects/*/plans/*/rollout/stages/*/tasks/*/taskRuns/*}</td>- <td></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/query_history_service.proto">v1/query_history_service.proto</h2><a href="#title">Top</a>- </div>- <p></p>--- <h3 id="bytebase.v1.GetQueryHistoryRequest">GetQueryHistoryRequest</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 query history to retrieve.-Format: projects/{project}/queryHistories/{id} </p></td>- </tr>-- </tbody>- </table>------ <h3 id="bytebase.v1.ListQueryHistoriesRequest">ListQueryHistoriesRequest</h3>- <p></p>--- <table class="field-table">- <thead>- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>- </thead>- <tbody>-- <tr>- <td>parent</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The parent project whose query histories are listed.-Format: projects/{project}-Use "projects/-" to list query histories across all projects-(https://google.aip.dev/159); this requires the bb.queryHistories.list-permission on the workspace. </p></td>- </tr>-- <tr>- <td>page_size</td>- <td><a href="#int32">int32</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>- </tr>-- <tr>- <td>page_token</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>A page token, received from a previous `ListQueryHistories` call.-Provide this to retrieve the subsequent page. </p></td>- </tr>-- <tr>- <td>filter</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>Filter is the filter to apply on the list query histories.-The syntax and semantics of CEL are documented at https://github.com/google/cel-spec--Supported filter:-- creator: the user full name in "users/{email}" format, support "==" operator.--For example:-creator == "users/{email}" </p></td>- </tr>-- </tbody>- </table>------ <h3 id="bytebase.v1.ListQueryHistoriesResponse">ListQueryHistoriesResponse</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>query_histories</td>- <td><a href="#bytebase.v1.QueryHistory">QueryHistory</a></td>- <td>repeated</td>- <td><p>The list of query histories. </p></td>- </tr>-- <tr>- <td>next_page_token</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>A token to retrieve next page of history.-Pass this value in the page_token field in the subsequent call to-`ListQueryHistories` method to retrieve the next page of history. </p></td>- </tr>-- </tbody>- </table>------ <h3 id="bytebase.v1.QueryHistory">QueryHistory</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 for the query history.-Format: projects/{project}/queryHistories/{id} </p></td>- </tr>-- <tr>- <td>database</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The database name to execute the query.-Format: instances/{instance}/databases/{databaseName} </p></td>- </tr>-- <tr>- <td>creator</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p> </p></td>- </tr>-- <tr>- <td>create_time</td>- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>- <td></td>- <td><p> </p></td>- </tr>-- <tr>- <td>statement</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p> </p></td>- </tr>-- <tr>- <td>error</td>- <td><a href="#string">string</a></td>- <td>optional</td>- <td><p> </p></td>- </tr>-- <tr>- <td>duration</td>- <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>- <td></td>- <td><p> </p></td>- </tr>-- <tr>- <td>type</td>- <td><a href="#bytebase.v1.QueryHistory.Type">QueryHistory.Type</a></td>- <td></td>- <td><p> </p></td>- </tr>-- </tbody>- </table>------ <h3 id="bytebase.v1.SearchQueryHistoriesRequest">SearchQueryHistoriesRequest</h3>- <p></p>--- <table class="field-table">- <thead>- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>- </thead>- <tbody>-- <tr>- <td>parent</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The parent project to search query histories in.-Format: projects/{project}-The AIP-159 wildcard "projects/-" is not supported; use-ListQueryHistories for cross-project reads. </p></td>- </tr>-- <tr>- <td>page_size</td>- <td><a href="#int32">int32</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>- </tr>-- <tr>- <td>page_token</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>- </tr>-- <tr>- <td>filter</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>- </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>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>next_page_token</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>A token to retrieve next page of history.-Pass this value in the page_token field in the subsequent call to-`ListQueryHistory` method to retrieve the next page of history. </p></td>- </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.QueryHistoryService">QueryHistoryService</h3>- <p>QueryHistoryService manages query history records of SQL Editor queries and exports.</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>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>ListQueryHistories</td>- <td><a href="#bytebase.v1.ListQueryHistoriesRequest">ListQueryHistoriesRequest</a></td>- <td><a href="#bytebase.v1.ListQueryHistoriesResponse">ListQueryHistoriesResponse</a></td>- <td><p>ListQueryHistories lists query histories of all users in a project.-Permissions required: bb.queryHistories.list</p></td>- </tr>-- <tr>- <td>GetQueryHistory</td>- <td><a href="#bytebase.v1.GetQueryHistoryRequest">GetQueryHistoryRequest</a></td>- <td><a href="#bytebase.v1.QueryHistory">QueryHistory</a></td>- <td><p>GetQueryHistory gets a single query history for the caller.-Permissions required: None (only returns the caller's own query history)</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>SearchQueryHistories</td>- <td>POST</td>- <td>/v1/{parent=projects/*}/queryHistories:search</td>- <td>*</td>- </tr>----- <tr>- <td>ListQueryHistories</td>- <td>GET</td>- <td>/v1/{parent=projects/*}/queryHistories</td>- <td></td>- </tr>----- <tr>- <td>GetQueryHistory</td>- <td>GET</td>- <td>/v1/{name=projects/*/queryHistories/*}</td>- <td></td>- </tr>--- </tbody>- </table>----- <div class="file-heading">- <h2 id="v1/sql_service.proto">v1/sql_service.proto</h2><a href="#title">Top</a>- </div>- <p></p>--- <h3 id="bytebase.v1.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>name</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The name is the instance name to execute the query against.-Format: instances/{instance}/databases/{databaseName} </p></td>- </tr>-- <tr>- <td>statement</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The SQL statement to execute. </p></td>- </tr>-- <tr>- <td>limit</td>- <td><a href="#int32">int32</a></td>- <td></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>- </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>results</td>- <td><a href="#bytebase.v1.QueryResult">QueryResult</a></td>- <td>repeated</td>- <td><p>The query results. </p></td>- </tr>-- </tbody>- </table>------ <h3 id="bytebase.v1.Advice">Advice</h3>- <p></p>-- <table class="field-table">- <thead>- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>- </thead>- <tbody>-- <tr>- <td>status</td>- <td><a href="#bytebase.v1.Advice.Level">Advice.Level</a></td>- <td></td>- <td><p>The advice level. </p></td>- </tr>-- <tr>- <td>code</td>- <td><a href="#int32">int32</a></td>- <td></td>- <td><p>The advice code. </p></td>- </tr>-- <tr>- <td>title</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The advice title. </p></td>- </tr>-- <tr>- <td>content</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The advice content. </p></td>- </tr>-- <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>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>-- </tbody>- </table>-+ <h3 id="bytebase.v1.TaskRunLogEntry.ComputeDiff">TaskRunLogEntry.ComputeDiff</h3>+ <p>Schema diff computation details.</p>--- <h3 id="bytebase.v1.ExportRequest">ExportRequest</h3>- <p></p>-<table class="field-table"><thead><tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr></thead><tbody>-- <tr>- <td>name</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The name is the resource name to execute the export against.-Format: instances/{instance}/databases/{database}-Format: instances/{instance} </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>start_time</td>+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</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>+ <td><p>When diff computation started. </p></td></tr>-+<tr>- <td>password</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 zip password provide by users. </p></td>+ <td><p>When diff computation ended. </p></td></tr>-+<tr>- <td>data_source_id</td>+ <td>error</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>- </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>Error message if computation failed. </p></td></tr>-+</tbody></table>---- <h3 id="bytebase.v1.ExportResponse">ExportResponse</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>content</td>- <td><a href="#bytes">bytes</a></td>- <td></td>- <td><p>The export file content. </p></td>- </tr>-- <tr>- <td>applied_access_grant</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The just-in-time access grant applied to this export, if any.-Format: projects/{project}/accessGrants/{accessGrant}.-Empty when the user was authorized through normal ACL rather than a grant. </p></td>- </tr>-- </tbody>- </table>---- <h3 id="bytebase.v1.MaskingReason">MaskingReason</h3>- <p></p>+ <h3 id="bytebase.v1.TaskRunLogEntry.DatabaseSync">TaskRunLogEntry.DatabaseSync</h3>+ <p>Database synchronization details.</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_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>start_time</td>+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td><td></td>- <td><p>Additional context (e.g., "Matched global rule: PII Protection"). </p></td>+ <td><p>When the database sync started. </p></td></tr>-+<tr>- <td>classification_level</td>- <td><a href="#int32">int32</a></td>+ <td>end_time</td>+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td><td></td>- <td><p>The classification level that triggered masking. </p></td>+ <td><p>When the database sync ended. </p></td></tr>-+<tr>- <td>semantic_type_icon</td>+ <td>error</td><td><a href="#string">string</a></td><td></td>- <td><p>Icon associated with the semantic type (if any). </p></td>+ <td><p>Error message if sync failed. </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>redis_run_commands_on</td>- <td><a href="#bytebase.v1.QueryOption.RedisRunCommandsOn">QueryOption.RedisRunCommandsOn</a></td>- <td></td>- <td><p> </p></td>- </tr>-- <tr>- <td>mssql_explain_format</td>- <td><a href="#bytebase.v1.QueryOption.MSSQLExplainFormat">QueryOption.MSSQLExplainFormat</a></td>- <td></td>- <td><p> </p></td>- </tr>-- </tbody>- </table>---- <h3 id="bytebase.v1.QueryRequest">QueryRequest</h3>- <p></p>+ <h3 id="bytebase.v1.TaskRunLogEntry.GhostMigration">TaskRunLogEntry.GhostMigration</h3>+ <p>gh-ost migration details.</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 instance name to execute the query against.-Format: instances/{instance}/databases/{databaseName} </p></td>- </tr>-- <tr>- <td>statement</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The SQL statement to execute. </p></td>- </tr>-- <tr>- <td>limit</td>- <td><a href="#int32">int32</a></td>- <td></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>start_time</td>+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</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>+ <td><p>When the gh-ost migration started. </p></td></tr>-+<tr>- <td>explain</td>- <td><a href="#bool">bool</a></td>+ <td>end_time</td>+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td><td></td>- <td><p>Explain the statement. </p></td>+ <td><p>When the gh-ost migration ended. </p></td></tr>-+<tr>- <td>schema</td>+ <td>error</td><td><a href="#string">string</a></td>- <td>optional</td>- <td><p>The default schema to search objects. Equals to the current schema in-Oracle and search path in Postgres. </p></td>- </tr>-- <tr>- <td>query_option</td>- <td><a href="#bytebase.v1.QueryOption">QueryOption</a></td><td></td>- <td><p> </p></td>- </tr>-- <tr>- <td>container</td>- <td><a href="#string">string</a></td>- <td>optional</td>- <td><p>Container is the container name to execute the query against, used for-CosmosDB only. </p></td>+ <td><p>Error message if the gh-ost migration failed. </p></td></tr>-+</tbody></table>---- <h3 id="bytebase.v1.QueryResponse">QueryResponse</h3>- <p></p>-- <table class="field-table">- <thead>- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>- </thead>- <tbody>-- <tr>- <td>results</td>- <td><a href="#bytebase.v1.QueryResult">QueryResult</a></td>- <td>repeated</td>- <td><p>The query results. </p></td>- </tr>-- <tr>- <td>applied_access_grant</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The just-in-time access grant applied to this query, if any.-Format: projects/{project}/accessGrants/{accessGrant}.-Empty when the user was authorized through normal ACL rather than a grant. </p></td>- </tr>-- </tbody>- </table>---- <h3 id="bytebase.v1.QueryResult">QueryResult</h3>- <p></p>+ <h3 id="bytebase.v1.TaskRunLogEntry.PriorBackup">TaskRunLogEntry.PriorBackup</h3>+ <p>Prior backup operation details.</p>+-<table class="field-table"><thead><tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr></thead><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>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>error</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 error message if the query failed. </p></td>+ <td><p>When the backup ended. </p></td></tr>-+<tr>- <td>latency</td>- <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>+ <td>prior_backup_detail</td>+ <td><a href="#bytebase.v1.TaskRunLogEntry.PriorBackup.PriorBackupDetail">TaskRunLogEntry.PriorBackup.PriorBackupDetail</a></td><td></td>- <td><p>The time it takes to execute the query. </p></td>+ <td><p>The backup details. </p></td></tr>-+<tr>- <td>statement</td>+ <td>error</td><td><a href="#string">string</a></td><td></td>- <td><p>The query statement for the result. </p></td>- </tr>-- <tr>- <td>postgres_error</td>- <td><a href="#bytebase.v1.QueryResult.PostgresError">QueryResult.PostgresError</a></td>- <td></td>- <td><p> </p></td>- </tr>-- <tr>- <td>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>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>+ <td><p>Error message if the backup failed. </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>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>- </table>---- <h3 id="bytebase.v1.QueryResult.Message">QueryResult.Message</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"><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.QueryResult.Message.Level">QueryResult.Message.Level</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>+ <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>---- <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.TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item">TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item</h3>+ <p>A single backup table mapping.</p>++<table class="field-table"><thead><tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr></thead><tbody>-+<tr>- <td>severity</td>- <td><a href="#string">string</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>code</td>- <td><a href="#string">string</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>message</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> </p></td>+ <td><p>The start position in the SQL statement. </p></td></tr>-+<tr>- <td>detail</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>+ </table>++++++ <h3 id="bytebase.v1.TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item.Table">TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item.Table</h3>+ <p>Table 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>hint</td>+ <td>database</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>The database information.+Format: instances/{instance}/databases/{database} </p></td></tr>-+<tr>- <td>internal_query</td>+ <td>schema</td><td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>The schema name. </p></td></tr>-+<tr>- <td>where</td>+ <td>table</td><td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>The table name. </p></td></tr>-++ </tbody>+ </table>++++++ <h3 id="bytebase.v1.TaskRunLogEntry.ReleaseFileExecute">TaskRunLogEntry.ReleaseFileExecute</h3>+ <p>Release file execution details.</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_name</td>+ <td>version</td><td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>The version of the file being executed (e.g., "0001"). </p></td></tr>-+<tr>- <td>table_name</td>+ <td>file_path</td><td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>The file path within the release (e.g., "2.2/V0001_create_table.sql"). </p></td></tr>-++ </tbody>+ </table>++++++ <h3 id="bytebase.v1.TaskRunLogEntry.RetryInfo">TaskRunLogEntry.RetryInfo</h3>+ <p>Retry information for failed 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>column_name</td>+ <td>error</td><td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>The error that triggered the retry. </p></td></tr>-+<tr>- <td>data_type_name</td>- <td><a href="#string">string</a></td>+ <td>retry_count</td>+ <td><a href="#int32">int32</a></td><td></td>- <td><p> </p></td>+ <td><p>Current retry attempt number. </p></td></tr>-+<tr>- <td>constraint_name</td>- <td><a href="#string">string</a></td>+ <td>maximum_retries</td>+ <td><a href="#int32">int32</a></td><td></td>- <td><p> </p></td>+ <td><p>Maximum number of retries allowed. </p></td></tr>-++ </tbody>+ </table>++++++ <h3 id="bytebase.v1.TaskRunLogEntry.SchemaDump">TaskRunLogEntry.SchemaDump</h3>+ <p>Schema dump operation details.</p>+++ <table class="field-table">+ <thead>+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>+ </thead>+ <tbody>+<tr>- <td>file</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 schema dump started. </p></td></tr>-+<tr>- <td>line</td>- <td><a href="#int32">int32</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 schema dump ended. </p></td></tr>-+<tr>- <td>routine</td>+ <td>error</td><td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>Error message if the schema dump failed. </p></td></tr>-+</tbody></table>---- <h3 id="bytebase.v1.QueryResult.SyntaxError">QueryResult.SyntaxError</h3>- <p>Syntax error with position information for editor highlighting</p>-+++ <h3 id="bytebase.v1.TaskRunLogEntry.TransactionControl">TaskRunLogEntry.TransactionControl</h3>+ <p>Transaction control operation details.</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>type</td>+ <td><a href="#bytebase.v1.TaskRunLogEntry.TransactionControl.Type">TaskRunLogEntry.TransactionControl.Type</a></td><td></td>- <td><p>Position information for highlighting in editor </p></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></table>---- <h3 id="bytebase.v1.QueryRow">QueryRow</h3>++++ <h3 id="bytebase.v1.TaskRunSession">TaskRunSession</h3><p></p>-+<table class="field-table"><thead><tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr></thead><tbody>-+<tr>- <td>values</td>- <td><a href="#bytebase.v1.RowValue">RowValue</a></td>- <td>repeated</td>- <td><p>Row values of the query result. </p></td>+ <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}/session </p></td></tr>-++ <tr>+ <td>postgres</td>+ <td><a href="#bytebase.v1.TaskRunSession.Postgres">TaskRunSession.Postgres</a></td>+ <td></td>+ <td><p>PostgreSQL session information. </p></td>+ </tr>+</tbody></table>---- <h3 id="bytebase.v1.RowValue">RowValue</h3>- <p></p>-+++ <h3 id="bytebase.v1.TaskRunSession.Postgres">TaskRunSession.Postgres</h3>+ <p>PostgreSQL session 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>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>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>bytes_value</td>- <td><a href="#bytes">bytes</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>double_value</td>- <td><a href="#double">double</a></td>- <td></td>- <td><p> </p></td>+ <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>+ </table>++++++ <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">+ <thead>+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>+ </thead>+ <tbody>+<tr>- <td>float_value</td>- <td><a href="#float">float</a></td>+ <td>pid</td>+ <td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>Process ID of the session. </p></td></tr>-+<tr>- <td>int32_value</td>- <td><a href="#int32">int32</a></td>- <td></td>- <td><p> </p></td>+ <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>int64_value</td>- <td><a href="#int64">int64</a></td>+ <td>query</td>+ <td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>Current query being executed. </p></td></tr>-+<tr>- <td>string_value</td>+ <td>state</td><td><a href="#string">string</a></td>- <td></td>- <td><p> </p></td>+ <td>optional</td>+ <td><p>Session state (active, idle, etc.). </p></td></tr>-+<tr>- <td>uint32_value</td>- <td><a href="#uint32">uint32</a></td>- <td></td>- <td><p> </p></td>+ <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>uint64_value</td>- <td><a href="#uint64">uint64</a></td>- <td></td>- <td><p> </p></td>+ <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>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>+ <td>datname</td>+ <td><a href="#string">string</a></td>+ <td>optional</td>+ <td><p>Database name. </p></td></tr>-+<tr>- <td>timestamp_value</td>- <td><a href="#bytebase.v1.RowValue.Timestamp">RowValue.Timestamp</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>usename</td>+ <td><a href="#string">string</a></td>+ <td>optional</td>+ <td><p>User name. </p></td></tr>-+<tr>- <td>timestamp_tz_value</td>- <td><a href="#bytebase.v1.RowValue.TimestampTZ">RowValue.TimestampTZ</a></td>+ <td>application_name</td>+ <td><a href="#string">string</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>Application name. </p></td></tr>-- </tbody>- </table>------ <h3 id="bytebase.v1.RowValue.Timestamp">RowValue.Timestamp</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>google_timestamp</td>- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</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>accuracy</td>- <td><a href="#int32">int32</a></td>- <td></td>- <td><p>The accuracy is the number of digits after the decimal point. </p></td>+ <td>client_port</td>+ <td><a href="#string">string</a></td>+ <td>optional</td>+ <td><p>Client port number. </p></td></tr>-- </tbody>- </table>------ <h3 id="bytebase.v1.RowValue.TimestampTZ">RowValue.TimestampTZ</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>google_timestamp</td>+ <td>backend_start</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>+ <td><p>When the backend process started. </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>+ <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>accuracy</td>- <td><a href="#int32">int32</a></td>- <td></td>- <td><p> </p></td>+ <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></table>----- <h3 id="bytebase.v1.Advice.Level">Advice.Level</h3>- <p>Level represents the severity level of the advice.</p>+++++ <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>ADVICE_LEVEL_UNSPECIFIED</td>+ <td>STATUS_UNSPECIFIED</td><td>0</td>- <td><p>Unspecified advice level.</p></td>+ <td><p>Unspecified status.</p></td></tr>-+<tr>- <td>SUCCESS</td>+ <td>NOT_STARTED</td><td>1</td>- <td><p>Success status indicating the check passed without issues.</p></td>+ <td><p>Task has not started and is awaiting its turn in the deployment sequence.</p></td></tr>-+<tr>- <td>WARNING</td>+ <td>PENDING</td><td>2</td>- <td><p>Warning status indicating potential issues that should be reviewed.</p></td>+ <td><p>Task is ready to run and waiting for approval or scheduled time.</p></td></tr>-+<tr>- <td>ERROR</td>+ <td>RUNNING</td><td>3</td>- <td><p>Error status indicating critical issues that must be addressed.</p></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.Advice.RuleType">Advice.RuleType</h3>- <p>RuleType indicates the source of the linting rule.</p>++ <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>RULE_TYPE_UNSPECIFIED</td>+ <td>TYPE_UNSPECIFIED</td><td>0</td>- <td><p>Unspecified rule type.</p></td>+ <td><p>Unspecified task type.</p></td></tr>-+<tr>- <td>PARSER_BASED</td>+ <td>GENERAL</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>+ <td><p>General task for miscellaneous operations.</p></td></tr>-+<tr>- <td>AI_POWERED</td>+ <td>DATABASE_CREATE</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>+ <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></tbody></table>- <h3 id="bytebase.v1.QueryOption.MSSQLExplainFormat">QueryOption.MSSQLExplainFormat</h3>+ <h3 id="bytebase.v1.TaskRun.Status">TaskRun.Status</h3><p></p><table class="enum-table"><thead>@@ -8527,57 +8049,52 @@ These are custom, flexible checks powered by AI models.</p></td><tbody><tr>- <td>MSSQL_EXPLAIN_FORMAT_UNSPECIFIED</td>+ <td>STATUS_UNSPECIFIED</td><td>0</td>- <td><p>defaults to SHOWPLAN_ALL</p></td>+ <td><p>Unspecified status.</p></td></tr><tr>- <td>MSSQL_EXPLAIN_FORMAT_ALL</td>+ <td>PENDING</td><td>1</td>- <td><p>SHOWPLAN_ALL</p></td>+ <td><p>Task run is queued and waiting to start execution.</p></td></tr><tr>- <td>MSSQL_EXPLAIN_FORMAT_XML</td>+ <td>RUNNING</td><td>2</td>- <td><p>SHOWPLAN_XML</p></td>+ <td><p>Task run is currently executing.</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>DONE</td>+ <td>3</td>+ <td><p>Task run completed successfully.</p></td>+ </tr><tr>- <td>REDIS_RUN_COMMANDS_ON_UNSPECIFIED</td>- <td>0</td>- <td><p>UNSPECIFIED defaults to SINGLE_NODE.</p></td>+ <td>FAILED</td>+ <td>4</td>+ <td><p>Task run execution failed with errors.</p></td></tr><tr>- <td>SINGLE_NODE</td>- <td>1</td>- <td><p>Execute Redis commands on a single node in the cluster.</p></td>+ <td>CANCELED</td>+ <td>5</td>+ <td><p>Task run execution was canceled by a user.</p></td></tr><tr>- <td>ALL_NODES</td>- <td>2</td>- <td><p>Execute Redis commands on all nodes in the cluster for cluster-wide operations.</p></td>+ <td>AVAILABLE</td>+ <td>6</td>+ <td><p>Task run is ready for immediate execution.</p></td></tr></tbody></table>- <h3 id="bytebase.v1.QueryResult.CommandError.Type">QueryResult.CommandError.Type</h3>- <p></p>+ <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>@@ -8587,186 +8104,210 @@ These are custom, flexible checks powered by AI models.</p></td><tr><td>TYPE_UNSPECIFIED</td><td>0</td>- <td><p></p></td>+ <td><p>Unspecified type.</p></td></tr><tr>- <td>DDL</td>+ <td>BEGIN</td><td>1</td>- <td><p></p></td>+ <td><p>Begin transaction.</p></td></tr><tr>- <td>DML</td>+ <td>COMMIT</td><td>2</td>- <td><p></p></td>+ <td><p>Commit transaction.</p></td></tr><tr>- <td>NON_READ_ONLY</td>+ <td>ROLLBACK</td><td>3</td>- <td><p></p></td>+ <td><p>Rollback transaction.</p></td></tr></tbody></table>-- <h3 id="bytebase.v1.QueryResult.Message.Level">QueryResult.Message.Level</h3>- <p></p>++ <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>LEVEL_UNSPECIFIED</td>+ <td>TYPE_UNSPECIFIED</td><td>0</td>- <td><p>Unspecified message level.</p></td>+ <td><p>Unspecified type.</p></td></tr><tr>- <td>INFO</td>+ <td>SCHEMA_DUMP</td><td>1</td>- <td><p>Informational message.</p></td>+ <td><p>Schema dump operation.</p></td></tr><tr>- <td>WARNING</td>+ <td>COMMAND_EXECUTE</td><td>2</td>- <td><p>Warning message indicating potential issues.</p></td>+ <td><p>Command execution.</p></td></tr><tr>- <td>DEBUG</td>+ <td>DATABASE_SYNC</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>+ <td><p>Database synchronization.</p></td></tr><tr>- <td>NOTICE</td>+ <td>TRANSACTION_CONTROL</td><td>5</td>- <td><p>Notice message for important information.</p></td>+ <td><p>Transaction control (BEGIN, COMMIT, ROLLBACK).</p></td></tr><tr>- <td>EXCEPTION</td>+ <td>PRIOR_BACKUP</td><td>6</td>- <td><p>Exception message indicating error conditions.</p></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.SQLService">SQLService</h3>- <p>SQLService executes SQL queries and manages query operations.</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>Query</td>- <td><a href="#bytebase.v1.QueryRequest">QueryRequest</a></td>- <td><a href="#bytebase.v1.QueryResponse">QueryResponse</a></td>- <td><p>Executes a read-only SQL query against a database.-Permissions required: bb.databases.get</p></td>+ <td>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>AdminExecute</td>- <td><a href="#bytebase.v1.AdminExecuteRequest">AdminExecuteRequest</a> stream</td>- <td><a href="#bytebase.v1.AdminExecuteResponse">AdminExecuteResponse</a> stream</td>- <td><p>Executes SQL with admin privileges via streaming connection.-Permissions required: bb.sql.admin</p></td>+ <td>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>SearchQueryHistories</td>- <td><a href="#bytebase.v1.SearchQueryHistoriesRequest">SearchQueryHistoriesRequest</a></td>- <td><a href="#bytebase.v1.SearchQueryHistoriesResponse">SearchQueryHistoriesResponse</a></td>- <td><p>Deprecated: use QueryHistoryService.SearchQueryHistories instead.-Delegating alias kept for upgrade transition; will be removed in a future release.-No HTTP binding: the REST route is served by QueryHistoryService.-Permissions required: None (only returns caller's own query histories)</p></td>+ <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</p></td></tr>-+<tr>- <td>ListQueryHistories</td>- <td><a href="#bytebase.v1.ListQueryHistoriesRequest">ListQueryHistoriesRequest</a></td>- <td><a href="#bytebase.v1.ListQueryHistoriesResponse">ListQueryHistoriesResponse</a></td>- <td><p>Deprecated: use QueryHistoryService.ListQueryHistories instead.-Delegating alias kept for upgrade transition; will be removed in a future release.-No HTTP binding: the REST route is served by QueryHistoryService.-Permissions required: bb.queryHistories.list</p></td>+ <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>GetQueryHistory</td>- <td><a href="#bytebase.v1.GetQueryHistoryRequest">GetQueryHistoryRequest</a></td>- <td><a href="#bytebase.v1.QueryHistory">QueryHistory</a></td>- <td><p>Deprecated: use QueryHistoryService.GetQueryHistory instead.-Delegating alias kept for upgrade transition; will be removed in a future release.-No HTTP binding: the REST route is served by QueryHistoryService.-Permissions required: None (only returns the caller's own query history)</p></td>+ <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>Export</td>- <td><a href="#bytebase.v1.ExportRequest">ExportRequest</a></td>- <td><a href="#bytebase.v1.ExportResponse">ExportResponse</a></td>- <td><p>Exports query results to a file format.-Permissions required: bb.databases.get</p></td>+ <td>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>-- </tbody>- </table>---- <h4>Methods with deprecated option</h4>- <table>- <thead><tr>- <td>Method Name</td>- <td>Option</td>+ <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>- </thead>- <tbody>-+<tr>- <td>SearchQueryHistories</td>- <td><p>true</p></td>+ <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 user with rollout policy role for the environment)</p></td></tr>-+<tr>- <td>ListQueryHistories</td>- <td><p>true</p></td>+ <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 user with rollout policy role for the environment)</p></td></tr>-+<tr>- <td>GetQueryHistory</td>- <td><p>true</p></td>+ <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 task runs.+PENDING and AVAILABLE task runs are moved to CANCELED synchronously. RUNNING task runs receive+a best-effort cancellation request and may continue running if the request is missed or the+executor does not stop. The response does not report which task runs were actually canceled.+Permissions required: bb.taskRuns.create (or user with rollout policy role for the environment)</p></td></tr>-- </tbody>- </table>-++ <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>@@ -8778,139 +8319,130 @@ Permissions required: bb.databases.get</p></td></tr></thead><tbody>-+<tr>- <td>Query</td>- <td>POST</td>- <td>/v1/{name=instances/*/databases/*}:query</td>- <td>*</td>+ <td>GetRollout</td>+ <td>GET</td>+ <td>/v1/{name=projects/*/plans/*/rollout}</td>+ <td></td></tr>-+<tr>- <td>AdminExecute</td>+ <td>ListRollouts</td><td>GET</td>- <td>/v1:adminExecute</td>+ <td>/v1/{parent=projects/*}/rollouts</td><td></td></tr>-+<tr>- <td>Export</td>+ <td>CreateRollout</td><td>POST</td>- <td>/v1/{name=instances/*/databases/*}:export</td>+ <td>/v1/{parent=projects/*/plans/*}/rollout</td><td>*</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>- <p></p>+++ <tr>+ <td>ListTaskRuns</td>+ <td>GET</td>+ <td>/v1/{parent=projects/*/plans/*/rollout/stages/*/tasks/*}/taskRuns</td>+ <td></td>+ </tr>+-- <table class="field-table">- <thead>- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>- </thead>- <tbody>- <tr>- <td>name</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The name of the plan check run to cancel.-Format: projects/{project}/plans/{plan}/planCheckRun </p></td>- </tr>- </tbody>- </table>+ <tr>+ <td>GetTaskRun</td>+ <td>GET</td>+ <td>/v1/{name=projects/*/plans/*/rollout/stages/*/tasks/*/taskRuns/*}</td>+ <td></td>+ </tr>---- <h3 id="bytebase.v1.CancelPlanCheckRunResponse">CancelPlanCheckRunResponse</h3>- <p></p>---- <h3 id="bytebase.v1.CreatePlanRequest">CreatePlanRequest</h3>- <p></p>+ <tr>+ <td>GetTaskRunLog</td>+ <td>GET</td>+ <td>/v1/{parent=projects/*/plans/*/rollout/stages/*/tasks/*/taskRuns/*}/log</td>+ <td></td>+ </tr>+-- <table class="field-table">- <thead>- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>- </thead>- <tbody>- <tr>- <td>parent</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The parent project where this plan will be created.-Format: projects/{project} </p></td>- </tr>- <tr>- <td>plan</td>- <td><a href="#bytebase.v1.Plan">Plan</a></td>- <td></td>- <td><p>The plan to create. </p></td>- </tr>+ <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>+++- </tbody>- </table>+ <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>---- <h3 id="bytebase.v1.GetPlanCheckRunRequest">GetPlanCheckRunRequest</h3>- <p></p>-- <table class="field-table">- <thead>- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>- </thead>- <tbody>-- <tr>- <td>name</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The name of the plan check run to retrieve.-Format: projects/{project}/plans/{plan}/planCheckRun </p></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>--+- <h3 id="bytebase.v1.GetPlanRequest">GetPlanRequest</h3>+ <div class="file-heading">+ <h2 id="v1/query_history_service.proto">v1/query_history_service.proto</h2><a href="#title">Top</a>+ </div>+ <p></p>+++ <h3 id="bytebase.v1.GetQueryHistoryRequest">GetQueryHistoryRequest</h3><p></p>@@ -8924,8 +8456,8 @@ Format: projects/{project}/plans/{plan}/planCheckRun </p></td><td>name</td><td><a href="#string">string</a></td><td></td>- <td><p>The name of the plan to retrieve.-Format: projects/{project}/plans/{plan} </p></td>+ <td><p>The name of the query history to retrieve.+Format: projects/{project}/queryHistories/{id} </p></td></tr></tbody>@@ -8935,7 +8467,7 @@ Format: projects/{project}/plans/{plan} </p></td>- <h3 id="bytebase.v1.ListPlansRequest">ListPlansRequest</h3>+ <h3 id="bytebase.v1.ListQueryHistoriesRequest">ListQueryHistoriesRequest</h3><p></p>@@ -8949,18 +8481,20 @@ Format: projects/{project}/plans/{plan} </p></td><td>parent</td><td><a href="#string">string</a></td><td></td>- <td><p>The parent, which owns this collection of plans.+ <td><p>The parent project whose query histories are listed.Format: projects/{project}-Use "projects/-" to list all plans from all projects. </p></td>+Use "projects/-" to list query histories across all projects+(https://google.aip.dev/159); this requires the bb.queryHistories.list+permission on the workspace. </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.+ <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>@@ -8968,34 +8502,22 @@ The maximum value is 1000; values above 1000 will be coerced to 1000. </p></td><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>+ <td><p>A page token, received from a previous `ListQueryHistories` call.+Provide this to retrieve the subsequent page. </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.+ <td><p>Filter is the filter to apply on the list query histories.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".-- 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" or "change_database_config".-- state: the plan state, support "==" operator, the value should be "ACTIVE" or "DELETED".+Supported filter:+- creator: the user full name in "users/{email}" format, support "==" operator.For example:-creator == "users/[email protected]" && create_time >= "2025-01-02T15:04:05Z07:00"-title == "My Plan"-title.contains("database migration")-spec_type == "change_database_config"-state == "ACTIVE" </p></td>+creator == "users/{email}" </p></td></tr></tbody>@@ -9005,7 +8527,7 @@ state == "ACTIVE" </p></td>- <h3 id="bytebase.v1.ListPlansResponse">ListPlansResponse</h3>+ <h3 id="bytebase.v1.ListQueryHistoriesResponse">ListQueryHistoriesResponse</h3><p></p>@@ -9016,18 +8538,19 @@ state == "ACTIVE" </p></td><tbody><tr>- <td>plans</td>- <td><a href="#bytebase.v1.Plan">Plan</a></td>+ <td>query_histories</td>+ <td><a href="#bytebase.v1.QueryHistory">QueryHistory</a></td><td>repeated</td>- <td><p>The plans from the specified request. </p></td>+ <td><p>The list of query histories. </p></td></tr>-+<tr><td>next_page_token</td><td><a href="#string">string</a></td><td></td>- <td><p>A token, which can be sent as `page_token` to retrieve the next page.-If this field is omitted, there are no subsequent pages. </p></td>+ <td><p>A token to retrieve next page of history.+Pass this value in the page_token field in the subsequent call to+`ListQueryHistories` method to retrieve the next page of history. </p></td></tr></tbody>@@ -9037,7 +8560,7 @@ If this field is omitted, there are no subsequent pages. </p></td>- <h3 id="bytebase.v1.Plan">Plan</h3>+ <h3 id="bytebase.v1.QueryHistory">QueryHistory</h3><p></p>@@ -9051,53 +8574,23 @@ If this field is omitted, there are no subsequent pages. </p></td><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>+ <td><p>The name for the query history.+Format: projects/{project}/queryHistories/{id} </p></td></tr><tr>- <td>description</td>+ <td>database</td><td><a href="#string">string</a></td><td></td>- <td><p>The description of the plan. </p></td>- </tr>-- <tr>- <td>specs</td>- <td><a href="#bytebase.v1.Plan.Spec">Plan.Spec</a></td>- <td>repeated</td>- <td><p>The deployment specs for the plan. </p></td>+ <td><p>The database name to execute the query.+Format: instances/{instance}/databases/{databaseName} </p></td></tr><tr><td>creator</td><td><a href="#string">string</a></td><td></td>- <td><p>Format: users/[email protected] </p></td>+ <td><p> </p></td></tr><tr>@@ -9108,53 +8601,31 @@ Format: projects/{project}/issues/{issue} </p></td></tr><tr>- <td>update_time</td>- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>+ <td>statement</td>+ <td><a href="#string">string</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>error</td>+ <td><a href="#string">string</a></td>+ <td>optional</td>+ <td><p> </p></td></tr><tr>- <td>approval_status</td>- <td><a href="#bytebase.v1.ApprovalStatus">ApprovalStatus</a></td>+ <td>duration</td>+ <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td><td></td>- <td><p>The approval status of the linked issue.-Unspecified when no linked issue exists or the linked issue is a draft. </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><p> </p></td></tr><tr>- <td>issue_status</td>- <td><a href="#bytebase.v1.IssueStatus">IssueStatus</a></td>+ <td>type</td>+ <td><a href="#bytebase.v1.QueryHistory.Type">QueryHistory.Type</a></td><td></td>- <td><p>The lifecycle status of the linked issue.-Unspecified when no linked issue exists. </p></td>+ <td><p> </p></td></tr></tbody>@@ -9164,7 +8635,7 @@ Unspecified when no linked issue exists. </p></td>- <h3 id="bytebase.v1.Plan.ChangeDatabaseConfig">Plan.ChangeDatabaseConfig</h3>+ <h3 id="bytebase.v1.SearchQueryHistoriesRequest">SearchQueryHistoriesRequest</h3><p></p>@@ -9175,35 +8646,55 @@ Unspecified when no linked issue exists. </p></td><tbody><tr>- <td>targets</td>+ <td>parent</td><td><a href="#string">string</a></td>- <td>repeated</td>- <td><p>The list of targets.-Multi-database format: [instances/{instance-id}/databases/{database-name}].-Single database group format: [projects/{project}/databaseGroups/{databaseGroup}]. </p></td>+ <td></td>+ <td><p>The parent project to search query histories in.+Format: projects/{project}+The AIP-159 wildcard "projects/-" is not supported; use+ListQueryHistories for cross-project reads. </p></td></tr>-+<tr>- <td>sheet</td>- <td><a href="#string">string</a></td>+ <td>page_size</td>+ <td><a href="#int32">int32</a></td><td></td>- <td><p>The resource name of the sheet.-Format: projects/{project}/sheets/{sheet} </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>release</td>+ <td>page_token</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>+ <td><p>A page token, received from a previous `ListQueryHistory` call.+Provide this to retrieve the subsequent page. </p></td></tr>-+<tr>- <td>enable_prior_backup</td>- <td><a href="#bool">bool</a></td>+ <td>filter</td>+ <td><a href="#string">string</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>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>@@ -9213,7 +8704,7 @@ Format: projects/{project}/releases/{release} </p></td>- <h3 id="bytebase.v1.Plan.CreateDatabaseConfig">Plan.CreateDatabaseConfig</h3>+ <h3 id="bytebase.v1.SearchQueryHistoriesResponse">SearchQueryHistoriesResponse</h3><p></p>@@ -9224,62 +8715,19 @@ 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><a href="#string">string</a></td>- <td></td>- <td><p>character_set is the character set of the database. </p></td>- </tr>-- <tr>- <td>collation</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>collation is the collation of the database. </p></td>- </tr>-- <tr>- <td>cluster</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>cluster is the cluster of the database. This is only applicable to ClickHouse for "ON CLUSTER <<cluster>>". </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>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>environment</td>+ <td>next_page_token</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><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>@@ -9289,191 +8737,280 @@ Format: environments/prod where prod is the environment resource ID. </p></td>- <h3 id="bytebase.v1.Plan.PlanCheckRunStatusCountEntry">Plan.PlanCheckRunStatusCountEntry</h3>+++ <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.QueryHistoryService">QueryHistoryService</h3>+ <p>QueryHistoryService manages query history records of SQL Editor queries and exports.</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>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>ListQueryHistories</td>+ <td><a href="#bytebase.v1.ListQueryHistoriesRequest">ListQueryHistoriesRequest</a></td>+ <td><a href="#bytebase.v1.ListQueryHistoriesResponse">ListQueryHistoriesResponse</a></td>+ <td><p>ListQueryHistories lists query histories of all users in a project.+Permissions required: bb.queryHistories.list</p></td>+ </tr>++ <tr>+ <td>GetQueryHistory</td>+ <td><a href="#bytebase.v1.GetQueryHistoryRequest">GetQueryHistoryRequest</a></td>+ <td><a href="#bytebase.v1.QueryHistory">QueryHistory</a></td>+ <td><p>GetQueryHistory gets a single query history for the caller.+Permissions required: None (only returns the caller's own query history)</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>key</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p> </p></td>- </tr>- <tr>- <td>value</td>- <td><a href="#int32">int32</a></td>- <td></td>- <td><p> </p></td>- </tr>+ <tr>+ <td>SearchQueryHistories</td>+ <td>POST</td>+ <td>/v1/{parent=projects/*}/queryHistories:search</td>+ <td>*</td>+ </tr>+++++ <tr>+ <td>ListQueryHistories</td>+ <td>GET</td>+ <td>/v1/{parent=projects/*}/queryHistories</td>+ <td></td>+ </tr>++++ <tr>+ <td>GetQueryHistory</td>+ <td>GET</td>+ <td>/v1/{name=projects/*/queryHistories/*}</td>+ <td></td>+ </tr>++</tbody></table>--+- <h3 id="bytebase.v1.Plan.RolloutStageSummary">Plan.RolloutStageSummary</h3>+ <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.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>stage</td>+ <td>name</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>repeated</td>- <td><p>Task status counts for this stage. </p></td>+ <td><p>The name is the instance name to execute the query against.+Format: instances/{instance}/databases/{databaseName} </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>id</td>+ <td>statement</td><td><a href="#string">string</a></td><td></td>- <td><p>A UUID4 string that uniquely identifies the Spec. </p></td>+ <td><p>The SQL statement to execute. </p></td></tr>-+<tr>- <td>create_database_config</td>- <td><a href="#bytebase.v1.Plan.CreateDatabaseConfig">Plan.CreateDatabaseConfig</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>change_database_config</td>- <td><a href="#bytebase.v1.Plan.ChangeDatabaseConfig">Plan.ChangeDatabaseConfig</a></td>- <td></td>- <td><p> </p></td>+ <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></tr>-+</tbody></table>---- <h3 id="bytebase.v1.Plan.TaskStatusCount">Plan.TaskStatusCount</h3>++++ <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>status</td>- <td><a href="#bytebase.v1.Task.Status">Task.Status</a></td>- <td></td>- <td><p>The task status. </p></td>- </tr>-+<tr>- <td>count</td>- <td><a href="#int32">int32</a></td>- <td></td>- <td><p>The number of tasks in the status. </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></table>---- <h3 id="bytebase.v1.PlanCheckRun">PlanCheckRun</h3>++++ <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>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>Format: projects/{project}/plans/{plan}/planCheckRun </p></td>+ <td><p>The advice level. </p></td></tr>-+<tr>- <td>status</td>- <td><a href="#bytebase.v1.PlanCheckRun.Status">PlanCheckRun.Status</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>results</td>- <td><a href="#bytebase.v1.PlanCheckRun.Result">PlanCheckRun.Result</a></td>- <td>repeated</td>- <td><p> </p></td>+ <td>title</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The advice title. </p></td></tr>-+<tr>- <td>error</td>+ <td>content</td><td><a href="#string">string</a></td><td></td>- <td><p>error is set if the Status is FAILED. </p></td>+ <td><p>The advice content. </p></td></tr>-+<tr>- <td>create_time</td>- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>+ <td>start_position</td>+ <td><a href="#bytebase.v1.Position">Position</a></td>+ <td></td>+ <td><p>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>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>+</tbody></table>---- <h3 id="bytebase.v1.PlanCheckRun.Result">PlanCheckRun.Result</h3>++++ <h3 id="bytebase.v1.ExportRequest">ExportRequest</h3><p></p>@@ -9484,91 +9021,75 @@ 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>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} </p></td></tr>-+<tr>- <td>content</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>code</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>target</td>- <td><a href="#string">string</a></td>+ <td>format</td>+ <td><a href="#bytebase.v1.ExportFormat">ExportFormat</a></td><td></td>- <td><p>Target identification for consolidated results.-Format: instances/{instance}/databases/{database} </p></td>+ <td><p>The export format. </p></td></tr>-+<tr>- <td>type</td>- <td><a href="#bytebase.v1.PlanCheckRun.Result.Type">PlanCheckRun.Result.Type</a></td>+ <td>admin</td>+ <td><a href="#bool">bool</a></td><td></td>- <td><p> </p></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>sql_summary_report</td>- <td><a href="#bytebase.v1.PlanCheckRun.Result.SqlSummaryReport">PlanCheckRun.Result.SqlSummaryReport</a></td>+ <td>password</td>+ <td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>The zip password provide by users. </p></td></tr>-+<tr>- <td>sql_review_report</td>- <td><a href="#bytebase.v1.PlanCheckRun.Result.SqlReviewReport">PlanCheckRun.Result.SqlReviewReport</a></td>+ <td>data_source_id</td>+ <td><a href="#string">string</a></td><td></td>- <td><p> </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>-- </tbody>- </table>------ <h3 id="bytebase.v1.PlanCheckRun.Result.SqlReviewReport">PlanCheckRun.Result.SqlReviewReport</h3>- <p></p>-- <table class="field-table">- <thead>- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>- </thead>- <tbody>-<tr>- <td>start_position</td>- <td><a href="#bytebase.v1.Position">Position</a></td>- <td></td>- <td><p>Position of the SQL statement. </p></td>+ <td>schema</td>+ <td><a href="#string">string</a></td>+ <td>optional</td>+ <td><p>The default schema to search objects. Equals to the current schema in+Oracle and search path in Postgres. </p></td></tr>-+<tr>- <td>end_position</td>- <td><a href="#bytebase.v1.Position">Position</a></td>- <td></td>- <td><p> </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>@@ -9578,7 +9099,7 @@ Format: instances/{instance}/databases/{database} </p></td>- <h3 id="bytebase.v1.PlanCheckRun.Result.SqlSummaryReport">PlanCheckRun.Result.SqlSummaryReport</h3>+ <h3 id="bytebase.v1.ExportResponse">ExportResponse</h3><p></p>@@ -9589,17 +9110,19 @@ Format: instances/{instance}/databases/{database} </p></td><tbody><tr>- <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>+ <td>content</td>+ <td><a href="#bytes">bytes</a></td>+ <td></td>+ <td><p>The export file content. </p></td></tr><tr>- <td>affected_rows</td>- <td><a href="#int64">int64</a></td>+ <td>applied_access_grant</td>+ <td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>The just-in-time access grant applied to this export, if any.+Format: projects/{project}/accessGrants/{accessGrant}.+Empty when the user was authorized through normal ACL rather than a grant. </p></td></tr></tbody>@@ -9609,7 +9132,7 @@ Format: instances/{instance}/databases/{database} </p></td>- <h3 id="bytebase.v1.RunPlanChecksRequest">RunPlanChecksRequest</h3>+ <h3 id="bytebase.v1.MaskingReason">MaskingReason</h3><p></p>@@ -9620,326 +9143,173 @@ Format: instances/{instance}/databases/{database} </p></td><tbody><tr>- <td>name</td>+ <td>semantic_type_id</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>The semantic type that triggered masking (e.g., "SSN", "email", "phone"). </p></td></tr>-+<tr>- <td>spec_id</td>+ <td>semantic_type_title</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>Human-readable semantic type title. </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>plan</td>- <td><a href="#bytebase.v1.Plan">Plan</a></td>+ <td>masking_rule_id</td>+ <td><a href="#string">string</a></td><td></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>+ <td><p>The masking rule ID that matched (if applicable). </p></td></tr>-+<tr>- <td>update_mask</td>- <td><a href="#google.protobuf.FieldMask">google.protobuf.FieldMask</a></td>+ <td>algorithm</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>The list of fields to update. </p></td>+ <td><p>The masking algorithm used. </p></td></tr>-+<tr>- <td>allow_missing</td>- <td><a href="#bool">bool</a></td>+ <td>context</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>If set to true, and the plan is not found, a new plan will be created.-In this situation, `update_mask` is ignored. </p></td>+ <td><p>Additional context (e.g., "Matched global rule: PII Protection"). </p></td></tr>-- </tbody>- </table>-------- <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>---- <h4>Methods with HTTP bindings</h4>- <table>- <thead>- <tr>- <td>Method Name</td>- <td>Method</td>- <td>Pattern</td>- <td>Body</td>- </tr>- </thead>- <tbody>---- <tr>- <td>GetPlan</td>- <td>GET</td>- <td>/v1/{name=projects/*/plans/*}</td>- <td></td>- </tr>----- <tr>- <td>ListPlans</td>- <td>GET</td>- <td>/v1/{parent=projects/*}/plans</td>- <td></td>- </tr>----- <tr>- <td>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>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><a href="#string">string</a></td>+ <td></td>+ <td><p>Icon associated with the semantic type (if any). </p></td>+ </tr>- <tr>- <td>GetPlanCheckRun</td>- <td>GET</td>- <td>/v1/{name=projects/*/plans/*/planCheckRun}</td>- <td></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>redis_run_commands_on</td>+ <td><a href="#bytebase.v1.QueryOption.RedisRunCommandsOn">QueryOption.RedisRunCommandsOn</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>mssql_explain_format</td>+ <td><a href="#bytebase.v1.QueryOption.MSSQLExplainFormat">QueryOption.MSSQLExplainFormat</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>+ </tbody>+ </table>++++++ <h3 id="bytebase.v1.QueryRequest">QueryRequest</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>RunPlanChecks</td>- <td>POST</td>- <td>/v1/{name=projects/*/plans/*}:runPlanChecks</td>- <td>*</td>- </tr>+ <tr>+ <td>name</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The name is the instance name to execute the query against.+Format: instances/{instance}/databases/{databaseName} </p></td>+ </tr>-+ <tr>+ <td>statement</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The SQL statement to execute. </p></td>+ </tr>++ <tr>+ <td>limit</td>+ <td><a href="#int32">int32</a></td>+ <td></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>CancelPlanCheckRun</td>- <td>POST</td>- <td>/v1/{name=projects/*/plans/*/planCheckRun}:cancel</td>- <td>*</td>- </tr>+ <tr>+ <td>explain</td>+ <td><a href="#bool">bool</a></td>+ <td></td>+ <td><p>Explain the statement. </p></td>+ </tr>++ <tr>+ <td>schema</td>+ <td><a href="#string">string</a></td>+ <td>optional</td>+ <td><p>The default schema to search objects. Equals to the current schema in+Oracle and search path in Postgres. </p></td>+ </tr>++ <tr>+ <td>query_option</td>+ <td><a href="#bytebase.v1.QueryOption">QueryOption</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>container</td>+ <td><a href="#string">string</a></td>+ <td>optional</td>+ <td><p>Container is the container name to execute the query against, used for+CosmosDB only. </p></td>+ </tr>-</tbody></table>+---- <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>+ <h3 id="bytebase.v1.QueryResponse">QueryResponse</h3><p></p>@@ -9950,10 +9320,19 @@ Permissions required: bb.planCheckRuns.run</p></td><tbody><tr>- <td>roles</td>- <td><a href="#string">string</a></td>+ <td>results</td>+ <td><a href="#bytebase.v1.QueryResult">QueryResult</a></td><td>repeated</td>- <td><p>The roles required for approval in order. </p></td>+ <td><p>The query results. </p></td>+ </tr>++ <tr>+ <td>applied_access_grant</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The just-in-time access grant applied to this query, if any.+Format: projects/{project}/accessGrants/{accessGrant}.+Empty when the user was authorized through normal ACL rather than a grant. </p></td></tr></tbody>@@ -9963,7 +9342,7 @@ Permissions required: bb.planCheckRuns.run</p></td>- <h3 id="bytebase.v1.ApprovalTemplate">ApprovalTemplate</h3>+ <h3 id="bytebase.v1.QueryResult">QueryResult</h3><p></p>@@ -9974,24 +9353,120 @@ Permissions required: bb.planCheckRuns.run</p></td><tbody><tr>- <td>flow</td>- <td><a href="#bytebase.v1.ApprovalFlow">ApprovalFlow</a></td>+ <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></td>- <td><p>The approval flow definition. </p></td>+ <td><p> </p></td></tr><tr>- <td>title</td>+ <td>error</td><td><a href="#string">string</a></td><td></td>- <td><p>The title of the approval template. </p></td>+ <td><p>The error message if the query failed. </p></td></tr><tr>- <td>description</td>+ <td>latency</td>+ <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>+ <td></td>+ <td><p>The time it takes to execute the query. </p></td>+ </tr>++ <tr>+ <td>statement</td><td><a href="#string">string</a></td><td></td>- <td><p>The description of the approval template. </p></td>+ <td><p>The query statement for the result. </p></td>+ </tr>++ <tr>+ <td>postgres_error</td>+ <td><a href="#bytebase.v1.QueryResult.PostgresError">QueryResult.PostgresError</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>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>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>++ </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>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>@@ -10001,7 +9476,7 @@ Permissions required: bb.planCheckRuns.run</p></td>- <h3 id="bytebase.v1.ApproveIssueRequest">ApproveIssueRequest</h3>+ <h3 id="bytebase.v1.QueryResult.Message">QueryResult.Message</h3><p></p>@@ -10012,18 +9487,17 @@ Permissions required: bb.planCheckRuns.run</p></td><tbody><tr>- <td>name</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>The name of the issue to add an approver.-Format: projects/{project}/issues/{issue} </p></td>+ <td><p> </p></td></tr><tr>- <td>comment</td>+ <td>content</td><td><a href="#string">string</a></td><td></td>- <td><p>The comment explaining the approval decision. </p></td>+ <td><p> </p></td></tr></tbody>@@ -10033,8 +9507,8 @@ Format: projects/{project}/issues/{issue} </p></td>- <h3 id="bytebase.v1.BatchUpdateIssuesStatusRequest">BatchUpdateIssuesStatusRequest</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">@@ -10044,35 +9518,122 @@ Format: projects/{project}/issues/{issue} </p></td><tbody><tr>- <td>parent</td>+ <td>severity</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>+ <td><p> </p></td></tr><tr>- <td>issues</td>+ <td>code</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>+ <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><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>status</td>- <td><a href="#bytebase.v1.IssueStatus">IssueStatus</a></td>+ <td>internal_position</td>+ <td><a href="#int32">int32</a></td><td></td>- <td><p>The new status. </p></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>internal_query</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p> </p></td></tr><tr>- <td>reason</td>+ <td>where</td><td><a href="#string">string</a></td><td></td>- <td><p>The reason for the status change. </p></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>schema_name</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>table_name</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>column_name</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>data_type_name</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>constraint_name</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>file</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>line</td>+ <td><a href="#int32">int32</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>routine</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p> </p></td></tr></tbody>@@ -10082,14 +9643,31 @@ Format: projects/{project}/issues/{issue} </p></td>- <h3 id="bytebase.v1.BatchUpdateIssuesStatusResponse">BatchUpdateIssuesStatusResponse</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">+ <thead>+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>start_position</td>+ <td><a href="#bytebase.v1.Position">Position</a></td>+ <td></td>+ <td><p>Position information for highlighting in editor </p></td>+ </tr>++ </tbody>+ </table>++- <h3 id="bytebase.v1.CreateIssueCommentRequest">CreateIssueCommentRequest</h3>+ <h3 id="bytebase.v1.QueryRow">QueryRow</h3><p></p>@@ -10100,18 +9678,10 @@ Format: projects/{project}/issues/{issue} </p></td><tbody><tr>- <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>values</td>+ <td><a href="#bytebase.v1.RowValue">RowValue</a></td>+ <td>repeated</td>+ <td><p>Row values of the query result. </p></td></tr></tbody>@@ -10121,7 +9691,7 @@ Format: projects/{project}/issues/{issue} </p></td>- <h3 id="bytebase.v1.CreateIssueRequest">CreateIssueRequest</h3>+ <h3 id="bytebase.v1.RowValue">RowValue</h3><p></p>@@ -10132,18 +9702,98 @@ Format: projects/{project}/issues/{issue} </p></td><tbody><tr>- <td>parent</td>- <td><a href="#string">string</a></td>+ <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></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>int32_value</td>+ <td><a href="#int32">int32</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>int64_value</td>+ <td><a href="#int64">int64</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>string_value</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>uint32_value</td>+ <td><a href="#uint32">uint32</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>uint64_value</td>+ <td><a href="#uint64">uint64</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>value_value</td>+ <td><a href="#google.protobuf.Value">google.protobuf.Value</a></td><td></td>- <td><p>The parent, which owns this collection of issues.-Format: projects/{project} </p></td>+ <td><p>value_value is used for Spanner and TUPLE ARRAY MAP in Clickhouse only. </p></td></tr><tr>- <td>issue</td>- <td><a href="#bytebase.v1.Issue">Issue</a></td>+ <td>timestamp_value</td>+ <td><a href="#bytebase.v1.RowValue.Timestamp">RowValue.Timestamp</a></td><td></td>- <td><p>The issue to create. </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>@@ -10153,7 +9803,7 @@ Format: projects/{project} </p></td>- <h3 id="bytebase.v1.GetIssueRequest">GetIssueRequest</h3>+ <h3 id="bytebase.v1.RowValue.Timestamp">RowValue.Timestamp</h3><p></p>@@ -10164,18 +9814,17 @@ Format: projects/{project} </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 the issue to retrieve.-Format: projects/{project}/issues/{issue} </p></td>+ <td><p> </p></td></tr><tr>- <td>force</td>- <td><a href="#bool">bool</a></td>+ <td>accuracy</td>+ <td><a href="#int32">int32</a></td><td></td>- <td><p>If set to true, bypass cache and fetch the latest data. </p></td>+ <td><p>The accuracy is the number of digits after the decimal point. </p></td></tr></tbody>@@ -10185,7 +9834,7 @@ Format: projects/{project}/issues/{issue} </p></td>- <h3 id="bytebase.v1.Issue">Issue</h3>+ <h3 id="bytebase.v1.RowValue.TimestampTZ">RowValue.TimestampTZ</h3><p></p>@@ -10196,139 +9845,452 @@ Format: projects/{project}/issues/{issue} </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 the issue.-Format: projects/{project}/issues/{issue} </p></td>+ <td><p> </p></td></tr><tr>- <td>title</td>+ <td>zone</td><td><a href="#string">string</a></td><td></td>- <td><p>The title of the issue. </p></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>description</td>- <td><a href="#string">string</a></td>+ <td>offset</td>+ <td><a href="#int32">int32</a></td><td></td>- <td><p>The description of the issue. </p></td>+ <td><p>The offset is in seconds east of UTC </p></td></tr>-+<tr>- <td>type</td>- <td><a href="#bytebase.v1.Issue.Type">Issue.Type</a></td>+ <td>accuracy</td>+ <td><a href="#int32">int32</a></td><td></td><td><p> </p></td></tr>- <tr>- <td>status</td>- <td><a href="#bytebase.v1.IssueStatus">IssueStatus</a></td>- <td></td>- <td><p>The status of the issue. </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.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.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>+ <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>++++++ <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>Deprecated: use QueryHistoryService.SearchQueryHistories instead.+Delegating alias kept for upgrade transition; will be removed in a future release.+No HTTP binding: the REST route is served by QueryHistoryService.+Permissions required: None (only returns caller's own query histories)</p></td>+ </tr>++ <tr>+ <td>ListQueryHistories</td>+ <td><a href="#bytebase.v1.ListQueryHistoriesRequest">ListQueryHistoriesRequest</a></td>+ <td><a href="#bytebase.v1.ListQueryHistoriesResponse">ListQueryHistoriesResponse</a></td>+ <td><p>Deprecated: use QueryHistoryService.ListQueryHistories instead.+Delegating alias kept for upgrade transition; will be removed in a future release.+No HTTP binding: the REST route is served by QueryHistoryService.+Permissions required: bb.queryHistories.list</p></td>+ </tr>++ <tr>+ <td>GetQueryHistory</td>+ <td><a href="#bytebase.v1.GetQueryHistoryRequest">GetQueryHistoryRequest</a></td>+ <td><a href="#bytebase.v1.QueryHistory">QueryHistory</a></td>+ <td><p>Deprecated: use QueryHistoryService.GetQueryHistory instead.+Delegating alias kept for upgrade transition; will be removed in a future release.+No HTTP binding: the REST route is served by QueryHistoryService.+Permissions required: None (only returns the caller's own query history)</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>++ </tbody>+ </table>+++++ <h4>Methods with deprecated option</h4>+ <table>+ <thead>+ <tr>+ <td>Method Name</td>+ <td>Option</td>+ </tr>+ </thead>+ <tbody>++ <tr>+ <td>SearchQueryHistories</td>+ <td><p>true</p></td>+ </tr>++ <tr>+ <td>ListQueryHistories</td>+ <td><p>true</p></td>+ </tr>++ <tr>+ <td>GetQueryHistory</td>+ <td><p>true</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>approval_template</td>- <td><a href="#bytebase.v1.ApprovalTemplate">ApprovalTemplate</a></td>- <td></td>- <td><p>The approval template for the issue. </p></td>- </tr>- <tr>- <td>creator</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>Format: users/[email protected] </p></td>- </tr>+ <tr>+ <td>Query</td>+ <td>POST</td>+ <td>/v1/{name=instances/*/databases/*}:query</td>+ <td>*</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</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>AdminExecute</td>+ <td>GET</td>+ <td>/v1:adminExecute</td>+ <td></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>- </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>- <tr>- <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>Export</td>+ <td>POST</td>+ <td>/v1/{name=instances/*/databases/*}:export</td>+ <td>*</td>+ </tr>- <tr>- <td>approval_status</td>- <td><a href="#bytebase.v1.ApprovalStatus">ApprovalStatus</a></td>- <td></td>- <td><p>The overall approval status for the issue. </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>+ <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>- </tr>-- <tr>- <td>draft</td>- <td><a href="#bool">bool</a></td>- <td></td>- <td><p>Whether this issue is a Draft Review Issue. </p></td>+ <td><p>The name of the plan check run to cancel.+Format: projects/{project}/plans/{plan}/planCheckRun </p></td></tr></tbody></table>---- <h3 id="bytebase.v1.Issue.Approver">Issue.Approver</h3>- <p>Approvers and their approval status for the issue.</p>-+++ <h3 id="bytebase.v1.CancelPlanCheckRunResponse">CancelPlanCheckRunResponse</h3>+ <p></p>++++++ <h3 id="bytebase.v1.CreatePlanRequest">CreatePlanRequest</h3>+ <p></p>++<table class="field-table"><thead><tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>@@ -10336,141 +10298,183 @@ 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>parent</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>The new status. </p></td>+ <td><p>The parent project where this plan will be created.+Format: projects/{project} </p></td></tr><tr>- <td>principal</td>- <td><a href="#string">string</a></td>+ <td>plan</td>+ <td><a href="#bytebase.v1.Plan">Plan</a></td><td></td>- <td><p>Format: users/[email protected] </p></td>+ <td><p>The plan to create. </p></td></tr></tbody></table>---- <h3 id="bytebase.v1.IssueComment">IssueComment</h3>- <p>A comment on an issue.</p>-+++ <h3 id="bytebase.v1.GetPlanCheckRunRequest">GetPlanCheckRunRequest</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>Format: projects/{project}/issues/{issue}/issueComments/{issueComment-uid} </p></td>+ <td><p>The name of the plan check run to retrieve.+Format: projects/{project}/plans/{plan}/planCheckRun </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>comment</td>+ <td>name</td><td><a href="#string">string</a></td><td></td>- <td><p>The text content of the comment. </p></td>+ <td><p>The name of the plan to retrieve.+Format: projects/{project}/plans/{plan} </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>payload</td>+ <td>parent</td><td><a href="#string">string</a></td><td></td>- <td><p>TODO: use struct message instead. </p></td>- </tr>-- <tr>- <td>create_time</td>- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>- <td></td>- <td><p> </p></td>+ <td><p>The parent, which owns this collection of plans.+Format: projects/{project}+Use "projects/-" to list all plans from all projects. </p></td></tr><tr>- <td>update_time</td>- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>+ <td>page_size</td>+ <td><a href="#int32">int32</a></td><td></td>- <td><p> </p></td>+ <td><p>The maximum number of 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>creator</td>+ <td>page_token</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_update</td>- <td><a href="#bytebase.v1.IssueComment.PlanUpdate">IssueComment.PlanUpdate</a></td>- <td></td>- <td><p>Plan update event. </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>review_submission</td>- <td><a href="#bytebase.v1.IssueComment.ReviewSubmission">IssueComment.ReviewSubmission</a></td>+ <td>filter</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>Review submission event. </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".+- 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" or "change_database_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"+title == "My Plan"+title.contains("database migration")+spec_type == "change_database_config"+state == "ACTIVE" </p></td></tr>-+</tbody></table>---- <h3 id="bytebase.v1.IssueComment.Approval">IssueComment.Approval</h3>- <p>Approval event information.</p>-+++ <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>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>status</td>- <td><a href="#bytebase.v1.IssueComment.Approval.Status">IssueComment.Approval.Status</a></td>+ <td>next_page_token</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>The approval status. </p></td>+ <td><p>A token, which can be sent as `page_token` to retrieve the next page.+If this field is omitted, there are no subsequent pages. </p></td></tr></tbody></table>---- <h3 id="bytebase.v1.IssueComment.IssueUpdate">IssueComment.IssueUpdate</h3>- <p>Issue update event information.</p>-+++ <h3 id="bytebase.v1.Plan">Plan</h3>+ <p></p>++<table class="field-table"><thead><tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>@@ -10478,90 +10482,113 @@ 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>The name of the plan.+`plan` is a system generated ID.+Format: projects/{project}/plans/{plan} </p></td></tr><tr>- <td>to_title</td>+ <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>optional</td>- <td><p> </p></td>+ <td></td>+ <td><p>The issue associated with the plan.+Can be empty.+Format: projects/{project}/issues/{issue} </p></td></tr>-+<tr>- <td>from_description</td>+ <td>title</td><td><a href="#string">string</a></td>- <td>optional</td>- <td><p> </p></td>+ <td></td>+ <td><p>The title of the plan. </p></td></tr>-+<tr>- <td>to_description</td>+ <td>description</td><td><a href="#string">string</a></td>- <td>optional</td>- <td><p> </p></td>+ <td></td>+ <td><p>The description of the plan. </p></td></tr>-+<tr>- <td>from_status</td>- <td><a href="#bytebase.v1.IssueStatus">IssueStatus</a></td>- <td>optional</td>- <td><p> </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>to_status</td>- <td><a href="#bytebase.v1.IssueStatus">IssueStatus</a></td>- <td>optional</td>+ <td>creator</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>Format: users/[email protected] </p></td>+ </tr>++ <tr>+ <td>create_time</td>+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>+ <td></td><td><p> </p></td></tr><tr>- <td>from_labels</td>- <td><a href="#string">string</a></td>- <td>repeated</td>+ <td>update_time</td>+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>+ <td></td><td><p> </p></td></tr><tr>- <td>to_labels</td>- <td><a href="#string">string</a></td>+ <td>plan_check_run_status_count</td>+ <td><a href="#bytebase.v1.Plan.PlanCheckRunStatusCountEntry">Plan.PlanCheckRunStatusCountEntry</a></td><td>repeated</td>- <td><p> </p></td>+ <td><p>The status count of the latest plan check runs.+Keys are:+- SUCCESS+- WARNING+- ERROR+- RUNNING </p></td></tr>-- </tbody>- </table>-+ <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>+ </tr>--- <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>+ <tr>+ <td>approval_status</td>+ <td><a href="#bytebase.v1.ApprovalStatus">ApprovalStatus</a></td>+ <td></td>+ <td><p>The approval status of the linked issue.+Unspecified when no linked issue exists or the linked issue is a draft. </p></td>+ </tr>-- <table class="field-table">- <thead>- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>- </thead>- <tbody>-<tr>- <td>from_specs</td>- <td><a href="#bytebase.v1.Plan.Spec">Plan.Spec</a></td>+ <td>rollout_stage_summaries</td>+ <td><a href="#bytebase.v1.Plan.RolloutStageSummary">Plan.RolloutStageSummary</a></td><td>repeated</td>- <td><p> </p></td>+ <td><p>Per-stage rollout status summary.+Ordered by environment deployment order. Empty when no rollout exists. </p></td></tr>-+<tr>- <td>to_specs</td>- <td><a href="#bytebase.v1.Plan.Spec">Plan.Spec</a></td>- <td>repeated</td>- <td><p> </p></td>+ <td>issue_status</td>+ <td><a href="#bytebase.v1.IssueStatus">IssueStatus</a></td>+ <td></td>+ <td><p>The lifecycle status of the linked issue.+Unspecified when no linked issue exists. </p></td></tr></tbody>@@ -10571,59 +10598,56 @@ Format: projects/{project}/accessGrants/{access_grant} </p></td>- <h3 id="bytebase.v1.IssueComment.ReviewSubmission">IssueComment.ReviewSubmission</h3>- <p>Review submission event information.</p>------ <h3 id="bytebase.v1.ListIssueCommentsRequest">ListIssueCommentsRequest</h3>+ <h3 id="bytebase.v1.Plan.ChangeDatabaseConfig">Plan.ChangeDatabaseConfig</h3><p></p>-+<table class="field-table"><thead><tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr></thead><tbody>-+<tr>- <td>parent</td>+ <td>targets</td><td><a href="#string">string</a></td>- <td></td>- <td><p>Format: projects/{projects}/issues/{issue} </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>page_size</td>- <td><a href="#int32">int32</a></td>+ <td>sheet</td>+ <td><a href="#string">string</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>+ <td><p>The resource name of the sheet.+Format: projects/{project}/sheets/{sheet} </p></td></tr>-+<tr>- <td>page_token</td>+ <td>release</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.+ <td><p>The resource name of the release.+Format: projects/{project}/releases/{release} </p></td>+ </tr>-When paginating, all other parameters provided to `ListIssueComments` must match-the call that provided the page token. </p></td>+ <tr>+ <td>enable_prior_backup</td>+ <td><a href="#bool">bool</a></td>+ <td></td>+ <td><p>If set, a backup of the modified data will be created automatically before any changes are applied. </p></td></tr>-+</tbody></table>--++- <h3 id="bytebase.v1.ListIssueCommentsResponse">ListIssueCommentsResponse</h3>+ <h3 id="bytebase.v1.Plan.CreateDatabaseConfig">Plan.CreateDatabaseConfig</h3><p></p>@@ -10634,110 +10658,62 @@ 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>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>next_page_token</td>+ <td>database</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 name of the database to create. </p></td></tr>-- </tbody>- </table>------ <h3 id="bytebase.v1.ListIssuesRequest">ListIssuesRequest</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>table</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>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>page_size</td>- <td><a href="#int32">int32</a></td>+ <td>character_set</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>character_set is the character set of the database. </p></td></tr><tr>- <td>page_token</td>+ <td>collation</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>+ <td><p>collation is the collation of the database. </p></td></tr><tr>- <td>filter</td>+ <td>cluster</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>+ <td><p>cluster is the cluster of the database. This is only applicable to ClickHouse for "ON CLUSTER <<cluster>>". </p></td></tr><tr>- <td>query</td>+ <td>owner</td><td><a href="#string">string</a></td><td></td>- <td><p>Query is the query statement. </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>order_by</td>+ <td>environment</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>The environment resource.+Format: environments/prod where prod is the environment resource ID. </p></td></tr></tbody>@@ -10747,7 +10723,7 @@ For example:- <h3 id="bytebase.v1.ListIssuesResponse">ListIssuesResponse</h3>+ <h3 id="bytebase.v1.Plan.PlanCheckRunStatusCountEntry">Plan.PlanCheckRunStatusCountEntry</h3><p></p>@@ -10758,18 +10734,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>key</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p> </p></td></tr><tr>- <td>next_page_token</td>- <td><a href="#string">string</a></td>+ <td>value</td>+ <td><a href="#int32">int32</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>@@ -10779,7 +10754,7 @@ If this field is omitted, there are no subsequent pages. </p></td>- <h3 id="bytebase.v1.RejectIssueRequest">RejectIssueRequest</h3>+ <h3 id="bytebase.v1.Plan.RolloutStageSummary">Plan.RolloutStageSummary</h3><p></p>@@ -10790,18 +10765,18 @@ If this field is omitted, there are no subsequent pages. </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 issue to add a rejection.-Format: projects/{project}/issues/{issue} </p></td>+ <td><p>The stage resource name.+Format: projects/{project}/plans/{plan}/rollout/stages/{stage} </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>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></tbody>@@ -10811,7 +10786,7 @@ Format: projects/{project}/issues/{issue} </p></td>- <h3 id="bytebase.v1.RequestIssueRequest">RequestIssueRequest</h3>+ <h3 id="bytebase.v1.Plan.Spec">Plan.Spec</h3><p></p>@@ -10822,18 +10797,24 @@ Format: projects/{project}/issues/{issue} </p></td><tbody><tr>- <td>name</td>+ <td>id</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>A UUID4 string that uniquely identifies the Spec. </p></td></tr><tr>- <td>comment</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 comment explaining the request. </p></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>change_database_config</td>+ <td><a href="#bytebase.v1.Plan.ChangeDatabaseConfig">Plan.ChangeDatabaseConfig</a></td>+ <td></td>+ <td><p> </p></td></tr></tbody>@@ -10843,7 +10824,7 @@ Format: projects/{project}/issues/{issue} </p></td>- <h3 id="bytebase.v1.RetryIssueApprovalRequest">RetryIssueApprovalRequest</h3>+ <h3 id="bytebase.v1.Plan.TaskStatusCount">Plan.TaskStatusCount</h3><p></p>@@ -10854,11 +10835,17 @@ Format: projects/{project}/issues/{issue} </p></td><tbody><tr>- <td>name</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 name of the issue whose approval-finding should be retried.-Format: projects/{project}/issues/{issue} </p></td>+ <td><p>The task status. </p></td>+ </tr>++ <tr>+ <td>count</td>+ <td><a href="#int32">int32</a></td>+ <td></td>+ <td><p>The number of tasks in the status. </p></td></tr></tbody>@@ -10868,7 +10855,7 @@ Format: projects/{project}/issues/{issue} </p></td>- <h3 id="bytebase.v1.RoleGrant">RoleGrant</h3>+ <h3 id="bytebase.v1.PlanCheckRun">PlanCheckRun</h3><p></p>@@ -10879,33 +10866,38 @@ Format: projects/{project}/issues/{issue} </p></td><tbody><tr>- <td>role</td>+ <td>name</td><td><a href="#string">string</a></td><td></td>- <td><p>The requested role.-Format: roles/EXPORTER. </p></td>+ <td><p>Format: projects/{project}/plans/{plan}/planCheckRun </p></td></tr><tr>- <td>user</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 user to be granted.-Format: users/{email}. </p></td>+ <td><p> </p></td></tr><tr>- <td>condition</td>- <td><a href="#google.type.Expr">google.type.Expr</a></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 condition for the role. Same as the condition in IAM Binding message. </p></td>+ <td><p>error is set if the Status is FAILED. </p></td></tr><tr>- <td>expiration</td>- <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>+ <td>create_time</td>+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td><td></td>- <td><p>The duration for which the grant is valid. </p></td>+ <td><p> </p></td></tr></tbody>@@ -10915,7 +10907,7 @@ Format: users/{email}. </p></td>- <h3 id="bytebase.v1.SearchIssuesRequest">SearchIssuesRequest</h3>+ <h3 id="bytebase.v1.PlanCheckRun.Result">PlanCheckRun.Result</h3><p></p>@@ -10926,65 +10918,60 @@ Format: users/{email}. </p></td><tbody><tr>- <td>parent</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 parent, which owns this collection of issues.-Format: projects/{project}-Use the wildcard "projects/-" to search across collections (AIP-159); the-result is restricted to the projects where the caller holds-bb.issues.get. For a concrete project, the caller must hold bb.issues.get-on that project or the request is denied. </p></td>+ <td><p> </p></td></tr>-+<tr>- <td>page_size</td>- <td><a href="#int32">int32</a></td>+ <td>title</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> </p></td></tr><tr>- <td>page_token</td>+ <td>content</td><td><a href="#string">string</a></td><td></td>- <td><p>A page token, received from a previous `SearchIssues` call.-Provide this to retrieve the subsequent page.+ <td><p> </p></td>+ </tr>-When paginating, all other parameters provided to `SearchIssues` must match-the call that provided the page token. </p></td>+ <tr>+ <td>code</td>+ <td><a href="#int32">int32</a></td>+ <td></td>+ <td><p> </p></td></tr><tr>- <td>filter</td>+ <td>target</td><td><a href="#string">string</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>Target identification for consolidated results.+Format: instances/{instance}/databases/{database} </p></td>+ </tr>++ <tr>+ <td>type</td>+ <td><a href="#bytebase.v1.PlanCheckRun.Result.Type">PlanCheckRun.Result.Type</a></td>+ <td></td>+ <td><p> </p></td></tr><tr>- <td>query</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>Query is the query statement. </p></td>+ <td><p> </p></td></tr><tr>- <td>order_by</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 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> </p></td></tr></tbody>@@ -10994,7 +10981,7 @@ For example:- <h3 id="bytebase.v1.SearchIssuesResponse">SearchIssuesResponse</h3>+ <h3 id="bytebase.v1.PlanCheckRun.Result.SqlReviewReport">PlanCheckRun.Result.SqlReviewReport</h3><p></p>@@ -11005,18 +10992,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>start_position</td>+ <td><a href="#bytebase.v1.Position">Position</a></td>+ <td></td>+ <td><p>Position of the SQL statement. </p></td></tr><tr>- <td>next_page_token</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>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>@@ -11026,7 +11012,7 @@ If this field is omitted, there are no subsequent pages. </p></td>- <h3 id="bytebase.v1.UpdateIssueCommentRequest">UpdateIssueCommentRequest</h3>+ <h3 id="bytebase.v1.PlanCheckRun.Result.SqlSummaryReport">PlanCheckRun.Result.SqlSummaryReport</h3><p></p>@@ -11037,33 +11023,51 @@ 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></td>- <td><p>The issue name-Format: projects/{project}/issues/{issue} </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>issue_comment</td>- <td><a href="#bytebase.v1.IssueComment">IssueComment</a></td>+ <td>affected_rows</td>+ <td><a href="#int64">int64</a></td><td></td>- <td><p>The comment to update. </p></td>+ <td><p> </p></td></tr>+ </tbody>+ </table>++++++ <h3 id="bytebase.v1.RunPlanChecksRequest">RunPlanChecksRequest</h3>+ <p></p>+++ <table class="field-table">+ <thead>+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>+ </thead>+ <tbody>+<tr>- <td>update_mask</td>- <td><a href="#google.protobuf.FieldMask">google.protobuf.FieldMask</a></td>+ <td>name</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>The list of fields to update. </p></td>+ <td><p>The plan to run plan checks.+Format: projects/{project}/plans/{plan} </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>spec_id</td>+ <td><a href="#string">string</a></td>+ <td>optional</td>+ <td><p>The UUID of the specific spec to run plan checks for.+This should match the spec.id field in Plan.Spec.+If not set, all specs in the plan will be used. </p></td></tr></tbody>@@ -11073,7 +11077,14 @@ In this situation, `update_mask` is ignored. </p></td>- <h3 id="bytebase.v1.UpdateIssueRequest">UpdateIssueRequest</h3>+ <h3 id="bytebase.v1.RunPlanChecksResponse">RunPlanChecksResponse</h3>+ <p></p>++++++ <h3 id="bytebase.v1.UpdatePlanRequest">UpdatePlanRequest</h3><p></p>@@ -11084,13 +11095,13 @@ In this situation, `update_mask` is ignored. </p></td><tbody><tr>- <td>issue</td>- <td><a href="#bytebase.v1.Issue">Issue</a></td>+ <td>plan</td>+ <td><a href="#bytebase.v1.Plan">Plan</a></td><td></td>- <td><p>The issue to update.+ <td><p>The plan to update.-The issue's `name` field is used to identify the issue to update.-Format: projects/{project}/issues/{issue} </p></td>+The plan's `name` field is used to identify the plan to update.+Format: projects/{project}/plans/{plan} </p></td></tr><tr>@@ -11099,258 +11110,175 @@ Format: projects/{project}/issues/{issue} </p></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 issue is not found, a new issue will be created.+ <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></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>+++++ <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>Unspecified issue type.</p></td>+ <td><p></p></td></tr>-+<tr>- <td>DATABASE_CHANGE</td>+ <td>STATEMENT_ADVISE</td><td>1</td>- <td><p>Database schema or data change.</p></td>+ <td><p></p></td></tr>-+<tr>- <td>ROLE_GRANT</td>+ <td>STATEMENT_SUMMARY_REPORT</td><td>2</td>- <td><p>Role grant request.</p></td>+ <td><p></p></td></tr>-+<tr>- <td>ACCESS_GRANT</td>- <td>4</td>- <td><p>Temporary access grant request.</p></td>+ <td>GHOST_SYNC</td>+ <td>3</td>+ <td><p></p></td></tr>-+</tbody></table>-- <h3 id="bytebase.v1.IssueComment.Approval.Status">IssueComment.Approval.Status</h3>- <p>Approval status values.</p>++ <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>Unspecified status.</p></td>+ <td><p></p></td></tr>-+<tr>- <td>PENDING</td>+ <td>RUNNING</td><td>1</td>- <td><p>Approval pending.</p></td>+ <td><p></p></td></tr>-+<tr>- <td>APPROVED</td>+ <td>DONE</td><td>2</td>- <td><p>Approved.</p></td>+ <td><p></p></td></tr>-+<tr>- <td>REJECTED</td>+ <td>FAILED</td><td>3</td>- <td><p>Rejected.</p></td>+ <td><p></p></td></tr>-++ <tr>+ <td>CANCELED</td>+ <td>4</td>+ <td><p></p></td>+ </tr>+</tbody></table>---- <h3 id="bytebase.v1.IssueService">IssueService</h3>- <p>IssueService manages issues for tracking database changes and tasks.</p>++++ <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>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>+ <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>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>+ <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>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>+ <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>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>+ <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>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>+ <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>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>+ <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>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>+ <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>--++<h4>Methods with HTTP bindings</h4><table><thead>@@ -11362,151 +11290,508 @@ mirrors RequestIssue's authorization model).</p></td></tr></thead><tbody>-+<tr>- <td>GetIssue</td>+ <td>GetPlan</td><td>GET</td>- <td>/v1/{name=projects/*/issues/*}</td>+ <td>/v1/{name=projects/*/plans/*}</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>ListPlans</td><td>GET</td>- <td>/v1/{parent=projects/*}/issues</td>+ <td>/v1/{parent=projects/*}/plans</td><td></td></tr>-+<tr>- <td>SearchIssues</td>+ <td>CreatePlan</td><td>POST</td>- <td>/v1/{parent=projects/*}/issues:search</td>- <td>*</td>+ <td>/v1/{parent=projects/*}/plans</td>+ <td>plan</td></tr>--++<tr>- <td>UpdateIssue</td>+ <td>UpdatePlan</td><td>PATCH</td>- <td>/v1/{issue.name=projects/*/issues/*}</td>- <td>issue</td>+ <td>/v1/{plan.name=projects/*/plans/*}</td>+ <td>plan</td></tr>-+<tr>- <td>ListIssueComments</td>+ <td>GetPlanCheckRun</td><td>GET</td>- <td>/v1/{parent=projects/*/issues/*}/issueComments</td>+ <td>/v1/{name=projects/*/plans/*/planCheckRun}</td><td></td></tr>-+<tr>- <td>CreateIssueComment</td>+ <td>RunPlanChecks</td><td>POST</td>- <td>/v1/{parent=projects/*/issues/*}:comment</td>- <td>issue_comment</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>+++++ <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>+++ <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="#string">string</a></td>+ <td>repeated</td>+ <td><p>The roles required for approval in order. </p></td>+ </tr>++ </tbody>+ </table>++++++ <h3 id="bytebase.v1.ApprovalTemplate">ApprovalTemplate</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>flow</td>+ <td><a href="#bytebase.v1.ApprovalFlow">ApprovalFlow</a></td>+ <td></td>+ <td><p>The approval flow definition. </p></td>+ </tr>+ <tr>+ <td>title</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The title of the approval template. </p></td>+ </tr>- <tr>- <td>UpdateIssueComment</td>- <td>PATCH</td>- <td>/v1/{parent=projects/*/issues/*}:comment</td>- <td>issue_comment</td>- </tr>+ <tr>+ <td>description</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The description of the approval template. </p></td>+ </tr>-+ </tbody>+ </table>++++++ <h3 id="bytebase.v1.ApproveIssueRequest">ApproveIssueRequest</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 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>- <tr>- <td>BatchUpdateIssuesStatus</td>- <td>POST</td>- <td>/v1/{parent=projects/*}/issues:batchUpdateStatus</td>- <td>*</td>- </tr>+ </tbody>+ </table>++++++ <h3 id="bytebase.v1.BatchUpdateIssuesStatusRequest">BatchUpdateIssuesStatusRequest</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 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>+ </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>+ </table>++++++ <h3 id="bytebase.v1.BatchUpdateIssuesStatusResponse">BatchUpdateIssuesStatusResponse</h3>+ <p></p>++++++ <h3 id="bytebase.v1.CreateIssueCommentRequest">CreateIssueCommentRequest</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 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>+ </tr>- <tr>- <td>ApproveIssue</td>- <td>POST</td>- <td>/v1/{name=projects/*/issues/*}:approve</td>- <td>*</td>- </tr>+ </tbody>+ </table>++++++ <h3 id="bytebase.v1.CreateIssueRequest">CreateIssueRequest</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 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>+ </table>++++++ <h3 id="bytebase.v1.GetIssueRequest">GetIssueRequest</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 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>+ </tr>- <tr>- <td>RejectIssue</td>- <td>POST</td>- <td>/v1/{name=projects/*/issues/*}:reject</td>- <td>*</td>- </tr>+ </tbody>+ </table>++++++ <h3 id="bytebase.v1.Issue">Issue</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 issue.+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 issue. </p></td>+ </tr>++ <tr>+ <td>description</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>+ </tr>++ <tr>+ <td>status</td>+ <td><a href="#bytebase.v1.IssueStatus">IssueStatus</a></td>+ <td></td>+ <td><p>The status of the issue. </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>++ <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>+ </tr>++ <tr>+ <td>creator</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>Format: users/[email protected] </p></td>+ </tr>++ <tr>+ <td>create_time</td>+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>+ <tr>+ <td>update_time</td>+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>+ <td></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>plan</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>+ </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>++ <tr>+ <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>The overall approval status for the issue. </p></td>+ </tr>+ <tr>+ <td>access_grant</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>+ </tr>- <tr>- <td>RetryIssueApproval</td>- <td>POST</td>- <td>/v1/{name=projects/*/issues/*}:retryApproval</td>- <td>*</td>- </tr>+ <tr>+ <td>draft</td>+ <td><a href="#bool">bool</a></td>+ <td></td>+ <td><p>Whether this issue is a Draft Review Issue. </p></td>+ </tr>++ </tbody>+ </table>++++++ <h3 id="bytebase.v1.Issue.Approver">Issue.Approver</h3>+ <p>Approvers and their approval status for the issue.</p>+++ <table class="field-table">+ <thead>+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>status</td>+ <td><a href="#bytebase.v1.Issue.Approver.Status">Issue.Approver.Status</a></td>+ <td></td>+ <td><p>The new status. </p></td>+ </tr>++ <tr>+ <td>principal</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>Format: users/[email protected] </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.IssueComment">IssueComment</h3>+ <p>A comment on an issue.</p><table class="field-table">@@ -11516,90 +11801,73 @@ mirrors RequestIssue's authorization model).</p></td><tbody><tr>- <td>enabled</td>- <td><a href="#bool">bool</a></td>+ <td>name</td>+ <td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>Format: projects/{project}/issues/{issue}/issueComments/{issueComment-uid} </p></td></tr><tr>- <td>provider</td>- <td><a href="#bytebase.v1.AISetting.Provider">AISetting.Provider</a></td>+ <td>comment</td>+ <td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>The text content of the comment. </p></td></tr><tr>- <td>endpoint</td>+ <td>payload</td><td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>TODO: use struct message instead. </p></td></tr><tr>- <td>api_key</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> </p></td></tr><tr>- <td>model</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> </p></td></tr>-+<tr>- <td>version</td>+ <td>creator</td><td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>Format: users/{email} </p></td></tr>-- </tbody>- </table>----- <h3 id="bytebase.v1.Algorithm">Algorithm</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>full_mask</td>- <td><a href="#bytebase.v1.Algorithm.FullMask">Algorithm.FullMask</a></td>+ <td>approval</td>+ <td><a href="#bytebase.v1.IssueComment.Approval">IssueComment.Approval</a></td><td></td>- <td><p> </p></td>+ <td><p>Approval event. </p></td></tr>-+<tr>- <td>range_mask</td>- <td><a href="#bytebase.v1.Algorithm.RangeMask">Algorithm.RangeMask</a></td>+ <td>issue_update</td>+ <td><a href="#bytebase.v1.IssueComment.IssueUpdate">IssueComment.IssueUpdate</a></td><td></td>- <td><p> </p></td>+ <td><p>Issue update event. </p></td></tr>-+<tr>- <td>md5_mask</td>- <td><a href="#bytebase.v1.Algorithm.MD5Mask">Algorithm.MD5Mask</a></td>+ <td>plan_update</td>+ <td><a href="#bytebase.v1.IssueComment.PlanUpdate">IssueComment.PlanUpdate</a></td><td></td>- <td><p> </p></td>+ <td><p>Plan update event. </p></td></tr>-+<tr>- <td>inner_outer_mask</td>- <td><a href="#bytebase.v1.Algorithm.InnerOuterMask">Algorithm.InnerOuterMask</a></td>+ <td>review_submission</td>+ <td><a href="#bytebase.v1.IssueComment.ReviewSubmission">IssueComment.ReviewSubmission</a></td><td></td>- <td><p> </p></td>+ <td><p>Review submission event. </p></td></tr></tbody>@@ -11609,8 +11877,8 @@ mirrors RequestIssue's authorization model).</p></td>- <h3 id="bytebase.v1.Algorithm.FullMask">Algorithm.FullMask</h3>- <p></p>+ <h3 id="bytebase.v1.IssueComment.Approval">IssueComment.Approval</h3>+ <p>Approval event information.</p><table class="field-table">@@ -11620,11 +11888,10 @@ mirrors RequestIssue's authorization model).</p></td><tbody><tr>- <td>substitution</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>substitution is the string used to replace the original value, the-max length of the string is 16 bytes. </p></td>+ <td><p>The approval status. </p></td></tr></tbody>@@ -11634,8 +11901,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.IssueComment.IssueUpdate">IssueComment.IssueUpdate</h3>+ <p>Issue update event information.</p><table class="field-table">@@ -11645,80 +11912,90 @@ max length of the string is 16 bytes. </p></td><tbody><tr>- <td>prefix_len</td>- <td><a href="#int32">int32</a></td>- <td></td>+ <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><a href="#string">string</a></td>+ <td>optional</td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>from_description</td>+ <td><a href="#string">string</a></td>+ <td>optional</td><td><p> </p></td></tr><tr>- <td>suffix_len</td>- <td><a href="#int32">int32</a></td>- <td></td>+ <td>to_description</td>+ <td><a href="#string">string</a></td>+ <td>optional</td><td><p> </p></td></tr><tr>- <td>type</td>- <td><a href="#bytebase.v1.Algorithm.InnerOuterMask.MaskType">Algorithm.InnerOuterMask.MaskType</a></td>- <td></td>+ <td>from_status</td>+ <td><a href="#bytebase.v1.IssueStatus">IssueStatus</a></td>+ <td>optional</td><td><p> </p></td></tr><tr>- <td>substitution</td>- <td><a href="#string">string</a></td>- <td></td>+ <td>to_status</td>+ <td><a href="#bytebase.v1.IssueStatus">IssueStatus</a></td>+ <td>optional</td><td><p> </p></td></tr>- </tbody>- </table>------ <h3 id="bytebase.v1.Algorithm.MD5Mask">Algorithm.MD5Mask</h3>- <p></p>+ <tr>+ <td>from_labels</td>+ <td><a href="#string">string</a></td>+ <td>repeated</td>+ <td><p> </p></td>+ </tr>-- <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>to_labels</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>repeated</td>+ <td><p> </p></td></tr></tbody></table>---- <h3 id="bytebase.v1.Algorithm.RangeMask">Algorithm.RangeMask</h3>- <p></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"><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>from_specs</td>+ <td><a href="#bytebase.v1.Plan.Spec">Plan.Spec</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><p> </p></td>+ </tr>++ <tr>+ <td>to_specs</td>+ <td><a href="#bytebase.v1.Plan.Spec">Plan.Spec</a></td>+ <td>repeated</td>+ <td><p> </p></td></tr></tbody>@@ -11728,7 +12005,14 @@ But frontend can be started with a single rule easily. </p></td>- <h3 id="bytebase.v1.Algorithm.RangeMask.Slice">Algorithm.RangeMask.Slice</h3>+ <h3 id="bytebase.v1.IssueComment.ReviewSubmission">IssueComment.ReviewSubmission</h3>+ <p>Review submission event information.</p>++++++ <h3 id="bytebase.v1.ListIssueCommentsRequest">ListIssueCommentsRequest</h3><p></p>@@ -11739,27 +12023,31 @@ 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>parent</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>Format: projects/{projects}/issues/{issue} </p></td></tr>-+<tr>- <td>end</td>+ <td>page_size</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>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>substitution</td>+ <td>page_token</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>+ <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></tbody>@@ -11769,7 +12057,7 @@ Uses character indices (not byte offsets) for display-oriented masking. </p></td- <h3 id="bytebase.v1.Announcement">Announcement</h3>+ <h3 id="bytebase.v1.ListIssueCommentsResponse">ListIssueCommentsResponse</h3><p></p>@@ -11780,25 +12068,18 @@ Uses character indices (not byte offsets) for display-oriented masking. </p></td<tbody><tr>- <td>text</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The text of announcement </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>link</td>+ <td>next_page_token</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>-- <tr>- <td>theme</td>- <td><a href="#bytebase.v1.Announcement.AnnouncementTheme">Announcement.AnnouncementTheme</a></td>- <td></td>- <td><p>Banner colors. Built-in presets (info/warning/critical) are a-frontend-only concept that seeds these colors; the store only holds them. </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>@@ -11808,7 +12089,7 @@ frontend-only concept that seeds these colors; the store only holds them. </p></- <h3 id="bytebase.v1.Announcement.AnnouncementTheme">Announcement.AnnouncementTheme</h3>+ <h3 id="bytebase.v1.ListIssuesRequest">ListIssuesRequest</h3><p></p>@@ -11819,41 +12100,78 @@ frontend-only concept that seeds these colors; the store only holds them. </p></<tbody><tr>- <td>background</td>- <td><a href="#google.type.Color">google.type.Color</a></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>text</td>- <td><a href="#google.type.Color">google.type.Color</a></td>+ <td>page_size</td>+ <td><a href="#int32">int32</a></td><td></td>- <td><p> </p></td>+ <td><p>The maximum number of 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>- </tbody>- </table>+ <tr>+ <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>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--- <h3 id="bytebase.v1.AppIMSetting">AppIMSetting</h3>- <p></p>+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.-- <table class="field-table">- <thead>- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>- </thead>- <tbody>+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>settings</td>- <td><a href="#bytebase.v1.AppIMSetting.IMSetting">AppIMSetting.IMSetting</a></td>- <td>repeated</td>- <td><p> </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>order_by</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></tr></tbody>@@ -11863,7 +12181,7 @@ frontend-only concept that seeds these colors; the store only holds them. </p></- <h3 id="bytebase.v1.AppIMSetting.DingTalk">AppIMSetting.DingTalk</h3>+ <h3 id="bytebase.v1.ListIssuesResponse">ListIssuesResponse</h3><p></p>@@ -11874,24 +12192,18 @@ frontend-only concept that seeds these colors; the store only holds them. </p></<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>+ <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>robot_code</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>@@ -11901,7 +12213,7 @@ frontend-only concept that seeds these colors; the store only holds them. </p></- <h3 id="bytebase.v1.AppIMSetting.Feishu">AppIMSetting.Feishu</h3>+ <h3 id="bytebase.v1.RejectIssueRequest">RejectIssueRequest</h3><p></p>@@ -11912,238 +12224,233 @@ frontend-only concept that seeds these colors; the store only holds them. </p></<tbody><tr>- <td>app_id</td>+ <td>name</td><td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>The name of the issue to add a rejection.+Format: projects/{project}/issues/{issue} </p></td></tr><tr>- <td>app_secret</td>+ <td>comment</td><td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>The comment explaining the rejection decision. </p></td></tr></tbody></table>---- <h3 id="bytebase.v1.AppIMSetting.IMSetting">AppIMSetting.IMSetting</h3>++++ <h3 id="bytebase.v1.RequestIssueRequest">RequestIssueRequest</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>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>lark</td>- <td><a href="#bytebase.v1.AppIMSetting.Lark">AppIMSetting.Lark</a></td>- <td></td>- <td><p> </p></td>- </tr>-+<tr>- <td>dingtalk</td>- <td><a href="#bytebase.v1.AppIMSetting.DingTalk">AppIMSetting.DingTalk</a></td>+ <td>name</td>+ <td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>The name of the issue to request a issue.+Format: projects/{project}/issues/{issue} </p></td></tr><tr>- <td>teams</td>- <td><a href="#bytebase.v1.AppIMSetting.Teams">AppIMSetting.Teams</a></td>+ <td>comment</td>+ <td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>The comment explaining the request. </p></td></tr></tbody></table>---- <h3 id="bytebase.v1.AppIMSetting.Lark">AppIMSetting.Lark</h3>++++ <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>app_id</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p> </p></td>- </tr>-+<tr>- <td>app_secret</td>+ <td>name</td><td><a href="#string">string</a></td><td></td>- <td><p> </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.AppIMSetting.Slack">AppIMSetting.Slack</h3>++++ <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></td>+ <td><p>The requested role.+Format: roles/EXPORTER. </p></td>+ </tr><tr>- <td>token</td>+ <td>user</td><td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>The user to be granted.+Format: users/{email}. </p></td>+ </tr>++ <tr>+ <td>condition</td>+ <td><a href="#google.type.Expr">google.type.Expr</a></td>+ <td></td>+ <td><p>The condition for the role. Same as the condition in IAM Binding message. </p></td>+ </tr>++ <tr>+ <td>expiration</td>+ <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>+ <td></td>+ <td><p>The duration for which the grant is valid. </p></td></tr></tbody></table>---- <h3 id="bytebase.v1.AppIMSetting.Teams">AppIMSetting.Teams</h3>++++ <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>tenant_id</td>+ <td>parent</td><td><a href="#string">string</a></td><td></td>- <td><p>Azure AD tenant ID (Directory ID). </p></td>+ <td><p>The parent, which owns this collection of issues.+Format: projects/{project}+Use the wildcard "projects/-" to search across collections (AIP-159); the+result is restricted to the projects where the caller holds+bb.issues.get. For a concrete project, the caller must hold bb.issues.get+on that project or the request is denied. </p></td></tr><tr>- <td>client_id</td>- <td><a href="#string">string</a></td>+ <td>page_size</td>+ <td><a href="#int32">int32</a></td><td></td>- <td><p>Azure AD application (client) ID. </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>client_secret</td>+ <td>page_token</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>+ <td><p>A page token, received from a previous `SearchIssues` call.+Provide this to retrieve the subsequent page.-- <table class="field-table">- <thead>- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>- </thead>- <tbody>+When paginating, all other parameters provided to `SearchIssues` must match+the call that provided the page token. </p></td>+ </tr><tr>- <td>corp_id</td>+ <td>filter</td><td><a href="#string">string</a></td><td></td>- <td><p> </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>agent_id</td>+ <td>query</td><td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>Query is the query statement. </p></td></tr><tr>- <td>secret</td>+ <td>order_by</td><td><a href="#string">string</a></td><td></td>- <td><p> </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></table>---- <h3 id="bytebase.v1.DataClassificationSetting">DataClassificationSetting</h3>++++ <h3 id="bytebase.v1.SearchIssuesResponse">SearchIssuesResponse</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>issues</td>+ <td><a href="#bytebase.v1.Issue">Issue</a></td><td>repeated</td>- <td><p> </p></td>+ <td><p>The issues 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>@@ -12153,7 +12460,7 @@ frontend-only concept that seeds these colors; the store only holds them. </p></- <h3 id="bytebase.v1.DataClassificationSetting.DataClassificationConfig">DataClassificationSetting.DataClassificationConfig</h3>+ <h3 id="bytebase.v1.UpdateIssueCommentRequest">UpdateIssueCommentRequest</h3><p></p>@@ -12164,694 +12471,698 @@ frontend-only concept that seeds these colors; the store only holds them. </p></<tbody><tr>- <td>id</td>+ <td>parent</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>+ <td><p>The issue name+Format: projects/{project}/issues/{issue} </p></td></tr><tr>- <td>title</td>- <td><a href="#string">string</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>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>+ <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>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>+ <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></tr></tbody></table>---- <h3 id="bytebase.v1.DataClassificationSetting.DataClassificationConfig.ClassificationEntry">DataClassificationSetting.DataClassificationConfig.ClassificationEntry</h3>++++ <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>key</td>- <td><a href="#string">string</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>value</td>- <td><a href="#bytebase.v1.DataClassificationSetting.DataClassificationConfig.DataClassification">DataClassificationSetting.DataClassificationConfig.DataClassification</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_missing</td>+ <td><a href="#bool">bool</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></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>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.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>+++++ <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>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>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>+--- <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>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>-+ <tr>+ <td>RejectIssue</td>+ <td>POST</td>+ <td>/v1/{name=projects/*/issues/*}:reject</td>+ <td>*</td>+ </tr>--- <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>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>+ <tr>+ <td>RequestIssue</td>+ <td>POST</td>+ <td>/v1/{name=projects/*/issues/*}:request</td>+ <td>*</td>+ </tr>-- <table class="field-table">- <thead>- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>- </thead>- <tbody>-- <tr>- <td>from</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p> </p></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>-- </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>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>authentication</td>- <td><a href="#bytebase.v1.EmailSetting.SMTPConfig.Authentication">EmailSetting.SMTPConfig.Authentication</a></td>- <td></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.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>-+ <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.EnvironmentSetting.Environment">EnvironmentSetting.Environment</h3>++ <h3 id="bytebase.v1.AISetting">AISetting</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 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>enabled</td>+ <td><a href="#bool">bool</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="#google.type.Color">google.type.Color</a></td>+ <td>provider</td>+ <td><a href="#bytebase.v1.AISetting.Provider">AISetting.Provider</a></td><td></td><td><p> </p></td></tr>-- </tbody>- </table>----- <h3 id="bytebase.v1.EnvironmentSetting.Environment.TagsEntry">EnvironmentSetting.Environment.TagsEntry</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>endpoint</td><td><a href="#string">string</a></td><td></td><td><p> </p></td></tr>-+<tr>- <td>value</td>+ <td>api_key</td><td><a href="#string">string</a></td><td></td><td><p> </p></td></tr>-- </tbody>- </table>------ <h3 id="bytebase.v1.GetSettingRequest">GetSettingRequest</h3>- <p>The request message for getting a 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>name</td>+ <td>model</td><td><a href="#string">string</a></td><td></td>- <td><p>The resource name of the setting. </p></td>+ <td><p> </p></td></tr>-- </tbody>- </table>------ <h3 id="bytebase.v1.GetSettingResponse">GetSettingResponse</h3>- <p>The response message for getting a 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>setting</td>- <td><a href="#bytebase.v1.Setting">Setting</a></td>+ <td>version</td>+ <td><a href="#string">string</a></td><td></td><td><p> </p></td></tr>-+</tbody></table>----- <h3 id="bytebase.v1.ListSettingsRequest">ListSettingsRequest</h3>- <p></p>----- <h3 id="bytebase.v1.ListSettingsResponse">ListSettingsResponse</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>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.SQLEditorThemeSetting">SQLEditorThemeSetting</h3>+ <h3 id="bytebase.v1.Algorithm">Algorithm</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> </p></td>- </tr>-+<tr>- <td>name</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> </p></td></tr>-+<tr>- <td>monaco_base</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> </p></td></tr>-- <tr>- <td>tokens</td>- <td><a href="#bytebase.v1.SQLEditorThemeSetting.TokensEntry">SQLEditorThemeSetting.TokensEntry</a></td>- <td>repeated</td>- <td><p>CSS token colors. </p></td>- </tr>-- </tbody>- </table>----- <h3 id="bytebase.v1.SQLEditorThemeSetting.TokensEntry">SQLEditorThemeSetting.TokensEntry</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>md5_mask</td>+ <td><a href="#bytebase.v1.Algorithm.MD5Mask">Algorithm.MD5Mask</a></td><td></td><td><p> </p></td></tr>-+<tr>- <td>value</td>- <td><a href="#google.type.Color">google.type.Color</a></td>+ <td>inner_outer_mask</td>+ <td><a href="#bytebase.v1.Algorithm.InnerOuterMask">Algorithm.InnerOuterMask</a></td><td></td><td><p> </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>+ <h3 id="bytebase.v1.Algorithm.FullMask">Algorithm.FullMask</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 semantic type. </p></td>- </tr>-- <tr>- <td>title</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>- </tr>-- <tr>- <td>description</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>the description of the semantic type, it can be empty. </p></td>- </tr>-- <tr>- <td>algorithm</td>- <td><a href="#bytebase.v1.Algorithm">Algorithm</a></td>- <td></td>- <td><p> </p></td>- </tr>-+<tr>- <td>icon</td>+ <td>substitution</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>substitution is the string used to replace the original value, the+max length of the string is 16 bytes. </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>name</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>- </tr>-- <tr>- <td>value</td>- <td><a href="#bytebase.v1.SettingValue">SettingValue</a></td>- <td></td>- <td><p>The configuration value of the setting. </p></td>- </tr>-- </tbody>- </table>---- <h3 id="bytebase.v1.SettingValue">SettingValue</h3>- <p>The data in setting value.</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>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>prefix_len</td>+ <td><a href="#int32">int32</a></td><td></td><td><p> </p></td></tr>-+<tr>- <td>data_classification</td>- <td><a href="#bytebase.v1.DataClassificationSetting">DataClassificationSetting</a></td>+ <td>suffix_len</td>+ <td><a href="#int32">int32</a></td><td></td><td><p> </p></td></tr>-+<tr>- <td>semantic_type</td>- <td><a href="#bytebase.v1.SemanticTypeSetting">SemanticTypeSetting</a></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>ai</td>- <td><a href="#bytebase.v1.AISetting">AISetting</a></td>+ <td>substitution</td>+ <td><a href="#string">string</a></td><td></td><td><p> </p></td></tr>-++ </tbody>+ </table>++++++ <h3 id="bytebase.v1.Algorithm.MD5Mask">Algorithm.MD5Mask</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>environment</td>- <td><a href="#bytebase.v1.EnvironmentSetting">EnvironmentSetting</a></td>+ <td>salt</td>+ <td><a href="#string">string</a></td><td></td>- <td><p> </p></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.Algorithm.RangeMask">Algorithm.RangeMask</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="#bytebase.v1.EmailSetting">EmailSetting</a></td>- <td></td>- <td><p> </p></td>+ <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.TestEmailSettingRequest">TestEmailSettingRequest</h3>+ <h3 id="bytebase.v1.Algorithm.RangeMask.Slice">Algorithm.RangeMask.Slice</h3><p></p>@@ -12860,189 +13171,159 @@ Example: "settings/SEMANTIC_TYPES" </p></td><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>start</td>+ <td><a href="#int32">int32</a></td><td></td>- <td><p> </p></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>email_setting</td>- <td><a href="#bytebase.v1.EmailSetting">EmailSetting</a></td>+ <td>end</td>+ <td><a href="#int32">int32</a></td><td></td>- <td><p> </p></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>to</td>+ <td>substitution</td><td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>substitution is the string used to replace the OriginalValue[start:end). </p></td></tr>-+</tbody></table>---- <h3 id="bytebase.v1.TestEmailSettingResponse">TestEmailSettingResponse</h3>++++ <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>success</td>- <td><a href="#bool">bool</a></td>+ <td>text</td>+ <td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>The text of announcement </p></td></tr>-+<tr>- <td>error</td>+ <td>link</td><td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>The optional link, user can follow the link to check extra details </p></td></tr>-++ <tr>+ <td>theme</td>+ <td><a href="#bytebase.v1.Announcement.AnnouncementTheme">Announcement.AnnouncementTheme</a></td>+ <td></td>+ <td><p>Banner colors. Built-in presets (info/warning/critical) are a+frontend-only concept that seeds these colors; the store only holds them. </p></td>+ </tr>+</tbody></table>---- <h3 id="bytebase.v1.UpdateSettingRequest">UpdateSettingRequest</h3>- <p>The request message for updating or creating a setting.</p>-+++ <h3 id="bytebase.v1.Announcement.AnnouncementTheme">Announcement.AnnouncementTheme</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>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>background</td>+ <td><a href="#google.type.Color">google.type.Color</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>text</td>+ <td><a href="#google.type.Color">google.type.Color</a></td><td></td><td><p> </p></td></tr>-+</tbody></table>---- <h3 id="bytebase.v1.WorkspaceApprovalSetting">WorkspaceApprovalSetting</h3>++++ <h3 id="bytebase.v1.AppIMSetting">AppIMSetting</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>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.WorkspaceApprovalSetting.Rule">WorkspaceApprovalSetting.Rule</h3>++++ <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>template</td>- <td><a href="#bytebase.v1.ApprovalTemplate">ApprovalTemplate</a></td>+ <td>client_id</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>client_secret</td>+ <td><a href="#string">string</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 REQUEST_ROLE, support: resource.project_id, request.expiration_days, request.role-When source is REQUEST_ACCESS, support: resource.environment_id, resource.project_id, resource.db_engine, resource.database_name, resource.schema_name, resource.table_name, request.unmask, request.data_export--For examples:-resource.environment_id == "prod" && statement.affected_rows >= 100-resource.table_name.matches("sensitive_.*") && resource.db_engine == "MYSQL" </p></td>+ <td><p> </p></td></tr><tr>- <td>source</td>- <td><a href="#bytebase.v1.WorkspaceApprovalSetting.Rule.Source">WorkspaceApprovalSetting.Rule.Source</a></td>+ <td>robot_code</td>+ <td><a href="#string">string</a></td><td></td><td><p> </p></td></tr>@@ -13050,978 +13331,585 @@ resource.table_name.matches("sensitive_.*") && resource.db_engin</tbody></table>---- <h3 id="bytebase.v1.WorkspaceProfileSetting">WorkspaceProfileSetting</h3>++++ <h3 id="bytebase.v1.AppIMSetting.Feishu">AppIMSetting.Feishu</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_url</td>+ <td>app_id</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_request_expiration</td>- <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>- <td></td>- <td><p>The max expiration duration for data access requests. </p></td>+ <td><p> </p></td></tr><tr>- <td>domains</td>+ <td>app_secret</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 password sign-in is disabled for all end users. </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>+ <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>watermark</td>- <td><a href="#bool">bool</a></td>+ <td>type</td>+ <td><a href="#bytebase.v1.WebhookType">WebhookType</a></td><td></td>- <td><p>Whether to display watermark on pages.-Requires ENTERPRISE license. </p></td>+ <td><p> </p></td></tr><tr>- <td>password_restriction</td>- <td><a href="#bytebase.v1.WorkspaceProfileSetting.PasswordRestriction">WorkspaceProfileSetting.PasswordRestriction</a></td>+ <td>slack</td>+ <td><a href="#bytebase.v1.AppIMSetting.Slack">AppIMSetting.Slack</a></td><td></td>- <td><p>Password restriction settings. </p></td>+ <td><p> </p></td></tr><tr>- <td>access_token_duration</td>- <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>+ <td>feishu</td>+ <td><a href="#bytebase.v1.AppIMSetting.Feishu">AppIMSetting.Feishu</a></td><td></td>- <td><p>The duration for access token. Default is 1 hour. </p></td>+ <td><p> </p></td></tr><tr>- <td>enable_debug</td>- <td><a href="#bool">bool</a></td>+ <td>wecom</td>+ <td><a href="#bytebase.v1.AppIMSetting.Wecom">AppIMSetting.Wecom</a></td><td></td>- <td><p>Whether debug mode is enabled. </p></td>+ <td><p> </p></td></tr><tr>- <td>sql_result_size</td>- <td><a href="#int64">int64</a></td>+ <td>lark</td>+ <td><a href="#bytebase.v1.AppIMSetting.Lark">AppIMSetting.Lark</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> </p></td></tr><tr>- <td>query_timeout</td>- <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>+ <td>dingtalk</td>+ <td><a href="#bytebase.v1.AppIMSetting.DingTalk">AppIMSetting.DingTalk</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> </p></td></tr><tr>- <td>allow_email_code_signin</td>- <td><a href="#bool">bool</a></td>+ <td>teams</td>+ <td><a href="#bytebase.v1.AppIMSetting.Teams">AppIMSetting.Teams</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> </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>sql_editor_theme_id</td>+ <td>app_id</td><td><a href="#string">string</a></td><td></td>- <td><p>Enforced SQL Editor theme id: OPAQUE — a frontend-resolved built-in preset id-OR a custom theme's uuid. Empty ⇒ default light. </p></td>- </tr>-- <tr>- <td>sql_editor_custom_theme</td>- <td><a href="#bytebase.v1.SQLEditorThemeSetting">SQLEditorThemeSetting</a></td>- <td></td>- <td><p>The enforced CUSTOM theme's full definition — present ONLY when-sql_editor_theme_id is a custom uuid. tokens is always complete. </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 expiration duration for request role.-Deprecated: use just-in-time access request flows instead. </p></td>+ <td><p> </p></td></tr>-+<tr>- <td>mcp_capability</td>- <td><a href="#bytebase.v1.WorkspaceProfileSetting.MCPCapability">WorkspaceProfileSetting.MCPCapability</a></td>+ <td>app_secret</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>The maximum capability available to MCP (Model Context Protocol) sessions in-this workspace, acting as an admin-set ceiling. Unset is treated as-READ_WRITE for backward compatibility; DISABLED rejects all MCP-connections. Writing MCP_CAPABILITY_UNSPECIFIED explicitly is rejected —-omit the update mask path to leave the ceiling unset. </p></td>+ <td><p> </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>directory_sync_token_configured</td>- <td><a href="#bool">bool</a></td>+ <td>token</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>Whether a directory sync token has been generated for this workspace.-The token itself is never returned; this only lets the UI decide between-offering "generate" and "regenerate". </p></td>+ <td><p> </p></td></tr></tbody></table>---- <h3 id="bytebase.v1.WorkspaceProfileSetting.PasswordRestriction">WorkspaceProfileSetting.PasswordRestriction</h3>++++ <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>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></td>- <td><p>require_uppercase_letter requires the password must contains at least one upper case letter. </p></td>- </tr>-+<tr>- <td>require_special_character</td>- <td><a href="#bool">bool</a></td>+ <td>tenant_id</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>require_special_character requires the password must contains at least one special character. </p></td>+ <td><p>Azure AD tenant ID (Directory ID). </p></td></tr><tr>- <td>require_reset_password_for_first_login</td>- <td><a href="#bool">bool</a></td>+ <td>client_id</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>require_reset_password_for_first_login requires users to reset their password after the 1st login. </p></td>+ <td><p>Azure AD application (client) ID. </p></td></tr><tr>- <td>password_rotation</td>- <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>+ <td>client_secret</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>password_rotation requires users to reset their password after the duration. </p></td>+ <td><p>Azure AD client secret. </p></td></tr></tbody></table>------ <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.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="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.Setting.SettingName">Setting.SettingName</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>-- <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>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>-- <h3 id="bytebase.v1.WorkspaceProfileSetting.MCPCapability">WorkspaceProfileSetting.MCPCapability</h3>- <p>MCPCapability is the maximum capability an MCP (Model Context Protocol)</p><p>session may have in the workspace. It is a ceiling: a session runs at this</p><p>level or lower. Unset (UNSPECIFIED) is treated as READ_WRITE so existing</p><p>workspaces are unaffected.</p>- <table class="enum-table">- <thead>- <tr><td>Name</td><td>Number</td><td>Description</td></tr>- </thead>- <tbody>-- <tr>- <td>MCP_CAPABILITY_UNSPECIFIED</td>- <td>0</td>- <td><p></p></td>- </tr>-- <tr>- <td>DISABLED</td>- <td>1</td>- <td><p>MCP connections are rejected.</p></td>- </tr>-- <tr>- <td>READ_ONLY</td>- <td>3</td>- <td><p>MCP may inspect metadata and run read-only queries. Not enforceable yet:-until per-tool enforcement ships, this fails closed and refuses all MCP-connections, the same as DISABLED.</p></td>- </tr>-- <tr>- <td>READ_WRITE</td>- <td>4</td>- <td><p>MCP may perform mutations, still bounded by the user's RBAC.</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>---- <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>ListSettings</td>- <td>GET</td>- <td>/v1/settings</td>- <td></td>- </tr>----- <tr>- <td>GetSetting</td>- <td>GET</td>- <td>/v1/{name=settings/*}</td>- <td></td>- </tr>----- <tr>- <td>UpdateSetting</td>- <td>PATCH</td>- <td>/v1/{setting.name=settings/*}</td>- <td>setting</td>- </tr>----- <tr>- <td>TestEmailSetting</td>- <td>POST</td>- <td>/v1/{parent=workspaces/*}/settings/EMAIL:test</td>- <td>*</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.AppIMSetting.Wecom">AppIMSetting.Wecom</h3>+ <p></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"><thead><tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr></thead><tbody>-+<tr>- <td>version</td>+ <td>corp_id</td><td><a href="#string">string</a></td><td></td>- <td><p>The Bytebase server version. </p></td>+ <td><p> </p></td></tr><tr>- <td>git_commit</td>+ <td>agent_id</td><td><a href="#string">string</a></td><td></td>- <td><p>The git commit hash of the build. </p></td>+ <td><p> </p></td></tr>-+<tr>- <td>readonly</td>- <td><a href="#bool">bool</a></td>+ <td>secret</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>Whether the Bytebase instance is running in read-only mode. </p></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>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>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>host</td>+ <td>id</td><td><a href="#string">string</a></td><td></td>- <td><p>The host address of the Bytebase instance. </p></td>+ <td><p>id is the uuid for classification. Each project can chose one classification config. </p></td></tr><tr>- <td>port</td>+ <td>title</td><td><a href="#string">string</a></td><td></td>- <td><p>The port number of the Bytebase instance. </p></td>+ <td><p> </p></td></tr><tr>- <td>external_url</td>+ <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>++ </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>The external URL where users or webhook callbacks access Bytebase. </p></td>+ <td><p> </p></td></tr>-+<tr>- <td>last_active_time</td>- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>+ <td>value</td>+ <td><a href="#bytebase.v1.DataClassificationSetting.DataClassificationConfig.DataClassification">DataClassificationSetting.DataClassificationConfig.DataClassification</a></td><td></td>- <td><p>The last time any API call was made, refreshed on each request. </p></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>workspace</td>+ <td>id</td><td><a href="#string">string</a></td><td></td>- <td><p>The unique identifier for the workspace.-Format: workspaces/{id} </p></td>+ <td><p>id is the classification id in [0-9]+-[0-9]+-[0-9]+ format. </p></td></tr><tr>- <td>unlicensed_features</td>+ <td>title</td><td><a href="#string">string</a></td>- <td>repeated</td>- <td><p>List of features that are not licensed. </p></td>+ <td></td>+ <td><p> </p></td></tr><tr>- <td>docker</td>- <td><a href="#bool">bool</a></td>+ <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>title</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>Whether the Bytebase instance is running in Docker. </p></td>+ <td><p> </p></td></tr>-+<tr>- <td>activated_user_count</td>+ <td>level</td><td><a href="#int32">int32</a></td><td></td>- <td><p>The number of activated users. </p></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>activated_instance_count</td>- <td><a href="#int32">int32</a></td>+ <td>from</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>The number of activated database instances. </p></td>+ <td><p> </p></td></tr><tr>- <td>total_instance_count</td>- <td><a href="#int32">int32</a></td>+ <td>from_name</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>The total number of database instances. </p></td>+ <td><p> </p></td></tr>-+<tr>- <td>enable_sample</td>- <td><a href="#bool">bool</a></td>+ <td>type</td>+ <td><a href="#bytebase.v1.EmailSetting.Type">EmailSetting.Type</a></td><td></td>- <td><p>Whether sample data setup is enabled. </p></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>+ </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>external_url_from_flag</td>- <td><a href="#bool">bool</a></td>+ <td>host</td>+ <td><a href="#string">string</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>+ <td><p> </p></td></tr><tr>- <td>replica_count</td>+ <td>port</td><td><a href="#int32">int32</a></td><td></td>- <td><p>The number of active replicas (servers sharing the same database). </p></td>+ <td><p> </p></td></tr>-+<tr>- <td>restriction</td>- <td><a href="#bytebase.v1.Restriction">Restriction</a></td>+ <td>username</td>+ <td><a href="#string">string</a></td><td></td><td><p> </p></td></tr><tr>- <td>default_project</td>+ <td>password</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> </p></td></tr><tr>- <td>user_count_in_iam</td>- <td><a href="#int32">int32</a></td>+ <td>encryption</td>+ <td><a href="#bytebase.v1.EmailSetting.SMTPConfig.Encryption">EmailSetting.SMTPConfig.Encryption</a></td><td></td>- <td><p>The number of users in the workspace IAM (for seat limit display). </p></td>+ <td><p> </p></td></tr>-+<tr>- <td>active_vcs_user_count</td>- <td><a href="#int32">int32</a></td>+ <td>authentication</td>+ <td><a href="#bytebase.v1.EmailSetting.SMTPConfig.Authentication">EmailSetting.SMTPConfig.Authentication</a></td><td></td>- <td><p>The number of active VCS users seen in the active window. </p></td>+ <td><p> </p></td></tr></tbody></table>---- <h3 id="bytebase.v1.GetActuatorInfoRequest">GetActuatorInfoRequest</h3>- <p>Request message for getting actuator information.</p>-+++ <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>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>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.Restriction">Restriction</h3>++++ <h3 id="bytebase.v1.EnvironmentSetting.Environment">EnvironmentSetting.Environment</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>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 resource name of the environment.+Format: environments/{environment}.+Output only. </p></td></tr><tr>- <td>disallow_password_signin</td>- <td><a href="#bool">bool</a></td>+ <td>id</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>Whether password sign-in is disabled for all end users. </p></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>password_restriction</td>- <td><a href="#bytebase.v1.WorkspaceProfileSetting.PasswordRestriction">WorkspaceProfileSetting.PasswordRestriction</a></td>+ <td>title</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>Password complexity and restriction requirements. </p></td>+ <td><p>The display name of the environment. </p></td></tr><tr>- <td>allow_email_code_signin</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>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>password_reset_enabled</td>- <td><a href="#bool">bool</a></td>+ <td>color</td>+ <td><a href="#google.type.Color">google.type.Color</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> </p></td></tr>-+</tbody></table>@@ -14029,106 +13917,41 @@ 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.EnvironmentSetting.Environment.TagsEntry">EnvironmentSetting.Environment.TagsEntry</h3>+ <p></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>- </thead>- <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>- </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>- </tr>-- </tbody>- </table>---- <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>GetActuatorInfo</td>- <td>GET</td>- <td>/v1/actuator/info</td>- <td></td>- </tr>-- <tr>- <td>GetActuatorInfo</td>- <td>GET</td>- <td>/v1/{name=workspaces/*}/actuator/info</td>- <td></td>- </tr>----- <tr>- <td>SetupSample</td>- <td>POST</td>- <td>/v1/actuator:setupSample</td>- <td></td>- </tr>--++ <tr>+ <td>key</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>value</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>+</tbody></table>----- <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>-++++ <h3 id="bytebase.v1.GetSettingRequest">GetSettingRequest</h3>+ <p>The request message for getting a setting.</p>++<table class="field-table"><thead><tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>@@ -14136,100 +13959,65 @@ Permissions required: bb.projects.create</p></td><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>name</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>+ <td></td>+ <td><p>The resource name of the setting. </p></td></tr></tbody></table>---- <h3 id="bytebase.v1.AIChatRequest">AIChatRequest</h3>- <p>Request message for AIService.Chat.</p>-+++ <h3 id="bytebase.v1.GetSettingResponse">GetSettingResponse</h3>+ <p>The response message for getting a 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>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>+ <tbody>++ <tr>+ <td>setting</td>+ <td><a href="#bytebase.v1.Setting">Setting</a></td>+ <td></td>+ <td><p> </p></td></tr></tbody></table>---- <h3 id="bytebase.v1.AIChatResponse">AIChatResponse</h3>- <p>Response message for AIService.Chat.</p>-+++ <h3 id="bytebase.v1.ListSettingsRequest">ListSettingsRequest</h3>+ <p></p>++++++ <h3 id="bytebase.v1.ListSettingsResponse">ListSettingsResponse</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>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>settings</td>+ <td><a href="#bytebase.v1.Setting">Setting</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>+ <td><p>The settings from the specified request. </p></td></tr></tbody>@@ -14237,10 +14025,10 @@ Permissions required: bb.projects.create</p></td>-+- <h3 id="bytebase.v1.AIChatToolCall">AIChatToolCall</h3>- <p>A tool call made by the AI.</p>+ <h3 id="bytebase.v1.SQLEditorThemeSetting">SQLEditorThemeSetting</h3>+ <p></p><table class="field-table">@@ -14253,91 +14041,83 @@ Permissions required: bb.projects.create</p></td><td>id</td><td><a href="#string">string</a></td><td></td>- <td><p>The unique ID of this tool call. </p></td>+ <td><p> </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>+ <td><p> </p></td></tr><tr>- <td>arguments</td>+ <td>monaco_base</td><td><a href="#string">string</a></td><td></td>- <td><p>The JSON-encoded arguments to pass to the tool. </p></td>+ <td><p> </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>+ <td>tokens</td>+ <td><a href="#bytebase.v1.SQLEditorThemeSetting.TokensEntry">SQLEditorThemeSetting.TokensEntry</a></td>+ <td>repeated</td>+ <td><p>CSS token colors. </p></td></tr>-+</tbody></table>---- <h3 id="bytebase.v1.AIChatToolDefinition">AIChatToolDefinition</h3>- <p>A tool definition that the AI can invoke.</p>-+++ <h3 id="bytebase.v1.SQLEditorThemeSetting.TokensEntry">SQLEditorThemeSetting.TokensEntry</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 tool. </p></td>- </tr>-+<tr>- <td>description</td>+ <td>key</td><td><a href="#string">string</a></td><td></td>- <td><p>A description of what the tool does. </p></td>+ <td><p> </p></td></tr>-+<tr>- <td>parameters_schema</td>- <td><a href="#string">string</a></td>+ <td>value</td>+ <td><a href="#google.type.Color">google.type.Color</a></td><td></td>- <td><p>The JSON Schema describing the tool's parameters. </p></td>+ <td><p> </p></td></tr></tbody></table>---- <h3 id="bytebase.v1.AIChatUsage">AIChatUsage</h3>- <p>Token usage for a single AI provider call.</p>-+++ <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>total_tokens</td>- <td><a href="#int32">int32</a></td>- <td></td>- <td><p>Total tokens used by the provider call. </p></td>+ <td>types</td>+ <td><a href="#bytebase.v1.SemanticTypeSetting.SemanticType">SemanticTypeSetting.SemanticType</a></td>+ <td>repeated</td>+ <td><p> </p></td></tr></tbody>@@ -14345,113 +14125,10 @@ Frontend must echo this back unchanged when sending tool results. </p></td>----- <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>----- <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>+ <h3 id="bytebase.v1.SemanticTypeSetting.SemanticType">SemanticTypeSetting.SemanticType</h3>+ <p></p><table class="field-table">@@ -14461,66 +14138,71 @@ and returns the AI response.</p></td><tbody><tr>- <td>role</td>+ <td>id</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>id is the uuid for semantic type. </p></td></tr><tr>- <td>members</td>+ <td>title</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></td>+ <td><p>the title of the semantic type, it should not be empty. </p></td></tr><tr>- <td>condition</td>- <td><a href="#google.type.Expr">google.type.Expr</a></td>+ <td>description</td>+ <td><a href="#string">string</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--Support variables:-resource.database: the database full name in "instances/{instance}/databases/{database}" format, used by any role with SQL Editor read (e.g. "roles/sqlEditorUser", "roles/sqlEditorReadUser") or write (bb.sql.ddl / bb.sql.dml) access, support "==" operator.-resource.schema_name: the schema name, used by any role with SQL Editor read or write (bb.sql.ddl / bb.sql.dml) access; for writes it is evaluated per write-target table, support "==" operator.-resource.table_name: the table name, used by any role with SQL Editor read or write (bb.sql.ddl / bb.sql.dml) access; for writes it is evaluated per write-target table, 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}")`.+ <td><p>the description of the semantic type, it can be empty. </p></td>+ </tr>-Known limitations of table/schema-scoped DDL/DML grants:-- The scope only gates the write target, not the read sources of a write: e.g. `INSERT INTO granted_table SELECT * FROM other_table` may read `other_table` without a grant on it, so a table-scoped write grant is not an exfiltration boundary.-- It must be paired with a database/project-level read grant: a table-scoped grant alone does not satisfy the SQL Editor query method permission (bb.databases.get).-- A resource.schema_name-scoped grant only authorizes a write whose schema is unambiguous — qualify the table (schema.table) or select the schema for the SQL Editor session. An unqualified write whose effective schema cannot be determined ahead of execution is denied (qualify it, or use a table-only grant).-- Multi-statement batches are authorized at the database level: an earlier statement can rebind the session's default schema or database mid-batch, so per-table/schema scoping is dropped and a table/schema-scoped grant requires a database-level grant. The database-level check is still per target database — a qualified cross-database write is gated by a grant on its own database, not the request database — but an unqualified write whose session default is rebound mid-batch is evaluated against the database it literally names, so qualify cross-database writes or run them as single statements.-- A write target in a different project than the SQL-Editor session's database is denied: the per-target check evaluates the session project's IAM policy, so a cross-project write is failed closed (to write it, open the SQL Editor on a database in the target project).-- Enforcement is on the statement's literal write target; writes routed elsewhere by a view/synonym, or into a temporary schema (e.g. pg_temp), are evaluated against what the statement names, not the ultimate base object.-- Write-target gating uses an ALLOWLIST of statement types the resolver models. It does NOT cover every syntactically-identifiable cross-database write; statement types off the allowlist are authorized against the request database. The allowlist is:- - Modeled table/data writes (per-table/schema-scopable): INSERT/UPDATE/DELETE/TRUNCATE/MERGE, LOAD DATA, IMPORT INTO, CREATE TABLE AS / SELECT INTO, and table-level CREATE/DROP/ALTER/RENAME/index.- - Modeled non-table object DDL (gated at the DATABASE level by the object's own explicit database/schema qualifier; an unqualified name keeps the request-database check): CREATE/ALTER/DROP of view, procedure/function/routine, trigger, sequence, synonym, type, and (Oracle) package and cluster; plus Oracle ALTER/DROP MATERIALIZED VIEW (Oracle CREATE MATERIALIZED VIEW is not modeled — see below).- NOT modeled (these fall back to the request-database check, so a qualified cross-database one is authorized against the request database): MySQL CREATE TRIGGER and CREATE/ALTER/DROP EVENT (bare-string AST names); MSSQL ALTER of view/procedure/function/trigger (no ALTER node in the grammar); Oracle CREATE MATERIALIZED VIEW and the niche object DDL — dimension, attribute dimension, hierarchy, analytic view, JSON duality view, materialized zonemap, operator, in-memory join group, property graph, vector index, index type, domain; COPY ... FROM; and engine-specific bulk-load / deprecated text writes. A structural "write-target object database" extraction layer to remove this allowlist dependence is tracked as a follow-up.- - Out of scope (read sources / indirect effects): the tables a write READS (INSERT … SELECT, MERGE … USING, CREATE TABLE AS … SELECT) and objects reached indirectly via views/synonyms/function bodies/triggers are NOT gated.- Invariant: for a statement ON the modeled allowlist that explicitly names a different database as its write target, the ACL uses that target database, not the request database. Statement types OFF the allowlist are authorized against the request database.+ <tr>+ <td>algorithm</td>+ <td><a href="#bytebase.v1.Algorithm">Algorithm</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>-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>+ <td>icon</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></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>parsed_expr</td>- <td><a href="#google.api.expr.v1alpha1.Expr">google.api.expr.v1alpha1.Expr</a></td>+ <td>name</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>The parsed expression of the condition. </p></td>+ <td><p>The resource name of the setting.+Format: settings/{setting}+Example: "settings/SEMANTIC_TYPES" </p></td>+ </tr>++ <tr>+ <td>value</td>+ <td><a href="#bytebase.v1.SettingValue">SettingValue</a></td>+ <td></td>+ <td><p>The configuration value of the setting. </p></td></tr></tbody>@@ -14530,8 +14212,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.SettingValue">SettingValue</h3>+ <p>The data in setting value.</p><table class="field-table">@@ -14541,32 +14223,59 @@ 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>app_im</td>+ <td><a href="#bytebase.v1.AppIMSetting">AppIMSetting</a></td><td></td>- <td><p>The action that was performed on a Binding. </p></td>+ <td><p> </p></td></tr><tr>- <td>role</td>- <td><a href="#string">string</a></td>+ <td>workspace_profile</td>+ <td><a href="#bytebase.v1.WorkspaceProfileSetting">WorkspaceProfileSetting</a></td><td></td>- <td><p>Role that is assigned to `members`.-For example, `roles/projectOwner`. </p></td>+ <td><p> </p></td></tr>-+<tr>- <td>member</td>- <td><a href="#string">string</a></td>+ <td>workspace_approval</td>+ <td><a href="#bytebase.v1.WorkspaceApprovalSetting">WorkspaceApprovalSetting</a></td><td></td>- <td><p>Follows the same format of Binding.members. </p></td>+ <td><p> </p></td></tr>-+<tr>- <td>condition</td>- <td><a href="#google.type.Expr">google.type.Expr</a></td>+ <td>data_classification</td>+ <td><a href="#bytebase.v1.DataClassificationSetting">DataClassificationSetting</a></td><td></td>- <td><p>The condition that is associated with this binding. </p></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> </p></td>+ </tr>++ <tr>+ <td>environment</td>+ <td><a href="#bytebase.v1.EnvironmentSetting">EnvironmentSetting</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>email</td>+ <td><a href="#bytebase.v1.EmailSetting">EmailSetting</a></td>+ <td></td>+ <td><p> </p></td></tr></tbody>@@ -14576,8 +14285,8 @@ 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.TestEmailSettingRequest">TestEmailSettingRequest</h3>+ <p></p><table class="field-table">@@ -14587,12 +14296,24 @@ 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> </p></td>+ </tr>++ <tr>+ <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> </p></td></tr></tbody>@@ -14602,8 +14323,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.TestEmailSettingResponse">TestEmailSettingResponse</h3>+ <p></p><table class="field-table">@@ -14613,44 +14334,63 @@ Format: workspaces/{workspace} </p></td><tbody><tr>- <td>bindings</td>- <td><a href="#bytebase.v1.Binding">Binding</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>+ <td>success</td>+ <td><a href="#bool">bool</a></td>+ <td></td>+ <td><p> </p></td></tr>-+<tr>- <td>etag</td>+ <td>error</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> </p></td></tr>-+</tbody></table>---- <h3 id="bytebase.v1.PolicyDelta">PolicyDelta</h3>- <p>Describes changes between two IAM policies.</p>-+++ <h3 id="bytebase.v1.UpdateSettingRequest">UpdateSettingRequest</h3>+ <p>The request message for updating or creating a 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>setting</td>+ <td><a href="#bytebase.v1.Setting">Setting</a></td>+ <td></td>+ <td><p>The setting to update. </p></td>+ </tr><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>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>update_mask</td>+ <td><a href="#google.protobuf.FieldMask">google.protobuf.FieldMask</a></td>+ <td></td>+ <td><p> </p></td></tr></tbody>@@ -14660,93 +14400,34 @@ 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.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>resource</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>- </tr>-+<tr>- <td>policy</td>- <td><a href="#bytebase.v1.IamPolicy">IamPolicy</a></td>- <td></td>+ <td>rules</td>+ <td><a href="#bytebase.v1.WorkspaceApprovalSetting.Rule">WorkspaceApprovalSetting.Rule</a></td>+ <td>repeated</td><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>----- <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.WorkspaceApprovalSetting.Rule">WorkspaceApprovalSetting.Rule</h3>+ <p></p>-- <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>@@ -14754,10 +14435,50 @@ Format: workspaces/{workspace} </p></td><tbody><tr>- <td>policy_delta</td>- <td><a href="#bytebase.v1.PolicyDelta">PolicyDelta</a></td>+ <td>template</td>+ <td><a href="#bytebase.v1.ApprovalTemplate">ApprovalTemplate</a></td><td></td>- <td><p>Changes to IAM policies. </p></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 REQUEST_ROLE, support: resource.project_id, request.expiration_days, request.role+When source is REQUEST_ACCESS, support: resource.environment_id, resource.project_id, resource.db_engine, resource.database_name, resource.schema_name, resource.table_name, request.unmask, request.data_export++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></td>+ <td><p> </p></td></tr></tbody>@@ -14767,8 +14488,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.WorkspaceProfileSetting">WorkspaceProfileSetting</h3>+ <p></p><table class="field-table">@@ -14778,170 +14499,191 @@ Format: workspaces/{workspace} </p></td><tbody><tr>- <td>name</td>+ <td>external_url</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 external URL is used for sso authentication callback. </p></td></tr><tr>- <td>create_time</td>- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>+ <td>disallow_signup</td>+ <td><a href="#bool">bool</a></td><td></td>- <td><p>The timestamp when the audit log was created. </p></td>+ <td><p>Disallow self-service signup, users can only be invited by the owner. </p></td></tr><tr>- <td>user</td>- <td><a href="#string">string</a></td>+ <td>require_mfa</td>+ <td><a href="#bool">bool</a></td><td></td>- <td><p>The user who performed the action.-Format: users/{email} </p></td>+ <td><p>Require MFA for all users. </p></td></tr><tr>- <td>method</td>- <td><a href="#string">string</a></td>+ <td>refresh_token_duration</td>+ <td><a href="#google.protobuf.Duration">google.protobuf.Duration</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 duration for refresh token. Default is 7 days. </p></td></tr><tr>- <td>severity</td>- <td><a href="#bytebase.v1.AuditLog.Severity">AuditLog.Severity</a></td>+ <td>announcement</td>+ <td><a href="#bytebase.v1.Announcement">Announcement</a></td><td></td>- <td><p>The severity level of this audit log entry. </p></td>+ <td><p>The setting of custom announcement </p></td></tr><tr>- <td>resource</td>- <td><a href="#string">string</a></td>+ <td>maximum_request_expiration</td>+ <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td><td></td>- <td><p>The resource associated with this audit log. </p></td>+ <td><p>The max expiration duration for data access requests. </p></td></tr><tr>- <td>request</td>+ <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>The request payload in JSON format. </p></td>+ <td><p>Only user and group from the domains can be created and login. </p></td></tr><tr>- <td>response</td>- <td><a href="#string">string</a></td>+ <td>database_change_mode</td>+ <td><a href="#bytebase.v1.DatabaseChangeMode">DatabaseChangeMode</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 workspace database change mode. </p></td></tr><tr>- <td>status</td>- <td><a href="#google.rpc.Status">google.rpc.Status</a></td>+ <td>disallow_password_signin</td>+ <td><a href="#bool">bool</a></td><td></td>- <td><p>The status of the operation. </p></td>+ <td><p>Whether password sign-in is disabled for all end users. </p></td></tr><tr>- <td>latency</td>+ <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 duration of the operation. </p></td>+ <td><p>The session expiration time if not activity detected for the user. Value <= 0 means no limit. </p></td></tr><tr>- <td>service_data</td>- <td><a href="#google.protobuf.Any">google.protobuf.Any</a></td>+ <td>enable_audit_log_stdout</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>Whether to enable audit logging to stdout in structured JSON format.+Requires TEAM or ENTERPRISE license. </p></td></tr><tr>- <td>request_metadata</td>- <td><a href="#bytebase.v1.RequestMetadata">RequestMetadata</a></td>+ <td>watermark</td>+ <td><a href="#bool">bool</a></td><td></td>- <td><p>Metadata about the request context. </p></td>+ <td><p>Whether to display watermark on pages.+Requires ENTERPRISE license. </p></td></tr><tr>- <td>mcp_delegation</td>- <td><a href="#bytebase.v1.MCPDelegation">MCPDelegation</a></td>+ <td>password_restriction</td>+ <td><a href="#bytebase.v1.WorkspaceProfileSetting.PasswordRestriction">WorkspaceProfileSetting.PasswordRestriction</a></td><td></td>- <td><p>MCP delegation provenance. Present exactly when the audited call arrived-through the MCP server's delegated credential; never set for public API-calls. Presence of this message is the MCP-origin marker. </p></td>+ <td><p>Password restriction settings. </p></td></tr>-- </tbody>- </table>-+ <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>--- <h3 id="bytebase.v1.ExportAuditLogsRequest">ExportAuditLogsRequest</h3>- <p>Request message for exporting audit logs.</p>+ <tr>+ <td>enable_debug</td>+ <td><a href="#bool">bool</a></td>+ <td></td>+ <td><p>Whether debug mode is enabled. </p></td>+ </tr>-- <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>sql_result_size</td>+ <td><a href="#int64">int64</a></td><td></td>- <td><p> </p></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>filter</td>- <td><a href="#string">string</a></td>+ <td>query_timeout</td>+ <td><a href="#google.protobuf.Duration">google.protobuf.Duration</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 query timeout duration for query and export, works for the SQL Editor and Export Center. </p></td></tr>-+<tr>- <td>order_by</td>+ <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>++ <tr>+ <td>sql_editor_theme_id</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><p>Enforced SQL Editor theme id: OPAQUE — a frontend-resolved built-in preset id+OR a custom theme's uuid. Empty ⇒ default light. </p></td></tr>-+<tr>- <td>format</td>- <td><a href="#bytebase.v1.ExportFormat">ExportFormat</a></td>+ <td>sql_editor_custom_theme</td>+ <td><a href="#bytebase.v1.SQLEditorThemeSetting">SQLEditorThemeSetting</a></td><td></td>- <td><p>The export format. </p></td>+ <td><p>The enforced CUSTOM theme's full definition — present ONLY when+sql_editor_theme_id is a custom uuid. tokens is always complete. </p></td></tr>-+<tr>- <td>page_size</td>- <td><a href="#int32">int32</a></td>+ <td>maximum_role_expiration</td>+ <td><a href="#google.protobuf.Duration">google.protobuf.Duration</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 max expiration duration for request role.+Deprecated: use just-in-time access request flows instead. </p></td></tr>-+<tr>- <td>page_token</td>- <td><a href="#string">string</a></td>+ <td>mcp_capability</td>+ <td><a href="#bytebase.v1.WorkspaceProfileSetting.MCPCapability">WorkspaceProfileSetting.MCPCapability</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 maximum capability available to MCP (Model Context Protocol) sessions in+this workspace, acting as an admin-set ceiling. Unset is treated as+READ_WRITE for backward compatibility; DISABLED rejects all MCP+connections. Writing MCP_CAPABILITY_UNSPECIFIED explicitly is rejected —+omit the update mask path to leave the ceiling unset. </p></td>+ </tr>++ <tr>+ <td>directory_sync_token_configured</td>+ <td><a href="#bool">bool</a></td>+ <td></td>+ <td><p>Whether a directory sync token has been generated for this workspace.+The token itself is never returned; this only lets the UI decide between+offering "generate" and "regenerate". </p></td></tr></tbody>@@ -14951,8 +14693,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.WorkspaceProfileSetting.PasswordRestriction">WorkspaceProfileSetting.PasswordRestriction</h3>+ <p></p><table class="field-table">@@ -14962,279 +14704,400 @@ Provide this to retrieve the subsequent page. </p></td><tbody><tr>- <td>content</td>- <td><a href="#bytes">bytes</a></td>+ <td>min_length</td>+ <td><a href="#int32">int32</a></td><td></td>- <td><p>The exported audit log content in the requested format. </p></td>+ <td><p>min_length is the minimum length for password, should no less than 8. </p></td></tr><tr>- <td>next_page_token</td>- <td><a href="#string">string</a></td>+ <td>require_number</td>+ <td><a href="#bool">bool</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>require_number requires the password must contains at least one number. </p></td></tr>- </tbody>- </table>------ <h3 id="bytebase.v1.MCPDelegation">MCPDelegation</h3>- <p>Provenance of a call that reached the API through the MCP (Model Context</p><p>Protocol) server's delegated credential. The values are copied verbatim from</p><p>the verified credential's grant state; empty fields record that the grant</p><p>stored nothing (legacy sessions), never a resolved or synthesized 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>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>scope</td>- <td><a href="#string">string</a></td>+ <td>require_uppercase_letter</td>+ <td><a href="#bool">bool</a></td><td></td>- <td><p>The OAuth2 grant's consented scope, e.g. "mcp:read-only".-Empty when the grant recorded no scope. </p></td>+ <td><p>require_uppercase_letter requires the password must contains at least one upper case letter. </p></td></tr><tr>- <td>resource</td>- <td><a href="#string">string</a></td>+ <td>require_special_character</td>+ <td><a href="#bool">bool</a></td><td></td>- <td><p>The grant's stored MCP resource URI.-Empty for pre-grant legacy sessions. </p></td>+ <td><p>require_special_character requires the password must contains at least one special character. </p></td></tr><tr>- <td>client_id</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 OAuth2 client the grant was consented to.-Empty for legacy web-session tokens at /mcp. </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>correlation_id</td>- <td><a href="#string">string</a></td>+ <td>password_rotation</td>+ <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td><td></td>- <td><p>Correlates the audit rows an MCP session produces. Minted at the /mcp-boundary and session-scoped: the MCP SDK hands tool handlers the-initialize-time context, so one MCP session carries one correlation ID-across all of its tool calls. </p></td>+ <td><p>password_rotation requires users to reset their password after the duration. </p></td></tr></tbody></table>---- <h3 id="bytebase.v1.RequestMetadata">RequestMetadata</h3>- <p>Metadata about the incoming request.</p>-- <table class="field-table">- <thead>- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>- </thead>- <tbody>-- <tr>- <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>- </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><a href="#string">string</a></td>- <td></td>- <td><p> </p></td>- </tr>-- <tr>- <td>filter</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.+ <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.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>-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>- </table>+ <tr>+ <td>SSL_TLS</td>+ <td>3</td>+ <td><p></p></td>+ </tr>-+ </tbody>+ </table>--- <h3 id="bytebase.v1.SearchAuditLogsResponse">SearchAuditLogsResponse</h3>- <p>Response message for searching audit logs.</p>+ <h3 id="bytebase.v1.EmailSetting.Type">EmailSetting.Type</h3>+ <p></p>+ <table class="enum-table">+ <thead>+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>+ </thead>+ <tbody>-- <table class="field-table">- <thead>- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>- </thead>- <tbody>-- <tr>- <td>audit_logs</td>- <td><a href="#bytebase.v1.AuditLog">AuditLog</a></td>- <td>repeated</td>- <td><p> </p></td>- </tr>-- <tr>- <td>next_page_token</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>- </tr>-- </tbody>- </table>+ <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.AuditLog.Severity">AuditLog.Severity</h3>- <p>Severity level for audit log entries.</p>+ <h3 id="bytebase.v1.Setting.SettingName">Setting.SettingName</h3>+ <p></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>SETTING_NAME_UNSPECIFIED</td><td>0</td>- <td><p>Unspecified severity level.</p></td>+ <td><p></p></td></tr>-+<tr>- <td>DEBUG</td>+ <td>WORKSPACE_PROFILE</td><td>1</td>- <td><p>Debug-level information.</p></td>+ <td><p></p></td></tr>-+<tr>- <td>INFO</td>+ <td>WORKSPACE_APPROVAL</td><td>2</td>- <td><p>Informational messages.</p></td>+ <td><p></p></td></tr>-+<tr>- <td>NOTICE</td>+ <td>APP_IM</td><td>3</td>- <td><p>Notable events.</p></td>+ <td><p></p></td></tr>-+<tr>- <td>WARNING</td>+ <td>AI</td><td>4</td>- <td><p>Warning conditions.</p></td>+ <td><p></p></td></tr>-+<tr>- <td>ERROR</td>+ <td>DATA_CLASSIFICATION</td><td>5</td>- <td><p>Error conditions.</p></td>+ <td><p></p></td></tr>-+<tr>- <td>CRITICAL</td>+ <td>SEMANTIC_TYPES</td><td>6</td>- <td><p>Critical conditions.</p></td>+ <td><p></p></td></tr>-+<tr>- <td>ALERT</td>+ <td>ENVIRONMENT</td><td>7</td>- <td><p>Action must be taken immediately.</p></td>+ <td><p></p></td></tr>-+<tr>- <td>EMERGENCY</td>+ <td>EMAIL</td><td>8</td>- <td><p>System is unusable.</p></td>+ <td><p></p></td>+ </tr>++ </tbody>+ </table>++ <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>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>++ <h3 id="bytebase.v1.WorkspaceProfileSetting.MCPCapability">WorkspaceProfileSetting.MCPCapability</h3>+ <p>MCPCapability is the maximum capability an MCP (Model Context Protocol)</p><p>session may have in the workspace. It is a ceiling: a session runs at this</p><p>level or lower. Unset (UNSPECIFIED) is treated as READ_WRITE so existing</p><p>workspaces are unaffected.</p>+ <table class="enum-table">+ <thead>+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>MCP_CAPABILITY_UNSPECIFIED</td>+ <td>0</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>DISABLED</td>+ <td>1</td>+ <td><p>MCP connections are rejected.</p></td>+ </tr>++ <tr>+ <td>READ_ONLY</td>+ <td>3</td>+ <td><p>MCP may inspect metadata and run read-only queries. Not enforceable yet:+until per-tool enforcement ships, this fails closed and refuses all MCP+connections, the same as DISABLED.</p></td>+ </tr>++ <tr>+ <td>READ_WRITE</td>+ <td>4</td>+ <td><p>MCP may perform mutations, still bounded by the user's RBAC.</p></td></tr></tbody>@@ -15244,8 +15107,8 @@ to retrieve the next page of log entities. </p></td>- <h3 id="bytebase.v1.AuditLogService">AuditLogService</h3>- <p>AuditLogService manages audit logs for system activities and API calls.</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>@@ -15253,19 +15116,35 @@ to retrieve the next page of log entities. </p></td><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>+ <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>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>+ <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>@@ -15289,33 +15168,39 @@ Permissions required: bb.auditLogs.export</p></td><tr>- <td>SearchAuditLogs</td>- <td>POST</td>- <td>/v1/{parent=projects/*}/auditLogs:search</td>- <td>*</td>+ <td>ListSettings</td>+ <td>GET</td>+ <td>/v1/settings</td>+ <td></td></tr>+++<tr>- <td>SearchAuditLogs</td>- <td>POST</td>- <td>/v1/auditLogs:search</td>- <td>*</td>+ <td>GetSetting</td>+ <td>GET</td>+ <td>/v1/{name=settings/*}</td>+ <td></td></tr><tr>- <td>ExportAuditLogs</td>- <td>POST</td>- <td>/v1/{parent=projects/*}/auditLogs:export</td>- <td>*</td>+ <td>UpdateSetting</td>+ <td>PATCH</td>+ <td>/v1/{setting.name=settings/*}</td>+ <td>setting</td></tr>+++<tr>- <td>ExportAuditLogs</td>+ <td>TestEmailSetting</td><td>POST</td>- <td>/v1/auditLogs:export</td>+ <td>/v1/{parent=workspaces/*}/settings/EMAIL:test</td><td>*</td></tr>@@ -16047,6 +15932,38 @@ Permissions required: bb.users.updateEmail</p></td><p></p>+ <h3 id="bytebase.v1.AuthenticationInfo">AuthenticationInfo</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>workspace</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The workspace used for authentication, when one can be resolved.+Format: workspaces/{workspace} </p></td>+ </tr>++ <tr>+ <td>restriction</td>+ <td><a href="#bytebase.v1.Restriction">Restriction</a></td>+ <td></td>+ <td><p>The effective authentication restrictions. </p></td>+ </tr>++ </tbody>+ </table>+++++<h3 id="bytebase.v1.ExchangeTokenRequest">ExchangeTokenRequest</h3><p></p>@@ -16103,6 +16020,33 @@ Format: {name}@workload.bytebase.com </p></td>+ <h3 id="bytebase.v1.GetAuthenticationRestrictionRequest">GetAuthenticationRestrictionRequest</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>workspace</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>Optional. The workspace whose authentication policy should be returned.+Format: workspaces/{workspace}+When unset, self-hosted resolves the singleton workspace and SaaS uses+the deployment-level defaults. </p></td>+ </tr>++ </tbody>+ </table>+++++<h3 id="bytebase.v1.IdentityProviderContext">IdentityProviderContext</h3><p>Context for identity provider authentication.</p>@@ -16415,6 +16359,59 @@ Format: workspaces/{workspace} </p></td>+ <h3 id="bytebase.v1.Restriction">Restriction</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>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>Whether password sign-in is disabled for all end users. </p></td>+ </tr>++ <tr>+ <td>password_restriction</td>+ <td><a href="#bytebase.v1.WorkspaceProfileSetting.PasswordRestriction">WorkspaceProfileSetting.PasswordRestriction</a></td>+ <td></td>+ <td><p>Password complexity and restriction requirements. </p></td>+ </tr>++ <tr>+ <td>allow_email_code_signin</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>+ </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>+ </table>+++++<h3 id="bytebase.v1.SendEmailLoginCodeRequest">SendEmailLoginCodeRequest</h3><p></p>@@ -16554,6 +16551,14 @@ Format: workspaces/{workspace} </p></td></thead><tbody>+ <tr>+ <td>GetAuthenticationRestriction</td>+ <td><a href="#bytebase.v1.GetAuthenticationRestrictionRequest">GetAuthenticationRestrictionRequest</a></td>+ <td><a href="#bytebase.v1.AuthenticationInfo">AuthenticationInfo</a></td>+ <td><p>Gets the effective restrictions needed to render authentication flows.+Permissions required: None</p></td>+ </tr>+<tr><td>Login</td><td><a href="#bytebase.v1.LoginRequest">LoginRequest</a></td>@@ -16651,6 +16656,23 @@ Permissions required: None</p></td>+ <tr>+ <td>GetAuthenticationRestriction</td>+ <td>GET</td>+ <td>/v1/auth/restriction</td>+ <td></td>+ </tr>++ <tr>+ <td>GetAuthenticationRestriction</td>+ <td>GET</td>+ <td>/v1/{workspace=workspaces/*}/auth/restriction</td>+ <td></td>+ </tr>++++<tr><td>Login</td><td>POST</td>@@ -35932,4 +35954,3 @@ Permissions required: bb.workspaces.rotateDirectorySyncToken</p></td></table></body></html>-diff --git a/proto/v1/v1/actuator_service.proto b/proto/v1/v1/actuator_service.protoindex c9485f4b00..2ee0c35447 100644--- a/proto/v1/v1/actuator_service.proto+++ b/proto/v1/v1/actuator_service.proto@@ -5,27 +5,20 @@ package bytebase.v1;import "google/api/annotations.proto";import "google/api/client.proto";import "google/api/field_behavior.proto";-import "google/api/resource.proto";import "google/protobuf/empty.proto";import "google/protobuf/timestamp.proto";import "v1/annotation.proto";-import "v1/setting_service.proto";option go_package = "github.com/bytebase/bytebase/backend/generated-go/v1";// ActuatorService manages system health and operational information.service ActuatorService {// 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+ // The workspace is resolved from the authenticated session.+ // Permissions required: None (authentication required)rpc GetActuatorInfo(GetActuatorInfoRequest) returns (ActuatorInfo) {- option (google.api.http) = {- get: "/v1/actuator/info"- additional_bindings: {get: "/v1/{name=workspaces/*}/actuator/info"}- };+ option (google.api.http) = {get: "/v1/actuator/info"};option (google.api.method_signature) = "";- option (bytebase.v1.allow_without_credential) = true;}// Sets up sample data for demonstration and testing purposes.@@ -45,36 +38,12 @@ service ActuatorService {message SetupSampleRequest {}// Request message for getting actuator information.-message GetActuatorInfoRequest {- // 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).- string name = 1 [(google.api.resource_reference) = {type: "bytebase.com/Workspace"}];-}--message Restriction {- // Whether self-service user signup is disabled.- bool disallow_signup = 1 [(google.api.field_behavior) = OUTPUT_ONLY];-- // Whether password sign-in is disabled for all end users.- bool disallow_password_signin = 2 [(google.api.field_behavior) = OUTPUT_ONLY];-- // Password complexity and restriction requirements.- WorkspaceProfileSetting.PasswordRestriction password_restriction = 3 [(google.api.field_behavior) = OUTPUT_ONLY];-- // Whether email + 6-digit code signin is enabled for this workspace.- bool allow_email_code_signin = 4 [(google.api.field_behavior) = OUTPUT_ONLY];-- // Whether password reset via email is available for this workspace.- // True when the workspace (or deployment) has an email setting configured.- bool password_reset_enabled = 5 [(google.api.field_behavior) = OUTPUT_ONLY];-}+message GetActuatorInfoRequest {}// System information and configuration for the Bytebase instance.// Actuator concept is similar to the Spring Boot Actuator.message ActuatorInfo {- reserved 5, 9, 10, 12, 16, 17, 14;+ reserved 3, 5 to 7, 9, 10, 12, 14, 16 to 19, 25;// The Bytebase server version.string version = 1 [(google.api.field_behavior) = OUTPUT_ONLY];@@ -82,18 +51,9 @@ message ActuatorInfo {// The git commit hash of the build.string git_commit = 2 [(google.api.field_behavior) = OUTPUT_ONLY];- // Whether the Bytebase instance is running in read-only mode.- bool readonly = 3 [(google.api.field_behavior) = OUTPUT_ONLY];-// Whether the Bytebase instance is running in SaaS mode where some features cannot be edited by users.bool saas = 4 [(google.api.field_behavior) = OUTPUT_ONLY];- // The host address of the Bytebase instance.- string host = 6 [(google.api.field_behavior) = OUTPUT_ONLY];-- // The port number of the Bytebase instance.- string port = 7 [(google.api.field_behavior) = OUTPUT_ONLY];-// The external URL where users or webhook callbacks access Bytebase.string external_url = 8 [(google.api.field_behavior) = OUTPUT_ONLY];@@ -107,12 +67,6 @@ message ActuatorInfo {// List of features that are not licensed.repeated string unlicensed_features = 15 [(google.api.field_behavior) = OUTPUT_ONLY];- // Whether the Bytebase instance is running in Docker.- bool docker = 18 [(google.api.field_behavior) = OUTPUT_ONLY];-- // The number of activated users.- int32 activated_user_count = 19 [(google.api.field_behavior) = OUTPUT_ONLY];-// The number of activated database instances.int32 activated_instance_count = 20 [(google.api.field_behavior) = OUTPUT_ONLY];@@ -128,8 +82,6 @@ message ActuatorInfo {// The number of active replicas (servers sharing the same database).int32 replica_count = 24 [(google.api.field_behavior) = OUTPUT_ONLY];- Restriction restriction = 25 [(google.api.field_behavior) = OUTPUT_ONLY];-// The default project for unassigned databases.// Format: projects/{id}string default_project = 26 [(google.api.field_behavior) = OUTPUT_ONLY];diff --git a/proto/v1/v1/auth_service.proto b/proto/v1/v1/auth_service.protoindex 7e74f06844..4145751838 100644--- a/proto/v1/v1/auth_service.proto+++ b/proto/v1/v1/auth_service.proto@@ -3,14 +3,29 @@ syntax = "proto3";package bytebase.v1;import "google/api/annotations.proto";+import "google/api/client.proto";+import "google/api/field_behavior.proto";+import "google/api/resource.proto";import "google/protobuf/empty.proto";import "v1/annotation.proto";+import "v1/setting_service.proto";import "v1/user_service.proto";option go_package = "github.com/bytebase/bytebase/backend/generated-go/v1";// AuthService handles user authentication operations.service AuthService {+ // Gets the effective restrictions needed to render authentication flows.+ // Permissions required: None+ rpc GetAuthenticationRestriction(GetAuthenticationRestrictionRequest) returns (AuthenticationInfo) {+ option (google.api.http) = {+ get: "/v1/auth/restriction"+ additional_bindings: {get: "/v1/{workspace=workspaces/*}/auth/restriction"}+ };+ option (google.api.method_signature) = "";+ option (bytebase.v1.allow_without_credential) = true;+ }+// Authenticates a user and returns access tokens.// Permissions required: Nonerpc Login(LoginRequest) returns (LoginResponse) {@@ -132,6 +147,41 @@ service AuthService {}}+message GetAuthenticationRestrictionRequest {+ // Optional. The workspace whose authentication policy should be returned.+ // Format: workspaces/{workspace}+ // When unset, self-hosted resolves the singleton workspace and SaaS uses+ // the deployment-level defaults.+ string workspace = 1 [(google.api.resource_reference) = {type: "bytebase.com/Workspace"}];+}++message AuthenticationInfo {+ // The workspace used for authentication, when one can be resolved.+ // Format: workspaces/{workspace}+ string workspace = 1 [(google.api.field_behavior) = OUTPUT_ONLY];++ // The effective authentication restrictions.+ Restriction restriction = 2 [(google.api.field_behavior) = OUTPUT_ONLY];+}++message Restriction {+ // Whether self-service user signup is disabled.+ bool disallow_signup = 1 [(google.api.field_behavior) = OUTPUT_ONLY];++ // Whether password sign-in is disabled for all end users.+ bool disallow_password_signin = 2 [(google.api.field_behavior) = OUTPUT_ONLY];++ // Password complexity and restriction requirements.+ WorkspaceProfileSetting.PasswordRestriction password_restriction = 3 [(google.api.field_behavior) = OUTPUT_ONLY];++ // Whether email + 6-digit code signin is enabled for this workspace.+ bool allow_email_code_signin = 4 [(google.api.field_behavior) = OUTPUT_ONLY];++ // Whether password reset via email is available for this workspace.+ // True when the workspace (or deployment) has an email setting configured.+ bool password_reset_enabled = 5 [(google.api.field_behavior) = OUTPUT_ONLY];+}+message LoginRequest {// User's email address.string email = 1;