Skip to content

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

refactor: im setting (#17923)

ecmadaoc3af31fcc4a1
diff --git a/backend/api/v1/setting_service.go b/backend/api/v1/setting_service.go
index f0b24cbae1..905b739c49 100644
--- a/backend/api/v1/setting_service.go
+++ b/backend/api/v1/setting_service.go
@@ -314,44 +314,67 @@ func (s *SettingService) UpdateSetting(ctx context.Context, request *connect.Req
storeSettingValue = request.Msg.Setting.Value.GetStringValue()
case storepb.SettingName_APP_IM:
- payload := convertAppIMSetting(request.Msg.Setting.Value.GetAppImSettingValue())
- setting, err := s.store.GetAppIMSetting(ctx)
+ payload, err := convertAppIMSetting(request.Msg.Setting.Value.GetAppImSettingValue())
if err != nil {
- return nil, connect.NewError(connect.CodeInternal, errors.Errorf("failed to get old app im setting"))
+ return nil, err
}
- if request.Msg.UpdateMask == nil {
- return nil, connect.NewError(connect.CodeInvalidArgument, errors.Errorf("update mask is required"))
+
+ // Helper function to find or create an IM setting entry by type
+ findIMSetting := func(imType storepb.ProjectWebhook_Type) *storepb.AppIMSetting_IMSetting {
+ for _, s := range payload.Settings {
+ if s.Type == imType {
+ return s
+ }
+ }
+ return nil
}
- for _, path := range request.Msg.UpdateMask.Paths {
+
+ for _, path := range request.Msg.GetUpdateMask().GetPaths() {
switch path {
case "value.app_im_setting_value.slack":
- if err := slack.ValidateToken(ctx, payload.Slack.GetToken()); err != nil {
+ slackSetting := findIMSetting(storepb.ProjectWebhook_SLACK)
+ if slackSetting == nil || slackSetting.GetSlack() == nil {
+ return nil, connect.NewError(connect.CodeInvalidArgument, errors.New("cannot found slack setting"))
+ }
+ if err := slack.ValidateToken(ctx, slackSetting.GetSlack().GetToken()); err != nil {
return nil, connect.NewError(connect.CodeInvalidArgument, errors.Errorf("validation failed, error: %v", err))
}
- setting.Slack = payload.Slack
case "value.app_im_setting_value.feishu":
- if err := feishu.Validate(ctx, payload.GetFeishu().GetAppId(), payload.GetFeishu().GetAppSecret(), user.Email); err != nil {
+ feishuSetting := findIMSetting(storepb.ProjectWebhook_FEISHU)
+ if feishuSetting == nil || feishuSetting.GetFeishu() == nil {
+ return nil, connect.NewError(connect.CodeInvalidArgument, errors.New("cannot found feishu setting"))
+ }
+ if err := feishu.Validate(ctx, feishuSetting.GetFeishu().GetAppId(), feishuSetting.GetFeishu().GetAppSecret(), user.Email); err != nil {
return nil, connect.NewError(connect.CodeInvalidArgument, errors.Errorf("validation failed, error: %v", err))
}
- setting.Feishu = payload.Feishu
case "value.app_im_setting_value.wecom":
- if err := wecom.Validate(ctx, payload.GetWecom().GetCorpId(), payload.GetWecom().GetAgentId(), payload.GetWecom().GetSecret()); err != nil {
+ wecomSetting := findIMSetting(storepb.ProjectWebhook_WECOM)
+ if wecomSetting == nil || wecomSetting.GetWecom() == nil {
+ return nil, connect.NewError(connect.CodeInvalidArgument, errors.New("cannot found wecom setting"))
+ }
+ if err := wecom.Validate(ctx, wecomSetting.GetWecom().GetCorpId(), wecomSetting.GetWecom().GetAgentId(), wecomSetting.GetWecom().GetSecret()); err != nil {
return nil, connect.NewError(connect.CodeInvalidArgument, errors.Errorf("validation failed, error: %v", err))
}
- setting.Wecom = payload.Wecom
case "value.app_im_setting_value.lark":
- if err := lark.Validate(ctx, payload.GetLark().GetAppId(), payload.GetLark().GetAppSecret(), user.Email); err != nil {
+ larkSetting := findIMSetting(storepb.ProjectWebhook_LARK)
+ if larkSetting == nil || larkSetting.GetLark() == nil {
+ return nil, connect.NewError(connect.CodeInvalidArgument, errors.New("cannot found lark setting"))
+ }
+ if err := lark.Validate(ctx, larkSetting.GetLark().GetAppId(), larkSetting.GetLark().GetAppSecret(), user.Email); err != nil {
return nil, connect.NewError(connect.CodeInvalidArgument, errors.Errorf("validation failed, error: %v", err))
}
- setting.Lark = payload.Lark
+
case "value.app_im_setting_value.dingtalk":
- if err := dingtalk.Validate(ctx, payload.GetDingtalk().GetClientId(), payload.GetDingtalk().GetClientSecret(), payload.GetDingtalk().RobotCode, user.Phone); err != nil {
+ dingtalkSetting := findIMSetting(storepb.ProjectWebhook_DINGTALK)
+ if dingtalkSetting == nil || dingtalkSetting.GetDingtalk() == nil {
+ return nil, connect.NewError(connect.CodeInvalidArgument, errors.New("cannot found dingtalk setting"))
+ }
+ if err := dingtalk.Validate(ctx, dingtalkSetting.GetDingtalk().GetClientId(), dingtalkSetting.GetDingtalk().GetClientSecret(), dingtalkSetting.GetDingtalk().GetRobotCode(), user.Phone); err != nil {
return nil, connect.NewError(connect.CodeInvalidArgument, errors.Errorf("validation failed, error: %v", err))
}
- setting.Dingtalk = payload.Dingtalk
default:
return nil, connect.NewError(connect.CodeInvalidArgument, errors.Errorf("invalid update mask path %v", path))
@@ -368,7 +391,7 @@ func (s *SettingService) UpdateSetting(ctx context.Context, request *connect.Req
}), nil
}
- bytes, err := protojson.Marshal(setting)
+ bytes, err := protojson.Marshal(payload)
if err != nil {
return nil, connect.NewError(connect.CodeInternal, errors.Errorf("failed to marshal setting for %s, error: %v", apiSettingName, err))
}
diff --git a/backend/api/v1/setting_service_converter.go b/backend/api/v1/setting_service_converter.go
index 9faeea8149..dd573185ac 100644
--- a/backend/api/v1/setting_service_converter.go
+++ b/backend/api/v1/setting_service_converter.go
@@ -21,27 +21,12 @@ func convertToSettingMessage(setting *store.SettingMessage, profile *config.Prof
if err := common.ProtojsonUnmarshaler.Unmarshal([]byte(setting.Value), storeValue); err != nil {
return nil, connect.NewError(connect.CodeInternal, errors.Errorf("failed to unmarshal setting value for %s with error: %v", setting.Name, err))
}
+ v1Value := convertToAppIMSetting(storeValue)
return &v1pb.Setting{
Name: settingName,
Value: &v1pb.Value{
Value: &v1pb.Value_AppImSettingValue{
- AppImSettingValue: &v1pb.AppIMSetting{
- Slack: &v1pb.AppIMSetting_Slack{
- Enabled: storeValue.GetSlack().GetEnabled(),
- },
- Feishu: &v1pb.AppIMSetting_Feishu{
- Enabled: storeValue.GetFeishu().GetEnabled(),
- },
- Wecom: &v1pb.AppIMSetting_Wecom{
- Enabled: storeValue.GetWecom().GetEnabled(),
- },
- Lark: &v1pb.AppIMSetting_Lark{
- Enabled: storeValue.GetLark().GetEnabled(),
- },
- Dingtalk: &v1pb.AppIMSetting_DingTalk{
- Enabled: storeValue.GetDingtalk().GetEnabled(),
- },
- },
+ AppImSettingValue: v1Value,
},
},
}, nil
@@ -514,51 +499,105 @@ func convertApprovalFlow(v1Flow *v1pb.ApprovalFlow) *storepb.ApprovalFlow {
}
}
-func convertAppIMSetting(v1Setting *v1pb.AppIMSetting) *storepb.AppIMSetting {
+func convertAppIMSetting(v1Setting *v1pb.AppIMSetting) (*storepb.AppIMSetting, error) {
if v1Setting == nil {
- return nil
+ return nil, nil
}
storeSetting := &storepb.AppIMSetting{}
-
- if v1Setting.Slack != nil {
- storeSetting.Slack = &storepb.AppIMSetting_Slack{
- Enabled: v1Setting.Slack.Enabled,
- Token: v1Setting.Slack.Token,
+ findIMType := map[v1pb.Webhook_Type]bool{}
+ for _, setting := range v1Setting.Settings {
+ if findIMType[setting.Type] {
+ return nil, connect.NewError(connect.CodeInvalidArgument, errors.Errorf("duplicate im type %v", setting.Type.String()))
}
- }
- if v1Setting.Feishu != nil {
- storeSetting.Feishu = &storepb.AppIMSetting_Feishu{
- Enabled: v1Setting.Feishu.Enabled,
- AppId: v1Setting.Feishu.AppId,
- AppSecret: v1Setting.Feishu.AppSecret,
+ findIMType[setting.Type] = true
+
+ imSetting := &storepb.AppIMSetting_IMSetting{
+ Type: storepb.ProjectWebhook_Type(setting.Type),
}
- }
- if v1Setting.Wecom != nil {
- storeSetting.Wecom = &storepb.AppIMSetting_Wecom{
- Enabled: v1Setting.Wecom.Enabled,
- CorpId: v1Setting.Wecom.CorpId,
- AgentId: v1Setting.Wecom.AgentId,
- Secret: v1Setting.Wecom.Secret,
+ switch payload := setting.Payload.(type) {
+ case *v1pb.AppIMSetting_IMSetting_Slack:
+ imSetting.Payload = &storepb.AppIMSetting_IMSetting_Slack{
+ Slack: &storepb.AppIMSetting_Slack{
+ Token: payload.Slack.Token,
+ },
+ }
+ case *v1pb.AppIMSetting_IMSetting_Feishu:
+ imSetting.Payload = &storepb.AppIMSetting_IMSetting_Feishu{
+ Feishu: &storepb.AppIMSetting_Feishu{
+ AppId: payload.Feishu.AppId,
+ AppSecret: payload.Feishu.AppSecret,
+ },
+ }
+ case *v1pb.AppIMSetting_IMSetting_Wecom:
+ imSetting.Payload = &storepb.AppIMSetting_IMSetting_Wecom{
+ Wecom: &storepb.AppIMSetting_Wecom{
+ CorpId: payload.Wecom.CorpId,
+ AgentId: payload.Wecom.AgentId,
+ Secret: payload.Wecom.Secret,
+ },
+ }
+ case *v1pb.AppIMSetting_IMSetting_Lark:
+ imSetting.Payload = &storepb.AppIMSetting_IMSetting_Lark{
+ Lark: &storepb.AppIMSetting_Lark{
+ AppId: payload.Lark.AppId,
+ AppSecret: payload.Lark.AppSecret,
+ },
+ }
+ case *v1pb.AppIMSetting_IMSetting_Dingtalk:
+ imSetting.Payload = &storepb.AppIMSetting_IMSetting_Dingtalk{
+ Dingtalk: &storepb.AppIMSetting_DingTalk{
+ ClientId: payload.Dingtalk.ClientId,
+ ClientSecret: payload.Dingtalk.ClientSecret,
+ RobotCode: payload.Dingtalk.RobotCode,
+ },
+ }
+ default:
+ return nil, connect.NewError(connect.CodeInvalidArgument, errors.Errorf("unsupport im type %v", setting.Type.String()))
}
+ storeSetting.Settings = append(storeSetting.Settings, imSetting)
}
- if v1Setting.Lark != nil {
- storeSetting.Lark = &storepb.AppIMSetting_Lark{
- Enabled: v1Setting.Lark.Enabled,
- AppId: v1Setting.Lark.AppId,
- AppSecret: v1Setting.Lark.AppSecret,
- }
+
+ return storeSetting, nil
+}
+
+func convertToAppIMSetting(storeSetting *storepb.AppIMSetting) *v1pb.AppIMSetting {
+ if storeSetting == nil {
+ return nil
}
- if v1Setting.Dingtalk != nil {
- storeSetting.Dingtalk = &storepb.AppIMSetting_DingTalk{
- Enabled: v1Setting.Dingtalk.Enabled,
- ClientId: v1Setting.Dingtalk.ClientId,
- ClientSecret: v1Setting.Dingtalk.ClientSecret,
- RobotCode: v1Setting.Dingtalk.RobotCode,
+
+ v1Setting := &v1pb.AppIMSetting{}
+ for _, setting := range storeSetting.Settings {
+ imSetting := &v1pb.AppIMSetting_IMSetting{
+ Type: v1pb.Webhook_Type(setting.Type),
+ }
+ switch setting.Type {
+ case storepb.ProjectWebhook_SLACK:
+ imSetting.Payload = &v1pb.AppIMSetting_IMSetting_Slack{
+ Slack: &v1pb.AppIMSetting_Slack{},
+ }
+ case storepb.ProjectWebhook_FEISHU:
+ imSetting.Payload = &v1pb.AppIMSetting_IMSetting_Feishu{
+ Feishu: &v1pb.AppIMSetting_Feishu{},
+ }
+ case storepb.ProjectWebhook_WECOM:
+ imSetting.Payload = &v1pb.AppIMSetting_IMSetting_Wecom{
+ Wecom: &v1pb.AppIMSetting_Wecom{},
+ }
+ case storepb.ProjectWebhook_LARK:
+ imSetting.Payload = &v1pb.AppIMSetting_IMSetting_Lark{
+ Lark: &v1pb.AppIMSetting_Lark{},
+ }
+ case storepb.ProjectWebhook_DINGTALK:
+ imSetting.Payload = &v1pb.AppIMSetting_IMSetting_Dingtalk{
+ Dingtalk: &v1pb.AppIMSetting_DingTalk{},
+ }
+ default:
}
+ v1Setting.Settings = append(v1Setting.Settings, imSetting)
}
- return storeSetting
+ return v1Setting
}
func convertDataClassificationSetting(v1Setting *v1pb.DataClassificationSetting) *storepb.DataClassificationSetting {
diff --git a/backend/generated-go/store/setting.pb.go b/backend/generated-go/store/setting.pb.go
index 9081ebcd80..08e115186b 100644
--- a/backend/generated-go/store/setting.pb.go
+++ b/backend/generated-go/store/setting.pb.go
@@ -837,12 +837,8 @@ func (*Algorithm_Md5Mask) isAlgorithm_Mask() {}
func (*Algorithm_InnerOuterMask_) isAlgorithm_Mask() {}
type AppIMSetting struct {
- state protoimpl.MessageState `protogen:"open.v1"`
- Slack *AppIMSetting_Slack `protobuf:"bytes,1,opt,name=slack,proto3" json:"slack,omitempty"`
- Feishu *AppIMSetting_Feishu `protobuf:"bytes,2,opt,name=feishu,proto3" json:"feishu,omitempty"`
- Wecom *AppIMSetting_Wecom `protobuf:"bytes,3,opt,name=wecom,proto3" json:"wecom,omitempty"`
- Lark *AppIMSetting_Lark `protobuf:"bytes,4,opt,name=lark,proto3" json:"lark,omitempty"`
- Dingtalk *AppIMSetting_DingTalk `protobuf:"bytes,5,opt,name=dingtalk,proto3" json:"dingtalk,omitempty"`
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Settings []*AppIMSetting_IMSetting `protobuf:"bytes,1,rep,name=settings,proto3" json:"settings,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
@@ -877,37 +873,9 @@ func (*AppIMSetting) Descriptor() ([]byte, []int) {
return file_store_setting_proto_rawDescGZIP(), []int{7}
}
-func (x *AppIMSetting) GetSlack() *AppIMSetting_Slack {
- if x != nil {
- return x.Slack
- }
- return nil
-}
-
-func (x *AppIMSetting) GetFeishu() *AppIMSetting_Feishu {
+func (x *AppIMSetting) GetSettings() []*AppIMSetting_IMSetting {
if x != nil {
- return x.Feishu
- }
- return nil
-}
-
-func (x *AppIMSetting) GetWecom() *AppIMSetting_Wecom {
- if x != nil {
- return x.Wecom
- }
- return nil
-}
-
-func (x *AppIMSetting) GetLark() *AppIMSetting_Lark {
- if x != nil {
- return x.Lark
- }
- return nil
-}
-
-func (x *AppIMSetting) GetDingtalk() *AppIMSetting_DingTalk {
- if x != nil {
- return x.Dingtalk
+ return x.Settings
}
return nil
}
@@ -2011,8 +1979,7 @@ func (x *Algorithm_RangeMask_Slice) GetSubstitution() string {
type AppIMSetting_Slack struct {
state protoimpl.MessageState `protogen:"open.v1"`
- Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"`
- Token string `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"`
+ Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
@@ -2047,13 +2014,6 @@ func (*AppIMSetting_Slack) Descriptor() ([]byte, []int) {
return file_store_setting_proto_rawDescGZIP(), []int{7, 0}
}
-func (x *AppIMSetting_Slack) GetEnabled() bool {
- if x != nil {
- return x.Enabled
- }
- return false
-}
-
func (x *AppIMSetting_Slack) GetToken() string {
if x != nil {
return x.Token
@@ -2063,9 +2023,8 @@ func (x *AppIMSetting_Slack) GetToken() string {
type AppIMSetting_Feishu struct {
state protoimpl.MessageState `protogen:"open.v1"`
- Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"`
- AppId string `protobuf:"bytes,2,opt,name=app_id,json=appId,proto3" json:"app_id,omitempty"`
- AppSecret string `protobuf:"bytes,3,opt,name=app_secret,json=appSecret,proto3" json:"app_secret,omitempty"`
+ AppId string `protobuf:"bytes,1,opt,name=app_id,json=appId,proto3" json:"app_id,omitempty"`
+ AppSecret string `protobuf:"bytes,2,opt,name=app_secret,json=appSecret,proto3" json:"app_secret,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
@@ -2100,13 +2059,6 @@ func (*AppIMSetting_Feishu) Descriptor() ([]byte, []int) {
return file_store_setting_proto_rawDescGZIP(), []int{7, 1}
}
-func (x *AppIMSetting_Feishu) GetEnabled() bool {
- if x != nil {
- return x.Enabled
- }
- return false
-}
-
func (x *AppIMSetting_Feishu) GetAppId() string {
if x != nil {
return x.AppId
@@ -2123,10 +2075,9 @@ func (x *AppIMSetting_Feishu) GetAppSecret() string {
type AppIMSetting_Wecom struct {
state protoimpl.MessageState `protogen:"open.v1"`
- Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"`
- CorpId string `protobuf:"bytes,2,opt,name=corp_id,json=corpId,proto3" json:"corp_id,omitempty"`
- AgentId string `protobuf:"bytes,3,opt,name=agent_id,json=agentId,proto3" json:"agent_id,omitempty"`
- Secret string `protobuf:"bytes,4,opt,name=secret,proto3" json:"secret,omitempty"`
+ CorpId string `protobuf:"bytes,1,opt,name=corp_id,json=corpId,proto3" json:"corp_id,omitempty"`
+ AgentId string `protobuf:"bytes,2,opt,name=agent_id,json=agentId,proto3" json:"agent_id,omitempty"`
+ Secret string `protobuf:"bytes,3,opt,name=secret,proto3" json:"secret,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
@@ -2161,13 +2112,6 @@ func (*AppIMSetting_Wecom) Descriptor() ([]byte, []int) {
return file_store_setting_proto_rawDescGZIP(), []int{7, 2}
}
-func (x *AppIMSetting_Wecom) GetEnabled() bool {
- if x != nil {
- return x.Enabled
- }
- return false
-}
-
func (x *AppIMSetting_Wecom) GetCorpId() string {
if x != nil {
return x.CorpId
@@ -2191,9 +2135,8 @@ func (x *AppIMSetting_Wecom) GetSecret() string {
type AppIMSetting_Lark struct {
state protoimpl.MessageState `protogen:"open.v1"`
- Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"`
- AppId string `protobuf:"bytes,2,opt,name=app_id,json=appId,proto3" json:"app_id,omitempty"`
- AppSecret string `protobuf:"bytes,3,opt,name=app_secret,json=appSecret,proto3" json:"app_secret,omitempty"`
+ AppId string `protobuf:"bytes,1,opt,name=app_id,json=appId,proto3" json:"app_id,omitempty"`
+ AppSecret string `protobuf:"bytes,2,opt,name=app_secret,json=appSecret,proto3" json:"app_secret,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
@@ -2228,13 +2171,6 @@ func (*AppIMSetting_Lark) Descriptor() ([]byte, []int) {
return file_store_setting_proto_rawDescGZIP(), []int{7, 3}
}
-func (x *AppIMSetting_Lark) GetEnabled() bool {
- if x != nil {
- return x.Enabled
- }
- return false
-}
-
func (x *AppIMSetting_Lark) GetAppId() string {
if x != nil {
return x.AppId
@@ -2251,10 +2187,9 @@ func (x *AppIMSetting_Lark) GetAppSecret() string {
type AppIMSetting_DingTalk struct {
state protoimpl.MessageState `protogen:"open.v1"`
- Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"`
- ClientId string `protobuf:"bytes,2,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"`
- ClientSecret string `protobuf:"bytes,3,opt,name=client_secret,json=clientSecret,proto3" json:"client_secret,omitempty"`
- RobotCode string `protobuf:"bytes,4,opt,name=robot_code,json=robotCode,proto3" json:"robot_code,omitempty"`
+ ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"`
+ ClientSecret string `protobuf:"bytes,2,opt,name=client_secret,json=clientSecret,proto3" json:"client_secret,omitempty"`
+ RobotCode string `protobuf:"bytes,3,opt,name=robot_code,json=robotCode,proto3" json:"robot_code,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
@@ -2289,13 +2224,6 @@ func (*AppIMSetting_DingTalk) Descriptor() ([]byte, []int) {
return file_store_setting_proto_rawDescGZIP(), []int{7, 4}
}
-func (x *AppIMSetting_DingTalk) GetEnabled() bool {
- if x != nil {
- return x.Enabled
- }
- return false
-}
-
func (x *AppIMSetting_DingTalk) GetClientId() string {
if x != nil {
return x.ClientId
@@ -2317,6 +2245,144 @@ func (x *AppIMSetting_DingTalk) GetRobotCode() string {
return ""
}
+type AppIMSetting_IMSetting struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Type ProjectWebhook_Type `protobuf:"varint,1,opt,name=type,proto3,enum=bytebase.store.ProjectWebhook_Type" json:"type,omitempty"`
+ // Types that are valid to be assigned to Payload:
+ //
+ // *AppIMSetting_IMSetting_Slack
+ // *AppIMSetting_IMSetting_Feishu
+ // *AppIMSetting_IMSetting_Wecom
+ // *AppIMSetting_IMSetting_Lark
+ // *AppIMSetting_IMSetting_Dingtalk
+ Payload isAppIMSetting_IMSetting_Payload `protobuf_oneof:"payload"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *AppIMSetting_IMSetting) Reset() {
+ *x = AppIMSetting_IMSetting{}
+ mi := &file_store_setting_proto_msgTypes[31]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *AppIMSetting_IMSetting) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*AppIMSetting_IMSetting) ProtoMessage() {}
+
+func (x *AppIMSetting_IMSetting) ProtoReflect() protoreflect.Message {
+ mi := &file_store_setting_proto_msgTypes[31]
+ 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 AppIMSetting_IMSetting.ProtoReflect.Descriptor instead.
+func (*AppIMSetting_IMSetting) Descriptor() ([]byte, []int) {
+ return file_store_setting_proto_rawDescGZIP(), []int{7, 5}
+}
+
+func (x *AppIMSetting_IMSetting) GetType() ProjectWebhook_Type {
+ if x != nil {
+ return x.Type
+ }
+ return ProjectWebhook_TYPE_UNSPECIFIED
+}
+
+func (x *AppIMSetting_IMSetting) GetPayload() isAppIMSetting_IMSetting_Payload {
+ if x != nil {
+ return x.Payload
+ }
+ return nil
+}
+
+func (x *AppIMSetting_IMSetting) GetSlack() *AppIMSetting_Slack {
+ if x != nil {
+ if x, ok := x.Payload.(*AppIMSetting_IMSetting_Slack); ok {
+ return x.Slack
+ }
+ }
+ return nil
+}
+
+func (x *AppIMSetting_IMSetting) GetFeishu() *AppIMSetting_Feishu {
+ if x != nil {
+ if x, ok := x.Payload.(*AppIMSetting_IMSetting_Feishu); ok {
+ return x.Feishu
+ }
+ }
+ return nil
+}
+
+func (x *AppIMSetting_IMSetting) GetWecom() *AppIMSetting_Wecom {
+ if x != nil {
+ if x, ok := x.Payload.(*AppIMSetting_IMSetting_Wecom); ok {
+ return x.Wecom
+ }
+ }
+ return nil
+}
+
+func (x *AppIMSetting_IMSetting) GetLark() *AppIMSetting_Lark {
+ if x != nil {
+ if x, ok := x.Payload.(*AppIMSetting_IMSetting_Lark); ok {
+ return x.Lark
+ }
+ }
+ return nil
+}
+
+func (x *AppIMSetting_IMSetting) GetDingtalk() *AppIMSetting_DingTalk {
+ if x != nil {
+ if x, ok := x.Payload.(*AppIMSetting_IMSetting_Dingtalk); ok {
+ return x.Dingtalk
+ }
+ }
+ return nil
+}
+
+type isAppIMSetting_IMSetting_Payload interface {
+ isAppIMSetting_IMSetting_Payload()
+}
+
+type AppIMSetting_IMSetting_Slack struct {
+ Slack *AppIMSetting_Slack `protobuf:"bytes,2,opt,name=slack,proto3,oneof"`
+}
+
+type AppIMSetting_IMSetting_Feishu struct {
+ Feishu *AppIMSetting_Feishu `protobuf:"bytes,3,opt,name=feishu,proto3,oneof"`
+}
+
+type AppIMSetting_IMSetting_Wecom struct {
+ Wecom *AppIMSetting_Wecom `protobuf:"bytes,4,opt,name=wecom,proto3,oneof"`
+}
+
+type AppIMSetting_IMSetting_Lark struct {
+ Lark *AppIMSetting_Lark `protobuf:"bytes,5,opt,name=lark,proto3,oneof"`
+}
+
+type AppIMSetting_IMSetting_Dingtalk struct {
+ Dingtalk *AppIMSetting_DingTalk `protobuf:"bytes,6,opt,name=dingtalk,proto3,oneof"`
+}
+
+func (*AppIMSetting_IMSetting_Slack) isAppIMSetting_IMSetting_Payload() {}
+
+func (*AppIMSetting_IMSetting_Feishu) isAppIMSetting_IMSetting_Payload() {}
+
+func (*AppIMSetting_IMSetting_Wecom) isAppIMSetting_IMSetting_Payload() {}
+
+func (*AppIMSetting_IMSetting_Lark) isAppIMSetting_IMSetting_Payload() {}
+
+func (*AppIMSetting_IMSetting_Dingtalk) isAppIMSetting_IMSetting_Payload() {}
+
type EnvironmentSetting_Environment struct {
state protoimpl.MessageState `protogen:"open.v1"`
// The resource id of the environment.
@@ -2333,7 +2399,7 @@ type EnvironmentSetting_Environment struct {
func (x *EnvironmentSetting_Environment) Reset() {
*x = EnvironmentSetting_Environment{}
- mi := &file_store_setting_proto_msgTypes[31]
+ mi := &file_store_setting_proto_msgTypes[32]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -2345,7 +2411,7 @@ func (x *EnvironmentSetting_Environment) String() string {
func (*EnvironmentSetting_Environment) ProtoMessage() {}
func (x *EnvironmentSetting_Environment) ProtoReflect() protoreflect.Message {
- mi := &file_store_setting_proto_msgTypes[31]
+ mi := &file_store_setting_proto_msgTypes[32]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -2393,7 +2459,7 @@ var File_store_setting_proto protoreflect.FileDescriptor
const file_store_setting_proto_rawDesc = "" +
"\n" +
- "\x13store/setting.proto\x12\x0ebytebase.store\x1a\x1egoogle/protobuf/duration.proto\x1a\x16google/type/expr.proto\x1a\x14store/approval.proto\x1a\x12store/common.proto\x1a\x14store/database.proto\"\xce\x05\n" +
+ "\x13store/setting.proto\x12\x0ebytebase.store\x1a\x1egoogle/protobuf/duration.proto\x1a\x16google/type/expr.proto\x1a\x14store/approval.proto\x1a\x12store/common.proto\x1a\x14store/database.proto\x1a\x1bstore/project_webhook.proto\"\xce\x05\n" +
"\x17WorkspaceProfileSetting\x12!\n" +
"\fexternal_url\x18\x01 \x01(\tR\vexternalUrl\x12'\n" +
"\x0fdisallow_signup\x18\x02 \x01(\bR\x0edisallowSignup\x12\x1f\n" +
@@ -2501,37 +2567,36 @@ const file_store_setting_proto_rawDesc = "" +
"\x15MASK_TYPE_UNSPECIFIED\x10\x00\x12\t\n" +
"\x05INNER\x10\x01\x12\t\n" +
"\x05OUTER\x10\x02B\x06\n" +
- "\x04mask\"\x9b\x06\n" +
- "\fAppIMSetting\x128\n" +
- "\x05slack\x18\x01 \x01(\v2\".bytebase.store.AppIMSetting.SlackR\x05slack\x12;\n" +
- "\x06feishu\x18\x02 \x01(\v2#.bytebase.store.AppIMSetting.FeishuR\x06feishu\x128\n" +
- "\x05wecom\x18\x03 \x01(\v2\".bytebase.store.AppIMSetting.WecomR\x05wecom\x125\n" +
- "\x04lark\x18\x04 \x01(\v2!.bytebase.store.AppIMSetting.LarkR\x04lark\x12A\n" +
- "\bdingtalk\x18\x05 \x01(\v2%.bytebase.store.AppIMSetting.DingTalkR\bdingtalk\x1a7\n" +
- "\x05Slack\x12\x18\n" +
- "\aenabled\x18\x01 \x01(\bR\aenabled\x12\x14\n" +
- "\x05token\x18\x02 \x01(\tR\x05token\x1aX\n" +
- "\x06Feishu\x12\x18\n" +
- "\aenabled\x18\x01 \x01(\bR\aenabled\x12\x15\n" +
- "\x06app_id\x18\x02 \x01(\tR\x05appId\x12\x1d\n" +
+ "\x04mask\"\xb8\x06\n" +
+ "\fAppIMSetting\x12B\n" +
+ "\bsettings\x18\x01 \x03(\v2&.bytebase.store.AppIMSetting.IMSettingR\bsettings\x1a\x1d\n" +
+ "\x05Slack\x12\x14\n" +
+ "\x05token\x18\x01 \x01(\tR\x05token\x1a>\n" +
+ "\x06Feishu\x12\x15\n" +
+ "\x06app_id\x18\x01 \x01(\tR\x05appId\x12\x1d\n" +
"\n" +
- "app_secret\x18\x03 \x01(\tR\tappSecret\x1am\n" +
- "\x05Wecom\x12\x18\n" +
- "\aenabled\x18\x01 \x01(\bR\aenabled\x12\x17\n" +
- "\acorp_id\x18\x02 \x01(\tR\x06corpId\x12\x19\n" +
- "\bagent_id\x18\x03 \x01(\tR\aagentId\x12\x16\n" +
- "\x06secret\x18\x04 \x01(\tR\x06secret\x1aV\n" +
- "\x04Lark\x12\x18\n" +
- "\aenabled\x18\x01 \x01(\bR\aenabled\x12\x15\n" +
- "\x06app_id\x18\x02 \x01(\tR\x05appId\x12\x1d\n" +
+ "app_secret\x18\x02 \x01(\tR\tappSecret\x1aS\n" +
+ "\x05Wecom\x12\x17\n" +
+ "\acorp_id\x18\x01 \x01(\tR\x06corpId\x12\x19\n" +
+ "\bagent_id\x18\x02 \x01(\tR\aagentId\x12\x16\n" +
+ "\x06secret\x18\x03 \x01(\tR\x06secret\x1a<\n" +
+ "\x04Lark\x12\x15\n" +
+ "\x06app_id\x18\x01 \x01(\tR\x05appId\x12\x1d\n" +
"\n" +
- "app_secret\x18\x03 \x01(\tR\tappSecret\x1a\x85\x01\n" +
- "\bDingTalk\x12\x18\n" +
- "\aenabled\x18\x01 \x01(\bR\aenabled\x12\x1b\n" +
- "\tclient_id\x18\x02 \x01(\tR\bclientId\x12#\n" +
- "\rclient_secret\x18\x03 \x01(\tR\fclientSecret\x12\x1d\n" +
+ "app_secret\x18\x02 \x01(\tR\tappSecret\x1ak\n" +
+ "\bDingTalk\x12\x1b\n" +
+ "\tclient_id\x18\x01 \x01(\tR\bclientId\x12#\n" +
+ "\rclient_secret\x18\x02 \x01(\tR\fclientSecret\x12\x1d\n" +
"\n" +
- "robot_code\x18\x04 \x01(\tR\trobotCode\"#\n" +
+ "robot_code\x18\x03 \x01(\tR\trobotCode\x1a\x84\x03\n" +
+ "\tIMSetting\x127\n" +
+ "\x04type\x18\x01 \x01(\x0e2#.bytebase.store.ProjectWebhook.TypeR\x04type\x12:\n" +
+ "\x05slack\x18\x02 \x01(\v2\".bytebase.store.AppIMSetting.SlackH\x00R\x05slack\x12=\n" +
+ "\x06feishu\x18\x03 \x01(\v2#.bytebase.store.AppIMSetting.FeishuH\x00R\x06feishu\x12:\n" +
+ "\x05wecom\x18\x04 \x01(\v2\".bytebase.store.AppIMSetting.WecomH\x00R\x05wecom\x127\n" +
+ "\x04lark\x18\x05 \x01(\v2!.bytebase.store.AppIMSetting.LarkH\x00R\x04lark\x12C\n" +
+ "\bdingtalk\x18\x06 \x01(\v2%.bytebase.store.AppIMSetting.DingTalkH\x00R\bdingtalkB\t\n" +
+ "\apayload\"#\n" +
"\vSCIMSetting\x12\x14\n" +
"\x05token\x18\x01 \x01(\tR\x05token\"\x9a\x03\n" +
"\x1aPasswordRestrictionSetting\x12\x1d\n" +
@@ -2608,7 +2673,7 @@ func file_store_setting_proto_rawDescGZIP() []byte {
}
var file_store_setting_proto_enumTypes = make([]protoimpl.EnumInfo, 5)
-var file_store_setting_proto_msgTypes = make([]protoimpl.MessageInfo, 33)
+var file_store_setting_proto_msgTypes = make([]protoimpl.MessageInfo, 34)
var file_store_setting_proto_goTypes = []any{
(SettingName)(0), // 0: bytebase.store.SettingName
(DatabaseChangeMode)(0), // 1: bytebase.store.DatabaseChangeMode
@@ -2646,23 +2711,25 @@ var file_store_setting_proto_goTypes = []any{
(*AppIMSetting_Wecom)(nil), // 33: bytebase.store.AppIMSetting.Wecom
(*AppIMSetting_Lark)(nil), // 34: bytebase.store.AppIMSetting.Lark
(*AppIMSetting_DingTalk)(nil), // 35: bytebase.store.AppIMSetting.DingTalk
- (*EnvironmentSetting_Environment)(nil), // 36: bytebase.store.EnvironmentSetting.Environment
- nil, // 37: bytebase.store.EnvironmentSetting.Environment.TagsEntry
- (*durationpb.Duration)(nil), // 38: google.protobuf.Duration
- (*ApprovalTemplate)(nil), // 39: bytebase.store.ApprovalTemplate
- (*expr.Expr)(nil), // 40: google.type.Expr
- (Engine)(0), // 41: bytebase.store.Engine
- (*ColumnMetadata)(nil), // 42: bytebase.store.ColumnMetadata
- (*ColumnCatalog)(nil), // 43: bytebase.store.ColumnCatalog
- (*TableMetadata)(nil), // 44: bytebase.store.TableMetadata
- (*TableCatalog)(nil), // 45: bytebase.store.TableCatalog
+ (*AppIMSetting_IMSetting)(nil), // 36: bytebase.store.AppIMSetting.IMSetting
+ (*EnvironmentSetting_Environment)(nil), // 37: bytebase.store.EnvironmentSetting.Environment
+ nil, // 38: bytebase.store.EnvironmentSetting.Environment.TagsEntry
+ (*durationpb.Duration)(nil), // 39: google.protobuf.Duration
+ (*ApprovalTemplate)(nil), // 40: bytebase.store.ApprovalTemplate
+ (*expr.Expr)(nil), // 41: google.type.Expr
+ (Engine)(0), // 42: bytebase.store.Engine
+ (*ColumnMetadata)(nil), // 43: bytebase.store.ColumnMetadata
+ (*ColumnCatalog)(nil), // 44: bytebase.store.ColumnCatalog
+ (*TableMetadata)(nil), // 45: bytebase.store.TableMetadata
+ (*TableCatalog)(nil), // 46: bytebase.store.TableCatalog
+ (ProjectWebhook_Type)(0), // 47: bytebase.store.ProjectWebhook.Type
}
var file_store_setting_proto_depIdxs = []int32{
- 38, // 0: bytebase.store.WorkspaceProfileSetting.token_duration:type_name -> google.protobuf.Duration
+ 39, // 0: bytebase.store.WorkspaceProfileSetting.token_duration:type_name -> google.protobuf.Duration
6, // 1: bytebase.store.WorkspaceProfileSetting.announcement:type_name -> bytebase.store.Announcement
- 38, // 2: bytebase.store.WorkspaceProfileSetting.maximum_role_expiration:type_name -> google.protobuf.Duration
+ 39, // 2: bytebase.store.WorkspaceProfileSetting.maximum_role_expiration:type_name -> google.protobuf.Duration
1, // 3: bytebase.store.WorkspaceProfileSetting.database_change_mode:type_name -> bytebase.store.DatabaseChangeMode
- 38, // 4: bytebase.store.WorkspaceProfileSetting.inactive_session_timeout:type_name -> google.protobuf.Duration
+ 39, // 4: bytebase.store.WorkspaceProfileSetting.inactive_session_timeout:type_name -> google.protobuf.Duration
2, // 5: bytebase.store.Announcement.level:type_name -> bytebase.store.Announcement.AlertLevel
17, // 6: bytebase.store.WorkspaceApprovalSetting.rules:type_name -> bytebase.store.WorkspaceApprovalSetting.Rule
18, // 7: bytebase.store.SchemaTemplateSetting.field_templates:type_name -> bytebase.store.SchemaTemplateSetting.FieldTemplate
@@ -2674,35 +2741,37 @@ var file_store_setting_proto_depIdxs = []int32{
27, // 13: bytebase.store.Algorithm.range_mask:type_name -> bytebase.store.Algorithm.RangeMask
28, // 14: bytebase.store.Algorithm.md5_mask:type_name -> bytebase.store.Algorithm.MD5Mask
29, // 15: bytebase.store.Algorithm.inner_outer_mask:type_name -> bytebase.store.Algorithm.InnerOuterMask
- 31, // 16: bytebase.store.AppIMSetting.slack:type_name -> bytebase.store.AppIMSetting.Slack
- 32, // 17: bytebase.store.AppIMSetting.feishu:type_name -> bytebase.store.AppIMSetting.Feishu
- 33, // 18: bytebase.store.AppIMSetting.wecom:type_name -> bytebase.store.AppIMSetting.Wecom
- 34, // 19: bytebase.store.AppIMSetting.lark:type_name -> bytebase.store.AppIMSetting.Lark
- 35, // 20: bytebase.store.AppIMSetting.dingtalk:type_name -> bytebase.store.AppIMSetting.DingTalk
- 38, // 21: bytebase.store.PasswordRestrictionSetting.password_rotation:type_name -> google.protobuf.Duration
- 4, // 22: bytebase.store.AISetting.provider:type_name -> bytebase.store.AISetting.Provider
- 36, // 23: bytebase.store.EnvironmentSetting.environments:type_name -> bytebase.store.EnvironmentSetting.Environment
- 39, // 24: bytebase.store.WorkspaceApprovalSetting.Rule.template:type_name -> bytebase.store.ApprovalTemplate
- 40, // 25: bytebase.store.WorkspaceApprovalSetting.Rule.condition:type_name -> google.type.Expr
- 41, // 26: bytebase.store.SchemaTemplateSetting.FieldTemplate.engine:type_name -> bytebase.store.Engine
- 42, // 27: bytebase.store.SchemaTemplateSetting.FieldTemplate.column:type_name -> bytebase.store.ColumnMetadata
- 43, // 28: bytebase.store.SchemaTemplateSetting.FieldTemplate.catalog:type_name -> bytebase.store.ColumnCatalog
- 41, // 29: bytebase.store.SchemaTemplateSetting.ColumnType.engine:type_name -> bytebase.store.Engine
- 41, // 30: bytebase.store.SchemaTemplateSetting.TableTemplate.engine:type_name -> bytebase.store.Engine
- 44, // 31: bytebase.store.SchemaTemplateSetting.TableTemplate.table:type_name -> bytebase.store.TableMetadata
- 45, // 32: bytebase.store.SchemaTemplateSetting.TableTemplate.catalog:type_name -> bytebase.store.TableCatalog
- 22, // 33: bytebase.store.DataClassificationSetting.DataClassificationConfig.levels:type_name -> bytebase.store.DataClassificationSetting.DataClassificationConfig.Level
- 24, // 34: bytebase.store.DataClassificationSetting.DataClassificationConfig.classification:type_name -> bytebase.store.DataClassificationSetting.DataClassificationConfig.ClassificationEntry
- 23, // 35: bytebase.store.DataClassificationSetting.DataClassificationConfig.ClassificationEntry.value:type_name -> bytebase.store.DataClassificationSetting.DataClassificationConfig.DataClassification
- 11, // 36: bytebase.store.SemanticTypeSetting.SemanticType.algorithm:type_name -> bytebase.store.Algorithm
- 30, // 37: bytebase.store.Algorithm.RangeMask.slices:type_name -> bytebase.store.Algorithm.RangeMask.Slice
- 3, // 38: bytebase.store.Algorithm.InnerOuterMask.type:type_name -> bytebase.store.Algorithm.InnerOuterMask.MaskType
- 37, // 39: bytebase.store.EnvironmentSetting.Environment.tags:type_name -> bytebase.store.EnvironmentSetting.Environment.TagsEntry
- 40, // [40:40] is the sub-list for method output_type
- 40, // [40:40] is the sub-list for method input_type
- 40, // [40:40] is the sub-list for extension type_name
- 40, // [40:40] is the sub-list for extension extendee
- 0, // [0:40] is the sub-list for field type_name
+ 36, // 16: bytebase.store.AppIMSetting.settings:type_name -> bytebase.store.AppIMSetting.IMSetting
+ 39, // 17: bytebase.store.PasswordRestrictionSetting.password_rotation:type_name -> google.protobuf.Duration
+ 4, // 18: bytebase.store.AISetting.provider:type_name -> bytebase.store.AISetting.Provider
+ 37, // 19: bytebase.store.EnvironmentSetting.environments:type_name -> bytebase.store.EnvironmentSetting.Environment
+ 40, // 20: bytebase.store.WorkspaceApprovalSetting.Rule.template:type_name -> bytebase.store.ApprovalTemplate
+ 41, // 21: bytebase.store.WorkspaceApprovalSetting.Rule.condition:type_name -> google.type.Expr
+ 42, // 22: bytebase.store.SchemaTemplateSetting.FieldTemplate.engine:type_name -> bytebase.store.Engine
+ 43, // 23: bytebase.store.SchemaTemplateSetting.FieldTemplate.column:type_name -> bytebase.store.ColumnMetadata
+ 44, // 24: bytebase.store.SchemaTemplateSetting.FieldTemplate.catalog:type_name -> bytebase.store.ColumnCatalog
+ 42, // 25: bytebase.store.SchemaTemplateSetting.ColumnType.engine:type_name -> bytebase.store.Engine
+ 42, // 26: bytebase.store.SchemaTemplateSetting.TableTemplate.engine:type_name -> bytebase.store.Engine
+ 45, // 27: bytebase.store.SchemaTemplateSetting.TableTemplate.table:type_name -> bytebase.store.TableMetadata
+ 46, // 28: bytebase.store.SchemaTemplateSetting.TableTemplate.catalog:type_name -> bytebase.store.TableCatalog
+ 22, // 29: bytebase.store.DataClassificationSetting.DataClassificationConfig.levels:type_name -> bytebase.store.DataClassificationSetting.DataClassificationConfig.Level
+ 24, // 30: bytebase.store.DataClassificationSetting.DataClassificationConfig.classification:type_name -> bytebase.store.DataClassificationSetting.DataClassificationConfig.ClassificationEntry
+ 23, // 31: bytebase.store.DataClassificationSetting.DataClassificationConfig.ClassificationEntry.value:type_name -> bytebase.store.DataClassificationSetting.DataClassificationConfig.DataClassification
+ 11, // 32: bytebase.store.SemanticTypeSetting.SemanticType.algorithm:type_name -> bytebase.store.Algorithm
+ 30, // 33: bytebase.store.Algorithm.RangeMask.slices:type_name -> bytebase.store.Algorithm.RangeMask.Slice
+ 3, // 34: bytebase.store.Algorithm.InnerOuterMask.type:type_name -> bytebase.store.Algorithm.InnerOuterMask.MaskType
+ 47, // 35: bytebase.store.AppIMSetting.IMSetting.type:type_name -> bytebase.store.ProjectWebhook.Type
+ 31, // 36: bytebase.store.AppIMSetting.IMSetting.slack:type_name -> bytebase.store.AppIMSetting.Slack
+ 32, // 37: bytebase.store.AppIMSetting.IMSetting.feishu:type_name -> bytebase.store.AppIMSetting.Feishu
+ 33, // 38: bytebase.store.AppIMSetting.IMSetting.wecom:type_name -> bytebase.store.AppIMSetting.Wecom
+ 34, // 39: bytebase.store.AppIMSetting.IMSetting.lark:type_name -> bytebase.store.AppIMSetting.Lark
+ 35, // 40: bytebase.store.AppIMSetting.IMSetting.dingtalk:type_name -> bytebase.store.AppIMSetting.DingTalk
+ 38, // 41: bytebase.store.EnvironmentSetting.Environment.tags:type_name -> bytebase.store.EnvironmentSetting.Environment.TagsEntry
+ 42, // [42:42] is the sub-list for method output_type
+ 42, // [42:42] is the sub-list for method input_type
+ 42, // [42:42] is the sub-list for extension type_name
+ 42, // [42:42] is the sub-list for extension extendee
+ 0, // [0:42] is the sub-list for field type_name
}
func init() { file_store_setting_proto_init() }
@@ -2713,6 +2782,7 @@ func file_store_setting_proto_init() {
file_store_approval_proto_init()
file_store_common_proto_init()
file_store_database_proto_init()
+ file_store_project_webhook_proto_init()
file_store_setting_proto_msgTypes[6].OneofWrappers = []any{
(*Algorithm_FullMask_)(nil),
(*Algorithm_RangeMask_)(nil),
@@ -2720,13 +2790,20 @@ func file_store_setting_proto_init() {
(*Algorithm_InnerOuterMask_)(nil),
}
file_store_setting_proto_msgTypes[18].OneofWrappers = []any{}
+ file_store_setting_proto_msgTypes[31].OneofWrappers = []any{
+ (*AppIMSetting_IMSetting_Slack)(nil),
+ (*AppIMSetting_IMSetting_Feishu)(nil),
+ (*AppIMSetting_IMSetting_Wecom)(nil),
+ (*AppIMSetting_IMSetting_Lark)(nil),
+ (*AppIMSetting_IMSetting_Dingtalk)(nil),
+ }
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_store_setting_proto_rawDesc), len(file_store_setting_proto_rawDesc)),
NumEnums: 5,
- NumMessages: 33,
+ NumMessages: 34,
NumExtensions: 0,
NumServices: 0,
},
diff --git a/backend/generated-go/store/setting_equal.pb.go b/backend/generated-go/store/setting_equal.pb.go
index 4b2984b8db..72e096196c 100644
--- a/backend/generated-go/store/setting_equal.pb.go
+++ b/backend/generated-go/store/setting_equal.pb.go
@@ -477,9 +477,6 @@ func (x *AppIMSetting_Slack) Equal(y *AppIMSetting_Slack) bool {
if x == nil || y == nil {
return x == nil && y == nil
}
- if x.Enabled != y.Enabled {
- return false
- }
if x.Token != y.Token {
return false
}
@@ -493,9 +490,6 @@ func (x *AppIMSetting_Feishu) Equal(y *AppIMSetting_Feishu) bool {
if x == nil || y == nil {
return x == nil && y == nil
}
- if x.Enabled != y.Enabled {
- return false
- }
if x.AppId != y.AppId {
return false
}
@@ -512,9 +506,6 @@ func (x *AppIMSetting_Wecom) Equal(y *AppIMSetting_Wecom) bool {
if x == nil || y == nil {
return x == nil && y == nil
}
- if x.Enabled != y.Enabled {
- return false
- }
if x.CorpId != y.CorpId {
return false
}
@@ -534,9 +525,6 @@ func (x *AppIMSetting_Lark) Equal(y *AppIMSetting_Lark) bool {
if x == nil || y == nil {
return x == nil && y == nil
}
- if x.Enabled != y.Enabled {
- return false
- }
if x.AppId != y.AppId {
return false
}
@@ -553,9 +541,6 @@ func (x *AppIMSetting_DingTalk) Equal(y *AppIMSetting_DingTalk) bool {
if x == nil || y == nil {
return x == nil && y == nil
}
- if x.Enabled != y.Enabled {
- return false
- }
if x.ClientId != y.ClientId {
return false
}
@@ -568,31 +553,52 @@ func (x *AppIMSetting_DingTalk) Equal(y *AppIMSetting_DingTalk) bool {
return true
}
-func (x *AppIMSetting) Equal(y *AppIMSetting) bool {
+func (x *AppIMSetting_IMSetting) Equal(y *AppIMSetting_IMSetting) bool {
if x == y {
return true
}
if x == nil || y == nil {
return x == nil && y == nil
}
- if !x.Slack.Equal(y.Slack) {
+ if x.Type != y.Type {
+ return false
+ }
+ if !x.GetSlack().Equal(y.GetSlack()) {
return false
}
- if !x.Feishu.Equal(y.Feishu) {
+ if !x.GetFeishu().Equal(y.GetFeishu()) {
return false
}
- if !x.Wecom.Equal(y.Wecom) {
+ if !x.GetWecom().Equal(y.GetWecom()) {
return false
}
- if !x.Lark.Equal(y.Lark) {
+ if !x.GetLark().Equal(y.GetLark()) {
return false
}
- if !x.Dingtalk.Equal(y.Dingtalk) {
+ if !x.GetDingtalk().Equal(y.GetDingtalk()) {
return false
}
return true
}
+func (x *AppIMSetting) Equal(y *AppIMSetting) bool {
+ if x == y {
+ return true
+ }
+ if x == nil || y == nil {
+ return x == nil && y == nil
+ }
+ if len(x.Settings) != len(y.Settings) {
+ return false
+ }
+ for i := 0; i < len(x.Settings); i++ {
+ if !x.Settings[i].Equal(y.Settings[i]) {
+ return false
+ }
+ }
+ return true
+}
+
func (x *SCIMSetting) Equal(y *SCIMSetting) bool {
if x == y {
return true
diff --git a/backend/generated-go/v1/setting_service.pb.go b/backend/generated-go/v1/setting_service.pb.go
index d4fb5facbc..3f0aa2fc99 100644
--- a/backend/generated-go/v1/setting_service.pb.go
+++ b/backend/generated-go/v1/setting_service.pb.go
@@ -859,12 +859,8 @@ func (*Value_AiSetting) isValue_Value() {}
func (*Value_EnvironmentSetting) isValue_Value() {}
type AppIMSetting struct {
- state protoimpl.MessageState `protogen:"open.v1"`
- Slack *AppIMSetting_Slack `protobuf:"bytes,1,opt,name=slack,proto3" json:"slack,omitempty"`
- Feishu *AppIMSetting_Feishu `protobuf:"bytes,2,opt,name=feishu,proto3" json:"feishu,omitempty"`
- Wecom *AppIMSetting_Wecom `protobuf:"bytes,3,opt,name=wecom,proto3" json:"wecom,omitempty"`
- Lark *AppIMSetting_Lark `protobuf:"bytes,4,opt,name=lark,proto3" json:"lark,omitempty"`
- Dingtalk *AppIMSetting_DingTalk `protobuf:"bytes,5,opt,name=dingtalk,proto3" json:"dingtalk,omitempty"`
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Settings []*AppIMSetting_IMSetting `protobuf:"bytes,1,rep,name=settings,proto3" json:"settings,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
@@ -899,37 +895,9 @@ func (*AppIMSetting) Descriptor() ([]byte, []int) {
return file_v1_setting_service_proto_rawDescGZIP(), []int{7}
}
-func (x *AppIMSetting) GetSlack() *AppIMSetting_Slack {
+func (x *AppIMSetting) GetSettings() []*AppIMSetting_IMSetting {
if x != nil {
- return x.Slack
- }
- return nil
-}
-
-func (x *AppIMSetting) GetFeishu() *AppIMSetting_Feishu {
- if x != nil {
- return x.Feishu
- }
- return nil
-}
-
-func (x *AppIMSetting) GetWecom() *AppIMSetting_Wecom {
- if x != nil {
- return x.Wecom
- }
- return nil
-}
-
-func (x *AppIMSetting) GetLark() *AppIMSetting_Lark {
- if x != nil {
- return x.Lark
- }
- return nil
-}
-
-func (x *AppIMSetting) GetDingtalk() *AppIMSetting_DingTalk {
- if x != nil {
- return x.Dingtalk
+ return x.Settings
}
return nil
}
@@ -1720,8 +1688,7 @@ func (x *EnvironmentSetting) GetEnvironments() []*EnvironmentSetting_Environment
type AppIMSetting_Slack struct {
state protoimpl.MessageState `protogen:"open.v1"`
- Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"`
- Token string `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"`
+ Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
@@ -1756,13 +1723,6 @@ func (*AppIMSetting_Slack) Descriptor() ([]byte, []int) {
return file_v1_setting_service_proto_rawDescGZIP(), []int{7, 0}
}
-func (x *AppIMSetting_Slack) GetEnabled() bool {
- if x != nil {
- return x.Enabled
- }
- return false
-}
-
func (x *AppIMSetting_Slack) GetToken() string {
if x != nil {
return x.Token
@@ -1772,9 +1732,8 @@ func (x *AppIMSetting_Slack) GetToken() string {
type AppIMSetting_Feishu struct {
state protoimpl.MessageState `protogen:"open.v1"`
- Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"`
- AppId string `protobuf:"bytes,2,opt,name=app_id,json=appId,proto3" json:"app_id,omitempty"`
- AppSecret string `protobuf:"bytes,3,opt,name=app_secret,json=appSecret,proto3" json:"app_secret,omitempty"`
+ AppId string `protobuf:"bytes,1,opt,name=app_id,json=appId,proto3" json:"app_id,omitempty"`
+ AppSecret string `protobuf:"bytes,2,opt,name=app_secret,json=appSecret,proto3" json:"app_secret,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
@@ -1809,13 +1768,6 @@ func (*AppIMSetting_Feishu) Descriptor() ([]byte, []int) {
return file_v1_setting_service_proto_rawDescGZIP(), []int{7, 1}
}
-func (x *AppIMSetting_Feishu) GetEnabled() bool {
- if x != nil {
- return x.Enabled
- }
- return false
-}
-
func (x *AppIMSetting_Feishu) GetAppId() string {
if x != nil {
return x.AppId
@@ -1832,10 +1784,9 @@ func (x *AppIMSetting_Feishu) GetAppSecret() string {
type AppIMSetting_Wecom struct {
state protoimpl.MessageState `protogen:"open.v1"`
- Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"`
- CorpId string `protobuf:"bytes,2,opt,name=corp_id,json=corpId,proto3" json:"corp_id,omitempty"`
- AgentId string `protobuf:"bytes,3,opt,name=agent_id,json=agentId,proto3" json:"agent_id,omitempty"`
- Secret string `protobuf:"bytes,4,opt,name=secret,proto3" json:"secret,omitempty"`
+ CorpId string `protobuf:"bytes,1,opt,name=corp_id,json=corpId,proto3" json:"corp_id,omitempty"`
+ AgentId string `protobuf:"bytes,2,opt,name=agent_id,json=agentId,proto3" json:"agent_id,omitempty"`
+ Secret string `protobuf:"bytes,3,opt,name=secret,proto3" json:"secret,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
@@ -1870,13 +1821,6 @@ func (*AppIMSetting_Wecom) Descriptor() ([]byte, []int) {
return file_v1_setting_service_proto_rawDescGZIP(), []int{7, 2}
}
-func (x *AppIMSetting_Wecom) GetEnabled() bool {
- if x != nil {
- return x.Enabled
- }
- return false
-}
-
func (x *AppIMSetting_Wecom) GetCorpId() string {
if x != nil {
return x.CorpId
@@ -1900,9 +1844,8 @@ func (x *AppIMSetting_Wecom) GetSecret() string {
type AppIMSetting_Lark struct {
state protoimpl.MessageState `protogen:"open.v1"`
- Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"`
- AppId string `protobuf:"bytes,2,opt,name=app_id,json=appId,proto3" json:"app_id,omitempty"`
- AppSecret string `protobuf:"bytes,3,opt,name=app_secret,json=appSecret,proto3" json:"app_secret,omitempty"`
+ AppId string `protobuf:"bytes,1,opt,name=app_id,json=appId,proto3" json:"app_id,omitempty"`
+ AppSecret string `protobuf:"bytes,2,opt,name=app_secret,json=appSecret,proto3" json:"app_secret,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
@@ -1937,13 +1880,6 @@ func (*AppIMSetting_Lark) Descriptor() ([]byte, []int) {
return file_v1_setting_service_proto_rawDescGZIP(), []int{7, 3}
}
-func (x *AppIMSetting_Lark) GetEnabled() bool {
- if x != nil {
- return x.Enabled
- }
- return false
-}
-
func (x *AppIMSetting_Lark) GetAppId() string {
if x != nil {
return x.AppId
@@ -1960,10 +1896,9 @@ func (x *AppIMSetting_Lark) GetAppSecret() string {
type AppIMSetting_DingTalk struct {
state protoimpl.MessageState `protogen:"open.v1"`
- Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"`
- ClientId string `protobuf:"bytes,2,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"`
- ClientSecret string `protobuf:"bytes,3,opt,name=client_secret,json=clientSecret,proto3" json:"client_secret,omitempty"`
- RobotCode string `protobuf:"bytes,4,opt,name=robot_code,json=robotCode,proto3" json:"robot_code,omitempty"`
+ ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"`
+ ClientSecret string `protobuf:"bytes,2,opt,name=client_secret,json=clientSecret,proto3" json:"client_secret,omitempty"`
+ RobotCode string `protobuf:"bytes,3,opt,name=robot_code,json=robotCode,proto3" json:"robot_code,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
@@ -1998,13 +1933,6 @@ func (*AppIMSetting_DingTalk) Descriptor() ([]byte, []int) {
return file_v1_setting_service_proto_rawDescGZIP(), []int{7, 4}
}
-func (x *AppIMSetting_DingTalk) GetEnabled() bool {
- if x != nil {
- return x.Enabled
- }
- return false
-}
-
func (x *AppIMSetting_DingTalk) GetClientId() string {
if x != nil {
return x.ClientId
@@ -2026,6 +1954,144 @@ func (x *AppIMSetting_DingTalk) GetRobotCode() string {
return ""
}
+type AppIMSetting_IMSetting struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Type Webhook_Type `protobuf:"varint,1,opt,name=type,proto3,enum=bytebase.v1.Webhook_Type" json:"type,omitempty"`
+ // Types that are valid to be assigned to Payload:
+ //
+ // *AppIMSetting_IMSetting_Slack
+ // *AppIMSetting_IMSetting_Feishu
+ // *AppIMSetting_IMSetting_Wecom
+ // *AppIMSetting_IMSetting_Lark
+ // *AppIMSetting_IMSetting_Dingtalk
+ Payload isAppIMSetting_IMSetting_Payload `protobuf_oneof:"payload"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *AppIMSetting_IMSetting) Reset() {
+ *x = AppIMSetting_IMSetting{}
+ mi := &file_v1_setting_service_proto_msgTypes[24]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *AppIMSetting_IMSetting) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*AppIMSetting_IMSetting) ProtoMessage() {}
+
+func (x *AppIMSetting_IMSetting) ProtoReflect() protoreflect.Message {
+ mi := &file_v1_setting_service_proto_msgTypes[24]
+ 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 AppIMSetting_IMSetting.ProtoReflect.Descriptor instead.
+func (*AppIMSetting_IMSetting) Descriptor() ([]byte, []int) {
+ return file_v1_setting_service_proto_rawDescGZIP(), []int{7, 5}
+}
+
+func (x *AppIMSetting_IMSetting) GetType() Webhook_Type {
+ if x != nil {
+ return x.Type
+ }
+ return Webhook_TYPE_UNSPECIFIED
+}
+
+func (x *AppIMSetting_IMSetting) GetPayload() isAppIMSetting_IMSetting_Payload {
+ if x != nil {
+ return x.Payload
+ }
+ return nil
+}
+
+func (x *AppIMSetting_IMSetting) GetSlack() *AppIMSetting_Slack {
+ if x != nil {
+ if x, ok := x.Payload.(*AppIMSetting_IMSetting_Slack); ok {
+ return x.Slack
+ }
+ }
+ return nil
+}
+
+func (x *AppIMSetting_IMSetting) GetFeishu() *AppIMSetting_Feishu {
+ if x != nil {
+ if x, ok := x.Payload.(*AppIMSetting_IMSetting_Feishu); ok {
+ return x.Feishu
+ }
+ }
+ return nil
+}
+
+func (x *AppIMSetting_IMSetting) GetWecom() *AppIMSetting_Wecom {
+ if x != nil {
+ if x, ok := x.Payload.(*AppIMSetting_IMSetting_Wecom); ok {
+ return x.Wecom
+ }
+ }
+ return nil
+}
+
+func (x *AppIMSetting_IMSetting) GetLark() *AppIMSetting_Lark {
+ if x != nil {
+ if x, ok := x.Payload.(*AppIMSetting_IMSetting_Lark); ok {
+ return x.Lark
+ }
+ }
+ return nil
+}
+
+func (x *AppIMSetting_IMSetting) GetDingtalk() *AppIMSetting_DingTalk {
+ if x != nil {
+ if x, ok := x.Payload.(*AppIMSetting_IMSetting_Dingtalk); ok {
+ return x.Dingtalk
+ }
+ }
+ return nil
+}
+
+type isAppIMSetting_IMSetting_Payload interface {
+ isAppIMSetting_IMSetting_Payload()
+}
+
+type AppIMSetting_IMSetting_Slack struct {
+ Slack *AppIMSetting_Slack `protobuf:"bytes,2,opt,name=slack,proto3,oneof"`
+}
+
+type AppIMSetting_IMSetting_Feishu struct {
+ Feishu *AppIMSetting_Feishu `protobuf:"bytes,3,opt,name=feishu,proto3,oneof"`
+}
+
+type AppIMSetting_IMSetting_Wecom struct {
+ Wecom *AppIMSetting_Wecom `protobuf:"bytes,4,opt,name=wecom,proto3,oneof"`
+}
+
+type AppIMSetting_IMSetting_Lark struct {
+ Lark *AppIMSetting_Lark `protobuf:"bytes,5,opt,name=lark,proto3,oneof"`
+}
+
+type AppIMSetting_IMSetting_Dingtalk struct {
+ Dingtalk *AppIMSetting_DingTalk `protobuf:"bytes,6,opt,name=dingtalk,proto3,oneof"`
+}
+
+func (*AppIMSetting_IMSetting_Slack) isAppIMSetting_IMSetting_Payload() {}
+
+func (*AppIMSetting_IMSetting_Feishu) isAppIMSetting_IMSetting_Payload() {}
+
+func (*AppIMSetting_IMSetting_Wecom) isAppIMSetting_IMSetting_Payload() {}
+
+func (*AppIMSetting_IMSetting_Lark) isAppIMSetting_IMSetting_Payload() {}
+
+func (*AppIMSetting_IMSetting_Dingtalk) isAppIMSetting_IMSetting_Payload() {}
+
type WorkspaceApprovalSetting_Rule struct {
state protoimpl.MessageState `protogen:"open.v1"`
Template *ApprovalTemplate `protobuf:"bytes,1,opt,name=template,proto3" json:"template,omitempty"`
@@ -2045,7 +2111,7 @@ type WorkspaceApprovalSetting_Rule struct {
func (x *WorkspaceApprovalSetting_Rule) Reset() {
*x = WorkspaceApprovalSetting_Rule{}
- mi := &file_v1_setting_service_proto_msgTypes[24]
+ mi := &file_v1_setting_service_proto_msgTypes[25]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -2057,7 +2123,7 @@ func (x *WorkspaceApprovalSetting_Rule) String() string {
func (*WorkspaceApprovalSetting_Rule) ProtoMessage() {}
func (x *WorkspaceApprovalSetting_Rule) ProtoReflect() protoreflect.Message {
- mi := &file_v1_setting_service_proto_msgTypes[24]
+ mi := &file_v1_setting_service_proto_msgTypes[25]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -2100,7 +2166,7 @@ type SchemaTemplateSetting_FieldTemplate struct {
func (x *SchemaTemplateSetting_FieldTemplate) Reset() {
*x = SchemaTemplateSetting_FieldTemplate{}
- mi := &file_v1_setting_service_proto_msgTypes[25]
+ mi := &file_v1_setting_service_proto_msgTypes[26]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -2112,7 +2178,7 @@ func (x *SchemaTemplateSetting_FieldTemplate) String() string {
func (*SchemaTemplateSetting_FieldTemplate) ProtoMessage() {}
func (x *SchemaTemplateSetting_FieldTemplate) ProtoReflect() protoreflect.Message {
- mi := &file_v1_setting_service_proto_msgTypes[25]
+ mi := &file_v1_setting_service_proto_msgTypes[26]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -2174,7 +2240,7 @@ type SchemaTemplateSetting_ColumnType struct {
func (x *SchemaTemplateSetting_ColumnType) Reset() {
*x = SchemaTemplateSetting_ColumnType{}
- mi := &file_v1_setting_service_proto_msgTypes[26]
+ mi := &file_v1_setting_service_proto_msgTypes[27]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -2186,7 +2252,7 @@ func (x *SchemaTemplateSetting_ColumnType) String() string {
func (*SchemaTemplateSetting_ColumnType) ProtoMessage() {}
func (x *SchemaTemplateSetting_ColumnType) ProtoReflect() protoreflect.Message {
- mi := &file_v1_setting_service_proto_msgTypes[26]
+ mi := &file_v1_setting_service_proto_msgTypes[27]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -2236,7 +2302,7 @@ type SchemaTemplateSetting_TableTemplate struct {
func (x *SchemaTemplateSetting_TableTemplate) Reset() {
*x = SchemaTemplateSetting_TableTemplate{}
- mi := &file_v1_setting_service_proto_msgTypes[27]
+ mi := &file_v1_setting_service_proto_msgTypes[28]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -2248,7 +2314,7 @@ func (x *SchemaTemplateSetting_TableTemplate) String() string {
func (*SchemaTemplateSetting_TableTemplate) ProtoMessage() {}
func (x *SchemaTemplateSetting_TableTemplate) ProtoReflect() protoreflect.Message {
- mi := &file_v1_setting_service_proto_msgTypes[27]
+ mi := &file_v1_setting_service_proto_msgTypes[28]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -2320,7 +2386,7 @@ type DataClassificationSetting_DataClassificationConfig struct {
func (x *DataClassificationSetting_DataClassificationConfig) Reset() {
*x = DataClassificationSetting_DataClassificationConfig{}
- mi := &file_v1_setting_service_proto_msgTypes[28]
+ mi := &file_v1_setting_service_proto_msgTypes[29]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -2332,7 +2398,7 @@ func (x *DataClassificationSetting_DataClassificationConfig) String() string {
func (*DataClassificationSetting_DataClassificationConfig) ProtoMessage() {}
func (x *DataClassificationSetting_DataClassificationConfig) ProtoReflect() protoreflect.Message {
- mi := &file_v1_setting_service_proto_msgTypes[28]
+ mi := &file_v1_setting_service_proto_msgTypes[29]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -2394,7 +2460,7 @@ type DataClassificationSetting_DataClassificationConfig_Level struct {
func (x *DataClassificationSetting_DataClassificationConfig_Level) Reset() {
*x = DataClassificationSetting_DataClassificationConfig_Level{}
- mi := &file_v1_setting_service_proto_msgTypes[29]
+ mi := &file_v1_setting_service_proto_msgTypes[30]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -2406,7 +2472,7 @@ func (x *DataClassificationSetting_DataClassificationConfig_Level) String() stri
func (*DataClassificationSetting_DataClassificationConfig_Level) ProtoMessage() {}
func (x *DataClassificationSetting_DataClassificationConfig_Level) ProtoReflect() protoreflect.Message {
- mi := &file_v1_setting_service_proto_msgTypes[29]
+ mi := &file_v1_setting_service_proto_msgTypes[30]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -2456,7 +2522,7 @@ type DataClassificationSetting_DataClassificationConfig_DataClassification struc
func (x *DataClassificationSetting_DataClassificationConfig_DataClassification) Reset() {
*x = DataClassificationSetting_DataClassificationConfig_DataClassification{}
- mi := &file_v1_setting_service_proto_msgTypes[30]
+ mi := &file_v1_setting_service_proto_msgTypes[31]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -2468,7 +2534,7 @@ func (x *DataClassificationSetting_DataClassificationConfig_DataClassification)
func (*DataClassificationSetting_DataClassificationConfig_DataClassification) ProtoMessage() {}
func (x *DataClassificationSetting_DataClassificationConfig_DataClassification) ProtoReflect() protoreflect.Message {
- mi := &file_v1_setting_service_proto_msgTypes[30]
+ mi := &file_v1_setting_service_proto_msgTypes[31]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -2529,7 +2595,7 @@ type SemanticTypeSetting_SemanticType struct {
func (x *SemanticTypeSetting_SemanticType) Reset() {
*x = SemanticTypeSetting_SemanticType{}
- mi := &file_v1_setting_service_proto_msgTypes[32]
+ mi := &file_v1_setting_service_proto_msgTypes[33]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -2541,7 +2607,7 @@ func (x *SemanticTypeSetting_SemanticType) String() string {
func (*SemanticTypeSetting_SemanticType) ProtoMessage() {}
func (x *SemanticTypeSetting_SemanticType) ProtoReflect() protoreflect.Message {
- mi := &file_v1_setting_service_proto_msgTypes[32]
+ mi := &file_v1_setting_service_proto_msgTypes[33]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -2603,7 +2669,7 @@ type Algorithm_FullMask struct {
func (x *Algorithm_FullMask) Reset() {
*x = Algorithm_FullMask{}
- mi := &file_v1_setting_service_proto_msgTypes[33]
+ mi := &file_v1_setting_service_proto_msgTypes[34]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -2615,7 +2681,7 @@ func (x *Algorithm_FullMask) String() string {
func (*Algorithm_FullMask) ProtoMessage() {}
func (x *Algorithm_FullMask) ProtoReflect() protoreflect.Message {
- mi := &file_v1_setting_service_proto_msgTypes[33]
+ mi := &file_v1_setting_service_proto_msgTypes[34]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -2649,7 +2715,7 @@ type Algorithm_RangeMask struct {
func (x *Algorithm_RangeMask) Reset() {
*x = Algorithm_RangeMask{}
- mi := &file_v1_setting_service_proto_msgTypes[34]
+ mi := &file_v1_setting_service_proto_msgTypes[35]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -2661,7 +2727,7 @@ func (x *Algorithm_RangeMask) String() string {
func (*Algorithm_RangeMask) ProtoMessage() {}
func (x *Algorithm_RangeMask) ProtoReflect() protoreflect.Message {
- mi := &file_v1_setting_service_proto_msgTypes[34]
+ mi := &file_v1_setting_service_proto_msgTypes[35]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -2694,7 +2760,7 @@ type Algorithm_MD5Mask struct {
func (x *Algorithm_MD5Mask) Reset() {
*x = Algorithm_MD5Mask{}
- mi := &file_v1_setting_service_proto_msgTypes[35]
+ mi := &file_v1_setting_service_proto_msgTypes[36]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -2706,7 +2772,7 @@ func (x *Algorithm_MD5Mask) String() string {
func (*Algorithm_MD5Mask) ProtoMessage() {}
func (x *Algorithm_MD5Mask) ProtoReflect() protoreflect.Message {
- mi := &file_v1_setting_service_proto_msgTypes[35]
+ mi := &file_v1_setting_service_proto_msgTypes[36]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -2741,7 +2807,7 @@ type Algorithm_InnerOuterMask struct {
func (x *Algorithm_InnerOuterMask) Reset() {
*x = Algorithm_InnerOuterMask{}
- mi := &file_v1_setting_service_proto_msgTypes[36]
+ mi := &file_v1_setting_service_proto_msgTypes[37]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -2753,7 +2819,7 @@ func (x *Algorithm_InnerOuterMask) String() string {
func (*Algorithm_InnerOuterMask) ProtoMessage() {}
func (x *Algorithm_InnerOuterMask) ProtoReflect() protoreflect.Message {
- mi := &file_v1_setting_service_proto_msgTypes[36]
+ mi := &file_v1_setting_service_proto_msgTypes[37]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -2811,7 +2877,7 @@ type Algorithm_RangeMask_Slice struct {
func (x *Algorithm_RangeMask_Slice) Reset() {
*x = Algorithm_RangeMask_Slice{}
- mi := &file_v1_setting_service_proto_msgTypes[37]
+ mi := &file_v1_setting_service_proto_msgTypes[38]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -2823,7 +2889,7 @@ func (x *Algorithm_RangeMask_Slice) String() string {
func (*Algorithm_RangeMask_Slice) ProtoMessage() {}
func (x *Algorithm_RangeMask_Slice) ProtoReflect() protoreflect.Message {
- mi := &file_v1_setting_service_proto_msgTypes[37]
+ mi := &file_v1_setting_service_proto_msgTypes[38]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -2880,7 +2946,7 @@ type EnvironmentSetting_Environment struct {
func (x *EnvironmentSetting_Environment) Reset() {
*x = EnvironmentSetting_Environment{}
- mi := &file_v1_setting_service_proto_msgTypes[38]
+ mi := &file_v1_setting_service_proto_msgTypes[39]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -2892,7 +2958,7 @@ func (x *EnvironmentSetting_Environment) String() string {
func (*EnvironmentSetting_Environment) ProtoMessage() {}
func (x *EnvironmentSetting_Environment) ProtoReflect() protoreflect.Message {
- mi := &file_v1_setting_service_proto_msgTypes[38]
+ mi := &file_v1_setting_service_proto_msgTypes[39]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -2947,7 +3013,7 @@ var File_v1_setting_service_proto protoreflect.FileDescriptor
const file_v1_setting_service_proto_rawDesc = "" +
"\n" +
- "\x18v1/setting_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\x1egoogle/protobuf/duration.proto\x1a google/protobuf/field_mask.proto\x1a\x16google/type/expr.proto\x1a\x13v1/annotation.proto\x1a\x0fv1/common.proto\x1a!v1/database_catalog_service.proto\x1a\x19v1/database_service.proto\x1a\x16v1/issue_service.proto\"\x15\n" +
+ "\x18v1/setting_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\x1egoogle/protobuf/duration.proto\x1a google/protobuf/field_mask.proto\x1a\x16google/type/expr.proto\x1a\x13v1/annotation.proto\x1a\x0fv1/common.proto\x1a!v1/database_catalog_service.proto\x1a\x19v1/database_service.proto\x1a\x16v1/issue_service.proto\x1a\x18v1/project_service.proto\"\x15\n" +
"\x13ListSettingsRequest\"H\n" +
"\x14ListSettingsResponse\x120\n" +
"\bsettings\x18\x01 \x03(\v2\x14.bytebase.v1.SettingR\bsettings\"E\n" +
@@ -3000,37 +3066,36 @@ const file_v1_setting_service_proto_rawDesc = "" +
"\n" +
"ai_setting\x18\x10 \x01(\v2\x16.bytebase.v1.AISettingH\x00R\taiSetting\x12R\n" +
"\x13environment_setting\x18\x11 \x01(\v2\x1f.bytebase.v1.EnvironmentSettingH\x00R\x12environmentSettingB\a\n" +
- "\x05valueJ\x04\b\x12\x10\x13\"\xc3\x06\n" +
- "\fAppIMSetting\x125\n" +
- "\x05slack\x18\x01 \x01(\v2\x1f.bytebase.v1.AppIMSetting.SlackR\x05slack\x128\n" +
- "\x06feishu\x18\x02 \x01(\v2 .bytebase.v1.AppIMSetting.FeishuR\x06feishu\x125\n" +
- "\x05wecom\x18\x03 \x01(\v2\x1f.bytebase.v1.AppIMSetting.WecomR\x05wecom\x122\n" +
- "\x04lark\x18\x04 \x01(\v2\x1e.bytebase.v1.AppIMSetting.LarkR\x04lark\x12>\n" +
- "\bdingtalk\x18\x05 \x01(\v2\".bytebase.v1.AppIMSetting.DingTalkR\bdingtalk\x1a<\n" +
- "\x05Slack\x12\x18\n" +
- "\aenabled\x18\x01 \x01(\bR\aenabled\x12\x19\n" +
- "\x05token\x18\x02 \x01(\tB\x03\xe0A\x04R\x05token\x1ab\n" +
- "\x06Feishu\x12\x18\n" +
- "\aenabled\x18\x01 \x01(\bR\aenabled\x12\x1a\n" +
- "\x06app_id\x18\x02 \x01(\tB\x03\xe0A\x04R\x05appId\x12\"\n" +
+ "\x05valueJ\x04\b\x12\x10\x13\"\xd3\x06\n" +
+ "\fAppIMSetting\x12?\n" +
+ "\bsettings\x18\x01 \x03(\v2#.bytebase.v1.AppIMSetting.IMSettingR\bsettings\x1a\"\n" +
+ "\x05Slack\x12\x19\n" +
+ "\x05token\x18\x01 \x01(\tB\x03\xe0A\x04R\x05token\x1aH\n" +
+ "\x06Feishu\x12\x1a\n" +
+ "\x06app_id\x18\x01 \x01(\tB\x03\xe0A\x04R\x05appId\x12\"\n" +
"\n" +
- "app_secret\x18\x03 \x01(\tB\x03\xe0A\x04R\tappSecret\x1a|\n" +
- "\x05Wecom\x12\x18\n" +
- "\aenabled\x18\x01 \x01(\bR\aenabled\x12\x1c\n" +
- "\acorp_id\x18\x02 \x01(\tB\x03\xe0A\x04R\x06corpId\x12\x1e\n" +
- "\bagent_id\x18\x03 \x01(\tB\x03\xe0A\x04R\aagentId\x12\x1b\n" +
- "\x06secret\x18\x04 \x01(\tB\x03\xe0A\x04R\x06secret\x1a`\n" +
- "\x04Lark\x12\x18\n" +
- "\aenabled\x18\x01 \x01(\bR\aenabled\x12\x1a\n" +
- "\x06app_id\x18\x02 \x01(\tB\x03\xe0A\x04R\x05appId\x12\"\n" +
+ "app_secret\x18\x02 \x01(\tB\x03\xe0A\x04R\tappSecret\x1ab\n" +
+ "\x05Wecom\x12\x1c\n" +
+ "\acorp_id\x18\x01 \x01(\tB\x03\xe0A\x04R\x06corpId\x12\x1e\n" +
+ "\bagent_id\x18\x02 \x01(\tB\x03\xe0A\x04R\aagentId\x12\x1b\n" +
+ "\x06secret\x18\x03 \x01(\tB\x03\xe0A\x04R\x06secret\x1aF\n" +
+ "\x04Lark\x12\x1a\n" +
+ "\x06app_id\x18\x01 \x01(\tB\x03\xe0A\x04R\x05appId\x12\"\n" +
"\n" +
- "app_secret\x18\x03 \x01(\tB\x03\xe0A\x04R\tappSecret\x1a\x94\x01\n" +
- "\bDingTalk\x12\x18\n" +
- "\aenabled\x18\x01 \x01(\bR\aenabled\x12 \n" +
- "\tclient_id\x18\x02 \x01(\tB\x03\xe0A\x04R\bclientId\x12(\n" +
- "\rclient_secret\x18\x03 \x01(\tB\x03\xe0A\x04R\fclientSecret\x12\"\n" +
+ "app_secret\x18\x02 \x01(\tB\x03\xe0A\x04R\tappSecret\x1az\n" +
+ "\bDingTalk\x12 \n" +
+ "\tclient_id\x18\x01 \x01(\tB\x03\xe0A\x04R\bclientId\x12(\n" +
+ "\rclient_secret\x18\x02 \x01(\tB\x03\xe0A\x04R\fclientSecret\x12\"\n" +
"\n" +
- "robot_code\x18\x04 \x01(\tB\x03\xe0A\x04R\trobotCode\"\xc8\x05\n" +
+ "robot_code\x18\x03 \x01(\tB\x03\xe0A\x04R\trobotCode\x1a\xeb\x02\n" +
+ "\tIMSetting\x12-\n" +
+ "\x04type\x18\x01 \x01(\x0e2\x19.bytebase.v1.Webhook.TypeR\x04type\x127\n" +
+ "\x05slack\x18\x02 \x01(\v2\x1f.bytebase.v1.AppIMSetting.SlackH\x00R\x05slack\x12:\n" +
+ "\x06feishu\x18\x03 \x01(\v2 .bytebase.v1.AppIMSetting.FeishuH\x00R\x06feishu\x127\n" +
+ "\x05wecom\x18\x04 \x01(\v2\x1f.bytebase.v1.AppIMSetting.WecomH\x00R\x05wecom\x124\n" +
+ "\x04lark\x18\x05 \x01(\v2\x1e.bytebase.v1.AppIMSetting.LarkH\x00R\x04lark\x12@\n" +
+ "\bdingtalk\x18\x06 \x01(\v2\".bytebase.v1.AppIMSetting.DingTalkH\x00R\bdingtalkB\t\n" +
+ "\apayload\"\xc8\x05\n" +
"\x17WorkspaceProfileSetting\x12!\n" +
"\fexternal_url\x18\x01 \x01(\tR\vexternalUrl\x12'\n" +
"\x0fdisallow_signup\x18\x02 \x01(\bR\x0edisallowSignup\x12\x1f\n" +
@@ -3201,7 +3266,7 @@ func file_v1_setting_service_proto_rawDescGZIP() []byte {
}
var file_v1_setting_service_proto_enumTypes = make([]protoimpl.EnumInfo, 5)
-var file_v1_setting_service_proto_msgTypes = make([]protoimpl.MessageInfo, 40)
+var file_v1_setting_service_proto_msgTypes = make([]protoimpl.MessageInfo, 41)
var file_v1_setting_service_proto_goTypes = []any{
(DatabaseChangeMode)(0), // 0: bytebase.v1.DatabaseChangeMode
(Setting_SettingName)(0), // 1: bytebase.v1.Setting.SettingName
@@ -3232,37 +3297,39 @@ var file_v1_setting_service_proto_goTypes = []any{
(*AppIMSetting_Wecom)(nil), // 26: bytebase.v1.AppIMSetting.Wecom
(*AppIMSetting_Lark)(nil), // 27: bytebase.v1.AppIMSetting.Lark
(*AppIMSetting_DingTalk)(nil), // 28: bytebase.v1.AppIMSetting.DingTalk
- (*WorkspaceApprovalSetting_Rule)(nil), // 29: bytebase.v1.WorkspaceApprovalSetting.Rule
- (*SchemaTemplateSetting_FieldTemplate)(nil), // 30: bytebase.v1.SchemaTemplateSetting.FieldTemplate
- (*SchemaTemplateSetting_ColumnType)(nil), // 31: bytebase.v1.SchemaTemplateSetting.ColumnType
- (*SchemaTemplateSetting_TableTemplate)(nil), // 32: bytebase.v1.SchemaTemplateSetting.TableTemplate
- (*DataClassificationSetting_DataClassificationConfig)(nil), // 33: bytebase.v1.DataClassificationSetting.DataClassificationConfig
- (*DataClassificationSetting_DataClassificationConfig_Level)(nil), // 34: bytebase.v1.DataClassificationSetting.DataClassificationConfig.Level
- (*DataClassificationSetting_DataClassificationConfig_DataClassification)(nil), // 35: bytebase.v1.DataClassificationSetting.DataClassificationConfig.DataClassification
- nil, // 36: bytebase.v1.DataClassificationSetting.DataClassificationConfig.ClassificationEntry
- (*SemanticTypeSetting_SemanticType)(nil), // 37: bytebase.v1.SemanticTypeSetting.SemanticType
- (*Algorithm_FullMask)(nil), // 38: bytebase.v1.Algorithm.FullMask
- (*Algorithm_RangeMask)(nil), // 39: bytebase.v1.Algorithm.RangeMask
- (*Algorithm_MD5Mask)(nil), // 40: bytebase.v1.Algorithm.MD5Mask
- (*Algorithm_InnerOuterMask)(nil), // 41: bytebase.v1.Algorithm.InnerOuterMask
- (*Algorithm_RangeMask_Slice)(nil), // 42: bytebase.v1.Algorithm.RangeMask.Slice
- (*EnvironmentSetting_Environment)(nil), // 43: bytebase.v1.EnvironmentSetting.Environment
- nil, // 44: bytebase.v1.EnvironmentSetting.Environment.TagsEntry
- (*fieldmaskpb.FieldMask)(nil), // 45: google.protobuf.FieldMask
- (*durationpb.Duration)(nil), // 46: google.protobuf.Duration
- (*ApprovalTemplate)(nil), // 47: bytebase.v1.ApprovalTemplate
- (*expr.Expr)(nil), // 48: google.type.Expr
- (Engine)(0), // 49: bytebase.v1.Engine
- (*ColumnMetadata)(nil), // 50: bytebase.v1.ColumnMetadata
- (*ColumnCatalog)(nil), // 51: bytebase.v1.ColumnCatalog
- (*TableMetadata)(nil), // 52: bytebase.v1.TableMetadata
- (*TableCatalog)(nil), // 53: bytebase.v1.TableCatalog
+ (*AppIMSetting_IMSetting)(nil), // 29: bytebase.v1.AppIMSetting.IMSetting
+ (*WorkspaceApprovalSetting_Rule)(nil), // 30: bytebase.v1.WorkspaceApprovalSetting.Rule
+ (*SchemaTemplateSetting_FieldTemplate)(nil), // 31: bytebase.v1.SchemaTemplateSetting.FieldTemplate
+ (*SchemaTemplateSetting_ColumnType)(nil), // 32: bytebase.v1.SchemaTemplateSetting.ColumnType
+ (*SchemaTemplateSetting_TableTemplate)(nil), // 33: bytebase.v1.SchemaTemplateSetting.TableTemplate
+ (*DataClassificationSetting_DataClassificationConfig)(nil), // 34: bytebase.v1.DataClassificationSetting.DataClassificationConfig
+ (*DataClassificationSetting_DataClassificationConfig_Level)(nil), // 35: bytebase.v1.DataClassificationSetting.DataClassificationConfig.Level
+ (*DataClassificationSetting_DataClassificationConfig_DataClassification)(nil), // 36: bytebase.v1.DataClassificationSetting.DataClassificationConfig.DataClassification
+ nil, // 37: bytebase.v1.DataClassificationSetting.DataClassificationConfig.ClassificationEntry
+ (*SemanticTypeSetting_SemanticType)(nil), // 38: bytebase.v1.SemanticTypeSetting.SemanticType
+ (*Algorithm_FullMask)(nil), // 39: bytebase.v1.Algorithm.FullMask
+ (*Algorithm_RangeMask)(nil), // 40: bytebase.v1.Algorithm.RangeMask
+ (*Algorithm_MD5Mask)(nil), // 41: bytebase.v1.Algorithm.MD5Mask
+ (*Algorithm_InnerOuterMask)(nil), // 42: bytebase.v1.Algorithm.InnerOuterMask
+ (*Algorithm_RangeMask_Slice)(nil), // 43: bytebase.v1.Algorithm.RangeMask.Slice
+ (*EnvironmentSetting_Environment)(nil), // 44: bytebase.v1.EnvironmentSetting.Environment
+ nil, // 45: bytebase.v1.EnvironmentSetting.Environment.TagsEntry
+ (*fieldmaskpb.FieldMask)(nil), // 46: google.protobuf.FieldMask
+ (*durationpb.Duration)(nil), // 47: google.protobuf.Duration
+ (Webhook_Type)(0), // 48: bytebase.v1.Webhook.Type
+ (*ApprovalTemplate)(nil), // 49: bytebase.v1.ApprovalTemplate
+ (*expr.Expr)(nil), // 50: google.type.Expr
+ (Engine)(0), // 51: bytebase.v1.Engine
+ (*ColumnMetadata)(nil), // 52: bytebase.v1.ColumnMetadata
+ (*ColumnCatalog)(nil), // 53: bytebase.v1.ColumnCatalog
+ (*TableMetadata)(nil), // 54: bytebase.v1.TableMetadata
+ (*TableCatalog)(nil), // 55: bytebase.v1.TableCatalog
}
var file_v1_setting_service_proto_depIdxs = []int32{
10, // 0: bytebase.v1.ListSettingsResponse.settings:type_name -> bytebase.v1.Setting
10, // 1: bytebase.v1.GetSettingResponse.setting:type_name -> bytebase.v1.Setting
10, // 2: bytebase.v1.UpdateSettingRequest.setting:type_name -> bytebase.v1.Setting
- 45, // 3: bytebase.v1.UpdateSettingRequest.update_mask:type_name -> google.protobuf.FieldMask
+ 46, // 3: bytebase.v1.UpdateSettingRequest.update_mask:type_name -> google.protobuf.FieldMask
11, // 4: bytebase.v1.Setting.value:type_name -> bytebase.v1.Value
12, // 5: bytebase.v1.Value.app_im_setting_value:type_name -> bytebase.v1.AppIMSetting
13, // 6: bytebase.v1.Value.workspace_profile_setting_value:type_name -> bytebase.v1.WorkspaceProfileSetting
@@ -3274,57 +3341,59 @@ var file_v1_setting_service_proto_depIdxs = []int32{
21, // 12: bytebase.v1.Value.password_restriction_setting:type_name -> bytebase.v1.PasswordRestrictionSetting
22, // 13: bytebase.v1.Value.ai_setting:type_name -> bytebase.v1.AISetting
23, // 14: bytebase.v1.Value.environment_setting:type_name -> bytebase.v1.EnvironmentSetting
- 24, // 15: bytebase.v1.AppIMSetting.slack:type_name -> bytebase.v1.AppIMSetting.Slack
- 25, // 16: bytebase.v1.AppIMSetting.feishu:type_name -> bytebase.v1.AppIMSetting.Feishu
- 26, // 17: bytebase.v1.AppIMSetting.wecom:type_name -> bytebase.v1.AppIMSetting.Wecom
- 27, // 18: bytebase.v1.AppIMSetting.lark:type_name -> bytebase.v1.AppIMSetting.Lark
- 28, // 19: bytebase.v1.AppIMSetting.dingtalk:type_name -> bytebase.v1.AppIMSetting.DingTalk
- 46, // 20: bytebase.v1.WorkspaceProfileSetting.token_duration:type_name -> google.protobuf.Duration
- 14, // 21: bytebase.v1.WorkspaceProfileSetting.announcement:type_name -> bytebase.v1.Announcement
- 46, // 22: bytebase.v1.WorkspaceProfileSetting.maximum_role_expiration:type_name -> google.protobuf.Duration
- 0, // 23: bytebase.v1.WorkspaceProfileSetting.database_change_mode:type_name -> bytebase.v1.DatabaseChangeMode
- 46, // 24: bytebase.v1.WorkspaceProfileSetting.inactive_session_timeout:type_name -> google.protobuf.Duration
- 2, // 25: bytebase.v1.Announcement.level:type_name -> bytebase.v1.Announcement.AlertLevel
- 29, // 26: bytebase.v1.WorkspaceApprovalSetting.rules:type_name -> bytebase.v1.WorkspaceApprovalSetting.Rule
- 30, // 27: bytebase.v1.SchemaTemplateSetting.field_templates:type_name -> bytebase.v1.SchemaTemplateSetting.FieldTemplate
- 31, // 28: bytebase.v1.SchemaTemplateSetting.column_types:type_name -> bytebase.v1.SchemaTemplateSetting.ColumnType
- 32, // 29: bytebase.v1.SchemaTemplateSetting.table_templates:type_name -> bytebase.v1.SchemaTemplateSetting.TableTemplate
- 33, // 30: bytebase.v1.DataClassificationSetting.configs:type_name -> bytebase.v1.DataClassificationSetting.DataClassificationConfig
- 37, // 31: bytebase.v1.SemanticTypeSetting.types:type_name -> bytebase.v1.SemanticTypeSetting.SemanticType
- 38, // 32: bytebase.v1.Algorithm.full_mask:type_name -> bytebase.v1.Algorithm.FullMask
- 39, // 33: bytebase.v1.Algorithm.range_mask:type_name -> bytebase.v1.Algorithm.RangeMask
- 40, // 34: bytebase.v1.Algorithm.md5_mask:type_name -> bytebase.v1.Algorithm.MD5Mask
- 41, // 35: bytebase.v1.Algorithm.inner_outer_mask:type_name -> bytebase.v1.Algorithm.InnerOuterMask
- 46, // 36: bytebase.v1.PasswordRestrictionSetting.password_rotation:type_name -> google.protobuf.Duration
- 4, // 37: bytebase.v1.AISetting.provider:type_name -> bytebase.v1.AISetting.Provider
- 43, // 38: bytebase.v1.EnvironmentSetting.environments:type_name -> bytebase.v1.EnvironmentSetting.Environment
- 47, // 39: bytebase.v1.WorkspaceApprovalSetting.Rule.template:type_name -> bytebase.v1.ApprovalTemplate
- 48, // 40: bytebase.v1.WorkspaceApprovalSetting.Rule.condition:type_name -> google.type.Expr
- 49, // 41: bytebase.v1.SchemaTemplateSetting.FieldTemplate.engine:type_name -> bytebase.v1.Engine
- 50, // 42: bytebase.v1.SchemaTemplateSetting.FieldTemplate.column:type_name -> bytebase.v1.ColumnMetadata
- 51, // 43: bytebase.v1.SchemaTemplateSetting.FieldTemplate.catalog:type_name -> bytebase.v1.ColumnCatalog
- 49, // 44: bytebase.v1.SchemaTemplateSetting.ColumnType.engine:type_name -> bytebase.v1.Engine
- 49, // 45: bytebase.v1.SchemaTemplateSetting.TableTemplate.engine:type_name -> bytebase.v1.Engine
- 52, // 46: bytebase.v1.SchemaTemplateSetting.TableTemplate.table:type_name -> bytebase.v1.TableMetadata
- 53, // 47: bytebase.v1.SchemaTemplateSetting.TableTemplate.catalog:type_name -> bytebase.v1.TableCatalog
- 34, // 48: bytebase.v1.DataClassificationSetting.DataClassificationConfig.levels:type_name -> bytebase.v1.DataClassificationSetting.DataClassificationConfig.Level
- 36, // 49: bytebase.v1.DataClassificationSetting.DataClassificationConfig.classification:type_name -> bytebase.v1.DataClassificationSetting.DataClassificationConfig.ClassificationEntry
- 35, // 50: bytebase.v1.DataClassificationSetting.DataClassificationConfig.ClassificationEntry.value:type_name -> bytebase.v1.DataClassificationSetting.DataClassificationConfig.DataClassification
- 19, // 51: bytebase.v1.SemanticTypeSetting.SemanticType.algorithm:type_name -> bytebase.v1.Algorithm
- 42, // 52: bytebase.v1.Algorithm.RangeMask.slices:type_name -> bytebase.v1.Algorithm.RangeMask.Slice
- 3, // 53: bytebase.v1.Algorithm.InnerOuterMask.type:type_name -> bytebase.v1.Algorithm.InnerOuterMask.MaskType
- 44, // 54: bytebase.v1.EnvironmentSetting.Environment.tags:type_name -> bytebase.v1.EnvironmentSetting.Environment.TagsEntry
- 5, // 55: bytebase.v1.SettingService.ListSettings:input_type -> bytebase.v1.ListSettingsRequest
- 7, // 56: bytebase.v1.SettingService.GetSetting:input_type -> bytebase.v1.GetSettingRequest
- 9, // 57: bytebase.v1.SettingService.UpdateSetting:input_type -> bytebase.v1.UpdateSettingRequest
- 6, // 58: bytebase.v1.SettingService.ListSettings:output_type -> bytebase.v1.ListSettingsResponse
- 10, // 59: bytebase.v1.SettingService.GetSetting:output_type -> bytebase.v1.Setting
- 10, // 60: bytebase.v1.SettingService.UpdateSetting:output_type -> bytebase.v1.Setting
- 58, // [58:61] is the sub-list for method output_type
- 55, // [55:58] is the sub-list for method input_type
- 55, // [55:55] is the sub-list for extension type_name
- 55, // [55:55] is the sub-list for extension extendee
- 0, // [0:55] is the sub-list for field type_name
+ 29, // 15: bytebase.v1.AppIMSetting.settings:type_name -> bytebase.v1.AppIMSetting.IMSetting
+ 47, // 16: bytebase.v1.WorkspaceProfileSetting.token_duration:type_name -> google.protobuf.Duration
+ 14, // 17: bytebase.v1.WorkspaceProfileSetting.announcement:type_name -> bytebase.v1.Announcement
+ 47, // 18: bytebase.v1.WorkspaceProfileSetting.maximum_role_expiration:type_name -> google.protobuf.Duration
+ 0, // 19: bytebase.v1.WorkspaceProfileSetting.database_change_mode:type_name -> bytebase.v1.DatabaseChangeMode
+ 47, // 20: bytebase.v1.WorkspaceProfileSetting.inactive_session_timeout:type_name -> google.protobuf.Duration
+ 2, // 21: bytebase.v1.Announcement.level:type_name -> bytebase.v1.Announcement.AlertLevel
+ 30, // 22: bytebase.v1.WorkspaceApprovalSetting.rules:type_name -> bytebase.v1.WorkspaceApprovalSetting.Rule
+ 31, // 23: bytebase.v1.SchemaTemplateSetting.field_templates:type_name -> bytebase.v1.SchemaTemplateSetting.FieldTemplate
+ 32, // 24: bytebase.v1.SchemaTemplateSetting.column_types:type_name -> bytebase.v1.SchemaTemplateSetting.ColumnType
+ 33, // 25: bytebase.v1.SchemaTemplateSetting.table_templates:type_name -> bytebase.v1.SchemaTemplateSetting.TableTemplate
+ 34, // 26: bytebase.v1.DataClassificationSetting.configs:type_name -> bytebase.v1.DataClassificationSetting.DataClassificationConfig
+ 38, // 27: bytebase.v1.SemanticTypeSetting.types:type_name -> bytebase.v1.SemanticTypeSetting.SemanticType
+ 39, // 28: bytebase.v1.Algorithm.full_mask:type_name -> bytebase.v1.Algorithm.FullMask
+ 40, // 29: bytebase.v1.Algorithm.range_mask:type_name -> bytebase.v1.Algorithm.RangeMask
+ 41, // 30: bytebase.v1.Algorithm.md5_mask:type_name -> bytebase.v1.Algorithm.MD5Mask
+ 42, // 31: bytebase.v1.Algorithm.inner_outer_mask:type_name -> bytebase.v1.Algorithm.InnerOuterMask
+ 47, // 32: bytebase.v1.PasswordRestrictionSetting.password_rotation:type_name -> google.protobuf.Duration
+ 4, // 33: bytebase.v1.AISetting.provider:type_name -> bytebase.v1.AISetting.Provider
+ 44, // 34: bytebase.v1.EnvironmentSetting.environments:type_name -> bytebase.v1.EnvironmentSetting.Environment
+ 48, // 35: bytebase.v1.AppIMSetting.IMSetting.type:type_name -> bytebase.v1.Webhook.Type
+ 24, // 36: bytebase.v1.AppIMSetting.IMSetting.slack:type_name -> bytebase.v1.AppIMSetting.Slack
+ 25, // 37: bytebase.v1.AppIMSetting.IMSetting.feishu:type_name -> bytebase.v1.AppIMSetting.Feishu
+ 26, // 38: bytebase.v1.AppIMSetting.IMSetting.wecom:type_name -> bytebase.v1.AppIMSetting.Wecom
+ 27, // 39: bytebase.v1.AppIMSetting.IMSetting.lark:type_name -> bytebase.v1.AppIMSetting.Lark
+ 28, // 40: bytebase.v1.AppIMSetting.IMSetting.dingtalk:type_name -> bytebase.v1.AppIMSetting.DingTalk
+ 49, // 41: bytebase.v1.WorkspaceApprovalSetting.Rule.template:type_name -> bytebase.v1.ApprovalTemplate
+ 50, // 42: bytebase.v1.WorkspaceApprovalSetting.Rule.condition:type_name -> google.type.Expr
+ 51, // 43: bytebase.v1.SchemaTemplateSetting.FieldTemplate.engine:type_name -> bytebase.v1.Engine
+ 52, // 44: bytebase.v1.SchemaTemplateSetting.FieldTemplate.column:type_name -> bytebase.v1.ColumnMetadata
+ 53, // 45: bytebase.v1.SchemaTemplateSetting.FieldTemplate.catalog:type_name -> bytebase.v1.ColumnCatalog
+ 51, // 46: bytebase.v1.SchemaTemplateSetting.ColumnType.engine:type_name -> bytebase.v1.Engine
+ 51, // 47: bytebase.v1.SchemaTemplateSetting.TableTemplate.engine:type_name -> bytebase.v1.Engine
+ 54, // 48: bytebase.v1.SchemaTemplateSetting.TableTemplate.table:type_name -> bytebase.v1.TableMetadata
+ 55, // 49: bytebase.v1.SchemaTemplateSetting.TableTemplate.catalog:type_name -> bytebase.v1.TableCatalog
+ 35, // 50: bytebase.v1.DataClassificationSetting.DataClassificationConfig.levels:type_name -> bytebase.v1.DataClassificationSetting.DataClassificationConfig.Level
+ 37, // 51: bytebase.v1.DataClassificationSetting.DataClassificationConfig.classification:type_name -> bytebase.v1.DataClassificationSetting.DataClassificationConfig.ClassificationEntry
+ 36, // 52: bytebase.v1.DataClassificationSetting.DataClassificationConfig.ClassificationEntry.value:type_name -> bytebase.v1.DataClassificationSetting.DataClassificationConfig.DataClassification
+ 19, // 53: bytebase.v1.SemanticTypeSetting.SemanticType.algorithm:type_name -> bytebase.v1.Algorithm
+ 43, // 54: bytebase.v1.Algorithm.RangeMask.slices:type_name -> bytebase.v1.Algorithm.RangeMask.Slice
+ 3, // 55: bytebase.v1.Algorithm.InnerOuterMask.type:type_name -> bytebase.v1.Algorithm.InnerOuterMask.MaskType
+ 45, // 56: bytebase.v1.EnvironmentSetting.Environment.tags:type_name -> bytebase.v1.EnvironmentSetting.Environment.TagsEntry
+ 5, // 57: bytebase.v1.SettingService.ListSettings:input_type -> bytebase.v1.ListSettingsRequest
+ 7, // 58: bytebase.v1.SettingService.GetSetting:input_type -> bytebase.v1.GetSettingRequest
+ 9, // 59: bytebase.v1.SettingService.UpdateSetting:input_type -> bytebase.v1.UpdateSettingRequest
+ 6, // 60: bytebase.v1.SettingService.ListSettings:output_type -> bytebase.v1.ListSettingsResponse
+ 10, // 61: bytebase.v1.SettingService.GetSetting:output_type -> bytebase.v1.Setting
+ 10, // 62: bytebase.v1.SettingService.UpdateSetting:output_type -> bytebase.v1.Setting
+ 60, // [60:63] is the sub-list for method output_type
+ 57, // [57:60] is the sub-list for method input_type
+ 57, // [57:57] is the sub-list for extension type_name
+ 57, // [57:57] is the sub-list for extension extendee
+ 0, // [0:57] is the sub-list for field type_name
}
func init() { file_v1_setting_service_proto_init() }
@@ -3337,6 +3406,7 @@ func file_v1_setting_service_proto_init() {
file_v1_database_catalog_service_proto_init()
file_v1_database_service_proto_init()
file_v1_issue_service_proto_init()
+ file_v1_project_service_proto_init()
file_v1_setting_service_proto_msgTypes[6].OneofWrappers = []any{
(*Value_StringValue)(nil),
(*Value_AppImSettingValue)(nil),
@@ -3356,14 +3426,21 @@ func file_v1_setting_service_proto_init() {
(*Algorithm_Md5Mask)(nil),
(*Algorithm_InnerOuterMask_)(nil),
}
- file_v1_setting_service_proto_msgTypes[30].OneofWrappers = []any{}
+ file_v1_setting_service_proto_msgTypes[24].OneofWrappers = []any{
+ (*AppIMSetting_IMSetting_Slack)(nil),
+ (*AppIMSetting_IMSetting_Feishu)(nil),
+ (*AppIMSetting_IMSetting_Wecom)(nil),
+ (*AppIMSetting_IMSetting_Lark)(nil),
+ (*AppIMSetting_IMSetting_Dingtalk)(nil),
+ }
+ file_v1_setting_service_proto_msgTypes[31].OneofWrappers = []any{}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_v1_setting_service_proto_rawDesc), len(file_v1_setting_service_proto_rawDesc)),
NumEnums: 5,
- NumMessages: 40,
+ NumMessages: 41,
NumExtensions: 0,
NumServices: 1,
},
diff --git a/backend/generated-go/v1/setting_service_equal.pb.go b/backend/generated-go/v1/setting_service_equal.pb.go
index a79dc45cce..9b8b949aaf 100644
--- a/backend/generated-go/v1/setting_service_equal.pb.go
+++ b/backend/generated-go/v1/setting_service_equal.pb.go
@@ -155,9 +155,6 @@ func (x *AppIMSetting_Slack) Equal(y *AppIMSetting_Slack) bool {
if x == nil || y == nil {
return x == nil && y == nil
}
- if x.Enabled != y.Enabled {
- return false
- }
if x.Token != y.Token {
return false
}
@@ -171,9 +168,6 @@ func (x *AppIMSetting_Feishu) Equal(y *AppIMSetting_Feishu) bool {
if x == nil || y == nil {
return x == nil && y == nil
}
- if x.Enabled != y.Enabled {
- return false
- }
if x.AppId != y.AppId {
return false
}
@@ -190,9 +184,6 @@ func (x *AppIMSetting_Wecom) Equal(y *AppIMSetting_Wecom) bool {
if x == nil || y == nil {
return x == nil && y == nil
}
- if x.Enabled != y.Enabled {
- return false
- }
if x.CorpId != y.CorpId {
return false
}
@@ -212,9 +203,6 @@ func (x *AppIMSetting_Lark) Equal(y *AppIMSetting_Lark) bool {
if x == nil || y == nil {
return x == nil && y == nil
}
- if x.Enabled != y.Enabled {
- return false
- }
if x.AppId != y.AppId {
return false
}
@@ -231,9 +219,6 @@ func (x *AppIMSetting_DingTalk) Equal(y *AppIMSetting_DingTalk) bool {
if x == nil || y == nil {
return x == nil && y == nil
}
- if x.Enabled != y.Enabled {
- return false
- }
if x.ClientId != y.ClientId {
return false
}
@@ -246,31 +231,52 @@ func (x *AppIMSetting_DingTalk) Equal(y *AppIMSetting_DingTalk) bool {
return true
}
-func (x *AppIMSetting) Equal(y *AppIMSetting) bool {
+func (x *AppIMSetting_IMSetting) Equal(y *AppIMSetting_IMSetting) bool {
if x == y {
return true
}
if x == nil || y == nil {
return x == nil && y == nil
}
- if !x.Slack.Equal(y.Slack) {
+ if x.Type != y.Type {
+ return false
+ }
+ if !x.GetSlack().Equal(y.GetSlack()) {
return false
}
- if !x.Feishu.Equal(y.Feishu) {
+ if !x.GetFeishu().Equal(y.GetFeishu()) {
return false
}
- if !x.Wecom.Equal(y.Wecom) {
+ if !x.GetWecom().Equal(y.GetWecom()) {
return false
}
- if !x.Lark.Equal(y.Lark) {
+ if !x.GetLark().Equal(y.GetLark()) {
return false
}
- if !x.Dingtalk.Equal(y.Dingtalk) {
+ if !x.GetDingtalk().Equal(y.GetDingtalk()) {
return false
}
return true
}
+func (x *AppIMSetting) Equal(y *AppIMSetting) bool {
+ if x == y {
+ return true
+ }
+ if x == nil || y == nil {
+ return x == nil && y == nil
+ }
+ if len(x.Settings) != len(y.Settings) {
+ return false
+ }
+ for i := 0; i < len(x.Settings); i++ {
+ if !x.Settings[i].Equal(y.Settings[i]) {
+ return false
+ }
+ }
+ return true
+}
+
func (x *WorkspaceProfileSetting) Equal(y *WorkspaceProfileSetting) bool {
if x == y {
return true
diff --git a/backend/migrator/migration/3.12/0000##migrate_app_im_to_array.sql b/backend/migrator/migration/3.12/0000##migrate_app_im_to_array.sql
new file mode 100644
index 0000000000..ff4ef9e49e
--- /dev/null
+++ b/backend/migrator/migration/3.12/0000##migrate_app_im_to_array.sql
@@ -0,0 +1,76 @@
+-- Migrate APP_IM setting from object format to array format
+-- Old format: { "slack": { "enabled": true, "token": "..." }, "feishu": { ... }, ... }
+-- New format: { "settings": [ { "type": "SLACK", "token": "..." }, { "type": "FEISHU", "appId": "...", "appSecret": "..." }, ... ] }
+
+DO $$
+DECLARE
+ old_val jsonb;
+ settings_array jsonb := '[]'::jsonb;
+BEGIN
+ -- Get the current value
+ SELECT value INTO old_val FROM setting WHERE name = 'APP_IM';
+
+ -- Return early if no APP_IM setting exists
+ IF old_val IS NULL THEN
+ RETURN;
+ END IF;
+
+ -- Process Slack
+ IF old_val->'slack'->>'enabled' = 'true' THEN
+ settings_array := settings_array || jsonb_build_array(
+ jsonb_build_object(
+ 'type', 'SLACK',
+ 'token', old_val->'slack'->>'token'
+ )
+ );
+ END IF;
+
+ -- Process Feishu
+ IF old_val->'feishu'->>'enabled' = 'true' THEN
+ settings_array := settings_array || jsonb_build_array(
+ jsonb_build_object(
+ 'type', 'FEISHU',
+ 'appId', old_val->'feishu'->>'appId',
+ 'appSecret', old_val->'feishu'->>'appSecret'
+ )
+ );
+ END IF;
+
+ -- Process Wecom
+ IF old_val->'wecom'->>'enabled' = 'true' THEN
+ settings_array := settings_array || jsonb_build_array(
+ jsonb_build_object(
+ 'type', 'WECOM',
+ 'corpId', old_val->'wecom'->>'corpId',
+ 'agentId', old_val->'wecom'->>'agentId',
+ 'secret', old_val->'wecom'->>'secret'
+ )
+ );
+ END IF;
+
+ -- Process Lark
+ IF old_val->'lark'->>'enabled' = 'true' THEN
+ settings_array := settings_array || jsonb_build_array(
+ jsonb_build_object(
+ 'type', 'LARK',
+ 'appId', old_val->'lark'->>'appId',
+ 'appSecret', old_val->'lark'->>'appSecret'
+ )
+ );
+ END IF;
+
+ -- Process DingTalk
+ IF old_val->'dingtalk'->>'enabled' = 'true' THEN
+ settings_array := settings_array || jsonb_build_array(
+ jsonb_build_object(
+ 'type', 'DINGTALK',
+ 'clientId', old_val->'dingtalk'->>'clientId',
+ 'clientSecret', old_val->'dingtalk'->>'clientSecret',
+ 'robotCode', old_val->'dingtalk'->>'robotCode'
+ )
+ );
+ END IF;
+
+ -- Update the setting with the new object format containing settings array
+ UPDATE setting SET value = jsonb_build_object('settings', settings_array) WHERE name = 'APP_IM';
+END $$;
diff --git a/backend/migrator/migrator_test.go b/backend/migrator/migrator_test.go
index 5a5ab4de33..7cb4c8fb03 100644
--- a/backend/migrator/migrator_test.go
+++ b/backend/migrator/migrator_test.go
@@ -12,7 +12,7 @@ import (
func TestLatestVersion(t *testing.T) {
files, err := getSortedVersionedFiles()
require.NoError(t, err)
- require.Equal(t, semver.MustParse("3.11.21"), *files[len(files)-1].version)
+ require.Equal(t, semver.MustParse("3.12.0"), *files[len(files)-1].version)
}
func TestVersionUnique(t *testing.T) {
diff --git a/backend/plugin/webhook/dingtalk/dingtalk.go b/backend/plugin/webhook/dingtalk/dingtalk.go
index 327281f24b..ca017d2480 100644
--- a/backend/plugin/webhook/dingtalk/dingtalk.go
+++ b/backend/plugin/webhook/dingtalk/dingtalk.go
@@ -20,6 +20,19 @@ import (
"github.com/bytebase/bytebase/backend/plugin/webhook"
)
+// getDingTalkConfig extracts the DingTalk configuration from the AppIMSetting.
+func getDingTalkConfig(setting *storepb.AppIMSetting) *storepb.AppIMSetting_DingTalk {
+ if setting == nil {
+ return nil
+ }
+ for _, s := range setting.Settings {
+ if s.Type == storepb.ProjectWebhook_DINGTALK {
+ return s.GetDingtalk()
+ }
+ }
+ return nil
+}
+
// Response is the API message for DingTalk webhook response.
type Response struct {
ErrorCode int `json:"errcode"`
@@ -64,7 +77,7 @@ func (*Receiver) Post(context webhook.Context) error {
// returns true if the message is sent successfully.
func sendDirectMessage(webhookCtx webhook.Context) bool {
- dingtalk := webhookCtx.IMSetting.GetDingtalk()
+ dingtalk := getDingTalkConfig(webhookCtx.IMSetting)
if dingtalk == nil {
return false
}
diff --git a/backend/plugin/webhook/feishu/feishu.go b/backend/plugin/webhook/feishu/feishu.go
index ccd66f94c0..99e4ba2e8e 100644
--- a/backend/plugin/webhook/feishu/feishu.go
+++ b/backend/plugin/webhook/feishu/feishu.go
@@ -19,6 +19,19 @@ import (
"github.com/bytebase/bytebase/backend/plugin/webhook"
)
+// getFeishuConfig extracts the Feishu configuration from the AppIMSetting.
+func getFeishuConfig(setting *storepb.AppIMSetting) *storepb.AppIMSetting_Feishu {
+ if setting == nil {
+ return nil
+ }
+ for _, s := range setting.Settings {
+ if s.Type == storepb.ProjectWebhook_FEISHU {
+ return s.GetFeishu()
+ }
+ }
+ return nil
+}
+
// WebhookResponse is the API message for Feishu webhook response.
type WebhookResponse struct {
Code int `json:"code"`
@@ -113,7 +126,7 @@ func (*feishuReceiver) Post(context webhook.Context) error {
}
func postDirectMessage(webhookCtx webhook.Context) bool {
- feishu := webhookCtx.IMSetting.GetFeishu()
+ feishu := getFeishuConfig(webhookCtx.IMSetting)
if feishu == nil {
return false
}
diff --git a/backend/plugin/webhook/lark/lark.go b/backend/plugin/webhook/lark/lark.go
index 832bf3da7e..6771db7497 100644
--- a/backend/plugin/webhook/lark/lark.go
+++ b/backend/plugin/webhook/lark/lark.go
@@ -19,6 +19,19 @@ import (
"github.com/bytebase/bytebase/backend/plugin/webhook"
)
+// getLarkConfig extracts the Lark configuration from the AppIMSetting.
+func getLarkConfig(setting *storepb.AppIMSetting) *storepb.AppIMSetting_Lark {
+ if setting == nil {
+ return nil
+ }
+ for _, s := range setting.Settings {
+ if s.Type == storepb.ProjectWebhook_LARK {
+ return s.GetLark()
+ }
+ }
+ return nil
+}
+
// WebhookResponse is the API message for Lark webhook response.
type WebhookResponse struct {
Code int `json:"code"`
@@ -113,7 +126,7 @@ func (*larkReceiver) Post(context webhook.Context) error {
}
func postDirectMessage(webhookCtx webhook.Context) bool {
- lark := webhookCtx.IMSetting.GetLark()
+ lark := getLarkConfig(webhookCtx.IMSetting)
if lark == nil {
return false
}
diff --git a/backend/plugin/webhook/slack/slack.go b/backend/plugin/webhook/slack/slack.go
index 455a8e9493..4dea2eb900 100644
--- a/backend/plugin/webhook/slack/slack.go
+++ b/backend/plugin/webhook/slack/slack.go
@@ -18,6 +18,21 @@ import (
"github.com/bytebase/bytebase/backend/plugin/webhook"
)
+// getSlackToken extracts the Slack token from the AppIMSetting.
+func getSlackToken(setting *storepb.AppIMSetting) string {
+ if setting == nil {
+ return ""
+ }
+ for _, s := range setting.Settings {
+ if s.Type == storepb.ProjectWebhook_SLACK {
+ if slack := s.GetSlack(); slack != nil {
+ return slack.Token
+ }
+ }
+ }
+ return ""
+}
+
// BlockMarkdown is the API message for Slack webhook block markdown.
type BlockMarkdown struct {
Type string `json:"type"`
@@ -179,7 +194,7 @@ func postMessage(context webhook.Context) error {
func postDirectMessage(webhookCtx webhook.Context) bool {
ctx := context.Background()
- t := webhookCtx.IMSetting.GetSlack().GetToken()
+ t := getSlackToken(webhookCtx.IMSetting)
if t == "" {
return false
}
diff --git a/backend/plugin/webhook/wecom/wecom.go b/backend/plugin/webhook/wecom/wecom.go
index 1874f5af5f..3a650df0b3 100644
--- a/backend/plugin/webhook/wecom/wecom.go
+++ b/backend/plugin/webhook/wecom/wecom.go
@@ -20,6 +20,19 @@ import (
"github.com/bytebase/bytebase/backend/plugin/webhook"
)
+// getWecomConfig extracts the WeCom configuration from the AppIMSetting.
+func getWecomConfig(setting *storepb.AppIMSetting) *storepb.AppIMSetting_Wecom {
+ if setting == nil {
+ return nil
+ }
+ for _, s := range setting.Settings {
+ if s.Type == storepb.ProjectWebhook_WECOM {
+ return s.GetWecom()
+ }
+ }
+ return nil
+}
+
// WebhookResponse is the API message for WeCom webhook response.
type WebhookResponse struct {
ErrorCode int `json:"errcode"`
@@ -135,7 +148,7 @@ func (*Receiver) sendMessage(context webhook.Context) error {
// sendDirectMessage sends direct message to users.
// returns `true` if successfully sends messages to all users.
func (*Receiver) sendDirectMessage(webhookCtx webhook.Context) bool {
- wecom := webhookCtx.IMSetting.GetWecom()
+ wecom := getWecomConfig(webhookCtx.IMSetting)
if wecom == nil {
return false
}
diff --git a/frontend/src/components/Member/MemberDataTable/cells/UserOperationsCell.vue b/frontend/src/components/Member/MemberDataTable/cells/UserOperationsCell.vue
index 859236db9e..4b2c2c8f7a 100644
--- a/frontend/src/components/Member/MemberDataTable/cells/UserOperationsCell.vue
+++ b/frontend/src/components/Member/MemberDataTable/cells/UserOperationsCell.vue
@@ -5,10 +5,13 @@
allowRevoke &&
(scope === 'workspace' || binding.projectRoleBindings.length > 0)
"
+ :positive-button-props="{
+ type: 'error',
+ }"
@positive-click="$emit('revoke-binding')"
>
<template #trigger>
- <NButton quaternary circle @click.stop>
+ <NButton quaternary circle @click.stop type="error">
<template #icon>
<Trash2Icon class="w-4 h-auto" />
</template>
diff --git a/frontend/src/components/Member/MemberDataTableByRole.vue b/frontend/src/components/Member/MemberDataTableByRole.vue
index 017ca4c591..de8e7c4a10 100644
--- a/frontend/src/components/Member/MemberDataTableByRole.vue
+++ b/frontend/src/components/Member/MemberDataTableByRole.vue
@@ -112,12 +112,15 @@ const columns = computed(() => {
row.scope === "project" &&
props.allowEdit && (
<NPopconfirm
+ positiveButtonProps={{
+ type: "error",
+ }}
onPositiveClick={() =>
emit("revoke-role", row.name, row.id.endsWith(".expired"))
}
v-slots={{
trigger: () => (
- <Trash2Icon class="w-4 h-auto ml-auto mr-3 cursor-pointer" />
+ <Trash2Icon class=" text-red-600 w-4 h-auto ml-auto mr-3 cursor-pointer" />
),
default: () => t("settings.members.revoke-access-alert"),
}}
diff --git a/frontend/src/components/ProjectWebhookForm.vue b/frontend/src/components/ProjectWebhookForm.vue
index 55fd94fc94..4d9ca000ac 100644
--- a/frontend/src/components/ProjectWebhookForm.vue
+++ b/frontend/src/components/ProjectWebhookForm.vue
@@ -91,9 +91,9 @@
<div class="text-md leading-6 font-medium text-main">
{{ $t("project.webhook.direct-messages") }}
</div>
- <BBAttention class="my-2" :type="imApp?.enabled ? 'info' : 'warning'">
+ <BBAttention class="my-2" :type="imApp ? 'info' : 'warning'">
<template #default>
- <span v-if="imApp?.enabled">
+ <span v-if="imApp">
{{ $t("project.webhook.direct-messages-tip") }}
</span>
<i18n-t
@@ -269,7 +269,6 @@ import {
projectWebhookV1TypeItemList,
} from "@/types";
import {
- Webhook_Type,
type Activity_Type,
type Project,
type Webhook,
@@ -358,19 +357,9 @@ const imApp = computed(() => {
if (!selectedWebhook.value?.supportDirectMessage) {
return undefined;
}
- switch (selectedWebhook.value.type) {
- case Webhook_Type.SLACK:
- return imSetting.value?.slack;
- case Webhook_Type.FEISHU:
- return imSetting.value?.feishu;
- case Webhook_Type.LARK:
- return imSetting.value?.lark;
- case Webhook_Type.WECOM:
- return imSetting.value?.wecom;
- case Webhook_Type.DINGTALK:
- return imSetting.value?.dingtalk;
- }
- return undefined;
+ return imSetting.value?.settings.find(
+ (setting) => setting.type === selectedWebhook.value?.type
+ );
});
const webhookSupportDirectMessage = computed(
diff --git a/frontend/src/components/Revision/RevisionDataTable.vue b/frontend/src/components/Revision/RevisionDataTable.vue
index cd329e37d6..2cd32702bb 100644
--- a/frontend/src/components/Revision/RevisionDataTable.vue
+++ b/frontend/src/components/Revision/RevisionDataTable.vue
@@ -176,8 +176,8 @@ const rowProps = (revision: Revision) => {
const onDelete = () => {
dialog.warning({
- title: t("database.revision.delete-confirm-dialog.title"),
- content: t("database.revision.delete-confirm-dialog.content"),
+ title: t("bbkit.confirm-button.sure-to-delete"),
+ content: t("database.revision.delete-confirm-dialog"),
negativeText: t("common.cancel"),
positiveText: t("common.confirm"),
onPositiveClick: async () => {
diff --git a/frontend/src/components/User/Settings/CreateGroupDrawer.vue b/frontend/src/components/User/Settings/CreateGroupDrawer.vue
index bde4c95095..9de77c9671 100644
--- a/frontend/src/components/User/Settings/CreateGroupDrawer.vue
+++ b/frontend/src/components/User/Settings/CreateGroupDrawer.vue
@@ -80,6 +80,7 @@
<NButton
quaternary
size="tiny"
+ type="error"
:disabled="disallowEditMember"
@click="deleteMember(i)"
>
diff --git a/frontend/src/components/User/Settings/UserDataTable/cells/UserOperationsCell.vue b/frontend/src/components/User/Settings/UserDataTable/cells/UserOperationsCell.vue
index 62013a8410..a7f7eccd25 100644
--- a/frontend/src/components/User/Settings/UserDataTable/cells/UserOperationsCell.vue
+++ b/frontend/src/components/User/Settings/UserDataTable/cells/UserOperationsCell.vue
@@ -3,10 +3,13 @@
<template v-if="allowEdit">
<NPopconfirm
v-if="allowDeleteUser"
+ :positive-button-props="{
+ type: 'error',
+ }"
@positive-click="() => changeRowStatus(State.DELETED)"
>
<template #trigger>
- <NButton quaternary circle @click.stop>
+ <NButton quaternary circle @click.stop type="error">
<template #icon>
<Trash2Icon class="w-4 h-auto" />
</template>
diff --git a/frontend/src/locales/en-US.json b/frontend/src/locales/en-US.json
index ea5e62c1d0..4fa0327aa6 100644
--- a/frontend/src/locales/en-US.json
+++ b/frontend/src/locales/en-US.json
@@ -393,6 +393,10 @@
"audit-log": "Audit Logs",
"custom-roles": "Custom Roles"
},
+ "im": {
+ "add-im-integration": "Add IM Integration",
+ "add-another-im": "Add Anothr IM"
+ },
"profile": {
"email": "Email",
"role": "Role",
@@ -1740,10 +1744,7 @@
"type-declarative": "Declarative",
"invalid-version-format": "Version must be numeric parts separated by dots (e.g., 1.0.0)",
"version-already-exists": "This version already exists in the database",
- "delete-confirm-dialog": {
- "title": "Are you sure to delete?",
- "content": "This will delete these applied revisions and the database schema will not be changed. This action cannot be undone."
- }
+ "delete-confirm-dialog": "This will delete these applied revisions and the database schema will not be changed. This action cannot be undone."
},
"not-found": "Cannot found the database",
"drifted": {
diff --git a/frontend/src/locales/es-ES.json b/frontend/src/locales/es-ES.json
index b3f2379db2..3104b2bdfa 100644
--- a/frontend/src/locales/es-ES.json
+++ b/frontend/src/locales/es-ES.json
@@ -393,6 +393,10 @@
"audit-log": "Registros de auditoría",
"custom-roles": "Roles personalizados"
},
+ "im": {
+ "add-im-integration": "Agregar integración de mensajería instantánea",
+ "add-another-im": "Añadir otro IM"
+ },
"profile": {
"email": "Correo electrónico",
"role": "Rol",
@@ -1740,10 +1744,7 @@
"type-declarative": "Declarativo",
"invalid-version-format": "La versión debe tener partes numéricas separadas por puntos (por ejemplo, 1.0.0)",
"version-already-exists": "Esta versión ya existe en la base de datos",
- "delete-confirm-dialog": {
- "title": "¿Estas seguro de eliminarlo?",
- "content": "Esto eliminará las revisiones aplicadas y el esquema de la base de datos no se modificará. Esta acción no se puede deshacer."
- }
+ "delete-confirm-dialog": "Esto eliminará las revisiones aplicadas y el esquema de la base de datos no se modificará. Esta acción no se puede deshacer."
},
"not-found": "No se puede encontrar la base de datos",
"drifted": {
diff --git a/frontend/src/locales/ja-JP.json b/frontend/src/locales/ja-JP.json
index 78b6f05192..41168e6a78 100644
--- a/frontend/src/locales/ja-JP.json
+++ b/frontend/src/locales/ja-JP.json
@@ -393,6 +393,10 @@
"audit-log": "監査ログ",
"custom-roles": "カスタムロール"
},
+ "im": {
+ "add-im-integration": "IM統合を追加する",
+ "add-another-im": "別のIMを追加"
+ },
"profile": {
"email": "メールアドレス",
"role": "役割",
@@ -1740,10 +1744,7 @@
"type-declarative": "宣言的",
"invalid-version-format": "バージョンはドットで区切られた数字部分でなければなりません(例:1.0.0)",
"version-already-exists": "このバージョンは既にデータベースに存在します",
- "delete-confirm-dialog": {
- "title": "本当に削除しますか?",
- "content": "これにより、適用されたリビジョンが削除され、データベース スキーマは変更されません。このアクションは元に戻せません。"
- }
+ "delete-confirm-dialog": "これにより、適用されたリビジョンが削除され、データベース スキーマは変更されません。このアクションは元に戻せません。"
},
"not-found": "データベースが見つかりません",
"drifted": {
diff --git a/frontend/src/locales/vi-VN.json b/frontend/src/locales/vi-VN.json
index c800d2a31b..e609f541b0 100644
--- a/frontend/src/locales/vi-VN.json
+++ b/frontend/src/locales/vi-VN.json
@@ -393,6 +393,10 @@
"audit-log": "Nhật ký kiểm tra",
"custom-roles": "Vai trò tùy chỉnh"
},
+ "im": {
+ "add-im-integration": "Thêm tích hợp IM",
+ "add-another-im": "Thêm tin nhắn tức thời khác"
+ },
"profile": {
"email": "Email",
"role": "Vai trò",
@@ -1740,10 +1744,7 @@
"type-declarative": "Tuyên bố",
"invalid-version-format": "Phiên bản phải là các phần số được phân tách bằng dấu chấm (ví dụ: 1.0.0)",
"version-already-exists": "Phiên bản này đã tồn tại trong cơ sở dữ liệu",
- "delete-confirm-dialog": {
- "title": "Bạn có chắc chắn muốn xóa?",
- "content": "Thao tác này sẽ xóa các bản sửa đổi đã áp dụng này và lược đồ cơ sở dữ liệu sẽ không bị thay đổi. Hành động này không thể hoàn tác."
- }
+ "delete-confirm-dialog": "Thao tác này sẽ xóa các bản sửa đổi đã áp dụng này và lược đồ cơ sở dữ liệu sẽ không bị thay đổi. Hành động này không thể hoàn tác."
},
"not-found": "Không tìm thấy cơ sở dữ liệu",
"drifted": {
diff --git a/frontend/src/locales/zh-CN.json b/frontend/src/locales/zh-CN.json
index 8b8fbbfa73..934a27f0c2 100644
--- a/frontend/src/locales/zh-CN.json
+++ b/frontend/src/locales/zh-CN.json
@@ -393,6 +393,10 @@
"audit-log": "审计日志",
"custom-roles": "自定义角色"
},
+ "im": {
+ "add-im-integration": "添加即时通讯集成",
+ "add-another-im": "添加另一个即时通讯工具"
+ },
"profile": {
"email": "邮箱",
"role": "角色",
@@ -1740,10 +1744,7 @@
"type-declarative": "声明式",
"invalid-version-format": "版本必须是用点分隔的数字部分(例如,1.0.0)",
"version-already-exists": "此版本已存在于数据库中",
- "delete-confirm-dialog": {
- "title": "确定要删除吗?",
- "content": "这将删除这些已应用的修改,但不会影响数据库 Schema。此操作无法撤消。"
- }
+ "delete-confirm-dialog": "这将删除这些已应用的修改,但不会影响数据库 Schema。此操作无法撤消。"
},
"not-found": "找不到数据库",
"drifted": {
diff --git a/frontend/src/types/proto-es/v1/setting_service_pb.d.ts b/frontend/src/types/proto-es/v1/setting_service_pb.d.ts
index 8378402091..2eccaf844e 100644
--- a/frontend/src/types/proto-es/v1/setting_service_pb.d.ts
+++ b/frontend/src/types/proto-es/v1/setting_service_pb.d.ts
@@ -5,6 +5,7 @@
import type { GenEnum, GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2";
import type { Message } from "@bufbuild/protobuf";
import type { Duration, FieldMask } from "@bufbuild/protobuf/wkt";
+import type { Webhook_Type } from "./project_service_pb";
import type { ApprovalTemplate } from "./issue_service_pb";
import type { Expr } from "../google/type/expr_pb";
import type { Engine } from "./common_pb";
@@ -342,29 +343,9 @@ export declare const ValueSchema: GenMessage<Value>;
*/
export declare type AppIMSetting = Message<"bytebase.v1.AppIMSetting"> & {
/**
- * @generated from field: bytebase.v1.AppIMSetting.Slack slack = 1;
+ * @generated from field: repeated bytebase.v1.AppIMSetting.IMSetting settings = 1;
*/
- slack?: AppIMSetting_Slack;
-
- /**
- * @generated from field: bytebase.v1.AppIMSetting.Feishu feishu = 2;
- */
- feishu?: AppIMSetting_Feishu;
-
- /**
- * @generated from field: bytebase.v1.AppIMSetting.Wecom wecom = 3;
- */
- wecom?: AppIMSetting_Wecom;
-
- /**
- * @generated from field: bytebase.v1.AppIMSetting.Lark lark = 4;
- */
- lark?: AppIMSetting_Lark;
-
- /**
- * @generated from field: bytebase.v1.AppIMSetting.DingTalk dingtalk = 5;
- */
- dingtalk?: AppIMSetting_DingTalk;
+ settings: AppIMSetting_IMSetting[];
};
/**
@@ -378,12 +359,7 @@ export declare const AppIMSettingSchema: GenMessage<AppIMSetting>;
*/
export declare type AppIMSetting_Slack = Message<"bytebase.v1.AppIMSetting.Slack"> & {
/**
- * @generated from field: bool enabled = 1;
- */
- enabled: boolean;
-
- /**
- * @generated from field: string token = 2;
+ * @generated from field: string token = 1;
*/
token: string;
};
@@ -399,17 +375,12 @@ export declare const AppIMSetting_SlackSchema: GenMessage<AppIMSetting_Slack>;
*/
export declare type AppIMSetting_Feishu = Message<"bytebase.v1.AppIMSetting.Feishu"> & {
/**
- * @generated from field: bool enabled = 1;
- */
- enabled: boolean;
-
- /**
- * @generated from field: string app_id = 2;
+ * @generated from field: string app_id = 1;
*/
appId: string;
/**
- * @generated from field: string app_secret = 3;
+ * @generated from field: string app_secret = 2;
*/
appSecret: string;
};
@@ -425,22 +396,17 @@ export declare const AppIMSetting_FeishuSchema: GenMessage<AppIMSetting_Feishu>;
*/
export declare type AppIMSetting_Wecom = Message<"bytebase.v1.AppIMSetting.Wecom"> & {
/**
- * @generated from field: bool enabled = 1;
- */
- enabled: boolean;
-
- /**
- * @generated from field: string corp_id = 2;
+ * @generated from field: string corp_id = 1;
*/
corpId: string;
/**
- * @generated from field: string agent_id = 3;
+ * @generated from field: string agent_id = 2;
*/
agentId: string;
/**
- * @generated from field: string secret = 4;
+ * @generated from field: string secret = 3;
*/
secret: string;
};
@@ -456,17 +422,12 @@ export declare const AppIMSetting_WecomSchema: GenMessage<AppIMSetting_Wecom>;
*/
export declare type AppIMSetting_Lark = Message<"bytebase.v1.AppIMSetting.Lark"> & {
/**
- * @generated from field: bool enabled = 1;
- */
- enabled: boolean;
-
- /**
- * @generated from field: string app_id = 2;
+ * @generated from field: string app_id = 1;
*/
appId: string;
/**
- * @generated from field: string app_secret = 3;
+ * @generated from field: string app_secret = 2;
*/
appSecret: string;
};
@@ -482,22 +443,17 @@ export declare const AppIMSetting_LarkSchema: GenMessage<AppIMSetting_Lark>;
*/
export declare type AppIMSetting_DingTalk = Message<"bytebase.v1.AppIMSetting.DingTalk"> & {
/**
- * @generated from field: bool enabled = 1;
- */
- enabled: boolean;
-
- /**
- * @generated from field: string client_id = 2;
+ * @generated from field: string client_id = 1;
*/
clientId: string;
/**
- * @generated from field: string client_secret = 3;
+ * @generated from field: string client_secret = 2;
*/
clientSecret: string;
/**
- * @generated from field: string robot_code = 4;
+ * @generated from field: string robot_code = 3;
*/
robotCode: string;
};
@@ -508,6 +464,57 @@ export declare type AppIMSetting_DingTalk = Message<"bytebase.v1.AppIMSetting.Di
*/
export declare const AppIMSetting_DingTalkSchema: GenMessage<AppIMSetting_DingTalk>;
+/**
+ * @generated from message bytebase.v1.AppIMSetting.IMSetting
+ */
+export declare type AppIMSetting_IMSetting = Message<"bytebase.v1.AppIMSetting.IMSetting"> & {
+ /**
+ * @generated from field: bytebase.v1.Webhook.Type type = 1;
+ */
+ type: Webhook_Type;
+
+ /**
+ * @generated from oneof bytebase.v1.AppIMSetting.IMSetting.payload
+ */
+ payload: {
+ /**
+ * @generated from field: bytebase.v1.AppIMSetting.Slack slack = 2;
+ */
+ value: AppIMSetting_Slack;
+ case: "slack";
+ } | {
+ /**
+ * @generated from field: bytebase.v1.AppIMSetting.Feishu feishu = 3;
+ */
+ value: AppIMSetting_Feishu;
+ case: "feishu";
+ } | {
+ /**
+ * @generated from field: bytebase.v1.AppIMSetting.Wecom wecom = 4;
+ */
+ value: AppIMSetting_Wecom;
+ case: "wecom";
+ } | {
+ /**
+ * @generated from field: bytebase.v1.AppIMSetting.Lark lark = 5;
+ */
+ value: AppIMSetting_Lark;
+ case: "lark";
+ } | {
+ /**
+ * @generated from field: bytebase.v1.AppIMSetting.DingTalk dingtalk = 6;
+ */
+ value: AppIMSetting_DingTalk;
+ case: "dingtalk";
+ } | { case: undefined; value?: undefined };
+};
+
+/**
+ * Describes the message bytebase.v1.AppIMSetting.IMSetting.
+ * Use `create(AppIMSetting_IMSettingSchema)` to create a new message.
+ */
+export declare const AppIMSetting_IMSettingSchema: GenMessage<AppIMSetting_IMSetting>;
+
/**
* @generated from message bytebase.v1.WorkspaceProfileSetting
*/
diff --git a/frontend/src/types/proto-es/v1/setting_service_pb.js b/frontend/src/types/proto-es/v1/setting_service_pb.js
index f01617c0b5..d2ddf6dfdb 100644
--- a/frontend/src/types/proto-es/v1/setting_service_pb.js
+++ b/frontend/src/types/proto-es/v1/setting_service_pb.js
@@ -14,12 +14,13 @@ import { file_v1_common } from "./common_pb";
import { file_v1_database_catalog_service } from "./database_catalog_service_pb";
import { file_v1_database_service } from "./database_service_pb";
import { file_v1_issue_service } from "./issue_service_pb";
+import { file_v1_project_service } from "./project_service_pb";
/**
* Describes the file v1/setting_service.proto.
*/
export const file_v1_setting_service = /*@__PURE__*/
- fileDesc("Chh2MS9zZXR0aW5nX3NlcnZpY2UucHJvdG8SC2J5dGViYXNlLnYxIhUKE0xpc3RTZXR0aW5nc1JlcXVlc3QiPgoUTGlzdFNldHRpbmdzUmVzcG9uc2USJgoIc2V0dGluZ3MYASADKAsyFC5ieXRlYmFzZS52MS5TZXR0aW5nIj8KEUdldFNldHRpbmdSZXF1ZXN0EioKBG5hbWUYASABKAlCHOBBAvpBFgoUYnl0ZWJhc2UuY29tL1NldHRpbmciOwoSR2V0U2V0dGluZ1Jlc3BvbnNlEiUKB3NldHRpbmcYASABKAsyFC5ieXRlYmFzZS52MS5TZXR0aW5nIqEBChRVcGRhdGVTZXR0aW5nUmVxdWVzdBIqCgdzZXR0aW5nGAEgASgLMhQuYnl0ZWJhc2UudjEuU2V0dGluZ0ID4EECEhUKDXZhbGlkYXRlX29ubHkYAiABKAgSFQoNYWxsb3dfbWlzc2luZxgDIAEoCBIvCgt1cGRhdGVfbWFzaxgEIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5GaWVsZE1hc2si1QMKB1NldHRpbmcSDAoEbmFtZRgBIAEoCRIhCgV2YWx1ZRgCIAEoCzISLmJ5dGViYXNlLnYxLlZhbHVlIuMCCgtTZXR0aW5nTmFtZRIcChhTRVRUSU5HX05BTUVfVU5TUEVDSUZJRUQQABIPCgtBVVRIX1NFQ1JFVBABEhEKDUJSQU5ESU5HX0xPR08QAhIQCgxXT1JLU1BBQ0VfSUQQAxIVChFXT1JLU1BBQ0VfUFJPRklMRRAEEhYKEldPUktTUEFDRV9BUFBST1ZBTBAFEh8KG1dPUktTUEFDRV9FWFRFUk5BTF9BUFBST1ZBTBAGEhYKEkVOVEVSUFJJU0VfTElDRU5TRRAHEgoKBkFQUF9JTRAIEg0KCVdBVEVSTUFSSxAJEgYKAkFJEAoSEwoPU0NIRU1BX1RFTVBMQVRFEA0SFwoTREFUQV9DTEFTU0lGSUNBVElPThAOEhIKDlNFTUFOVElDX1RZUEVTEA8SCAoEU0NJTRAREhgKFFBBU1NXT1JEX1JFU1RSSUNUSU9OEBISDwoLRU5WSVJPTk1FTlQQEzot6kEqChRieXRlYmFzZS5jb20vU2V0dGluZxISc2V0dGluZ3Mve3NldHRpbmd9SgQIEBARIukFCgVWYWx1ZRIWCgxzdHJpbmdfdmFsdWUYASABKAlIABI5ChRhcHBfaW1fc2V0dGluZ192YWx1ZRgDIAEoCzIZLmJ5dGViYXNlLnYxLkFwcElNU2V0dGluZ0gAEk8KH3dvcmtzcGFjZV9wcm9maWxlX3NldHRpbmdfdmFsdWUYBSABKAsyJC5ieXRlYmFzZS52MS5Xb3Jrc3BhY2VQcm9maWxlU2V0dGluZ0gAElEKIHdvcmtzcGFjZV9hcHByb3ZhbF9zZXR0aW5nX3ZhbHVlGAYgASgLMiUuYnl0ZWJhc2UudjEuV29ya3NwYWNlQXBwcm92YWxTZXR0aW5nSAASSwodc2NoZW1hX3RlbXBsYXRlX3NldHRpbmdfdmFsdWUYCSABKAsyIi5ieXRlYmFzZS52MS5TY2hlbWFUZW1wbGF0ZVNldHRpbmdIABJTCiFkYXRhX2NsYXNzaWZpY2F0aW9uX3NldHRpbmdfdmFsdWUYCiABKAsyJi5ieXRlYmFzZS52MS5EYXRhQ2xhc3NpZmljYXRpb25TZXR0aW5nSAASRwobc2VtYW50aWNfdHlwZV9zZXR0aW5nX3ZhbHVlGAsgASgLMiAuYnl0ZWJhc2UudjEuU2VtYW50aWNUeXBlU2V0dGluZ0gAEjAKDHNjaW1fc2V0dGluZxgOIAEoCzIYLmJ5dGViYXNlLnYxLlNDSU1TZXR0aW5nSAASTwoccGFzc3dvcmRfcmVzdHJpY3Rpb25fc2V0dGluZxgPIAEoCzInLmJ5dGViYXNlLnYxLlBhc3N3b3JkUmVzdHJpY3Rpb25TZXR0aW5nSAASLAoKYWlfc2V0dGluZxgQIAEoCzIWLmJ5dGViYXNlLnYxLkFJU2V0dGluZ0gAEj4KE2Vudmlyb25tZW50X3NldHRpbmcYESABKAsyHy5ieXRlYmFzZS52MS5FbnZpcm9ubWVudFNldHRpbmdIAEIHCgV2YWx1ZUoECBIQEyKIBQoMQXBwSU1TZXR0aW5nEi4KBXNsYWNrGAEgASgLMh8uYnl0ZWJhc2UudjEuQXBwSU1TZXR0aW5nLlNsYWNrEjAKBmZlaXNodRgCIAEoCzIgLmJ5dGViYXNlLnYxLkFwcElNU2V0dGluZy5GZWlzaHUSLgoFd2Vjb20YAyABKAsyHy5ieXRlYmFzZS52MS5BcHBJTVNldHRpbmcuV2Vjb20SLAoEbGFyaxgEIAEoCzIeLmJ5dGViYXNlLnYxLkFwcElNU2V0dGluZy5MYXJrEjQKCGRpbmd0YWxrGAUgASgLMiIuYnl0ZWJhc2UudjEuQXBwSU1TZXR0aW5nLkRpbmdUYWxrGiwKBVNsYWNrEg8KB2VuYWJsZWQYASABKAgSEgoFdG9rZW4YAiABKAlCA+BBBBpHCgZGZWlzaHUSDwoHZW5hYmxlZBgBIAEoCBITCgZhcHBfaWQYAiABKAlCA+BBBBIXCgphcHBfc2VjcmV0GAMgASgJQgPgQQQaWgoFV2Vjb20SDwoHZW5hYmxlZBgBIAEoCBIUCgdjb3JwX2lkGAIgASgJQgPgQQQSFQoIYWdlbnRfaWQYAyABKAlCA+BBBBITCgZzZWNyZXQYBCABKAlCA+BBBBpFCgRMYXJrEg8KB2VuYWJsZWQYASABKAgSEwoGYXBwX2lkGAIgASgJQgPgQQQSFwoKYXBwX3NlY3JldBgDIAEoCUID4EEEGmgKCERpbmdUYWxrEg8KB2VuYWJsZWQYASABKAgSFgoJY2xpZW50X2lkGAIgASgJQgPgQQQSGgoNY2xpZW50X3NlY3JldBgDIAEoCUID4EEEEhcKCnJvYm90X2NvZGUYBCABKAlCA+BBBCLvAwoXV29ya3NwYWNlUHJvZmlsZVNldHRpbmcSFAoMZXh0ZXJuYWxfdXJsGAEgASgJEhcKD2Rpc2FsbG93X3NpZ251cBgCIAEoCBITCgtyZXF1aXJlXzJmYRgDIAEoCBIxCg50b2tlbl9kdXJhdGlvbhgGIAEoCzIZLmdvb2dsZS5wcm90b2J1Zi5EdXJhdGlvbhIvCgxhbm5vdW5jZW1lbnQYByABKAsyGS5ieXRlYmFzZS52MS5Bbm5vdW5jZW1lbnQSOgoXbWF4aW11bV9yb2xlX2V4cGlyYXRpb24YCCABKAsyGS5nb29nbGUucHJvdG9idWYuRHVyYXRpb24SDwoHZG9tYWlucxgJIAMoCRIfChdlbmZvcmNlX2lkZW50aXR5X2RvbWFpbhgKIAEoCBI9ChRkYXRhYmFzZV9jaGFuZ2VfbW9kZRgLIAEoDjIfLmJ5dGViYXNlLnYxLkRhdGFiYXNlQ2hhbmdlTW9kZRIgChhkaXNhbGxvd19wYXNzd29yZF9zaWduaW4YDCABKAgSIAoYZW5hYmxlX21ldHJpY19jb2xsZWN0aW9uGA0gASgIEjsKGGluYWN0aXZlX3Nlc3Npb25fdGltZW91dBgOIAEoCzIZLmdvb2dsZS5wcm90b2J1Zi5EdXJhdGlvbiKvAQoMQW5ub3VuY2VtZW50EjMKBWxldmVsGAEgASgOMiQuYnl0ZWJhc2UudjEuQW5ub3VuY2VtZW50LkFsZXJ0TGV2ZWwSDAoEdGV4dBgCIAEoCRIMCgRsaW5rGAMgASgJIk4KCkFsZXJ0TGV2ZWwSGwoXQUxFUlRfTEVWRUxfVU5TUEVDSUZJRUQQABIICgRJTkZPEAESCwoHV0FSTklORxACEgwKCENSSVRJQ0FMEAMitAEKGFdvcmtzcGFjZUFwcHJvdmFsU2V0dGluZxI5CgVydWxlcxgBIAMoCzIqLmJ5dGViYXNlLnYxLldvcmtzcGFjZUFwcHJvdmFsU2V0dGluZy5SdWxlGl0KBFJ1bGUSLwoIdGVtcGxhdGUYASABKAsyHS5ieXRlYmFzZS52MS5BcHByb3ZhbFRlbXBsYXRlEiQKCWNvbmRpdGlvbhgCIAEoCzIRLmdvb2dsZS50eXBlLkV4cHIioAUKFVNjaGVtYVRlbXBsYXRlU2V0dGluZxJJCg9maWVsZF90ZW1wbGF0ZXMYASADKAsyMC5ieXRlYmFzZS52MS5TY2hlbWFUZW1wbGF0ZVNldHRpbmcuRmllbGRUZW1wbGF0ZRJDCgxjb2x1bW5fdHlwZXMYAiADKAsyLS5ieXRlYmFzZS52MS5TY2hlbWFUZW1wbGF0ZVNldHRpbmcuQ29sdW1uVHlwZRJJCg90YWJsZV90ZW1wbGF0ZXMYAyADKAsyMC5ieXRlYmFzZS52MS5TY2hlbWFUZW1wbGF0ZVNldHRpbmcuVGFibGVUZW1wbGF0ZRqsAQoNRmllbGRUZW1wbGF0ZRIKCgJpZBgBIAEoCRIjCgZlbmdpbmUYAiABKA4yEy5ieXRlYmFzZS52MS5FbmdpbmUSEAoIY2F0ZWdvcnkYAyABKAkSKwoGY29sdW1uGAQgASgLMhsuYnl0ZWJhc2UudjEuQ29sdW1uTWV0YWRhdGESKwoHY2F0YWxvZxgFIAEoCzIaLmJ5dGViYXNlLnYxLkNvbHVtbkNhdGFsb2caUQoKQ29sdW1uVHlwZRIjCgZlbmdpbmUYASABKA4yEy5ieXRlYmFzZS52MS5FbmdpbmUSDwoHZW5hYmxlZBgCIAEoCBINCgV0eXBlcxgDIAMoCRqpAQoNVGFibGVUZW1wbGF0ZRIKCgJpZBgBIAEoCRIjCgZlbmdpbmUYAiABKA4yEy5ieXRlYmFzZS52MS5FbmdpbmUSEAoIY2F0ZWdvcnkYAyABKAkSKQoFdGFibGUYBCABKAsyGi5ieXRlYmFzZS52MS5UYWJsZU1ldGFkYXRhEioKB2NhdGFsb2cYBSABKAsyGS5ieXRlYmFzZS52MS5UYWJsZUNhdGFsb2civAUKGURhdGFDbGFzc2lmaWNhdGlvblNldHRpbmcSUAoHY29uZmlncxgBIAMoCzI/LmJ5dGViYXNlLnYxLkRhdGFDbGFzc2lmaWNhdGlvblNldHRpbmcuRGF0YUNsYXNzaWZpY2F0aW9uQ29uZmlnGswEChhEYXRhQ2xhc3NpZmljYXRpb25Db25maWcSCgoCaWQYASABKAkSDQoFdGl0bGUYAiABKAkSVQoGbGV2ZWxzGAMgAygLMkUuYnl0ZWJhc2UudjEuRGF0YUNsYXNzaWZpY2F0aW9uU2V0dGluZy5EYXRhQ2xhc3NpZmljYXRpb25Db25maWcuTGV2ZWwSawoOY2xhc3NpZmljYXRpb24YBCADKAsyUy5ieXRlYmFzZS52MS5EYXRhQ2xhc3NpZmljYXRpb25TZXR0aW5nLkRhdGFDbGFzc2lmaWNhdGlvbkNvbmZpZy5DbGFzc2lmaWNhdGlvbkVudHJ5EiIKGmNsYXNzaWZpY2F0aW9uX2Zyb21fY29uZmlnGAUgASgIGjcKBUxldmVsEgoKAmlkGAEgASgJEg0KBXRpdGxlGAIgASgJEhMKC2Rlc2NyaXB0aW9uGAMgASgJGmgKEkRhdGFDbGFzc2lmaWNhdGlvbhIKCgJpZBgBIAEoCRINCgV0aXRsZRgCIAEoCRITCgtkZXNjcmlwdGlvbhgDIAEoCRIVCghsZXZlbF9pZBgEIAEoCUgAiAEBQgsKCV9sZXZlbF9pZBqJAQoTQ2xhc3NpZmljYXRpb25FbnRyeRILCgNrZXkYASABKAkSYQoFdmFsdWUYAiABKAsyUi5ieXRlYmFzZS52MS5EYXRhQ2xhc3NpZmljYXRpb25TZXR0aW5nLkRhdGFDbGFzc2lmaWNhdGlvbkNvbmZpZy5EYXRhQ2xhc3NpZmljYXRpb246AjgBIswBChNTZW1hbnRpY1R5cGVTZXR0aW5nEjwKBXR5cGVzGAEgAygLMi0uYnl0ZWJhc2UudjEuU2VtYW50aWNUeXBlU2V0dGluZy5TZW1hbnRpY1R5cGUadwoMU2VtYW50aWNUeXBlEgoKAmlkGAEgASgJEg0KBXRpdGxlGAIgASgJEhMKC2Rlc2NyaXB0aW9uGAMgASgJEikKCWFsZ29yaXRobRgGIAEoCzIWLmJ5dGViYXNlLnYxLkFsZ29yaXRobRIMCgRpY29uGAcgASgJIv8ECglBbGdvcml0aG0SNAoJZnVsbF9tYXNrGAUgASgLMh8uYnl0ZWJhc2UudjEuQWxnb3JpdGhtLkZ1bGxNYXNrSAASNgoKcmFuZ2VfbWFzaxgGIAEoCzIgLmJ5dGViYXNlLnYxLkFsZ29yaXRobS5SYW5nZU1hc2tIABIyCghtZDVfbWFzaxgHIAEoCzIeLmJ5dGViYXNlLnYxLkFsZ29yaXRobS5NRDVNYXNrSAASQQoQaW5uZXJfb3V0ZXJfbWFzaxgIIAEoCzIlLmJ5dGViYXNlLnYxLkFsZ29yaXRobS5Jbm5lck91dGVyTWFza0gAGiAKCEZ1bGxNYXNrEhQKDHN1YnN0aXR1dGlvbhgBIAEoCRp+CglSYW5nZU1hc2sSNgoGc2xpY2VzGAEgAygLMiYuYnl0ZWJhc2UudjEuQWxnb3JpdGhtLlJhbmdlTWFzay5TbGljZRo5CgVTbGljZRINCgVzdGFydBgBIAEoBRILCgNlbmQYAiABKAUSFAoMc3Vic3RpdHV0aW9uGAMgASgJGhcKB01ENU1hc2sSDAoEc2FsdBgBIAEoCRrJAQoOSW5uZXJPdXRlck1hc2sSEgoKcHJlZml4X2xlbhgBIAEoBRISCgpzdWZmaXhfbGVuGAIgASgFEjwKBHR5cGUYAyABKA4yLi5ieXRlYmFzZS52MS5BbGdvcml0aG0uSW5uZXJPdXRlck1hc2suTWFza1R5cGUSFAoMc3Vic3RpdHV0aW9uGAQgASgJIjsKCE1hc2tUeXBlEhkKFU1BU0tfVFlQRV9VTlNQRUNJRklFRBAAEgkKBUlOTkVSEAESCQoFT1VURVIQAkIGCgRtYXNrIhwKC1NDSU1TZXR0aW5nEg0KBXRva2VuGAEgASgJIosCChpQYXNzd29yZFJlc3RyaWN0aW9uU2V0dGluZxISCgptaW5fbGVuZ3RoGAEgASgFEhYKDnJlcXVpcmVfbnVtYmVyGAIgASgIEhYKDnJlcXVpcmVfbGV0dGVyGAMgASgIEiAKGHJlcXVpcmVfdXBwZXJjYXNlX2xldHRlchgEIAEoCBIhChlyZXF1aXJlX3NwZWNpYWxfY2hhcmFjdGVyGAUgASgIEi4KJnJlcXVpcmVfcmVzZXRfcGFzc3dvcmRfZm9yX2ZpcnN0X2xvZ2luGAYgASgIEjQKEXBhc3N3b3JkX3JvdGF0aW9uGAcgASgLMhkuZ29vZ2xlLnByb3RvYnVmLkR1cmF0aW9uIu8BCglBSVNldHRpbmcSDwoHZW5hYmxlZBgBIAEoCBIxCghwcm92aWRlchgCIAEoDjIfLmJ5dGViYXNlLnYxLkFJU2V0dGluZy5Qcm92aWRlchIQCghlbmRwb2ludBgDIAEoCRIPCgdhcGlfa2V5GAQgASgJEg0KBW1vZGVsGAUgASgJEg8KB3ZlcnNpb24YBiABKAkiWwoIUHJvdmlkZXISGAoUUFJPVklERVJfVU5TUEVDSUZJRUQQABILCgdPUEVOX0FJEAESCgoGQ0xBVURFEAISCgoGR0VNSU5JEAMSEAoMQVpVUkVfT1BFTkFJEAQilgIKEkVudmlyb25tZW50U2V0dGluZxJBCgxlbnZpcm9ubWVudHMYASADKAsyKy5ieXRlYmFzZS52MS5FbnZpcm9ubWVudFNldHRpbmcuRW52aXJvbm1lbnQavAEKC0Vudmlyb25tZW50EhEKBG5hbWUYASABKAlCA+BBAxIKCgJpZBgCIAEoCRINCgV0aXRsZRgDIAEoCRJDCgR0YWdzGAQgAygLMjUuYnl0ZWJhc2UudjEuRW52aXJvbm1lbnRTZXR0aW5nLkVudmlyb25tZW50LlRhZ3NFbnRyeRINCgVjb2xvchgFIAEoCRorCglUYWdzRW50cnkSCwoDa2V5GAEgASgJEg0KBXZhbHVlGAIgASgJOgI4ASpUChJEYXRhYmFzZUNoYW5nZU1vZGUSJAogREFUQUJBU0VfQ0hBTkdFX01PREVfVU5TUEVDSUZJRUQQABIMCghQSVBFTElORRABEgoKBkVESVRPUhACMq4DCg5TZXR0aW5nU2VydmljZRKEAQoMTGlzdFNldHRpbmdzEiAuYnl0ZWJhc2UudjEuTGlzdFNldHRpbmdzUmVxdWVzdBohLmJ5dGViYXNlLnYxLkxpc3RTZXR0aW5nc1Jlc3BvbnNlIi/aQQCK6jAQYmIuc2V0dGluZ3MubGlzdJDqMAGC0+STAg4SDC92MS9zZXR0aW5ncxJ/CgpHZXRTZXR0aW5nEh4uYnl0ZWJhc2UudjEuR2V0U2V0dGluZ1JlcXVlc3QaFC5ieXRlYmFzZS52MS5TZXR0aW5nIjvaQQRuYW1liuowD2JiLnNldHRpbmdzLmdldJDqMAGC0+STAhcSFS92MS97bmFtZT1zZXR0aW5ncy8qfRKTAQoNVXBkYXRlU2V0dGluZxIhLmJ5dGViYXNlLnYxLlVwZGF0ZVNldHRpbmdSZXF1ZXN0GhQuYnl0ZWJhc2UudjEuU2V0dGluZyJJiuowD2JiLnNldHRpbmdzLnNldJDqMAGY6jABgtPkkwIoOgdzZXR0aW5nMh0vdjEve3NldHRpbmcubmFtZT1zZXR0aW5ncy8qfUKpAQoPY29tLmJ5dGViYXNlLnYxQhNTZXR0aW5nU2VydmljZVByb3RvUAFaNGdpdGh1Yi5jb20vYnl0ZWJhc2UvYnl0ZWJhc2UvYmFja2VuZC9nZW5lcmF0ZWQtZ28vdjGiAgNCWFiqAgtCeXRlYmFzZS5WMcoCC0J5dGViYXNlXFYx4gIXQnl0ZWJhc2VcVjFcR1BCTWV0YWRhdGHqAgxCeXRlYmFzZTo6VjFiBnByb3RvMw", [file_google_api_annotations, file_google_api_client, file_google_api_field_behavior, file_google_api_resource, file_google_protobuf_duration, file_google_protobuf_field_mask, file_google_type_expr, file_v1_annotation, file_v1_common, file_v1_database_catalog_service, file_v1_database_service, file_v1_issue_service]);
+ fileDesc("Chh2MS9zZXR0aW5nX3NlcnZpY2UucHJvdG8SC2J5dGViYXNlLnYxIhUKE0xpc3RTZXR0aW5nc1JlcXVlc3QiPgoUTGlzdFNldHRpbmdzUmVzcG9uc2USJgoIc2V0dGluZ3MYASADKAsyFC5ieXRlYmFzZS52MS5TZXR0aW5nIj8KEUdldFNldHRpbmdSZXF1ZXN0EioKBG5hbWUYASABKAlCHOBBAvpBFgoUYnl0ZWJhc2UuY29tL1NldHRpbmciOwoSR2V0U2V0dGluZ1Jlc3BvbnNlEiUKB3NldHRpbmcYASABKAsyFC5ieXRlYmFzZS52MS5TZXR0aW5nIqEBChRVcGRhdGVTZXR0aW5nUmVxdWVzdBIqCgdzZXR0aW5nGAEgASgLMhQuYnl0ZWJhc2UudjEuU2V0dGluZ0ID4EECEhUKDXZhbGlkYXRlX29ubHkYAiABKAgSFQoNYWxsb3dfbWlzc2luZxgDIAEoCBIvCgt1cGRhdGVfbWFzaxgEIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5GaWVsZE1hc2si1QMKB1NldHRpbmcSDAoEbmFtZRgBIAEoCRIhCgV2YWx1ZRgCIAEoCzISLmJ5dGViYXNlLnYxLlZhbHVlIuMCCgtTZXR0aW5nTmFtZRIcChhTRVRUSU5HX05BTUVfVU5TUEVDSUZJRUQQABIPCgtBVVRIX1NFQ1JFVBABEhEKDUJSQU5ESU5HX0xPR08QAhIQCgxXT1JLU1BBQ0VfSUQQAxIVChFXT1JLU1BBQ0VfUFJPRklMRRAEEhYKEldPUktTUEFDRV9BUFBST1ZBTBAFEh8KG1dPUktTUEFDRV9FWFRFUk5BTF9BUFBST1ZBTBAGEhYKEkVOVEVSUFJJU0VfTElDRU5TRRAHEgoKBkFQUF9JTRAIEg0KCVdBVEVSTUFSSxAJEgYKAkFJEAoSEwoPU0NIRU1BX1RFTVBMQVRFEA0SFwoTREFUQV9DTEFTU0lGSUNBVElPThAOEhIKDlNFTUFOVElDX1RZUEVTEA8SCAoEU0NJTRAREhgKFFBBU1NXT1JEX1JFU1RSSUNUSU9OEBISDwoLRU5WSVJPTk1FTlQQEzot6kEqChRieXRlYmFzZS5jb20vU2V0dGluZxISc2V0dGluZ3Mve3NldHRpbmd9SgQIEBARIukFCgVWYWx1ZRIWCgxzdHJpbmdfdmFsdWUYASABKAlIABI5ChRhcHBfaW1fc2V0dGluZ192YWx1ZRgDIAEoCzIZLmJ5dGViYXNlLnYxLkFwcElNU2V0dGluZ0gAEk8KH3dvcmtzcGFjZV9wcm9maWxlX3NldHRpbmdfdmFsdWUYBSABKAsyJC5ieXRlYmFzZS52MS5Xb3Jrc3BhY2VQcm9maWxlU2V0dGluZ0gAElEKIHdvcmtzcGFjZV9hcHByb3ZhbF9zZXR0aW5nX3ZhbHVlGAYgASgLMiUuYnl0ZWJhc2UudjEuV29ya3NwYWNlQXBwcm92YWxTZXR0aW5nSAASSwodc2NoZW1hX3RlbXBsYXRlX3NldHRpbmdfdmFsdWUYCSABKAsyIi5ieXRlYmFzZS52MS5TY2hlbWFUZW1wbGF0ZVNldHRpbmdIABJTCiFkYXRhX2NsYXNzaWZpY2F0aW9uX3NldHRpbmdfdmFsdWUYCiABKAsyJi5ieXRlYmFzZS52MS5EYXRhQ2xhc3NpZmljYXRpb25TZXR0aW5nSAASRwobc2VtYW50aWNfdHlwZV9zZXR0aW5nX3ZhbHVlGAsgASgLMiAuYnl0ZWJhc2UudjEuU2VtYW50aWNUeXBlU2V0dGluZ0gAEjAKDHNjaW1fc2V0dGluZxgOIAEoCzIYLmJ5dGViYXNlLnYxLlNDSU1TZXR0aW5nSAASTwoccGFzc3dvcmRfcmVzdHJpY3Rpb25fc2V0dGluZxgPIAEoCzInLmJ5dGViYXNlLnYxLlBhc3N3b3JkUmVzdHJpY3Rpb25TZXR0aW5nSAASLAoKYWlfc2V0dGluZxgQIAEoCzIWLmJ5dGViYXNlLnYxLkFJU2V0dGluZ0gAEj4KE2Vudmlyb25tZW50X3NldHRpbmcYESABKAsyHy5ieXRlYmFzZS52MS5FbnZpcm9ubWVudFNldHRpbmdIAEIHCgV2YWx1ZUoECBIQEyK2BQoMQXBwSU1TZXR0aW5nEjUKCHNldHRpbmdzGAEgAygLMiMuYnl0ZWJhc2UudjEuQXBwSU1TZXR0aW5nLklNU2V0dGluZxobCgVTbGFjaxISCgV0b2tlbhgBIAEoCUID4EEEGjYKBkZlaXNodRITCgZhcHBfaWQYASABKAlCA+BBBBIXCgphcHBfc2VjcmV0GAIgASgJQgPgQQQaSQoFV2Vjb20SFAoHY29ycF9pZBgBIAEoCUID4EEEEhUKCGFnZW50X2lkGAIgASgJQgPgQQQSEwoGc2VjcmV0GAMgASgJQgPgQQQaNAoETGFyaxITCgZhcHBfaWQYASABKAlCA+BBBBIXCgphcHBfc2VjcmV0GAIgASgJQgPgQQQaVwoIRGluZ1RhbGsSFgoJY2xpZW50X2lkGAEgASgJQgPgQQQSGgoNY2xpZW50X3NlY3JldBgCIAEoCUID4EEEEhcKCnJvYm90X2NvZGUYAyABKAlCA+BBBBq/AgoJSU1TZXR0aW5nEicKBHR5cGUYASABKA4yGS5ieXRlYmFzZS52MS5XZWJob29rLlR5cGUSMAoFc2xhY2sYAiABKAsyHy5ieXRlYmFzZS52MS5BcHBJTVNldHRpbmcuU2xhY2tIABIyCgZmZWlzaHUYAyABKAsyIC5ieXRlYmFzZS52MS5BcHBJTVNldHRpbmcuRmVpc2h1SAASMAoFd2Vjb20YBCABKAsyHy5ieXRlYmFzZS52MS5BcHBJTVNldHRpbmcuV2Vjb21IABIuCgRsYXJrGAUgASgLMh4uYnl0ZWJhc2UudjEuQXBwSU1TZXR0aW5nLkxhcmtIABI2CghkaW5ndGFsaxgGIAEoCzIiLmJ5dGViYXNlLnYxLkFwcElNU2V0dGluZy5EaW5nVGFsa0gAQgkKB3BheWxvYWQi7wMKF1dvcmtzcGFjZVByb2ZpbGVTZXR0aW5nEhQKDGV4dGVybmFsX3VybBgBIAEoCRIXCg9kaXNhbGxvd19zaWdudXAYAiABKAgSEwoLcmVxdWlyZV8yZmEYAyABKAgSMQoOdG9rZW5fZHVyYXRpb24YBiABKAsyGS5nb29nbGUucHJvdG9idWYuRHVyYXRpb24SLwoMYW5ub3VuY2VtZW50GAcgASgLMhkuYnl0ZWJhc2UudjEuQW5ub3VuY2VtZW50EjoKF21heGltdW1fcm9sZV9leHBpcmF0aW9uGAggASgLMhkuZ29vZ2xlLnByb3RvYnVmLkR1cmF0aW9uEg8KB2RvbWFpbnMYCSADKAkSHwoXZW5mb3JjZV9pZGVudGl0eV9kb21haW4YCiABKAgSPQoUZGF0YWJhc2VfY2hhbmdlX21vZGUYCyABKA4yHy5ieXRlYmFzZS52MS5EYXRhYmFzZUNoYW5nZU1vZGUSIAoYZGlzYWxsb3dfcGFzc3dvcmRfc2lnbmluGAwgASgIEiAKGGVuYWJsZV9tZXRyaWNfY29sbGVjdGlvbhgNIAEoCBI7ChhpbmFjdGl2ZV9zZXNzaW9uX3RpbWVvdXQYDiABKAsyGS5nb29nbGUucHJvdG9idWYuRHVyYXRpb24irwEKDEFubm91bmNlbWVudBIzCgVsZXZlbBgBIAEoDjIkLmJ5dGViYXNlLnYxLkFubm91bmNlbWVudC5BbGVydExldmVsEgwKBHRleHQYAiABKAkSDAoEbGluaxgDIAEoCSJOCgpBbGVydExldmVsEhsKF0FMRVJUX0xFVkVMX1VOU1BFQ0lGSUVEEAASCAoESU5GTxABEgsKB1dBUk5JTkcQAhIMCghDUklUSUNBTBADIrQBChhXb3Jrc3BhY2VBcHByb3ZhbFNldHRpbmcSOQoFcnVsZXMYASADKAsyKi5ieXRlYmFzZS52MS5Xb3Jrc3BhY2VBcHByb3ZhbFNldHRpbmcuUnVsZRpdCgRSdWxlEi8KCHRlbXBsYXRlGAEgASgLMh0uYnl0ZWJhc2UudjEuQXBwcm92YWxUZW1wbGF0ZRIkCgljb25kaXRpb24YAiABKAsyES5nb29nbGUudHlwZS5FeHByIqAFChVTY2hlbWFUZW1wbGF0ZVNldHRpbmcSSQoPZmllbGRfdGVtcGxhdGVzGAEgAygLMjAuYnl0ZWJhc2UudjEuU2NoZW1hVGVtcGxhdGVTZXR0aW5nLkZpZWxkVGVtcGxhdGUSQwoMY29sdW1uX3R5cGVzGAIgAygLMi0uYnl0ZWJhc2UudjEuU2NoZW1hVGVtcGxhdGVTZXR0aW5nLkNvbHVtblR5cGUSSQoPdGFibGVfdGVtcGxhdGVzGAMgAygLMjAuYnl0ZWJhc2UudjEuU2NoZW1hVGVtcGxhdGVTZXR0aW5nLlRhYmxlVGVtcGxhdGUarAEKDUZpZWxkVGVtcGxhdGUSCgoCaWQYASABKAkSIwoGZW5naW5lGAIgASgOMhMuYnl0ZWJhc2UudjEuRW5naW5lEhAKCGNhdGVnb3J5GAMgASgJEisKBmNvbHVtbhgEIAEoCzIbLmJ5dGViYXNlLnYxLkNvbHVtbk1ldGFkYXRhEisKB2NhdGFsb2cYBSABKAsyGi5ieXRlYmFzZS52MS5Db2x1bW5DYXRhbG9nGlEKCkNvbHVtblR5cGUSIwoGZW5naW5lGAEgASgOMhMuYnl0ZWJhc2UudjEuRW5naW5lEg8KB2VuYWJsZWQYAiABKAgSDQoFdHlwZXMYAyADKAkaqQEKDVRhYmxlVGVtcGxhdGUSCgoCaWQYASABKAkSIwoGZW5naW5lGAIgASgOMhMuYnl0ZWJhc2UudjEuRW5naW5lEhAKCGNhdGVnb3J5GAMgASgJEikKBXRhYmxlGAQgASgLMhouYnl0ZWJhc2UudjEuVGFibGVNZXRhZGF0YRIqCgdjYXRhbG9nGAUgASgLMhkuYnl0ZWJhc2UudjEuVGFibGVDYXRhbG9nIrwFChlEYXRhQ2xhc3NpZmljYXRpb25TZXR0aW5nElAKB2NvbmZpZ3MYASADKAsyPy5ieXRlYmFzZS52MS5EYXRhQ2xhc3NpZmljYXRpb25TZXR0aW5nLkRhdGFDbGFzc2lmaWNhdGlvbkNvbmZpZxrMBAoYRGF0YUNsYXNzaWZpY2F0aW9uQ29uZmlnEgoKAmlkGAEgASgJEg0KBXRpdGxlGAIgASgJElUKBmxldmVscxgDIAMoCzJFLmJ5dGViYXNlLnYxLkRhdGFDbGFzc2lmaWNhdGlvblNldHRpbmcuRGF0YUNsYXNzaWZpY2F0aW9uQ29uZmlnLkxldmVsEmsKDmNsYXNzaWZpY2F0aW9uGAQgAygLMlMuYnl0ZWJhc2UudjEuRGF0YUNsYXNzaWZpY2F0aW9uU2V0dGluZy5EYXRhQ2xhc3NpZmljYXRpb25Db25maWcuQ2xhc3NpZmljYXRpb25FbnRyeRIiChpjbGFzc2lmaWNhdGlvbl9mcm9tX2NvbmZpZxgFIAEoCBo3CgVMZXZlbBIKCgJpZBgBIAEoCRINCgV0aXRsZRgCIAEoCRITCgtkZXNjcmlwdGlvbhgDIAEoCRpoChJEYXRhQ2xhc3NpZmljYXRpb24SCgoCaWQYASABKAkSDQoFdGl0bGUYAiABKAkSEwoLZGVzY3JpcHRpb24YAyABKAkSFQoIbGV2ZWxfaWQYBCABKAlIAIgBAUILCglfbGV2ZWxfaWQaiQEKE0NsYXNzaWZpY2F0aW9uRW50cnkSCwoDa2V5GAEgASgJEmEKBXZhbHVlGAIgASgLMlIuYnl0ZWJhc2UudjEuRGF0YUNsYXNzaWZpY2F0aW9uU2V0dGluZy5EYXRhQ2xhc3NpZmljYXRpb25Db25maWcuRGF0YUNsYXNzaWZpY2F0aW9uOgI4ASLMAQoTU2VtYW50aWNUeXBlU2V0dGluZxI8CgV0eXBlcxgBIAMoCzItLmJ5dGViYXNlLnYxLlNlbWFudGljVHlwZVNldHRpbmcuU2VtYW50aWNUeXBlGncKDFNlbWFudGljVHlwZRIKCgJpZBgBIAEoCRINCgV0aXRsZRgCIAEoCRITCgtkZXNjcmlwdGlvbhgDIAEoCRIpCglhbGdvcml0aG0YBiABKAsyFi5ieXRlYmFzZS52MS5BbGdvcml0aG0SDAoEaWNvbhgHIAEoCSL/BAoJQWxnb3JpdGhtEjQKCWZ1bGxfbWFzaxgFIAEoCzIfLmJ5dGViYXNlLnYxLkFsZ29yaXRobS5GdWxsTWFza0gAEjYKCnJhbmdlX21hc2sYBiABKAsyIC5ieXRlYmFzZS52MS5BbGdvcml0aG0uUmFuZ2VNYXNrSAASMgoIbWQ1X21hc2sYByABKAsyHi5ieXRlYmFzZS52MS5BbGdvcml0aG0uTUQ1TWFza0gAEkEKEGlubmVyX291dGVyX21hc2sYCCABKAsyJS5ieXRlYmFzZS52MS5BbGdvcml0aG0uSW5uZXJPdXRlck1hc2tIABogCghGdWxsTWFzaxIUCgxzdWJzdGl0dXRpb24YASABKAkafgoJUmFuZ2VNYXNrEjYKBnNsaWNlcxgBIAMoCzImLmJ5dGViYXNlLnYxLkFsZ29yaXRobS5SYW5nZU1hc2suU2xpY2UaOQoFU2xpY2USDQoFc3RhcnQYASABKAUSCwoDZW5kGAIgASgFEhQKDHN1YnN0aXR1dGlvbhgDIAEoCRoXCgdNRDVNYXNrEgwKBHNhbHQYASABKAkayQEKDklubmVyT3V0ZXJNYXNrEhIKCnByZWZpeF9sZW4YASABKAUSEgoKc3VmZml4X2xlbhgCIAEoBRI8CgR0eXBlGAMgASgOMi4uYnl0ZWJhc2UudjEuQWxnb3JpdGhtLklubmVyT3V0ZXJNYXNrLk1hc2tUeXBlEhQKDHN1YnN0aXR1dGlvbhgEIAEoCSI7CghNYXNrVHlwZRIZChVNQVNLX1RZUEVfVU5TUEVDSUZJRUQQABIJCgVJTk5FUhABEgkKBU9VVEVSEAJCBgoEbWFzayIcCgtTQ0lNU2V0dGluZxINCgV0b2tlbhgBIAEoCSKLAgoaUGFzc3dvcmRSZXN0cmljdGlvblNldHRpbmcSEgoKbWluX2xlbmd0aBgBIAEoBRIWCg5yZXF1aXJlX251bWJlchgCIAEoCBIWCg5yZXF1aXJlX2xldHRlchgDIAEoCBIgChhyZXF1aXJlX3VwcGVyY2FzZV9sZXR0ZXIYBCABKAgSIQoZcmVxdWlyZV9zcGVjaWFsX2NoYXJhY3RlchgFIAEoCBIuCiZyZXF1aXJlX3Jlc2V0X3Bhc3N3b3JkX2Zvcl9maXJzdF9sb2dpbhgGIAEoCBI0ChFwYXNzd29yZF9yb3RhdGlvbhgHIAEoCzIZLmdvb2dsZS5wcm90b2J1Zi5EdXJhdGlvbiLvAQoJQUlTZXR0aW5nEg8KB2VuYWJsZWQYASABKAgSMQoIcHJvdmlkZXIYAiABKA4yHy5ieXRlYmFzZS52MS5BSVNldHRpbmcuUHJvdmlkZXISEAoIZW5kcG9pbnQYAyABKAkSDwoHYXBpX2tleRgEIAEoCRINCgVtb2RlbBgFIAEoCRIPCgd2ZXJzaW9uGAYgASgJIlsKCFByb3ZpZGVyEhgKFFBST1ZJREVSX1VOU1BFQ0lGSUVEEAASCwoHT1BFTl9BSRABEgoKBkNMQVVERRACEgoKBkdFTUlOSRADEhAKDEFaVVJFX09QRU5BSRAEIpYCChJFbnZpcm9ubWVudFNldHRpbmcSQQoMZW52aXJvbm1lbnRzGAEgAygLMisuYnl0ZWJhc2UudjEuRW52aXJvbm1lbnRTZXR0aW5nLkVudmlyb25tZW50GrwBCgtFbnZpcm9ubWVudBIRCgRuYW1lGAEgASgJQgPgQQMSCgoCaWQYAiABKAkSDQoFdGl0bGUYAyABKAkSQwoEdGFncxgEIAMoCzI1LmJ5dGViYXNlLnYxLkVudmlyb25tZW50U2V0dGluZy5FbnZpcm9ubWVudC5UYWdzRW50cnkSDQoFY29sb3IYBSABKAkaKwoJVGFnc0VudHJ5EgsKA2tleRgBIAEoCRINCgV2YWx1ZRgCIAEoCToCOAEqVAoSRGF0YWJhc2VDaGFuZ2VNb2RlEiQKIERBVEFCQVNFX0NIQU5HRV9NT0RFX1VOU1BFQ0lGSUVEEAASDAoIUElQRUxJTkUQARIKCgZFRElUT1IQAjKuAwoOU2V0dGluZ1NlcnZpY2UShAEKDExpc3RTZXR0aW5ncxIgLmJ5dGViYXNlLnYxLkxpc3RTZXR0aW5nc1JlcXVlc3QaIS5ieXRlYmFzZS52MS5MaXN0U2V0dGluZ3NSZXNwb25zZSIv2kEAiuowEGJiLnNldHRpbmdzLmxpc3SQ6jABgtPkkwIOEgwvdjEvc2V0dGluZ3MSfwoKR2V0U2V0dGluZxIeLmJ5dGViYXNlLnYxLkdldFNldHRpbmdSZXF1ZXN0GhQuYnl0ZWJhc2UudjEuU2V0dGluZyI72kEEbmFtZYrqMA9iYi5zZXR0aW5ncy5nZXSQ6jABgtPkkwIXEhUvdjEve25hbWU9c2V0dGluZ3MvKn0SkwEKDVVwZGF0ZVNldHRpbmcSIS5ieXRlYmFzZS52MS5VcGRhdGVTZXR0aW5nUmVxdWVzdBoULmJ5dGViYXNlLnYxLlNldHRpbmciSYrqMA9iYi5zZXR0aW5ncy5zZXSQ6jABmOowAYLT5JMCKDoHc2V0dGluZzIdL3YxL3tzZXR0aW5nLm5hbWU9c2V0dGluZ3MvKn1CqQEKD2NvbS5ieXRlYmFzZS52MUITU2V0dGluZ1NlcnZpY2VQcm90b1ABWjRnaXRodWIuY29tL2J5dGViYXNlL2J5dGViYXNlL2JhY2tlbmQvZ2VuZXJhdGVkLWdvL3YxogIDQlhYqgILQnl0ZWJhc2UuVjHKAgtCeXRlYmFzZVxWMeICF0J5dGViYXNlXFYxXEdQQk1ldGFkYXRh6gIMQnl0ZWJhc2U6OlYxYgZwcm90bzM", [file_google_api_annotations, file_google_api_client, file_google_api_field_behavior, file_google_api_resource, file_google_protobuf_duration, file_google_protobuf_field_mask, file_google_type_expr, file_v1_annotation, file_v1_common, file_v1_database_catalog_service, file_v1_database_service, file_v1_issue_service, file_v1_project_service]);
/**
* Describes the message bytebase.v1.ListSettingsRequest.
@@ -124,6 +125,13 @@ export const AppIMSetting_LarkSchema = /*@__PURE__*/
export const AppIMSetting_DingTalkSchema = /*@__PURE__*/
messageDesc(file_v1_setting_service, 7, 4);
+/**
+ * Describes the message bytebase.v1.AppIMSetting.IMSetting.
+ * Use `create(AppIMSetting_IMSettingSchema)` to create a new message.
+ */
+export const AppIMSetting_IMSettingSchema = /*@__PURE__*/
+ messageDesc(file_v1_setting_service, 7, 5);
+
/**
* Describes the message bytebase.v1.WorkspaceProfileSetting.
* Use `create(WorkspaceProfileSettingSchema)` to create a new message.
diff --git a/frontend/src/views/SettingWorkspaceIM.vue b/frontend/src/views/SettingWorkspaceIM.vue
index e6c3203571..8cb8244025 100644
--- a/frontend/src/views/SettingWorkspaceIM.vue
+++ b/frontend/src/views/SettingWorkspaceIM.vue
@@ -1,481 +1,521 @@
<template>
- <div class="w-full space-y-4">
+ <div class="w-full space-y-4 pb-4">
<div class="textinfolabel">
{{ $t("settings.im-integration.description") }}
<LearnMoreLink
url="https://docs.bytebase.com/change-database/webhook?source=console"
/>
</div>
- <NTabs v-model:value="state.selectedTab" type="line" animated>
- <NTabPane v-for="item in imList" :key="item.type" :name="item.type">
- <template #tab>
- <div class="flex items-center gap-x-2">
- <WebhookTypeIcon :type="item.type" class="h-5 w-5" />
- {{ item.name }}
- </div>
- </template>
- <div>
- <BBAttention v-if="item.enabled" class="mt-2 mb-4" type="success">
- <template #default>IM App Enabled</template>
- </BBAttention>
- <component :is="() => item.render()" />
- </div>
- </NTabPane>
- </NTabs>
- <div class="flex items-center justify-end gap-x-2 pt-2">
- <NButton
- v-if="dataChanged"
- :disabled="state.loading"
- @click="discardChanges"
- >
- {{ $t("common.discard-changes") }}
- </NButton>
- <NButton
- type="primary"
- :disabled="!allowEdit || !canSave"
- :loading="state.loading"
- @click="onSave"
- >
- {{ $t("common.save") }}
- </NButton>
- </div>
- </div>
-</template>
-
-<script lang="tsx" setup>
-import { create } from "@bufbuild/protobuf";
-import { FieldMaskSchema } from "@bufbuild/protobuf/wkt";
-import { cloneDeep, isEqual } from "lodash-es";
-import { NTabs, NTabPane, NButton } from "naive-ui";
-import { computed, watch, reactive } from "vue";
-import { useI18n } from "vue-i18n";
-import { BBAttention } from "@/bbkit";
-import BBTextField from "@/bbkit/BBTextField.vue";
-import LearnMoreLink from "@/components/LearnMoreLink.vue";
-import WebhookTypeIcon from "@/components/Project/WebhookTypeIcon.vue";
-import { useSettingV1Store, pushNotification } from "@/store";
-import { Webhook_Type } from "@/types/proto-es/v1/project_service_pb";
-import {
- type AppIMSetting,
- AppIMSettingSchema,
- AppIMSetting_FeishuSchema,
- AppIMSetting_SlackSchema,
- AppIMSetting_LarkSchema,
- AppIMSetting_WecomSchema,
- AppIMSetting_DingTalkSchema,
- Setting_SettingName,
- ValueSchema as SettingValueSchema,
-} from "@/types/proto-es/v1/setting_service_pb";
-
-interface LocalState {
- selectedTab: Webhook_Type;
- loading: boolean;
- setting: AppIMSetting;
-}
-
-defineProps<{
- allowEdit: boolean;
-}>();
-
-const { t } = useI18n();
-const state = reactive<LocalState>({
- selectedTab: Webhook_Type.SLACK,
- loading: false,
- setting: create(AppIMSettingSchema, {}),
-});
-
-const settingStore = useSettingV1Store();
-
-const imSetting = computed(() => {
- const setting = settingStore.getSettingByName(Setting_SettingName.APP_IM);
- if (setting?.value?.value?.case === "appImSettingValue") {
- return setting.value.value.value;
- }
- return create(AppIMSettingSchema, {});
-});
-
-watch(
- () => imSetting.value,
- (setting) => {
- state.setting = cloneDeep(setting);
- },
- { once: true, immediate: true }
-);
-watch(
- () => state.selectedTab,
- (tab) => {
- switch (tab) {
- case Webhook_Type.SLACK:
- if (!state.setting.slack) {
- state.setting.slack = create(AppIMSetting_SlackSchema, {});
- }
- break;
- case Webhook_Type.FEISHU:
- if (!state.setting.feishu) {
- state.setting.feishu = create(AppIMSetting_FeishuSchema, {});
- }
- break;
- case Webhook_Type.WECOM:
- if (!state.setting.wecom) {
- state.setting.wecom = create(AppIMSetting_WecomSchema, {});
- }
- break;
- case Webhook_Type.LARK:
- if (!state.setting.lark) {
- state.setting.lark = create(AppIMSetting_LarkSchema, {});
- }
- break;
- case Webhook_Type.DINGTALK:
- if (!state.setting.dingtalk) {
- state.setting.dingtalk = create(AppIMSetting_DingTalkSchema, {});
- }
- break;
- }
- },
- { immediate: true }
-);
+ <NEmpty
+ v-if="state.setting.settings.length === 0"
+ class="py-12 border rounded"
+ >
+ <template #extra>
+ <NButton
+ v-if="availableImSettings.length > 0"
+ type="primary"
+ @click="() => onAddIM(availableImSettings[0].value)"
+ >
+ {{ $t("settings.im.add-im-integration") }}
+ </NButton>
+ </template>
+ </NEmpty>
+ <div v-else class="space-y-4">
+ <div
+ v-for="(item, i) in state.setting.settings"
+ :key="item.type"
+ class="border rounded p-4"
+ >
+ <template v-if="isConfigured(item.type)">
+ <component :is="renderOption({ value: item.type })" />
+ </template>
+ <NSelect
+ v-else
+ v-model:value="item.type"
+ :options="availableImSettings"
+ :render-label="renderOption"
+ />
-const imList = computed(() => {
- return [
- {
- name: t("common.slack"),
- type: Webhook_Type.SLACK,
- enabled: state.setting.slack?.enabled,
- render: () => {
- return (
- <div>
+ <div class="mt-4">
+ <div v-if="item.type === Webhook_Type.SLACK">
<div class="textlabel">Token</div>
<BBTextField
class="mt-2"
- placeholder={t("common.sensitive-placeholder")}
- value={state.setting.slack?.token ?? ""}
- onUpdate:value={(val: string) => {
- state.setting.slack!.token = val;
- }}
+ :disabled="!props.allowEdit"
+ :placeholder="t('common.sensitive-placeholder')"
+ v-model:value="(item.payload.value as AppIMSetting_Slack).token"
/>
</div>
- );
- },
- },
- {
- name: t("common.feishu"),
- type: Webhook_Type.FEISHU,
- enabled: state.setting.feishu?.enabled,
- render: () => {
- return (
- <div class="space-y-4">
+ <div v-else-if="item.type === Webhook_Type.FEISHU" class="space-y-4">
<div>
<div class="textlabel">App ID</div>
<BBTextField
class="mt-2"
- placeholder={t("common.sensitive-placeholder")}
- value={state.setting.feishu?.appId ?? ""}
- onUpdate:value={(val: string) => {
- state.setting.feishu!.appId = val;
- }}
+ :disabled="!props.allowEdit"
+ :placeholder="t('common.sensitive-placeholder')"
+ v-model:value="(item.payload.value as AppIMSetting_Feishu).appId"
/>
</div>
<div>
<div class="textlabel">App Secret</div>
<BBTextField
class="mt-2"
- placeholder={t("common.sensitive-placeholder")}
- value={state.setting.feishu?.appSecret ?? ""}
- onUpdate:value={(val: string) => {
- state.setting.feishu!.appSecret = val;
- }}
+ :disabled="!props.allowEdit"
+ :placeholder="t('common.sensitive-placeholder')"
+ v-model:value="(item.payload.value as AppIMSetting_Feishu).appSecret"
/>
</div>
</div>
- );
- },
- },
- {
- name: t("common.lark"),
- type: Webhook_Type.LARK,
- enabled: state.setting.lark?.enabled,
- render: () => {
- return (
- <div class="space-y-4">
+ <div v-else-if="item.type === Webhook_Type.WECOM" class="space-y-4">
<div>
- <div class="textlabel">App ID</div>
+ <div class="textlabel">Corp ID</div>
<BBTextField
class="mt-2"
- placeholder={t("common.sensitive-placeholder")}
- value={state.setting.lark?.appId ?? ""}
- onUpdate:value={(val: string) => {
- state.setting.lark!.appId = val;
- }}
+ :disabled="!props.allowEdit"
+ :placeholder="t('common.sensitive-placeholder')"
+ v-model:value="(item.payload.value as AppIMSetting_Wecom).corpId"
/>
</div>
<div>
- <div class="textlabel">App Secret</div>
+ <div class="textlabel">Agent ID</div>
<BBTextField
class="mt-2"
- placeholder={t("common.sensitive-placeholder")}
- value={state.setting.lark?.appSecret ?? ""}
- onUpdate:value={(val: string) => {
- state.setting.lark!.appSecret = val;
- }}
+ :disabled="!props.allowEdit"
+ :placeholder="t('common.sensitive-placeholder')"
+ v-model:value="(item.payload.value as AppIMSetting_Wecom).agentId"
/>
</div>
- </div>
- );
- },
- },
- {
- name: t("common.wecom"),
- type: Webhook_Type.WECOM,
- enabled: state.setting.wecom?.enabled,
- render: () => {
- return (
- <div class="space-y-4">
<div>
- <div class="textlabel">Corp ID</div>
+ <div class="textlabel">Secret</div>
<BBTextField
class="mt-2"
- placeholder={t("common.sensitive-placeholder")}
- value={state.setting.wecom?.corpId ?? ""}
- onUpdate:value={(val: string) => {
- state.setting.wecom!.corpId = val;
- }}
+ :disabled="!props.allowEdit"
+ :placeholder="t('common.sensitive-placeholder')"
+ v-model:value="(item.payload.value as AppIMSetting_Wecom).secret"
/>
</div>
+ </div>
+ <div v-else-if="item.type === Webhook_Type.LARK" class="space-y-4">
<div>
- <div class="textlabel">Agent ID</div>
+ <div class="textlabel">App ID</div>
<BBTextField
class="mt-2"
- placeholder={t("common.sensitive-placeholder")}
- value={state.setting.wecom?.agentId ?? ""}
- onUpdate:value={(val: string) => {
- state.setting.wecom!.agentId = val;
- }}
+ :disabled="!props.allowEdit"
+ :placeholder="t('common.sensitive-placeholder')"
+ v-model:value="(item.payload.value as AppIMSetting_Lark).appId"
/>
</div>
<div>
- <div class="textlabel">Secret</div>
+ <div class="textlabel">App Secret</div>
<BBTextField
class="mt-2"
- placeholder={t("common.sensitive-placeholder")}
- value={state.setting.wecom?.secret ?? ""}
- onUpdate:value={(val: string) => {
- state.setting.wecom!.secret = val;
- }}
+ :disabled="!props.allowEdit"
+ :placeholder="t('common.sensitive-placeholder')"
+ v-model:value="(item.payload.value as AppIMSetting_Lark).appSecret"
/>
</div>
</div>
- );
- },
- },
- {
- name: t("common.dingtalk"),
- type: Webhook_Type.DINGTALK,
- enabled: state.setting.dingtalk?.enabled,
- render: () => {
- return (
- <div class="space-y-4">
+ <div
+ v-else-if="item.type === Webhook_Type.DINGTALK"
+ class="space-y-4"
+ >
<div>
<div class="textlabel">Client ID</div>
<BBTextField
class="mt-2"
- placeholder={t("common.sensitive-placeholder")}
- value={state.setting.dingtalk?.clientId ?? ""}
- onUpdate:value={(val: string) => {
- state.setting.dingtalk!.clientId = val;
- }}
+ :disabled="!props.allowEdit"
+ :placeholder="t('common.sensitive-placeholder')"
+ v-model:value="(item.payload.value as AppIMSetting_DingTalk).clientId"
/>
</div>
<div>
<div class="textlabel">Client Secret</div>
<BBTextField
class="mt-2"
- placeholder={t("common.sensitive-placeholder")}
- value={state.setting.dingtalk?.clientSecret ?? ""}
- onUpdate:value={(val: string) => {
- state.setting.dingtalk!.clientSecret = val;
- }}
+ :disabled="!props.allowEdit"
+ :placeholder="t('common.sensitive-placeholder')"
+ v-model:value="(item.payload.value as AppIMSetting_DingTalk).clientSecret"
/>
</div>
<div>
<div class="textlabel">Robot Code</div>
<BBTextField
class="mt-2"
- placeholder={t("common.sensitive-placeholder")}
- value={state.setting.dingtalk?.robotCode ?? ""}
- onUpdate:value={(val: string) => {
- state.setting.dingtalk!.robotCode = val;
- }}
+ :disabled="!props.allowEdit"
+ :placeholder="t('common.sensitive-placeholder')"
+ v-model:value="(item.payload.value as AppIMSetting_DingTalk).robotCode"
/>
</div>
</div>
- );
- },
- },
- ];
-});
+ </div>
-const dataChanged = computed(() => {
- switch (state.selectedTab) {
- case Webhook_Type.SLACK:
- return !isEqual(
- state.setting.slack,
- imSetting.value.slack ?? create(AppIMSetting_SlackSchema, {})
- );
- case Webhook_Type.FEISHU:
- return !isEqual(
- state.setting.feishu,
- imSetting.value.feishu ?? create(AppIMSetting_FeishuSchema, {})
- );
- case Webhook_Type.WECOM:
- return !isEqual(
- state.setting.wecom,
- imSetting.value.wecom ?? create(AppIMSetting_WecomSchema, {})
- );
- case Webhook_Type.LARK:
- return !isEqual(
- state.setting.lark,
- imSetting.value.lark ?? create(AppIMSetting_LarkSchema, {})
- );
- case Webhook_Type.DINGTALK:
- return !isEqual(
- state.setting.dingtalk,
- imSetting.value.dingtalk ?? create(AppIMSetting_DingTalkSchema, {})
- );
- default:
- return false;
- }
-});
+ <div class="flex items-center justify-between mt-4 gap-x-2">
+ <div>
+ <NPopconfirm
+ v-if="isConfigured(item.type)"
+ :positive-button-props="{
+ type: 'error',
+ }"
+ @positive-click="() => onDeleteIM(i, item.type)"
+ >
+ <template #trigger>
+ <NButton quaternary circle @click.stop type="error">
+ <template #icon>
+ <Trash2Icon class="w-4 h-auto" />
+ </template>
+ </NButton>
+ </template>
+ <template #default>
+ {{ $t("bbkit.confirm-button.sure-to-delete") }}
+ </template>
+ </NPopconfirm>
+ </div>
+ <div
+ v-if="isDataChanged(item.type, item.payload.value)"
+ class="flex items-center gap-x-2"
+ >
+ <NButton
+ tertiary
+ :disabled="!!state.pendingSaveType"
+ @click="() => onDiscardIM(i, item.type)"
+ >
+ {{ $t("common.discard-changes") }}
+ </NButton>
+ <NButton
+ type="primary"
+ :disabled="!!state.pendingSaveType"
+ :loading="state.pendingSaveType === item.type"
+ @click="() => onSaveIM(i, item.type)"
+ >
+ {{ $t("common.save") }}
+ </NButton>
+ </div>
+ </div>
+ </div>
-const canSave = computed(() => {
- switch (state.selectedTab) {
- case Webhook_Type.SLACK:
- return !!state.setting.slack?.token;
- case Webhook_Type.FEISHU:
- return !!state.setting.feishu?.appId && !!state.setting.feishu?.appSecret;
- case Webhook_Type.WECOM:
- return (
- !!state.setting.wecom?.corpId &&
- !!state.setting.wecom?.agentId &&
- !!state.setting.wecom?.secret
- );
- case Webhook_Type.LARK:
- return !!state.setting.lark?.appId && !!state.setting.lark?.appSecret;
- case Webhook_Type.DINGTALK:
- return (
- !!state.setting.dingtalk?.clientId &&
- !!state.setting.dingtalk?.clientSecret &&
- !!state.setting.dingtalk?.robotCode
- );
- default:
- return false;
- }
+ <div class="flex justify-end">
+ <NButton
+ v-if="availableImSettings.length > 0"
+ type="primary"
+ secondary
+ @click="() => onAddIM(availableImSettings[0].value)"
+ >
+ {{ $t("settings.im.add-another-im") }}
+ </NButton>
+ </div>
+ </div>
+ </div>
+</template>
+
+<script lang="tsx" setup>
+import { create } from "@bufbuild/protobuf";
+import { FieldMaskSchema } from "@bufbuild/protobuf/wkt";
+import { cloneDeep, isEqual } from "lodash-es";
+import { Trash2Icon } from "lucide-vue-next";
+import { NButton, NEmpty, NSelect, NPopconfirm } from "naive-ui";
+import { computed, watch, reactive } from "vue";
+import { useI18n } from "vue-i18n";
+import BBTextField from "@/bbkit/BBTextField.vue";
+import LearnMoreLink from "@/components/LearnMoreLink.vue";
+import WebhookTypeIcon from "@/components/Project/WebhookTypeIcon.vue";
+import { useSettingV1Store, pushNotification } from "@/store";
+import { Webhook_Type } from "@/types/proto-es/v1/project_service_pb";
+import {
+ type AppIMSetting,
+ type AppIMSetting_Slack,
+ type AppIMSetting_Feishu,
+ type AppIMSetting_Wecom,
+ type AppIMSetting_Lark,
+ type AppIMSetting_DingTalk,
+ type AppIMSetting_IMSetting,
+ AppIMSetting_IMSettingSchema,
+ AppIMSettingSchema,
+ AppIMSetting_FeishuSchema,
+ AppIMSetting_SlackSchema,
+ AppIMSetting_LarkSchema,
+ AppIMSetting_WecomSchema,
+ AppIMSetting_DingTalkSchema,
+ Setting_SettingName,
+ ValueSchema as SettingValueSchema,
+} from "@/types/proto-es/v1/setting_service_pb";
+
+interface LocalState {
+ setting: AppIMSetting;
+ pendingSaveType?: Webhook_Type;
+}
+
+type IMSettingPayloadValue =
+ | AppIMSetting_Slack
+ | AppIMSetting_Feishu
+ | AppIMSetting_Wecom
+ | AppIMSetting_Lark
+ | AppIMSetting_DingTalk
+ | undefined;
+
+const props = defineProps<{
+ allowEdit: boolean;
+}>();
+
+const { t } = useI18n();
+const state = reactive<LocalState>({
+ setting: create(AppIMSettingSchema, {
+ settings: [],
+ }),
});
-const discardChanges = () => {
- switch (state.selectedTab) {
+const settingStore = useSettingV1Store();
+
+const onAddIM = (type: Webhook_Type) => {
+ let setting: AppIMSetting_IMSetting | undefined = undefined;
+ switch (type) {
case Webhook_Type.SLACK:
- state.setting.slack = create(AppIMSetting_SlackSchema, {});
+ setting = create(AppIMSetting_IMSettingSchema, {
+ type,
+ payload: {
+ case: "slack",
+ value: create(AppIMSetting_SlackSchema, {}),
+ },
+ });
break;
case Webhook_Type.FEISHU:
- state.setting.feishu = create(AppIMSetting_FeishuSchema, {});
+ setting = create(AppIMSetting_IMSettingSchema, {
+ type,
+ payload: {
+ case: "feishu",
+ value: create(AppIMSetting_FeishuSchema, {}),
+ },
+ });
+ break;
+ case Webhook_Type.LARK:
+ setting = create(AppIMSetting_IMSettingSchema, {
+ type,
+ payload: {
+ case: "lark",
+ value: create(AppIMSetting_LarkSchema, {}),
+ },
+ });
break;
case Webhook_Type.WECOM:
- state.setting.wecom = create(AppIMSetting_WecomSchema, {});
+ setting = create(AppIMSetting_IMSettingSchema, {
+ type,
+ payload: {
+ case: "wecom",
+ value: create(AppIMSetting_WecomSchema, {}),
+ },
+ });
break;
- case Webhook_Type.LARK:
- state.setting.lark = create(AppIMSetting_LarkSchema, {});
case Webhook_Type.DINGTALK:
- state.setting.dingtalk = create(AppIMSetting_DingTalkSchema, {});
+ setting = create(AppIMSetting_IMSettingSchema, {
+ type,
+ payload: {
+ case: "dingtalk",
+ value: create(AppIMSetting_DingTalkSchema, {}),
+ },
+ });
break;
}
+ if (!setting) {
+ return;
+ }
+ state.setting.settings.push(setting);
};
-const onSave = async () => {
- state.loading = true;
- const updateMask: string[] = [];
- const data = cloneDeep(state.setting);
+const onDeleteIM = async (index: number, type: Webhook_Type) => {
+ state.setting.settings.splice(index, 1);
+ if (isConfigured(type)) {
+ await settingStore.upsertSetting({
+ name: Setting_SettingName.APP_IM,
+ value: create(SettingValueSchema, {
+ value: {
+ case: "appImSettingValue",
+ value: create(AppIMSettingSchema, {
+ settings: imSetting.value.settings.filter(
+ (setting) => setting.type !== type
+ ),
+ }),
+ },
+ }),
+ });
+ pushNotification({
+ module: "bytebase",
+ style: "SUCCESS",
+ title: t("common.deleted"),
+ });
+ }
+};
+
+const onDiscardIM = (index: number, type: Webhook_Type) => {
+ const oldSetting = imSetting.value.settings.find(
+ (setting) => setting.type === type
+ );
+ if (oldSetting) {
+ state.setting.settings[index] = cloneDeep(oldSetting);
+ } else {
+ state.setting.settings.splice(index, 1);
+ }
+};
- switch (state.selectedTab) {
+const onSaveIM = async (index: number, type: Webhook_Type) => {
+ state.pendingSaveType = type;
+
+ const updateMask: string[] = [];
+ switch (type) {
case Webhook_Type.SLACK:
updateMask.push("value.app_im_setting_value.slack");
- data.slack!.enabled = true;
break;
case Webhook_Type.FEISHU:
updateMask.push("value.app_im_setting_value.feishu");
- data.feishu!.enabled = true;
break;
case Webhook_Type.WECOM:
updateMask.push("value.app_im_setting_value.wecom");
- data.wecom!.enabled = true;
break;
case Webhook_Type.LARK:
updateMask.push("value.app_im_setting_value.lark");
- data.lark!.enabled = true;
break;
case Webhook_Type.DINGTALK:
updateMask.push("value.app_im_setting_value.dingtalk");
- data.dingtalk!.enabled = true;
break;
}
+ const setting = state.setting.settings[index];
+ const oldIndex = imSetting.value.settings.findIndex(
+ (setting) => setting.type === type
+ );
+ const pendingUpdate = cloneDeep(imSetting.value);
+ if (oldIndex < 0) {
+ pendingUpdate.settings.push(setting);
+ } else {
+ pendingUpdate.settings[oldIndex] = setting;
+ }
try {
- const setting = await settingStore.upsertSetting({
+ await settingStore.upsertSetting({
name: Setting_SettingName.APP_IM,
value: create(SettingValueSchema, {
value: {
case: "appImSettingValue",
- value: data,
+ value: pendingUpdate,
},
}),
updateMask: create(FieldMaskSchema, { paths: updateMask }),
});
-
- switch (state.selectedTab) {
- case Webhook_Type.SLACK:
- if (setting.value?.value?.case === "appImSettingValue") {
- state.setting.slack =
- setting.value.value.value.slack ??
- create(AppIMSetting_SlackSchema, {});
- }
- break;
- case Webhook_Type.FEISHU:
- if (setting.value?.value?.case === "appImSettingValue") {
- state.setting.feishu =
- setting.value.value.value.feishu ??
- create(AppIMSetting_FeishuSchema, {});
- }
- break;
- case Webhook_Type.WECOM:
- if (setting.value?.value?.case === "appImSettingValue") {
- state.setting.wecom =
- setting.value.value.value.wecom ??
- create(AppIMSetting_WecomSchema, {});
- }
- break;
- case Webhook_Type.LARK:
- if (setting.value?.value?.case === "appImSettingValue") {
- state.setting.lark =
- setting.value.value.value.lark ??
- create(AppIMSetting_LarkSchema, {});
- }
- break;
- case Webhook_Type.DINGTALK:
- if (setting.value?.value?.case === "appImSettingValue") {
- state.setting.dingtalk =
- setting.value.value.value.dingtalk ??
- create(AppIMSetting_DingTalkSchema, {});
- }
- break;
- }
-
+ onDiscardIM(index, type);
pushNotification({
module: "bytebase",
style: "SUCCESS",
title: t("common.updated"),
});
} finally {
- state.loading = false;
+ state.pendingSaveType = undefined;
+ }
+};
+
+const fillMask = (data: IMSettingPayloadValue): IMSettingPayloadValue => {
+ if (!data) {
+ return data;
+ }
+ const result = { ...data };
+ for (const key of Object.keys(result)) {
+ if (key === "$typeName" || key === "$unknown") {
+ continue;
+ }
+ const k = key as keyof IMSettingPayloadValue;
+ if (typeof result[k] === "string" && result[k] === "") {
+ (result[k] as string) = "*********";
+ }
+ }
+ return result;
+};
+
+const imSetting = computed(() => {
+ const setting = settingStore.getSettingByName(Setting_SettingName.APP_IM);
+ if (setting?.value?.value?.case !== "appImSettingValue") {
+ return create(AppIMSettingSchema, {
+ settings: [],
+ });
+ }
+ return create(AppIMSettingSchema, {
+ settings: setting.value.value.value.settings.map((imSetting) => {
+ return {
+ ...imSetting,
+ payload: {
+ case: imSetting.payload.case,
+ value: imSetting.payload.value
+ ? fillMask(imSetting.payload.value)
+ : undefined,
+ },
+ } as AppIMSetting_IMSetting;
+ }),
+ });
+});
+
+const isConfigured = (type: Webhook_Type) => {
+ return (
+ imSetting.value.settings.findIndex((setting) => setting.type === type) >= 0
+ );
+};
+
+const isExisted = (type: Webhook_Type) => {
+ return (
+ state.setting.settings.findIndex((setting) => setting.type === type) >= 0
+ );
+};
+
+const getImLabel = (type: Webhook_Type): string => {
+ switch (type) {
+ case Webhook_Type.SLACK:
+ return t("common.slack");
+ case Webhook_Type.FEISHU:
+ return t("common.feishu");
+ case Webhook_Type.LARK:
+ return t("common.lark");
+ case Webhook_Type.WECOM:
+ return t("common.wecom");
+ case Webhook_Type.DINGTALK:
+ return t("common.dingtalk");
+ default:
+ return "";
}
};
+
+const availableImSettings = computed(() => {
+ return [
+ Webhook_Type.SLACK,
+ Webhook_Type.FEISHU,
+ Webhook_Type.LARK,
+ Webhook_Type.WECOM,
+ Webhook_Type.DINGTALK,
+ ]
+ .filter((type) => !isConfigured(type) && !isExisted(type))
+ .map((type) => ({
+ value: type,
+ }));
+});
+
+const renderOption = ({ value }: { value: Webhook_Type }) => {
+ return (
+ <div class="flex items-center gap-x-2">
+ <WebhookTypeIcon type={value} class="h-5 w-5" />
+ {getImLabel(value)}
+ </div>
+ );
+};
+
+watch(
+ () => imSetting.value,
+ (setting) => {
+ state.setting = cloneDeep(setting);
+ },
+ { once: true, immediate: true }
+);
+
+const isDataChanged = (
+ type: Webhook_Type,
+ value: IMSettingPayloadValue
+): boolean => {
+ const oldSetting = imSetting.value.settings.find(
+ (setting) => setting.type === type
+ )?.payload.value;
+ return !isEqual(value, oldSetting);
+};
</script>
diff --git a/proto/gen/grpc-doc/openapi.yaml b/proto/gen/grpc-doc/openapi.yaml
index 821b7352fc..2ef91dfbd3 100644
--- a/proto/gen/grpc-doc/openapi.yaml
+++ b/proto/gen/grpc-doc/openapi.yaml
@@ -8443,62 +8443,82 @@ components:
AppIMSetting:
type: object
properties:
- slack:
- $ref: '#/components/schemas/AppIMSetting_Slack'
- feishu:
- $ref: '#/components/schemas/AppIMSetting_Feishu'
- wecom:
- $ref: '#/components/schemas/AppIMSetting_Wecom'
- lark:
- $ref: '#/components/schemas/AppIMSetting_Lark'
- dingtalk:
- $ref: '#/components/schemas/AppIMSetting_DingTalk'
+ settings:
+ type: array
+ items:
+ $ref: '#/components/schemas/AppIMSetting_IMSetting'
AppIMSetting_DingTalk:
type: object
properties:
- enabled:
- type: boolean
clientId:
+ writeOnly: true
type: string
clientSecret:
+ writeOnly: true
type: string
robotCode:
+ writeOnly: true
type: string
AppIMSetting_Feishu:
type: object
properties:
- enabled:
- type: boolean
appId:
+ writeOnly: true
type: string
appSecret:
+ writeOnly: true
+ type: string
+ AppIMSetting_IMSetting:
+ type: object
+ properties:
+ type:
+ enum:
+ - TYPE_UNSPECIFIED
+ - SLACK
+ - DISCORD
+ - TEAMS
+ - DINGTALK
+ - FEISHU
+ - WECOM
+ - LARK
type: string
+ format: enum
+ slack:
+ $ref: '#/components/schemas/AppIMSetting_Slack'
+ feishu:
+ $ref: '#/components/schemas/AppIMSetting_Feishu'
+ wecom:
+ $ref: '#/components/schemas/AppIMSetting_Wecom'
+ lark:
+ $ref: '#/components/schemas/AppIMSetting_Lark'
+ dingtalk:
+ $ref: '#/components/schemas/AppIMSetting_DingTalk'
AppIMSetting_Lark:
type: object
properties:
- enabled:
- type: boolean
appId:
+ writeOnly: true
type: string
appSecret:
+ writeOnly: true
type: string
AppIMSetting_Slack:
type: object
properties:
- enabled:
- type: boolean
token:
+ writeOnly: true
type: string
AppIMSetting_Wecom:
type: object
properties:
- enabled:
- type: boolean
corpId:
+ writeOnly: true
type: string
agentId:
+ writeOnly: true
type: string
secret:
+ writeOnly: true
type: string
ApprovalFlow:
type: object
diff --git a/proto/gen/grpc-doc/store/README.md b/proto/gen/grpc-doc/store/README.md
index f85739f872..0c07d74aed 100644
--- a/proto/gen/grpc-doc/store/README.md
+++ b/proto/gen/grpc-doc/store/README.md
@@ -269,6 +269,7 @@
- [AppIMSetting](#bytebase-store-AppIMSetting)
- [AppIMSetting.DingTalk](#bytebase-store-AppIMSetting-DingTalk)
- [AppIMSetting.Feishu](#bytebase-store-AppIMSetting-Feishu)
+ - [AppIMSetting.IMSetting](#bytebase-store-AppIMSetting-IMSetting)
- [AppIMSetting.Lark](#bytebase-store-AppIMSetting-Lark)
- [AppIMSetting.Slack](#bytebase-store-AppIMSetting-Slack)
- [AppIMSetting.Wecom](#bytebase-store-AppIMSetting-Wecom)
@@ -4293,11 +4294,7 @@ ISSUE_CREATE represents creating an issue. |
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| slack | [AppIMSetting.Slack](#bytebase-store-AppIMSetting-Slack) | | |
-| feishu | [AppIMSetting.Feishu](#bytebase-store-AppIMSetting-Feishu) | | |
-| wecom | [AppIMSetting.Wecom](#bytebase-store-AppIMSetting-Wecom) | | |
-| lark | [AppIMSetting.Lark](#bytebase-store-AppIMSetting-Lark) | | |
-| dingtalk | [AppIMSetting.DingTalk](#bytebase-store-AppIMSetting-DingTalk) | | |
+| settings | [AppIMSetting.IMSetting](#bytebase-store-AppIMSetting-IMSetting) | repeated | |
@@ -4312,7 +4309,6 @@ ISSUE_CREATE represents creating an issue. |
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| enabled | [bool](#bool) | | |
| client_id | [string](#string) | | |
| client_secret | [string](#string) | | |
| robot_code | [string](#string) | | |
@@ -4330,7 +4326,6 @@ ISSUE_CREATE represents creating an issue. |
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| enabled | [bool](#bool) | | |
| app_id | [string](#string) | | |
| app_secret | [string](#string) | | |
@@ -4339,6 +4334,26 @@ ISSUE_CREATE represents creating an issue. |
+<a name="bytebase-store-AppIMSetting-IMSetting"></a>
+
+### AppIMSetting.IMSetting
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| type | [ProjectWebhook.Type](#bytebase-store-ProjectWebhook-Type) | | |
+| slack | [AppIMSetting.Slack](#bytebase-store-AppIMSetting-Slack) | | |
+| feishu | [AppIMSetting.Feishu](#bytebase-store-AppIMSetting-Feishu) | | |
+| wecom | [AppIMSetting.Wecom](#bytebase-store-AppIMSetting-Wecom) | | |
+| lark | [AppIMSetting.Lark](#bytebase-store-AppIMSetting-Lark) | | |
+| dingtalk | [AppIMSetting.DingTalk](#bytebase-store-AppIMSetting-DingTalk) | | |
+
+
+
+
+
+
<a name="bytebase-store-AppIMSetting-Lark"></a>
### AppIMSetting.Lark
@@ -4347,7 +4362,6 @@ ISSUE_CREATE represents creating an issue. |
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| enabled | [bool](#bool) | | |
| app_id | [string](#string) | | |
| app_secret | [string](#string) | | |
@@ -4364,7 +4378,6 @@ ISSUE_CREATE represents creating an issue. |
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| enabled | [bool](#bool) | | |
| token | [string](#string) | | |
@@ -4380,7 +4393,6 @@ ISSUE_CREATE represents creating an issue. |
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| enabled | [bool](#bool) | | |
| corp_id | [string](#string) | | |
| agent_id | [string](#string) | | |
| secret | [string](#string) | | |
diff --git a/proto/gen/grpc-doc/store/index.html b/proto/gen/grpc-doc/store/index.html
index 3b37cef016..6afa545cf6 100644
--- a/proto/gen/grpc-doc/store/index.html
+++ b/proto/gen/grpc-doc/store/index.html
@@ -1253,6 +1253,10 @@
<a href="#bytebase.store.AppIMSetting.Feishu"><span class="badge">M</span>AppIMSetting.Feishu</a>
</li>
+ <li>
+ <a href="#bytebase.store.AppIMSetting.IMSetting"><span class="badge">M</span>AppIMSetting.IMSetting</a>
+ </li>
+
<li>
<a href="#bytebase.store.AppIMSetting.Lark"><span class="badge">M</span>AppIMSetting.Lark</a>
</li>
@@ -11371,37 +11375,9 @@ But frontend can be started with a single rule easily. </p></td>
<tbody>
<tr>
- <td>slack</td>
- <td><a href="#bytebase.store.AppIMSetting.Slack">AppIMSetting.Slack</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>feishu</td>
- <td><a href="#bytebase.store.AppIMSetting.Feishu">AppIMSetting.Feishu</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>wecom</td>
- <td><a href="#bytebase.store.AppIMSetting.Wecom">AppIMSetting.Wecom</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>lark</td>
- <td><a href="#bytebase.store.AppIMSetting.Lark">AppIMSetting.Lark</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>dingtalk</td>
- <td><a href="#bytebase.store.AppIMSetting.DingTalk">AppIMSetting.DingTalk</a></td>
- <td></td>
+ <td>settings</td>
+ <td><a href="#bytebase.store.AppIMSetting.IMSetting">AppIMSetting.IMSetting</a></td>
+ <td>repeated</td>
<td><p> </p></td>
</tr>
@@ -11422,13 +11398,6 @@ But frontend can be started with a single rule easily. </p></td>
</thead>
<tbody>
- <tr>
- <td>enabled</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
<tr>
<td>client_id</td>
<td><a href="#string">string</a></td>
@@ -11467,13 +11436,6 @@ But frontend can be started with a single rule easily. </p></td>
</thead>
<tbody>
- <tr>
- <td>enabled</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
<tr>
<td>app_id</td>
<td><a href="#string">string</a></td>
@@ -11495,7 +11457,7 @@ But frontend can be started with a single rule easily. </p></td>
- <h3 id="bytebase.store.AppIMSetting.Lark">AppIMSetting.Lark</h3>
+ <h3 id="bytebase.store.AppIMSetting.IMSetting">AppIMSetting.IMSetting</h3>
<p></p>
@@ -11506,22 +11468,43 @@ But frontend can be started with a single rule easily. </p></td>
<tbody>
<tr>
- <td>enabled</td>
- <td><a href="#bool">bool</a></td>
+ <td>type</td>
+ <td><a href="#bytebase.store.ProjectWebhook.Type">ProjectWebhook.Type</a></td>
<td></td>
<td><p> </p></td>
</tr>
<tr>
- <td>app_id</td>
- <td><a href="#string">string</a></td>
+ <td>slack</td>
+ <td><a href="#bytebase.store.AppIMSetting.Slack">AppIMSetting.Slack</a></td>
<td></td>
<td><p> </p></td>
</tr>
<tr>
- <td>app_secret</td>
- <td><a href="#string">string</a></td>
+ <td>feishu</td>
+ <td><a href="#bytebase.store.AppIMSetting.Feishu">AppIMSetting.Feishu</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>wecom</td>
+ <td><a href="#bytebase.store.AppIMSetting.Wecom">AppIMSetting.Wecom</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>lark</td>
+ <td><a href="#bytebase.store.AppIMSetting.Lark">AppIMSetting.Lark</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>dingtalk</td>
+ <td><a href="#bytebase.store.AppIMSetting.DingTalk">AppIMSetting.DingTalk</a></td>
<td></td>
<td><p> </p></td>
</tr>
@@ -11533,7 +11516,7 @@ But frontend can be started with a single rule easily. </p></td>
- <h3 id="bytebase.store.AppIMSetting.Slack">AppIMSetting.Slack</h3>
+ <h3 id="bytebase.store.AppIMSetting.Lark">AppIMSetting.Lark</h3>
<p></p>
@@ -11544,14 +11527,14 @@ But frontend can be started with a single rule easily. </p></td>
<tbody>
<tr>
- <td>enabled</td>
- <td><a href="#bool">bool</a></td>
+ <td>app_id</td>
+ <td><a href="#string">string</a></td>
<td></td>
<td><p> </p></td>
</tr>
<tr>
- <td>token</td>
+ <td>app_secret</td>
<td><a href="#string">string</a></td>
<td></td>
<td><p> </p></td>
@@ -11564,7 +11547,7 @@ But frontend can be started with a single rule easily. </p></td>
- <h3 id="bytebase.store.AppIMSetting.Wecom">AppIMSetting.Wecom</h3>
+ <h3 id="bytebase.store.AppIMSetting.Slack">AppIMSetting.Slack</h3>
<p></p>
@@ -11575,12 +11558,29 @@ But frontend can be started with a single rule easily. </p></td>
<tbody>
<tr>
- <td>enabled</td>
- <td><a href="#bool">bool</a></td>
+ <td>token</td>
+ <td><a href="#string">string</a></td>
<td></td>
<td><p> </p></td>
</tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.store.AppIMSetting.Wecom">AppIMSetting.Wecom</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
<tr>
<td>corp_id</td>
<td><a href="#string">string</a></td>
diff --git a/proto/gen/grpc-doc/v1/README.md b/proto/gen/grpc-doc/v1/README.md
index 22e8dd4998..08ae75a91f 100644
--- a/proto/gen/grpc-doc/v1/README.md
+++ b/proto/gen/grpc-doc/v1/README.md
@@ -214,6 +214,47 @@
- [IssueService](#bytebase-v1-IssueService)
+- [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/project_service.proto](#v1_project_service-proto)
+ - [Activity](#bytebase-v1-Activity)
+ - [AddWebhookRequest](#bytebase-v1-AddWebhookRequest)
+ - [BatchDeleteProjectsRequest](#bytebase-v1-BatchDeleteProjectsRequest)
+ - [BatchGetIamPolicyRequest](#bytebase-v1-BatchGetIamPolicyRequest)
+ - [BatchGetIamPolicyResponse](#bytebase-v1-BatchGetIamPolicyResponse)
+ - [BatchGetIamPolicyResponse.PolicyResult](#bytebase-v1-BatchGetIamPolicyResponse-PolicyResult)
+ - [CreateProjectRequest](#bytebase-v1-CreateProjectRequest)
+ - [DeleteProjectRequest](#bytebase-v1-DeleteProjectRequest)
+ - [GetProjectRequest](#bytebase-v1-GetProjectRequest)
+ - [Label](#bytebase-v1-Label)
+ - [ListProjectsRequest](#bytebase-v1-ListProjectsRequest)
+ - [ListProjectsResponse](#bytebase-v1-ListProjectsResponse)
+ - [Project](#bytebase-v1-Project)
+ - [Project.ExecutionRetryPolicy](#bytebase-v1-Project-ExecutionRetryPolicy)
+ - [Project.LabelsEntry](#bytebase-v1-Project-LabelsEntry)
+ - [RemoveWebhookRequest](#bytebase-v1-RemoveWebhookRequest)
+ - [SearchProjectsRequest](#bytebase-v1-SearchProjectsRequest)
+ - [SearchProjectsResponse](#bytebase-v1-SearchProjectsResponse)
+ - [TestWebhookRequest](#bytebase-v1-TestWebhookRequest)
+ - [TestWebhookResponse](#bytebase-v1-TestWebhookResponse)
+ - [UndeleteProjectRequest](#bytebase-v1-UndeleteProjectRequest)
+ - [UpdateProjectRequest](#bytebase-v1-UpdateProjectRequest)
+ - [UpdateWebhookRequest](#bytebase-v1-UpdateWebhookRequest)
+ - [Webhook](#bytebase-v1-Webhook)
+
+ - [Activity.Type](#bytebase-v1-Activity-Type)
+ - [Webhook.Type](#bytebase-v1-Webhook-Type)
+
+ - [ProjectService](#bytebase-v1-ProjectService)
+
- [v1/setting_service.proto](#v1_setting_service-proto)
- [AISetting](#bytebase-v1-AISetting)
- [Algorithm](#bytebase-v1-Algorithm)
@@ -226,6 +267,7 @@
- [AppIMSetting](#bytebase-v1-AppIMSetting)
- [AppIMSetting.DingTalk](#bytebase-v1-AppIMSetting-DingTalk)
- [AppIMSetting.Feishu](#bytebase-v1-AppIMSetting-Feishu)
+ - [AppIMSetting.IMSetting](#bytebase-v1-AppIMSetting-IMSetting)
- [AppIMSetting.Lark](#bytebase-v1-AppIMSetting-Lark)
- [AppIMSetting.Slack](#bytebase-v1-AppIMSetting-Slack)
- [AppIMSetting.Wecom](#bytebase-v1-AppIMSetting-Wecom)
@@ -293,16 +335,6 @@
- [ActuatorService](#bytebase-v1-ActuatorService)
-- [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)
@@ -500,37 +532,6 @@
- [PlanService](#bytebase-v1-PlanService)
-- [v1/project_service.proto](#v1_project_service-proto)
- - [Activity](#bytebase-v1-Activity)
- - [AddWebhookRequest](#bytebase-v1-AddWebhookRequest)
- - [BatchDeleteProjectsRequest](#bytebase-v1-BatchDeleteProjectsRequest)
- - [BatchGetIamPolicyRequest](#bytebase-v1-BatchGetIamPolicyRequest)
- - [BatchGetIamPolicyResponse](#bytebase-v1-BatchGetIamPolicyResponse)
- - [BatchGetIamPolicyResponse.PolicyResult](#bytebase-v1-BatchGetIamPolicyResponse-PolicyResult)
- - [CreateProjectRequest](#bytebase-v1-CreateProjectRequest)
- - [DeleteProjectRequest](#bytebase-v1-DeleteProjectRequest)
- - [GetProjectRequest](#bytebase-v1-GetProjectRequest)
- - [Label](#bytebase-v1-Label)
- - [ListProjectsRequest](#bytebase-v1-ListProjectsRequest)
- - [ListProjectsResponse](#bytebase-v1-ListProjectsResponse)
- - [Project](#bytebase-v1-Project)
- - [Project.ExecutionRetryPolicy](#bytebase-v1-Project-ExecutionRetryPolicy)
- - [Project.LabelsEntry](#bytebase-v1-Project-LabelsEntry)
- - [RemoveWebhookRequest](#bytebase-v1-RemoveWebhookRequest)
- - [SearchProjectsRequest](#bytebase-v1-SearchProjectsRequest)
- - [SearchProjectsResponse](#bytebase-v1-SearchProjectsResponse)
- - [TestWebhookRequest](#bytebase-v1-TestWebhookRequest)
- - [TestWebhookResponse](#bytebase-v1-TestWebhookResponse)
- - [UndeleteProjectRequest](#bytebase-v1-UndeleteProjectRequest)
- - [UpdateProjectRequest](#bytebase-v1-UpdateProjectRequest)
- - [UpdateWebhookRequest](#bytebase-v1-UpdateWebhookRequest)
- - [Webhook](#bytebase-v1-Webhook)
-
- - [Activity.Type](#bytebase-v1-Activity-Type)
- - [Webhook.Type](#bytebase-v1-Webhook-Type)
-
- - [ProjectService](#bytebase-v1-ProjectService)
-
- [v1/release_service.proto](#v1_release_service-proto)
- [CheckReleaseRequest](#bytebase-v1-CheckReleaseRequest)
- [CheckReleaseResponse](#bytebase-v1-CheckReleaseResponse)
@@ -4089,375 +4090,388 @@ IssueService manages issues for tracking database changes and tasks.
-<a name="v1_setting_service-proto"></a>
+<a name="v1_iam_policy-proto"></a>
<p align="right"><a href="#top">Top</a></p>
-## v1/setting_service.proto
-
+## v1/iam_policy.proto
-<a name="bytebase-v1-AISetting"></a>
-### AISetting
+<a name="bytebase-v1-Binding"></a>
+### Binding
+Binding associates members with a role and optional conditions.
| 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) | | |
+| 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} |
+| 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 &#34;instances/{instance}/databases/{database}&#34; format, used by the &#34;roles/sqlEditorUser&#34; role, support &#34;==&#34; operator. resource.schema_name: the schema name, used by the &#34;roles/sqlEditorUser&#34; role, support &#34;==&#34; operator. resource.table_name: the table name, used by the &#34;roles/sqlEditorUser&#34; role, support &#34;==&#34; operator. request.time: the expiration. Only support &#34;&lt;&#34; operation in `request.time &lt; timestamp(&#34;{ISO datetime string format}&#34;)`.
+For example: resource.database == &#34;instances/local-pg/databases/postgres&#34; &amp;&amp; resource.schema_name in [&#34;public&#34;,&#34;another_schema&#34;] resource.database == &#34;instances/local-pg/databases/bytebase&#34; &amp;&amp; resource.schema_name == &#34;public&#34; &amp;&amp; resource.table_name in [&#34;audit_log&#34;] request.time &lt; timestamp(&#34;2025-04-26T11:24:48.655Z&#34;) |
+| parsed_expr | [google.api.expr.v1alpha1.Expr](#google-api-expr-v1alpha1-Expr) | | The parsed expression of the condition. |
-<a name="bytebase-v1-Algorithm"></a>
-### Algorithm
+<a name="bytebase-v1-BindingDelta"></a>
+### BindingDelta
+A single change to a binding.
| 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) | | |
-
+| 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-Algorithm-FullMask"></a>
-### Algorithm.FullMask
+<a name="bytebase-v1-GetIamPolicyRequest"></a>
+### GetIamPolicyRequest
+Request message for getting an IAM policy.
| 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. |
-
+| resource | [string](#string) | | The name of the resource to get the IAM policy. Format: projects/{project} Format: workspaces/{workspace} |
-<a name="bytebase-v1-Algorithm-InnerOuterMask"></a>
-### Algorithm.InnerOuterMask
+<a name="bytebase-v1-IamPolicy"></a>
+### IamPolicy
+IAM policy that binds members to roles.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| prefix_len | [int32](#int32) | | |
-| suffix_len | [int32](#int32) | | |
-| type | [Algorithm.InnerOuterMask.MaskType](#bytebase-v1-Algorithm-InnerOuterMask-MaskType) | | |
-| substitution | [string](#string) | | |
-
+| 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-Algorithm-MD5Mask"></a>
-### Algorithm.MD5Mask
+<a name="bytebase-v1-PolicyDelta"></a>
+### PolicyDelta
+Describes changes between two IAM policies.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| salt | [string](#string) | | salt is the salt value to generate a different hash that with the word alone. |
-
+| binding_deltas | [BindingDelta](#bytebase-v1-BindingDelta) | repeated | The delta for Bindings between two policies. |
-<a name="bytebase-v1-Algorithm-RangeMask"></a>
-### Algorithm.RangeMask
+<a name="bytebase-v1-SetIamPolicyRequest"></a>
+### SetIamPolicyRequest
+Request message for setting an IAM policy.
| 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. |
+| 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-Algorithm-RangeMask-Slice"></a>
-### Algorithm.RangeMask.Slice
+<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 |
-| ----- | ---- | ----- | ----------- |
-| start | [int32](#int32) | | start is the start index of the original value, start from 0 and should be less than stop. |
-| end | [int32](#int32) | | stop is the stop index of the original value, should be less than the length of the original value. |
-| substitution | [string](#string) | | substitution is the string used to replace the OriginalValue[start:end). |
+
+
+
-<a name="bytebase-v1-Announcement"></a>
+<a name="v1_project_service-proto"></a>
+<p align="right"><a href="#top">Top</a></p>
-### Announcement
+## v1/project_service.proto
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| level | [Announcement.AlertLevel](#bytebase-v1-Announcement-AlertLevel) | | The alert level of announcement |
-| text | [string](#string) | | The text of announcement |
-| link | [string](#string) | | The optional link, user can follow the link to check extra details |
+<a name="bytebase-v1-Activity"></a>
+
+### Activity
+Activity types for webhook notifications.
-<a name="bytebase-v1-AppIMSetting"></a>
+<a name="bytebase-v1-AddWebhookRequest"></a>
-### AppIMSetting
+### AddWebhookRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| 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) | | |
+| project | [string](#string) | | The name of the project to add the webhook to. Format: projects/{project} |
+| webhook | [Webhook](#bytebase-v1-Webhook) | | The webhook to add. |
-<a name="bytebase-v1-AppIMSetting-DingTalk"></a>
+<a name="bytebase-v1-BatchDeleteProjectsRequest"></a>
-### AppIMSetting.DingTalk
+### BatchDeleteProjectsRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| enabled | [bool](#bool) | | |
-| client_id | [string](#string) | | |
-| client_secret | [string](#string) | | |
-| robot_code | [string](#string) | | |
+| names | [string](#string) | repeated | The names of the projects to delete. Format: projects/{project} |
+| force | [bool](#bool) | | If set to true, any databases from this project will be moved to default project. Sheets are not moved since BYTEBASE_ARTIFACT sheets belong to the issue and issue project. Open issues will remain open but associated with the deleted project. If set to false, the operation will fail if the project has databases or open issues. |
-<a name="bytebase-v1-AppIMSetting-Feishu"></a>
+<a name="bytebase-v1-BatchGetIamPolicyRequest"></a>
-### AppIMSetting.Feishu
+### BatchGetIamPolicyRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| enabled | [bool](#bool) | | |
-| app_id | [string](#string) | | |
-| app_secret | [string](#string) | | |
+| scope | [string](#string) | | The scope of the batch get. Typically it&#39;s &#34;projects/-&#34;. |
+| names | [string](#string) | repeated | |
-<a name="bytebase-v1-AppIMSetting-Lark"></a>
+<a name="bytebase-v1-BatchGetIamPolicyResponse"></a>
-### AppIMSetting.Lark
+### BatchGetIamPolicyResponse
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| enabled | [bool](#bool) | | |
-| app_id | [string](#string) | | |
-| app_secret | [string](#string) | | |
-
+| policy_results | [BatchGetIamPolicyResponse.PolicyResult](#bytebase-v1-BatchGetIamPolicyResponse-PolicyResult) | repeated | The policy results for each requested project. |
-<a name="bytebase-v1-AppIMSetting-Slack"></a>
-### AppIMSetting.Slack
+<a name="bytebase-v1-BatchGetIamPolicyResponse-PolicyResult"></a>
+### BatchGetIamPolicyResponse.PolicyResult
+Result for a single project&#39;s IAM policy.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| enabled | [bool](#bool) | | |
-| token | [string](#string) | | |
+| project | [string](#string) | | The project resource name. |
+| policy | [IamPolicy](#bytebase-v1-IamPolicy) | | The IAM policy for the project. |
-<a name="bytebase-v1-AppIMSetting-Wecom"></a>
+<a name="bytebase-v1-CreateProjectRequest"></a>
-### AppIMSetting.Wecom
+### CreateProjectRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| enabled | [bool](#bool) | | |
-| corp_id | [string](#string) | | |
-| agent_id | [string](#string) | | |
-| secret | [string](#string) | | |
+| project | [Project](#bytebase-v1-Project) | | The project to create. |
+| project_id | [string](#string) | | The ID to use for the project, which will become the final component of the project&#39;s resource name.
+
+This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/. |
-<a name="bytebase-v1-DataClassificationSetting"></a>
+<a name="bytebase-v1-DeleteProjectRequest"></a>
-### DataClassificationSetting
+### DeleteProjectRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| configs | [DataClassificationSetting.DataClassificationConfig](#bytebase-v1-DataClassificationSetting-DataClassificationConfig) | repeated | |
-
-
+| name | [string](#string) | | The name of the project to delete. Format: projects/{project} |
+| force | [bool](#bool) | | If set to true, any databases from this project will be moved to default project. Sheets are not moved since BYTEBASE_ARTIFACT sheets belong to the issue and issue project. Open issues will remain open but associated with the deleted project. If set to false, the operation will fail if the project has databases or open issues. |
+| purge | [bool](#bool) | | If set to true, permanently purge the soft-deleted project and all related resources. This operation is irreversible. Following AIP-165, this should only be used for administrative cleanup of old soft-deleted projects. The project must already be soft-deleted for this to work. |
-<a name="bytebase-v1-DataClassificationSetting-DataClassificationConfig"></a>
-### DataClassificationSetting.DataClassificationConfig
+
+<a name="bytebase-v1-GetProjectRequest"></a>
+
+### GetProjectRequest
| 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. The order for the level decides its priority. |
-| classification | [DataClassificationSetting.DataClassificationConfig.ClassificationEntry](#bytebase-v1-DataClassificationSetting-DataClassificationConfig-ClassificationEntry) | repeated | classification is the id - DataClassification map. The id should in [0-9]&#43;-[0-9]&#43;-[0-9]&#43; format. |
-| classification_from_config | [bool](#bool) | | If true, we will only store the classification in the config. Otherwise we will get the classification from table/column comment, and write back to the schema metadata. |
-
+| name | [string](#string) | | The name of the project to retrieve. Format: projects/{project} |
-<a name="bytebase-v1-DataClassificationSetting-DataClassificationConfig-ClassificationEntry"></a>
-### DataClassificationSetting.DataClassificationConfig.ClassificationEntry
+<a name="bytebase-v1-Label"></a>
+### Label
+A label for categorizing and organizing issues.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| key | [string](#string) | | |
-| value | [DataClassificationSetting.DataClassificationConfig.DataClassification](#bytebase-v1-DataClassificationSetting-DataClassificationConfig-DataClassification) | | |
+| value | [string](#string) | | The label value/name. |
+| color | [string](#string) | | The color code for the label (e.g., hex color). |
+| group | [string](#string) | | The group this label belongs to. |
-<a name="bytebase-v1-DataClassificationSetting-DataClassificationConfig-DataClassification"></a>
+<a name="bytebase-v1-ListProjectsRequest"></a>
-### DataClassificationSetting.DataClassificationConfig.DataClassification
+### ListProjectsRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| id | [string](#string) | | id is the classification id in [0-9]&#43;-[0-9]&#43;-[0-9]&#43; format. |
-| title | [string](#string) | | |
-| description | [string](#string) | | |
-| level_id | [string](#string) | optional | |
+| page_size | [int32](#int32) | | The maximum number of projects to return. The service may return fewer than this value. If unspecified, at most 10 projects will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. |
+| page_token | [string](#string) | | A page token, received from a previous `ListProjects` call. Provide this to retrieve the subsequent page.
+When paginating, all other parameters provided to `ListProjects` must match the call that provided the page token. |
+| show_deleted | [bool](#bool) | | Show deleted projects if specified. |
+| filter | [string](#string) | | Filter the project. Check filter for SearchProjectsRequest for details. Supports filtering by name, resource_id, state, and labels (e.g., labels.environment == &#34;production&#34;). |
-<a name="bytebase-v1-DataClassificationSetting-DataClassificationConfig-Level"></a>
-### DataClassificationSetting.DataClassificationConfig.Level
+<a name="bytebase-v1-ListProjectsResponse"></a>
+
+### ListProjectsResponse
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| id | [string](#string) | | |
-| title | [string](#string) | | |
-| description | [string](#string) | | |
+| projects | [Project](#bytebase-v1-Project) | repeated | The projects from the specified request. |
+| next_page_token | [string](#string) | | A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. |
-<a name="bytebase-v1-EnvironmentSetting"></a>
+<a name="bytebase-v1-Project"></a>
-### EnvironmentSetting
+### Project
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| environments | [EnvironmentSetting.Environment](#bytebase-v1-EnvironmentSetting-Environment) | repeated | |
-
+| name | [string](#string) | | The name of the project. Format: projects/{project} |
+| state | [State](#bytebase-v1-State) | | The lifecycle state of the project. |
+| title | [string](#string) | | The title or name of a project. It&#39;s not unique within the workspace. |
+| webhooks | [Webhook](#bytebase-v1-Webhook) | repeated | The list of webhooks configured for the project. |
+| data_classification_config_id | [string](#string) | | The data classification configuration ID for the project. |
+| issue_labels | [Label](#bytebase-v1-Label) | repeated | Labels available for tagging issues in this project. |
+| force_issue_labels | [bool](#bool) | | Force issue labels to be used when creating an issue. |
+| allow_modify_statement | [bool](#bool) | | Allow modifying SQL statements after issue is created. |
+| auto_resolve_issue | [bool](#bool) | | Enable automatic issue resolution when tasks complete. |
+| enforce_issue_title | [bool](#bool) | | Enforce issue title to be created by user instead of generated by Bytebase. |
+| auto_enable_backup | [bool](#bool) | | Whether to automatically enable backup for database changes. |
+| skip_backup_errors | [bool](#bool) | | Whether to skip backup errors and continue with data migration. |
+| postgres_database_tenant_mode | [bool](#bool) | | Whether to enable database tenant mode for PostgreSQL. If enabled, issues will include &#34;set role &lt;db_owner&gt;&#34; statement. |
+| allow_self_approval | [bool](#bool) | | Whether to allow issue creators to self-approve their own issues. |
+| execution_retry_policy | [Project.ExecutionRetryPolicy](#bytebase-v1-Project-ExecutionRetryPolicy) | | Execution retry policy for task runs. |
+| ci_sampling_size | [int32](#int32) | | The maximum number of database rows to sample during CI data validation. Without specification, sampling is disabled, resulting in full validation. |
+| parallel_tasks_per_rollout | [int32](#int32) | | The maximum number of parallel tasks allowed during rollout execution. |
+| labels | [Project.LabelsEntry](#bytebase-v1-Project-LabelsEntry) | repeated | Labels are key-value pairs that can be attached to the project. For example, { &#34;environment&#34;: &#34;production&#34;, &#34;team&#34;: &#34;backend&#34; } |
+| enforce_sql_review | [bool](#bool) | | Whether to enforce SQL review checks to pass before issue creation. If enabled, issues cannot be created when SQL review finds errors. |
-<a name="bytebase-v1-EnvironmentSetting-Environment"></a>
-### EnvironmentSetting.Environment
+<a name="bytebase-v1-Project-ExecutionRetryPolicy"></a>
+### Project.ExecutionRetryPolicy
+Execution retry policy configuration.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The resource name of the environment. Format: environments/{environment}. Output only. |
-| id | [string](#string) | | The resource id of the environment. This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/. |
-| title | [string](#string) | | The display name of the environment. |
-| tags | [EnvironmentSetting.Environment.TagsEntry](#bytebase-v1-EnvironmentSetting-Environment-TagsEntry) | repeated | |
-| color | [string](#string) | | |
+| maximum_retries | [int32](#int32) | | The maximum number of retries for lock timeout errors. |
-<a name="bytebase-v1-EnvironmentSetting-Environment-TagsEntry"></a>
+<a name="bytebase-v1-Project-LabelsEntry"></a>
-### EnvironmentSetting.Environment.TagsEntry
+### Project.LabelsEntry
@@ -4471,1117 +4485,1031 @@ IssueService manages issues for tracking database changes and tasks.
-<a name="bytebase-v1-GetSettingRequest"></a>
+<a name="bytebase-v1-RemoveWebhookRequest"></a>
+
+### RemoveWebhookRequest
-### GetSettingRequest
-The request message for getting a setting.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The resource name of the setting. |
+| webhook | [Webhook](#bytebase-v1-Webhook) | | The webhook to remove. Identified by its url. |
-<a name="bytebase-v1-GetSettingResponse"></a>
+<a name="bytebase-v1-SearchProjectsRequest"></a>
+
+### SearchProjectsRequest
-### GetSettingResponse
-The response message for getting a setting.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| setting | [Setting](#bytebase-v1-Setting) | | |
-
-
-
-
-
+| show_deleted | [bool](#bool) | | Show deleted projects if specified. |
+| filter | [string](#string) | | Filter the project. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
-<a name="bytebase-v1-ListSettingsRequest"></a>
+Supported filters: - name: the project name, support &#34;==&#34; and &#34;.matches()&#34; operator. - resource_id: the project id, support &#34;==&#34; and &#34;.matches()&#34; operator. - exclude_default: if not include the default project, should be &#34;true&#34; or &#34;false&#34;, support &#34;==&#34; operator. - state: check the State enum for the values, support &#34;==&#34; operator. - labels.{key}: the project label, support &#34;==&#34; and &#34;in&#34; operators.
-### ListSettingsRequest
+For example: name == &#34;project name&#34; name.matches(&#34;project name&#34;) resource_id == &#34;project id&#34; resource_id.matches(&#34;project id&#34;) exclude_default == true state == &#34;DELETED&#34; labels.environment == &#34;production&#34; labels.tier == &#34;critical&#34; labels.environment in [&#34;staging&#34;, &#34;prod&#34;] You can combine filter conditions like: name == &#34;project name&#34; &amp;&amp; resource_id.matches(&#34;project id&#34;) name.matches(&#34;project name&#34;) || resource_id == &#34;project id&#34; labels.environment == &#34;production&#34; &amp;&amp; labels.tier == &#34;critical&#34; |
+| page_size | [int32](#int32) | | The maximum number of projects to return. The service may return fewer than this value. If unspecified, at most 10 projects will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. |
+| page_token | [string](#string) | | A page token, received from a previous `SearchProjects` call. Provide this to retrieve the subsequent page.
+When paginating, all other parameters provided to `SearchProjects` must match the call that provided the page token. |
-<a name="bytebase-v1-ListSettingsResponse"></a>
+<a name="bytebase-v1-SearchProjectsResponse"></a>
-### ListSettingsResponse
+### SearchProjectsResponse
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| settings | [Setting](#bytebase-v1-Setting) | repeated | The settings from the specified request. |
+| projects | [Project](#bytebase-v1-Project) | repeated | The projects from the specified request. |
+| next_page_token | [string](#string) | | A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. |
-<a name="bytebase-v1-PasswordRestrictionSetting"></a>
+<a name="bytebase-v1-TestWebhookRequest"></a>
-### PasswordRestrictionSetting
+### TestWebhookRequest
| 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. |
+| project | [string](#string) | | The name of the project which owns the webhook to test. Format: projects/{project} |
+| webhook | [Webhook](#bytebase-v1-Webhook) | | The webhook to test. Identified by its url. |
-<a name="bytebase-v1-SCIMSetting"></a>
+<a name="bytebase-v1-TestWebhookResponse"></a>
-### SCIMSetting
+### TestWebhookResponse
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| token | [string](#string) | | |
+| error | [string](#string) | | The result of the test, empty if the test is successful. |
-<a name="bytebase-v1-SchemaTemplateSetting"></a>
+<a name="bytebase-v1-UndeleteProjectRequest"></a>
-### SchemaTemplateSetting
+### UndeleteProjectRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| field_templates | [SchemaTemplateSetting.FieldTemplate](#bytebase-v1-SchemaTemplateSetting-FieldTemplate) | repeated | |
-| column_types | [SchemaTemplateSetting.ColumnType](#bytebase-v1-SchemaTemplateSetting-ColumnType) | repeated | |
-| table_templates | [SchemaTemplateSetting.TableTemplate](#bytebase-v1-SchemaTemplateSetting-TableTemplate) | repeated | |
+| name | [string](#string) | | The name of the deleted project. Format: projects/{project} |
-<a name="bytebase-v1-SchemaTemplateSetting-ColumnType"></a>
+<a name="bytebase-v1-UpdateProjectRequest"></a>
-### SchemaTemplateSetting.ColumnType
+### UpdateProjectRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| engine | [Engine](#bytebase-v1-Engine) | | |
-| enabled | [bool](#bool) | | |
-| types | [string](#string) | repeated | |
-
-
-
-
-
-
-<a name="bytebase-v1-SchemaTemplateSetting-FieldTemplate"></a>
-
-### SchemaTemplateSetting.FieldTemplate
-
-
+| project | [Project](#bytebase-v1-Project) | | The project to update.
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| id | [string](#string) | | |
-| engine | [Engine](#bytebase-v1-Engine) | | |
-| category | [string](#string) | | |
-| column | [ColumnMetadata](#bytebase-v1-ColumnMetadata) | | |
-| catalog | [ColumnCatalog](#bytebase-v1-ColumnCatalog) | | |
+The project&#39;s `name` field is used to identify the project to update. Format: projects/{project} |
+| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | The list of fields to update. |
+| allow_missing | [bool](#bool) | | If set to true, and the project is not found, a new project will be created. In this situation, `update_mask` is ignored. |
-<a name="bytebase-v1-SchemaTemplateSetting-TableTemplate"></a>
+<a name="bytebase-v1-UpdateWebhookRequest"></a>
-### SchemaTemplateSetting.TableTemplate
+### UpdateWebhookRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| id | [string](#string) | | |
-| engine | [Engine](#bytebase-v1-Engine) | | |
-| category | [string](#string) | | |
-| table | [TableMetadata](#bytebase-v1-TableMetadata) | | |
-| catalog | [TableCatalog](#bytebase-v1-TableCatalog) | | |
+| webhook | [Webhook](#bytebase-v1-Webhook) | | The webhook to modify. |
+| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | The list of fields to update. |
+| allow_missing | [bool](#bool) | | If set to true, and the webhook is not found, a new webhook will be created. In this situation, `update_mask` is ignored. |
-<a name="bytebase-v1-SemanticTypeSetting"></a>
+<a name="bytebase-v1-Webhook"></a>
-### SemanticTypeSetting
+### Webhook
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| types | [SemanticTypeSetting.SemanticType](#bytebase-v1-SemanticTypeSetting-SemanticType) | repeated | |
-
+| name | [string](#string) | | name is the name of the webhook, generated by the server. format: projects/{project}/webhooks/{webhook} |
+| type | [Webhook.Type](#bytebase-v1-Webhook-Type) | | type is the type of the webhook. |
+| title | [string](#string) | | title is the title of the webhook. |
+| url | [string](#string) | | url is the url of the webhook, should be unique within the project. |
+| direct_message | [bool](#bool) | | if direct_message is set, the notification is sent directly to the persons and url will be ignored. IM integration setting should be set for this function to work. |
+| notification_types | [Activity.Type](#bytebase-v1-Activity-Type) | repeated | notification_types is the list of activities types that the webhook is interested in. Bytebase will only send notifications to the webhook if the activity type is in the list. It should not be empty, and should be a subset of the following: - ISSUE_CREATE - ISSUE_COMMENT_CREATE - ISSUE_FIELD_UPDATE - ISSUE_STATUS_UPDATE - ISSUE_APPROVAL_NOTIFY - ISSUE_PIPELINE_STAGE_STATUS_UPDATE - ISSUE_PIPELINE_TASK_RUN_STATUS_UPDATE - NOTIFY_ISSUE_APPROVED - NOTIFY_PIPELINE_ROLLOUT |
-<a name="bytebase-v1-SemanticTypeSetting-SemanticType"></a>
+
-### SemanticTypeSetting.SemanticType
+<a name="bytebase-v1-Activity-Type"></a>
+### Activity.Type
+Activity type enumeration.
-| 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. |
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| TYPE_UNSPECIFIED | 0 | Unspecified type. |
+| NOTIFY_ISSUE_APPROVED | 23 | Notifications via webhooks.
+NOTIFY_ISSUE_APPROVED represents the issue approved notification. |
+| NOTIFY_PIPELINE_ROLLOUT | 24 | NOTIFY_PIPELINE_ROLLOUT represents the pipeline rollout notification. |
+| ISSUE_CREATE | 1 | Issue related activity types.
+ISSUE_CREATE represents creating an issue. |
+| ISSUE_COMMENT_CREATE | 2 | ISSUE_COMMENT_CREATE represents commenting on an issue. |
+| ISSUE_FIELD_UPDATE | 3 | ISSUE_FIELD_UPDATE represents updating the issue field, likes title, description, etc. |
+| ISSUE_STATUS_UPDATE | 4 | ISSUE_STATUS_UPDATE represents the issue status change, including OPEN, CLOSE, CANCEL fow now. |
+| ISSUE_APPROVAL_NOTIFY | 21 | ISSUE_APPROVAL_NOTIFY is the type for notifying issue approval. |
+| ISSUE_PIPELINE_STAGE_STATUS_UPDATE | 5 | ISSUE_PIPELINE_STAGE_STATUS_UPDATE represents the pipeline stage status change, including BEGIN, END for now. |
+| ISSUE_PIPELINE_TASK_RUN_STATUS_UPDATE | 22 | ISSUE_PIPELINE_TASK_RUN_STATUS_UPDATE represents the pipeline task run status change, including PENDING, RUNNING, DONE, FAILED, CANCELED. |
+<a name="bytebase-v1-Webhook-Type"></a>
-<a name="bytebase-v1-Setting"></a>
+### Webhook.Type
+Webhook integration type.
-### Setting
-The schema of setting.
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| TYPE_UNSPECIFIED | 0 | Unspecified type. |
+| SLACK | 1 | Slack integration. |
+| DISCORD | 2 | Discord integration. |
+| TEAMS | 3 | Microsoft Teams integration. |
+| DINGTALK | 4 | DingTalk integration. |
+| FEISHU | 5 | Feishu integration. |
+| WECOM | 6 | WeCom (WeChat Work) integration. |
+| LARK | 8 | Lark integration. |
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The resource name of the setting. Must be one of the following forms:
-
-- `setting/{setting}` For example, &#34;settings/bb.branding.logo&#34; |
-| value | [Value](#bytebase-v1-Value) | | The configuration value of the setting. |
-
+
+
+<a name="bytebase-v1-ProjectService"></a>
+### ProjectService
+ProjectService manages projects that group databases and changes.
-<a name="bytebase-v1-UpdateSettingRequest"></a>
+| Method Name | Request Type | Response Type | Description |
+| ----------- | ------------ | ------------- | ------------|
+| GetProject | [GetProjectRequest](#bytebase-v1-GetProjectRequest) | [Project](#bytebase-v1-Project) | GetProject retrieves a project by name. Users with &#34;bb.projects.get&#34; permission on the workspace or the project owner can access this method. Permissions required: bb.projects.get |
+| ListProjects | [ListProjectsRequest](#bytebase-v1-ListProjectsRequest) | [ListProjectsResponse](#bytebase-v1-ListProjectsResponse) | Lists all projects in the workspace with optional filtering. Permissions required: bb.projects.list |
+| SearchProjects | [SearchProjectsRequest](#bytebase-v1-SearchProjectsRequest) | [SearchProjectsResponse](#bytebase-v1-SearchProjectsResponse) | Searches for projects with advanced filtering capabilities. Permissions required: bb.projects.get (or project-level bb.projects.get for specific projects) |
+| CreateProject | [CreateProjectRequest](#bytebase-v1-CreateProjectRequest) | [Project](#bytebase-v1-Project) | Creates a new project in the workspace. Permissions required: bb.projects.create |
+| UpdateProject | [UpdateProjectRequest](#bytebase-v1-UpdateProjectRequest) | [Project](#bytebase-v1-Project) | Updates an existing project&#39;s properties. Permissions required: bb.projects.update |
+| DeleteProject | [DeleteProjectRequest](#bytebase-v1-DeleteProjectRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | Deletes (soft-delete or purge) a project. Permissions required: bb.projects.delete |
+| UndeleteProject | [UndeleteProjectRequest](#bytebase-v1-UndeleteProjectRequest) | [Project](#bytebase-v1-Project) | Restores a soft-deleted project. Permissions required: bb.projects.undelete |
+| BatchDeleteProjects | [BatchDeleteProjectsRequest](#bytebase-v1-BatchDeleteProjectsRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | Deletes multiple projects in a single operation. Permissions required: bb.projects.delete |
+| GetIamPolicy | [GetIamPolicyRequest](#bytebase-v1-GetIamPolicyRequest) | [IamPolicy](#bytebase-v1-IamPolicy) | Retrieves the IAM policy for a project. Permissions required: bb.projects.getIamPolicy |
+| BatchGetIamPolicy | [BatchGetIamPolicyRequest](#bytebase-v1-BatchGetIamPolicyRequest) | [BatchGetIamPolicyResponse](#bytebase-v1-BatchGetIamPolicyResponse) | Deprecated. No permission check implemented. Permissions required: None |
+| SetIamPolicy | [SetIamPolicyRequest](#bytebase-v1-SetIamPolicyRequest) | [IamPolicy](#bytebase-v1-IamPolicy) | Sets the IAM policy for a project. Permissions required: bb.projects.setIamPolicy |
+| AddWebhook | [AddWebhookRequest](#bytebase-v1-AddWebhookRequest) | [Project](#bytebase-v1-Project) | Adds a webhook to a project for notifications. Permissions required: bb.projects.update |
+| UpdateWebhook | [UpdateWebhookRequest](#bytebase-v1-UpdateWebhookRequest) | [Project](#bytebase-v1-Project) | Updates an existing webhook configuration. Permissions required: bb.projects.update |
+| RemoveWebhook | [RemoveWebhookRequest](#bytebase-v1-RemoveWebhookRequest) | [Project](#bytebase-v1-Project) | Removes a webhook from a project. Permissions required: bb.projects.update |
+| TestWebhook | [TestWebhookRequest](#bytebase-v1-TestWebhookRequest) | [TestWebhookResponse](#bytebase-v1-TestWebhookResponse) | Tests a webhook by sending a test notification. Permissions required: bb.projects.update |
-### 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) | | |
+<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>
-<a name="bytebase-v1-Value"></a>
+### AISetting
-### Value
-The data in setting value.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| string_value | [string](#string) | | Defines this value as being a string value. |
-| app_im_setting_value | [AppIMSetting](#bytebase-v1-AppIMSetting) | | |
-| workspace_profile_setting_value | [WorkspaceProfileSetting](#bytebase-v1-WorkspaceProfileSetting) | | reserved 4; // was AgentPluginSetting agent_plugin_setting_value |
-| workspace_approval_setting_value | [WorkspaceApprovalSetting](#bytebase-v1-WorkspaceApprovalSetting) | | |
-| schema_template_setting_value | [SchemaTemplateSetting](#bytebase-v1-SchemaTemplateSetting) | | |
-| data_classification_setting_value | [DataClassificationSetting](#bytebase-v1-DataClassificationSetting) | | |
-| semantic_type_setting_value | [SemanticTypeSetting](#bytebase-v1-SemanticTypeSetting) | | |
-| scim_setting | [SCIMSetting](#bytebase-v1-SCIMSetting) | | |
-| password_restriction_setting | [PasswordRestrictionSetting](#bytebase-v1-PasswordRestrictionSetting) | | |
-| ai_setting | [AISetting](#bytebase-v1-AISetting) | | |
-| environment_setting | [EnvironmentSetting](#bytebase-v1-EnvironmentSetting) | | |
+| 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-WorkspaceApprovalSetting"></a>
+<a name="bytebase-v1-Algorithm"></a>
-### WorkspaceApprovalSetting
+### Algorithm
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| rules | [WorkspaceApprovalSetting.Rule](#bytebase-v1-WorkspaceApprovalSetting-Rule) | repeated | |
+| 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-WorkspaceApprovalSetting-Rule"></a>
+<a name="bytebase-v1-Algorithm-FullMask"></a>
-### WorkspaceApprovalSetting.Rule
+### Algorithm.FullMask
| 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
-
-Support variables: source: the risk source, check the Source enum in the Risk message for the values, support &#34;==&#34; operator. level: the risk level, support 100 (low), 200 (moderate) and 300 (high), support &#34;==&#34; operator.
-
-For examples: (source == &#34;DML&#34; &amp;&amp; level == 200) || (source == &#34;DDL&#34; &amp;&amp; level == 300) |
+| 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-WorkspaceProfileSetting"></a>
+<a name="bytebase-v1-Algorithm-InnerOuterMask"></a>
-### WorkspaceProfileSetting
+### Algorithm.InnerOuterMask
| 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_2fa | [bool](#bool) | | Require 2FA for all users. |
-| token_duration | [google.protobuf.Duration](#google-protobuf-Duration) | | The duration for token. |
-| announcement | [Announcement](#bytebase-v1-Announcement) | | The setting of custom announcement |
-| maximum_role_expiration | [google.protobuf.Duration](#google-protobuf-Duration) | | The max duration for role expired. |
-| domains | [string](#string) | repeated | The workspace domain, e.g., bytebase.com. |
-| enforce_identity_domain | [bool](#bool) | | Only user and group from the domains can be created and login. |
-| database_change_mode | [DatabaseChangeMode](#bytebase-v1-DatabaseChangeMode) | | The workspace database change mode. |
-| disallow_password_signin | [bool](#bool) | | Whether to disallow password signin. (Except workspace admins) |
-| enable_metric_collection | [bool](#bool) | | Whether to enable metric collection for the workspace. |
-| inactive_session_timeout | [google.protobuf.Duration](#google-protobuf-Duration) | | The session expiration time if not activity detected for the user. Value &lt;= 0 means no limit. |
-
-
+| prefix_len | [int32](#int32) | | |
+| suffix_len | [int32](#int32) | | |
+| type | [Algorithm.InnerOuterMask.MaskType](#bytebase-v1-Algorithm-InnerOuterMask-MaskType) | | |
+| substitution | [string](#string) | | |
-
-<a name="bytebase-v1-AISetting-Provider"></a>
-### AISetting.Provider
+<a name="bytebase-v1-Algorithm-MD5Mask"></a>
+### Algorithm.MD5Mask
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| PROVIDER_UNSPECIFIED | 0 | |
-| OPEN_AI | 1 | |
-| CLAUDE | 2 | |
-| GEMINI | 3 | |
-| AZURE_OPENAI | 4 | |
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| salt | [string](#string) | | salt is the salt value to generate a different hash that with the word alone. |
-<a name="bytebase-v1-Algorithm-InnerOuterMask-MaskType"></a>
-### Algorithm.InnerOuterMask.MaskType
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| MASK_TYPE_UNSPECIFIED | 0 | |
-| INNER | 1 | |
-| OUTER | 2 | |
+<a name="bytebase-v1-Algorithm-RangeMask"></a>
-<a name="bytebase-v1-Announcement-AlertLevel"></a>
+### Algorithm.RangeMask
-### Announcement.AlertLevel
-We support three levels of AlertLevel: INFO, WARNING, and ERROR.
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| ALERT_LEVEL_UNSPECIFIED | 0 | |
-| INFO | 1 | |
-| WARNING | 2 | |
-| CRITICAL | 3 | |
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| 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-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-Algorithm-RangeMask-Slice"></a>
+### Algorithm.RangeMask.Slice
-<a name="bytebase-v1-Setting-SettingName"></a>
-### Setting.SettingName
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| start | [int32](#int32) | | start is the start index of the original value, start from 0 and should be less than stop. |
+| end | [int32](#int32) | | stop is the stop index of the original value, should be less than the length of the original value. |
+| substitution | [string](#string) | | substitution is the string used to replace the OriginalValue[start:end). |
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| SETTING_NAME_UNSPECIFIED | 0 | |
-| AUTH_SECRET | 1 | |
-| BRANDING_LOGO | 2 | |
-| WORKSPACE_ID | 3 | |
-| WORKSPACE_PROFILE | 4 | |
-| WORKSPACE_APPROVAL | 5 | |
-| WORKSPACE_EXTERNAL_APPROVAL | 6 | |
-| ENTERPRISE_LICENSE | 7 | |
-| APP_IM | 8 | |
-| WATERMARK | 9 | |
-| AI | 10 | |
-| SCHEMA_TEMPLATE | 13 | |
-| DATA_CLASSIFICATION | 14 | |
-| SEMANTIC_TYPES | 15 | |
-| SCIM | 17 | |
-| PASSWORD_RESTRICTION | 18 | |
-| ENVIRONMENT | 19 | |
-
-
-<a name="bytebase-v1-SettingService"></a>
+<a name="bytebase-v1-Announcement"></a>
-### SettingService
-SettingService manages workspace-level settings and configurations.
+### Announcement
-| 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 |
-
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| level | [Announcement.AlertLevel](#bytebase-v1-Announcement-AlertLevel) | | The alert level of announcement |
+| text | [string](#string) | | The text of announcement |
+| link | [string](#string) | | The optional link, user can follow the link to check extra details |
-<a name="v1_user_service-proto"></a>
-<p align="right"><a href="#top">Top</a></p>
-## v1/user_service.proto
-<a name="bytebase-v1-BatchGetUsersRequest"></a>
+<a name="bytebase-v1-AppIMSetting"></a>
-### BatchGetUsersRequest
+### AppIMSetting
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| names | [string](#string) | repeated | The user names to retrieve. Format: users/{user uid or user email} |
+| settings | [AppIMSetting.IMSetting](#bytebase-v1-AppIMSetting-IMSetting) | repeated | |
-<a name="bytebase-v1-BatchGetUsersResponse"></a>
+<a name="bytebase-v1-AppIMSetting-DingTalk"></a>
-### BatchGetUsersResponse
+### AppIMSetting.DingTalk
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| users | [User](#bytebase-v1-User) | repeated | The users from the specified request. |
+| client_id | [string](#string) | | |
+| client_secret | [string](#string) | | |
+| robot_code | [string](#string) | | |
-<a name="bytebase-v1-CreateUserRequest"></a>
+<a name="bytebase-v1-AppIMSetting-Feishu"></a>
-### CreateUserRequest
+### AppIMSetting.Feishu
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| user | [User](#bytebase-v1-User) | | The user to create. |
+| app_id | [string](#string) | | |
+| app_secret | [string](#string) | | |
-<a name="bytebase-v1-DeleteUserRequest"></a>
+<a name="bytebase-v1-AppIMSetting-IMSetting"></a>
-### DeleteUserRequest
+### AppIMSetting.IMSetting
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the user to delete. Format: users/{user} |
+| type | [Webhook.Type](#bytebase-v1-Webhook-Type) | | |
+| 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) | | |
-<a name="bytebase-v1-GetUserRequest"></a>
+<a name="bytebase-v1-AppIMSetting-Lark"></a>
-### GetUserRequest
+### AppIMSetting.Lark
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the user to retrieve. Format: users/{user uid or user email} |
+| app_id | [string](#string) | | |
+| app_secret | [string](#string) | | |
-<a name="bytebase-v1-ListUsersRequest"></a>
+<a name="bytebase-v1-AppIMSetting-Slack"></a>
-### ListUsersRequest
+### AppIMSetting.Slack
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| page_size | [int32](#int32) | | The maximum number of users to return. The service may return fewer than this value. If unspecified, at most 10 users will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. |
-| page_token | [string](#string) | | A page token, received from a previous `ListUsers` call. Provide this to retrieve the subsequent page.
-
-When paginating, all other parameters provided to `ListUsers` must match the call that provided the page token. |
-| show_deleted | [bool](#bool) | | Show deleted users if specified. |
-| filter | [string](#string) | | Filter is used to filter users returned in the list. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
-
-Supported filter: - name: the user name, support &#34;==&#34; and &#34;.matches()&#34; operator. - email: the user email, support &#34;==&#34; and &#34;.matches()&#34; operator. - user_type: the type, check UserType enum for values, support &#34;==&#34;, &#34;in [xx]&#34;, &#34;!(in [xx])&#34; operator. - state: check State enum for values, support &#34;==&#34; operator. - project: the project full name in &#34;projects/{id}&#34; format, support &#34;==&#34; operator.
-
-For example: name == &#34;ed&#34; name.matches(&#34;ed&#34;) email == &#34;[email protected]&#34; email.matches(&#34;ed&#34;) user_type == &#34;SERVICE_ACCOUNT&#34; user_type in [&#34;SERVICE_ACCOUNT&#34;, &#34;USER&#34;] !(user_type in [&#34;SERVICE_ACCOUNT&#34;, &#34;USER&#34;]) state == &#34;DELETED&#34; project == &#34;projects/sample-project&#34; You can combine filter conditions like: name.matches(&#34;ed&#34;) &amp;&amp; project == &#34;projects/sample-project&#34; (name == &#34;ed&#34; || email == &#34;[email protected]&#34;) &amp;&amp; project == &#34;projects/sample-project&#34; |
+| token | [string](#string) | | |
-<a name="bytebase-v1-ListUsersResponse"></a>
+<a name="bytebase-v1-AppIMSetting-Wecom"></a>
-### ListUsersResponse
+### AppIMSetting.Wecom
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| users | [User](#bytebase-v1-User) | repeated | The users from the specified request. |
-| next_page_token | [string](#string) | | A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. |
+| corp_id | [string](#string) | | |
+| agent_id | [string](#string) | | |
+| secret | [string](#string) | | |
-<a name="bytebase-v1-UndeleteUserRequest"></a>
+<a name="bytebase-v1-DataClassificationSetting"></a>
-### UndeleteUserRequest
+### DataClassificationSetting
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the deleted user. Format: users/{user} |
+| configs | [DataClassificationSetting.DataClassificationConfig](#bytebase-v1-DataClassificationSetting-DataClassificationConfig) | repeated | |
-<a name="bytebase-v1-UpdateUserRequest"></a>
+<a name="bytebase-v1-DataClassificationSetting-DataClassificationConfig"></a>
-### UpdateUserRequest
+### DataClassificationSetting.DataClassificationConfig
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| user | [User](#bytebase-v1-User) | | The user to update.
-
-The user&#39;s `name` field is used to identify the user to update. Format: users/{user} |
-| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | The list of fields to update. |
-| otp_code | [string](#string) | optional | The otp_code is used to verify the user&#39;s identity by MFA. |
-| regenerate_temp_mfa_secret | [bool](#bool) | | The regenerate_temp_mfa_secret flag means to regenerate temporary MFA secret for user. This is used for MFA setup. The temporary MFA secret and recovery codes will be returned in the response. |
-| regenerate_recovery_codes | [bool](#bool) | | The regenerate_recovery_codes flag means to regenerate recovery codes for user. |
-| allow_missing | [bool](#bool) | | If set to true, and the user is not found, a new user will be created. In this situation, `update_mask` is ignored. |
+| 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. The order for the level decides its priority. |
+| classification | [DataClassificationSetting.DataClassificationConfig.ClassificationEntry](#bytebase-v1-DataClassificationSetting-DataClassificationConfig-ClassificationEntry) | repeated | classification is the id - DataClassification map. The id should in [0-9]&#43;-[0-9]&#43;-[0-9]&#43; format. |
+| classification_from_config | [bool](#bool) | | If true, we will only store the classification in the config. Otherwise we will get the classification from table/column comment, and write back to the schema metadata. |
-<a name="bytebase-v1-User"></a>
+<a name="bytebase-v1-DataClassificationSetting-DataClassificationConfig-ClassificationEntry"></a>
-### User
+### DataClassificationSetting.DataClassificationConfig.ClassificationEntry
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the user. Format: users/{user}. {user} is a system-generated unique ID. |
-| state | [State](#bytebase-v1-State) | | The lifecycle state of the user account. |
-| email | [string](#string) | | The email address of the user, used for login and notifications. |
-| title | [string](#string) | | The display title or full name of the user. |
-| user_type | [UserType](#bytebase-v1-UserType) | | The type of user account. |
-| password | [string](#string) | | The password for authentication. Only used during user creation or password updates. |
-| service_key | [string](#string) | | The service key for service account authentication. Only used for service accounts. |
-| mfa_enabled | [bool](#bool) | | The mfa_enabled flag means if the user has enabled MFA. |
-| temp_otp_secret | [string](#string) | | Temporary OTP secret used during MFA setup and regeneration. |
-| temp_recovery_codes | [string](#string) | repeated | Temporary recovery codes used during MFA setup and regeneration. |
-| temp_otp_secret_created_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | Timestamp when temp_otp_secret was created. Used by frontend to show countdown timer. |
-| phone | [string](#string) | | Should be a valid E.164 compliant phone number. Could be empty. |
-| profile | [User.Profile](#bytebase-v1-User-Profile) | | User profile metadata. |
-| groups | [string](#string) | repeated | The groups for the user. Format: groups/{email} |
+| key | [string](#string) | | |
+| value | [DataClassificationSetting.DataClassificationConfig.DataClassification](#bytebase-v1-DataClassificationSetting-DataClassificationConfig-DataClassification) | | |
-<a name="bytebase-v1-User-Profile"></a>
+<a name="bytebase-v1-DataClassificationSetting-DataClassificationConfig-DataClassification"></a>
-### User.Profile
+### DataClassificationSetting.DataClassificationConfig.DataClassification
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| last_login_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | The last time the user successfully logged in. |
-| last_change_password_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | The last time the user changed their password. |
-| source | [string](#string) | | source means where the user comes from. For now we support Entra ID SCIM sync, so the source could be Entra ID. |
+| id | [string](#string) | | id is the classification id in [0-9]&#43;-[0-9]&#43;-[0-9]&#43; format. |
+| title | [string](#string) | | |
+| description | [string](#string) | | |
+| level_id | [string](#string) | optional | |
-
+<a name="bytebase-v1-DataClassificationSetting-DataClassificationConfig-Level"></a>
-<a name="bytebase-v1-UserType"></a>
+### DataClassificationSetting.DataClassificationConfig.Level
-### UserType
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| USER_TYPE_UNSPECIFIED | 0 | Unspecified user type. |
-| USER | 1 | Regular human user account. |
-| SYSTEM_BOT | 2 | System-managed bot account for automated operations. |
-| SERVICE_ACCOUNT | 3 | Service account for API integrations. |
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| id | [string](#string) | | |
+| title | [string](#string) | | |
+| description | [string](#string) | | |
-
-
-<a name="bytebase-v1-UserService"></a>
-### UserService
-UserService manages user accounts and authentication.
+<a name="bytebase-v1-EnvironmentSetting"></a>
-| Method Name | Request Type | Response Type | Description |
-| ----------- | ------------ | ------------- | ------------|
-| GetUser | [GetUserRequest](#bytebase-v1-GetUserRequest) | [User](#bytebase-v1-User) | Get the user. Any authenticated user can get the user. Permissions required: bb.users.get |
-| BatchGetUsers | [BatchGetUsersRequest](#bytebase-v1-BatchGetUsersRequest) | [BatchGetUsersResponse](#bytebase-v1-BatchGetUsersResponse) | Get the users in batch. Any authenticated user can batch get users. Permissions required: bb.users.get |
-| GetCurrentUser | [.google.protobuf.Empty](#google-protobuf-Empty) | [User](#bytebase-v1-User) | Get the current authenticated user. Permissions required: None |
-| ListUsers | [ListUsersRequest](#bytebase-v1-ListUsersRequest) | [ListUsersResponse](#bytebase-v1-ListUsersResponse) | List all users. Any authenticated user can list users. Permissions required: bb.users.list |
-| CreateUser | [CreateUserRequest](#bytebase-v1-CreateUserRequest) | [User](#bytebase-v1-User) | Creates a user. When Disallow Signup is enabled, requires bb.users.create permission; otherwise any user can sign up. Permissions required: bb.users.create (only when Disallow Signup is enabled) |
-| UpdateUser | [UpdateUserRequest](#bytebase-v1-UpdateUserRequest) | [User](#bytebase-v1-User) | Updates a user. Users can update their own profile, or users with bb.users.update permission can update any user. Permissions required: bb.users.update (or self) |
-| DeleteUser | [DeleteUserRequest](#bytebase-v1-DeleteUserRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | Deletes a user. Requires bb.users.delete permission with additional validation: the last remaining workspace admin cannot be deleted. Permissions required: bb.users.delete |
-| UndeleteUser | [UndeleteUserRequest](#bytebase-v1-UndeleteUserRequest) | [User](#bytebase-v1-User) | Restores a deleted user. Permissions required: bb.users.undelete |
+### EnvironmentSetting
-
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| environments | [EnvironmentSetting.Environment](#bytebase-v1-EnvironmentSetting-Environment) | repeated | |
-<a name="v1_actuator_service-proto"></a>
-<p align="right"><a href="#top">Top</a></p>
-## v1/actuator_service.proto
-<a name="bytebase-v1-ActuatorInfo"></a>
-### ActuatorInfo
-System information and configuration for the Bytebase instance.
-Actuator concept is similar to the Spring Boot Actuator.
+<a name="bytebase-v1-EnvironmentSetting-Environment"></a>
+
+### EnvironmentSetting.Environment
+
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| version | [string](#string) | | The Bytebase server version. |
-| git_commit | [string](#string) | | The git commit hash of the build. |
-| readonly | [bool](#bool) | | Whether the Bytebase instance is running in read-only mode. |
-| saas | [bool](#bool) | | Whether the Bytebase instance is running in SaaS mode where some features cannot be edited by users. |
-| demo | [bool](#bool) | | Whether the Bytebase instance is running in demo mode. |
-| host | [string](#string) | | The host address of the Bytebase instance. |
-| port | [string](#string) | | The port number of the Bytebase instance. |
-| external_url | [string](#string) | | The external URL where users or webhook callbacks access Bytebase. |
-| need_admin_setup | [bool](#bool) | | Whether the Bytebase instance requires initial admin setup. |
-| disallow_signup | [bool](#bool) | | Whether self-service user signup is disabled. |
-| last_active_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | The last time any API call was made, refreshed on each request. |
-| require_2fa | [bool](#bool) | | Whether two-factor authentication is required for all users. |
-| workspace_id | [string](#string) | | The unique identifier for the workspace. |
-| debug | [bool](#bool) | | Whether debug mode is enabled. |
-| unlicensed_features | [string](#string) | repeated | List of features that are not licensed. |
-| disallow_password_signin | [bool](#bool) | | Whether password-based signin is disabled (except for workspace admins). |
-| password_restriction | [PasswordRestrictionSetting](#bytebase-v1-PasswordRestrictionSetting) | | Password complexity and restriction requirements. |
-| docker | [bool](#bool) | | Whether the Bytebase instance is running in Docker. |
-| user_stats | [ActuatorInfo.StatUser](#bytebase-v1-ActuatorInfo-StatUser) | repeated | Statistics about users in the system. |
-| 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. |
+| name | [string](#string) | | The resource name of the environment. Format: environments/{environment}. Output only. |
+| id | [string](#string) | | The resource id of the environment. This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/. |
+| title | [string](#string) | | The display name of the environment. |
+| tags | [EnvironmentSetting.Environment.TagsEntry](#bytebase-v1-EnvironmentSetting-Environment-TagsEntry) | repeated | |
+| color | [string](#string) | | |
-<a name="bytebase-v1-ActuatorInfo-StatUser"></a>
+<a name="bytebase-v1-EnvironmentSetting-Environment-TagsEntry"></a>
+
+### EnvironmentSetting.Environment.TagsEntry
-### ActuatorInfo.StatUser
-User statistics by type and state.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| user_type | [UserType](#bytebase-v1-UserType) | | The type of user. |
-| state | [State](#bytebase-v1-State) | | The state of the user. |
-| count | [int32](#int32) | | The count of users matching this type and state. |
+| key | [string](#string) | | |
+| value | [string](#string) | | |
-<a name="bytebase-v1-DeleteCacheRequest"></a>
+<a name="bytebase-v1-GetSettingRequest"></a>
-### DeleteCacheRequest
-Request message for deleting cache.
+### 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-GetActuatorInfoRequest"></a>
-### GetActuatorInfoRequest
-Request message for getting actuator information.
+<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="bytebase-v1-GetResourcePackageRequest"></a>
-### GetResourcePackageRequest
-Request message for getting branding resources.
+<a name="bytebase-v1-ListSettingsRequest"></a>
+### ListSettingsRequest
-<a name="bytebase-v1-ResourcePackage"></a>
-### ResourcePackage
-Custom branding resources for the Bytebase instance.
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| logo | [bytes](#bytes) | | The branding logo. |
+<a name="bytebase-v1-ListSettingsResponse"></a>
+### ListSettingsResponse
-<a name="bytebase-v1-SetupSampleRequest"></a>
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| settings | [Setting](#bytebase-v1-Setting) | repeated | The settings from the specified request. |
-### SetupSampleRequest
-Request message for setting up sample data.
+<a name="bytebase-v1-PasswordRestrictionSetting"></a>
-<a name="bytebase-v1-UpdateActuatorInfoRequest"></a>
+### PasswordRestrictionSetting
-### UpdateActuatorInfoRequest
-Request message for updating actuator information.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| actuator | [ActuatorInfo](#bytebase-v1-ActuatorInfo) | | The actuator 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 actuator is not found, a new actuator will be created. In this situation, `update_mask` is ignored. |
-
-
+| 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-SCIMSetting"></a>
-<a name="bytebase-v1-ActuatorService"></a>
+### SCIMSetting
-### 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. Permissions required: None |
-| UpdateActuatorInfo | [UpdateActuatorInfoRequest](#bytebase-v1-UpdateActuatorInfoRequest) | [ActuatorInfo](#bytebase-v1-ActuatorInfo) | Updates system configuration settings for the Bytebase instance. Permissions required: bb.settings.set |
-| SetupSample | [SetupSampleRequest](#bytebase-v1-SetupSampleRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | Sets up sample data for demonstration and testing purposes. Permissions required: bb.projects.create |
-| DeleteCache | [DeleteCacheRequest](#bytebase-v1-DeleteCacheRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | Clears the system cache to force data refresh. Permissions required: None |
-| GetResourcePackage | [GetResourcePackageRequest](#bytebase-v1-GetResourcePackageRequest) | [ResourcePackage](#bytebase-v1-ResourcePackage) | Gets custom branding resources such as logos. Permissions required: None |
-
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| token | [string](#string) | | |
-<a name="v1_iam_policy-proto"></a>
-<p align="right"><a href="#top">Top</a></p>
-## v1/iam_policy.proto
+<a name="bytebase-v1-SchemaTemplateSetting"></a>
-<a name="bytebase-v1-Binding"></a>
+### SchemaTemplateSetting
-### Binding
-Binding associates members with a role and optional conditions.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| role | [string](#string) | | The role that is assigned to the members. Format: roles/{role} |
-| members | [string](#string) | repeated | Specifies the principals requesting access for a Bytebase resource. For users, the member should be: user:{email} For groups, the member should be: group:{email} |
-| 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 &#34;instances/{instance}/databases/{database}&#34; format, used by the &#34;roles/sqlEditorUser&#34; role, support &#34;==&#34; operator. resource.schema_name: the schema name, used by the &#34;roles/sqlEditorUser&#34; role, support &#34;==&#34; operator. resource.table_name: the table name, used by the &#34;roles/sqlEditorUser&#34; role, support &#34;==&#34; operator. request.time: the expiration. Only support &#34;&lt;&#34; operation in `request.time &lt; timestamp(&#34;{ISO datetime string format}&#34;)`.
+| field_templates | [SchemaTemplateSetting.FieldTemplate](#bytebase-v1-SchemaTemplateSetting-FieldTemplate) | repeated | |
+| column_types | [SchemaTemplateSetting.ColumnType](#bytebase-v1-SchemaTemplateSetting-ColumnType) | repeated | |
+| table_templates | [SchemaTemplateSetting.TableTemplate](#bytebase-v1-SchemaTemplateSetting-TableTemplate) | repeated | |
-For example: resource.database == &#34;instances/local-pg/databases/postgres&#34; &amp;&amp; resource.schema_name in [&#34;public&#34;,&#34;another_schema&#34;] resource.database == &#34;instances/local-pg/databases/bytebase&#34; &amp;&amp; resource.schema_name == &#34;public&#34; &amp;&amp; resource.table_name in [&#34;audit_log&#34;] request.time &lt; timestamp(&#34;2025-04-26T11:24:48.655Z&#34;) |
-| parsed_expr | [google.api.expr.v1alpha1.Expr](#google-api-expr-v1alpha1-Expr) | | The parsed expression of the condition. |
+<a name="bytebase-v1-SchemaTemplateSetting-ColumnType"></a>
-<a name="bytebase-v1-BindingDelta"></a>
+### SchemaTemplateSetting.ColumnType
-### BindingDelta
-A single change to a binding.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| action | [BindingDelta.Action](#bytebase-v1-BindingDelta-Action) | | The action that was performed on a Binding. |
-| role | [string](#string) | | Role that is assigned to `members`. For example, `roles/projectOwner`. |
-| member | [string](#string) | | Follows the same format of Binding.members. |
-| condition | [google.type.Expr](#google-type-Expr) | | The condition that is associated with this binding. |
+| engine | [Engine](#bytebase-v1-Engine) | | |
+| enabled | [bool](#bool) | | |
+| types | [string](#string) | repeated | |
-<a name="bytebase-v1-GetIamPolicyRequest"></a>
+<a name="bytebase-v1-SchemaTemplateSetting-FieldTemplate"></a>
+
+### SchemaTemplateSetting.FieldTemplate
-### GetIamPolicyRequest
-Request message for getting an IAM policy.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| resource | [string](#string) | | The name of the resource to get the IAM policy. Format: projects/{project} Format: workspaces/{workspace} |
+| id | [string](#string) | | |
+| engine | [Engine](#bytebase-v1-Engine) | | |
+| category | [string](#string) | | |
+| column | [ColumnMetadata](#bytebase-v1-ColumnMetadata) | | |
+| catalog | [ColumnCatalog](#bytebase-v1-ColumnCatalog) | | |
-<a name="bytebase-v1-IamPolicy"></a>
+<a name="bytebase-v1-SchemaTemplateSetting-TableTemplate"></a>
+
+### SchemaTemplateSetting.TableTemplate
-### 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. |
+| id | [string](#string) | | |
+| engine | [Engine](#bytebase-v1-Engine) | | |
+| category | [string](#string) | | |
+| table | [TableMetadata](#bytebase-v1-TableMetadata) | | |
+| catalog | [TableCatalog](#bytebase-v1-TableCatalog) | | |
-<a name="bytebase-v1-PolicyDelta"></a>
+<a name="bytebase-v1-SemanticTypeSetting"></a>
+
+### SemanticTypeSetting
-### 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. |
+| types | [SemanticTypeSetting.SemanticType](#bytebase-v1-SemanticTypeSetting-SemanticType) | repeated | |
-<a name="bytebase-v1-SetIamPolicyRequest"></a>
+<a name="bytebase-v1-SemanticTypeSetting-SemanticType"></a>
+
+### SemanticTypeSetting.SemanticType
-### SetIamPolicyRequest
-Request message for setting an IAM policy.
| 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. |
-
-
-
-
+| 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-Action"></a>
-### BindingDelta.Action
-Type of action performed on a binding.
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| ACTION_UNSPECIFIED | 0 | Unspecified action. |
-| ADD | 1 | Add a binding. |
-| REMOVE | 2 | Remove a binding. |
+<a name="bytebase-v1-Setting"></a>
-
+### Setting
+The schema of setting.
-
-
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| name | [string](#string) | | The resource name of the setting. Must be one of the following forms:
+- `setting/{setting}` For example, &#34;settings/bb.branding.logo&#34; |
+| value | [Value](#bytebase-v1-Value) | | The configuration value of the setting. |
-<a name="v1_audit_log_service-proto"></a>
-<p align="right"><a href="#top">Top</a></p>
-## v1/audit_log_service.proto
-<a name="bytebase-v1-AuditData"></a>
+<a name="bytebase-v1-UpdateSettingRequest"></a>
-### AuditData
-Additional audit data specific to certain operations.
+### UpdateSettingRequest
+The request message for updating or creating a setting.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| policy_delta | [PolicyDelta](#bytebase-v1-PolicyDelta) | | Changes to IAM policies. |
+| 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-AuditLog"></a>
+<a name="bytebase-v1-Value"></a>
-### AuditLog
-Audit log entry recording system activity or API call.
+### Value
+The data in setting value.
| 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. |
+| string_value | [string](#string) | | Defines this value as being a string value. |
+| app_im_setting_value | [AppIMSetting](#bytebase-v1-AppIMSetting) | | |
+| workspace_profile_setting_value | [WorkspaceProfileSetting](#bytebase-v1-WorkspaceProfileSetting) | | reserved 4; // was AgentPluginSetting agent_plugin_setting_value |
+| workspace_approval_setting_value | [WorkspaceApprovalSetting](#bytebase-v1-WorkspaceApprovalSetting) | | |
+| schema_template_setting_value | [SchemaTemplateSetting](#bytebase-v1-SchemaTemplateSetting) | | |
+| data_classification_setting_value | [DataClassificationSetting](#bytebase-v1-DataClassificationSetting) | | |
+| semantic_type_setting_value | [SemanticTypeSetting](#bytebase-v1-SemanticTypeSetting) | | |
+| scim_setting | [SCIMSetting](#bytebase-v1-SCIMSetting) | | |
+| password_restriction_setting | [PasswordRestrictionSetting](#bytebase-v1-PasswordRestrictionSetting) | | |
+| ai_setting | [AISetting](#bytebase-v1-AISetting) | | |
+| environment_setting | [EnvironmentSetting](#bytebase-v1-EnvironmentSetting) | | |
-<a name="bytebase-v1-ExportAuditLogsRequest"></a>
+<a name="bytebase-v1-WorkspaceApprovalSetting"></a>
+
+### WorkspaceApprovalSetting
-### 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. For example: - order_by = &#34;create_time asc&#34; - order_by = &#34;create_time desc&#34; |
-| 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. |
+| rules | [WorkspaceApprovalSetting.Rule](#bytebase-v1-WorkspaceApprovalSetting-Rule) | repeated | |
-<a name="bytebase-v1-ExportAuditLogsResponse"></a>
+<a name="bytebase-v1-WorkspaceApprovalSetting-Rule"></a>
+
+### WorkspaceApprovalSetting.Rule
-### ExportAuditLogsResponse
-Response message for exporting audit logs.
| 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. |
+| 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
+Support variables: source: the risk source, check the Source enum in the Risk message for the values, support &#34;==&#34; operator. level: the risk level, support 100 (low), 200 (moderate) and 300 (high), support &#34;==&#34; operator.
+For examples: (source == &#34;DML&#34; &amp;&amp; level == 200) || (source == &#34;DDL&#34; &amp;&amp; level == 300) |
-<a name="bytebase-v1-RequestMetadata"></a>
-### RequestMetadata
-Metadata about the incoming request.
+
+<a name="bytebase-v1-WorkspaceProfileSetting"></a>
+
+### WorkspaceProfileSetting
+
| 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. |
+| 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_2fa | [bool](#bool) | | Require 2FA for all users. |
+| token_duration | [google.protobuf.Duration](#google-protobuf-Duration) | | The duration for token. |
+| announcement | [Announcement](#bytebase-v1-Announcement) | | The setting of custom announcement |
+| maximum_role_expiration | [google.protobuf.Duration](#google-protobuf-Duration) | | The max duration for role expired. |
+| domains | [string](#string) | repeated | The workspace domain, e.g., bytebase.com. |
+| enforce_identity_domain | [bool](#bool) | | Only user and group from the domains can be created and login. |
+| database_change_mode | [DatabaseChangeMode](#bytebase-v1-DatabaseChangeMode) | | The workspace database change mode. |
+| disallow_password_signin | [bool](#bool) | | Whether to disallow password signin. (Except workspace admins) |
+| enable_metric_collection | [bool](#bool) | | Whether to enable metric collection for the workspace. |
+| inactive_session_timeout | [google.protobuf.Duration](#google-protobuf-Duration) | | The session expiration time if not activity detected for the user. Value &lt;= 0 means no limit. |
+
-<a name="bytebase-v1-SearchAuditLogsRequest"></a>
-### SearchAuditLogsRequest
-Request message for searching audit logs.
+<a name="bytebase-v1-AISetting-Provider"></a>
+### AISetting.Provider
-| 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 &#34;/bytebase.v1.&#34; prefix. For example &#34;/bytebase.v1.UserService/CreateUser&#34;. Support &#34;==&#34; operator. - severity: support &#34;==&#34; operator, check Severity enum in AuditLog message for values. - user: the actor, should in &#34;users/{email}&#34; format, support &#34;==&#34; operator. - create_time: support &#34;&gt;=&#34; and &#34;&lt;=&#34; operator.
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| PROVIDER_UNSPECIFIED | 0 | |
+| OPEN_AI | 1 | |
+| CLAUDE | 2 | |
+| GEMINI | 3 | |
+| AZURE_OPENAI | 4 | |
-For example: - filter = &#34;method == &#39;/bytebase.v1.SQLService/Query&#39;&#34; - filter = &#34;method == &#39;/bytebase.v1.SQLService/Query&#39; &amp;&amp; severity == &#39;ERROR&#39;&#34; - filter = &#34;method == &#39;/bytebase.v1.SQLService/Query&#39; &amp;&amp; severity == &#39;ERROR&#39; &amp;&amp; user == &#39;users/[email protected]&#39;&#34; - filter = &#34;method == &#39;/bytebase.v1.SQLService/Query&#39; &amp;&amp; severity == &#39;ERROR&#39; &amp;&amp; create_time &lt;= &#39;2021-01-01T00:00:00Z&#39; &amp;&amp; create_time &gt;= &#39;2020-01-01T00:00:00Z&#39;&#34; |
-| order_by | [string](#string) | | The order by of the log. Only support order by create_time. For example: - order_by = &#34;create_time asc&#34; - order_by = &#34;create_time desc&#34; |
-| 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-Algorithm-InnerOuterMask-MaskType"></a>
+### Algorithm.InnerOuterMask.MaskType
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| MASK_TYPE_UNSPECIFIED | 0 | |
+| INNER | 1 | |
+| OUTER | 2 | |
-<a name="bytebase-v1-SearchAuditLogsResponse"></a>
-### SearchAuditLogsResponse
-Response message for searching audit logs.
+<a name="bytebase-v1-Announcement-AlertLevel"></a>
-| 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. |
+### Announcement.AlertLevel
+We support three levels of AlertLevel: INFO, WARNING, and ERROR.
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| ALERT_LEVEL_UNSPECIFIED | 0 | |
+| INFO | 1 | |
+| WARNING | 2 | |
+| CRITICAL | 3 | |
+<a name="bytebase-v1-DatabaseChangeMode"></a>
-
+### DatabaseChangeMode
-<a name="bytebase-v1-AuditLog-Severity"></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. |
+
+
+
+<a name="bytebase-v1-Setting-SettingName"></a>
+
+### Setting.SettingName
-### 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. |
+| SETTING_NAME_UNSPECIFIED | 0 | |
+| AUTH_SECRET | 1 | |
+| BRANDING_LOGO | 2 | |
+| WORKSPACE_ID | 3 | |
+| WORKSPACE_PROFILE | 4 | |
+| WORKSPACE_APPROVAL | 5 | |
+| WORKSPACE_EXTERNAL_APPROVAL | 6 | |
+| ENTERPRISE_LICENSE | 7 | |
+| APP_IM | 8 | |
+| WATERMARK | 9 | |
+| AI | 10 | |
+| SCHEMA_TEMPLATE | 13 | |
+| DATA_CLASSIFICATION | 14 | |
+| SEMANTIC_TYPES | 15 | |
+| SCIM | 17 | |
+| PASSWORD_RESTRICTION | 18 | |
+| ENVIRONMENT | 19 | |
@@ -5589,199 +5517,219 @@ 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 |
-<a name="v1_auth_service-proto"></a>
+<a name="v1_user_service-proto"></a>
<p align="right"><a href="#top">Top</a></p>
-## v1/auth_service.proto
+## v1/user_service.proto
-<a name="bytebase-v1-IdentityProviderContext"></a>
+<a name="bytebase-v1-BatchGetUsersRequest"></a>
+
+### BatchGetUsersRequest
-### IdentityProviderContext
-Context for identity provider authentication.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| oauth2_context | [OAuth2IdentityProviderContext](#bytebase-v1-OAuth2IdentityProviderContext) | | OAuth2 authentication context. |
-| oidc_context | [OIDCIdentityProviderContext](#bytebase-v1-OIDCIdentityProviderContext) | | OpenID Connect authentication context. |
+| names | [string](#string) | repeated | The user names to retrieve. Format: users/{user uid or user email} |
-<a name="bytebase-v1-LoginRequest"></a>
+<a name="bytebase-v1-BatchGetUsersResponse"></a>
-### LoginRequest
+### BatchGetUsersResponse
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| email | [string](#string) | | User&#39;s email address. |
-| password | [string](#string) | | User&#39;s password for authentication. |
-| web | [bool](#bool) | | If web is set, we will set access token, refresh token, and user to the cookie. |
-| idp_name | [string](#string) | | The name of the identity provider. Format: idps/{idp} |
-| idp_context | [IdentityProviderContext](#bytebase-v1-IdentityProviderContext) | | The idp_context is using to get the user information from identity provider. |
-| otp_code | [string](#string) | optional | The otp_code is used to verify the user&#39;s identity by MFA. |
-| recovery_code | [string](#string) | optional | The recovery_code is used to recovery the user&#39;s identity with MFA. |
-| mfa_temp_token | [string](#string) | optional | The mfa_temp_token is used to verify the user&#39;s identity by MFA. |
+| users | [User](#bytebase-v1-User) | repeated | The users from the specified request. |
-<a name="bytebase-v1-LoginResponse"></a>
+<a name="bytebase-v1-CreateUserRequest"></a>
-### LoginResponse
+### CreateUserRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| token | [string](#string) | | Access token for authenticated requests. |
-| mfa_temp_token | [string](#string) | optional | Temporary token for MFA verification. |
-| require_reset_password | [bool](#bool) | | Whether user must reset password before continuing. |
-| user | [User](#bytebase-v1-User) | | The user from the successful login. |
+| user | [User](#bytebase-v1-User) | | The user to create. |
-<a name="bytebase-v1-LogoutRequest"></a>
+<a name="bytebase-v1-DeleteUserRequest"></a>
-### LogoutRequest
-Request to logout current user session.
+### DeleteUserRequest
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| name | [string](#string) | | The name of the user to delete. Format: users/{user} |
-<a name="bytebase-v1-OAuth2IdentityProviderContext"></a>
-### OAuth2IdentityProviderContext
-OAuth2 authentication context.
+
+
+<a name="bytebase-v1-GetUserRequest"></a>
+
+### GetUserRequest
+
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| code | [string](#string) | | Authorization code from OAuth2 provider. |
+| name | [string](#string) | | The name of the user to retrieve. Format: users/{user uid or user email} |
-<a name="bytebase-v1-OIDCIdentityProviderContext"></a>
+<a name="bytebase-v1-ListUsersRequest"></a>
-### OIDCIdentityProviderContext
-OpenID Connect authentication context.
+### ListUsersRequest
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| page_size | [int32](#int32) | | The maximum number of users to return. The service may return fewer than this value. If unspecified, at most 10 users will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. |
+| page_token | [string](#string) | | A page token, received from a previous `ListUsers` call. Provide this to retrieve the subsequent page.
+When paginating, all other parameters provided to `ListUsers` must match the call that provided the page token. |
+| show_deleted | [bool](#bool) | | Show deleted users if specified. |
+| filter | [string](#string) | | Filter is used to filter users returned in the list. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
-
+Supported filter: - name: the user name, support &#34;==&#34; and &#34;.matches()&#34; operator. - email: the user email, support &#34;==&#34; and &#34;.matches()&#34; operator. - user_type: the type, check UserType enum for values, support &#34;==&#34;, &#34;in [xx]&#34;, &#34;!(in [xx])&#34; operator. - state: check State enum for values, support &#34;==&#34; operator. - project: the project full name in &#34;projects/{id}&#34; format, support &#34;==&#34; operator.
-
+For example: name == &#34;ed&#34; name.matches(&#34;ed&#34;) email == &#34;[email protected]&#34; email.matches(&#34;ed&#34;) user_type == &#34;SERVICE_ACCOUNT&#34; user_type in [&#34;SERVICE_ACCOUNT&#34;, &#34;USER&#34;] !(user_type in [&#34;SERVICE_ACCOUNT&#34;, &#34;USER&#34;]) state == &#34;DELETED&#34; project == &#34;projects/sample-project&#34; You can combine filter conditions like: name.matches(&#34;ed&#34;) &amp;&amp; project == &#34;projects/sample-project&#34; (name == &#34;ed&#34; || email == &#34;[email protected]&#34;) &amp;&amp; project == &#34;projects/sample-project&#34; |
-
-<a name="bytebase-v1-AuthService"></a>
-### AuthService
-AuthService handles user authentication operations.
-| Method Name | Request Type | Response Type | Description |
-| ----------- | ------------ | ------------- | ------------|
-| Login | [LoginRequest](#bytebase-v1-LoginRequest) | [LoginResponse](#bytebase-v1-LoginResponse) | Authenticates a user and returns access tokens. Permissions required: None |
-| Logout | [LogoutRequest](#bytebase-v1-LogoutRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | Logs out the current user session. Permissions required: None |
-
+<a name="bytebase-v1-ListUsersResponse"></a>
+### ListUsersResponse
-<a name="v1_cel_service-proto"></a>
-<p align="right"><a href="#top">Top</a></p>
-## v1/cel_service.proto
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| users | [User](#bytebase-v1-User) | repeated | The users from the specified request. |
+| next_page_token | [string](#string) | | A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. |
-<a name="bytebase-v1-BatchDeparseRequest"></a>
-### BatchDeparseRequest
-Request message for batch deparsing CEL expressions.
+
+
+<a name="bytebase-v1-UndeleteUserRequest"></a>
+
+### UndeleteUserRequest
+
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| expressions | [google.api.expr.v1alpha1.Expr](#google-api-expr-v1alpha1-Expr) | repeated | The CEL expression ASTs to deparse. |
+| name | [string](#string) | | The name of the deleted user. Format: users/{user} |
-<a name="bytebase-v1-BatchDeparseResponse"></a>
+<a name="bytebase-v1-UpdateUserRequest"></a>
+
+### UpdateUserRequest
-### BatchDeparseResponse
-Response message for batch deparsing CEL expressions.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| expressions | [string](#string) | repeated | The deparsed CEL expressions as strings. |
+| user | [User](#bytebase-v1-User) | | The user to update.
+
+The user&#39;s `name` field is used to identify the user to update. Format: users/{user} |
+| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | The list of fields to update. |
+| otp_code | [string](#string) | optional | The otp_code is used to verify the user&#39;s identity by MFA. |
+| regenerate_temp_mfa_secret | [bool](#bool) | | The regenerate_temp_mfa_secret flag means to regenerate temporary MFA secret for user. This is used for MFA setup. The temporary MFA secret and recovery codes will be returned in the response. |
+| regenerate_recovery_codes | [bool](#bool) | | The regenerate_recovery_codes flag means to regenerate recovery codes for user. |
+| allow_missing | [bool](#bool) | | If set to true, and the user is not found, a new user will be created. In this situation, `update_mask` is ignored. |
-<a name="bytebase-v1-BatchParseRequest"></a>
+<a name="bytebase-v1-User"></a>
+
+### User
-### BatchParseRequest
-Request message for batch parsing CEL expressions.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| expressions | [string](#string) | repeated | The CEL expression strings to parse. |
+| name | [string](#string) | | The name of the user. Format: users/{user}. {user} is a system-generated unique ID. |
+| state | [State](#bytebase-v1-State) | | The lifecycle state of the user account. |
+| email | [string](#string) | | The email address of the user, used for login and notifications. |
+| title | [string](#string) | | The display title or full name of the user. |
+| user_type | [UserType](#bytebase-v1-UserType) | | The type of user account. |
+| password | [string](#string) | | The password for authentication. Only used during user creation or password updates. |
+| service_key | [string](#string) | | The service key for service account authentication. Only used for service accounts. |
+| mfa_enabled | [bool](#bool) | | The mfa_enabled flag means if the user has enabled MFA. |
+| temp_otp_secret | [string](#string) | | Temporary OTP secret used during MFA setup and regeneration. |
+| temp_recovery_codes | [string](#string) | repeated | Temporary recovery codes used during MFA setup and regeneration. |
+| temp_otp_secret_created_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | Timestamp when temp_otp_secret was created. Used by frontend to show countdown timer. |
+| phone | [string](#string) | | Should be a valid E.164 compliant phone number. Could be empty. |
+| profile | [User.Profile](#bytebase-v1-User-Profile) | | User profile metadata. |
+| groups | [string](#string) | repeated | The groups for the user. Format: groups/{email} |
-<a name="bytebase-v1-BatchParseResponse"></a>
+<a name="bytebase-v1-User-Profile"></a>
+
+### User.Profile
-### BatchParseResponse
-Response message for batch parsing CEL expressions.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| expressions | [google.api.expr.v1alpha1.Expr](#google-api-expr-v1alpha1-Expr) | repeated | The parsed CEL expressions as AST. |
+| last_login_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | The last time the user successfully logged in. |
+| last_change_password_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | The last time the user changed their password. |
+| source | [string](#string) | | source means where the user comes from. For now we support Entra ID SCIM sync, so the source could be Entra ID. |
@@ -5789,159 +5737,172 @@ Response message for batch parsing CEL expressions.
+
+<a name="bytebase-v1-UserType"></a>
+
+### UserType
+
+
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| USER_TYPE_UNSPECIFIED | 0 | Unspecified user type. |
+| USER | 1 | Regular human user account. |
+| SYSTEM_BOT | 2 | System-managed bot account for automated operations. |
+| SERVICE_ACCOUNT | 3 | Service account for API integrations. |
+
+
-<a name="bytebase-v1-CelService"></a>
+<a name="bytebase-v1-UserService"></a>
-### CelService
-CelService manages CEL (Common Expression Language) parsing and formatting operations.
+### UserService
+UserService manages user accounts and authentication.
| Method Name | Request Type | Response Type | Description |
| ----------- | ------------ | ------------- | ------------|
-| BatchParse | [BatchParseRequest](#bytebase-v1-BatchParseRequest) | [BatchParseResponse](#bytebase-v1-BatchParseResponse) | Parses multiple CEL expression strings into AST representations. Permissions required: None |
-| BatchDeparse | [BatchDeparseRequest](#bytebase-v1-BatchDeparseRequest) | [BatchDeparseResponse](#bytebase-v1-BatchDeparseResponse) | Converts multiple CEL AST representations back into expression strings. Permissions required: None |
+| GetUser | [GetUserRequest](#bytebase-v1-GetUserRequest) | [User](#bytebase-v1-User) | Get the user. Any authenticated user can get the user. Permissions required: bb.users.get |
+| BatchGetUsers | [BatchGetUsersRequest](#bytebase-v1-BatchGetUsersRequest) | [BatchGetUsersResponse](#bytebase-v1-BatchGetUsersResponse) | Get the users in batch. Any authenticated user can batch get users. Permissions required: bb.users.get |
+| GetCurrentUser | [.google.protobuf.Empty](#google-protobuf-Empty) | [User](#bytebase-v1-User) | Get the current authenticated user. Permissions required: None |
+| ListUsers | [ListUsersRequest](#bytebase-v1-ListUsersRequest) | [ListUsersResponse](#bytebase-v1-ListUsersResponse) | List all users. Any authenticated user can list users. Permissions required: bb.users.list |
+| CreateUser | [CreateUserRequest](#bytebase-v1-CreateUserRequest) | [User](#bytebase-v1-User) | Creates a user. When Disallow Signup is enabled, requires bb.users.create permission; otherwise any user can sign up. Permissions required: bb.users.create (only when Disallow Signup is enabled) |
+| UpdateUser | [UpdateUserRequest](#bytebase-v1-UpdateUserRequest) | [User](#bytebase-v1-User) | Updates a user. Users can update their own profile, or users with bb.users.update permission can update any user. Permissions required: bb.users.update (or self) |
+| DeleteUser | [DeleteUserRequest](#bytebase-v1-DeleteUserRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | Deletes a user. Requires bb.users.delete permission with additional validation: the last remaining workspace admin cannot be deleted. Permissions required: bb.users.delete |
+| UndeleteUser | [UndeleteUserRequest](#bytebase-v1-UndeleteUserRequest) | [User](#bytebase-v1-User) | Restores a deleted user. Permissions required: bb.users.undelete |
-<a name="v1_changelist_service-proto"></a>
+<a name="v1_actuator_service-proto"></a>
<p align="right"><a href="#top">Top</a></p>
-## v1/changelist_service.proto
+## v1/actuator_service.proto
-<a name="bytebase-v1-Changelist"></a>
+<a name="bytebase-v1-ActuatorInfo"></a>
-### Changelist
-A changelist groups multiple database changes together.
+### ActuatorInfo
+System information and configuration for the Bytebase instance.
+Actuator concept is similar to the Spring Boot Actuator.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the changelist resource. Canonical parent is project. Format: projects/{project}/changelists/{changelist} |
-| description | [string](#string) | | The description of the changelist. |
-| creator | [string](#string) | | The creator of the changelist. Format: users/{email} |
-| update_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | The last time the changelist was updated. |
-| changes | [Changelist.Change](#bytebase-v1-Changelist-Change) | repeated | The list of changes in this changelist. |
+| version | [string](#string) | | The Bytebase server version. |
+| git_commit | [string](#string) | | The git commit hash of the build. |
+| readonly | [bool](#bool) | | Whether the Bytebase instance is running in read-only mode. |
+| saas | [bool](#bool) | | Whether the Bytebase instance is running in SaaS mode where some features cannot be edited by users. |
+| demo | [bool](#bool) | | Whether the Bytebase instance is running in demo mode. |
+| host | [string](#string) | | The host address of the Bytebase instance. |
+| port | [string](#string) | | The port number of the Bytebase instance. |
+| external_url | [string](#string) | | The external URL where users or webhook callbacks access Bytebase. |
+| need_admin_setup | [bool](#bool) | | Whether the Bytebase instance requires initial admin setup. |
+| disallow_signup | [bool](#bool) | | Whether self-service user signup is disabled. |
+| last_active_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | The last time any API call was made, refreshed on each request. |
+| require_2fa | [bool](#bool) | | Whether two-factor authentication is required for all users. |
+| workspace_id | [string](#string) | | The unique identifier for the workspace. |
+| debug | [bool](#bool) | | Whether debug mode is enabled. |
+| unlicensed_features | [string](#string) | repeated | List of features that are not licensed. |
+| disallow_password_signin | [bool](#bool) | | Whether password-based signin is disabled (except for workspace admins). |
+| password_restriction | [PasswordRestrictionSetting](#bytebase-v1-PasswordRestrictionSetting) | | Password complexity and restriction requirements. |
+| docker | [bool](#bool) | | Whether the Bytebase instance is running in Docker. |
+| user_stats | [ActuatorInfo.StatUser](#bytebase-v1-ActuatorInfo-StatUser) | repeated | Statistics about users in the system. |
+| 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. |
-<a name="bytebase-v1-Changelist-Change"></a>
+<a name="bytebase-v1-ActuatorInfo-StatUser"></a>
-### Changelist.Change
-A single change in a changelist.
+### ActuatorInfo.StatUser
+User statistics by type and state.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| sheet | [string](#string) | | The sheet containing the SQL statement. Format: projects/{project}/sheets/{sheet} |
-| source | [string](#string) | | The source of this change. Format: instances/{instance}/databases/{database}/changelogs/{changelog} If empty, the change is from raw SQL. |
+| user_type | [UserType](#bytebase-v1-UserType) | | The type of user. |
+| state | [State](#bytebase-v1-State) | | The state of the user. |
+| count | [int32](#int32) | | The count of users matching this type and state. |
-<a name="bytebase-v1-CreateChangelistRequest"></a>
+<a name="bytebase-v1-DeleteCacheRequest"></a>
-### CreateChangelistRequest
-Request message for creating a changelist.
+### DeleteCacheRequest
+Request message for deleting cache.
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| parent | [string](#string) | | The parent resource where this changelist will be created. Format: projects/{project} |
-| changelist | [Changelist](#bytebase-v1-Changelist) | | The changelist to create. |
-| changelist_id | [string](#string) | | The ID to use for the changelist, which will become the final component of the changelist&#39;s resource name.
-This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/. |
+<a name="bytebase-v1-GetActuatorInfoRequest"></a>
+### GetActuatorInfoRequest
+Request message for getting actuator information.
-<a name="bytebase-v1-DeleteChangelistRequest"></a>
-### DeleteChangelistRequest
-Request message for deleting a changelist.
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the changelist to delete. Format: projects/{project}/changelists/{changelist} |
+
+<a name="bytebase-v1-GetResourcePackageRequest"></a>
+
+### GetResourcePackageRequest
+Request message for getting branding resources.
-<a name="bytebase-v1-GetChangelistRequest"></a>
+<a name="bytebase-v1-ResourcePackage"></a>
-### GetChangelistRequest
-Request message for getting a changelist.
+### ResourcePackage
+Custom branding resources for the Bytebase instance.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the changelist to retrieve. Format: projects/{project}/changelists/{changelist} |
+| logo | [bytes](#bytes) | | The branding logo. |
-<a name="bytebase-v1-ListChangelistsRequest"></a>
+<a name="bytebase-v1-SetupSampleRequest"></a>
-### ListChangelistsRequest
-Request message for listing changelists.
+### SetupSampleRequest
+Request message for setting up sample data.
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| parent | [string](#string) | | The parent, which owns this collection of changelists. Format: projects/{project} |
+<a name="bytebase-v1-UpdateActuatorInfoRequest"></a>
-
-<a name="bytebase-v1-ListChangelistsResponse"></a>
-
-### ListChangelistsResponse
-Response message for listing changelists.
-
-
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| changelists | [Changelist](#bytebase-v1-Changelist) | repeated | The changelists from the specified request. |
-
-
-
-
-
-
-<a name="bytebase-v1-UpdateChangelistRequest"></a>
-
-### UpdateChangelistRequest
-Request message for updating a changelist.
+### UpdateActuatorInfoRequest
+Request message for updating actuator information.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| changelist | [Changelist](#bytebase-v1-Changelist) | | The changelist to update.
-
-The changelist&#39;s `name` field is used to identify the changelist to update. Format: projects/{project}/changelists/{changelist} |
-| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | The list of fields to be updated. |
-| allow_missing | [bool](#bool) | | If set to true, and the changelist is not found, a new changelist will be created. In this situation, `update_mask` is ignored. |
+| actuator | [ActuatorInfo](#bytebase-v1-ActuatorInfo) | | The actuator 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 actuator is not found, a new actuator will be created. In this situation, `update_mask` is ignored. |
@@ -5954,162 +5915,156 @@ The changelist&#39;s `name` field is used to identify the changelist to update.
-<a name="bytebase-v1-ChangelistService"></a>
+<a name="bytebase-v1-ActuatorService"></a>
-### ChangelistService
-ChangelistService manages changelists for grouping and organizing database changes.
+### ActuatorService
+ActuatorService manages system health and operational information.
| Method Name | Request Type | Response Type | Description |
| ----------- | ------------ | ------------- | ------------|
-| CreateChangelist | [CreateChangelistRequest](#bytebase-v1-CreateChangelistRequest) | [Changelist](#bytebase-v1-Changelist) | Creates a new changelist in a project. Permissions required: bb.changelists.create |
-| GetChangelist | [GetChangelistRequest](#bytebase-v1-GetChangelistRequest) | [Changelist](#bytebase-v1-Changelist) | Gets a changelist by name. Permissions required: bb.changelists.get |
-| ListChangelists | [ListChangelistsRequest](#bytebase-v1-ListChangelistsRequest) | [ListChangelistsResponse](#bytebase-v1-ListChangelistsResponse) | Lists changelists in a project. Permissions required: bb.changelists.list |
-| UpdateChangelist | [UpdateChangelistRequest](#bytebase-v1-UpdateChangelistRequest) | [Changelist](#bytebase-v1-Changelist) | Updates a changelist. Permissions required: bb.changelists.update When allow_missing=true, also requires: bb.changelists.create |
-| DeleteChangelist | [DeleteChangelistRequest](#bytebase-v1-DeleteChangelistRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | Deletes a changelist. Permissions required: bb.changelists.delete |
+| GetActuatorInfo | [GetActuatorInfoRequest](#bytebase-v1-GetActuatorInfoRequest) | [ActuatorInfo](#bytebase-v1-ActuatorInfo) | Gets system information and health status of the Bytebase instance. Permissions required: None |
+| UpdateActuatorInfo | [UpdateActuatorInfoRequest](#bytebase-v1-UpdateActuatorInfoRequest) | [ActuatorInfo](#bytebase-v1-ActuatorInfo) | Updates system configuration settings for the Bytebase instance. Permissions required: bb.settings.set |
+| SetupSample | [SetupSampleRequest](#bytebase-v1-SetupSampleRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | Sets up sample data for demonstration and testing purposes. Permissions required: bb.projects.create |
+| DeleteCache | [DeleteCacheRequest](#bytebase-v1-DeleteCacheRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | Clears the system cache to force data refresh. Permissions required: None |
+| GetResourcePackage | [GetResourcePackageRequest](#bytebase-v1-GetResourcePackageRequest) | [ResourcePackage](#bytebase-v1-ResourcePackage) | Gets custom branding resources such as logos. Permissions required: None |
-<a name="v1_database_group_service-proto"></a>
+<a name="v1_audit_log_service-proto"></a>
<p align="right"><a href="#top">Top</a></p>
-## v1/database_group_service.proto
+## v1/audit_log_service.proto
-<a name="bytebase-v1-CreateDatabaseGroupRequest"></a>
+<a name="bytebase-v1-AuditData"></a>
-### CreateDatabaseGroupRequest
-Request message for creating a database group.
+### AuditData
+Additional audit data specific to certain operations.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| parent | [string](#string) | | The parent resource where this database group will be created. Format: projects/{project} |
-| database_group | [DatabaseGroup](#bytebase-v1-DatabaseGroup) | | The database group to create. |
-| database_group_id | [string](#string) | | The ID to use for the database group, which will become the final component of the database group&#39;s resource name.
-
-This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/. |
-| validate_only | [bool](#bool) | | If set, validate the create request and preview the full database group response, but do not actually create it. |
+| policy_delta | [PolicyDelta](#bytebase-v1-PolicyDelta) | | Changes to IAM policies. |
-<a name="bytebase-v1-DatabaseGroup"></a>
+<a name="bytebase-v1-AuditLog"></a>
-### DatabaseGroup
-A group of databases matched by expressions.
+### AuditLog
+Audit log entry recording system activity or API call.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the database group. Format: projects/{project}/databaseGroups/{databaseGroup} |
-| title | [string](#string) | | The short name used in actual databases specified by users. |
-| database_expr | [google.type.Expr](#google-type-Expr) | | The condition that is associated with this database group. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
-
-Support variables: resource.environment_id: the environment resource id. Support &#34;==&#34;, &#34;!=&#34;, &#34;in [XX]&#34;, &#34;!(in [xx])&#34; operations. resource.instance_id: the instance resource id. Support &#34;==&#34;, &#34;!=&#34;, &#34;in [XX]&#34;, &#34;!(in [xx])&#34;, &#34;contains&#34;, &#34;matches&#34;, &#34;startsWith&#34;, &#34;endsWith&#34; operations. resource.database_name: the database name. Support &#34;==&#34;, &#34;!=&#34;, &#34;in [XX]&#34;, &#34;!(in [xx])&#34;, &#34;contains&#34;, &#34;matches&#34;, &#34;startsWith&#34;, &#34;endsWith&#34; operations. resource.database_labels: the database labels. Support map access operations. All variables should join with &#34;&amp;&amp;&#34; condition.
-
-For example: resource.environment_id == &#34;test&#34; &amp;&amp; resource.database_name.startsWith(&#34;sample_&#34;) resource.database_labels[&#34;tenant&#34;] == &#34;tenant1&#34; |
-| matched_databases | [DatabaseGroup.Database](#bytebase-v1-DatabaseGroup-Database) | repeated | The list of databases that match the database group condition. |
+| name | [string](#string) | | The name of the log. Formats: - projects/{project}/auditLogs/{uid} - workspaces/{workspace}/auditLogs/{uid} |
+| create_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | The timestamp when the audit log was created. |
+| user | [string](#string) | | The user who performed the action. Format: users/{email} |
+| method | [string](#string) | | The method or action being audited. For example: /bytebase.v1.SQLService/Query or bb.project.repository.push |
+| severity | [AuditLog.Severity](#bytebase-v1-AuditLog-Severity) | | The severity level of this audit log entry. |
+| resource | [string](#string) | | The resource associated with this audit log. |
+| request | [string](#string) | | The request payload in JSON format. |
+| response | [string](#string) | | The response payload in JSON format. Some fields may be omitted if they are too large or contain sensitive information. |
+| status | [google.rpc.Status](#google-rpc-Status) | | The status of the operation. |
+| latency | [google.protobuf.Duration](#google-protobuf-Duration) | | The duration of the operation. |
+| service_data | [google.protobuf.Any](#google-protobuf-Any) | | Service-specific metadata about the request, response, and activities. |
+| request_metadata | [RequestMetadata](#bytebase-v1-RequestMetadata) | | Metadata about the request context. |
-<a name="bytebase-v1-DatabaseGroup-Database"></a>
+<a name="bytebase-v1-ExportAuditLogsRequest"></a>
-### DatabaseGroup.Database
-A database within a database group.
+### ExportAuditLogsRequest
+Request message for exporting audit logs.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The resource name of the database. Format: instances/{instance}/databases/{database} |
+| 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. For example: - order_by = &#34;create_time asc&#34; - order_by = &#34;create_time desc&#34; |
+| 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-DeleteDatabaseGroupRequest"></a>
+<a name="bytebase-v1-ExportAuditLogsResponse"></a>
-### DeleteDatabaseGroupRequest
-Request message for deleting a database group.
+### ExportAuditLogsResponse
+Response message for exporting audit logs.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the database group to delete. Format: projects/{project}/databaseGroups/{databaseGroup} |
+| 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-GetDatabaseGroupRequest"></a>
+<a name="bytebase-v1-RequestMetadata"></a>
-### GetDatabaseGroupRequest
-Request message for getting a database group.
+### RequestMetadata
+Metadata about the incoming request.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the database group to retrieve. Format: projects/{project}/databaseGroups/{databaseGroup} |
-| view | [DatabaseGroupView](#bytebase-v1-DatabaseGroupView) | | The view to return. Defaults to DATABASE_GROUP_VIEW_BASIC. |
+| 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-ListDatabaseGroupsRequest"></a>
+<a name="bytebase-v1-SearchAuditLogsRequest"></a>
-### ListDatabaseGroupsRequest
-Request message for listing database groups.
+### SearchAuditLogsRequest
+Request message for searching audit logs.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| parent | [string](#string) | | The parent resource whose database groups are to be listed. Format: projects/{project} |
-| view | [DatabaseGroupView](#bytebase-v1-DatabaseGroupView) | | The view to return. Defaults to DATABASE_GROUP_VIEW_BASIC. |
-
-
-
-
-
-
-<a name="bytebase-v1-ListDatabaseGroupsResponse"></a>
-
-### ListDatabaseGroupsResponse
-Response message for listing database groups.
+| 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 &#34;/bytebase.v1.&#34; prefix. For example &#34;/bytebase.v1.UserService/CreateUser&#34;. Support &#34;==&#34; operator. - severity: support &#34;==&#34; operator, check Severity enum in AuditLog message for values. - user: the actor, should in &#34;users/{email}&#34; format, support &#34;==&#34; operator. - create_time: support &#34;&gt;=&#34; and &#34;&lt;=&#34; operator.
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| database_groups | [DatabaseGroup](#bytebase-v1-DatabaseGroup) | repeated | The database groups from the specified request. |
+For example: - filter = &#34;method == &#39;/bytebase.v1.SQLService/Query&#39;&#34; - filter = &#34;method == &#39;/bytebase.v1.SQLService/Query&#39; &amp;&amp; severity == &#39;ERROR&#39;&#34; - filter = &#34;method == &#39;/bytebase.v1.SQLService/Query&#39; &amp;&amp; severity == &#39;ERROR&#39; &amp;&amp; user == &#39;users/[email protected]&#39;&#34; - filter = &#34;method == &#39;/bytebase.v1.SQLService/Query&#39; &amp;&amp; severity == &#39;ERROR&#39; &amp;&amp; create_time &lt;= &#39;2021-01-01T00:00:00Z&#39; &amp;&amp; create_time &gt;= &#39;2020-01-01T00:00:00Z&#39;&#34; |
+| order_by | [string](#string) | | The order by of the log. Only support order by create_time. For example: - order_by = &#34;create_time asc&#34; - order_by = &#34;create_time desc&#34; |
+| 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-UpdateDatabaseGroupRequest"></a>
+<a name="bytebase-v1-SearchAuditLogsResponse"></a>
-### UpdateDatabaseGroupRequest
-Request message for updating a database group.
+### SearchAuditLogsResponse
+Response message for searching audit logs.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| database_group | [DatabaseGroup](#bytebase-v1-DatabaseGroup) | | The database group to update.
-
-The database group&#39;s `name` field is used to identify the database group to update. Format: projects/{project}/databaseGroups/{databaseGroup} |
-| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | The list of fields to update. |
-| allow_missing | [bool](#bool) | | If set to true, and the database group is not found, a new database group will be created. In this situation, `update_mask` is ignored. |
+| 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. |
@@ -6118,16 +6073,22 @@ The database group&#39;s `name` field is used to identify the database group to
-<a name="bytebase-v1-DatabaseGroupView"></a>
+<a name="bytebase-v1-AuditLog-Severity"></a>
-### DatabaseGroupView
-View options for database group responses.
+### AuditLog.Severity
+Severity level for audit log entries.
| Name | Number | Description |
| ---- | ------ | ----------- |
-| DATABASE_GROUP_VIEW_UNSPECIFIED | 0 | The default / unset value. The API will default to the BASIC view. |
-| DATABASE_GROUP_VIEW_BASIC | 1 | Include basic information about the database group, but exclude the list of matched databases and unmatched databases. |
-| DATABASE_GROUP_VIEW_FULL | 2 | Include everything. |
+| 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. |
@@ -6135,580 +6096,545 @@ View options for database group responses.
-<a name="bytebase-v1-DatabaseGroupService"></a>
+<a name="bytebase-v1-AuditLogService"></a>
-### DatabaseGroupService
-DatabaseGroupService manages database groups for organizing databases by criteria.
+### AuditLogService
+AuditLogService manages audit logs for system activities and API calls.
| Method Name | Request Type | Response Type | Description |
| ----------- | ------------ | ------------- | ------------|
-| ListDatabaseGroups | [ListDatabaseGroupsRequest](#bytebase-v1-ListDatabaseGroupsRequest) | [ListDatabaseGroupsResponse](#bytebase-v1-ListDatabaseGroupsResponse) | Lists database groups in a project. Permissions required: bb.projects.get |
-| GetDatabaseGroup | [GetDatabaseGroupRequest](#bytebase-v1-GetDatabaseGroupRequest) | [DatabaseGroup](#bytebase-v1-DatabaseGroup) | Gets a database group by name. Permissions required: bb.projects.get |
-| CreateDatabaseGroup | [CreateDatabaseGroupRequest](#bytebase-v1-CreateDatabaseGroupRequest) | [DatabaseGroup](#bytebase-v1-DatabaseGroup) | Creates a new database group. Permissions required: bb.projects.update |
-| UpdateDatabaseGroup | [UpdateDatabaseGroupRequest](#bytebase-v1-UpdateDatabaseGroupRequest) | [DatabaseGroup](#bytebase-v1-DatabaseGroup) | Updates a database group. Permissions required: bb.projects.update When allow_missing=true, also requires: bb.projects.update |
-| DeleteDatabaseGroup | [DeleteDatabaseGroupRequest](#bytebase-v1-DeleteDatabaseGroupRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | Deletes a database group. Permissions required: bb.projects.update |
+| 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="v1_group_service-proto"></a>
+<a name="v1_auth_service-proto"></a>
<p align="right"><a href="#top">Top</a></p>
-## v1/group_service.proto
+## v1/auth_service.proto
-<a name="bytebase-v1-BatchGetGroupsRequest"></a>
+<a name="bytebase-v1-IdentityProviderContext"></a>
-### BatchGetGroupsRequest
-Request message for batch getting groups.
+### IdentityProviderContext
+Context for identity provider authentication.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| names | [string](#string) | repeated | The group names to retrieve. Format: groups/{email} |
+| oauth2_context | [OAuth2IdentityProviderContext](#bytebase-v1-OAuth2IdentityProviderContext) | | OAuth2 authentication context. |
+| oidc_context | [OIDCIdentityProviderContext](#bytebase-v1-OIDCIdentityProviderContext) | | OpenID Connect authentication context. |
-<a name="bytebase-v1-BatchGetGroupsResponse"></a>
+<a name="bytebase-v1-LoginRequest"></a>
+
+### LoginRequest
-### BatchGetGroupsResponse
-Response message for batch getting groups.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| groups | [Group](#bytebase-v1-Group) | repeated | The groups from the specified request. |
+| email | [string](#string) | | User&#39;s email address. |
+| password | [string](#string) | | User&#39;s password for authentication. |
+| web | [bool](#bool) | | If web is set, we will set access token, refresh token, and user to the cookie. |
+| idp_name | [string](#string) | | The name of the identity provider. Format: idps/{idp} |
+| idp_context | [IdentityProviderContext](#bytebase-v1-IdentityProviderContext) | | The idp_context is using to get the user information from identity provider. |
+| otp_code | [string](#string) | optional | The otp_code is used to verify the user&#39;s identity by MFA. |
+| recovery_code | [string](#string) | optional | The recovery_code is used to recovery the user&#39;s identity with MFA. |
+| mfa_temp_token | [string](#string) | optional | The mfa_temp_token is used to verify the user&#39;s identity by MFA. |
-<a name="bytebase-v1-CreateGroupRequest"></a>
+<a name="bytebase-v1-LoginResponse"></a>
+
+### LoginResponse
-### CreateGroupRequest
-Request message for creating a group.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| group | [Group](#bytebase-v1-Group) | | The group to create. |
-| group_email | [string](#string) | | The email to use for the group, which will become the final component of the group&#39;s resource name. |
-
-
+| token | [string](#string) | | Access token for authenticated requests. |
+| mfa_temp_token | [string](#string) | optional | Temporary token for MFA verification. |
+| require_reset_password | [bool](#bool) | | Whether user must reset password before continuing. |
+| user | [User](#bytebase-v1-User) | | The user from the successful login. |
-<a name="bytebase-v1-DeleteGroupRequest"></a>
-### DeleteGroupRequest
-Request message for deleting a group.
+<a name="bytebase-v1-LogoutRequest"></a>
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the group to delete. Format: groups/{email} |
+### LogoutRequest
+Request to logout current user session.
-<a name="bytebase-v1-GetGroupRequest"></a>
+<a name="bytebase-v1-OAuth2IdentityProviderContext"></a>
-### GetGroupRequest
-Request message for getting a group.
+### OAuth2IdentityProviderContext
+OAuth2 authentication context.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the group to retrieve. Format: groups/{email} |
+| code | [string](#string) | | Authorization code from OAuth2 provider. |
-<a name="bytebase-v1-Group"></a>
+<a name="bytebase-v1-OIDCIdentityProviderContext"></a>
-### Group
-A group of users within the workspace.
+### OIDCIdentityProviderContext
+OpenID Connect authentication context.
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the group to retrieve. Format: groups/{group}, group is an email. |
-| title | [string](#string) | | The display title of the group. |
-| description | [string](#string) | | The description of the group. |
-| members | [GroupMember](#bytebase-v1-GroupMember) | repeated | The members of the group. |
-| source | [string](#string) | | The source system where the group originated (e.g., Entra ID for SCIM sync). |
+
+
+
-<a name="bytebase-v1-GroupMember"></a>
-### GroupMember
-A member of a group with a role.
+<a name="bytebase-v1-AuthService"></a>
+### AuthService
+AuthService handles user authentication operations.
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| member | [string](#string) | | Member is the principal who belong to this group.
+| Method Name | Request Type | Response Type | Description |
+| ----------- | ------------ | ------------- | ------------|
+| Login | [LoginRequest](#bytebase-v1-LoginRequest) | [LoginResponse](#bytebase-v1-LoginResponse) | Authenticates a user and returns access tokens. Permissions required: None |
+| Logout | [LogoutRequest](#bytebase-v1-LogoutRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | Logs out the current user session. Permissions required: None |
-Format: users/[email protected] |
-| role | [GroupMember.Role](#bytebase-v1-GroupMember-Role) | | The member&#39;s role in the group. |
+
+<a name="v1_cel_service-proto"></a>
+<p align="right"><a href="#top">Top</a></p>
+## v1/cel_service.proto
-<a name="bytebase-v1-ListGroupsRequest"></a>
-### ListGroupsRequest
-Request message for listing groups.
+<a name="bytebase-v1-BatchDeparseRequest"></a>
+
+### BatchDeparseRequest
+Request message for batch deparsing CEL expressions.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| page_size | [int32](#int32) | | The maximum number of groups to return. The service may return fewer than this value. If unspecified, at most 10 groups will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. |
-| page_token | [string](#string) | | A page token, received from a previous `ListGroups` call. Provide this to retrieve the subsequent page.
-
-When paginating, all other parameters provided to `ListGroups` must match the call that provided the page token. |
-| filter | [string](#string) | | Filter is used to filter groups returned in the list. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
-
-Supported filter: - title: the group title, support &#34;==&#34; and &#34;.matches()&#34; operator. - email: the group email, support &#34;==&#34; and &#34;.matches()&#34; operator. - project: the project full name in &#34;projects/{id}&#34; format, support &#34;==&#34; operator.
-
-For example: title == &#34;dba&#34; email == &#34;[email protected]&#34; title.matches(&#34;dba&#34;) email.matches(&#34;dba&#34;) project == &#34;projects/sample-project&#34; You can combine filter conditions like: title.matches(&#34;dba&#34;) || email.matches(&#34;dba&#34;) |
+| expressions | [google.api.expr.v1alpha1.Expr](#google-api-expr-v1alpha1-Expr) | repeated | The CEL expression ASTs to deparse. |
-<a name="bytebase-v1-ListGroupsResponse"></a>
+<a name="bytebase-v1-BatchDeparseResponse"></a>
-### ListGroupsResponse
-Response message for listing groups.
+### BatchDeparseResponse
+Response message for batch deparsing CEL expressions.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| groups | [Group](#bytebase-v1-Group) | repeated | The groups from the specified request. |
-| next_page_token | [string](#string) | | A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. |
+| expressions | [string](#string) | repeated | The deparsed CEL expressions as strings. |
-<a name="bytebase-v1-UpdateGroupRequest"></a>
+<a name="bytebase-v1-BatchParseRequest"></a>
-### UpdateGroupRequest
-Request message for updating a group.
+### BatchParseRequest
+Request message for batch parsing CEL expressions.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| group | [Group](#bytebase-v1-Group) | | The group to update.
+| expressions | [string](#string) | repeated | The CEL expression strings to parse. |
-The group&#39;s `name` field is used to identify the group to update. Format: groups/{email} |
-| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | The list of fields to update. |
-| allow_missing | [bool](#bool) | | If set to true, and the group is not found, a new group will be created. In this situation, `update_mask` is ignored. |
-
+<a name="bytebase-v1-BatchParseResponse"></a>
+### BatchParseResponse
+Response message for batch parsing CEL expressions.
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| expressions | [google.api.expr.v1alpha1.Expr](#google-api-expr-v1alpha1-Expr) | repeated | The parsed CEL expressions as AST. |
-<a name="bytebase-v1-GroupMember-Role"></a>
-### GroupMember.Role
-The role of a group member.
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| ROLE_UNSPECIFIED | 0 | Unspecified role. |
-| OWNER | 1 | Group owner. |
-| MEMBER | 2 | Group member. |
+
-<a name="bytebase-v1-GroupService"></a>
-### GroupService
-GroupService manages user groups for organizing users and permissions.
+<a name="bytebase-v1-CelService"></a>
+
+### CelService
+CelService manages CEL (Common Expression Language) parsing and formatting operations.
| Method Name | Request Type | Response Type | Description |
| ----------- | ------------ | ------------- | ------------|
-| GetGroup | [GetGroupRequest](#bytebase-v1-GetGroupRequest) | [Group](#bytebase-v1-Group) | Gets a group by name. Permissions required: bb.groups.get |
-| BatchGetGroups | [BatchGetGroupsRequest](#bytebase-v1-BatchGetGroupsRequest) | [BatchGetGroupsResponse](#bytebase-v1-BatchGetGroupsResponse) | Gets multiple groups in a single request. Permissions required: bb.groups.get |
-| ListGroups | [ListGroupsRequest](#bytebase-v1-ListGroupsRequest) | [ListGroupsResponse](#bytebase-v1-ListGroupsResponse) | Lists all groups in the workspace. Permissions required: bb.groups.list |
-| CreateGroup | [CreateGroupRequest](#bytebase-v1-CreateGroupRequest) | [Group](#bytebase-v1-Group) | Creates a new group. Permissions required: bb.groups.create |
-| UpdateGroup | [UpdateGroupRequest](#bytebase-v1-UpdateGroupRequest) | [Group](#bytebase-v1-Group) | Updates a group. Group owners or users with bb.groups.update permission can update. Permissions required: bb.groups.update OR caller is group owner When allow_missing=true, also requires: bb.groups.create |
-| DeleteGroup | [DeleteGroupRequest](#bytebase-v1-DeleteGroupRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | Deletes a group. Group owners or users with bb.groups.delete permission can delete. Permissions required: bb.groups.delete OR caller is group owner |
+| BatchParse | [BatchParseRequest](#bytebase-v1-BatchParseRequest) | [BatchParseResponse](#bytebase-v1-BatchParseResponse) | Parses multiple CEL expression strings into AST representations. Permissions required: None |
+| BatchDeparse | [BatchDeparseRequest](#bytebase-v1-BatchDeparseRequest) | [BatchDeparseResponse](#bytebase-v1-BatchDeparseResponse) | Converts multiple CEL AST representations back into expression strings. Permissions required: None |
-<a name="v1_idp_service-proto"></a>
+<a name="v1_changelist_service-proto"></a>
<p align="right"><a href="#top">Top</a></p>
-## v1/idp_service.proto
-
+## v1/changelist_service.proto
-<a name="bytebase-v1-CreateIdentityProviderRequest"></a>
-### CreateIdentityProviderRequest
+<a name="bytebase-v1-Changelist"></a>
+### Changelist
+A changelist groups multiple database changes together.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| identity_provider | [IdentityProvider](#bytebase-v1-IdentityProvider) | | The identity provider to create. |
-| identity_provider_id | [string](#string) | | The ID to use for the identity provider, which will become the final component of the identity provider&#39;s resource name.
-
-This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/. |
-| validate_only | [bool](#bool) | | If set to true, the request will be validated without actually creating the identity provider. |
-
+| name | [string](#string) | | The name of the changelist resource. Canonical parent is project. Format: projects/{project}/changelists/{changelist} |
+| description | [string](#string) | | The description of the changelist. |
+| creator | [string](#string) | | The creator of the changelist. Format: users/{email} |
+| update_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | The last time the changelist was updated. |
+| changes | [Changelist.Change](#bytebase-v1-Changelist-Change) | repeated | The list of changes in this changelist. |
-<a name="bytebase-v1-DeleteIdentityProviderRequest"></a>
-### DeleteIdentityProviderRequest
+<a name="bytebase-v1-Changelist-Change"></a>
+### Changelist.Change
+A single change in a changelist.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the identity provider to delete. Format: idps/{identity_provider} |
+| sheet | [string](#string) | | The sheet containing the SQL statement. Format: projects/{project}/sheets/{sheet} |
+| source | [string](#string) | | The source of this change. Format: instances/{instance}/databases/{database}/changelogs/{changelog} If empty, the change is from raw SQL. |
-<a name="bytebase-v1-FieldMapping"></a>
+<a name="bytebase-v1-CreateChangelistRequest"></a>
-### FieldMapping
-FieldMapping saves the field names from user info API of identity provider.
-As we save all raw json string of user info response data into `principal.idp_user_info`,
-we can extract the relevant data based with `FieldMapping`.
+### CreateChangelistRequest
+Request message for creating a changelist.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| identifier | [string](#string) | | Identifier is the field name of the unique identifier in 3rd-party idp user info. Required. |
-| display_name | [string](#string) | | DisplayName is the field name of display name in 3rd-party idp user info. Optional. |
-| phone | [string](#string) | | Phone is the field name of primary phone in 3rd-party idp user info. Optional. |
-| groups | [string](#string) | | Groups is the field name of groups in 3rd-party idp user info. Optional. Mainly used for OIDC: https://developer.okta.com/docs/guides/customize-tokens-groups-claim/main/ |
+| parent | [string](#string) | | The parent resource where this changelist will be created. Format: projects/{project} |
+| changelist | [Changelist](#bytebase-v1-Changelist) | | The changelist to create. |
+| changelist_id | [string](#string) | | The ID to use for the changelist, which will become the final component of the changelist&#39;s resource name.
+This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/. |
-<a name="bytebase-v1-GetIdentityProviderRequest"></a>
-### GetIdentityProviderRequest
+<a name="bytebase-v1-DeleteChangelistRequest"></a>
+### DeleteChangelistRequest
+Request message for deleting a changelist.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the identity provider to retrieve. Format: idps/{idp} |
-
+| name | [string](#string) | | The name of the changelist to delete. Format: projects/{project}/changelists/{changelist} |
-<a name="bytebase-v1-IdentityProvider"></a>
-### IdentityProvider
+<a name="bytebase-v1-GetChangelistRequest"></a>
+### GetChangelistRequest
+Request message for getting a changelist.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the identity provider. Format: idps/{idp} |
-| title | [string](#string) | | The display title of the identity provider. |
-| domain | [string](#string) | | The domain for email matching when using this identity provider. |
-| type | [IdentityProviderType](#bytebase-v1-IdentityProviderType) | | The type of identity provider protocol. |
-| config | [IdentityProviderConfig](#bytebase-v1-IdentityProviderConfig) | | The configuration details for the identity provider. |
-
+| name | [string](#string) | | The name of the changelist to retrieve. Format: projects/{project}/changelists/{changelist} |
-<a name="bytebase-v1-IdentityProviderConfig"></a>
-### IdentityProviderConfig
+<a name="bytebase-v1-ListChangelistsRequest"></a>
+### ListChangelistsRequest
+Request message for listing changelists.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| oauth2_config | [OAuth2IdentityProviderConfig](#bytebase-v1-OAuth2IdentityProviderConfig) | | OAuth2 protocol configuration. |
-| oidc_config | [OIDCIdentityProviderConfig](#bytebase-v1-OIDCIdentityProviderConfig) | | OIDC protocol configuration. |
-| ldap_config | [LDAPIdentityProviderConfig](#bytebase-v1-LDAPIdentityProviderConfig) | | LDAP protocol configuration. |
+| parent | [string](#string) | | The parent, which owns this collection of changelists. Format: projects/{project} |
-<a name="bytebase-v1-LDAPIdentityProviderConfig"></a>
+<a name="bytebase-v1-ListChangelistsResponse"></a>
-### LDAPIdentityProviderConfig
-LDAPIdentityProviderConfig is the structure for LDAP identity provider config.
+### ListChangelistsResponse
+Response message for listing changelists.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| host | [string](#string) | | Host is the hostname or IP address of the LDAP server, e.g., &#34;ldap.example.com&#34;. |
-| port | [int32](#int32) | | Port is the port number of the LDAP server, e.g., 389. When not set, the default port of the corresponding security protocol will be used, i.e. 389 for StartTLS and 636 for LDAPS. |
-| skip_tls_verify | [bool](#bool) | | SkipTLSVerify controls whether to skip TLS certificate verification. |
-| bind_dn | [string](#string) | | BindDN is the DN of the user to bind as a service account to perform search requests. |
-| bind_password | [string](#string) | | BindPassword is the password of the user to bind as a service account. |
-| base_dn | [string](#string) | | BaseDN is the base DN to search for users, e.g., &#34;ou=users,dc=example,dc=com&#34;. |
-| user_filter | [string](#string) | | UserFilter is the filter to search for users, e.g., &#34;(uid=%s)&#34;. |
-| security_protocol | [LDAPIdentityProviderConfig.SecurityProtocol](#bytebase-v1-LDAPIdentityProviderConfig-SecurityProtocol) | | SecurityProtocol is the security protocol to be used for establishing connections with the LDAP server. |
-| field_mapping | [FieldMapping](#bytebase-v1-FieldMapping) | | FieldMapping is the mapping of the user attributes returned by the LDAP server. |
-
-
-
-
-
+| changelists | [Changelist](#bytebase-v1-Changelist) | repeated | The changelists from the specified request. |
-<a name="bytebase-v1-ListIdentityProvidersRequest"></a>
-### ListIdentityProvidersRequest
+<a name="bytebase-v1-UpdateChangelistRequest"></a>
+### UpdateChangelistRequest
+Request message for updating a changelist.
-<a name="bytebase-v1-ListIdentityProvidersResponse"></a>
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| changelist | [Changelist](#bytebase-v1-Changelist) | | The changelist to update.
-### ListIdentityProvidersResponse
+The changelist&#39;s `name` field is used to identify the changelist to update. Format: projects/{project}/changelists/{changelist} |
+| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | The list of fields to be updated. |
+| allow_missing | [bool](#bool) | | If set to true, and the changelist is not found, a new changelist will be created. In this situation, `update_mask` is ignored. |
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| identity_providers | [IdentityProvider](#bytebase-v1-IdentityProvider) | repeated | The identity providers from the specified request. |
+
+
+
-<a name="bytebase-v1-OAuth2IdentityProviderConfig"></a>
+<a name="bytebase-v1-ChangelistService"></a>
-### OAuth2IdentityProviderConfig
-OAuth2IdentityProviderConfig is the structure for OAuth2 identity provider config.
+### ChangelistService
+ChangelistService manages changelists for grouping and organizing database changes.
+| Method Name | Request Type | Response Type | Description |
+| ----------- | ------------ | ------------- | ------------|
+| CreateChangelist | [CreateChangelistRequest](#bytebase-v1-CreateChangelistRequest) | [Changelist](#bytebase-v1-Changelist) | Creates a new changelist in a project. Permissions required: bb.changelists.create |
+| GetChangelist | [GetChangelistRequest](#bytebase-v1-GetChangelistRequest) | [Changelist](#bytebase-v1-Changelist) | Gets a changelist by name. Permissions required: bb.changelists.get |
+| ListChangelists | [ListChangelistsRequest](#bytebase-v1-ListChangelistsRequest) | [ListChangelistsResponse](#bytebase-v1-ListChangelistsResponse) | Lists changelists in a project. Permissions required: bb.changelists.list |
+| UpdateChangelist | [UpdateChangelistRequest](#bytebase-v1-UpdateChangelistRequest) | [Changelist](#bytebase-v1-Changelist) | Updates a changelist. Permissions required: bb.changelists.update When allow_missing=true, also requires: bb.changelists.create |
+| DeleteChangelist | [DeleteChangelistRequest](#bytebase-v1-DeleteChangelistRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | Deletes a changelist. Permissions required: bb.changelists.delete |
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| auth_url | [string](#string) | | The authorization endpoint URL for OAuth2 flow. |
-| token_url | [string](#string) | | The token endpoint URL for exchanging authorization code. |
-| user_info_url | [string](#string) | | The user information endpoint URL. |
-| client_id | [string](#string) | | The OAuth2 client identifier. |
-| client_secret | [string](#string) | | The OAuth2 client secret for authentication. |
-| scopes | [string](#string) | repeated | The list of OAuth2 scopes to request. |
-| field_mapping | [FieldMapping](#bytebase-v1-FieldMapping) | | Mapping configuration for user attributes from OAuth2 response. |
-| skip_tls_verify | [bool](#bool) | | Whether to skip TLS certificate verification. |
-| auth_style | [OAuth2AuthStyle](#bytebase-v1-OAuth2AuthStyle) | | The authentication style for client credentials. |
+
+<a name="v1_database_group_service-proto"></a>
+<p align="right"><a href="#top">Top</a></p>
+## v1/database_group_service.proto
-<a name="bytebase-v1-OAuth2IdentityProviderTestRequestContext"></a>
-### OAuth2IdentityProviderTestRequestContext
+<a name="bytebase-v1-CreateDatabaseGroupRequest"></a>
+### CreateDatabaseGroupRequest
+Request message for creating a database group.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| code | [string](#string) | | Authorize code from website. |
+| parent | [string](#string) | | The parent resource where this database group will be created. Format: projects/{project} |
+| database_group | [DatabaseGroup](#bytebase-v1-DatabaseGroup) | | The database group to create. |
+| database_group_id | [string](#string) | | The ID to use for the database group, which will become the final component of the database group&#39;s resource name.
+This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/. |
+| validate_only | [bool](#bool) | | If set, validate the create request and preview the full database group response, but do not actually create it. |
-<a name="bytebase-v1-OIDCIdentityProviderConfig"></a>
-### OIDCIdentityProviderConfig
-OIDCIdentityProviderConfig is the structure for OIDC identity provider config.
+<a name="bytebase-v1-DatabaseGroup"></a>
+
+### DatabaseGroup
+A group of databases matched by expressions.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| issuer | [string](#string) | | The OIDC issuer URL for the identity provider. |
-| client_id | [string](#string) | | The OIDC client identifier. |
-| client_secret | [string](#string) | | The OIDC client secret for authentication. |
-| scopes | [string](#string) | repeated | The scopes that the OIDC provider supports. Should be fetched from the well-known configuration file of the OIDC provider. |
-| field_mapping | [FieldMapping](#bytebase-v1-FieldMapping) | | Mapping configuration for user attributes from OIDC claims. |
-| skip_tls_verify | [bool](#bool) | | Whether to skip TLS certificate verification. |
-| auth_style | [OAuth2AuthStyle](#bytebase-v1-OAuth2AuthStyle) | | The authentication style for client credentials. |
-| auth_endpoint | [string](#string) | | The authorization endpoint of the OIDC provider. Should be fetched from the well-known configuration file of the OIDC provider. |
+| name | [string](#string) | | The name of the database group. Format: projects/{project}/databaseGroups/{databaseGroup} |
+| title | [string](#string) | | The short name used in actual databases specified by users. |
+| database_expr | [google.type.Expr](#google-type-Expr) | | The condition that is associated with this database group. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
+Support variables: resource.environment_id: the environment resource id. Support &#34;==&#34;, &#34;!=&#34;, &#34;in [XX]&#34;, &#34;!(in [xx])&#34; operations. resource.instance_id: the instance resource id. Support &#34;==&#34;, &#34;!=&#34;, &#34;in [XX]&#34;, &#34;!(in [xx])&#34;, &#34;contains&#34;, &#34;matches&#34;, &#34;startsWith&#34;, &#34;endsWith&#34; operations. resource.database_name: the database name. Support &#34;==&#34;, &#34;!=&#34;, &#34;in [XX]&#34;, &#34;!(in [xx])&#34;, &#34;contains&#34;, &#34;matches&#34;, &#34;startsWith&#34;, &#34;endsWith&#34; operations. resource.database_labels: the database labels. Support map access operations. All variables should join with &#34;&amp;&amp;&#34; condition.
+For example: resource.environment_id == &#34;test&#34; &amp;&amp; resource.database_name.startsWith(&#34;sample_&#34;) resource.database_labels[&#34;tenant&#34;] == &#34;tenant1&#34; |
+| matched_databases | [DatabaseGroup.Database](#bytebase-v1-DatabaseGroup-Database) | repeated | The list of databases that match the database group condition. |
-<a name="bytebase-v1-TestIdentityProviderRequest"></a>
-### TestIdentityProviderRequest
+<a name="bytebase-v1-DatabaseGroup-Database"></a>
+
+### DatabaseGroup.Database
+A database within a database group.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| identity_provider | [IdentityProvider](#bytebase-v1-IdentityProvider) | | The identity provider to test connection including uncreated. |
-| oauth2_context | [OAuth2IdentityProviderTestRequestContext](#bytebase-v1-OAuth2IdentityProviderTestRequestContext) | | |
-
+| name | [string](#string) | | The resource name of the database. Format: instances/{instance}/databases/{database} |
-<a name="bytebase-v1-TestIdentityProviderResponse"></a>
-### TestIdentityProviderResponse
+<a name="bytebase-v1-DeleteDatabaseGroupRequest"></a>
+### DeleteDatabaseGroupRequest
+Request message for deleting a database group.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| claims | [TestIdentityProviderResponse.ClaimsEntry](#bytebase-v1-TestIdentityProviderResponse-ClaimsEntry) | repeated | The map of claims returned by the identity provider. |
-| user_info | [TestIdentityProviderResponse.UserInfoEntry](#bytebase-v1-TestIdentityProviderResponse-UserInfoEntry) | repeated | The matched user info from the claims. |
-
+| name | [string](#string) | | The name of the database group to delete. Format: projects/{project}/databaseGroups/{databaseGroup} |
-<a name="bytebase-v1-TestIdentityProviderResponse-ClaimsEntry"></a>
-### TestIdentityProviderResponse.ClaimsEntry
+<a name="bytebase-v1-GetDatabaseGroupRequest"></a>
+### GetDatabaseGroupRequest
+Request message for getting a database group.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| key | [string](#string) | | |
-| value | [string](#string) | | |
-
+| name | [string](#string) | | The name of the database group to retrieve. Format: projects/{project}/databaseGroups/{databaseGroup} |
+| view | [DatabaseGroupView](#bytebase-v1-DatabaseGroupView) | | The view to return. Defaults to DATABASE_GROUP_VIEW_BASIC. |
-<a name="bytebase-v1-TestIdentityProviderResponse-UserInfoEntry"></a>
-### TestIdentityProviderResponse.UserInfoEntry
+<a name="bytebase-v1-ListDatabaseGroupsRequest"></a>
+### ListDatabaseGroupsRequest
+Request message for listing database groups.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| key | [string](#string) | | |
-| value | [string](#string) | | |
-
+| parent | [string](#string) | | The parent resource whose database groups are to be listed. Format: projects/{project} |
+| view | [DatabaseGroupView](#bytebase-v1-DatabaseGroupView) | | The view to return. Defaults to DATABASE_GROUP_VIEW_BASIC. |
-<a name="bytebase-v1-UpdateIdentityProviderRequest"></a>
-### UpdateIdentityProviderRequest
+<a name="bytebase-v1-ListDatabaseGroupsResponse"></a>
+### ListDatabaseGroupsResponse
+Response message for listing database groups.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| identity_provider | [IdentityProvider](#bytebase-v1-IdentityProvider) | | The identity provider to update.
-
-The identity provider&#39;s `name` field is used to identify the identity provider to update. Format: idps/{identity_provider} |
-| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | The list of fields to update. |
-| allow_missing | [bool](#bool) | | If set to true, and the identity provider is not found, a new identity provider will be created. In this situation, `update_mask` is ignored. |
-
-
-
+| database_groups | [DatabaseGroup](#bytebase-v1-DatabaseGroup) | repeated | The database groups from the specified request. |
-
-<a name="bytebase-v1-IdentityProviderType"></a>
-### IdentityProviderType
+<a name="bytebase-v1-UpdateDatabaseGroupRequest"></a>
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| IDENTITY_PROVIDER_TYPE_UNSPECIFIED | 0 | Unspecified identity provider type. |
-| OAUTH2 | 1 | OAuth 2.0 authentication protocol. |
-| OIDC | 2 | OpenID Connect authentication protocol. |
-| LDAP | 3 | LDAP directory service authentication. |
+### UpdateDatabaseGroupRequest
+Request message for updating a database group.
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| database_group | [DatabaseGroup](#bytebase-v1-DatabaseGroup) | | The database group to update.
-<a name="bytebase-v1-LDAPIdentityProviderConfig-SecurityProtocol"></a>
+The database group&#39;s `name` field is used to identify the database group to update. Format: projects/{project}/databaseGroups/{databaseGroup} |
+| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | The list of fields to update. |
+| allow_missing | [bool](#bool) | | If set to true, and the database group is not found, a new database group will be created. In this situation, `update_mask` is ignored. |
-### LDAPIdentityProviderConfig.SecurityProtocol
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| SECURITY_PROTOCOL_UNSPECIFIED | 0 | |
-| START_TLS | 1 | StartTLS is the security protocol that starts with an unencrypted connection and then upgrades to TLS. |
-| LDAPS | 2 | LDAPS is the security protocol that uses TLS from the beginning. |
+
-<a name="bytebase-v1-OAuth2AuthStyle"></a>
-### OAuth2AuthStyle
+<a name="bytebase-v1-DatabaseGroupView"></a>
+### DatabaseGroupView
+View options for database group responses.
| Name | Number | Description |
| ---- | ------ | ----------- |
-| OAUTH2_AUTH_STYLE_UNSPECIFIED | 0 | |
-| IN_PARAMS | 1 | IN_PARAMS sends the &#34;client_id&#34; and &#34;client_secret&#34; in the POST body as application/x-www-form-urlencoded parameters. |
-| IN_HEADER | 2 | IN_HEADER sends the client_id and client_password using HTTP Basic Authorization. This is an optional style described in the OAuth2 RFC 6749 section 2.3.1. |
+| DATABASE_GROUP_VIEW_UNSPECIFIED | 0 | The default / unset value. The API will default to the BASIC view. |
+| DATABASE_GROUP_VIEW_BASIC | 1 | Include basic information about the database group, but exclude the list of matched databases and unmatched databases. |
+| DATABASE_GROUP_VIEW_FULL | 2 | Include everything. |
@@ -6716,1031 +6642,1027 @@ The identity provider&#39;s `name` field is used to identify the identity provid
-<a name="bytebase-v1-IdentityProviderService"></a>
+<a name="bytebase-v1-DatabaseGroupService"></a>
-### IdentityProviderService
-IdentityProviderService manages external identity providers for SSO authentication.
+### DatabaseGroupService
+DatabaseGroupService manages database groups for organizing databases by criteria.
| Method Name | Request Type | Response Type | Description |
| ----------- | ------------ | ------------- | ------------|
-| GetIdentityProvider | [GetIdentityProviderRequest](#bytebase-v1-GetIdentityProviderRequest) | [IdentityProvider](#bytebase-v1-IdentityProvider) | Gets an identity provider by name. Permissions required: bb.identityProviders.get |
-| ListIdentityProviders | [ListIdentityProvidersRequest](#bytebase-v1-ListIdentityProvidersRequest) | [ListIdentityProvidersResponse](#bytebase-v1-ListIdentityProvidersResponse) | Lists all configured identity providers (public endpoint for login page). Permissions required: None |
-| CreateIdentityProvider | [CreateIdentityProviderRequest](#bytebase-v1-CreateIdentityProviderRequest) | [IdentityProvider](#bytebase-v1-IdentityProvider) | Creates a new identity provider. Permissions required: bb.identityProviders.create |
-| UpdateIdentityProvider | [UpdateIdentityProviderRequest](#bytebase-v1-UpdateIdentityProviderRequest) | [IdentityProvider](#bytebase-v1-IdentityProvider) | Updates an identity provider. Permissions required: bb.identityProviders.update When allow_missing=true, also requires: bb.identityProviders.create |
-| DeleteIdentityProvider | [DeleteIdentityProviderRequest](#bytebase-v1-DeleteIdentityProviderRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | Deletes an identity provider. Permissions required: bb.identityProviders.delete |
-| TestIdentityProvider | [TestIdentityProviderRequest](#bytebase-v1-TestIdentityProviderRequest) | [TestIdentityProviderResponse](#bytebase-v1-TestIdentityProviderResponse) | Tests the connection and configuration of an identity provider. Permissions required: bb.identityProviders.update |
+| ListDatabaseGroups | [ListDatabaseGroupsRequest](#bytebase-v1-ListDatabaseGroupsRequest) | [ListDatabaseGroupsResponse](#bytebase-v1-ListDatabaseGroupsResponse) | Lists database groups in a project. Permissions required: bb.projects.get |
+| GetDatabaseGroup | [GetDatabaseGroupRequest](#bytebase-v1-GetDatabaseGroupRequest) | [DatabaseGroup](#bytebase-v1-DatabaseGroup) | Gets a database group by name. Permissions required: bb.projects.get |
+| CreateDatabaseGroup | [CreateDatabaseGroupRequest](#bytebase-v1-CreateDatabaseGroupRequest) | [DatabaseGroup](#bytebase-v1-DatabaseGroup) | Creates a new database group. Permissions required: bb.projects.update |
+| UpdateDatabaseGroup | [UpdateDatabaseGroupRequest](#bytebase-v1-UpdateDatabaseGroupRequest) | [DatabaseGroup](#bytebase-v1-DatabaseGroup) | Updates a database group. Permissions required: bb.projects.update When allow_missing=true, also requires: bb.projects.update |
+| DeleteDatabaseGroup | [DeleteDatabaseGroupRequest](#bytebase-v1-DeleteDatabaseGroupRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | Deletes a database group. Permissions required: bb.projects.update |
-<a name="v1_org_policy_service-proto"></a>
+<a name="v1_group_service-proto"></a>
<p align="right"><a href="#top">Top</a></p>
-## v1/org_policy_service.proto
-
+## v1/group_service.proto
-<a name="bytebase-v1-CreatePolicyRequest"></a>
-### CreatePolicyRequest
+<a name="bytebase-v1-BatchGetGroupsRequest"></a>
+### BatchGetGroupsRequest
+Request message for batch getting groups.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| parent | [string](#string) | | The parent resource where this instance will be created. Workspace resource name: &#34;&#34;. Environment resource name: environments/environment-id. Instance resource name: instances/instance-id. Database resource name: instances/instance-id/databases/database-name. |
-| policy | [Policy](#bytebase-v1-Policy) | | The policy to create. |
-| type | [PolicyType](#bytebase-v1-PolicyType) | | The type of policy to create. |
+| names | [string](#string) | repeated | The group names to retrieve. Format: groups/{email} |
-<a name="bytebase-v1-DataSourceQueryPolicy"></a>
+<a name="bytebase-v1-BatchGetGroupsResponse"></a>
-### DataSourceQueryPolicy
-Policy for controlling which data sources can be queried in the SQL editor.
+### BatchGetGroupsResponse
+Response message for batch getting groups.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| admin_data_source_restriction | [DataSourceQueryPolicy.Restriction](#bytebase-v1-DataSourceQueryPolicy-Restriction) | | Restriction for admin data source queries. |
-| disallow_ddl | [bool](#bool) | | Disallow running DDL statements in the SQL editor. |
-| disallow_dml | [bool](#bool) | | Disallow running DML statements in the SQL editor. |
-
+| groups | [Group](#bytebase-v1-Group) | repeated | The groups from the specified request. |
-<a name="bytebase-v1-DeletePolicyRequest"></a>
-### DeletePolicyRequest
+<a name="bytebase-v1-CreateGroupRequest"></a>
+### CreateGroupRequest
+Request message for creating a group.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The policy&#39;s `name` field is used to identify the instance to update. Format: {resource name}/policies/{policy type} Workspace resource name: &#34;&#34;. Environment resource name: environments/environment-id. Instance resource name: instances/instance-id. Database resource name: instances/instance-id/databases/database-name. |
-
+| group | [Group](#bytebase-v1-Group) | | The group to create. |
+| group_email | [string](#string) | | The email to use for the group, which will become the final component of the group&#39;s resource name. |
-<a name="bytebase-v1-GetPolicyRequest"></a>
-### GetPolicyRequest
+<a name="bytebase-v1-DeleteGroupRequest"></a>
+### DeleteGroupRequest
+Request message for deleting a group.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the policy to retrieve. Format: {resource type}/{resource id}/policies/{policy type} |
-
+| name | [string](#string) | | The name of the group to delete. Format: groups/{email} |
-<a name="bytebase-v1-ListPoliciesRequest"></a>
-### ListPoliciesRequest
+<a name="bytebase-v1-GetGroupRequest"></a>
+### GetGroupRequest
+Request message for getting a group.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| parent | [string](#string) | | The parent, which owns this collection of policies. Format: {resource type}/{resource id} |
-| policy_type | [PolicyType](#bytebase-v1-PolicyType) | optional | Filter by specific policy type. |
-| show_deleted | [bool](#bool) | | Show deleted policies if specified. |
-
+| name | [string](#string) | | The name of the group to retrieve. Format: groups/{email} |
-<a name="bytebase-v1-ListPoliciesResponse"></a>
-### ListPoliciesResponse
+<a name="bytebase-v1-Group"></a>
+### Group
+A group of users within the workspace.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| policies | [Policy](#bytebase-v1-Policy) | repeated | The policies from the specified request. |
+| name | [string](#string) | | The name of the group to retrieve. Format: groups/{group}, group is an email. |
+| title | [string](#string) | | The display title of the group. |
+| description | [string](#string) | | The description of the group. |
+| members | [GroupMember](#bytebase-v1-GroupMember) | repeated | The members of the group. |
+| source | [string](#string) | | The source system where the group originated (e.g., Entra ID for SCIM sync). |
-<a name="bytebase-v1-MaskingExceptionPolicy"></a>
+<a name="bytebase-v1-GroupMember"></a>
-### MaskingExceptionPolicy
-MaskingExceptionPolicy is the allowlist of users who can access sensitive data.
+### GroupMember
+A member of a group with a role.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| masking_exceptions | [MaskingExceptionPolicy.MaskingException](#bytebase-v1-MaskingExceptionPolicy-MaskingException) | repeated | The list of masking exceptions. |
+| member | [string](#string) | | Member is the principal who belong to this group.
+
+Format: users/[email protected] |
+| role | [GroupMember.Role](#bytebase-v1-GroupMember-Role) | | The member&#39;s role in the group. |
-<a name="bytebase-v1-MaskingExceptionPolicy-MaskingException"></a>
+<a name="bytebase-v1-ListGroupsRequest"></a>
-### MaskingExceptionPolicy.MaskingException
-An exception allowing specific users to access masked data.
+### ListGroupsRequest
+Request message for listing groups.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| action | [MaskingExceptionPolicy.MaskingException.Action](#bytebase-v1-MaskingExceptionPolicy-MaskingException-Action) | | The action that the user can perform on sensitive data. |
-| member | [string](#string) | | Member is the principal who bind to this exception policy instance.
+| page_size | [int32](#int32) | | The maximum number of groups to return. The service may return fewer than this value. If unspecified, at most 10 groups will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. |
+| page_token | [string](#string) | | A page token, received from a previous `ListGroups` call. Provide this to retrieve the subsequent page.
-- `user:{email}`: An email address that represents a specific Bytebase account. For example, `[email protected]`. - `group:{email}`: An email address for group. |
-| condition | [google.type.Expr](#google-type-Expr) | | The condition that is associated with this exception policy instance. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec If the condition is empty, means the user can access all databases without expiration.
+When paginating, all other parameters provided to `ListGroups` must match the call that provided the page token. |
+| filter | [string](#string) | | Filter is used to filter groups returned in the list. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
-Support variables: resource.instance_id: the instance resource id. Only support &#34;==&#34; operation. resource.database_name: the database name. Only support &#34;==&#34; operation. resource.schema_name: the schema name. Only support &#34;==&#34; operation. resource.table_name: the table name. Only support &#34;==&#34; operation. resource.column_name: the column name. Only support &#34;==&#34; operation. request.time: the expiration. Only support &#34;&lt;&#34; operation in `request.time &lt; timestamp(&#34;{ISO datetime string format}&#34;)` All variables should join with &#34;&amp;&amp;&#34; condition.
+Supported filter: - title: the group title, support &#34;==&#34; and &#34;.matches()&#34; operator. - email: the group email, support &#34;==&#34; and &#34;.matches()&#34; operator. - project: the project full name in &#34;projects/{id}&#34; format, support &#34;==&#34; operator.
-For example: resource.instance_id == &#34;local&#34; &amp;&amp; resource.database_name == &#34;employee&#34; &amp;&amp; request.time &lt; timestamp(&#34;2025-04-30T11:10:39.000Z&#34;) resource.instance_id == &#34;local&#34; &amp;&amp; resource.database_name == &#34;employee&#34; |
+For example: title == &#34;dba&#34; email == &#34;[email protected]&#34; title.matches(&#34;dba&#34;) email.matches(&#34;dba&#34;) project == &#34;projects/sample-project&#34; You can combine filter conditions like: title.matches(&#34;dba&#34;) || email.matches(&#34;dba&#34;) |
-<a name="bytebase-v1-MaskingRulePolicy"></a>
+<a name="bytebase-v1-ListGroupsResponse"></a>
-### MaskingRulePolicy
-Policy for configuring data masking rules.
+### ListGroupsResponse
+Response message for listing groups.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| rules | [MaskingRulePolicy.MaskingRule](#bytebase-v1-MaskingRulePolicy-MaskingRule) | repeated | The list of masking rules. |
+| groups | [Group](#bytebase-v1-Group) | repeated | The groups from the specified request. |
+| next_page_token | [string](#string) | | A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. |
-<a name="bytebase-v1-MaskingRulePolicy-MaskingRule"></a>
+<a name="bytebase-v1-UpdateGroupRequest"></a>
-### MaskingRulePolicy.MaskingRule
-A rule that defines when and how to mask data.
+### UpdateGroupRequest
+Request message for updating a group.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| id | [string](#string) | | A unique identifier for the rule in UUID format. |
-| condition | [google.type.Expr](#google-type-Expr) | | The condition for the masking rule. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
+| group | [Group](#bytebase-v1-Group) | | The group to update.
-Support variables: resource.environment_id: the environment resource id. resource.project_id: the project resource id. resource.instance_id: the instance resource id. resource.database_name: the database name. resource.table_name: the table name. resource.column_name: the column name. resource.classification_level: the classification level.
+The group&#39;s `name` field is used to identify the group to update. Format: groups/{email} |
+| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | The list of fields to update. |
+| allow_missing | [bool](#bool) | | If set to true, and the group is not found, a new group will be created. In this situation, `update_mask` is ignored. |
-Each variable support following operations: ==: the value equals the target. !=: the value not equals the target. in: the value matches one of the targets. !(in): the value not matches any of the targets.
-For example: resource.environment_id == &#34;test&#34; &amp;&amp; resource.project_id == &#34;sample-project&#34; resource.instance_id == &#34;sample-instance&#34; &amp;&amp; resource.database_name == &#34;employee&#34; &amp;&amp; resource.table_name in [&#34;table1&#34;, &#34;table2&#34;] resource.environment_id != &#34;test&#34; || !(resource.project_id in [&#34;poject1&#34;, &#34;prject2&#34;]) resource.instance_id == &#34;sample-instance&#34; &amp;&amp; (resource.database_name == &#34;db1&#34; || resource.database_name == &#34;db2&#34;) |
-| semantic_type | [string](#string) | | The semantic type of data to mask (e.g., &#34;SSN&#34;, &#34;EMAIL&#34;). |
+
+<a name="bytebase-v1-GroupMember-Role"></a>
-<a name="bytebase-v1-Policy"></a>
+### GroupMember.Role
+The role of a group member.
-### Policy
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| ROLE_UNSPECIFIED | 0 | Unspecified role. |
+| OWNER | 1 | Group owner. |
+| MEMBER | 2 | Group member. |
+
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the policy. Format: {resource name}/policies/{policy type} Workspace resource name: &#34;&#34;. Environment resource name: environments/environment-id. Instance resource name: instances/instance-id. Database resource name: instances/instance-id/databases/database-name. |
-| inherit_from_parent | [bool](#bool) | | Whether this policy inherits from its parent resource. |
-| type | [PolicyType](#bytebase-v1-PolicyType) | | The type of policy. |
-| rollout_policy | [RolloutPolicy](#bytebase-v1-RolloutPolicy) | | |
-| masking_rule_policy | [MaskingRulePolicy](#bytebase-v1-MaskingRulePolicy) | | |
-| masking_exception_policy | [MaskingExceptionPolicy](#bytebase-v1-MaskingExceptionPolicy) | | |
-| tag_policy | [TagPolicy](#bytebase-v1-TagPolicy) | | |
-| data_source_query_policy | [DataSourceQueryPolicy](#bytebase-v1-DataSourceQueryPolicy) | | |
-| query_data_policy | [QueryDataPolicy](#bytebase-v1-QueryDataPolicy) | | |
-| enforce | [bool](#bool) | | Whether the policy is enforced. |
-| resource_type | [PolicyResourceType](#bytebase-v1-PolicyResourceType) | | The resource type for the policy. |
+
+<a name="bytebase-v1-GroupService"></a>
+### GroupService
+GroupService manages user groups for organizing users and permissions.
+| Method Name | Request Type | Response Type | Description |
+| ----------- | ------------ | ------------- | ------------|
+| GetGroup | [GetGroupRequest](#bytebase-v1-GetGroupRequest) | [Group](#bytebase-v1-Group) | Gets a group by name. Permissions required: bb.groups.get |
+| BatchGetGroups | [BatchGetGroupsRequest](#bytebase-v1-BatchGetGroupsRequest) | [BatchGetGroupsResponse](#bytebase-v1-BatchGetGroupsResponse) | Gets multiple groups in a single request. Permissions required: bb.groups.get |
+| ListGroups | [ListGroupsRequest](#bytebase-v1-ListGroupsRequest) | [ListGroupsResponse](#bytebase-v1-ListGroupsResponse) | Lists all groups in the workspace. Permissions required: bb.groups.list |
+| CreateGroup | [CreateGroupRequest](#bytebase-v1-CreateGroupRequest) | [Group](#bytebase-v1-Group) | Creates a new group. Permissions required: bb.groups.create |
+| UpdateGroup | [UpdateGroupRequest](#bytebase-v1-UpdateGroupRequest) | [Group](#bytebase-v1-Group) | Updates a group. Group owners or users with bb.groups.update permission can update. Permissions required: bb.groups.update OR caller is group owner When allow_missing=true, also requires: bb.groups.create |
+| DeleteGroup | [DeleteGroupRequest](#bytebase-v1-DeleteGroupRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | Deletes a group. Group owners or users with bb.groups.delete permission can delete. Permissions required: bb.groups.delete OR caller is group owner |
+
+
+
+
+<a name="v1_idp_service-proto"></a>
+<p align="right"><a href="#top">Top</a></p>
+
+## v1/idp_service.proto
-<a name="bytebase-v1-QueryDataPolicy"></a>
-### QueryDataPolicy
-QueryDataPolicy is the policy configuration for querying data.
+
+<a name="bytebase-v1-CreateIdentityProviderRequest"></a>
+
+### CreateIdentityProviderRequest
+
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| timeout | [google.protobuf.Duration](#google-protobuf-Duration) | | The query timeout duration. |
-| disable_export | [bool](#bool) | | Disable data export in the SQL editor. |
-| maximum_result_size | [int64](#int64) | | The maximum result size limit in bytes. The default value is 100MB, we will use the default value if the setting not exists, or the limit &lt;= 0. |
-| maximum_result_rows | [int32](#int32) | | The maximum number of rows to return. The default value is -1, means no limit. |
-| disable_copy_data | [bool](#bool) | | Disable copying query results. |
+| identity_provider | [IdentityProvider](#bytebase-v1-IdentityProvider) | | The identity provider to create. |
+| identity_provider_id | [string](#string) | | The ID to use for the identity provider, which will become the final component of the identity provider&#39;s resource name.
+This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/. |
+| validate_only | [bool](#bool) | | If set to true, the request will be validated without actually creating the identity provider. |
-<a name="bytebase-v1-RolloutPolicy"></a>
-### RolloutPolicy
-Rollout policy configuration.
+<a name="bytebase-v1-DeleteIdentityProviderRequest"></a>
+
+### DeleteIdentityProviderRequest
+
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| automatic | [bool](#bool) | | Whether rollout is automatic without manual approval. |
-| roles | [string](#string) | repeated | The roles that can approve rollout execution. |
-| checkers | [RolloutPolicy.Checkers](#bytebase-v1-RolloutPolicy-Checkers) | | Checkers that must pass before rollout execution. These checks are performed in UI workflows only. |
-
+| name | [string](#string) | | The name of the identity provider to delete. Format: idps/{identity_provider} |
-<a name="bytebase-v1-RolloutPolicy-Checkers"></a>
-### RolloutPolicy.Checkers
+<a name="bytebase-v1-FieldMapping"></a>
+### FieldMapping
+FieldMapping saves the field names from user info API of identity provider.
+As we save all raw json string of user info response data into `principal.idp_user_info`,
+we can extract the relevant data based with `FieldMapping`.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| required_issue_approval | [bool](#bool) | | Whether issue approval is required before proceeding with rollout. |
-| required_status_checks | [RolloutPolicy.Checkers.RequiredStatusChecks](#bytebase-v1-RolloutPolicy-Checkers-RequiredStatusChecks) | | Status checks that must pass before rollout can be executed. |
+| identifier | [string](#string) | | Identifier is the field name of the unique identifier in 3rd-party idp user info. Required. |
+| display_name | [string](#string) | | DisplayName is the field name of display name in 3rd-party idp user info. Optional. |
+| phone | [string](#string) | | Phone is the field name of primary phone in 3rd-party idp user info. Optional. |
+| groups | [string](#string) | | Groups is the field name of groups in 3rd-party idp user info. Optional. Mainly used for OIDC: https://developer.okta.com/docs/guides/customize-tokens-groups-claim/main/ |
-<a name="bytebase-v1-RolloutPolicy-Checkers-RequiredStatusChecks"></a>
+<a name="bytebase-v1-GetIdentityProviderRequest"></a>
-### RolloutPolicy.Checkers.RequiredStatusChecks
+### GetIdentityProviderRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| plan_check_enforcement | [RolloutPolicy.Checkers.PlanCheckEnforcement](#bytebase-v1-RolloutPolicy-Checkers-PlanCheckEnforcement) | | Enforcement level for plan check results during rollout validation. |
+| name | [string](#string) | | The name of the identity provider to retrieve. Format: idps/{idp} |
-<a name="bytebase-v1-SQLReviewRule"></a>
+<a name="bytebase-v1-IdentityProvider"></a>
+
+### IdentityProvider
-### SQLReviewRule
-SQL review rule configuration. Check the SQL_REVIEW_RULES_DOCUMENTATION.md for details.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| type | [string](#string) | | The type of SQL review rule. |
-| level | [SQLReviewRuleLevel](#bytebase-v1-SQLReviewRuleLevel) | | The severity level of the rule. |
-| payload | [string](#string) | | The payload is a JSON string that varies by rule type. |
-| engine | [Engine](#bytebase-v1-Engine) | | The database engine this rule applies to. |
-| comment | [string](#string) | | Additional comment for the rule. |
+| name | [string](#string) | | The name of the identity provider. Format: idps/{idp} |
+| title | [string](#string) | | The display title of the identity provider. |
+| domain | [string](#string) | | The domain for email matching when using this identity provider. |
+| type | [IdentityProviderType](#bytebase-v1-IdentityProviderType) | | The type of identity provider protocol. |
+| config | [IdentityProviderConfig](#bytebase-v1-IdentityProviderConfig) | | The configuration details for the identity provider. |
-<a name="bytebase-v1-TagPolicy"></a>
+<a name="bytebase-v1-IdentityProviderConfig"></a>
+
+### IdentityProviderConfig
-### TagPolicy
-Policy for tagging resources with metadata.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| tags | [TagPolicy.TagsEntry](#bytebase-v1-TagPolicy-TagsEntry) | repeated | tags is the key - value map for resources. for example, the environment resource can have the sql review config tag, like &#34;bb.tag.review_config&#34;: &#34;reviewConfigs/{review config resource id}&#34; |
-
+| oauth2_config | [OAuth2IdentityProviderConfig](#bytebase-v1-OAuth2IdentityProviderConfig) | | OAuth2 protocol configuration. |
+| oidc_config | [OIDCIdentityProviderConfig](#bytebase-v1-OIDCIdentityProviderConfig) | | OIDC protocol configuration. |
+| ldap_config | [LDAPIdentityProviderConfig](#bytebase-v1-LDAPIdentityProviderConfig) | | LDAP protocol configuration. |
-<a name="bytebase-v1-TagPolicy-TagsEntry"></a>
-### TagPolicy.TagsEntry
+<a name="bytebase-v1-LDAPIdentityProviderConfig"></a>
+### LDAPIdentityProviderConfig
+LDAPIdentityProviderConfig is the structure for LDAP identity provider config.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| key | [string](#string) | | |
-| value | [string](#string) | | |
+| host | [string](#string) | | Host is the hostname or IP address of the LDAP server, e.g., &#34;ldap.example.com&#34;. |
+| port | [int32](#int32) | | Port is the port number of the LDAP server, e.g., 389. When not set, the default port of the corresponding security protocol will be used, i.e. 389 for StartTLS and 636 for LDAPS. |
+| skip_tls_verify | [bool](#bool) | | SkipTLSVerify controls whether to skip TLS certificate verification. |
+| bind_dn | [string](#string) | | BindDN is the DN of the user to bind as a service account to perform search requests. |
+| bind_password | [string](#string) | | BindPassword is the password of the user to bind as a service account. |
+| base_dn | [string](#string) | | BaseDN is the base DN to search for users, e.g., &#34;ou=users,dc=example,dc=com&#34;. |
+| user_filter | [string](#string) | | UserFilter is the filter to search for users, e.g., &#34;(uid=%s)&#34;. |
+| security_protocol | [LDAPIdentityProviderConfig.SecurityProtocol](#bytebase-v1-LDAPIdentityProviderConfig-SecurityProtocol) | | SecurityProtocol is the security protocol to be used for establishing connections with the LDAP server. |
+| field_mapping | [FieldMapping](#bytebase-v1-FieldMapping) | | FieldMapping is the mapping of the user attributes returned by the LDAP server. |
-<a name="bytebase-v1-UpdatePolicyRequest"></a>
+<a name="bytebase-v1-ListIdentityProvidersRequest"></a>
-### UpdatePolicyRequest
+### ListIdentityProvidersRequest
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| policy | [Policy](#bytebase-v1-Policy) | | The policy to update.
-The policy&#39;s `name` field is used to identify the instance to update. Format: {resource name}/policies/{policy type} Workspace resource name: &#34;&#34;. Environment resource name: environments/environment-id. Instance resource name: instances/instance-id. Database resource name: instances/instance-id/databases/database-name. |
-| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | The list of fields to update. |
-| allow_missing | [bool](#bool) | | If set to true, and the policy is not found, a new policy will be created. In this situation, `update_mask` is ignored. |
+<a name="bytebase-v1-ListIdentityProvidersResponse"></a>
+### ListIdentityProvidersResponse
-
-<a name="bytebase-v1-DataSourceQueryPolicy-Restriction"></a>
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| identity_providers | [IdentityProvider](#bytebase-v1-IdentityProvider) | repeated | The identity providers from the specified request. |
-### DataSourceQueryPolicy.Restriction
-Restriction level for admin data source access.
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| RESTRICTION_UNSPECIFIED | 0 | Unspecified restriction. |
-| FALLBACK | 1 | Allow querying admin data sources when there is no read-only data source. |
-| DISALLOW | 2 | Disallow querying admin data sources. |
-<a name="bytebase-v1-MaskingExceptionPolicy-MaskingException-Action"></a>
-### MaskingExceptionPolicy.MaskingException.Action
-The action that the exception permits.
+<a name="bytebase-v1-OAuth2IdentityProviderConfig"></a>
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| ACTION_UNSPECIFIED | 0 | Unspecified action. |
-| QUERY | 1 | Allow querying sensitive data. |
-| EXPORT | 2 | Allow exporting sensitive data. |
+### OAuth2IdentityProviderConfig
+OAuth2IdentityProviderConfig is the structure for OAuth2 identity provider config.
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| auth_url | [string](#string) | | The authorization endpoint URL for OAuth2 flow. |
+| token_url | [string](#string) | | The token endpoint URL for exchanging authorization code. |
+| user_info_url | [string](#string) | | The user information endpoint URL. |
+| client_id | [string](#string) | | The OAuth2 client identifier. |
+| client_secret | [string](#string) | | The OAuth2 client secret for authentication. |
+| scopes | [string](#string) | repeated | The list of OAuth2 scopes to request. |
+| field_mapping | [FieldMapping](#bytebase-v1-FieldMapping) | | Mapping configuration for user attributes from OAuth2 response. |
+| skip_tls_verify | [bool](#bool) | | Whether to skip TLS certificate verification. |
+| auth_style | [OAuth2AuthStyle](#bytebase-v1-OAuth2AuthStyle) | | The authentication style for client credentials. |
-<a name="bytebase-v1-PolicyResourceType"></a>
-### PolicyResourceType
-The resource type that a policy can be attached to.
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| RESOURCE_TYPE_UNSPECIFIED | 0 | Unspecified resource type. |
-| WORKSPACE | 1 | Workspace-level policy. |
-| ENVIRONMENT | 2 | Environment-level policy. |
-| PROJECT | 3 | Project-level policy. |
-<a name="bytebase-v1-PolicyType"></a>
+<a name="bytebase-v1-OAuth2IdentityProviderTestRequestContext"></a>
-### PolicyType
-The type of organizational policy.
+### OAuth2IdentityProviderTestRequestContext
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| POLICY_TYPE_UNSPECIFIED | 0 | Unspecified policy type. |
-| ROLLOUT_POLICY | 11 | Rollout deployment policy. |
-| MASKING_RULE | 9 | Data masking rule policy. |
-| MASKING_EXCEPTION | 10 | Data masking exception policy. |
-| TAG | 13 | Resource tag policy. |
-| DATA_SOURCE_QUERY | 14 | Data source query restrictions policy. |
-| DATA_QUERY | 16 | Query data access policy. |
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| code | [string](#string) | | Authorize code from website. |
-<a name="bytebase-v1-RolloutPolicy-Checkers-PlanCheckEnforcement"></a>
-### RolloutPolicy.Checkers.PlanCheckEnforcement
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| PLAN_CHECK_ENFORCEMENT_UNSPECIFIED | 0 | Allow rollout regardless of plan check results (no enforcement). |
-| ERROR_ONLY | 1 | Block rollout only when plan check finds errors. |
-| STRICT | 2 | Block rollout when plan check finds errors or warnings. |
+<a name="bytebase-v1-OIDCIdentityProviderConfig"></a>
-<a name="bytebase-v1-SQLReviewRuleLevel"></a>
+### OIDCIdentityProviderConfig
+OIDCIdentityProviderConfig is the structure for OIDC identity provider config.
-### SQLReviewRuleLevel
-The severity level for SQL review rules.
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| LEVEL_UNSPECIFIED | 0 | Unspecified level. |
-| ERROR | 1 | Rule violation is an error. |
-| WARNING | 2 | Rule violation is a warning. |
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| issuer | [string](#string) | | The OIDC issuer URL for the identity provider. |
+| client_id | [string](#string) | | The OIDC client identifier. |
+| client_secret | [string](#string) | | The OIDC client secret for authentication. |
+| scopes | [string](#string) | repeated | The scopes that the OIDC provider supports. Should be fetched from the well-known configuration file of the OIDC provider. |
+| field_mapping | [FieldMapping](#bytebase-v1-FieldMapping) | | Mapping configuration for user attributes from OIDC claims. |
+| skip_tls_verify | [bool](#bool) | | Whether to skip TLS certificate verification. |
+| auth_style | [OAuth2AuthStyle](#bytebase-v1-OAuth2AuthStyle) | | The authentication style for client credentials. |
+| auth_endpoint | [string](#string) | | The authorization endpoint of the OIDC provider. Should be fetched from the well-known configuration file of the OIDC provider. |
-
-
-<a name="bytebase-v1-OrgPolicyService"></a>
-### OrgPolicyService
-OrgPolicyService manages organizational policies at various resource levels.
+<a name="bytebase-v1-TestIdentityProviderRequest"></a>
-| Method Name | Request Type | Response Type | Description |
-| ----------- | ------------ | ------------- | ------------|
-| GetPolicy | [GetPolicyRequest](#bytebase-v1-GetPolicyRequest) | [Policy](#bytebase-v1-Policy) | Retrieves a policy by name. Permissions required: bb.policies.get |
-| ListPolicies | [ListPoliciesRequest](#bytebase-v1-ListPoliciesRequest) | [ListPoliciesResponse](#bytebase-v1-ListPoliciesResponse) | Lists policies at a specified resource level. Permissions required: bb.policies.list |
-| CreatePolicy | [CreatePolicyRequest](#bytebase-v1-CreatePolicyRequest) | [Policy](#bytebase-v1-Policy) | Creates a new organizational policy. Permissions required: bb.policies.create |
-| UpdatePolicy | [UpdatePolicyRequest](#bytebase-v1-UpdatePolicyRequest) | [Policy](#bytebase-v1-Policy) | Updates an existing organizational policy. Permissions required: bb.policies.update |
-| DeletePolicy | [DeletePolicyRequest](#bytebase-v1-DeletePolicyRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | Deletes an organizational policy. Permissions required: bb.policies.delete |
+### TestIdentityProviderRequest
-
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| identity_provider | [IdentityProvider](#bytebase-v1-IdentityProvider) | | The identity provider to test connection including uncreated. |
+| oauth2_context | [OAuth2IdentityProviderTestRequestContext](#bytebase-v1-OAuth2IdentityProviderTestRequestContext) | | |
+
-<a name="v1_sql_service-proto"></a>
-<p align="right"><a href="#top">Top</a></p>
-## v1/sql_service.proto
-<a name="bytebase-v1-AICompletionRequest"></a>
+<a name="bytebase-v1-TestIdentityProviderResponse"></a>
-### AICompletionRequest
+### TestIdentityProviderResponse
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| messages | [AICompletionRequest.Message](#bytebase-v1-AICompletionRequest-Message) | repeated | |
+| claims | [TestIdentityProviderResponse.ClaimsEntry](#bytebase-v1-TestIdentityProviderResponse-ClaimsEntry) | repeated | The map of claims returned by the identity provider. |
+| user_info | [TestIdentityProviderResponse.UserInfoEntry](#bytebase-v1-TestIdentityProviderResponse-UserInfoEntry) | repeated | The matched user info from the claims. |
-<a name="bytebase-v1-AICompletionRequest-Message"></a>
+<a name="bytebase-v1-TestIdentityProviderResponse-ClaimsEntry"></a>
-### AICompletionRequest.Message
+### TestIdentityProviderResponse.ClaimsEntry
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| role | [string](#string) | | |
-| content | [string](#string) | | |
+| key | [string](#string) | | |
+| value | [string](#string) | | |
-<a name="bytebase-v1-AICompletionResponse"></a>
+<a name="bytebase-v1-TestIdentityProviderResponse-UserInfoEntry"></a>
-### AICompletionResponse
+### TestIdentityProviderResponse.UserInfoEntry
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| candidates | [AICompletionResponse.Candidate](#bytebase-v1-AICompletionResponse-Candidate) | repeated | candidates is used for results with multiple choices and candidates. Used for OpenAI and Gemini. |
+| key | [string](#string) | | |
+| value | [string](#string) | | |
-<a name="bytebase-v1-AICompletionResponse-Candidate"></a>
+<a name="bytebase-v1-UpdateIdentityProviderRequest"></a>
-### AICompletionResponse.Candidate
+### UpdateIdentityProviderRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| content | [AICompletionResponse.Candidate.Content](#bytebase-v1-AICompletionResponse-Candidate-Content) | | |
+| identity_provider | [IdentityProvider](#bytebase-v1-IdentityProvider) | | The identity provider to update.
+
+The identity provider&#39;s `name` field is used to identify the identity provider to update. Format: idps/{identity_provider} |
+| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | The list of fields to update. |
+| allow_missing | [bool](#bool) | | If set to true, and the identity provider is not found, a new identity provider will be created. In this situation, `update_mask` is ignored. |
+
-<a name="bytebase-v1-AICompletionResponse-Candidate-Content"></a>
-### AICompletionResponse.Candidate.Content
+<a name="bytebase-v1-IdentityProviderType"></a>
+### IdentityProviderType
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| parts | [AICompletionResponse.Candidate.Content.Part](#bytebase-v1-AICompletionResponse-Candidate-Content-Part) | repeated | parts is used for a result content with multiple parts. |
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| IDENTITY_PROVIDER_TYPE_UNSPECIFIED | 0 | Unspecified identity provider type. |
+| OAUTH2 | 1 | OAuth 2.0 authentication protocol. |
+| OIDC | 2 | OpenID Connect authentication protocol. |
+| LDAP | 3 | LDAP directory service authentication. |
+<a name="bytebase-v1-LDAPIdentityProviderConfig-SecurityProtocol"></a>
+### LDAPIdentityProviderConfig.SecurityProtocol
-<a name="bytebase-v1-AICompletionResponse-Candidate-Content-Part"></a>
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| SECURITY_PROTOCOL_UNSPECIFIED | 0 | |
+| START_TLS | 1 | StartTLS is the security protocol that starts with an unencrypted connection and then upgrades to TLS. |
+| LDAPS | 2 | LDAPS is the security protocol that uses TLS from the beginning. |
-### AICompletionResponse.Candidate.Content.Part
+<a name="bytebase-v1-OAuth2AuthStyle"></a>
+
+### OAuth2AuthStyle
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| text | [string](#string) | | |
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| OAUTH2_AUTH_STYLE_UNSPECIFIED | 0 | |
+| IN_PARAMS | 1 | IN_PARAMS sends the &#34;client_id&#34; and &#34;client_secret&#34; in the POST body as application/x-www-form-urlencoded parameters. |
+| IN_HEADER | 2 | IN_HEADER sends the client_id and client_password using HTTP Basic Authorization. This is an optional style described in the OAuth2 RFC 6749 section 2.3.1. |
+
+
-<a name="bytebase-v1-AdminExecuteRequest"></a>
+<a name="bytebase-v1-IdentityProviderService"></a>
-### AdminExecuteRequest
+### IdentityProviderService
+IdentityProviderService manages external identity providers for SSO authentication.
+| Method Name | Request Type | Response Type | Description |
+| ----------- | ------------ | ------------- | ------------|
+| GetIdentityProvider | [GetIdentityProviderRequest](#bytebase-v1-GetIdentityProviderRequest) | [IdentityProvider](#bytebase-v1-IdentityProvider) | Gets an identity provider by name. Permissions required: bb.identityProviders.get |
+| ListIdentityProviders | [ListIdentityProvidersRequest](#bytebase-v1-ListIdentityProvidersRequest) | [ListIdentityProvidersResponse](#bytebase-v1-ListIdentityProvidersResponse) | Lists all configured identity providers (public endpoint for login page). Permissions required: None |
+| CreateIdentityProvider | [CreateIdentityProviderRequest](#bytebase-v1-CreateIdentityProviderRequest) | [IdentityProvider](#bytebase-v1-IdentityProvider) | Creates a new identity provider. Permissions required: bb.identityProviders.create |
+| UpdateIdentityProvider | [UpdateIdentityProviderRequest](#bytebase-v1-UpdateIdentityProviderRequest) | [IdentityProvider](#bytebase-v1-IdentityProvider) | Updates an identity provider. Permissions required: bb.identityProviders.update When allow_missing=true, also requires: bb.identityProviders.create |
+| DeleteIdentityProvider | [DeleteIdentityProviderRequest](#bytebase-v1-DeleteIdentityProviderRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | Deletes an identity provider. Permissions required: bb.identityProviders.delete |
+| TestIdentityProvider | [TestIdentityProviderRequest](#bytebase-v1-TestIdentityProviderRequest) | [TestIdentityProviderResponse](#bytebase-v1-TestIdentityProviderResponse) | Tests the connection and configuration of an identity provider. Permissions required: bb.identityProviders.update |
+
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| 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="v1_org_policy_service-proto"></a>
+<p align="right"><a href="#top">Top</a></p>
+## v1/org_policy_service.proto
-<a name="bytebase-v1-AdminExecuteResponse"></a>
+<a name="bytebase-v1-CreatePolicyRequest"></a>
-### AdminExecuteResponse
+### CreatePolicyRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| results | [QueryResult](#bytebase-v1-QueryResult) | repeated | The query results. |
-
+| parent | [string](#string) | | The parent resource where this instance will be created. Workspace resource name: &#34;&#34;. Environment resource name: environments/environment-id. Instance resource name: instances/instance-id. Database resource name: instances/instance-id/databases/database-name. |
+| policy | [Policy](#bytebase-v1-Policy) | | The policy to create. |
+| type | [PolicyType](#bytebase-v1-PolicyType) | | The type of policy to create. |
-<a name="bytebase-v1-Advice"></a>
-### Advice
+<a name="bytebase-v1-DataSourceQueryPolicy"></a>
+### DataSourceQueryPolicy
+Policy for controlling which data sources can be queried in the SQL editor.
| 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) | | |
+| admin_data_source_restriction | [DataSourceQueryPolicy.Restriction](#bytebase-v1-DataSourceQueryPolicy-Restriction) | | Restriction for admin data source queries. |
+| disallow_ddl | [bool](#bool) | | Disallow running DDL statements in the SQL editor. |
+| disallow_dml | [bool](#bool) | | Disallow running DML statements in the SQL editor. |
-<a name="bytebase-v1-DiffMetadataRequest"></a>
+<a name="bytebase-v1-DeletePolicyRequest"></a>
-### DiffMetadataRequest
+### DeletePolicyRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| source_metadata | [DatabaseMetadata](#bytebase-v1-DatabaseMetadata) | | The metadata of the source schema. |
-| target_metadata | [DatabaseMetadata](#bytebase-v1-DatabaseMetadata) | | The metadata of the target schema. |
-| source_catalog | [DatabaseCatalog](#bytebase-v1-DatabaseCatalog) | | |
-| target_catalog | [DatabaseCatalog](#bytebase-v1-DatabaseCatalog) | | |
-| engine | [Engine](#bytebase-v1-Engine) | | The database engine of the schema. |
-| classification_from_config | [bool](#bool) | | If false, we will build the raw common by classification in database config. |
+| name | [string](#string) | | The policy&#39;s `name` field is used to identify the instance to update. Format: {resource name}/policies/{policy type} Workspace resource name: &#34;&#34;. Environment resource name: environments/environment-id. Instance resource name: instances/instance-id. Database resource name: instances/instance-id/databases/database-name. |
-<a name="bytebase-v1-DiffMetadataResponse"></a>
+<a name="bytebase-v1-GetPolicyRequest"></a>
-### DiffMetadataResponse
+### GetPolicyRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| diff | [string](#string) | | The diff of the metadata. |
+| name | [string](#string) | | The name of the policy to retrieve. Format: {resource type}/{resource id}/policies/{policy type} |
-<a name="bytebase-v1-ExportRequest"></a>
+<a name="bytebase-v1-ListPoliciesRequest"></a>
-### ExportRequest
+### ListPoliciesRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name is the resource name to execute the export against. Format: instances/{instance}/databases/{database} Format: instances/{instance} Format: projects/{project}/rollouts/{rollout} Format: projects/{project}/rollouts/{rollout}/stages/{stage} |
-| statement | [string](#string) | | The SQL statement to execute. |
-| limit | [int32](#int32) | | The maximum number of rows to return. |
-| format | [ExportFormat](#bytebase-v1-ExportFormat) | | The export format. |
-| admin | [bool](#bool) | | The admin is used for workspace owner and DBA for exporting data from SQL Editor Admin mode. The exported data is not masked. |
-| password | [string](#string) | | The zip password provide by users. |
-| data_source_id | [string](#string) | | The id of data source. It is used for querying admin data source even if the instance has read-only data sources. Or it can be used to query a specific read-only data source. |
-| schema | [string](#string) | optional | The default schema to search objects. Equals to the current schema in Oracle and search path in Postgres. |
+| parent | [string](#string) | | The parent, which owns this collection of policies. Format: {resource type}/{resource id} |
+| policy_type | [PolicyType](#bytebase-v1-PolicyType) | optional | Filter by specific policy type. |
+| show_deleted | [bool](#bool) | | Show deleted policies if specified. |
-<a name="bytebase-v1-ExportResponse"></a>
+<a name="bytebase-v1-ListPoliciesResponse"></a>
-### ExportResponse
+### ListPoliciesResponse
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| content | [bytes](#bytes) | | The export file content. |
-
+| policies | [Policy](#bytebase-v1-Policy) | repeated | The policies from the specified request. |
-<a name="bytebase-v1-MaskingReason"></a>
-### MaskingReason
+<a name="bytebase-v1-MaskingExceptionPolicy"></a>
+### MaskingExceptionPolicy
+MaskingExceptionPolicy is the allowlist of users who can access sensitive data.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| semantic_type_id | [string](#string) | | The semantic type that triggered masking (e.g., &#34;SSN&#34;, &#34;email&#34;, &#34;phone&#34;). |
-| semantic_type_title | [string](#string) | | Human-readable semantic type title. |
-| masking_rule_id | [string](#string) | | The masking rule ID that matched (if applicable). |
-| algorithm | [string](#string) | | The masking algorithm used. |
-| context | [string](#string) | | Additional context (e.g., &#34;Matched global rule: PII Protection&#34;). |
-| classification_level | [string](#string) | | Whether masking was due to classification level. |
-| semantic_type_icon | [string](#string) | | Icon associated with the semantic type (if any). |
-
+| masking_exceptions | [MaskingExceptionPolicy.MaskingException](#bytebase-v1-MaskingExceptionPolicy-MaskingException) | repeated | The list of masking exceptions. |
-<a name="bytebase-v1-QueryHistory"></a>
-### QueryHistory
+<a name="bytebase-v1-MaskingExceptionPolicy-MaskingException"></a>
+### MaskingExceptionPolicy.MaskingException
+An exception allowing specific users to access masked data.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name for the query history. Format: queryHistories/{uid} |
-| database | [string](#string) | | The database name to execute the query. Format: instances/{instance}/databases/{databaseName} |
-| creator | [string](#string) | | |
-| create_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |
-| statement | [string](#string) | | |
-| error | [string](#string) | optional | |
-| duration | [google.protobuf.Duration](#google-protobuf-Duration) | | |
-| type | [QueryHistory.Type](#bytebase-v1-QueryHistory-Type) | | |
+| action | [MaskingExceptionPolicy.MaskingException.Action](#bytebase-v1-MaskingExceptionPolicy-MaskingException-Action) | | The action that the user can perform on sensitive data. |
+| member | [string](#string) | | Member is the principal who bind to this exception policy instance.
+- `user:{email}`: An email address that represents a specific Bytebase account. For example, `[email protected]`. - `group:{email}`: An email address for group. |
+| condition | [google.type.Expr](#google-type-Expr) | | The condition that is associated with this exception policy instance. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec If the condition is empty, means the user can access all databases without expiration.
+Support variables: resource.instance_id: the instance resource id. Only support &#34;==&#34; operation. resource.database_name: the database name. Only support &#34;==&#34; operation. resource.schema_name: the schema name. Only support &#34;==&#34; operation. resource.table_name: the table name. Only support &#34;==&#34; operation. resource.column_name: the column name. Only support &#34;==&#34; operation. request.time: the expiration. Only support &#34;&lt;&#34; operation in `request.time &lt; timestamp(&#34;{ISO datetime string format}&#34;)` All variables should join with &#34;&amp;&amp;&#34; condition.
+For example: resource.instance_id == &#34;local&#34; &amp;&amp; resource.database_name == &#34;employee&#34; &amp;&amp; request.time &lt; timestamp(&#34;2025-04-30T11:10:39.000Z&#34;) resource.instance_id == &#34;local&#34; &amp;&amp; resource.database_name == &#34;employee&#34; |
-<a name="bytebase-v1-QueryOption"></a>
-### QueryOption
+<a name="bytebase-v1-MaskingRulePolicy"></a>
+
+### MaskingRulePolicy
+Policy for configuring data masking rules.
+
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| redis_run_commands_on | [QueryOption.RedisRunCommandsOn](#bytebase-v1-QueryOption-RedisRunCommandsOn) | | |
-
+| rules | [MaskingRulePolicy.MaskingRule](#bytebase-v1-MaskingRulePolicy-MaskingRule) | repeated | The list of masking rules. |
-<a name="bytebase-v1-QueryRequest"></a>
-### QueryRequest
+<a name="bytebase-v1-MaskingRulePolicy-MaskingRule"></a>
+### MaskingRulePolicy.MaskingRule
+A rule that defines when and how to mask data.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name is the instance name to execute the query against. Format: instances/{instance}/databases/{databaseName} |
-| statement | [string](#string) | | The SQL statement to execute. |
-| limit | [int32](#int32) | | The maximum number of rows to return. |
-| data_source_id | [string](#string) | | The id of data source. It is used for querying admin data source even if the instance has read-only data sources. Or it can be used to query a specific read-only data source. |
-| explain | [bool](#bool) | | Explain the statement. |
-| schema | [string](#string) | optional | The default schema to search objects. Equals to the current schema in Oracle and search path in Postgres. |
-| query_option | [QueryOption](#bytebase-v1-QueryOption) | | |
-| container | [string](#string) | optional | Container is the container name to execute the query against, used for CosmosDB only. |
+| id | [string](#string) | | A unique identifier for the rule in UUID format. |
+| condition | [google.type.Expr](#google-type-Expr) | | The condition for the masking rule. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
+Support variables: resource.environment_id: the environment resource id. resource.project_id: the project resource id. resource.instance_id: the instance resource id. resource.database_name: the database name. resource.table_name: the table name. resource.column_name: the column name. resource.classification_level: the classification level.
+Each variable support following operations: ==: the value equals the target. !=: the value not equals the target. in: the value matches one of the targets. !(in): the value not matches any of the targets.
+For example: resource.environment_id == &#34;test&#34; &amp;&amp; resource.project_id == &#34;sample-project&#34; resource.instance_id == &#34;sample-instance&#34; &amp;&amp; resource.database_name == &#34;employee&#34; &amp;&amp; resource.table_name in [&#34;table1&#34;, &#34;table2&#34;] resource.environment_id != &#34;test&#34; || !(resource.project_id in [&#34;poject1&#34;, &#34;prject2&#34;]) resource.instance_id == &#34;sample-instance&#34; &amp;&amp; (resource.database_name == &#34;db1&#34; || resource.database_name == &#34;db2&#34;) |
+| semantic_type | [string](#string) | | The semantic type of data to mask (e.g., &#34;SSN&#34;, &#34;EMAIL&#34;). |
-<a name="bytebase-v1-QueryResponse"></a>
-### QueryResponse
+<a name="bytebase-v1-Policy"></a>
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| results | [QueryResult](#bytebase-v1-QueryResult) | repeated | The query results. |
+### Policy
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| name | [string](#string) | | The name of the policy. Format: {resource name}/policies/{policy type} Workspace resource name: &#34;&#34;. Environment resource name: environments/environment-id. Instance resource name: instances/instance-id. Database resource name: instances/instance-id/databases/database-name. |
+| inherit_from_parent | [bool](#bool) | | Whether this policy inherits from its parent resource. |
+| type | [PolicyType](#bytebase-v1-PolicyType) | | The type of policy. |
+| rollout_policy | [RolloutPolicy](#bytebase-v1-RolloutPolicy) | | |
+| masking_rule_policy | [MaskingRulePolicy](#bytebase-v1-MaskingRulePolicy) | | |
+| masking_exception_policy | [MaskingExceptionPolicy](#bytebase-v1-MaskingExceptionPolicy) | | |
+| tag_policy | [TagPolicy](#bytebase-v1-TagPolicy) | | |
+| data_source_query_policy | [DataSourceQueryPolicy](#bytebase-v1-DataSourceQueryPolicy) | | |
+| query_data_policy | [QueryDataPolicy](#bytebase-v1-QueryDataPolicy) | | |
+| enforce | [bool](#bool) | | Whether the policy is enforced. |
+| resource_type | [PolicyResourceType](#bytebase-v1-PolicyResourceType) | | The resource type for the policy. |
-<a name="bytebase-v1-QueryResult"></a>
-### QueryResult
+<a name="bytebase-v1-QueryDataPolicy"></a>
+
+### QueryDataPolicy
+QueryDataPolicy is the policy configuration for querying data.
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| column_names | [string](#string) | repeated | Column names of the query result. |
-| column_type_names | [string](#string) | repeated | Column types of the query result. The types come from the Golang SQL driver. |
-| rows | [QueryRow](#bytebase-v1-QueryRow) | repeated | Rows of the query result. |
-| rows_count | [int64](#int64) | | |
-| error | [string](#string) | | The error message if the query failed. |
-| latency | [google.protobuf.Duration](#google-protobuf-Duration) | | The time it takes to execute the query. |
-| statement | [string](#string) | | The query statement for the result. |
-| postgres_error | [QueryResult.PostgresError](#bytebase-v1-QueryResult-PostgresError) | | |
-| allow_export | [bool](#bool) | | The query result is allowed to be exported or not. |
-| messages | [QueryResult.Message](#bytebase-v1-QueryResult-Message) | repeated | Informational or debug messages returned by the database engine during query execution. Examples include PostgreSQL&#39;s RAISE NOTICE, MSSQL&#39;s PRINT, or Oracle&#39;s DBMS_OUTPUT.PUT_LINE. |
-| masked | [MaskingReason](#bytebase-v1-MaskingReason) | repeated | Masking reasons for each column (empty for non-masked columns). |
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| timeout | [google.protobuf.Duration](#google-protobuf-Duration) | | The query timeout duration. |
+| disable_export | [bool](#bool) | | Disable data export in the SQL editor. |
+| maximum_result_size | [int64](#int64) | | The maximum result size limit in bytes. The default value is 100MB, we will use the default value if the setting not exists, or the limit &lt;= 0. |
+| maximum_result_rows | [int32](#int32) | | The maximum number of rows to return. The default value is -1, means no limit. |
+| disable_copy_data | [bool](#bool) | | Disable copying query results. |
-<a name="bytebase-v1-QueryResult-Message"></a>
-### QueryResult.Message
+<a name="bytebase-v1-RolloutPolicy"></a>
+### RolloutPolicy
+Rollout policy configuration.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| level | [QueryResult.Message.Level](#bytebase-v1-QueryResult-Message-Level) | | |
-| content | [string](#string) | | |
+| automatic | [bool](#bool) | | Whether rollout is automatic without manual approval. |
+| roles | [string](#string) | repeated | The roles that can approve rollout execution. |
+| checkers | [RolloutPolicy.Checkers](#bytebase-v1-RolloutPolicy-Checkers) | | Checkers that must pass before rollout execution. These checks are performed in UI workflows only. |
-<a name="bytebase-v1-QueryResult-PostgresError"></a>
+<a name="bytebase-v1-RolloutPolicy-Checkers"></a>
+
+### RolloutPolicy.Checkers
-### QueryResult.PostgresError
-refer https://www.postgresql.org/docs/11/protocol-error-fields.html
-for field description.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| severity | [string](#string) | | |
-| code | [string](#string) | | |
-| message | [string](#string) | | |
-| detail | [string](#string) | | |
-| hint | [string](#string) | | |
-| position | [int32](#int32) | | |
-| internal_position | [int32](#int32) | | |
-| internal_query | [string](#string) | | |
-| where | [string](#string) | | |
-| schema_name | [string](#string) | | |
-| table_name | [string](#string) | | |
-| column_name | [string](#string) | | |
-| data_type_name | [string](#string) | | |
-| constraint_name | [string](#string) | | |
-| file | [string](#string) | | |
-| line | [int32](#int32) | | |
-| routine | [string](#string) | | |
+| required_issue_approval | [bool](#bool) | | Whether issue approval is required before proceeding with rollout. |
+| required_status_checks | [RolloutPolicy.Checkers.RequiredStatusChecks](#bytebase-v1-RolloutPolicy-Checkers-RequiredStatusChecks) | | Status checks that must pass before rollout can be executed. |
-<a name="bytebase-v1-QueryRow"></a>
+<a name="bytebase-v1-RolloutPolicy-Checkers-RequiredStatusChecks"></a>
-### QueryRow
+### RolloutPolicy.Checkers.RequiredStatusChecks
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| values | [RowValue](#bytebase-v1-RowValue) | repeated | Row values of the query result. |
-
+| plan_check_enforcement | [RolloutPolicy.Checkers.PlanCheckEnforcement](#bytebase-v1-RolloutPolicy-Checkers-PlanCheckEnforcement) | | Enforcement level for plan check results during rollout validation. |
-<a name="bytebase-v1-RowValue"></a>
-### RowValue
+<a name="bytebase-v1-SQLReviewRule"></a>
+### SQLReviewRule
+SQL review rule configuration. Check the SQL_REVIEW_RULES_DOCUMENTATION.md for details.
| 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. |
-
+| type | [string](#string) | | The type of SQL review rule. |
+| level | [SQLReviewRuleLevel](#bytebase-v1-SQLReviewRuleLevel) | | The severity level of the rule. |
+| payload | [string](#string) | | The payload is a JSON string that varies by rule type. |
+| engine | [Engine](#bytebase-v1-Engine) | | The database engine this rule applies to. |
+| comment | [string](#string) | | Additional comment for the rule. |
-<a name="bytebase-v1-RowValue-Timestamp"></a>
-### RowValue.Timestamp
+<a name="bytebase-v1-TagPolicy"></a>
+### TagPolicy
+Policy for tagging resources with metadata.
| 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. |
+| tags | [TagPolicy.TagsEntry](#bytebase-v1-TagPolicy-TagsEntry) | repeated | tags is the key - value map for resources. for example, the environment resource can have the sql review config tag, like &#34;bb.tag.review_config&#34;: &#34;reviewConfigs/{review config resource id}&#34; |
-<a name="bytebase-v1-RowValue-TimestampTZ"></a>
+<a name="bytebase-v1-TagPolicy-TagsEntry"></a>
-### RowValue.TimestampTZ
+### TagPolicy.TagsEntry
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| google_timestamp | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |
-| zone | [string](#string) | | Zone is the time zone abbreviations in timezone database such as &#34;PDT&#34;, &#34;PST&#34;. https://en.wikipedia.org/wiki/List_of_tz_database_time_zones We retrieve the time zone information from the timestamptz field in the database. A timestamp is in UTC or epoch time, and with zone info, we can convert it to a local time string. Zone and offset are returned by time.Time.Zone() |
-| offset | [int32](#int32) | | The offset is in seconds east of UTC |
-| accuracy | [int32](#int32) | | |
+| key | [string](#string) | | |
+| value | [string](#string) | | |
-<a name="bytebase-v1-SearchQueryHistoriesRequest"></a>
+<a name="bytebase-v1-UpdatePolicyRequest"></a>
-### SearchQueryHistoriesRequest
+### UpdatePolicyRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| page_size | [int32](#int32) | | The maximum number of histories to return. The service may return fewer than this value. If unspecified, at most 10 history entries will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. |
-| page_token | [string](#string) | | A page token, received from a previous `ListQueryHistory` call. Provide this to retrieve the subsequent page. |
-| filter | [string](#string) | | Filter is the filter to apply on the search query history The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
-
-Supported filter: - project: the project full name in &#34;projects/{id}&#34; format, support &#34;==&#34; operator. - database: the database full name in &#34;instances/{id}/databases/{name}&#34; format, support &#34;==&#34; operator. - instance: the instance full name in &#34;instances/{id}&#34; format, support &#34;==&#34; operator. - type: the type, should be &#34;QUERY&#34; or &#34;EXPORT&#34;, support &#34;==&#34; operator. - statement: the SQL statement, support &#34;.matches()&#34; operator.
+| policy | [Policy](#bytebase-v1-Policy) | | The policy to update.
-For example: project == &#34;projects/{project}&#34; database == &#34;instances/{instance}/databases/{database}&#34; instance == &#34;instances/{instance}&#34; type == &#34;QUERY&#34; type == &#34;EXPORT&#34; statement.matches(&#34;select&#34;) type == &#34;QUERY&#34; &amp;&amp; statement.matches(&#34;select&#34;) |
+The policy&#39;s `name` field is used to identify the instance to update. Format: {resource name}/policies/{policy type} Workspace resource name: &#34;&#34;. Environment resource name: environments/environment-id. Instance resource name: instances/instance-id. Database resource name: instances/instance-id/databases/database-name. |
+| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | The list of fields to update. |
+| allow_missing | [bool](#bool) | | If set to true, and the policy is not found, a new policy will be created. In this situation, `update_mask` is ignored. |
+
-<a name="bytebase-v1-SearchQueryHistoriesResponse"></a>
-### SearchQueryHistoriesResponse
+<a name="bytebase-v1-DataSourceQueryPolicy-Restriction"></a>
+### DataSourceQueryPolicy.Restriction
+Restriction level for admin data source access.
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| RESTRICTION_UNSPECIFIED | 0 | Unspecified restriction. |
+| FALLBACK | 1 | Allow querying admin data sources when there is no read-only data source. |
+| DISALLOW | 2 | Disallow querying admin data sources. |
-| 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. |
+<a name="bytebase-v1-MaskingExceptionPolicy-MaskingException-Action"></a>
+### MaskingExceptionPolicy.MaskingException.Action
+The action that the exception permits.
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| ACTION_UNSPECIFIED | 0 | Unspecified action. |
+| QUERY | 1 | Allow querying sensitive data. |
+| EXPORT | 2 | Allow exporting sensitive data. |
-
-<a name="bytebase-v1-Advice-Level"></a>
+<a name="bytebase-v1-PolicyResourceType"></a>
-### Advice.Level
-Level represents the severity level of the advice.
+### PolicyResourceType
+The resource type that a policy can be attached to.
| 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. |
-
+| RESOURCE_TYPE_UNSPECIFIED | 0 | Unspecified resource type. |
+| WORKSPACE | 1 | Workspace-level policy. |
+| ENVIRONMENT | 2 | Environment-level policy. |
+| PROJECT | 3 | Project-level policy. |
-<a name="bytebase-v1-QueryHistory-Type"></a>
-### QueryHistory.Type
+<a name="bytebase-v1-PolicyType"></a>
+### PolicyType
+The type of organizational policy.
| Name | Number | Description |
| ---- | ------ | ----------- |
-| TYPE_UNSPECIFIED | 0 | Unspecified query history type. |
-| QUERY | 1 | Query execution for data retrieval. |
-| EXPORT | 2 | Data export operation to file. |
+| POLICY_TYPE_UNSPECIFIED | 0 | Unspecified policy type. |
+| ROLLOUT_POLICY | 11 | Rollout deployment policy. |
+| MASKING_RULE | 9 | Data masking rule policy. |
+| MASKING_EXCEPTION | 10 | Data masking exception policy. |
+| TAG | 13 | Resource tag policy. |
+| DATA_SOURCE_QUERY | 14 | Data source query restrictions policy. |
+| DATA_QUERY | 16 | Query data access policy. |
-<a name="bytebase-v1-QueryOption-RedisRunCommandsOn"></a>
+<a name="bytebase-v1-RolloutPolicy-Checkers-PlanCheckEnforcement"></a>
-### QueryOption.RedisRunCommandsOn
+### RolloutPolicy.Checkers.PlanCheckEnforcement
| 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. |
-
+| PLAN_CHECK_ENFORCEMENT_UNSPECIFIED | 0 | Allow rollout regardless of plan check results (no enforcement). |
+| ERROR_ONLY | 1 | Block rollout only when plan check finds errors. |
+| STRICT | 2 | Block rollout when plan check finds errors or warnings. |
-<a name="bytebase-v1-QueryResult-Message-Level"></a>
-### QueryResult.Message.Level
+<a name="bytebase-v1-SQLReviewRuleLevel"></a>
+### SQLReviewRuleLevel
+The severity level for SQL review rules.
| 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. |
+| LEVEL_UNSPECIFIED | 0 | Unspecified level. |
+| ERROR | 1 | Rule violation is an error. |
+| WARNING | 2 | Rule violation is a warning. |
@@ -7748,518 +7670,584 @@ Level represents the severity level of the advice.
-<a name="bytebase-v1-SQLService"></a>
+<a name="bytebase-v1-OrgPolicyService"></a>
-### SQLService
-SQLService executes SQL queries and manages query operations.
+### OrgPolicyService
+OrgPolicyService manages organizational policies at various resource levels.
| Method Name | Request Type | Response Type | Description |
| ----------- | ------------ | ------------- | ------------|
-| Query | [QueryRequest](#bytebase-v1-QueryRequest) | [QueryResponse](#bytebase-v1-QueryResponse) | Executes a read-only SQL query against a database. Permissions required: bb.databases.get |
-| AdminExecute | [AdminExecuteRequest](#bytebase-v1-AdminExecuteRequest) stream | [AdminExecuteResponse](#bytebase-v1-AdminExecuteResponse) stream | Executes SQL with admin privileges via streaming connection. Permissions required: bb.sql.admin |
-| SearchQueryHistories | [SearchQueryHistoriesRequest](#bytebase-v1-SearchQueryHistoriesRequest) | [SearchQueryHistoriesResponse](#bytebase-v1-SearchQueryHistoriesResponse) | SearchQueryHistories searches query histories for the caller. Permissions required: None (only returns caller&#39;s own query histories) |
-| Export | [ExportRequest](#bytebase-v1-ExportRequest) | [ExportResponse](#bytebase-v1-ExportResponse) | Exports query results to a file format. Permissions required: bb.databases.get |
-| DiffMetadata | [DiffMetadataRequest](#bytebase-v1-DiffMetadataRequest) | [DiffMetadataResponse](#bytebase-v1-DiffMetadataResponse) | Computes schema differences between two database metadata. Permissions required: None |
-| AICompletion | [AICompletionRequest](#bytebase-v1-AICompletionRequest) | [AICompletionResponse](#bytebase-v1-AICompletionResponse) | Provides AI-powered SQL completion and generation. Permissions required: None (authenticated users only, requires AI to be enabled) |
+| GetPolicy | [GetPolicyRequest](#bytebase-v1-GetPolicyRequest) | [Policy](#bytebase-v1-Policy) | Retrieves a policy by name. Permissions required: bb.policies.get |
+| ListPolicies | [ListPoliciesRequest](#bytebase-v1-ListPoliciesRequest) | [ListPoliciesResponse](#bytebase-v1-ListPoliciesResponse) | Lists policies at a specified resource level. Permissions required: bb.policies.list |
+| CreatePolicy | [CreatePolicyRequest](#bytebase-v1-CreatePolicyRequest) | [Policy](#bytebase-v1-Policy) | Creates a new organizational policy. Permissions required: bb.policies.create |
+| UpdatePolicy | [UpdatePolicyRequest](#bytebase-v1-UpdatePolicyRequest) | [Policy](#bytebase-v1-Policy) | Updates an existing organizational policy. Permissions required: bb.policies.update |
+| DeletePolicy | [DeletePolicyRequest](#bytebase-v1-DeletePolicyRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | Deletes an organizational policy. Permissions required: bb.policies.delete |
-<a name="v1_plan_service-proto"></a>
+<a name="v1_sql_service-proto"></a>
<p align="right"><a href="#top">Top</a></p>
-## v1/plan_service.proto
+## v1/sql_service.proto
-<a name="bytebase-v1-BatchCancelPlanCheckRunsRequest"></a>
+<a name="bytebase-v1-AICompletionRequest"></a>
-### BatchCancelPlanCheckRunsRequest
+### AICompletionRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| parent | [string](#string) | | The name of the parent of the planChecks. Format: projects/{project}/plans/{plan} |
-| plan_check_runs | [string](#string) | repeated | TODO(d): update this API. The planCheckRuns to cancel. Format: projects/{project}/plans/{plan}/planCheckRuns/{planCheckRun} |
+| messages | [AICompletionRequest.Message](#bytebase-v1-AICompletionRequest-Message) | repeated | |
-<a name="bytebase-v1-BatchCancelPlanCheckRunsResponse"></a>
+<a name="bytebase-v1-AICompletionRequest-Message"></a>
+
+### AICompletionRequest.Message
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| role | [string](#string) | | |
+| content | [string](#string) | | |
+
+
+
+
+
+
+<a name="bytebase-v1-AICompletionResponse"></a>
+
+### AICompletionResponse
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| candidates | [AICompletionResponse.Candidate](#bytebase-v1-AICompletionResponse-Candidate) | repeated | candidates is used for results with multiple choices and candidates. Used for OpenAI and Gemini. |
+
+
+
+
+
+
+<a name="bytebase-v1-AICompletionResponse-Candidate"></a>
+
+### AICompletionResponse.Candidate
-### BatchCancelPlanCheckRunsResponse
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| content | [AICompletionResponse.Candidate.Content](#bytebase-v1-AICompletionResponse-Candidate-Content) | | |
+
-<a name="bytebase-v1-CreatePlanRequest"></a>
+<a name="bytebase-v1-AICompletionResponse-Candidate-Content"></a>
-### CreatePlanRequest
+### AICompletionResponse.Candidate.Content
| 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. |
+| parts | [AICompletionResponse.Candidate.Content.Part](#bytebase-v1-AICompletionResponse-Candidate-Content-Part) | repeated | parts is used for a result content with multiple parts. |
-<a name="bytebase-v1-GetPlanRequest"></a>
+<a name="bytebase-v1-AICompletionResponse-Candidate-Content-Part"></a>
-### GetPlanRequest
+### AICompletionResponse.Candidate.Content.Part
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the plan to retrieve. Format: projects/{project}/plans/{plan} |
+| text | [string](#string) | | |
-<a name="bytebase-v1-ListPlanCheckRunsRequest"></a>
+<a name="bytebase-v1-AdminExecuteRequest"></a>
-### ListPlanCheckRunsRequest
+### AdminExecuteRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| parent | [string](#string) | | The parent, which owns this collection of plan check runs. Format: projects/{project}/plans/{plan} |
-| latest_only | [bool](#bool) | | If set to true, only the latest plan check run will be returned. |
-| filter | [string](#string) | | Filter is used to filter plan check runs returned in the list. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
-
-Supported filters: - status: the plan check run status, support &#34;==&#34; and &#34;in&#34; operator, check the Status enum in the PlanCheckRun message for the values. - result_status: the plan check run result status, support &#34;==&#34; and &#34;in&#34; operator, check the Result.Status enum in the PlanCheckRun message for the values.
-
-For example: status in [&#34;DONE&#34;, &#34;FAILED&#34;] status == &#34;RUNNING&#34; result_status in [&#34;SUCCESS&#34;, &#34;ERROR&#34;] result_status == &#34;WARNING&#34; |
+| 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-ListPlanCheckRunsResponse"></a>
+<a name="bytebase-v1-AdminExecuteResponse"></a>
-### ListPlanCheckRunsResponse
+### AdminExecuteResponse
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| plan_check_runs | [PlanCheckRun](#bytebase-v1-PlanCheckRun) | repeated | The plan check runs from the specified request. |
+| results | [QueryResult](#bytebase-v1-QueryResult) | repeated | The query results. |
-<a name="bytebase-v1-ListPlansRequest"></a>
+<a name="bytebase-v1-Advice"></a>
-### ListPlansRequest
+### Advice
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| parent | [string](#string) | | The parent, which owns this collection of plans. Format: projects/{project} Use &#34;projects/-&#34; to list all plans from all projects. |
-| page_size | [int32](#int32) | | The maximum number of plans to return. The service may return fewer than this value. If unspecified, at most 10 plans will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. |
-| page_token | [string](#string) | | A page token, received from a previous `ListPlans` call. Provide this to retrieve the subsequent page.
-
-When paginating, all other parameters provided to `ListPlans` must match the call that provided the page token. |
+| status | [Advice.Level](#bytebase-v1-Advice-Level) | | The advice level. |
+| code | [int32](#int32) | | The advice code. |
+| title | [string](#string) | | The advice title. |
+| content | [string](#string) | | The advice content. |
+| start_position | [Position](#bytebase-v1-Position) | | The start_position is inclusive and the end_position is exclusive. TODO: use range instead |
+| end_position | [Position](#bytebase-v1-Position) | | |
-<a name="bytebase-v1-ListPlansResponse"></a>
+<a name="bytebase-v1-DiffMetadataRequest"></a>
-### ListPlansResponse
+### DiffMetadataRequest
| 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. |
+| source_metadata | [DatabaseMetadata](#bytebase-v1-DatabaseMetadata) | | The metadata of the source schema. |
+| target_metadata | [DatabaseMetadata](#bytebase-v1-DatabaseMetadata) | | The metadata of the target schema. |
+| source_catalog | [DatabaseCatalog](#bytebase-v1-DatabaseCatalog) | | |
+| target_catalog | [DatabaseCatalog](#bytebase-v1-DatabaseCatalog) | | |
+| engine | [Engine](#bytebase-v1-Engine) | | The database engine of the schema. |
+| classification_from_config | [bool](#bool) | | If false, we will build the raw common by classification in database config. |
-<a name="bytebase-v1-Plan"></a>
+<a name="bytebase-v1-DiffMetadataResponse"></a>
-### Plan
+### DiffMetadataResponse
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the plan. `plan` is a system generated ID. Format: projects/{project}/plans/{plan} |
-| state | [State](#bytebase-v1-State) | | The state of the plan. |
-| issue | [string](#string) | | The issue associated with the plan. Can be empty. Format: projects/{project}/issues/{issue} |
-| rollout | [string](#string) | | The rollout associated with the plan. Can be empty. Format: projects/{project}/rollouts/{rollout} |
-| title | [string](#string) | | The title of the plan. |
-| description | [string](#string) | | The description of the plan. |
-| specs | [Plan.Spec](#bytebase-v1-Plan-Spec) | repeated | The deployment specs for the plan. |
-| creator | [string](#string) | | Format: users/[email protected] |
-| create_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |
-| update_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |
-| plan_check_run_status_count | [Plan.PlanCheckRunStatusCountEntry](#bytebase-v1-Plan-PlanCheckRunStatusCountEntry) | repeated | The status count of the latest plan check runs. Keys are: - SUCCESS - WARNING - ERROR - RUNNING |
-| deployment | [Plan.Deployment](#bytebase-v1-Plan-Deployment) | | |
+| diff | [string](#string) | | The diff of the metadata. |
-<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} |
-| type | [DatabaseChangeType](#bytebase-v1-DatabaseChangeType) | | Type is the database change type. |
-| migration_type | [MigrationType](#bytebase-v1-MigrationType) | | migration_type is the migration type for imperative schema migration. It is only set when type is MIGRATE. |
-| ghost_flags | [Plan.ChangeDatabaseConfig.GhostFlagsEntry](#bytebase-v1-Plan-ChangeDatabaseConfig-GhostFlagsEntry) | repeated | |
-| enable_prior_backup | [bool](#bool) | | If set, a backup of the modified data will be created automatically before any changes are applied. |
+| name | [string](#string) | | The name is the resource name to execute the export against. Format: instances/{instance}/databases/{database} Format: instances/{instance} Format: projects/{project}/rollouts/{rollout} Format: projects/{project}/rollouts/{rollout}/stages/{stage} |
+| statement | [string](#string) | | The SQL statement to execute. |
+| limit | [int32](#int32) | | The maximum number of rows to return. |
+| format | [ExportFormat](#bytebase-v1-ExportFormat) | | The export format. |
+| admin | [bool](#bool) | | The admin is used for workspace owner and DBA for exporting data from SQL Editor Admin mode. The exported data is not masked. |
+| password | [string](#string) | | The zip password provide by users. |
+| data_source_id | [string](#string) | | The id of data source. It is used for querying admin data source even if the instance has read-only data sources. Or it can be used to query a specific read-only data source. |
+| schema | [string](#string) | optional | The default schema to search objects. Equals to the current schema in Oracle and search path in Postgres. |
-<a name="bytebase-v1-Plan-ChangeDatabaseConfig-GhostFlagsEntry"></a>
+<a name="bytebase-v1-ExportResponse"></a>
-### Plan.ChangeDatabaseConfig.GhostFlagsEntry
+### ExportResponse
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| key | [string](#string) | | |
-| value | [string](#string) | | |
+| content | [bytes](#bytes) | | The export file content. |
-<a name="bytebase-v1-Plan-CreateDatabaseConfig"></a>
+<a name="bytebase-v1-MaskingReason"></a>
-### Plan.CreateDatabaseConfig
+### MaskingReason
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| target | [string](#string) | | The resource name of the instance on which the database is created. Format: instances/{instance} |
-| database | [string](#string) | | The name of the database to create. |
-| table | [string](#string) | | table is the name of the table, if it is not empty, Bytebase should create a table after creating the database. For example, in MongoDB, it only creates the database when we first store data in that database. |
-| character_set | [string](#string) | | character_set is the character set of the database. |
-| collation | [string](#string) | | collation is the collation of the database. |
-| cluster | [string](#string) | | cluster is the cluster of the database. This is only applicable to ClickHouse for &#34;ON CLUSTER &lt;&lt;cluster&gt;&gt;&#34;. |
-| owner | [string](#string) | | owner is the owner of the database. This is only applicable to Postgres for &#34;WITH OWNER &lt;&lt;owner&gt;&gt;&#34;. |
-| environment | [string](#string) | | The environment resource. Format: environments/prod where prod is the environment resource ID. |
+| semantic_type_id | [string](#string) | | The semantic type that triggered masking (e.g., &#34;SSN&#34;, &#34;email&#34;, &#34;phone&#34;). |
+| semantic_type_title | [string](#string) | | Human-readable semantic type title. |
+| masking_rule_id | [string](#string) | | The masking rule ID that matched (if applicable). |
+| algorithm | [string](#string) | | The masking algorithm used. |
+| context | [string](#string) | | Additional context (e.g., &#34;Matched global rule: PII Protection&#34;). |
+| classification_level | [string](#string) | | Whether masking was due to classification level. |
+| semantic_type_icon | [string](#string) | | Icon associated with the semantic type (if any). |
-<a name="bytebase-v1-Plan-Deployment"></a>
+<a name="bytebase-v1-QueryHistory"></a>
-### Plan.Deployment
+### QueryHistory
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| environments | [string](#string) | repeated | The environments deploy order. |
-| database_group_mappings | [Plan.Deployment.DatabaseGroupMapping](#bytebase-v1-Plan-Deployment-DatabaseGroupMapping) | repeated | The database group mapping. |
+| name | [string](#string) | | The name for the query history. Format: queryHistories/{uid} |
+| database | [string](#string) | | The database name to execute the query. Format: instances/{instance}/databases/{databaseName} |
+| creator | [string](#string) | | |
+| create_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |
+| statement | [string](#string) | | |
+| error | [string](#string) | optional | |
+| duration | [google.protobuf.Duration](#google-protobuf-Duration) | | |
+| type | [QueryHistory.Type](#bytebase-v1-QueryHistory-Type) | | |
-<a name="bytebase-v1-Plan-Deployment-DatabaseGroupMapping"></a>
+<a name="bytebase-v1-QueryOption"></a>
-### Plan.Deployment.DatabaseGroupMapping
+### QueryOption
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| database_group | [string](#string) | | Format: projects/{project}/databaseGroups/{databaseGroup}. |
-| databases | [string](#string) | repeated | Format: instances/{instance-id}/databases/{database-name}. |
+| redis_run_commands_on | [QueryOption.RedisRunCommandsOn](#bytebase-v1-QueryOption-RedisRunCommandsOn) | | |
-<a name="bytebase-v1-Plan-ExportDataConfig"></a>
+<a name="bytebase-v1-QueryRequest"></a>
-### Plan.ExportDataConfig
+### QueryRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| targets | [string](#string) | repeated | The list of targets. Multi-database format: [instances/{instance-id}/databases/{database-name}]. Single database group format: [projects/{project}/databaseGroups/{databaseGroup}]. |
-| sheet | [string](#string) | | The resource name of the sheet. Format: projects/{project}/sheets/{sheet} |
-| format | [ExportFormat](#bytebase-v1-ExportFormat) | | The format of the exported file. |
-| password | [string](#string) | optional | The zip password provide by users. Leave it empty if no needs to encrypt the zip file. |
+| name | [string](#string) | | The name is the instance name to execute the query against. Format: instances/{instance}/databases/{databaseName} |
+| statement | [string](#string) | | The SQL statement to execute. |
+| limit | [int32](#int32) | | The maximum number of rows to return. |
+| data_source_id | [string](#string) | | The id of data source. It is used for querying admin data source even if the instance has read-only data sources. Or it can be used to query a specific read-only data source. |
+| explain | [bool](#bool) | | Explain the statement. |
+| schema | [string](#string) | optional | The default schema to search objects. Equals to the current schema in Oracle and search path in Postgres. |
+| query_option | [QueryOption](#bytebase-v1-QueryOption) | | |
+| container | [string](#string) | optional | Container is the container name to execute the query against, used for CosmosDB only. |
-<a name="bytebase-v1-Plan-PlanCheckRunStatusCountEntry"></a>
+<a name="bytebase-v1-QueryResponse"></a>
-### Plan.PlanCheckRunStatusCountEntry
+### QueryResponse
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| key | [string](#string) | | |
-| value | [int32](#int32) | | |
+| results | [QueryResult](#bytebase-v1-QueryResult) | repeated | The query results. |
-<a name="bytebase-v1-Plan-Spec"></a>
+<a name="bytebase-v1-QueryResult"></a>
-### Plan.Spec
+### QueryResult
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| id | [string](#string) | | A UUID4 string that uniquely identifies the Spec. |
-| create_database_config | [Plan.CreateDatabaseConfig](#bytebase-v1-Plan-CreateDatabaseConfig) | | |
-| change_database_config | [Plan.ChangeDatabaseConfig](#bytebase-v1-Plan-ChangeDatabaseConfig) | | |
-| export_data_config | [Plan.ExportDataConfig](#bytebase-v1-Plan-ExportDataConfig) | | |
+| column_names | [string](#string) | repeated | Column names of the query result. |
+| column_type_names | [string](#string) | repeated | Column types of the query result. The types come from the Golang SQL driver. |
+| rows | [QueryRow](#bytebase-v1-QueryRow) | repeated | Rows of the query result. |
+| rows_count | [int64](#int64) | | |
+| error | [string](#string) | | The error message if the query failed. |
+| latency | [google.protobuf.Duration](#google-protobuf-Duration) | | The time it takes to execute the query. |
+| statement | [string](#string) | | The query statement for the result. |
+| postgres_error | [QueryResult.PostgresError](#bytebase-v1-QueryResult-PostgresError) | | |
+| allow_export | [bool](#bool) | | The query result is allowed to be exported or not. |
+| messages | [QueryResult.Message](#bytebase-v1-QueryResult-Message) | repeated | Informational or debug messages returned by the database engine during query execution. Examples include PostgreSQL&#39;s RAISE NOTICE, MSSQL&#39;s PRINT, or Oracle&#39;s DBMS_OUTPUT.PUT_LINE. |
+| masked | [MaskingReason](#bytebase-v1-MaskingReason) | repeated | Masking reasons for each column (empty for non-masked columns). |
-<a name="bytebase-v1-PlanCheckRun"></a>
+<a name="bytebase-v1-QueryResult-Message"></a>
-### PlanCheckRun
+### QueryResult.Message
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | Format: projects/{project}/plans/{plan}/planCheckRuns/{planCheckRun} |
-| type | [PlanCheckRun.Type](#bytebase-v1-PlanCheckRun-Type) | | |
-| status | [PlanCheckRun.Status](#bytebase-v1-PlanCheckRun-Status) | | |
-| target | [string](#string) | | Format: instances/{instance}/databases/{database} |
-| sheet | [string](#string) | | Format: project/{project}/sheets/{sheet} |
-| results | [PlanCheckRun.Result](#bytebase-v1-PlanCheckRun-Result) | repeated | |
-| error | [string](#string) | | error is set if the Status is FAILED. |
-| create_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |
-
+| level | [QueryResult.Message.Level](#bytebase-v1-QueryResult-Message-Level) | | |
+| content | [string](#string) | | |
-<a name="bytebase-v1-PlanCheckRun-Result"></a>
-### PlanCheckRun.Result
+<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 |
| ----- | ---- | ----- | ----------- |
-| status | [Advice.Level](#bytebase-v1-Advice-Level) | | |
-| title | [string](#string) | | |
-| content | [string](#string) | | |
-| code | [int32](#int32) | | |
-| sql_summary_report | [PlanCheckRun.Result.SqlSummaryReport](#bytebase-v1-PlanCheckRun-Result-SqlSummaryReport) | | |
-| sql_review_report | [PlanCheckRun.Result.SqlReviewReport](#bytebase-v1-PlanCheckRun-Result-SqlReviewReport) | | |
+| 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-PlanCheckRun-Result-SqlReviewReport"></a>
+<a name="bytebase-v1-QueryRow"></a>
-### PlanCheckRun.Result.SqlReviewReport
+### QueryRow
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| start_position | [Position](#bytebase-v1-Position) | | Position of the SQL statement. |
-| end_position | [Position](#bytebase-v1-Position) | | |
+| values | [RowValue](#bytebase-v1-RowValue) | repeated | Row values of the query result. |
-<a name="bytebase-v1-PlanCheckRun-Result-SqlSummaryReport"></a>
+<a name="bytebase-v1-RowValue"></a>
-### PlanCheckRun.Result.SqlSummaryReport
+### RowValue
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| statement_types | [string](#string) | repeated | statement_types are the types of statements that are found in the sql. |
-| affected_rows | [int64](#int64) | | |
-| changed_resources | [ChangedResources](#bytebase-v1-ChangedResources) | | |
+| 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-RunPlanChecksRequest"></a>
+<a name="bytebase-v1-RowValue-Timestamp"></a>
-### RunPlanChecksRequest
+### RowValue.Timestamp
| 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. |
+| 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-RunPlanChecksResponse"></a>
+<a name="bytebase-v1-RowValue-TimestampTZ"></a>
+
+### RowValue.TimestampTZ
+
-### RunPlanChecksResponse
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| google_timestamp | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |
+| zone | [string](#string) | | Zone is the time zone abbreviations in timezone database such as &#34;PDT&#34;, &#34;PST&#34;. https://en.wikipedia.org/wiki/List_of_tz_database_time_zones We retrieve the time zone information from the timestamptz field in the database. A timestamp is in UTC or epoch time, and with zone info, we can convert it to a local time string. Zone and offset are returned by time.Time.Zone() |
+| offset | [int32](#int32) | | The offset is in seconds east of UTC |
+| accuracy | [int32](#int32) | | |
-<a name="bytebase-v1-SearchPlansRequest"></a>
+<a name="bytebase-v1-SearchQueryHistoriesRequest"></a>
-### SearchPlansRequest
+### SearchQueryHistoriesRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| parent | [string](#string) | | The parent, which owns this collection of plans. Format: projects/{project} Use &#34;projects/-&#34; to list all plans from all projects. |
-| page_size | [int32](#int32) | | The maximum number of plans to return. The service may return fewer than this value. If unspecified, at most 10 plans will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. |
-| page_token | [string](#string) | | A page token, received from a previous `SearchPlans` call. Provide this to retrieve the subsequent page.
-
-When paginating, all other parameters provided to `SearchPlans` must match the call that provided the page token. |
-| filter | [string](#string) | | Filter is used to filter plans returned in the list. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
+| 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 filters: - creator: the plan creator full name in &#34;users/{email or id}&#34; format, support &#34;==&#34; operator. - create_time: the plan create time in &#34;2006-01-02T15:04:05Z07:00&#34; format, support &#34;&gt;=&#34; or &#34;&lt;=&#34; operator. - has_pipeline: the plan has pipeline or not, support &#34;==&#34; operator, the value should be &#34;true&#34; or &#34;false&#34;. - has_issue: the plan has issue or not, support &#34;==&#34; operator, the value should be &#34;true&#34; or &#34;false&#34;. - title: the plan title, support &#34;==&#34; operator for exact match and &#34;.matches()&#34; operator for case-insensitive substring match. - spec_type: the plan spec config type, support &#34;==&#34; operator, the value should be &#34;create_database_config&#34;, &#34;change_database_config&#34;, or &#34;export_data_config&#34;. - state: the plan state, support &#34;==&#34; operator, the value should be &#34;ACTIVE&#34; or &#34;DELETED&#34;.
+Supported filter: - project: the project full name in &#34;projects/{id}&#34; format, support &#34;==&#34; operator. - database: the database full name in &#34;instances/{id}/databases/{name}&#34; format, support &#34;==&#34; operator. - instance: the instance full name in &#34;instances/{id}&#34; format, support &#34;==&#34; operator. - type: the type, should be &#34;QUERY&#34; or &#34;EXPORT&#34;, support &#34;==&#34; operator. - statement: the SQL statement, support &#34;.matches()&#34; operator.
-For example: creator == &#34;users/[email protected]&#34; &amp;&amp; create_time &gt;= &#34;2025-01-02T15:04:05Z07:00&#34; has_pipeline == false &amp;&amp; has_issue == true title == &#34;My Plan&#34; title.matches(&#34;database migration&#34;) spec_type == &#34;change_database_config&#34; state == &#34;ACTIVE&#34; |
+For example: project == &#34;projects/{project}&#34; database == &#34;instances/{instance}/databases/{database}&#34; instance == &#34;instances/{instance}&#34; type == &#34;QUERY&#34; type == &#34;EXPORT&#34; statement.matches(&#34;select&#34;) type == &#34;QUERY&#34; &amp;&amp; statement.matches(&#34;select&#34;) |
-<a name="bytebase-v1-SearchPlansResponse"></a>
+<a name="bytebase-v1-SearchQueryHistoriesResponse"></a>
-### SearchPlansResponse
+### SearchQueryHistoriesResponse
| 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. |
+| 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-UpdatePlanRequest"></a>
-### UpdatePlanRequest
+<a name="bytebase-v1-Advice-Level"></a>
+### Advice.Level
+Level represents the severity level of the advice.
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| ADVICE_LEVEL_UNSPECIFIED | 0 | Unspecified advice level. |
+| SUCCESS | 1 | Success status indicating the check passed without issues. |
+| WARNING | 2 | Warning status indicating potential issues that should be reviewed. |
+| ERROR | 3 | Error status indicating critical issues that must be addressed. |
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| plan | [Plan](#bytebase-v1-Plan) | | The plan to update.
-The plan&#39;s `name` field is used to identify the plan to update. Format: projects/{project}/plans/{plan} |
-| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | The list of fields to update. |
-| allow_missing | [bool](#bool) | | If set to true, and the plan is not found, a new plan will be created. In this situation, `update_mask` is ignored. |
+<a name="bytebase-v1-QueryHistory-Type"></a>
+### QueryHistory.Type
+| 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-PlanCheckRun-Status"></a>
+<a name="bytebase-v1-QueryOption-RedisRunCommandsOn"></a>
-### PlanCheckRun.Status
+### QueryOption.RedisRunCommandsOn
| Name | Number | Description |
| ---- | ------ | ----------- |
-| STATUS_UNSPECIFIED | 0 | |
-| RUNNING | 1 | |
-| DONE | 2 | |
-| FAILED | 3 | |
-| CANCELED | 4 | |
+| 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-PlanCheckRun-Type"></a>
+<a name="bytebase-v1-QueryResult-Message-Level"></a>
-### PlanCheckRun.Type
+### QueryResult.Message.Level
| Name | Number | Description |
| ---- | ------ | ----------- |
-| TYPE_UNSPECIFIED | 0 | Unspecified check type. |
-| DATABASE_STATEMENT_FAKE_ADVISE | 1 | Fake advise check for testing purposes without executing against database. |
-| DATABASE_STATEMENT_ADVISE | 3 | SQL review check that analyzes statements against configured SQL review rules. |
-| DATABASE_STATEMENT_SUMMARY_REPORT | 5 | Summary report check that generates impact analysis for the statements. |
-| DATABASE_CONNECT | 6 | Connection check that verifies database connectivity. |
-| DATABASE_GHOST_SYNC | 7 | Ghost sync check that validates gh-ost online schema change compatibility. |
+| 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. |
@@ -8267,440 +8255,482 @@ The plan&#39;s `name` field is used to identify the plan to update. Format: proj
-<a name="bytebase-v1-PlanService"></a>
+<a name="bytebase-v1-SQLService"></a>
-### PlanService
-PlanService manages deployment plans for database changes.
+### SQLService
+SQLService executes SQL queries and manages query operations.
| Method Name | Request Type | Response Type | Description |
| ----------- | ------------ | ------------- | ------------|
-| GetPlan | [GetPlanRequest](#bytebase-v1-GetPlanRequest) | [Plan](#bytebase-v1-Plan) | Retrieves a deployment plan by name. Permissions required: bb.plans.get |
-| ListPlans | [ListPlansRequest](#bytebase-v1-ListPlansRequest) | [ListPlansResponse](#bytebase-v1-ListPlansResponse) | Lists deployment plans in a project. Permissions required: bb.plans.list |
-| SearchPlans | [SearchPlansRequest](#bytebase-v1-SearchPlansRequest) | [SearchPlansResponse](#bytebase-v1-SearchPlansResponse) | Search for plans that the caller has the bb.plans.get permission on and also satisfy the specified filter &amp; query. Permissions required: bb.plans.get |
-| CreatePlan | [CreatePlanRequest](#bytebase-v1-CreatePlanRequest) | [Plan](#bytebase-v1-Plan) | Creates a new deployment plan. Permissions required: bb.plans.create |
-| UpdatePlan | [UpdatePlanRequest](#bytebase-v1-UpdatePlanRequest) | [Plan](#bytebase-v1-Plan) | UpdatePlan updates the plan. The plan creator and the user with bb.plans.update permission on the project can update the plan. Permissions required: bb.plans.update (or creator) |
-| ListPlanCheckRuns | [ListPlanCheckRunsRequest](#bytebase-v1-ListPlanCheckRunsRequest) | [ListPlanCheckRunsResponse](#bytebase-v1-ListPlanCheckRunsResponse) | Lists plan check runs for a deployment plan. Permissions required: bb.planCheckRuns.list |
-| RunPlanChecks | [RunPlanChecksRequest](#bytebase-v1-RunPlanChecksRequest) | [RunPlanChecksResponse](#bytebase-v1-RunPlanChecksResponse) | Executes validation checks on a deployment plan. Permissions required: bb.planCheckRuns.run |
-| BatchCancelPlanCheckRuns | [BatchCancelPlanCheckRunsRequest](#bytebase-v1-BatchCancelPlanCheckRunsRequest) | [BatchCancelPlanCheckRunsResponse](#bytebase-v1-BatchCancelPlanCheckRunsResponse) | Cancels multiple plan check runs. Permissions required: bb.planCheckRuns.run |
+| Query | [QueryRequest](#bytebase-v1-QueryRequest) | [QueryResponse](#bytebase-v1-QueryResponse) | Executes a read-only SQL query against a database. Permissions required: bb.databases.get |
+| AdminExecute | [AdminExecuteRequest](#bytebase-v1-AdminExecuteRequest) stream | [AdminExecuteResponse](#bytebase-v1-AdminExecuteResponse) stream | Executes SQL with admin privileges via streaming connection. Permissions required: bb.sql.admin |
+| SearchQueryHistories | [SearchQueryHistoriesRequest](#bytebase-v1-SearchQueryHistoriesRequest) | [SearchQueryHistoriesResponse](#bytebase-v1-SearchQueryHistoriesResponse) | SearchQueryHistories searches query histories for the caller. Permissions required: None (only returns caller&#39;s own query histories) |
+| Export | [ExportRequest](#bytebase-v1-ExportRequest) | [ExportResponse](#bytebase-v1-ExportResponse) | Exports query results to a file format. Permissions required: bb.databases.get |
+| DiffMetadata | [DiffMetadataRequest](#bytebase-v1-DiffMetadataRequest) | [DiffMetadataResponse](#bytebase-v1-DiffMetadataResponse) | Computes schema differences between two database metadata. Permissions required: None |
+| AICompletion | [AICompletionRequest](#bytebase-v1-AICompletionRequest) | [AICompletionResponse](#bytebase-v1-AICompletionResponse) | Provides AI-powered SQL completion and generation. Permissions required: None (authenticated users only, requires AI to be enabled) |
-<a name="v1_project_service-proto"></a>
+<a name="v1_plan_service-proto"></a>
<p align="right"><a href="#top">Top</a></p>
-## v1/project_service.proto
+## v1/plan_service.proto
-<a name="bytebase-v1-Activity"></a>
+<a name="bytebase-v1-BatchCancelPlanCheckRunsRequest"></a>
-### Activity
-Activity types for webhook notifications.
+### BatchCancelPlanCheckRunsRequest
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| parent | [string](#string) | | The name of the parent of the planChecks. Format: projects/{project}/plans/{plan} |
+| plan_check_runs | [string](#string) | repeated | TODO(d): update this API. The planCheckRuns to cancel. Format: projects/{project}/plans/{plan}/planCheckRuns/{planCheckRun} |
-<a name="bytebase-v1-AddWebhookRequest"></a>
-### AddWebhookRequest
+
+
+<a name="bytebase-v1-BatchCancelPlanCheckRunsResponse"></a>
+
+### BatchCancelPlanCheckRunsResponse
+
+
+
+
+
+
+
+<a name="bytebase-v1-CreatePlanRequest"></a>
+
+### CreatePlanRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| project | [string](#string) | | The name of the project to add the webhook to. Format: projects/{project} |
-| webhook | [Webhook](#bytebase-v1-Webhook) | | The webhook to add. |
+| 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-BatchDeleteProjectsRequest"></a>
+<a name="bytebase-v1-GetPlanRequest"></a>
-### BatchDeleteProjectsRequest
+### GetPlanRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| names | [string](#string) | repeated | The names of the projects to delete. Format: projects/{project} |
-| force | [bool](#bool) | | If set to true, any databases from this project will be moved to default project. Sheets are not moved since BYTEBASE_ARTIFACT sheets belong to the issue and issue project. Open issues will remain open but associated with the deleted project. If set to false, the operation will fail if the project has databases or open issues. |
+| name | [string](#string) | | The name of the plan to retrieve. Format: projects/{project}/plans/{plan} |
-<a name="bytebase-v1-BatchGetIamPolicyRequest"></a>
+<a name="bytebase-v1-ListPlanCheckRunsRequest"></a>
-### BatchGetIamPolicyRequest
+### ListPlanCheckRunsRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| scope | [string](#string) | | The scope of the batch get. Typically it&#39;s &#34;projects/-&#34;. |
-| names | [string](#string) | repeated | |
+| parent | [string](#string) | | The parent, which owns this collection of plan check runs. Format: projects/{project}/plans/{plan} |
+| latest_only | [bool](#bool) | | If set to true, only the latest plan check run will be returned. |
+| filter | [string](#string) | | Filter is used to filter plan check runs returned in the list. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
+Supported filters: - status: the plan check run status, support &#34;==&#34; and &#34;in&#34; operator, check the Status enum in the PlanCheckRun message for the values. - result_status: the plan check run result status, support &#34;==&#34; and &#34;in&#34; operator, check the Result.Status enum in the PlanCheckRun message for the values.
+For example: status in [&#34;DONE&#34;, &#34;FAILED&#34;] status == &#34;RUNNING&#34; result_status in [&#34;SUCCESS&#34;, &#34;ERROR&#34;] result_status == &#34;WARNING&#34; |
-<a name="bytebase-v1-BatchGetIamPolicyResponse"></a>
-### BatchGetIamPolicyResponse
+
+<a name="bytebase-v1-ListPlanCheckRunsResponse"></a>
+
+### ListPlanCheckRunsResponse
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| policy_results | [BatchGetIamPolicyResponse.PolicyResult](#bytebase-v1-BatchGetIamPolicyResponse-PolicyResult) | repeated | The policy results for each requested project. |
+| plan_check_runs | [PlanCheckRun](#bytebase-v1-PlanCheckRun) | repeated | The plan check runs from the specified request. |
-<a name="bytebase-v1-BatchGetIamPolicyResponse-PolicyResult"></a>
+<a name="bytebase-v1-ListPlansRequest"></a>
+
+### ListPlansRequest
-### BatchGetIamPolicyResponse.PolicyResult
-Result for a single project&#39;s IAM policy.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| project | [string](#string) | | The project resource name. |
-| policy | [IamPolicy](#bytebase-v1-IamPolicy) | | The IAM policy for the project. |
+| parent | [string](#string) | | The parent, which owns this collection of plans. Format: projects/{project} Use &#34;projects/-&#34; to list all plans from all projects. |
+| page_size | [int32](#int32) | | The maximum number of plans to return. The service may return fewer than this value. If unspecified, at most 10 plans will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. |
+| page_token | [string](#string) | | A page token, received from a previous `ListPlans` call. Provide this to retrieve the subsequent page.
+When paginating, all other parameters provided to `ListPlans` must match the call that provided the page token. |
-<a name="bytebase-v1-CreateProjectRequest"></a>
-### CreateProjectRequest
+<a name="bytebase-v1-ListPlansResponse"></a>
+
+### ListPlansResponse
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| project | [Project](#bytebase-v1-Project) | | The project to create. |
-| project_id | [string](#string) | | The ID to use for the project, which will become the final component of the project&#39;s resource name.
+| 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. |
-This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/. |
+<a name="bytebase-v1-Plan"></a>
-<a name="bytebase-v1-DeleteProjectRequest"></a>
+### Plan
-### DeleteProjectRequest
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| name | [string](#string) | | The name of the plan. `plan` is a system generated ID. Format: projects/{project}/plans/{plan} |
+| state | [State](#bytebase-v1-State) | | The state of the plan. |
+| issue | [string](#string) | | The issue associated with the plan. Can be empty. Format: projects/{project}/issues/{issue} |
+| rollout | [string](#string) | | The rollout associated with the plan. Can be empty. Format: projects/{project}/rollouts/{rollout} |
+| title | [string](#string) | | The title of the plan. |
+| description | [string](#string) | | The description of the plan. |
+| specs | [Plan.Spec](#bytebase-v1-Plan-Spec) | repeated | The deployment specs for the plan. |
+| creator | [string](#string) | | Format: users/[email protected] |
+| create_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |
+| update_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |
+| plan_check_run_status_count | [Plan.PlanCheckRunStatusCountEntry](#bytebase-v1-Plan-PlanCheckRunStatusCountEntry) | repeated | The status count of the latest plan check runs. Keys are: - SUCCESS - WARNING - ERROR - RUNNING |
+| deployment | [Plan.Deployment](#bytebase-v1-Plan-Deployment) | | |
+
+
+
+
+
+
+<a name="bytebase-v1-Plan-ChangeDatabaseConfig"></a>
+
+### Plan.ChangeDatabaseConfig
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the project to delete. Format: projects/{project} |
-| force | [bool](#bool) | | If set to true, any databases from this project will be moved to default project. Sheets are not moved since BYTEBASE_ARTIFACT sheets belong to the issue and issue project. Open issues will remain open but associated with the deleted project. If set to false, the operation will fail if the project has databases or open issues. |
-| purge | [bool](#bool) | | If set to true, permanently purge the soft-deleted project and all related resources. This operation is irreversible. Following AIP-165, this should only be used for administrative cleanup of old soft-deleted projects. The project must already be soft-deleted for this to work. |
+| targets | [string](#string) | repeated | The list of targets. Multi-database format: [instances/{instance-id}/databases/{database-name}]. Single database group format: [projects/{project}/databaseGroups/{databaseGroup}]. |
+| sheet | [string](#string) | | The resource name of the sheet. Format: projects/{project}/sheets/{sheet} |
+| release | [string](#string) | | The resource name of the release. Format: projects/{project}/releases/{release} |
+| type | [DatabaseChangeType](#bytebase-v1-DatabaseChangeType) | | Type is the database change type. |
+| migration_type | [MigrationType](#bytebase-v1-MigrationType) | | migration_type is the migration type for imperative schema migration. It is only set when type is MIGRATE. |
+| ghost_flags | [Plan.ChangeDatabaseConfig.GhostFlagsEntry](#bytebase-v1-Plan-ChangeDatabaseConfig-GhostFlagsEntry) | repeated | |
+| enable_prior_backup | [bool](#bool) | | If set, a backup of the modified data will be created automatically before any changes are applied. |
-<a name="bytebase-v1-GetProjectRequest"></a>
+<a name="bytebase-v1-Plan-ChangeDatabaseConfig-GhostFlagsEntry"></a>
-### GetProjectRequest
+### Plan.ChangeDatabaseConfig.GhostFlagsEntry
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the project to retrieve. Format: projects/{project} |
+| key | [string](#string) | | |
+| value | [string](#string) | | |
-<a name="bytebase-v1-Label"></a>
+<a name="bytebase-v1-Plan-CreateDatabaseConfig"></a>
+
+### Plan.CreateDatabaseConfig
-### Label
-A label for categorizing and organizing issues.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| value | [string](#string) | | The label value/name. |
-| color | [string](#string) | | The color code for the label (e.g., hex color). |
-| group | [string](#string) | | The group this label belongs to. |
+| target | [string](#string) | | The resource name of the instance on which the database is created. Format: instances/{instance} |
+| database | [string](#string) | | The name of the database to create. |
+| table | [string](#string) | | table is the name of the table, if it is not empty, Bytebase should create a table after creating the database. For example, in MongoDB, it only creates the database when we first store data in that database. |
+| character_set | [string](#string) | | character_set is the character set of the database. |
+| collation | [string](#string) | | collation is the collation of the database. |
+| cluster | [string](#string) | | cluster is the cluster of the database. This is only applicable to ClickHouse for &#34;ON CLUSTER &lt;&lt;cluster&gt;&gt;&#34;. |
+| owner | [string](#string) | | owner is the owner of the database. This is only applicable to Postgres for &#34;WITH OWNER &lt;&lt;owner&gt;&gt;&#34;. |
+| environment | [string](#string) | | The environment resource. Format: environments/prod where prod is the environment resource ID. |
-<a name="bytebase-v1-ListProjectsRequest"></a>
+<a name="bytebase-v1-Plan-Deployment"></a>
-### ListProjectsRequest
+### Plan.Deployment
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| page_size | [int32](#int32) | | The maximum number of projects to return. The service may return fewer than this value. If unspecified, at most 10 projects will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. |
-| page_token | [string](#string) | | A page token, received from a previous `ListProjects` call. Provide this to retrieve the subsequent page.
-
-When paginating, all other parameters provided to `ListProjects` must match the call that provided the page token. |
-| show_deleted | [bool](#bool) | | Show deleted projects if specified. |
-| filter | [string](#string) | | Filter the project. Check filter for SearchProjectsRequest for details. Supports filtering by name, resource_id, state, and labels (e.g., labels.environment == &#34;production&#34;). |
+| environments | [string](#string) | repeated | The environments deploy order. |
+| database_group_mappings | [Plan.Deployment.DatabaseGroupMapping](#bytebase-v1-Plan-Deployment-DatabaseGroupMapping) | repeated | The database group mapping. |
-<a name="bytebase-v1-ListProjectsResponse"></a>
+<a name="bytebase-v1-Plan-Deployment-DatabaseGroupMapping"></a>
-### ListProjectsResponse
+### Plan.Deployment.DatabaseGroupMapping
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| projects | [Project](#bytebase-v1-Project) | repeated | The projects from the specified request. |
-| next_page_token | [string](#string) | | A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. |
+| database_group | [string](#string) | | Format: projects/{project}/databaseGroups/{databaseGroup}. |
+| databases | [string](#string) | repeated | Format: instances/{instance-id}/databases/{database-name}. |
-<a name="bytebase-v1-Project"></a>
+<a name="bytebase-v1-Plan-ExportDataConfig"></a>
-### Project
+### Plan.ExportDataConfig
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the project. Format: projects/{project} |
-| state | [State](#bytebase-v1-State) | | The lifecycle state of the project. |
-| title | [string](#string) | | The title or name of a project. It&#39;s not unique within the workspace. |
-| webhooks | [Webhook](#bytebase-v1-Webhook) | repeated | The list of webhooks configured for the project. |
-| data_classification_config_id | [string](#string) | | The data classification configuration ID for the project. |
-| issue_labels | [Label](#bytebase-v1-Label) | repeated | Labels available for tagging issues in this project. |
-| force_issue_labels | [bool](#bool) | | Force issue labels to be used when creating an issue. |
-| allow_modify_statement | [bool](#bool) | | Allow modifying SQL statements after issue is created. |
-| auto_resolve_issue | [bool](#bool) | | Enable automatic issue resolution when tasks complete. |
-| enforce_issue_title | [bool](#bool) | | Enforce issue title to be created by user instead of generated by Bytebase. |
-| auto_enable_backup | [bool](#bool) | | Whether to automatically enable backup for database changes. |
-| skip_backup_errors | [bool](#bool) | | Whether to skip backup errors and continue with data migration. |
-| postgres_database_tenant_mode | [bool](#bool) | | Whether to enable database tenant mode for PostgreSQL. If enabled, issues will include &#34;set role &lt;db_owner&gt;&#34; statement. |
-| allow_self_approval | [bool](#bool) | | Whether to allow issue creators to self-approve their own issues. |
-| execution_retry_policy | [Project.ExecutionRetryPolicy](#bytebase-v1-Project-ExecutionRetryPolicy) | | Execution retry policy for task runs. |
-| ci_sampling_size | [int32](#int32) | | The maximum number of database rows to sample during CI data validation. Without specification, sampling is disabled, resulting in full validation. |
-| parallel_tasks_per_rollout | [int32](#int32) | | The maximum number of parallel tasks allowed during rollout execution. |
-| labels | [Project.LabelsEntry](#bytebase-v1-Project-LabelsEntry) | repeated | Labels are key-value pairs that can be attached to the project. For example, { &#34;environment&#34;: &#34;production&#34;, &#34;team&#34;: &#34;backend&#34; } |
-| enforce_sql_review | [bool](#bool) | | Whether to enforce SQL review checks to pass before issue creation. If enabled, issues cannot be created when SQL review finds errors. |
+| targets | [string](#string) | repeated | The list of targets. Multi-database format: [instances/{instance-id}/databases/{database-name}]. Single database group format: [projects/{project}/databaseGroups/{databaseGroup}]. |
+| sheet | [string](#string) | | The resource name of the sheet. Format: projects/{project}/sheets/{sheet} |
+| format | [ExportFormat](#bytebase-v1-ExportFormat) | | The format of the exported file. |
+| password | [string](#string) | optional | The zip password provide by users. Leave it empty if no needs to encrypt the zip file. |
-<a name="bytebase-v1-Project-ExecutionRetryPolicy"></a>
+<a name="bytebase-v1-Plan-PlanCheckRunStatusCountEntry"></a>
+
+### Plan.PlanCheckRunStatusCountEntry
-### Project.ExecutionRetryPolicy
-Execution retry policy configuration.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| maximum_retries | [int32](#int32) | | The maximum number of retries for lock timeout errors. |
+| key | [string](#string) | | |
+| value | [int32](#int32) | | |
-<a name="bytebase-v1-Project-LabelsEntry"></a>
+<a name="bytebase-v1-Plan-Spec"></a>
-### Project.LabelsEntry
+### Plan.Spec
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| key | [string](#string) | | |
-| value | [string](#string) | | |
+| id | [string](#string) | | A UUID4 string that uniquely identifies the Spec. |
+| create_database_config | [Plan.CreateDatabaseConfig](#bytebase-v1-Plan-CreateDatabaseConfig) | | |
+| change_database_config | [Plan.ChangeDatabaseConfig](#bytebase-v1-Plan-ChangeDatabaseConfig) | | |
+| export_data_config | [Plan.ExportDataConfig](#bytebase-v1-Plan-ExportDataConfig) | | |
-<a name="bytebase-v1-RemoveWebhookRequest"></a>
+<a name="bytebase-v1-PlanCheckRun"></a>
-### RemoveWebhookRequest
+### PlanCheckRun
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| webhook | [Webhook](#bytebase-v1-Webhook) | | The webhook to remove. Identified by its url. |
+| name | [string](#string) | | Format: projects/{project}/plans/{plan}/planCheckRuns/{planCheckRun} |
+| type | [PlanCheckRun.Type](#bytebase-v1-PlanCheckRun-Type) | | |
+| status | [PlanCheckRun.Status](#bytebase-v1-PlanCheckRun-Status) | | |
+| target | [string](#string) | | Format: instances/{instance}/databases/{database} |
+| sheet | [string](#string) | | Format: project/{project}/sheets/{sheet} |
+| results | [PlanCheckRun.Result](#bytebase-v1-PlanCheckRun-Result) | repeated | |
+| error | [string](#string) | | error is set if the Status is FAILED. |
+| create_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |
-<a name="bytebase-v1-SearchProjectsRequest"></a>
+<a name="bytebase-v1-PlanCheckRun-Result"></a>
-### SearchProjectsRequest
+### PlanCheckRun.Result
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| show_deleted | [bool](#bool) | | Show deleted projects if specified. |
-| filter | [string](#string) | | Filter the project. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
-
-Supported filters: - name: the project name, support &#34;==&#34; and &#34;.matches()&#34; operator. - resource_id: the project id, support &#34;==&#34; and &#34;.matches()&#34; operator. - exclude_default: if not include the default project, should be &#34;true&#34; or &#34;false&#34;, support &#34;==&#34; operator. - state: check the State enum for the values, support &#34;==&#34; operator. - labels.{key}: the project label, support &#34;==&#34; and &#34;in&#34; operators.
-
-For example: name == &#34;project name&#34; name.matches(&#34;project name&#34;) resource_id == &#34;project id&#34; resource_id.matches(&#34;project id&#34;) exclude_default == true state == &#34;DELETED&#34; labels.environment == &#34;production&#34; labels.tier == &#34;critical&#34; labels.environment in [&#34;staging&#34;, &#34;prod&#34;] You can combine filter conditions like: name == &#34;project name&#34; &amp;&amp; resource_id.matches(&#34;project id&#34;) name.matches(&#34;project name&#34;) || resource_id == &#34;project id&#34; labels.environment == &#34;production&#34; &amp;&amp; labels.tier == &#34;critical&#34; |
-| page_size | [int32](#int32) | | The maximum number of projects to return. The service may return fewer than this value. If unspecified, at most 10 projects will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. |
-| page_token | [string](#string) | | A page token, received from a previous `SearchProjects` call. Provide this to retrieve the subsequent page.
-
-When paginating, all other parameters provided to `SearchProjects` must match the call that provided the page token. |
+| status | [Advice.Level](#bytebase-v1-Advice-Level) | | |
+| title | [string](#string) | | |
+| content | [string](#string) | | |
+| code | [int32](#int32) | | |
+| sql_summary_report | [PlanCheckRun.Result.SqlSummaryReport](#bytebase-v1-PlanCheckRun-Result-SqlSummaryReport) | | |
+| sql_review_report | [PlanCheckRun.Result.SqlReviewReport](#bytebase-v1-PlanCheckRun-Result-SqlReviewReport) | | |
-<a name="bytebase-v1-SearchProjectsResponse"></a>
+<a name="bytebase-v1-PlanCheckRun-Result-SqlReviewReport"></a>
-### SearchProjectsResponse
+### PlanCheckRun.Result.SqlReviewReport
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| projects | [Project](#bytebase-v1-Project) | repeated | The projects from the specified request. |
-| next_page_token | [string](#string) | | A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. |
+| start_position | [Position](#bytebase-v1-Position) | | Position of the SQL statement. |
+| end_position | [Position](#bytebase-v1-Position) | | |
-<a name="bytebase-v1-TestWebhookRequest"></a>
+<a name="bytebase-v1-PlanCheckRun-Result-SqlSummaryReport"></a>
-### TestWebhookRequest
+### PlanCheckRun.Result.SqlSummaryReport
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| project | [string](#string) | | The name of the project which owns the webhook to test. Format: projects/{project} |
-| webhook | [Webhook](#bytebase-v1-Webhook) | | The webhook to test. Identified by its url. |
+| statement_types | [string](#string) | repeated | statement_types are the types of statements that are found in the sql. |
+| affected_rows | [int64](#int64) | | |
+| changed_resources | [ChangedResources](#bytebase-v1-ChangedResources) | | |
-<a name="bytebase-v1-TestWebhookResponse"></a>
+<a name="bytebase-v1-RunPlanChecksRequest"></a>
-### TestWebhookResponse
+### RunPlanChecksRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| error | [string](#string) | | The result of the test, empty if the test is successful. |
-
-
+| 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-UndeleteProjectRequest"></a>
-### UndeleteProjectRequest
+<a name="bytebase-v1-RunPlanChecksResponse"></a>
+### RunPlanChecksResponse
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the deleted project. Format: projects/{project} |
-<a name="bytebase-v1-UpdateProjectRequest"></a>
+<a name="bytebase-v1-SearchPlansRequest"></a>
-### UpdateProjectRequest
+### SearchPlansRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| project | [Project](#bytebase-v1-Project) | | The project to update.
+| parent | [string](#string) | | The parent, which owns this collection of plans. Format: projects/{project} Use &#34;projects/-&#34; to list all plans from all projects. |
+| page_size | [int32](#int32) | | The maximum number of plans to return. The service may return fewer than this value. If unspecified, at most 10 plans will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. |
+| page_token | [string](#string) | | A page token, received from a previous `SearchPlans` call. Provide this to retrieve the subsequent page.
-The project&#39;s `name` field is used to identify the project to update. Format: projects/{project} |
-| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | The list of fields to update. |
-| allow_missing | [bool](#bool) | | If set to true, and the project is not found, a new project will be created. In this situation, `update_mask` is ignored. |
+When paginating, all other parameters provided to `SearchPlans` must match the call that provided the page token. |
+| filter | [string](#string) | | Filter is used to filter plans returned in the list. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
+Supported filters: - creator: the plan creator full name in &#34;users/{email or id}&#34; format, support &#34;==&#34; operator. - create_time: the plan create time in &#34;2006-01-02T15:04:05Z07:00&#34; format, support &#34;&gt;=&#34; or &#34;&lt;=&#34; operator. - has_pipeline: the plan has pipeline or not, support &#34;==&#34; operator, the value should be &#34;true&#34; or &#34;false&#34;. - has_issue: the plan has issue or not, support &#34;==&#34; operator, the value should be &#34;true&#34; or &#34;false&#34;. - title: the plan title, support &#34;==&#34; operator for exact match and &#34;.matches()&#34; operator for case-insensitive substring match. - spec_type: the plan spec config type, support &#34;==&#34; operator, the value should be &#34;create_database_config&#34;, &#34;change_database_config&#34;, or &#34;export_data_config&#34;. - state: the plan state, support &#34;==&#34; operator, the value should be &#34;ACTIVE&#34; or &#34;DELETED&#34;.
+For example: creator == &#34;users/[email protected]&#34; &amp;&amp; create_time &gt;= &#34;2025-01-02T15:04:05Z07:00&#34; has_pipeline == false &amp;&amp; has_issue == true title == &#34;My Plan&#34; title.matches(&#34;database migration&#34;) spec_type == &#34;change_database_config&#34; state == &#34;ACTIVE&#34; |
-<a name="bytebase-v1-UpdateWebhookRequest"></a>
-### UpdateWebhookRequest
+
+<a name="bytebase-v1-SearchPlansResponse"></a>
+
+### SearchPlansResponse
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| webhook | [Webhook](#bytebase-v1-Webhook) | | The webhook to modify. |
-| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | The list of fields to update. |
-| allow_missing | [bool](#bool) | | If set to true, and the webhook is not found, a new webhook will be created. In this situation, `update_mask` is ignored. |
+| 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-Webhook"></a>
+<a name="bytebase-v1-UpdatePlanRequest"></a>
-### Webhook
+### UpdatePlanRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | name is the name of the webhook, generated by the server. format: projects/{project}/webhooks/{webhook} |
-| type | [Webhook.Type](#bytebase-v1-Webhook-Type) | | type is the type of the webhook. |
-| title | [string](#string) | | title is the title of the webhook. |
-| url | [string](#string) | | url is the url of the webhook, should be unique within the project. |
-| direct_message | [bool](#bool) | | if direct_message is set, the notification is sent directly to the persons and url will be ignored. IM integration setting should be set for this function to work. |
-| notification_types | [Activity.Type](#bytebase-v1-Activity-Type) | repeated | notification_types is the list of activities types that the webhook is interested in. Bytebase will only send notifications to the webhook if the activity type is in the list. It should not be empty, and should be a subset of the following: - ISSUE_CREATE - ISSUE_COMMENT_CREATE - ISSUE_FIELD_UPDATE - ISSUE_STATUS_UPDATE - ISSUE_APPROVAL_NOTIFY - ISSUE_PIPELINE_STAGE_STATUS_UPDATE - ISSUE_PIPELINE_TASK_RUN_STATUS_UPDATE - NOTIFY_ISSUE_APPROVED - NOTIFY_PIPELINE_ROLLOUT |
+| plan | [Plan](#bytebase-v1-Plan) | | The plan to update.
+
+The plan&#39;s `name` field is used to identify the plan to update. Format: projects/{project}/plans/{plan} |
+| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | The list of fields to update. |
+| allow_missing | [bool](#bool) | | If set to true, and the plan is not found, a new plan will be created. In this situation, `update_mask` is ignored. |
@@ -8709,45 +8739,34 @@ The project&#39;s `name` field is used to identify the project to update. Format
-<a name="bytebase-v1-Activity-Type"></a>
+<a name="bytebase-v1-PlanCheckRun-Status"></a>
+
+### PlanCheckRun.Status
-### Activity.Type
-Activity type enumeration.
| Name | Number | Description |
| ---- | ------ | ----------- |
-| TYPE_UNSPECIFIED | 0 | Unspecified type. |
-| NOTIFY_ISSUE_APPROVED | 23 | Notifications via webhooks.
-
-NOTIFY_ISSUE_APPROVED represents the issue approved notification. |
-| NOTIFY_PIPELINE_ROLLOUT | 24 | NOTIFY_PIPELINE_ROLLOUT represents the pipeline rollout notification. |
-| ISSUE_CREATE | 1 | Issue related activity types.
+| STATUS_UNSPECIFIED | 0 | |
+| RUNNING | 1 | |
+| DONE | 2 | |
+| FAILED | 3 | |
+| CANCELED | 4 | |
-ISSUE_CREATE represents creating an issue. |
-| ISSUE_COMMENT_CREATE | 2 | ISSUE_COMMENT_CREATE represents commenting on an issue. |
-| ISSUE_FIELD_UPDATE | 3 | ISSUE_FIELD_UPDATE represents updating the issue field, likes title, description, etc. |
-| ISSUE_STATUS_UPDATE | 4 | ISSUE_STATUS_UPDATE represents the issue status change, including OPEN, CLOSE, CANCEL fow now. |
-| ISSUE_APPROVAL_NOTIFY | 21 | ISSUE_APPROVAL_NOTIFY is the type for notifying issue approval. |
-| ISSUE_PIPELINE_STAGE_STATUS_UPDATE | 5 | ISSUE_PIPELINE_STAGE_STATUS_UPDATE represents the pipeline stage status change, including BEGIN, END for now. |
-| ISSUE_PIPELINE_TASK_RUN_STATUS_UPDATE | 22 | ISSUE_PIPELINE_TASK_RUN_STATUS_UPDATE represents the pipeline task run status change, including PENDING, RUNNING, DONE, FAILED, CANCELED. |
+<a name="bytebase-v1-PlanCheckRun-Type"></a>
-<a name="bytebase-v1-Webhook-Type"></a>
+### PlanCheckRun.Type
-### Webhook.Type
-Webhook integration type.
| Name | Number | Description |
| ---- | ------ | ----------- |
-| TYPE_UNSPECIFIED | 0 | Unspecified type. |
-| SLACK | 1 | Slack integration. |
-| DISCORD | 2 | Discord integration. |
-| TEAMS | 3 | Microsoft Teams integration. |
-| DINGTALK | 4 | DingTalk integration. |
-| FEISHU | 5 | Feishu integration. |
-| WECOM | 6 | WeCom (WeChat Work) integration. |
-| LARK | 8 | Lark integration. |
+| TYPE_UNSPECIFIED | 0 | Unspecified check type. |
+| DATABASE_STATEMENT_FAKE_ADVISE | 1 | Fake advise check for testing purposes without executing against database. |
+| DATABASE_STATEMENT_ADVISE | 3 | SQL review check that analyzes statements against configured SQL review rules. |
+| DATABASE_STATEMENT_SUMMARY_REPORT | 5 | Summary report check that generates impact analysis for the statements. |
+| DATABASE_CONNECT | 6 | Connection check that verifies database connectivity. |
+| DATABASE_GHOST_SYNC | 7 | Ghost sync check that validates gh-ost online schema change compatibility. |
@@ -8755,28 +8774,21 @@ Webhook integration type.
-<a name="bytebase-v1-ProjectService"></a>
+<a name="bytebase-v1-PlanService"></a>
-### ProjectService
-ProjectService manages projects that group databases and changes.
+### PlanService
+PlanService manages deployment plans for database changes.
| Method Name | Request Type | Response Type | Description |
| ----------- | ------------ | ------------- | ------------|
-| GetProject | [GetProjectRequest](#bytebase-v1-GetProjectRequest) | [Project](#bytebase-v1-Project) | GetProject retrieves a project by name. Users with &#34;bb.projects.get&#34; permission on the workspace or the project owner can access this method. Permissions required: bb.projects.get |
-| ListProjects | [ListProjectsRequest](#bytebase-v1-ListProjectsRequest) | [ListProjectsResponse](#bytebase-v1-ListProjectsResponse) | Lists all projects in the workspace with optional filtering. Permissions required: bb.projects.list |
-| SearchProjects | [SearchProjectsRequest](#bytebase-v1-SearchProjectsRequest) | [SearchProjectsResponse](#bytebase-v1-SearchProjectsResponse) | Searches for projects with advanced filtering capabilities. Permissions required: bb.projects.get (or project-level bb.projects.get for specific projects) |
-| CreateProject | [CreateProjectRequest](#bytebase-v1-CreateProjectRequest) | [Project](#bytebase-v1-Project) | Creates a new project in the workspace. Permissions required: bb.projects.create |
-| UpdateProject | [UpdateProjectRequest](#bytebase-v1-UpdateProjectRequest) | [Project](#bytebase-v1-Project) | Updates an existing project&#39;s properties. Permissions required: bb.projects.update |
-| DeleteProject | [DeleteProjectRequest](#bytebase-v1-DeleteProjectRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | Deletes (soft-delete or purge) a project. Permissions required: bb.projects.delete |
-| UndeleteProject | [UndeleteProjectRequest](#bytebase-v1-UndeleteProjectRequest) | [Project](#bytebase-v1-Project) | Restores a soft-deleted project. Permissions required: bb.projects.undelete |
-| BatchDeleteProjects | [BatchDeleteProjectsRequest](#bytebase-v1-BatchDeleteProjectsRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | Deletes multiple projects in a single operation. Permissions required: bb.projects.delete |
-| GetIamPolicy | [GetIamPolicyRequest](#bytebase-v1-GetIamPolicyRequest) | [IamPolicy](#bytebase-v1-IamPolicy) | Retrieves the IAM policy for a project. Permissions required: bb.projects.getIamPolicy |
-| BatchGetIamPolicy | [BatchGetIamPolicyRequest](#bytebase-v1-BatchGetIamPolicyRequest) | [BatchGetIamPolicyResponse](#bytebase-v1-BatchGetIamPolicyResponse) | Deprecated. No permission check implemented. Permissions required: None |
-| SetIamPolicy | [SetIamPolicyRequest](#bytebase-v1-SetIamPolicyRequest) | [IamPolicy](#bytebase-v1-IamPolicy) | Sets the IAM policy for a project. Permissions required: bb.projects.setIamPolicy |
-| AddWebhook | [AddWebhookRequest](#bytebase-v1-AddWebhookRequest) | [Project](#bytebase-v1-Project) | Adds a webhook to a project for notifications. Permissions required: bb.projects.update |
-| UpdateWebhook | [UpdateWebhookRequest](#bytebase-v1-UpdateWebhookRequest) | [Project](#bytebase-v1-Project) | Updates an existing webhook configuration. Permissions required: bb.projects.update |
-| RemoveWebhook | [RemoveWebhookRequest](#bytebase-v1-RemoveWebhookRequest) | [Project](#bytebase-v1-Project) | Removes a webhook from a project. Permissions required: bb.projects.update |
-| TestWebhook | [TestWebhookRequest](#bytebase-v1-TestWebhookRequest) | [TestWebhookResponse](#bytebase-v1-TestWebhookResponse) | Tests a webhook by sending a test notification. Permissions required: bb.projects.update |
+| GetPlan | [GetPlanRequest](#bytebase-v1-GetPlanRequest) | [Plan](#bytebase-v1-Plan) | Retrieves a deployment plan by name. Permissions required: bb.plans.get |
+| ListPlans | [ListPlansRequest](#bytebase-v1-ListPlansRequest) | [ListPlansResponse](#bytebase-v1-ListPlansResponse) | Lists deployment plans in a project. Permissions required: bb.plans.list |
+| SearchPlans | [SearchPlansRequest](#bytebase-v1-SearchPlansRequest) | [SearchPlansResponse](#bytebase-v1-SearchPlansResponse) | Search for plans that the caller has the bb.plans.get permission on and also satisfy the specified filter &amp; query. Permissions required: bb.plans.get |
+| CreatePlan | [CreatePlanRequest](#bytebase-v1-CreatePlanRequest) | [Plan](#bytebase-v1-Plan) | Creates a new deployment plan. Permissions required: bb.plans.create |
+| UpdatePlan | [UpdatePlanRequest](#bytebase-v1-UpdatePlanRequest) | [Plan](#bytebase-v1-Plan) | UpdatePlan updates the plan. The plan creator and the user with bb.plans.update permission on the project can update the plan. Permissions required: bb.plans.update (or creator) |
+| ListPlanCheckRuns | [ListPlanCheckRunsRequest](#bytebase-v1-ListPlanCheckRunsRequest) | [ListPlanCheckRunsResponse](#bytebase-v1-ListPlanCheckRunsResponse) | Lists plan check runs for a deployment plan. Permissions required: bb.planCheckRuns.list |
+| RunPlanChecks | [RunPlanChecksRequest](#bytebase-v1-RunPlanChecksRequest) | [RunPlanChecksResponse](#bytebase-v1-RunPlanChecksResponse) | Executes validation checks on a deployment plan. Permissions required: bb.planCheckRuns.run |
+| BatchCancelPlanCheckRuns | [BatchCancelPlanCheckRunsRequest](#bytebase-v1-BatchCancelPlanCheckRunsRequest) | [BatchCancelPlanCheckRunsResponse](#bytebase-v1-BatchCancelPlanCheckRunsResponse) | Cancels multiple plan check runs. Permissions required: bb.planCheckRuns.run |
diff --git a/proto/gen/grpc-doc/v1/index.html b/proto/gen/grpc-doc/v1/index.html
index 9b834176ce..225c4e12e0 100644
--- a/proto/gen/grpc-doc/v1/index.html
+++ b/proto/gen/grpc-doc/v1/index.html
@@ -995,6 +995,164 @@
</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%2fproject_service.proto">v1/project_service.proto</a>
+ <ul>
+
+ <li>
+ <a href="#bytebase.v1.Activity"><span class="badge">M</span>Activity</a>
+ </li>
+
+ <li>
+ <a href="#bytebase.v1.AddWebhookRequest"><span class="badge">M</span>AddWebhookRequest</a>
+ </li>
+
+ <li>
+ <a href="#bytebase.v1.BatchDeleteProjectsRequest"><span class="badge">M</span>BatchDeleteProjectsRequest</a>
+ </li>
+
+ <li>
+ <a href="#bytebase.v1.BatchGetIamPolicyRequest"><span class="badge">M</span>BatchGetIamPolicyRequest</a>
+ </li>
+
+ <li>
+ <a href="#bytebase.v1.BatchGetIamPolicyResponse"><span class="badge">M</span>BatchGetIamPolicyResponse</a>
+ </li>
+
+ <li>
+ <a href="#bytebase.v1.BatchGetIamPolicyResponse.PolicyResult"><span class="badge">M</span>BatchGetIamPolicyResponse.PolicyResult</a>
+ </li>
+
+ <li>
+ <a href="#bytebase.v1.CreateProjectRequest"><span class="badge">M</span>CreateProjectRequest</a>
+ </li>
+
+ <li>
+ <a href="#bytebase.v1.DeleteProjectRequest"><span class="badge">M</span>DeleteProjectRequest</a>
+ </li>
+
+ <li>
+ <a href="#bytebase.v1.GetProjectRequest"><span class="badge">M</span>GetProjectRequest</a>
+ </li>
+
+ <li>
+ <a href="#bytebase.v1.Label"><span class="badge">M</span>Label</a>
+ </li>
+
+ <li>
+ <a href="#bytebase.v1.ListProjectsRequest"><span class="badge">M</span>ListProjectsRequest</a>
+ </li>
+
+ <li>
+ <a href="#bytebase.v1.ListProjectsResponse"><span class="badge">M</span>ListProjectsResponse</a>
+ </li>
+
+ <li>
+ <a href="#bytebase.v1.Project"><span class="badge">M</span>Project</a>
+ </li>
+
+ <li>
+ <a href="#bytebase.v1.Project.ExecutionRetryPolicy"><span class="badge">M</span>Project.ExecutionRetryPolicy</a>
+ </li>
+
+ <li>
+ <a href="#bytebase.v1.Project.LabelsEntry"><span class="badge">M</span>Project.LabelsEntry</a>
+ </li>
+
+ <li>
+ <a href="#bytebase.v1.RemoveWebhookRequest"><span class="badge">M</span>RemoveWebhookRequest</a>
+ </li>
+
+ <li>
+ <a href="#bytebase.v1.SearchProjectsRequest"><span class="badge">M</span>SearchProjectsRequest</a>
+ </li>
+
+ <li>
+ <a href="#bytebase.v1.SearchProjectsResponse"><span class="badge">M</span>SearchProjectsResponse</a>
+ </li>
+
+ <li>
+ <a href="#bytebase.v1.TestWebhookRequest"><span class="badge">M</span>TestWebhookRequest</a>
+ </li>
+
+ <li>
+ <a href="#bytebase.v1.TestWebhookResponse"><span class="badge">M</span>TestWebhookResponse</a>
+ </li>
+
+ <li>
+ <a href="#bytebase.v1.UndeleteProjectRequest"><span class="badge">M</span>UndeleteProjectRequest</a>
+ </li>
+
+ <li>
+ <a href="#bytebase.v1.UpdateProjectRequest"><span class="badge">M</span>UpdateProjectRequest</a>
+ </li>
+
+ <li>
+ <a href="#bytebase.v1.UpdateWebhookRequest"><span class="badge">M</span>UpdateWebhookRequest</a>
+ </li>
+
+ <li>
+ <a href="#bytebase.v1.Webhook"><span class="badge">M</span>Webhook</a>
+ </li>
+
+
+ <li>
+ <a href="#bytebase.v1.Activity.Type"><span class="badge">E</span>Activity.Type</a>
+ </li>
+
+ <li>
+ <a href="#bytebase.v1.Webhook.Type"><span class="badge">E</span>Webhook.Type</a>
+ </li>
+
+
+
+ <li>
+ <a href="#bytebase.v1.ProjectService"><span class="badge">S</span>ProjectService</a>
+ </li>
+
+ </ul>
+ </li>
+
+
<li>
<a href="#v1%2fsetting_service.proto">v1/setting_service.proto</a>
<ul>
@@ -1043,6 +1201,10 @@
<a href="#bytebase.v1.AppIMSetting.Feishu"><span class="badge">M</span>AppIMSetting.Feishu</a>
</li>
+ <li>
+ <a href="#bytebase.v1.AppIMSetting.IMSetting"><span class="badge">M</span>AppIMSetting.IMSetting</a>
+ </li>
+
<li>
<a href="#bytebase.v1.AppIMSetting.Lark"><span class="badge">M</span>AppIMSetting.Lark</a>
</li>
@@ -1300,45 +1462,6 @@
</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>
@@ -2090,221 +2213,102 @@
<li>
- <a href="#v1%2fproject_service.proto">v1/project_service.proto</a>
+ <a href="#v1%2frelease_service.proto">v1/release_service.proto</a>
<ul>
<li>
- <a href="#bytebase.v1.Activity"><span class="badge">M</span>Activity</a>
+ <a href="#bytebase.v1.CheckReleaseRequest"><span class="badge">M</span>CheckReleaseRequest</a>
</li>
<li>
- <a href="#bytebase.v1.AddWebhookRequest"><span class="badge">M</span>AddWebhookRequest</a>
+ <a href="#bytebase.v1.CheckReleaseResponse"><span class="badge">M</span>CheckReleaseResponse</a>
</li>
<li>
- <a href="#bytebase.v1.BatchDeleteProjectsRequest"><span class="badge">M</span>BatchDeleteProjectsRequest</a>
+ <a href="#bytebase.v1.CheckReleaseResponse.CheckResult"><span class="badge">M</span>CheckReleaseResponse.CheckResult</a>
</li>
<li>
- <a href="#bytebase.v1.BatchGetIamPolicyRequest"><span class="badge">M</span>BatchGetIamPolicyRequest</a>
+ <a href="#bytebase.v1.CreateReleaseRequest"><span class="badge">M</span>CreateReleaseRequest</a>
</li>
<li>
- <a href="#bytebase.v1.BatchGetIamPolicyResponse"><span class="badge">M</span>BatchGetIamPolicyResponse</a>
+ <a href="#bytebase.v1.DeleteReleaseRequest"><span class="badge">M</span>DeleteReleaseRequest</a>
</li>
<li>
- <a href="#bytebase.v1.BatchGetIamPolicyResponse.PolicyResult"><span class="badge">M</span>BatchGetIamPolicyResponse.PolicyResult</a>
+ <a href="#bytebase.v1.GetReleaseRequest"><span class="badge">M</span>GetReleaseRequest</a>
</li>
<li>
- <a href="#bytebase.v1.CreateProjectRequest"><span class="badge">M</span>CreateProjectRequest</a>
+ <a href="#bytebase.v1.ListReleasesRequest"><span class="badge">M</span>ListReleasesRequest</a>
</li>
<li>
- <a href="#bytebase.v1.DeleteProjectRequest"><span class="badge">M</span>DeleteProjectRequest</a>
+ <a href="#bytebase.v1.ListReleasesResponse"><span class="badge">M</span>ListReleasesResponse</a>
</li>
<li>
- <a href="#bytebase.v1.GetProjectRequest"><span class="badge">M</span>GetProjectRequest</a>
+ <a href="#bytebase.v1.Release"><span class="badge">M</span>Release</a>
</li>
<li>
- <a href="#bytebase.v1.Label"><span class="badge">M</span>Label</a>
+ <a href="#bytebase.v1.Release.File"><span class="badge">M</span>Release.File</a>
</li>
<li>
- <a href="#bytebase.v1.ListProjectsRequest"><span class="badge">M</span>ListProjectsRequest</a>
+ <a href="#bytebase.v1.Release.VCSSource"><span class="badge">M</span>Release.VCSSource</a>
</li>
<li>
- <a href="#bytebase.v1.ListProjectsResponse"><span class="badge">M</span>ListProjectsResponse</a>
+ <a href="#bytebase.v1.SearchReleasesRequest"><span class="badge">M</span>SearchReleasesRequest</a>
</li>
<li>
- <a href="#bytebase.v1.Project"><span class="badge">M</span>Project</a>
+ <a href="#bytebase.v1.SearchReleasesResponse"><span class="badge">M</span>SearchReleasesResponse</a>
</li>
<li>
- <a href="#bytebase.v1.Project.ExecutionRetryPolicy"><span class="badge">M</span>Project.ExecutionRetryPolicy</a>
+ <a href="#bytebase.v1.UndeleteReleaseRequest"><span class="badge">M</span>UndeleteReleaseRequest</a>
</li>
<li>
- <a href="#bytebase.v1.Project.LabelsEntry"><span class="badge">M</span>Project.LabelsEntry</a>
+ <a href="#bytebase.v1.UpdateReleaseRequest"><span class="badge">M</span>UpdateReleaseRequest</a>
</li>
+
<li>
- <a href="#bytebase.v1.RemoveWebhookRequest"><span class="badge">M</span>RemoveWebhookRequest</a>
+ <a href="#bytebase.v1.Release.File.MigrationType"><span class="badge">E</span>Release.File.MigrationType</a>
</li>
<li>
- <a href="#bytebase.v1.SearchProjectsRequest"><span class="badge">M</span>SearchProjectsRequest</a>
+ <a href="#bytebase.v1.Release.File.Type"><span class="badge">E</span>Release.File.Type</a>
</li>
+
+
<li>
- <a href="#bytebase.v1.SearchProjectsResponse"><span class="badge">M</span>SearchProjectsResponse</a>
+ <a href="#bytebase.v1.ReleaseService"><span class="badge">S</span>ReleaseService</a>
</li>
+ </ul>
+ </li>
+
+
+ <li>
+ <a href="#v1%2freview_config_service.proto">v1/review_config_service.proto</a>
+ <ul>
+
<li>
- <a href="#bytebase.v1.TestWebhookRequest"><span class="badge">M</span>TestWebhookRequest</a>
+ <a href="#bytebase.v1.CreateReviewConfigRequest"><span class="badge">M</span>CreateReviewConfigRequest</a>
</li>
<li>
- <a href="#bytebase.v1.TestWebhookResponse"><span class="badge">M</span>TestWebhookResponse</a>
+ <a href="#bytebase.v1.DeleteReviewConfigRequest"><span class="badge">M</span>DeleteReviewConfigRequest</a>
</li>
<li>
- <a href="#bytebase.v1.UndeleteProjectRequest"><span class="badge">M</span>UndeleteProjectRequest</a>
- </li>
-
- <li>
- <a href="#bytebase.v1.UpdateProjectRequest"><span class="badge">M</span>UpdateProjectRequest</a>
- </li>
-
- <li>
- <a href="#bytebase.v1.UpdateWebhookRequest"><span class="badge">M</span>UpdateWebhookRequest</a>
- </li>
-
- <li>
- <a href="#bytebase.v1.Webhook"><span class="badge">M</span>Webhook</a>
- </li>
-
-
- <li>
- <a href="#bytebase.v1.Activity.Type"><span class="badge">E</span>Activity.Type</a>
- </li>
-
- <li>
- <a href="#bytebase.v1.Webhook.Type"><span class="badge">E</span>Webhook.Type</a>
- </li>
-
-
-
- <li>
- <a href="#bytebase.v1.ProjectService"><span class="badge">S</span>ProjectService</a>
- </li>
-
- </ul>
- </li>
-
-
- <li>
- <a href="#v1%2frelease_service.proto">v1/release_service.proto</a>
- <ul>
-
- <li>
- <a href="#bytebase.v1.CheckReleaseRequest"><span class="badge">M</span>CheckReleaseRequest</a>
- </li>
-
- <li>
- <a href="#bytebase.v1.CheckReleaseResponse"><span class="badge">M</span>CheckReleaseResponse</a>
- </li>
-
- <li>
- <a href="#bytebase.v1.CheckReleaseResponse.CheckResult"><span class="badge">M</span>CheckReleaseResponse.CheckResult</a>
- </li>
-
- <li>
- <a href="#bytebase.v1.CreateReleaseRequest"><span class="badge">M</span>CreateReleaseRequest</a>
- </li>
-
- <li>
- <a href="#bytebase.v1.DeleteReleaseRequest"><span class="badge">M</span>DeleteReleaseRequest</a>
- </li>
-
- <li>
- <a href="#bytebase.v1.GetReleaseRequest"><span class="badge">M</span>GetReleaseRequest</a>
- </li>
-
- <li>
- <a href="#bytebase.v1.ListReleasesRequest"><span class="badge">M</span>ListReleasesRequest</a>
- </li>
-
- <li>
- <a href="#bytebase.v1.ListReleasesResponse"><span class="badge">M</span>ListReleasesResponse</a>
- </li>
-
- <li>
- <a href="#bytebase.v1.Release"><span class="badge">M</span>Release</a>
- </li>
-
- <li>
- <a href="#bytebase.v1.Release.File"><span class="badge">M</span>Release.File</a>
- </li>
-
- <li>
- <a href="#bytebase.v1.Release.VCSSource"><span class="badge">M</span>Release.VCSSource</a>
- </li>
-
- <li>
- <a href="#bytebase.v1.SearchReleasesRequest"><span class="badge">M</span>SearchReleasesRequest</a>
- </li>
-
- <li>
- <a href="#bytebase.v1.SearchReleasesResponse"><span class="badge">M</span>SearchReleasesResponse</a>
- </li>
-
- <li>
- <a href="#bytebase.v1.UndeleteReleaseRequest"><span class="badge">M</span>UndeleteReleaseRequest</a>
- </li>
-
- <li>
- <a href="#bytebase.v1.UpdateReleaseRequest"><span class="badge">M</span>UpdateReleaseRequest</a>
- </li>
-
-
- <li>
- <a href="#bytebase.v1.Release.File.MigrationType"><span class="badge">E</span>Release.File.MigrationType</a>
- </li>
-
- <li>
- <a href="#bytebase.v1.Release.File.Type"><span class="badge">E</span>Release.File.Type</a>
- </li>
-
-
-
- <li>
- <a href="#bytebase.v1.ReleaseService"><span class="badge">S</span>ReleaseService</a>
- </li>
-
- </ul>
- </li>
-
-
- <li>
- <a href="#v1%2freview_config_service.proto">v1/review_config_service.proto</a>
- <ul>
-
- <li>
- <a href="#bytebase.v1.CreateReviewConfigRequest"><span class="badge">M</span>CreateReviewConfigRequest</a>
- </li>
-
- <li>
- <a href="#bytebase.v1.DeleteReviewConfigRequest"><span class="badge">M</span>DeleteReviewConfigRequest</a>
- </li>
-
- <li>
- <a href="#bytebase.v1.GetReviewConfigRequest"><span class="badge">M</span>GetReviewConfigRequest</a>
+ <a href="#bytebase.v1.GetReviewConfigRequest"><span class="badge">M</span>GetReviewConfigRequest</a>
</li>
<li>
@@ -12385,13 +12389,13 @@ Permissions required: None (determined by approval flow)</p></td>
<div class="file-heading">
- <h2 id="v1/setting_service.proto">v1/setting_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.AISetting">AISetting</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">
@@ -12401,45 +12405,48 @@ Permissions required: None (determined by approval flow)</p></td>
<tbody>
<tr>
- <td>enabled</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>provider</td>
- <td><a href="#bytebase.v1.AISetting.Provider">AISetting.Provider</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>endpoint</td>
+ <td>role</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The role that is assigned to the members.
+Format: roles/{role} </p></td>
</tr>
<tr>
- <td>api_key</td>
+ <td>members</td>
<td><a href="#string">string</a></td>
- <td></td>
- <td><p> </p></td>
+ <td>repeated</td>
+ <td><p>Specifies the principals requesting access for a Bytebase resource.
+For users, the member should be: user:{email}
+For groups, the member should be: group:{email} </p></td>
</tr>
<tr>
- <td>model</td>
- <td><a href="#string">string</a></td>
+ <td>condition</td>
+ <td><a href="#google.type.Expr">google.type.Expr</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The condition that is associated with this binding, only used in the project IAM policy.
+If the condition evaluates to true, then this binding applies to the current request.
+If the condition evaluates to false, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding.
+The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
+
+Support variables:
+resource.database: the database full name in &#34;instances/{instance}/databases/{database}&#34; format, used by the &#34;roles/sqlEditorUser&#34; role, support &#34;==&#34; operator.
+resource.schema_name: the schema name, used by the &#34;roles/sqlEditorUser&#34; role, support &#34;==&#34; operator.
+resource.table_name: the table name, used by the &#34;roles/sqlEditorUser&#34; role, support &#34;==&#34; operator.
+request.time: the expiration. Only support &#34;&lt;&#34; operation in `request.time &lt; timestamp(&#34;{ISO datetime string format}&#34;)`.
+
+For example:
+resource.database == &#34;instances/local-pg/databases/postgres&#34; &amp;&amp; resource.schema_name in [&#34;public&#34;,&#34;another_schema&#34;]
+resource.database == &#34;instances/local-pg/databases/bytebase&#34; &amp;&amp; resource.schema_name == &#34;public&#34; &amp;&amp; resource.table_name in [&#34;audit_log&#34;]
+request.time &lt; timestamp(&#34;2025-04-26T11:24:48.655Z&#34;) </p></td>
</tr>
<tr>
- <td>version</td>
- <td><a href="#string">string</a></td>
+ <td>parsed_expr</td>
+ <td><a href="#google.api.expr.v1alpha1.Expr">google.api.expr.v1alpha1.Expr</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The parsed expression of the condition. </p></td>
</tr>
</tbody>
@@ -12449,8 +12456,8 @@ Permissions required: None (determined by approval flow)</p></td>
- <h3 id="bytebase.v1.Algorithm">Algorithm</h3>
- <p></p>
+ <h3 id="bytebase.v1.BindingDelta">BindingDelta</h3>
+ <p>A single change to a binding.</p>
<table class="field-table">
@@ -12460,31 +12467,32 @@ Permissions required: None (determined by approval flow)</p></td>
<tbody>
<tr>
- <td>full_mask</td>
- <td><a href="#bytebase.v1.Algorithm.FullMask">Algorithm.FullMask</a></td>
+ <td>action</td>
+ <td><a href="#bytebase.v1.BindingDelta.Action">BindingDelta.Action</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The action that was performed on a Binding. </p></td>
</tr>
<tr>
- <td>range_mask</td>
- <td><a href="#bytebase.v1.Algorithm.RangeMask">Algorithm.RangeMask</a></td>
+ <td>role</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>Role that is assigned to `members`.
+For example, `roles/projectOwner`. </p></td>
</tr>
<tr>
- <td>md5_mask</td>
- <td><a href="#bytebase.v1.Algorithm.MD5Mask">Algorithm.MD5Mask</a></td>
+ <td>member</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>Follows the same format of Binding.members. </p></td>
</tr>
<tr>
- <td>inner_outer_mask</td>
- <td><a href="#bytebase.v1.Algorithm.InnerOuterMask">Algorithm.InnerOuterMask</a></td>
+ <td>condition</td>
+ <td><a href="#google.type.Expr">google.type.Expr</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The condition that is associated with this binding. </p></td>
</tr>
</tbody>
@@ -12494,8 +12502,8 @@ Permissions required: None (determined by approval flow)</p></td>
- <h3 id="bytebase.v1.Algorithm.FullMask">Algorithm.FullMask</h3>
- <p></p>
+ <h3 id="bytebase.v1.GetIamPolicyRequest">GetIamPolicyRequest</h3>
+ <p>Request message for getting an IAM policy.</p>
<table class="field-table">
@@ -12505,11 +12513,12 @@ Permissions required: None (determined by approval flow)</p></td>
<tbody>
<tr>
- <td>substitution</td>
+ <td>resource</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>substitution is the string used to replace the original value, the
-max length of the string is 16 bytes. </p></td>
+ <td><p>The name of the resource to get the IAM policy.
+Format: projects/{project}
+Format: workspaces/{workspace} </p></td>
</tr>
</tbody>
@@ -12519,8 +12528,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.IamPolicy">IamPolicy</h3>
+ <p>IAM policy that binds members to roles.</p>
<table class="field-table">
@@ -12530,55 +12539,20 @@ 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><p> </p></td>
- </tr>
-
- <tr>
- <td>suffix_len</td>
- <td><a href="#int32">int32</a></td>
- <td></td>
- <td><p> </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>type</td>
- <td><a href="#bytebase.v1.Algorithm.InnerOuterMask.MaskType">Algorithm.InnerOuterMask.MaskType</a></td>
+ <td>etag</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <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>salt</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>salt is the salt value to generate a different hash that with the word alone. </p></td>
+ <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>
@@ -12588,8 +12562,8 @@ max length of the string is 16 bytes. </p></td>
- <h3 id="bytebase.v1.Algorithm.RangeMask">Algorithm.RangeMask</h3>
- <p></p>
+ <h3 id="bytebase.v1.PolicyDelta">PolicyDelta</h3>
+ <p>Describes changes between two IAM policies.</p>
<table class="field-table">
@@ -12599,11 +12573,10 @@ max length of the string is 16 bytes. </p></td>
<tbody>
<tr>
- <td>slices</td>
- <td><a href="#bytebase.v1.Algorithm.RangeMask.Slice">Algorithm.RangeMask.Slice</a></td>
+ <td>binding_deltas</td>
+ <td><a href="#bytebase.v1.BindingDelta">BindingDelta</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>The delta for Bindings between two policies. </p></td>
</tr>
</tbody>
@@ -12613,8 +12586,8 @@ But frontend can be started with a single rule easily. </p></td>
- <h3 id="bytebase.v1.Algorithm.RangeMask.Slice">Algorithm.RangeMask.Slice</h3>
- <p></p>
+ <h3 id="bytebase.v1.SetIamPolicyRequest">SetIamPolicyRequest</h3>
+ <p>Request message for setting an IAM policy.</p>
<table class="field-table">
@@ -12624,24 +12597,26 @@ 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>resource</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>start is the start index of the original value, start from 0 and should be less than stop. </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>end</td>
- <td><a href="#int32">int32</a></td>
+ <td>policy</td>
+ <td><a href="#bytebase.v1.IamPolicy">IamPolicy</a></td>
<td></td>
- <td><p>stop is the stop index of the original value, should be less than the length of the original value. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>substitution</td>
+ <td>etag</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>The current etag of the policy. </p></td>
</tr>
</tbody>
@@ -12651,7 +12626,57 @@ But frontend can be started with a single rule easily. </p></td>
- <h3 id="bytebase.v1.Announcement">Announcement</h3>
+
+
+ <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/project_service.proto">v1/project_service.proto</h2><a href="#title">Top</a>
+ </div>
+ <p></p>
+
+
+ <h3 id="bytebase.v1.Activity">Activity</h3>
+ <p>Activity types for webhook notifications.</p>
+
+
+
+
+
+ <h3 id="bytebase.v1.AddWebhookRequest">AddWebhookRequest</h3>
<p></p>
@@ -12662,24 +12687,18 @@ But frontend can be started with a single rule easily. </p></td>
<tbody>
<tr>
- <td>level</td>
- <td><a href="#bytebase.v1.Announcement.AlertLevel">Announcement.AlertLevel</a></td>
- <td></td>
- <td><p>The alert level of announcement </p></td>
- </tr>
-
- <tr>
- <td>text</td>
+ <td>project</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The text of announcement </p></td>
+ <td><p>The name of the project to add the webhook to.
+Format: projects/{project} </p></td>
</tr>
<tr>
- <td>link</td>
- <td><a href="#string">string</a></td>
+ <td>webhook</td>
+ <td><a href="#bytebase.v1.Webhook">Webhook</a></td>
<td></td>
- <td><p>The optional link, user can follow the link to check extra details </p></td>
+ <td><p>The webhook to add. </p></td>
</tr>
</tbody>
@@ -12689,7 +12708,7 @@ But frontend can be started with a single rule easily. </p></td>
- <h3 id="bytebase.v1.AppIMSetting">AppIMSetting</h3>
+ <h3 id="bytebase.v1.BatchDeleteProjectsRequest">BatchDeleteProjectsRequest</h3>
<p></p>
@@ -12700,38 +12719,21 @@ But frontend can be started with a single rule easily. </p></td>
<tbody>
<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>
+ <td>names</td>
+ <td><a href="#string">string</a></td>
+ <td>repeated</td>
+ <td><p>The names of the projects to delete.
+Format: projects/{project} </p></td>
</tr>
<tr>
- <td>dingtalk</td>
- <td><a href="#bytebase.v1.AppIMSetting.DingTalk">AppIMSetting.DingTalk</a></td>
+ <td>force</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>If set to true, any databases from this project will be moved to default project.
+Sheets are not moved since BYTEBASE_ARTIFACT sheets belong to the issue and issue project.
+Open issues will remain open but associated with the deleted project.
+If set to false, the operation will fail if the project has databases or open issues. </p></td>
</tr>
</tbody>
@@ -12741,7 +12743,7 @@ But frontend can be started with a single rule easily. </p></td>
- <h3 id="bytebase.v1.AppIMSetting.DingTalk">AppIMSetting.DingTalk</h3>
+ <h3 id="bytebase.v1.BatchGetIamPolicyRequest">BatchGetIamPolicyRequest</h3>
<p></p>
@@ -12752,30 +12754,16 @@ But frontend can be started with a single rule easily. </p></td>
<tbody>
<tr>
- <td>enabled</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <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>scope</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The scope of the batch get. Typically it&#39;s &#34;projects/-&#34;. </p></td>
</tr>
<tr>
- <td>robot_code</td>
+ <td>names</td>
<td><a href="#string">string</a></td>
- <td></td>
+ <td>repeated</td>
<td><p> </p></td>
</tr>
@@ -12786,7 +12774,7 @@ But frontend can be started with a single rule easily. </p></td>
- <h3 id="bytebase.v1.AppIMSetting.Feishu">AppIMSetting.Feishu</h3>
+ <h3 id="bytebase.v1.BatchGetIamPolicyResponse">BatchGetIamPolicyResponse</h3>
<p></p>
@@ -12797,24 +12785,10 @@ But frontend can be started with a single rule easily. </p></td>
<tbody>
<tr>
- <td>enabled</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>app_id</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>app_secret</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p> </p></td>
+ <td>policy_results</td>
+ <td><a href="#bytebase.v1.BatchGetIamPolicyResponse.PolicyResult">BatchGetIamPolicyResponse.PolicyResult</a></td>
+ <td>repeated</td>
+ <td><p>The policy results for each requested project. </p></td>
</tr>
</tbody>
@@ -12824,8 +12798,8 @@ But frontend can be started with a single rule easily. </p></td>
- <h3 id="bytebase.v1.AppIMSetting.Lark">AppIMSetting.Lark</h3>
- <p></p>
+ <h3 id="bytebase.v1.BatchGetIamPolicyResponse.PolicyResult">BatchGetIamPolicyResponse.PolicyResult</h3>
+ <p>Result for a single project's IAM policy.</p>
<table class="field-table">
@@ -12835,24 +12809,17 @@ But frontend can be started with a single rule easily. </p></td>
<tbody>
<tr>
- <td>enabled</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>app_id</td>
+ <td>project</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The project resource name. </p></td>
</tr>
<tr>
- <td>app_secret</td>
- <td><a href="#string">string</a></td>
+ <td>policy</td>
+ <td><a href="#bytebase.v1.IamPolicy">IamPolicy</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The IAM policy for the project. </p></td>
</tr>
</tbody>
@@ -12862,7 +12829,7 @@ But frontend can be started with a single rule easily. </p></td>
- <h3 id="bytebase.v1.AppIMSetting.Slack">AppIMSetting.Slack</h3>
+ <h3 id="bytebase.v1.CreateProjectRequest">CreateProjectRequest</h3>
<p></p>
@@ -12873,18 +12840,22 @@ But frontend can be started with a single rule easily. </p></td>
<tbody>
<tr>
- <td>enabled</td>
- <td><a href="#bool">bool</a></td>
+ <td>project</td>
+ <td><a href="#bytebase.v1.Project">Project</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The project to create. </p></td>
</tr>
<tr>
- <td>token</td>
+ <td>project_id</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
- </tr>
+ <td><p>The ID to use for the project, which will become the final component of
+the project&#39;s resource name.
+
+This value should be 4-63 characters, and valid characters
+are /[a-z][0-9]-/. </p></td>
+ </tr>
</tbody>
</table>
@@ -12893,7 +12864,7 @@ But frontend can be started with a single rule easily. </p></td>
- <h3 id="bytebase.v1.AppIMSetting.Wecom">AppIMSetting.Wecom</h3>
+ <h3 id="bytebase.v1.DeleteProjectRequest">DeleteProjectRequest</h3>
<p></p>
@@ -12904,31 +12875,31 @@ But frontend can be started with a single rule easily. </p></td>
<tbody>
<tr>
- <td>enabled</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>corp_id</td>
+ <td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The name of the project to delete.
+Format: projects/{project} </p></td>
</tr>
<tr>
- <td>agent_id</td>
- <td><a href="#string">string</a></td>
+ <td>force</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>If set to true, any databases from this project will be moved to default project.
+Sheets are not moved since BYTEBASE_ARTIFACT sheets belong to the issue and issue project.
+Open issues will remain open but associated with the deleted project.
+If set to false, the operation will fail if the project has databases or open issues. </p></td>
</tr>
<tr>
- <td>secret</td>
- <td><a href="#string">string</a></td>
+ <td>purge</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>If set to true, permanently purge the soft-deleted project and all related resources.
+This operation is irreversible. Following AIP-165, this should only be used for
+administrative cleanup of old soft-deleted projects.
+The project must already be soft-deleted for this to work. </p></td>
</tr>
</tbody>
@@ -12938,7 +12909,7 @@ But frontend can be started with a single rule easily. </p></td>
- <h3 id="bytebase.v1.DataClassificationSetting">DataClassificationSetting</h3>
+ <h3 id="bytebase.v1.GetProjectRequest">GetProjectRequest</h3>
<p></p>
@@ -12949,10 +12920,11 @@ But frontend can be started with a single rule easily. </p></td>
<tbody>
<tr>
- <td>configs</td>
- <td><a href="#bytebase.v1.DataClassificationSetting.DataClassificationConfig">DataClassificationSetting.DataClassificationConfig</a></td>
- <td>repeated</td>
- <td><p> </p></td>
+ <td>name</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The name of the project to retrieve.
+Format: projects/{project} </p></td>
</tr>
</tbody>
@@ -12962,8 +12934,8 @@ But frontend can be started with a single rule easily. </p></td>
- <h3 id="bytebase.v1.DataClassificationSetting.DataClassificationConfig">DataClassificationSetting.DataClassificationConfig</h3>
- <p></p>
+ <h3 id="bytebase.v1.Label">Label</h3>
+ <p>A label for categorizing and organizing issues.</p>
<table class="field-table">
@@ -12973,73 +12945,24 @@ But frontend can be started with a single rule easily. </p></td>
<tbody>
<tr>
- <td>id</td>
+ <td>value</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 label value/name. </p></td>
</tr>
<tr>
- <td>title</td>
+ <td>color</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>levels</td>
- <td><a href="#bytebase.v1.DataClassificationSetting.DataClassificationConfig.Level">DataClassificationSetting.DataClassificationConfig.Level</a></td>
- <td>repeated</td>
- <td><p>levels is user defined level list for classification.
-The order for the level decides its priority. </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]&#43;-[0-9]&#43;-[0-9]&#43; format. </p></td>
- </tr>
-
- <tr>
- <td>classification_from_config</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>If true, we will only store the classification in the config.
-Otherwise we will get the classification from table/column comment,
-and write back to the schema metadata. </p></td>
+ <td><p>The color code for the label (e.g., hex color). </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>group</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>value</td>
- <td><a href="#bytebase.v1.DataClassificationSetting.DataClassificationConfig.DataClassification">DataClassificationSetting.DataClassificationConfig.DataClassification</a></td>
- <td></td>
- <td><p> </p></td>
+ <td><p>The group this label belongs to. </p></td>
</tr>
</tbody>
@@ -13049,7 +12972,7 @@ and write back to the schema metadata. </p></td>
- <h3 id="bytebase.v1.DataClassificationSetting.DataClassificationConfig.DataClassification">DataClassificationSetting.DataClassificationConfig.DataClassification</h3>
+ <h3 id="bytebase.v1.ListProjectsRequest">ListProjectsRequest</h3>
<p></p>
@@ -13060,31 +12983,40 @@ and write back to the schema metadata. </p></td>
<tbody>
<tr>
- <td>id</td>
- <td><a href="#string">string</a></td>
+ <td>page_size</td>
+ <td><a href="#int32">int32</a></td>
<td></td>
- <td><p>id is the classification id in [0-9]&#43;-[0-9]&#43;-[0-9]&#43; format. </p></td>
+ <td><p>The maximum number of projects to return. The service may return fewer than
+this value.
+If unspecified, at most 10 projects will be returned.
+The maximum value is 1000; values above 1000 will be coerced to 1000. </p></td>
</tr>
<tr>
- <td>title</td>
+ <td>page_token</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>A page token, received from a previous `ListProjects` call.
+Provide this to retrieve the subsequent page.
+
+When paginating, all other parameters provided to `ListProjects` must match
+the call that provided the page token. </p></td>
</tr>
<tr>
- <td>description</td>
- <td><a href="#string">string</a></td>
+ <td>show_deleted</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>Show deleted projects if specified. </p></td>
</tr>
<tr>
- <td>level_id</td>
+ <td>filter</td>
<td><a href="#string">string</a></td>
- <td>optional</td>
- <td><p> </p></td>
+ <td></td>
+ <td><p>Filter the project.
+Check filter for SearchProjectsRequest for details.
+Supports filtering by name, resource_id, state, and labels (e.g., labels.environment == &#34;production&#34;). </p></td>
</tr>
</tbody>
@@ -13094,7 +13026,7 @@ and write back to the schema metadata. </p></td>
- <h3 id="bytebase.v1.DataClassificationSetting.DataClassificationConfig.Level">DataClassificationSetting.DataClassificationConfig.Level</h3>
+ <h3 id="bytebase.v1.ListProjectsResponse">ListProjectsResponse</h3>
<p></p>
@@ -13105,48 +13037,18 @@ and write back to the schema metadata. </p></td>
<tbody>
<tr>
- <td>id</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>title</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p> </p></td>
+ <td>projects</td>
+ <td><a href="#bytebase.v1.Project">Project</a></td>
+ <td>repeated</td>
+ <td><p>The projects from the specified request. </p></td>
</tr>
<tr>
- <td>description</td>
+ <td>next_page_token</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></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>
+ <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>
@@ -13156,7 +13058,7 @@ and write back to the schema metadata. </p></td>
- <h3 id="bytebase.v1.EnvironmentSetting.Environment">EnvironmentSetting.Environment</h3>
+ <h3 id="bytebase.v1.Project">Project</h3>
<p></p>
@@ -13170,81 +13072,149 @@ and write back to the schema metadata. </p></td>
<td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The resource name of the environment.
-Format: environments/{environment}.
-Output only. </p></td>
+ <td><p>The name of the project.
+Format: projects/{project} </p></td>
</tr>
<tr>
- <td>id</td>
- <td><a href="#string">string</a></td>
+ <td>state</td>
+ <td><a href="#bytebase.v1.State">State</a></td>
<td></td>
- <td><p>The resource id of the environment.
-This value should be 4-63 characters, and valid characters
-are /[a-z][0-9]-/. </p></td>
+ <td><p>The lifecycle state of the project. </p></td>
</tr>
<tr>
<td>title</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The display name of the environment. </p></td>
+ <td><p>The title or name of a project. It&#39;s not unique within the workspace. </p></td>
</tr>
<tr>
- <td>tags</td>
- <td><a href="#bytebase.v1.EnvironmentSetting.Environment.TagsEntry">EnvironmentSetting.Environment.TagsEntry</a></td>
+ <td>webhooks</td>
+ <td><a href="#bytebase.v1.Webhook">Webhook</a></td>
<td>repeated</td>
- <td><p> </p></td>
+ <td><p>The list of webhooks configured for the project. </p></td>
</tr>
<tr>
- <td>color</td>
+ <td>data_classification_config_id</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The data classification configuration ID for the project. </p></td>
</tr>
- </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>issue_labels</td>
+ <td><a href="#bytebase.v1.Label">Label</a></td>
+ <td>repeated</td>
+ <td><p>Labels available for tagging issues in this project. </p></td>
+ </tr>
<tr>
- <td>key</td>
- <td><a href="#string">string</a></td>
+ <td>force_issue_labels</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>Force issue labels to be used when creating an issue. </p></td>
</tr>
<tr>
- <td>value</td>
- <td><a href="#string">string</a></td>
+ <td>allow_modify_statement</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>Allow modifying SQL statements after issue is created. </p></td>
</tr>
- </tbody>
- </table>
+ <tr>
+ <td>auto_resolve_issue</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>Enable automatic issue resolution when tasks complete. </p></td>
+ </tr>
+
+ <tr>
+ <td>enforce_issue_title</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>Enforce issue title to be created by user instead of generated by Bytebase. </p></td>
+ </tr>
+
+ <tr>
+ <td>auto_enable_backup</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>Whether to automatically enable backup for database changes. </p></td>
+ </tr>
+
+ <tr>
+ <td>skip_backup_errors</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>Whether to skip backup errors and continue with data migration. </p></td>
+ </tr>
+
+ <tr>
+ <td>postgres_database_tenant_mode</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>Whether to enable database tenant mode for PostgreSQL.
+If enabled, issues will include &#34;set role &lt;db_owner&gt;&#34; statement. </p></td>
+ </tr>
+
+ <tr>
+ <td>allow_self_approval</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>Whether to allow issue creators to self-approve their own issues. </p></td>
+ </tr>
+
+ <tr>
+ <td>execution_retry_policy</td>
+ <td><a href="#bytebase.v1.Project.ExecutionRetryPolicy">Project.ExecutionRetryPolicy</a></td>
+ <td></td>
+ <td><p>Execution retry policy for task runs. </p></td>
+ </tr>
+
+ <tr>
+ <td>ci_sampling_size</td>
+ <td><a href="#int32">int32</a></td>
+ <td></td>
+ <td><p>The maximum number of database rows to sample during CI data validation.
+Without specification, sampling is disabled, resulting in full validation. </p></td>
+ </tr>
+
+ <tr>
+ <td>parallel_tasks_per_rollout</td>
+ <td><a href="#int32">int32</a></td>
+ <td></td>
+ <td><p>The maximum number of parallel tasks allowed during rollout execution. </p></td>
+ </tr>
+
+ <tr>
+ <td>labels</td>
+ <td><a href="#bytebase.v1.Project.LabelsEntry">Project.LabelsEntry</a></td>
+ <td>repeated</td>
+ <td><p>Labels are key-value pairs that can be attached to the project.
+For example, { &#34;environment&#34;: &#34;production&#34;, &#34;team&#34;: &#34;backend&#34; } </p></td>
+ </tr>
+
+ <tr>
+ <td>enforce_sql_review</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>Whether to enforce SQL review checks to pass before issue creation.
+If enabled, issues cannot be created when SQL review finds errors. </p></td>
+ </tr>
+
+ </tbody>
+ </table>
- <h3 id="bytebase.v1.GetSettingRequest">GetSettingRequest</h3>
- <p>The request message for getting a setting.</p>
+ <h3 id="bytebase.v1.Project.ExecutionRetryPolicy">Project.ExecutionRetryPolicy</h3>
+ <p>Execution retry policy configuration.</p>
<table class="field-table">
@@ -13254,10 +13224,10 @@ are /[a-z][0-9]-/. </p></td>
<tbody>
<tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
+ <td>maximum_retries</td>
+ <td><a href="#int32">int32</a></td>
<td></td>
- <td><p>The resource name of the setting. </p></td>
+ <td><p>The maximum number of retries for lock timeout errors. </p></td>
</tr>
</tbody>
@@ -13267,8 +13237,8 @@ are /[a-z][0-9]-/. </p></td>
- <h3 id="bytebase.v1.GetSettingResponse">GetSettingResponse</h3>
- <p>The response message for getting a setting.</p>
+ <h3 id="bytebase.v1.Project.LabelsEntry">Project.LabelsEntry</h3>
+ <p></p>
<table class="field-table">
@@ -13278,8 +13248,15 @@ are /[a-z][0-9]-/. </p></td>
<tbody>
<tr>
- <td>setting</td>
- <td><a href="#bytebase.v1.Setting">Setting</a></td>
+ <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>
@@ -13291,14 +13268,7 @@ are /[a-z][0-9]-/. </p></td>
- <h3 id="bytebase.v1.ListSettingsRequest">ListSettingsRequest</h3>
- <p></p>
-
-
-
-
-
- <h3 id="bytebase.v1.ListSettingsResponse">ListSettingsResponse</h3>
+ <h3 id="bytebase.v1.RemoveWebhookRequest">RemoveWebhookRequest</h3>
<p></p>
@@ -13309,10 +13279,10 @@ are /[a-z][0-9]-/. </p></td>
<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>
+ <td>webhook</td>
+ <td><a href="#bytebase.v1.Webhook">Webhook</a></td>
+ <td></td>
+ <td><p>The webhook to remove. Identified by its url. </p></td>
</tr>
</tbody>
@@ -13322,7 +13292,7 @@ are /[a-z][0-9]-/. </p></td>
- <h3 id="bytebase.v1.PasswordRestrictionSetting">PasswordRestrictionSetting</h3>
+ <h3 id="bytebase.v1.SearchProjectsRequest">SearchProjectsRequest</h3>
<p></p>
@@ -13333,52 +13303,61 @@ are /[a-z][0-9]-/. </p></td>
<tbody>
<tr>
- <td>min_length</td>
- <td><a href="#int32">int32</a></td>
- <td></td>
- <td><p>min_length is the minimum length for password, should no less than 8. </p></td>
- </tr>
-
- <tr>
- <td>require_number</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>require_number requires the password must contains at least one number. </p></td>
- </tr>
-
- <tr>
- <td>require_letter</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>require_letter requires the password must contains at least one letter, regardless of upper case or lower case </p></td>
- </tr>
-
- <tr>
- <td>require_uppercase_letter</td>
+ <td>show_deleted</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>
+ <td><p>Show deleted projects if specified. </p></td>
</tr>
<tr>
- <td>require_special_character</td>
- <td><a href="#bool">bool</a></td>
+ <td>filter</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>Filter the project.
+The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
+
+Supported filters:
+- name: the project name, support &#34;==&#34; and &#34;.matches()&#34; operator.
+- resource_id: the project id, support &#34;==&#34; and &#34;.matches()&#34; operator.
+- exclude_default: if not include the default project, should be &#34;true&#34; or &#34;false&#34;, support &#34;==&#34; operator.
+- state: check the State enum for the values, support &#34;==&#34; operator.
+- labels.{key}: the project label, support &#34;==&#34; and &#34;in&#34; operators.
+
+For example:
+name == &#34;project name&#34;
+name.matches(&#34;project name&#34;)
+resource_id == &#34;project id&#34;
+resource_id.matches(&#34;project id&#34;)
+exclude_default == true
+state == &#34;DELETED&#34;
+labels.environment == &#34;production&#34;
+labels.tier == &#34;critical&#34;
+labels.environment in [&#34;staging&#34;, &#34;prod&#34;]
+You can combine filter conditions like:
+name == &#34;project name&#34; &amp;&amp; resource_id.matches(&#34;project id&#34;)
+name.matches(&#34;project name&#34;) || resource_id == &#34;project id&#34;
+labels.environment == &#34;production&#34; &amp;&amp; labels.tier == &#34;critical&#34; </p></td>
</tr>
<tr>
- <td>require_reset_password_for_first_login</td>
- <td><a href="#bool">bool</a></td>
+ <td>page_size</td>
+ <td><a href="#int32">int32</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>The maximum number of projects to return. The service may return fewer than
+this value.
+If unspecified, at most 10 projects will be returned.
+The maximum value is 1000; values above 1000 will be coerced to 1000. </p></td>
</tr>
<tr>
- <td>password_rotation</td>
- <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>
+ <td>page_token</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>A page token, received from a previous `SearchProjects` call.
+Provide this to retrieve the subsequent page.
+
+When paginating, all other parameters provided to `SearchProjects` must match
+the call that provided the page token. </p></td>
</tr>
</tbody>
@@ -13388,7 +13367,7 @@ are /[a-z][0-9]-/. </p></td>
- <h3 id="bytebase.v1.SCIMSetting">SCIMSetting</h3>
+ <h3 id="bytebase.v1.SearchProjectsResponse">SearchProjectsResponse</h3>
<p></p>
@@ -13399,10 +13378,18 @@ are /[a-z][0-9]-/. </p></td>
<tbody>
<tr>
- <td>token</td>
+ <td>projects</td>
+ <td><a href="#bytebase.v1.Project">Project</a></td>
+ <td>repeated</td>
+ <td><p>The projects from the specified request. </p></td>
+ </tr>
+
+ <tr>
+ <td>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>
@@ -13412,7 +13399,7 @@ are /[a-z][0-9]-/. </p></td>
- <h3 id="bytebase.v1.SchemaTemplateSetting">SchemaTemplateSetting</h3>
+ <h3 id="bytebase.v1.TestWebhookRequest">TestWebhookRequest</h3>
<p></p>
@@ -13423,24 +13410,18 @@ are /[a-z][0-9]-/. </p></td>
<tbody>
<tr>
- <td>field_templates</td>
- <td><a href="#bytebase.v1.SchemaTemplateSetting.FieldTemplate">SchemaTemplateSetting.FieldTemplate</a></td>
- <td>repeated</td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>column_types</td>
- <td><a href="#bytebase.v1.SchemaTemplateSetting.ColumnType">SchemaTemplateSetting.ColumnType</a></td>
- <td>repeated</td>
- <td><p> </p></td>
+ <td>project</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The name of the project which owns the webhook to test.
+Format: projects/{project} </p></td>
</tr>
<tr>
- <td>table_templates</td>
- <td><a href="#bytebase.v1.SchemaTemplateSetting.TableTemplate">SchemaTemplateSetting.TableTemplate</a></td>
- <td>repeated</td>
- <td><p> </p></td>
+ <td>webhook</td>
+ <td><a href="#bytebase.v1.Webhook">Webhook</a></td>
+ <td></td>
+ <td><p>The webhook to test. Identified by its url. </p></td>
</tr>
</tbody>
@@ -13450,7 +13431,7 @@ are /[a-z][0-9]-/. </p></td>
- <h3 id="bytebase.v1.SchemaTemplateSetting.ColumnType">SchemaTemplateSetting.ColumnType</h3>
+ <h3 id="bytebase.v1.TestWebhookResponse">TestWebhookResponse</h3>
<p></p>
@@ -13461,24 +13442,10 @@ are /[a-z][0-9]-/. </p></td>
<tbody>
<tr>
- <td>engine</td>
- <td><a href="#bytebase.v1.Engine">Engine</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>enabled</td>
- <td><a href="#bool">bool</a></td>
+ <td>error</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>types</td>
- <td><a href="#string">string</a></td>
- <td>repeated</td>
- <td><p> </p></td>
+ <td><p>The result of the test, empty if the test is successful. </p></td>
</tr>
</tbody>
@@ -13488,7 +13455,7 @@ are /[a-z][0-9]-/. </p></td>
- <h3 id="bytebase.v1.SchemaTemplateSetting.FieldTemplate">SchemaTemplateSetting.FieldTemplate</h3>
+ <h3 id="bytebase.v1.UndeleteProjectRequest">UndeleteProjectRequest</h3>
<p></p>
@@ -13499,38 +13466,11 @@ are /[a-z][0-9]-/. </p></td>
<tbody>
<tr>
- <td>id</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>engine</td>
- <td><a href="#bytebase.v1.Engine">Engine</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>category</td>
+ <td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>column</td>
- <td><a href="#bytebase.v1.ColumnMetadata">ColumnMetadata</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>catalog</td>
- <td><a href="#bytebase.v1.ColumnCatalog">ColumnCatalog</a></td>
- <td></td>
- <td><p> </p></td>
+ <td><p>The name of the deleted project.
+Format: projects/{project} </p></td>
</tr>
</tbody>
@@ -13540,7 +13480,7 @@ are /[a-z][0-9]-/. </p></td>
- <h3 id="bytebase.v1.SchemaTemplateSetting.TableTemplate">SchemaTemplateSetting.TableTemplate</h3>
+ <h3 id="bytebase.v1.UpdateProjectRequest">UpdateProjectRequest</h3>
<p></p>
@@ -13551,62 +13491,28 @@ are /[a-z][0-9]-/. </p></td>
<tbody>
<tr>
- <td>id</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>engine</td>
- <td><a href="#bytebase.v1.Engine">Engine</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>category</td>
- <td><a href="#string">string</a></td>
+ <td>project</td>
+ <td><a href="#bytebase.v1.Project">Project</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The project to update.
+
+The project&#39;s `name` field is used to identify the project to update.
+Format: projects/{project} </p></td>
</tr>
<tr>
- <td>table</td>
- <td><a href="#bytebase.v1.TableMetadata">TableMetadata</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>catalog</td>
- <td><a href="#bytebase.v1.TableCatalog">TableCatalog</a></td>
+ <td>allow_missing</td>
+ <td><a href="#bool">bool</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>
+ <td><p>If set to true, and the project is not found, a new project will be created.
+In this situation, `update_mask` is ignored. </p></td>
</tr>
</tbody>
@@ -13616,7 +13522,7 @@ are /[a-z][0-9]-/. </p></td>
- <h3 id="bytebase.v1.SemanticTypeSetting.SemanticType">SemanticTypeSetting.SemanticType</h3>
+ <h3 id="bytebase.v1.UpdateWebhookRequest">UpdateWebhookRequest</h3>
<p></p>
@@ -13627,38 +13533,25 @@ are /[a-z][0-9]-/. </p></td>
<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>webhook</td>
+ <td><a href="#bytebase.v1.Webhook">Webhook</a></td>
<td></td>
- <td><p>the description of the semantic type, it can be empty. </p></td>
+ <td><p>The webhook to modify. </p></td>
</tr>
<tr>
- <td>algorithm</td>
- <td><a href="#bytebase.v1.Algorithm">Algorithm</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>icon</td>
- <td><a href="#string">string</a></td>
+ <td>allow_missing</td>
+ <td><a href="#bool">bool</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>If set to true, and the webhook is not found, a new webhook will be created.
+In this situation, `update_mask` is ignored. </p></td>
</tr>
</tbody>
@@ -13668,8 +13561,8 @@ are /[a-z][0-9]-/. </p></td>
- <h3 id="bytebase.v1.Setting">Setting</h3>
- <p>The schema of setting.</p>
+ <h3 id="bytebase.v1.Webhook">Webhook</h3>
+ <p></p>
<table class="field-table">
@@ -13682,321 +13575,56 @@ are /[a-z][0-9]-/. </p></td>
<td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The resource name of the setting. Must be one of the following forms:
-
-- `setting/{setting}`
-For example, &#34;settings/bb.branding.logo&#34; </p></td>
+ <td><p>name is the name of the webhook, generated by the server.
+format: projects/{project}/webhooks/{webhook} </p></td>
</tr>
<tr>
- <td>value</td>
- <td><a href="#bytebase.v1.Value">Value</a></td>
+ <td>type</td>
+ <td><a href="#bytebase.v1.Webhook.Type">Webhook.Type</a></td>
<td></td>
- <td><p>The configuration value of the setting. </p></td>
+ <td><p>type is the type of the webhook. </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <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>title</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>The setting to update. </p></td>
+ <td><p>title is the title of the webhook. </p></td>
</tr>
<tr>
- <td>validate_only</td>
- <td><a href="#bool">bool</a></td>
+ <td>url</td>
+ <td><a href="#string">string</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>
+ <td><p>url is the url of the webhook, should be unique within the project. </p></td>
</tr>
<tr>
- <td>allow_missing</td>
+ <td>direct_message</td>
<td><a href="#bool">bool</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>if direct_message is set, the notification is sent directly
+to the persons and url will be ignored.
+IM integration setting should be set for this function to work. </p></td>
</tr>
<tr>
- <td>update_mask</td>
- <td><a href="#google.protobuf.FieldMask">google.protobuf.FieldMask</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.Value">Value</h3>
- <p>The data in setting value.</p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>string_value</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>Defines this value as being a string value. </p></td>
- </tr>
-
- <tr>
- <td>app_im_setting_value</td>
- <td><a href="#bytebase.v1.AppIMSetting">AppIMSetting</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>workspace_profile_setting_value</td>
- <td><a href="#bytebase.v1.WorkspaceProfileSetting">WorkspaceProfileSetting</a></td>
- <td></td>
- <td><p>reserved 4; // was AgentPluginSetting agent_plugin_setting_value </p></td>
- </tr>
-
- <tr>
- <td>workspace_approval_setting_value</td>
- <td><a href="#bytebase.v1.WorkspaceApprovalSetting">WorkspaceApprovalSetting</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>schema_template_setting_value</td>
- <td><a href="#bytebase.v1.SchemaTemplateSetting">SchemaTemplateSetting</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>data_classification_setting_value</td>
- <td><a href="#bytebase.v1.DataClassificationSetting">DataClassificationSetting</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>semantic_type_setting_value</td>
- <td><a href="#bytebase.v1.SemanticTypeSetting">SemanticTypeSetting</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>scim_setting</td>
- <td><a href="#bytebase.v1.SCIMSetting">SCIMSetting</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>password_restriction_setting</td>
- <td><a href="#bytebase.v1.PasswordRestrictionSetting">PasswordRestrictionSetting</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>ai_setting</td>
- <td><a href="#bytebase.v1.AISetting">AISetting</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>environment_setting</td>
- <td><a href="#bytebase.v1.EnvironmentSetting">EnvironmentSetting</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.WorkspaceApprovalSetting">WorkspaceApprovalSetting</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>rules</td>
- <td><a href="#bytebase.v1.WorkspaceApprovalSetting.Rule">WorkspaceApprovalSetting.Rule</a></td>
- <td>repeated</td>
- <td><p> </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.WorkspaceApprovalSetting.Rule">WorkspaceApprovalSetting.Rule</h3>
- <p></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></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
-
-Support variables:
-source: the risk source, check the Source enum in the Risk message for the values, support &#34;==&#34; operator.
-level: the risk level, support 100 (low), 200 (moderate) and 300 (high), support &#34;==&#34; operator.
-
-For examples:
-(source == &#34;DML&#34; &amp;&amp; level == 200) || (source == &#34;DDL&#34; &amp;&amp; level == 300) </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.WorkspaceProfileSetting">WorkspaceProfileSetting</h3>
- <p></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><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_2fa</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>Require 2FA for all users. </p></td>
- </tr>
-
- <tr>
- <td>token_duration</td>
- <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>
- <td></td>
- <td><p>The duration for token. </p></td>
- </tr>
-
- <tr>
- <td>announcement</td>
- <td><a href="#bytebase.v1.Announcement">Announcement</a></td>
- <td></td>
- <td><p>The setting of custom announcement </p></td>
- </tr>
-
- <tr>
- <td>maximum_role_expiration</td>
- <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>
- <td></td>
- <td><p>The max duration for role expired. </p></td>
- </tr>
-
- <tr>
- <td>domains</td>
- <td><a href="#string">string</a></td>
- <td>repeated</td>
- <td><p>The workspace domain, e.g., bytebase.com. </p></td>
- </tr>
-
- <tr>
- <td>enforce_identity_domain</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>Only user and group from the domains can be created and login. </p></td>
- </tr>
-
- <tr>
- <td>database_change_mode</td>
- <td><a href="#bytebase.v1.DatabaseChangeMode">DatabaseChangeMode</a></td>
- <td></td>
- <td><p>The workspace database change mode. </p></td>
- </tr>
-
- <tr>
- <td>disallow_password_signin</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>Whether to disallow password signin. (Except workspace admins) </p></td>
- </tr>
-
- <tr>
- <td>enable_metric_collection</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>Whether to enable metric collection for the workspace. </p></td>
- </tr>
-
- <tr>
- <td>inactive_session_timeout</td>
- <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>
- <td></td>
- <td><p>The session expiration time if not activity detected for the user. Value &lt;= 0 means no limit. </p></td>
+ <td>notification_types</td>
+ <td><a href="#bytebase.v1.Activity.Type">Activity.Type</a></td>
+ <td>repeated</td>
+ <td><p>notification_types is the list of activities types that the webhook is interested in.
+Bytebase will only send notifications to the webhook if the activity type is in the list.
+It should not be empty, and should be a subset of the following:
+- ISSUE_CREATE
+- ISSUE_COMMENT_CREATE
+- ISSUE_FIELD_UPDATE
+- ISSUE_STATUS_UPDATE
+- ISSUE_APPROVAL_NOTIFY
+- ISSUE_PIPELINE_STAGE_STATUS_UPDATE
+- ISSUE_PIPELINE_TASK_RUN_STATUS_UPDATE
+- NOTIFY_ISSUE_APPROVED
+- NOTIFY_PIPELINE_ROLLOUT </p></td>
</tr>
</tbody>
@@ -14008,8 +13636,8 @@ For examples:
- <h3 id="bytebase.v1.AISetting.Provider">AISetting.Provider</h3>
- <p></p>
+ <h3 id="bytebase.v1.Activity.Type">Activity.Type</h3>
+ <p>Activity type enumeration.</p>
<table class="enum-table">
<thead>
<tr><td>Name</td><td>Number</td><td>Description</td></tr>
@@ -14017,69 +13645,74 @@ For examples:
<tbody>
<tr>
- <td>PROVIDER_UNSPECIFIED</td>
+ <td>TYPE_UNSPECIFIED</td>
<td>0</td>
- <td><p></p></td>
+ <td><p>Unspecified type.</p></td>
</tr>
<tr>
- <td>OPEN_AI</td>
+ <td>NOTIFY_ISSUE_APPROVED</td>
+ <td>23</td>
+ <td><p>Notifications via webhooks.
+
+NOTIFY_ISSUE_APPROVED represents the issue approved notification.</p></td>
+ </tr>
+
+ <tr>
+ <td>NOTIFY_PIPELINE_ROLLOUT</td>
+ <td>24</td>
+ <td><p>NOTIFY_PIPELINE_ROLLOUT represents the pipeline rollout notification.</p></td>
+ </tr>
+
+ <tr>
+ <td>ISSUE_CREATE</td>
<td>1</td>
- <td><p></p></td>
+ <td><p>Issue related activity types.
+
+ISSUE_CREATE represents creating an issue.</p></td>
</tr>
<tr>
- <td>CLAUDE</td>
+ <td>ISSUE_COMMENT_CREATE</td>
<td>2</td>
- <td><p></p></td>
+ <td><p>ISSUE_COMMENT_CREATE represents commenting on an issue.</p></td>
</tr>
<tr>
- <td>GEMINI</td>
+ <td>ISSUE_FIELD_UPDATE</td>
<td>3</td>
- <td><p></p></td>
+ <td><p>ISSUE_FIELD_UPDATE represents updating the issue field, likes title, description, etc.</p></td>
</tr>
<tr>
- <td>AZURE_OPENAI</td>
+ <td>ISSUE_STATUS_UPDATE</td>
<td>4</td>
- <td><p></p></td>
+ <td><p>ISSUE_STATUS_UPDATE represents the issue status change, including OPEN, CLOSE, CANCEL fow now.</p></td>
</tr>
- </tbody>
- </table>
-
- <h3 id="bytebase.v1.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>
+ <td>ISSUE_APPROVAL_NOTIFY</td>
+ <td>21</td>
+ <td><p>ISSUE_APPROVAL_NOTIFY is the type for notifying issue approval.</p></td>
</tr>
<tr>
- <td>INNER</td>
- <td>1</td>
- <td><p></p></td>
+ <td>ISSUE_PIPELINE_STAGE_STATUS_UPDATE</td>
+ <td>5</td>
+ <td><p>ISSUE_PIPELINE_STAGE_STATUS_UPDATE represents the pipeline stage status change, including BEGIN, END for now.</p></td>
</tr>
<tr>
- <td>OUTER</td>
- <td>2</td>
- <td><p></p></td>
+ <td>ISSUE_PIPELINE_TASK_RUN_STATUS_UPDATE</td>
+ <td>22</td>
+ <td><p>ISSUE_PIPELINE_TASK_RUN_STATUS_UPDATE represents the pipeline task run status change, including PENDING, RUNNING, DONE, FAILED, CANCELED.</p></td>
</tr>
</tbody>
</table>
- <h3 id="bytebase.v1.Announcement.AlertLevel">Announcement.AlertLevel</h3>
- <p>We support three levels of AlertLevel: INFO, WARNING, and ERROR.</p>
+ <h3 id="bytebase.v1.Webhook.Type">Webhook.Type</h3>
+ <p>Webhook integration type.</p>
<table class="enum-table">
<thead>
<tr><td>Name</td><td>Number</td><td>Description</td></tr>
@@ -14087,235 +13720,293 @@ For examples:
<tbody>
<tr>
- <td>ALERT_LEVEL_UNSPECIFIED</td>
+ <td>TYPE_UNSPECIFIED</td>
<td>0</td>
- <td><p></p></td>
+ <td><p>Unspecified type.</p></td>
</tr>
<tr>
- <td>INFO</td>
+ <td>SLACK</td>
<td>1</td>
- <td><p></p></td>
+ <td><p>Slack integration.</p></td>
</tr>
<tr>
- <td>WARNING</td>
+ <td>DISCORD</td>
<td>2</td>
- <td><p></p></td>
+ <td><p>Discord integration.</p></td>
</tr>
<tr>
- <td>CRITICAL</td>
+ <td>TEAMS</td>
<td>3</td>
- <td><p></p></td>
+ <td><p>Microsoft Teams integration.</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>DINGTALK</td>
+ <td>4</td>
+ <td><p>DingTalk integration.</p></td>
+ </tr>
<tr>
- <td>DATABASE_CHANGE_MODE_UNSPECIFIED</td>
- <td>0</td>
- <td><p></p></td>
+ <td>FEISHU</td>
+ <td>5</td>
+ <td><p>Feishu integration.</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>
+ <td>WECOM</td>
+ <td>6</td>
+ <td><p>WeCom (WeChat Work) integration.</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>
+ <td>LARK</td>
+ <td>8</td>
+ <td><p>Lark integration.</p></td>
</tr>
</tbody>
</table>
- <h3 id="bytebase.v1.Setting.SettingName">Setting.SettingName</h3>
- <p></p>
+
+
+
+
+ <h3 id="bytebase.v1.ProjectService">ProjectService</h3>
+ <p>ProjectService manages projects that group databases and changes.</p>
<table class="enum-table">
<thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
+ <tr><td>Method Name</td><td>Request Type</td><td>Response Type</td><td>Description</td></tr>
</thead>
<tbody>
<tr>
- <td>SETTING_NAME_UNSPECIFIED</td>
- <td>0</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>AUTH_SECRET</td>
- <td>1</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>BRANDING_LOGO</td>
- <td>2</td>
- <td><p></p></td>
+ <td>GetProject</td>
+ <td><a href="#bytebase.v1.GetProjectRequest">GetProjectRequest</a></td>
+ <td><a href="#bytebase.v1.Project">Project</a></td>
+ <td><p>GetProject retrieves a project by name.
+Users with &#34;bb.projects.get&#34; permission on the workspace or the project owner can access this method.
+Permissions required: bb.projects.get</p></td>
</tr>
<tr>
- <td>WORKSPACE_ID</td>
- <td>3</td>
- <td><p></p></td>
+ <td>ListProjects</td>
+ <td><a href="#bytebase.v1.ListProjectsRequest">ListProjectsRequest</a></td>
+ <td><a href="#bytebase.v1.ListProjectsResponse">ListProjectsResponse</a></td>
+ <td><p>Lists all projects in the workspace with optional filtering.
+Permissions required: bb.projects.list</p></td>
</tr>
<tr>
- <td>WORKSPACE_PROFILE</td>
- <td>4</td>
- <td><p></p></td>
+ <td>SearchProjects</td>
+ <td><a href="#bytebase.v1.SearchProjectsRequest">SearchProjectsRequest</a></td>
+ <td><a href="#bytebase.v1.SearchProjectsResponse">SearchProjectsResponse</a></td>
+ <td><p>Searches for projects with advanced filtering capabilities.
+Permissions required: bb.projects.get (or project-level bb.projects.get for specific projects)</p></td>
</tr>
<tr>
- <td>WORKSPACE_APPROVAL</td>
- <td>5</td>
- <td><p></p></td>
+ <td>CreateProject</td>
+ <td><a href="#bytebase.v1.CreateProjectRequest">CreateProjectRequest</a></td>
+ <td><a href="#bytebase.v1.Project">Project</a></td>
+ <td><p>Creates a new project in the workspace.
+Permissions required: bb.projects.create</p></td>
</tr>
<tr>
- <td>WORKSPACE_EXTERNAL_APPROVAL</td>
- <td>6</td>
- <td><p></p></td>
+ <td>UpdateProject</td>
+ <td><a href="#bytebase.v1.UpdateProjectRequest">UpdateProjectRequest</a></td>
+ <td><a href="#bytebase.v1.Project">Project</a></td>
+ <td><p>Updates an existing project&#39;s properties.
+Permissions required: bb.projects.update</p></td>
</tr>
<tr>
- <td>ENTERPRISE_LICENSE</td>
- <td>7</td>
- <td><p></p></td>
+ <td>DeleteProject</td>
+ <td><a href="#bytebase.v1.DeleteProjectRequest">DeleteProjectRequest</a></td>
+ <td><a href="#google.protobuf.Empty">.google.protobuf.Empty</a></td>
+ <td><p>Deletes (soft-delete or purge) a project.
+Permissions required: bb.projects.delete</p></td>
</tr>
<tr>
- <td>APP_IM</td>
- <td>8</td>
- <td><p></p></td>
+ <td>UndeleteProject</td>
+ <td><a href="#bytebase.v1.UndeleteProjectRequest">UndeleteProjectRequest</a></td>
+ <td><a href="#bytebase.v1.Project">Project</a></td>
+ <td><p>Restores a soft-deleted project.
+Permissions required: bb.projects.undelete</p></td>
</tr>
<tr>
- <td>WATERMARK</td>
- <td>9</td>
- <td><p></p></td>
+ <td>BatchDeleteProjects</td>
+ <td><a href="#bytebase.v1.BatchDeleteProjectsRequest">BatchDeleteProjectsRequest</a></td>
+ <td><a href="#google.protobuf.Empty">.google.protobuf.Empty</a></td>
+ <td><p>Deletes multiple projects in a single operation.
+Permissions required: bb.projects.delete</p></td>
</tr>
<tr>
- <td>AI</td>
- <td>10</td>
- <td><p></p></td>
+ <td>GetIamPolicy</td>
+ <td><a href="#bytebase.v1.GetIamPolicyRequest">GetIamPolicyRequest</a></td>
+ <td><a href="#bytebase.v1.IamPolicy">IamPolicy</a></td>
+ <td><p>Retrieves the IAM policy for a project.
+Permissions required: bb.projects.getIamPolicy</p></td>
</tr>
<tr>
- <td>SCHEMA_TEMPLATE</td>
- <td>13</td>
- <td><p></p></td>
+ <td>BatchGetIamPolicy</td>
+ <td><a href="#bytebase.v1.BatchGetIamPolicyRequest">BatchGetIamPolicyRequest</a></td>
+ <td><a href="#bytebase.v1.BatchGetIamPolicyResponse">BatchGetIamPolicyResponse</a></td>
+ <td><p>Deprecated. No permission check implemented.
+Permissions required: None</p></td>
</tr>
<tr>
- <td>DATA_CLASSIFICATION</td>
- <td>14</td>
- <td><p></p></td>
+ <td>SetIamPolicy</td>
+ <td><a href="#bytebase.v1.SetIamPolicyRequest">SetIamPolicyRequest</a></td>
+ <td><a href="#bytebase.v1.IamPolicy">IamPolicy</a></td>
+ <td><p>Sets the IAM policy for a project.
+Permissions required: bb.projects.setIamPolicy</p></td>
</tr>
<tr>
- <td>SEMANTIC_TYPES</td>
- <td>15</td>
- <td><p></p></td>
+ <td>AddWebhook</td>
+ <td><a href="#bytebase.v1.AddWebhookRequest">AddWebhookRequest</a></td>
+ <td><a href="#bytebase.v1.Project">Project</a></td>
+ <td><p>Adds a webhook to a project for notifications.
+Permissions required: bb.projects.update</p></td>
</tr>
<tr>
- <td>SCIM</td>
- <td>17</td>
- <td><p></p></td>
+ <td>UpdateWebhook</td>
+ <td><a href="#bytebase.v1.UpdateWebhookRequest">UpdateWebhookRequest</a></td>
+ <td><a href="#bytebase.v1.Project">Project</a></td>
+ <td><p>Updates an existing webhook configuration.
+Permissions required: bb.projects.update</p></td>
</tr>
<tr>
- <td>PASSWORD_RESTRICTION</td>
- <td>18</td>
- <td><p></p></td>
+ <td>RemoveWebhook</td>
+ <td><a href="#bytebase.v1.RemoveWebhookRequest">RemoveWebhookRequest</a></td>
+ <td><a href="#bytebase.v1.Project">Project</a></td>
+ <td><p>Removes a webhook from a project.
+Permissions required: bb.projects.update</p></td>
</tr>
<tr>
- <td>ENVIRONMENT</td>
- <td>19</td>
- <td><p></p></td>
+ <td>TestWebhook</td>
+ <td><a href="#bytebase.v1.TestWebhookRequest">TestWebhookRequest</a></td>
+ <td><a href="#bytebase.v1.TestWebhookResponse">TestWebhookResponse</a></td>
+ <td><p>Tests a webhook by sending a test notification.
+Permissions required: bb.projects.update</p></td>
</tr>
</tbody>
</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>
-
+
+
+
+ <h4>Methods with HTTP bindings</h4>
+ <table>
+ <thead>
<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>
+ <td>Method Name</td>
+ <td>Method</td>
+ <td>Pattern</td>
+ <td>Body</td>
</tr>
+ </thead>
+ <tbody>
+
+
<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>
+ <td>GetProject</td>
+ <td>GET</td>
+ <td>/v1/{name=projects/*}</td>
+ <td></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>
+ <td>ListProjects</td>
+ <td>GET</td>
+ <td>/v1/projects</td>
+ <td></td>
</tr>
+
- </tbody>
- </table>
-
-
-
-
- <h4>Methods with HTTP bindings</h4>
- <table>
- <thead>
+
+
<tr>
- <td>Method Name</td>
- <td>Method</td>
- <td>Pattern</td>
- <td>Body</td>
+ <td>SearchProjects</td>
+ <td>POST</td>
+ <td>/v1/projects:search</td>
+ <td>*</td>
</tr>
- </thead>
- <tbody>
+
<tr>
- <td>ListSettings</td>
+ <td>CreateProject</td>
+ <td>POST</td>
+ <td>/v1/projects</td>
+ <td>project</td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>UpdateProject</td>
+ <td>PATCH</td>
+ <td>/v1/{project.name=projects/*}</td>
+ <td>project</td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>DeleteProject</td>
+ <td>DELETE</td>
+ <td>/v1/{name=projects/*}</td>
+ <td></td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>UndeleteProject</td>
+ <td>POST</td>
+ <td>/v1/{name=projects/*}:undelete</td>
+ <td>*</td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>BatchDeleteProjects</td>
+ <td>POST</td>
+ <td>/v1/projects:batchDelete</td>
+ <td>*</td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>GetIamPolicy</td>
<td>GET</td>
- <td>/v1/settings</td>
+ <td>/v1/{resource=projects/*}:getIamPolicy</td>
<td></td>
</tr>
@@ -14323,9 +14014,9 @@ Permissions required: bb.settings.set</p></td>
<tr>
- <td>GetSetting</td>
+ <td>BatchGetIamPolicy</td>
<td>GET</td>
- <td>/v1/{name=settings/*}</td>
+ <td>/v1/{scope=*/*}/iamPolicies:batchGet</td>
<td></td>
</tr>
@@ -14333,10 +14024,50 @@ Permissions required: bb.settings.set</p></td>
<tr>
- <td>UpdateSetting</td>
+ <td>SetIamPolicy</td>
+ <td>POST</td>
+ <td>/v1/{resource=projects/*}:setIamPolicy</td>
+ <td>*</td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>AddWebhook</td>
+ <td>POST</td>
+ <td>/v1/{project=projects/*}:addWebhook</td>
+ <td>*</td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>UpdateWebhook</td>
<td>PATCH</td>
- <td>/v1/{setting.name=settings/*}</td>
- <td>setting</td>
+ <td>/v1/{webhook.name=projects/*/webhooks/*}:updateWebhook</td>
+ <td>webhook</td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>RemoveWebhook</td>
+ <td>POST</td>
+ <td>/v1/{webhook.name=projects/*/webhooks/*}:removeWebhook</td>
+ <td>*</td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>TestWebhook</td>
+ <td>POST</td>
+ <td>/v1/{project=projects/*}:testWebhook</td>
+ <td>*</td>
</tr>
@@ -14347,12 +14078,12 @@ Permissions required: bb.settings.set</p></td>
<div class="file-heading">
- <h2 id="v1/user_service.proto">v1/user_service.proto</h2><a href="#title">Top</a>
+ <h2 id="v1/setting_service.proto">v1/setting_service.proto</h2><a href="#title">Top</a>
</div>
<p></p>
- <h3 id="bytebase.v1.BatchGetUsersRequest">BatchGetUsersRequest</h3>
+ <h3 id="bytebase.v1.AISetting">AISetting</h3>
<p></p>
@@ -14363,35 +14094,45 @@ Permissions required: bb.settings.set</p></td>
<tbody>
<tr>
- <td>names</td>
+ <td>enabled</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>provider</td>
+ <td><a href="#bytebase.v1.AISetting.Provider">AISetting.Provider</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>endpoint</td>
<td><a href="#string">string</a></td>
- <td>repeated</td>
- <td><p>The user names to retrieve.
-Format: users/{user uid or user email} </p></td>
+ <td></td>
+ <td><p> </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.BatchGetUsersResponse">BatchGetUsersResponse</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
+ <tr>
+ <td>api_key</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
<tr>
- <td>users</td>
- <td><a href="#bytebase.v1.User">User</a></td>
- <td>repeated</td>
- <td><p>The users from the specified request. </p></td>
+ <td>model</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>version</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p> </p></td>
</tr>
</tbody>
@@ -14401,7 +14142,7 @@ Format: users/{user uid or user email} </p></td>
- <h3 id="bytebase.v1.CreateUserRequest">CreateUserRequest</h3>
+ <h3 id="bytebase.v1.Algorithm">Algorithm</h3>
<p></p>
@@ -14412,10 +14153,31 @@ Format: users/{user uid or user email} </p></td>
<tbody>
<tr>
- <td>user</td>
- <td><a href="#bytebase.v1.User">User</a></td>
+ <td>full_mask</td>
+ <td><a href="#bytebase.v1.Algorithm.FullMask">Algorithm.FullMask</a></td>
<td></td>
- <td><p>The user to create. </p></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>range_mask</td>
+ <td><a href="#bytebase.v1.Algorithm.RangeMask">Algorithm.RangeMask</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>md5_mask</td>
+ <td><a href="#bytebase.v1.Algorithm.MD5Mask">Algorithm.MD5Mask</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>inner_outer_mask</td>
+ <td><a href="#bytebase.v1.Algorithm.InnerOuterMask">Algorithm.InnerOuterMask</a></td>
+ <td></td>
+ <td><p> </p></td>
</tr>
</tbody>
@@ -14425,7 +14187,7 @@ Format: users/{user uid or user email} </p></td>
- <h3 id="bytebase.v1.DeleteUserRequest">DeleteUserRequest</h3>
+ <h3 id="bytebase.v1.Algorithm.FullMask">Algorithm.FullMask</h3>
<p></p>
@@ -14436,11 +14198,11 @@ Format: users/{user uid or user email} </p></td>
<tbody>
<tr>
- <td>name</td>
+ <td>substitution</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The name of the user to delete.
-Format: users/{user} </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>
@@ -14450,7 +14212,7 @@ Format: users/{user} </p></td>
- <h3 id="bytebase.v1.GetUserRequest">GetUserRequest</h3>
+ <h3 id="bytebase.v1.Algorithm.InnerOuterMask">Algorithm.InnerOuterMask</h3>
<p></p>
@@ -14461,85 +14223,31 @@ Format: users/{user} </p></td>
<tbody>
<tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
+ <td>prefix_len</td>
+ <td><a href="#int32">int32</a></td>
<td></td>
- <td><p>The name of the user to retrieve.
-Format: users/{user uid or user email} </p></td>
+ <td><p> </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.ListUsersRequest">ListUsersRequest</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
<tr>
- <td>page_size</td>
+ <td>suffix_len</td>
<td><a href="#int32">int32</a></td>
<td></td>
- <td><p>The maximum number of users to return. The service may return fewer than
-this value.
-If unspecified, at most 10 users will be returned.
-The maximum value is 1000; values above 1000 will be coerced to 1000. </p></td>
- </tr>
-
- <tr>
- <td>page_token</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>A page token, received from a previous `ListUsers` call.
-Provide this to retrieve the subsequent page.
-
-When paginating, all other parameters provided to `ListUsers` must match
-the call that provided the page token. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>show_deleted</td>
- <td><a href="#bool">bool</a></td>
+ <td>type</td>
+ <td><a href="#bytebase.v1.Algorithm.InnerOuterMask.MaskType">Algorithm.InnerOuterMask.MaskType</a></td>
<td></td>
- <td><p>Show deleted users if specified. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>filter</td>
+ <td>substitution</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>Filter is used to filter users returned in the list.
-The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
-
-Supported filter:
-- name: the user name, support &#34;==&#34; and &#34;.matches()&#34; operator.
-- email: the user email, support &#34;==&#34; and &#34;.matches()&#34; operator.
-- user_type: the type, check UserType enum for values, support &#34;==&#34;, &#34;in [xx]&#34;, &#34;!(in [xx])&#34; operator.
-- state: check State enum for values, support &#34;==&#34; operator.
-- project: the project full name in &#34;projects/{id}&#34; format, support &#34;==&#34; operator.
-
-For example:
-name == &#34;ed&#34;
-name.matches(&#34;ed&#34;)
-email == &#34;[email protected]&#34;
-email.matches(&#34;ed&#34;)
-user_type == &#34;SERVICE_ACCOUNT&#34;
-user_type in [&#34;SERVICE_ACCOUNT&#34;, &#34;USER&#34;]
-!(user_type in [&#34;SERVICE_ACCOUNT&#34;, &#34;USER&#34;])
-state == &#34;DELETED&#34;
-project == &#34;projects/sample-project&#34;
-You can combine filter conditions like:
-name.matches(&#34;ed&#34;) &amp;&amp; project == &#34;projects/sample-project&#34;
-(name == &#34;ed&#34; || email == &#34;[email protected]&#34;) &amp;&amp; project == &#34;projects/sample-project&#34; </p></td>
+ <td><p> </p></td>
</tr>
</tbody>
@@ -14549,7 +14257,7 @@ name.matches(&#34;ed&#34;) &amp;&amp; project == &#34;projects/sample-project&#3
- <h3 id="bytebase.v1.ListUsersResponse">ListUsersResponse</h3>
+ <h3 id="bytebase.v1.Algorithm.MD5Mask">Algorithm.MD5Mask</h3>
<p></p>
@@ -14560,18 +14268,10 @@ name.matches(&#34;ed&#34;) &amp;&amp; project == &#34;projects/sample-project&#3
<tbody>
<tr>
- <td>users</td>
- <td><a href="#bytebase.v1.User">User</a></td>
- <td>repeated</td>
- <td><p>The users from the specified request. </p></td>
- </tr>
-
- <tr>
- <td>next_page_token</td>
+ <td>salt</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>salt is the salt value to generate a different hash that with the word alone. </p></td>
</tr>
</tbody>
@@ -14581,7 +14281,7 @@ If this field is omitted, there are no subsequent pages. </p></td>
- <h3 id="bytebase.v1.UndeleteUserRequest">UndeleteUserRequest</h3>
+ <h3 id="bytebase.v1.Algorithm.RangeMask">Algorithm.RangeMask</h3>
<p></p>
@@ -14592,11 +14292,11 @@ If this field is omitted, there are no subsequent pages. </p></td>
<tbody>
<tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The name of the deleted user.
-Format: users/{user} </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>
@@ -14606,7 +14306,7 @@ Format: users/{user} </p></td>
- <h3 id="bytebase.v1.UpdateUserRequest">UpdateUserRequest</h3>
+ <h3 id="bytebase.v1.Algorithm.RangeMask.Slice">Algorithm.RangeMask.Slice</h3>
<p></p>
@@ -14617,50 +14317,24 @@ Format: users/{user} </p></td>
<tbody>
<tr>
- <td>user</td>
- <td><a href="#bytebase.v1.User">User</a></td>
+ <td>start</td>
+ <td><a href="#int32">int32</a></td>
<td></td>
- <td><p>The user to update.
-
-The user&#39;s `name` field is used to identify the user to update.
-Format: users/{user} </p></td>
+ <td><p>start is the start index of the original value, start from 0 and should be less than stop. </p></td>
</tr>
<tr>
- <td>update_mask</td>
- <td><a href="#google.protobuf.FieldMask">google.protobuf.FieldMask</a></td>
+ <td>end</td>
+ <td><a href="#int32">int32</a></td>
<td></td>
- <td><p>The list of fields to update. </p></td>
+ <td><p>stop is the stop index of the original value, should be less than the length of the original value. </p></td>
</tr>
<tr>
- <td>otp_code</td>
+ <td>substitution</td>
<td><a href="#string">string</a></td>
- <td>optional</td>
- <td><p>The otp_code is used to verify the user&#39;s identity by MFA. </p></td>
- </tr>
-
- <tr>
- <td>regenerate_temp_mfa_secret</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>The regenerate_temp_mfa_secret flag means to regenerate temporary MFA secret for user.
-This is used for MFA setup. The temporary MFA secret and recovery codes will be returned in the response. </p></td>
- </tr>
-
- <tr>
- <td>regenerate_recovery_codes</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>The regenerate_recovery_codes flag means to regenerate recovery codes for user. </p></td>
- </tr>
-
- <tr>
- <td>allow_missing</td>
- <td><a href="#bool">bool</a></td>
<td></td>
- <td><p>If set to true, and the user is not found, a new user will be created.
-In this situation, `update_mask` is ignored. </p></td>
+ <td><p>substitution is the string used to replace the OriginalValue[start:end). </p></td>
</tr>
</tbody>
@@ -14670,7 +14344,7 @@ In this situation, `update_mask` is ignored. </p></td>
- <h3 id="bytebase.v1.User">User</h3>
+ <h3 id="bytebase.v1.Announcement">Announcement</h3>
<p></p>
@@ -14681,104 +14355,86 @@ In this situation, `update_mask` is ignored. </p></td>
<tbody>
<tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The name of the user.
-Format: users/{user}. {user} is a system-generated unique ID. </p></td>
- </tr>
-
- <tr>
- <td>state</td>
- <td><a href="#bytebase.v1.State">State</a></td>
+ <td>level</td>
+ <td><a href="#bytebase.v1.Announcement.AlertLevel">Announcement.AlertLevel</a></td>
<td></td>
- <td><p>The lifecycle state of the user account. </p></td>
+ <td><p>The alert level of announcement </p></td>
</tr>
<tr>
- <td>email</td>
+ <td>text</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The email address of the user, used for login and notifications. </p></td>
+ <td><p>The text of announcement </p></td>
</tr>
<tr>
- <td>title</td>
+ <td>link</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The display title or full name of the user. </p></td>
- </tr>
-
- <tr>
- <td>user_type</td>
- <td><a href="#bytebase.v1.UserType">UserType</a></td>
- <td></td>
- <td><p>The type of user account. </p></td>
+ <td><p>The optional link, user can follow the link to check extra details </p></td>
</tr>
- <tr>
- <td>password</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The password for authentication. Only used during user creation or password updates. </p></td>
- </tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <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>service_key</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The service key for service account authentication. Only used for service accounts. </p></td>
+ <td>settings</td>
+ <td><a href="#bytebase.v1.AppIMSetting.IMSetting">AppIMSetting.IMSetting</a></td>
+ <td>repeated</td>
+ <td><p> </p></td>
</tr>
- <tr>
- <td>mfa_enabled</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>The mfa_enabled flag means if the user has enabled MFA. </p></td>
- </tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.AppIMSetting.DingTalk">AppIMSetting.DingTalk</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
<tr>
- <td>temp_otp_secret</td>
+ <td>client_id</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>Temporary OTP secret used during MFA setup and regeneration. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>temp_recovery_codes</td>
+ <td>client_secret</td>
<td><a href="#string">string</a></td>
- <td>repeated</td>
- <td><p>Temporary recovery codes used during MFA setup and regeneration. </p></td>
- </tr>
-
- <tr>
- <td>temp_otp_secret_created_time</td>
- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
<td></td>
- <td><p>Timestamp when temp_otp_secret was created. Used by frontend to show countdown timer. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>phone</td>
+ <td>robot_code</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>Should be a valid E.164 compliant phone number.
-Could be empty. </p></td>
- </tr>
-
- <tr>
- <td>profile</td>
- <td><a href="#bytebase.v1.User.Profile">User.Profile</a></td>
- <td></td>
- <td><p>User profile metadata. </p></td>
- </tr>
-
- <tr>
- <td>groups</td>
- <td><a href="#string">string</a></td>
- <td>repeated</td>
- <td><p>The groups for the user.
-Format: groups/{email} </p></td>
+ <td><p> </p></td>
</tr>
</tbody>
@@ -14788,7 +14444,7 @@ Format: groups/{email} </p></td>
- <h3 id="bytebase.v1.User.Profile">User.Profile</h3>
+ <h3 id="bytebase.v1.AppIMSetting.Feishu">AppIMSetting.Feishu</h3>
<p></p>
@@ -14799,24 +14455,17 @@ Format: groups/{email} </p></td>
<tbody>
<tr>
- <td>last_login_time</td>
- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
+ <td>app_id</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>The last time the user successfully logged in. </p></td>
- </tr>
-
- <tr>
- <td>last_change_password_time</td>
- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
- <td></td>
- <td><p>The last time the user changed their password. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>source</td>
+ <td>app_secret</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>source means where the user comes from. For now we support Entra ID SCIM sync, so the source could be Entra ID. </p></td>
+ <td><p> </p></td>
</tr>
</tbody>
@@ -14826,234 +14475,8 @@ Format: groups/{email} </p></td>
-
-
- <h3 id="bytebase.v1.UserType">UserType</h3>
+ <h3 id="bytebase.v1.AppIMSetting.IMSetting">AppIMSetting.IMSetting</h3>
<p></p>
- <table class="enum-table">
- <thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>USER_TYPE_UNSPECIFIED</td>
- <td>0</td>
- <td><p>Unspecified user type.</p></td>
- </tr>
-
- <tr>
- <td>USER</td>
- <td>1</td>
- <td><p>Regular human user account.</p></td>
- </tr>
-
- <tr>
- <td>SYSTEM_BOT</td>
- <td>2</td>
- <td><p>System-managed bot account for automated operations.</p></td>
- </tr>
-
- <tr>
- <td>SERVICE_ACCOUNT</td>
- <td>3</td>
- <td><p>Service account for API integrations.</p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.UserService">UserService</h3>
- <p>UserService manages user accounts and authentication.</p>
- <table class="enum-table">
- <thead>
- <tr><td>Method Name</td><td>Request Type</td><td>Response Type</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>GetUser</td>
- <td><a href="#bytebase.v1.GetUserRequest">GetUserRequest</a></td>
- <td><a href="#bytebase.v1.User">User</a></td>
- <td><p>Get the user.
-Any authenticated user can get the user.
-Permissions required: bb.users.get</p></td>
- </tr>
-
- <tr>
- <td>BatchGetUsers</td>
- <td><a href="#bytebase.v1.BatchGetUsersRequest">BatchGetUsersRequest</a></td>
- <td><a href="#bytebase.v1.BatchGetUsersResponse">BatchGetUsersResponse</a></td>
- <td><p>Get the users in batch.
-Any authenticated user can batch get users.
-Permissions required: bb.users.get</p></td>
- </tr>
-
- <tr>
- <td>GetCurrentUser</td>
- <td><a href="#google.protobuf.Empty">.google.protobuf.Empty</a></td>
- <td><a href="#bytebase.v1.User">User</a></td>
- <td><p>Get the current authenticated user.
-Permissions required: None</p></td>
- </tr>
-
- <tr>
- <td>ListUsers</td>
- <td><a href="#bytebase.v1.ListUsersRequest">ListUsersRequest</a></td>
- <td><a href="#bytebase.v1.ListUsersResponse">ListUsersResponse</a></td>
- <td><p>List all users.
-Any authenticated user can list users.
-Permissions required: bb.users.list</p></td>
- </tr>
-
- <tr>
- <td>CreateUser</td>
- <td><a href="#bytebase.v1.CreateUserRequest">CreateUserRequest</a></td>
- <td><a href="#bytebase.v1.User">User</a></td>
- <td><p>Creates a user. When Disallow Signup is enabled, requires bb.users.create permission; otherwise any user can sign up.
-Permissions required: bb.users.create (only when Disallow Signup is enabled)</p></td>
- </tr>
-
- <tr>
- <td>UpdateUser</td>
- <td><a href="#bytebase.v1.UpdateUserRequest">UpdateUserRequest</a></td>
- <td><a href="#bytebase.v1.User">User</a></td>
- <td><p>Updates a user. Users can update their own profile, or users with bb.users.update permission can update any user.
-Permissions required: bb.users.update (or self)</p></td>
- </tr>
-
- <tr>
- <td>DeleteUser</td>
- <td><a href="#bytebase.v1.DeleteUserRequest">DeleteUserRequest</a></td>
- <td><a href="#google.protobuf.Empty">.google.protobuf.Empty</a></td>
- <td><p>Deletes a user. Requires bb.users.delete permission with additional validation: the last remaining workspace admin cannot be deleted.
-Permissions required: bb.users.delete</p></td>
- </tr>
-
- <tr>
- <td>UndeleteUser</td>
- <td><a href="#bytebase.v1.UndeleteUserRequest">UndeleteUserRequest</a></td>
- <td><a href="#bytebase.v1.User">User</a></td>
- <td><p>Restores a deleted user.
-Permissions required: bb.users.undelete</p></td>
- </tr>
-
- </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>GetUser</td>
- <td>GET</td>
- <td>/v1/{name=users/*}</td>
- <td></td>
- </tr>
-
-
-
-
- <tr>
- <td>BatchGetUsers</td>
- <td>GET</td>
- <td>/v1/users:batchGet</td>
- <td></td>
- </tr>
-
-
-
-
- <tr>
- <td>GetCurrentUser</td>
- <td>GET</td>
- <td>/v1/users/me</td>
- <td></td>
- </tr>
-
-
-
-
- <tr>
- <td>ListUsers</td>
- <td>GET</td>
- <td>/v1/users</td>
- <td></td>
- </tr>
-
-
-
-
- <tr>
- <td>CreateUser</td>
- <td>POST</td>
- <td>/v1/users</td>
- <td>user</td>
- </tr>
-
-
-
-
- <tr>
- <td>UpdateUser</td>
- <td>PATCH</td>
- <td>/v1/{user.name=users/*}</td>
- <td>user</td>
- </tr>
-
-
-
-
- <tr>
- <td>DeleteUser</td>
- <td>DELETE</td>
- <td>/v1/{name=users/*}</td>
- <td></td>
- </tr>
-
-
-
-
- <tr>
- <td>UndeleteUser</td>
- <td>POST</td>
- <td>/v1/{name=users/*}:undelete</td>
- <td>*</td>
- </tr>
-
-
- </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.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">
@@ -15063,157 +14486,100 @@ Permissions required: bb.users.undelete</p></td>
<tbody>
<tr>
- <td>version</td>
- <td><a href="#string">string</a></td>
+ <td>type</td>
+ <td><a href="#bytebase.v1.Webhook.Type">Webhook.Type</a></td>
<td></td>
- <td><p>The Bytebase server version. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>git_commit</td>
- <td><a href="#string">string</a></td>
+ <td>slack</td>
+ <td><a href="#bytebase.v1.AppIMSetting.Slack">AppIMSetting.Slack</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>feishu</td>
+ <td><a href="#bytebase.v1.AppIMSetting.Feishu">AppIMSetting.Feishu</a></td>
<td></td>
- <td><p>Whether the Bytebase instance is running in read-only mode. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>saas</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 the Bytebase instance is running in SaaS mode where some features cannot be edited by users. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>demo</td>
- <td><a href="#bool">bool</a></td>
+ <td>lark</td>
+ <td><a href="#bytebase.v1.AppIMSetting.Lark">AppIMSetting.Lark</a></td>
<td></td>
- <td><p>Whether the Bytebase instance is running in demo mode. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>host</td>
- <td><a href="#string">string</a></td>
+ <td>dingtalk</td>
+ <td><a href="#bytebase.v1.AppIMSetting.DingTalk">AppIMSetting.DingTalk</a></td>
<td></td>
- <td><p>The host address of the Bytebase instance. </p></td>
+ <td><p> </p></td>
</tr>
- <tr>
- <td>port</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The port number of the Bytebase instance. </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>external_url</td>
+ <td>app_id</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>need_admin_setup</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>Whether the Bytebase instance requires initial admin setup. </p></td>
- </tr>
-
- <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>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>require_2fa</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>Whether two-factor authentication is required for all users. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>workspace_id</td>
+ <td>app_secret</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The unique identifier for the workspace. </p></td>
+ <td><p> </p></td>
</tr>
- <tr>
- <td>debug</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>Whether debug mode is enabled. </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>unlicensed_features</td>
+ <td>token</td>
<td><a href="#string">string</a></td>
- <td>repeated</td>
- <td><p>List of features that are not licensed. </p></td>
- </tr>
-
- <tr>
- <td>disallow_password_signin</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>Whether password-based signin is disabled (except for workspace admins). </p></td>
- </tr>
-
- <tr>
- <td>password_restriction</td>
- <td><a href="#bytebase.v1.PasswordRestrictionSetting">PasswordRestrictionSetting</a></td>
- <td></td>
- <td><p>Password complexity and restriction requirements. </p></td>
- </tr>
-
- <tr>
- <td>docker</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>Whether the Bytebase instance is running in Docker. </p></td>
- </tr>
-
- <tr>
- <td>user_stats</td>
- <td><a href="#bytebase.v1.ActuatorInfo.StatUser">ActuatorInfo.StatUser</a></td>
- <td>repeated</td>
- <td><p>Statistics about users in the system. </p></td>
- </tr>
-
- <tr>
- <td>activated_instance_count</td>
- <td><a href="#int32">int32</a></td>
- <td></td>
- <td><p>The number of activated database instances. </p></td>
- </tr>
-
- <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>
+ <td><p> </p></td>
</tr>
</tbody>
@@ -15223,8 +14589,8 @@ Permissions required: bb.users.undelete</p></td>
- <h3 id="bytebase.v1.ActuatorInfo.StatUser">ActuatorInfo.StatUser</h3>
- <p>User statistics by type and state.</p>
+ <h3 id="bytebase.v1.AppIMSetting.Wecom">AppIMSetting.Wecom</h3>
+ <p></p>
<table class="field-table">
@@ -15234,24 +14600,24 @@ Permissions required: bb.users.undelete</p></td>
<tbody>
<tr>
- <td>user_type</td>
- <td><a href="#bytebase.v1.UserType">UserType</a></td>
+ <td>corp_id</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>The type of user. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>state</td>
- <td><a href="#bytebase.v1.State">State</a></td>
+ <td>agent_id</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>The state of the user. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>count</td>
- <td><a href="#int32">int32</a></td>
+ <td>secret</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>The count of users matching this type and state. </p></td>
+ <td><p> </p></td>
</tr>
</tbody>
@@ -15261,29 +14627,8 @@ Permissions required: bb.users.undelete</p></td>
- <h3 id="bytebase.v1.DeleteCacheRequest">DeleteCacheRequest</h3>
- <p>Request message for deleting cache.</p>
-
-
-
-
-
- <h3 id="bytebase.v1.GetActuatorInfoRequest">GetActuatorInfoRequest</h3>
- <p>Request message for getting actuator information.</p>
-
-
-
-
-
- <h3 id="bytebase.v1.GetResourcePackageRequest">GetResourcePackageRequest</h3>
- <p>Request message for getting branding resources.</p>
-
-
-
-
-
- <h3 id="bytebase.v1.ResourcePackage">ResourcePackage</h3>
- <p>Custom branding resources for the Bytebase instance.</p>
+ <h3 id="bytebase.v1.DataClassificationSetting">DataClassificationSetting</h3>
+ <p></p>
<table class="field-table">
@@ -15293,10 +14638,10 @@ Permissions required: bb.users.undelete</p></td>
<tbody>
<tr>
- <td>logo</td>
- <td><a href="#bytes">bytes</a></td>
- <td></td>
- <td><p>The branding logo. </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>
@@ -15306,15 +14651,8 @@ Permissions required: bb.users.undelete</p></td>
- <h3 id="bytebase.v1.SetupSampleRequest">SetupSampleRequest</h3>
- <p>Request message for setting up sample data.</p>
-
-
-
-
-
- <h3 id="bytebase.v1.UpdateActuatorInfoRequest">UpdateActuatorInfoRequest</h3>
- <p>Request message for updating actuator information.</p>
+ <h3 id="bytebase.v1.DataClassificationSetting.DataClassificationConfig">DataClassificationSetting.DataClassificationConfig</h3>
+ <p></p>
<table class="field-table">
@@ -15324,25 +14662,42 @@ Permissions required: bb.users.undelete</p></td>
<tbody>
<tr>
- <td>actuator</td>
- <td><a href="#bytebase.v1.ActuatorInfo">ActuatorInfo</a></td>
+ <td>id</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>The actuator to update. </p></td>
+ <td><p>id is the uuid for classification. Each project can chose one classification config. </p></td>
</tr>
<tr>
- <td>update_mask</td>
- <td><a href="#google.protobuf.FieldMask">google.protobuf.FieldMask</a></td>
+ <td>title</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>The list of fields to update. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>allow_missing</td>
+ <td>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.
+The order for the level decides its priority. </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]&#43;-[0-9]&#43;-[0-9]&#43; format. </p></td>
+ </tr>
+
+ <tr>
+ <td>classification_from_config</td>
<td><a href="#bool">bool</a></td>
<td></td>
- <td><p>If set to true, and the actuator is not found, a new actuator will be created.
-In this situation, `update_mask` is ignored. </p></td>
+ <td><p>If true, we will only store the classification in the config.
+Otherwise we will get the classification from table/column comment,
+and write back to the schema metadata. </p></td>
</tr>
</tbody>
@@ -15352,142 +14707,39 @@ In this situation, `update_mask` is ignored. </p></td>
-
-
-
-
-
-
- <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.
-Permissions required: None</p></td>
- </tr>
-
- <tr>
- <td>UpdateActuatorInfo</td>
- <td><a href="#bytebase.v1.UpdateActuatorInfoRequest">UpdateActuatorInfoRequest</a></td>
- <td><a href="#bytebase.v1.ActuatorInfo">ActuatorInfo</a></td>
- <td><p>Updates system configuration settings for the Bytebase instance.
-Permissions required: bb.settings.set</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>
-
- <tr>
- <td>DeleteCache</td>
- <td><a href="#bytebase.v1.DeleteCacheRequest">DeleteCacheRequest</a></td>
- <td><a href="#google.protobuf.Empty">.google.protobuf.Empty</a></td>
- <td><p>Clears the system cache to force data refresh.
-Permissions required: None</p></td>
- </tr>
-
- <tr>
- <td>GetResourcePackage</td>
- <td><a href="#bytebase.v1.GetResourcePackageRequest">GetResourcePackageRequest</a></td>
- <td><a href="#bytebase.v1.ResourcePackage">ResourcePackage</a></td>
- <td><p>Gets custom branding resources such as logos.
-Permissions required: None</p></td>
- </tr>
-
- </tbody>
- </table>
+ <h3 id="bytebase.v1.DataClassificationSetting.DataClassificationConfig.ClassificationEntry">DataClassificationSetting.DataClassificationConfig.ClassificationEntry</h3>
+ <p></p>
-
-
- <h4>Methods with HTTP bindings</h4>
- <table>
+ <table class="field-table">
<thead>
- <tr>
- <td>Method Name</td>
- <td>Method</td>
- <td>Pattern</td>
- <td>Body</td>
- </tr>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
</thead>
<tbody>
-
-
-
- <tr>
- <td>GetActuatorInfo</td>
- <td>GET</td>
- <td>/v1/actuator/info</td>
- <td></td>
- </tr>
-
-
-
-
- <tr>
- <td>UpdateActuatorInfo</td>
- <td>PATCH</td>
- <td>/v1/actuator/info</td>
- <td>actuator</td>
- </tr>
-
-
-
-
- <tr>
- <td>SetupSample</td>
- <td>POST</td>
- <td>/v1/actuator:setupSample</td>
- <td></td>
- </tr>
-
-
-
-
- <tr>
- <td>DeleteCache</td>
- <td>DELETE</td>
- <td>/v1/actuator/cache</td>
- <td></td>
- </tr>
-
-
+ <tr>
+ <td>key</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
- <tr>
- <td>GetResourcePackage</td>
- <td>GET</td>
- <td>/v1/actuator/resources</td>
- <td></td>
- </tr>
+ <tr>
+ <td>value</td>
+ <td><a href="#bytebase.v1.DataClassificationSetting.DataClassificationConfig.DataClassification">DataClassificationSetting.DataClassificationConfig.DataClassification</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
-
</tbody>
</table>
+
-
-
-
- <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.DataClassificationSetting.DataClassificationConfig.DataClassification">DataClassificationSetting.DataClassificationConfig.DataClassification</h3>
+ <p></p>
<table class="field-table">
@@ -15497,48 +14749,31 @@ Permissions required: None</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 classification id in [0-9]&#43;-[0-9]&#43;-[0-9]&#43; format. </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} </p></td>
+ <td></td>
+ <td><p> </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 &#34;instances/{instance}/databases/{database}&#34; format, used by the &#34;roles/sqlEditorUser&#34; role, support &#34;==&#34; operator.
-resource.schema_name: the schema name, used by the &#34;roles/sqlEditorUser&#34; role, support &#34;==&#34; operator.
-resource.table_name: the table name, used by the &#34;roles/sqlEditorUser&#34; role, support &#34;==&#34; operator.
-request.time: the expiration. Only support &#34;&lt;&#34; operation in `request.time &lt; timestamp(&#34;{ISO datetime string format}&#34;)`.
-
-For example:
-resource.database == &#34;instances/local-pg/databases/postgres&#34; &amp;&amp; resource.schema_name in [&#34;public&#34;,&#34;another_schema&#34;]
-resource.database == &#34;instances/local-pg/databases/bytebase&#34; &amp;&amp; resource.schema_name == &#34;public&#34; &amp;&amp; resource.table_name in [&#34;audit_log&#34;]
-request.time &lt; timestamp(&#34;2025-04-26T11:24:48.655Z&#34;) </p></td>
+ <td><p> </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>
+ <td>level_id</td>
+ <td><a href="#string">string</a></td>
+ <td>optional</td>
+ <td><p> </p></td>
</tr>
</tbody>
@@ -15548,8 +14783,8 @@ request.time &lt; timestamp(&#34;2025-04-26T11:24:48.655Z&#34;) </p></td>
- <h3 id="bytebase.v1.BindingDelta">BindingDelta</h3>
- <p>A single change to a binding.</p>
+ <h3 id="bytebase.v1.DataClassificationSetting.DataClassificationConfig.Level">DataClassificationSetting.DataClassificationConfig.Level</h3>
+ <p></p>
<table class="field-table">
@@ -15559,32 +14794,24 @@ request.time &lt; timestamp(&#34;2025-04-26T11:24:48.655Z&#34;) </p></td>
<tbody>
<tr>
- <td>action</td>
- <td><a href="#bytebase.v1.BindingDelta.Action">BindingDelta.Action</a></td>
- <td></td>
- <td><p>The action that was performed on a Binding. </p></td>
- </tr>
-
- <tr>
- <td>role</td>
+ <td>id</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>Role that is assigned to `members`.
-For example, `roles/projectOwner`. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>member</td>
+ <td>title</td>
<td><a href="#string">string</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>description</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>The condition that is associated with this binding. </p></td>
+ <td><p> </p></td>
</tr>
</tbody>
@@ -15594,8 +14821,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.EnvironmentSetting">EnvironmentSetting</h3>
+ <p></p>
<table class="field-table">
@@ -15605,12 +14832,10 @@ For example, `roles/projectOwner`. </p></td>
<tbody>
<tr>
- <td>resource</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The name of the resource to get the IAM policy.
-Format: projects/{project}
-Format: workspaces/{workspace} </p></td>
+ <td>environments</td>
+ <td><a href="#bytebase.v1.EnvironmentSetting.Environment">EnvironmentSetting.Environment</a></td>
+ <td>repeated</td>
+ <td><p> </p></td>
</tr>
</tbody>
@@ -15620,8 +14845,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.EnvironmentSetting.Environment">EnvironmentSetting.Environment</h3>
+ <p></p>
<table class="field-table">
@@ -15631,44 +14856,42 @@ 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>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>etag</td>
+ <td>id</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>The resource id of the environment.
+This value should be 4-63 characters, and valid characters
+are /[a-z][0-9]-/. </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.PolicyDelta">PolicyDelta</h3>
- <p>Describes changes between two IAM policies.</p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
+ <tr>
+ <td>title</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The display name of the environment. </p></td>
+ </tr>
<tr>
- <td>binding_deltas</td>
- <td><a href="#bytebase.v1.BindingDelta">BindingDelta</a></td>
+ <td>tags</td>
+ <td><a href="#bytebase.v1.EnvironmentSetting.Environment.TagsEntry">EnvironmentSetting.Environment.TagsEntry</a></td>
<td>repeated</td>
- <td><p>The delta for Bindings between two policies. </p></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>color</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p> </p></td>
</tr>
</tbody>
@@ -15678,8 +14901,8 @@ the call will be blocked and an ABORTED error will be returned. </p></td>
- <h3 id="bytebase.v1.SetIamPolicyRequest">SetIamPolicyRequest</h3>
- <p>Request message for setting an IAM policy.</p>
+ <h3 id="bytebase.v1.EnvironmentSetting.Environment.TagsEntry">EnvironmentSetting.Environment.TagsEntry</h3>
+ <p></p>
<table class="field-table">
@@ -15689,26 +14912,41 @@ the call will be blocked and an ABORTED error will be returned. </p></td>
<tbody>
<tr>
- <td>resource</td>
+ <td>key</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The name of the resource to set the IAM policy.
-Format: projects/{project}
-Format: workspaces/{workspace} </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>policy</td>
- <td><a href="#bytebase.v1.IamPolicy">IamPolicy</a></td>
+ <td>value</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>etag</td>
+ <td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The current etag of the policy. </p></td>
+ <td><p>The resource name of the setting. </p></td>
</tr>
</tbody>
@@ -15718,51 +14956,39 @@ Format: workspaces/{workspace} </p></td>
+ <h3 id="bytebase.v1.GetSettingResponse">GetSettingResponse</h3>
+ <p>The response message for getting a setting.</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>
-
+
+ <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> </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.ListSettingsRequest">ListSettingsRequest</h3>
+ <p></p>
+
+
+
- <h3 id="bytebase.v1.AuditData">AuditData</h3>
- <p>Additional audit data specific to certain operations.</p>
+ <h3 id="bytebase.v1.ListSettingsResponse">ListSettingsResponse</h3>
+ <p></p>
<table class="field-table">
@@ -15772,10 +14998,10 @@ Format: workspaces/{workspace} </p></td>
<tbody>
<tr>
- <td>policy_delta</td>
- <td><a href="#bytebase.v1.PolicyDelta">PolicyDelta</a></td>
- <td></td>
- <td><p>Changes to IAM policies. </p></td>
+ <td>settings</td>
+ <td><a href="#bytebase.v1.Setting">Setting</a></td>
+ <td>repeated</td>
+ <td><p>The settings from the specified request. </p></td>
</tr>
</tbody>
@@ -15785,8 +15011,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.PasswordRestrictionSetting">PasswordRestrictionSetting</h3>
+ <p></p>
<table class="field-table">
@@ -15796,93 +15022,114 @@ Format: workspaces/{workspace} </p></td>
<tbody>
<tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
+ <td>min_length</td>
+ <td><a href="#int32">int32</a></td>
<td></td>
- <td><p>The name of the log.
-Formats:
-- projects/{project}/auditLogs/{uid}
-- workspaces/{workspace}/auditLogs/{uid} </p></td>
+ <td><p>min_length is the minimum length for password, should no less than 8. </p></td>
</tr>
<tr>
- <td>create_time</td>
- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
+ <td>require_number</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p>The timestamp when the audit log was created. </p></td>
+ <td><p>require_number requires the password must contains at least one number. </p></td>
</tr>
<tr>
- <td>user</td>
- <td><a href="#string">string</a></td>
+ <td>require_letter</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_letter requires the password must contains at least one letter, regardless of upper case or lower case </p></td>
</tr>
<tr>
- <td>method</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 method or action being audited.
-For example: /bytebase.v1.SQLService/Query or bb.project.repository.push </p></td>
+ <td><p>require_uppercase_letter requires the password must contains at least one upper case letter. </p></td>
</tr>
<tr>
- <td>severity</td>
- <td><a href="#bytebase.v1.AuditLog.Severity">AuditLog.Severity</a></td>
+ <td>require_special_character</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p>The severity level of this audit log entry. </p></td>
+ <td><p>require_special_character requires the password must contains at least one special character. </p></td>
</tr>
<tr>
- <td>resource</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 resource associated with this audit log. </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>request</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>The request payload in JSON format. </p></td>
+ <td><p>password_rotation requires users to reset their password after the duration. </p></td>
</tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.SCIMSetting">SCIMSetting</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
<tr>
- <td>response</td>
+ <td>token</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The response payload in JSON format.
-Some fields may be omitted if they are too large or contain sensitive information. </p></td>
+ <td><p> </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>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.SchemaTemplateSetting">SchemaTemplateSetting</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
<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>
+ <td>field_templates</td>
+ <td><a href="#bytebase.v1.SchemaTemplateSetting.FieldTemplate">SchemaTemplateSetting.FieldTemplate</a></td>
+ <td>repeated</td>
+ <td><p> </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>
+ <td>column_types</td>
+ <td><a href="#bytebase.v1.SchemaTemplateSetting.ColumnType">SchemaTemplateSetting.ColumnType</a></td>
+ <td>repeated</td>
+ <td><p> </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>
+ <td>table_templates</td>
+ <td><a href="#bytebase.v1.SchemaTemplateSetting.TableTemplate">SchemaTemplateSetting.TableTemplate</a></td>
+ <td>repeated</td>
+ <td><p> </p></td>
</tr>
</tbody>
@@ -15892,8 +15139,8 @@ Some fields may be omitted if they are too large or contain sensitive informatio
- <h3 id="bytebase.v1.ExportAuditLogsRequest">ExportAuditLogsRequest</h3>
- <p>Request message for exporting audit logs.</p>
+ <h3 id="bytebase.v1.SchemaTemplateSetting.ColumnType">SchemaTemplateSetting.ColumnType</h3>
+ <p></p>
<table class="field-table">
@@ -15903,54 +15150,76 @@ Some fields may be omitted if they are too large or contain sensitive informatio
<tbody>
<tr>
- <td>parent</td>
- <td><a href="#string">string</a></td>
+ <td>engine</td>
+ <td><a href="#bytebase.v1.Engine">Engine</a></td>
<td></td>
<td><p> </p></td>
</tr>
<tr>
- <td>filter</td>
- <td><a href="#string">string</a></td>
+ <td>enabled</td>
+ <td><a href="#bool">bool</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> </p></td>
</tr>
<tr>
- <td>order_by</td>
+ <td>types</td>
<td><a href="#string">string</a></td>
- <td></td>
- <td><p>The order by of the log.
-Only support order by create_time.
-For example:
- - order_by = &#34;create_time asc&#34;
- - order_by = &#34;create_time desc&#34; </p></td>
+ <td>repeated</td>
+ <td><p> </p></td>
</tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.SchemaTemplateSetting.FieldTemplate">SchemaTemplateSetting.FieldTemplate</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
<tr>
- <td>format</td>
- <td><a href="#bytebase.v1.ExportFormat">ExportFormat</a></td>
+ <td>id</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>The export format. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>page_size</td>
- <td><a href="#int32">int32</a></td>
+ <td>engine</td>
+ <td><a href="#bytebase.v1.Engine">Engine</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> </p></td>
</tr>
<tr>
- <td>page_token</td>
+ <td>category</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>A page token, received from a previous `ExportAuditLogs` call.
-Provide this to retrieve the subsequent page. </p></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>column</td>
+ <td><a href="#bytebase.v1.ColumnMetadata">ColumnMetadata</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>catalog</td>
+ <td><a href="#bytebase.v1.ColumnCatalog">ColumnCatalog</a></td>
+ <td></td>
+ <td><p> </p></td>
</tr>
</tbody>
@@ -15960,8 +15229,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.SchemaTemplateSetting.TableTemplate">SchemaTemplateSetting.TableTemplate</h3>
+ <p></p>
<table class="field-table">
@@ -15971,19 +15240,38 @@ Provide this to retrieve the subsequent page. </p></td>
<tbody>
<tr>
- <td>content</td>
- <td><a href="#bytes">bytes</a></td>
+ <td>id</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>The exported audit log content in the requested format. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>next_page_token</td>
+ <td>engine</td>
+ <td><a href="#bytebase.v1.Engine">Engine</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>category</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>A token to retrieve next page of log entities.
-Pass this value in the page_token field in the subsequent call
-to retrieve the next page of log entities. </p></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>table</td>
+ <td><a href="#bytebase.v1.TableMetadata">TableMetadata</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>catalog</td>
+ <td><a href="#bytebase.v1.TableCatalog">TableCatalog</a></td>
+ <td></td>
+ <td><p> </p></td>
</tr>
</tbody>
@@ -15993,8 +15281,8 @@ to retrieve the next page of log entities. </p></td>
- <h3 id="bytebase.v1.RequestMetadata">RequestMetadata</h3>
- <p>Metadata about the incoming request.</p>
+ <h3 id="bytebase.v1.SemanticTypeSetting">SemanticTypeSetting</h3>
+ <p></p>
<table class="field-table">
@@ -16004,18 +15292,10 @@ to retrieve the next page of log entities. </p></td>
<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>
+ <td>types</td>
+ <td><a href="#bytebase.v1.SemanticTypeSetting.SemanticType">SemanticTypeSetting.SemanticType</a></td>
+ <td>repeated</td>
+ <td><p> </p></td>
</tr>
</tbody>
@@ -16025,8 +15305,8 @@ This is supplied by the client and is not authenticated. </p></td>
- <h3 id="bytebase.v1.SearchAuditLogsRequest">SearchAuditLogsRequest</h3>
- <p>Request message for searching audit logs.</p>
+ <h3 id="bytebase.v1.SemanticTypeSetting.SemanticType">SemanticTypeSetting.SemanticType</h3>
+ <p></p>
<table class="field-table">
@@ -16036,59 +15316,38 @@ This is supplied by the client and is not authenticated. </p></td>
<tbody>
<tr>
- <td>parent</td>
+ <td>id</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>id is the uuid for semantic type. </p></td>
</tr>
<tr>
- <td>filter</td>
+ <td>title</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 &#34;/bytebase.v1.&#34; prefix. For example &#34;/bytebase.v1.UserService/CreateUser&#34;. Support &#34;==&#34; operator.
-- severity: support &#34;==&#34; operator, check Severity enum in AuditLog message for values.
-- user: the actor, should in &#34;users/{email}&#34; format, support &#34;==&#34; operator.
-- create_time: support &#34;&gt;=&#34; and &#34;&lt;=&#34; operator.
-
-For example:
- - filter = &#34;method == &#39;/bytebase.v1.SQLService/Query&#39;&#34;
- - filter = &#34;method == &#39;/bytebase.v1.SQLService/Query&#39; &amp;&amp; severity == &#39;ERROR&#39;&#34;
- - filter = &#34;method == &#39;/bytebase.v1.SQLService/Query&#39; &amp;&amp; severity == &#39;ERROR&#39; &amp;&amp; user == &#39;users/[email protected]&#39;&#34;
- - filter = &#34;method == &#39;/bytebase.v1.SQLService/Query&#39; &amp;&amp; severity == &#39;ERROR&#39; &amp;&amp; create_time &lt;= &#39;2021-01-01T00:00:00Z&#39; &amp;&amp; create_time &gt;= &#39;2020-01-01T00:00:00Z&#39;&#34; </p></td>
+ <td><p>the title of the semantic type, it should not be empty. </p></td>
</tr>
<tr>
- <td>order_by</td>
+ <td>description</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The order by of the log.
-Only support order by create_time.
-For example:
- - order_by = &#34;create_time asc&#34;
- - order_by = &#34;create_time desc&#34; </p></td>
+ <td><p>the description of the semantic type, it can be empty. </p></td>
</tr>
<tr>
- <td>page_size</td>
- <td><a href="#int32">int32</a></td>
+ <td>algorithm</td>
+ <td><a href="#bytebase.v1.Algorithm">Algorithm</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> </p></td>
</tr>
<tr>
- <td>page_token</td>
+ <td>icon</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>A page token, received from a previous `SearchLogs` call.
-Provide this to retrieve the subsequent page. </p></td>
+ <td><p>icon is the icon for semantic type, it can be emoji or base64 encoded image. </p></td>
</tr>
</tbody>
@@ -16098,8 +15357,8 @@ Provide this to retrieve the subsequent page. </p></td>
- <h3 id="bytebase.v1.SearchAuditLogsResponse">SearchAuditLogsResponse</h3>
- <p>Response message for searching audit logs.</p>
+ <h3 id="bytebase.v1.Setting">Setting</h3>
+ <p>The schema of setting.</p>
<table class="field-table">
@@ -16109,19 +15368,20 @@ Provide this to retrieve the subsequent page. </p></td>
<tbody>
<tr>
- <td>audit_logs</td>
- <td><a href="#bytebase.v1.AuditLog">AuditLog</a></td>
- <td>repeated</td>
- <td><p> </p></td>
+ <td>name</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The resource name of the setting. Must be one of the following forms:
+
+- `setting/{setting}`
+For example, &#34;settings/bb.branding.logo&#34; </p></td>
</tr>
<tr>
- <td>next_page_token</td>
- <td><a href="#string">string</a></td>
+ <td>value</td>
+ <td><a href="#bytebase.v1.Value">Value</a></td>
<td></td>
- <td><p>A token to retrieve next page of log entities.
-Pass this value in the page_token field in the subsequent call
-to retrieve the next page of log entities. </p></td>
+ <td><p>The configuration value of the setting. </p></td>
</tr>
</tbody>
@@ -16131,167 +15391,54 @@ to retrieve the next page of log entities. </p></td>
+ <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>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>
+ </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>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>
-
-
-
-
- <div class="file-heading">
- <h2 id="v1/auth_service.proto">v1/auth_service.proto</h2><a href="#title">Top</a>
- </div>
- <p></p>
-
-
- <h3 id="bytebase.v1.IdentityProviderContext">IdentityProviderContext</h3>
- <p>Context for identity provider authentication.</p>
+ <h3 id="bytebase.v1.Value">Value</h3>
+ <p>The data in setting value.</p>
<table class="field-table">
@@ -16301,91 +15448,80 @@ Permissions required: bb.auditLogs.export</p></td>
<tbody>
<tr>
- <td>oauth2_context</td>
- <td><a href="#bytebase.v1.OAuth2IdentityProviderContext">OAuth2IdentityProviderContext</a></td>
+ <td>string_value</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>OAuth2 authentication context. </p></td>
+ <td><p>Defines this value as being a string value. </p></td>
</tr>
<tr>
- <td>oidc_context</td>
- <td><a href="#bytebase.v1.OIDCIdentityProviderContext">OIDCIdentityProviderContext</a></td>
+ <td>app_im_setting_value</td>
+ <td><a href="#bytebase.v1.AppIMSetting">AppIMSetting</a></td>
<td></td>
- <td><p>OpenID Connect authentication context. </p></td>
+ <td><p> </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.LoginRequest">LoginRequest</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
+ <tr>
+ <td>workspace_profile_setting_value</td>
+ <td><a href="#bytebase.v1.WorkspaceProfileSetting">WorkspaceProfileSetting</a></td>
+ <td></td>
+ <td><p>reserved 4; // was AgentPluginSetting agent_plugin_setting_value </p></td>
+ </tr>
<tr>
- <td>email</td>
- <td><a href="#string">string</a></td>
+ <td>workspace_approval_setting_value</td>
+ <td><a href="#bytebase.v1.WorkspaceApprovalSetting">WorkspaceApprovalSetting</a></td>
<td></td>
- <td><p>User&#39;s email address. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>password</td>
- <td><a href="#string">string</a></td>
+ <td>schema_template_setting_value</td>
+ <td><a href="#bytebase.v1.SchemaTemplateSetting">SchemaTemplateSetting</a></td>
<td></td>
- <td><p>User&#39;s password for authentication. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>web</td>
- <td><a href="#bool">bool</a></td>
+ <td>data_classification_setting_value</td>
+ <td><a href="#bytebase.v1.DataClassificationSetting">DataClassificationSetting</a></td>
<td></td>
- <td><p>If web is set, we will set access token, refresh token, and user to the cookie. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>idp_name</td>
- <td><a href="#string">string</a></td>
+ <td>semantic_type_setting_value</td>
+ <td><a href="#bytebase.v1.SemanticTypeSetting">SemanticTypeSetting</a></td>
<td></td>
- <td><p>The name of the identity provider.
-Format: idps/{idp} </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>idp_context</td>
- <td><a href="#bytebase.v1.IdentityProviderContext">IdentityProviderContext</a></td>
+ <td>scim_setting</td>
+ <td><a href="#bytebase.v1.SCIMSetting">SCIMSetting</a></td>
<td></td>
- <td><p>The idp_context is using to get the user information from identity provider. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>otp_code</td>
- <td><a href="#string">string</a></td>
- <td>optional</td>
- <td><p>The otp_code is used to verify the user&#39;s identity by MFA. </p></td>
+ <td>password_restriction_setting</td>
+ <td><a href="#bytebase.v1.PasswordRestrictionSetting">PasswordRestrictionSetting</a></td>
+ <td></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>recovery_code</td>
- <td><a href="#string">string</a></td>
- <td>optional</td>
- <td><p>The recovery_code is used to recovery the user&#39;s identity with MFA. </p></td>
+ <td>ai_setting</td>
+ <td><a href="#bytebase.v1.AISetting">AISetting</a></td>
+ <td></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>mfa_temp_token</td>
- <td><a href="#string">string</a></td>
- <td>optional</td>
- <td><p>The mfa_temp_token is used to verify the user&#39;s identity by MFA. </p></td>
+ <td>environment_setting</td>
+ <td><a href="#bytebase.v1.EnvironmentSetting">EnvironmentSetting</a></td>
+ <td></td>
+ <td><p> </p></td>
</tr>
</tbody>
@@ -16395,7 +15531,7 @@ Format: idps/{idp} </p></td>
- <h3 id="bytebase.v1.LoginResponse">LoginResponse</h3>
+ <h3 id="bytebase.v1.WorkspaceApprovalSetting">WorkspaceApprovalSetting</h3>
<p></p>
@@ -16406,31 +15542,49 @@ Format: idps/{idp} </p></td>
<tbody>
<tr>
- <td>token</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>Access token for authenticated requests. </p></td>
- </tr>
-
- <tr>
- <td>mfa_temp_token</td>
- <td><a href="#string">string</a></td>
- <td>optional</td>
- <td><p>Temporary token for MFA verification. </p></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>require_reset_password</td>
- <td><a href="#bool">bool</a></td>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.WorkspaceApprovalSetting.Rule">WorkspaceApprovalSetting.Rule</h3>
+ <p></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></td>
- <td><p>Whether user must reset password before continuing. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>user</td>
- <td><a href="#bytebase.v1.User">User</a></td>
+ <td>condition</td>
+ <td><a href="#google.type.Expr">google.type.Expr</a></td>
<td></td>
- <td><p>The user from the successful login. </p></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
+
+Support variables:
+source: the risk source, check the Source enum in the Risk message for the values, support &#34;==&#34; operator.
+level: the risk level, support 100 (low), 200 (moderate) and 300 (high), support &#34;==&#34; operator.
+
+For examples:
+(source == &#34;DML&#34; &amp;&amp; level == 200) || (source == &#34;DDL&#34; &amp;&amp; level == 300) </p></td>
</tr>
</tbody>
@@ -16440,15 +15594,8 @@ Format: idps/{idp} </p></td>
- <h3 id="bytebase.v1.LogoutRequest">LogoutRequest</h3>
- <p>Request to logout current user session.</p>
-
-
-
-
-
- <h3 id="bytebase.v1.OAuth2IdentityProviderContext">OAuth2IdentityProviderContext</h3>
- <p>OAuth2 authentication context.</p>
+ <h3 id="bytebase.v1.WorkspaceProfileSetting">WorkspaceProfileSetting</h3>
+ <p></p>
<table class="field-table">
@@ -16458,10 +15605,87 @@ Format: idps/{idp} </p></td>
<tbody>
<tr>
- <td>code</td>
+ <td>external_url</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>Authorization code from OAuth2 provider. </p></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_2fa</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>Require 2FA for all users. </p></td>
+ </tr>
+
+ <tr>
+ <td>token_duration</td>
+ <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>
+ <td></td>
+ <td><p>The duration for token. </p></td>
+ </tr>
+
+ <tr>
+ <td>announcement</td>
+ <td><a href="#bytebase.v1.Announcement">Announcement</a></td>
+ <td></td>
+ <td><p>The setting of custom announcement </p></td>
+ </tr>
+
+ <tr>
+ <td>maximum_role_expiration</td>
+ <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>
+ <td></td>
+ <td><p>The max duration for role expired. </p></td>
+ </tr>
+
+ <tr>
+ <td>domains</td>
+ <td><a href="#string">string</a></td>
+ <td>repeated</td>
+ <td><p>The workspace domain, e.g., bytebase.com. </p></td>
+ </tr>
+
+ <tr>
+ <td>enforce_identity_domain</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>Only user and group from the domains can be created and login. </p></td>
+ </tr>
+
+ <tr>
+ <td>database_change_mode</td>
+ <td><a href="#bytebase.v1.DatabaseChangeMode">DatabaseChangeMode</a></td>
+ <td></td>
+ <td><p>The workspace database change mode. </p></td>
+ </tr>
+
+ <tr>
+ <td>disallow_password_signin</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>Whether to disallow password signin. (Except workspace admins) </p></td>
+ </tr>
+
+ <tr>
+ <td>enable_metric_collection</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>Whether to enable metric collection for the workspace. </p></td>
+ </tr>
+
+ <tr>
+ <td>inactive_session_timeout</td>
+ <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>
+ <td></td>
+ <td><p>The session expiration time if not activity detected for the user. Value &lt;= 0 means no limit. </p></td>
</tr>
</tbody>
@@ -16471,403 +15695,354 @@ Format: idps/{idp} </p></td>
- <h3 id="bytebase.v1.OIDCIdentityProviderContext">OIDCIdentityProviderContext</h3>
- <p>OpenID Connect authentication context.</p>
-
-
-
-
-
-
-
-
-
- <h3 id="bytebase.v1.AuthService">AuthService</h3>
- <p>AuthService handles user authentication operations.</p>
+ <h3 id="bytebase.v1.AISetting.Provider">AISetting.Provider</h3>
+ <p></p>
<table class="enum-table">
<thead>
- <tr><td>Method Name</td><td>Request Type</td><td>Response Type</td><td>Description</td></tr>
+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>
</thead>
<tbody>
<tr>
- <td>Login</td>
- <td><a href="#bytebase.v1.LoginRequest">LoginRequest</a></td>
- <td><a href="#bytebase.v1.LoginResponse">LoginResponse</a></td>
- <td><p>Authenticates a user and returns access tokens.
-Permissions required: None</p></td>
+ <td>PROVIDER_UNSPECIFIED</td>
+ <td>0</td>
+ <td><p></p></td>
</tr>
<tr>
- <td>Logout</td>
- <td><a href="#bytebase.v1.LogoutRequest">LogoutRequest</a></td>
- <td><a href="#google.protobuf.Empty">.google.protobuf.Empty</a></td>
- <td><p>Logs out the current user session.
-Permissions required: None</p></td>
+ <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>
-
-
-
-
- <h4>Methods with HTTP bindings</h4>
- <table>
- <thead>
+
+ <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>Method Name</td>
- <td>Method</td>
- <td>Pattern</td>
- <td>Body</td>
+ <td>MASK_TYPE_UNSPECIFIED</td>
+ <td>0</td>
+ <td><p></p></td>
</tr>
- </thead>
- <tbody>
-
-
<tr>
- <td>Login</td>
- <td>POST</td>
- <td>/v1/auth/login</td>
- <td>*</td>
+ <td>INNER</td>
+ <td>1</td>
+ <td><p></p></td>
</tr>
-
-
-
<tr>
- <td>Logout</td>
- <td>POST</td>
- <td>/v1/auth/logout</td>
- <td>*</td>
+ <td>OUTER</td>
+ <td>2</td>
+ <td><p></p></td>
</tr>
-
- </tbody>
- </table>
-
-
-
-
- <div class="file-heading">
- <h2 id="v1/cel_service.proto">v1/cel_service.proto</h2><a href="#title">Top</a>
- </div>
- <p></p>
-
+ </tbody>
+ </table>
- <h3 id="bytebase.v1.BatchDeparseRequest">BatchDeparseRequest</h3>
- <p>Request message for batch deparsing CEL expressions.</p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>expressions</td>
- <td><a href="#google.api.expr.v1alpha1.Expr">google.api.expr.v1alpha1.Expr</a></td>
- <td>repeated</td>
- <td><p>The CEL expression ASTs to deparse. </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.BatchDeparseResponse">BatchDeparseResponse</h3>
- <p>Response message for batch deparsing CEL expressions.</p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>expressions</td>
- <td><a href="#string">string</a></td>
- <td>repeated</td>
- <td><p>The deparsed CEL expressions as strings. </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.BatchParseRequest">BatchParseRequest</h3>
- <p>Request message for batch parsing CEL expressions.</p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>expressions</td>
- <td><a href="#string">string</a></td>
- <td>repeated</td>
- <td><p>The CEL expression strings to parse. </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.BatchParseResponse">BatchParseResponse</h3>
- <p>Response message for batch parsing CEL expressions.</p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>expressions</td>
- <td><a href="#google.api.expr.v1alpha1.Expr">google.api.expr.v1alpha1.Expr</a></td>
- <td>repeated</td>
- <td><p>The parsed CEL expressions as AST. </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
-
-
-
-
-
-
-
- <h3 id="bytebase.v1.CelService">CelService</h3>
- <p>CelService manages CEL (Common Expression Language) parsing and formatting operations.</p>
+ <h3 id="bytebase.v1.Announcement.AlertLevel">Announcement.AlertLevel</h3>
+ <p>We support three levels of AlertLevel: INFO, WARNING, and ERROR.</p>
<table class="enum-table">
<thead>
- <tr><td>Method Name</td><td>Request Type</td><td>Response Type</td><td>Description</td></tr>
+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>
</thead>
<tbody>
<tr>
- <td>BatchParse</td>
- <td><a href="#bytebase.v1.BatchParseRequest">BatchParseRequest</a></td>
- <td><a href="#bytebase.v1.BatchParseResponse">BatchParseResponse</a></td>
- <td><p>Parses multiple CEL expression strings into AST representations.
-Permissions required: None</p></td>
+ <td>ALERT_LEVEL_UNSPECIFIED</td>
+ <td>0</td>
+ <td><p></p></td>
</tr>
<tr>
- <td>BatchDeparse</td>
- <td><a href="#bytebase.v1.BatchDeparseRequest">BatchDeparseRequest</a></td>
- <td><a href="#bytebase.v1.BatchDeparseResponse">BatchDeparseResponse</a></td>
- <td><p>Converts multiple CEL AST representations back into expression strings.
-Permissions required: None</p></td>
+ <td>INFO</td>
+ <td>1</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>WARNING</td>
+ <td>2</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>CRITICAL</td>
+ <td>3</td>
+ <td><p></p></td>
</tr>
</tbody>
</table>
-
-
-
-
- <h4>Methods with HTTP bindings</h4>
- <table>
- <thead>
+
+ <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>Method Name</td>
- <td>Method</td>
- <td>Pattern</td>
- <td>Body</td>
+ <td>DATABASE_CHANGE_MODE_UNSPECIFIED</td>
+ <td>0</td>
+ <td><p></p></td>
</tr>
- </thead>
- <tbody>
-
-
<tr>
- <td>BatchParse</td>
- <td>POST</td>
- <td>/v1/cel/batchParse</td>
- <td>*</td>
+ <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>BatchDeparse</td>
- <td>POST</td>
- <td>/v1/cel/batchDeparse</td>
- <td>*</td>
+ <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>
-
-
-
-
- <div class="file-heading">
- <h2 id="v1/changelist_service.proto">v1/changelist_service.proto</h2><a href="#title">Top</a>
- </div>
- <p></p>
-
-
- <h3 id="bytebase.v1.Changelist">Changelist</h3>
- <p>A changelist groups multiple database changes together.</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 changelist resource.
-Canonical parent is project.
-Format: projects/{project}/changelists/{changelist} </p></td>
- </tr>
-
- <tr>
- <td>description</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The description of the changelist. </p></td>
- </tr>
-
- <tr>
- <td>creator</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The creator of the changelist.
-Format: users/{email} </p></td>
- </tr>
-
- <tr>
- <td>update_time</td>
- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
- <td></td>
- <td><p>The last time the changelist was updated. </p></td>
- </tr>
-
- <tr>
- <td>changes</td>
- <td><a href="#bytebase.v1.Changelist.Change">Changelist.Change</a></td>
- <td>repeated</td>
- <td><p>The list of changes in this changelist. </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
+ </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>AUTH_SECRET</td>
+ <td>1</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>BRANDING_LOGO</td>
+ <td>2</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>WORKSPACE_ID</td>
+ <td>3</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>WORKSPACE_PROFILE</td>
+ <td>4</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>WORKSPACE_APPROVAL</td>
+ <td>5</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>WORKSPACE_EXTERNAL_APPROVAL</td>
+ <td>6</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>ENTERPRISE_LICENSE</td>
+ <td>7</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>APP_IM</td>
+ <td>8</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>WATERMARK</td>
+ <td>9</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>AI</td>
+ <td>10</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>SCHEMA_TEMPLATE</td>
+ <td>13</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>DATA_CLASSIFICATION</td>
+ <td>14</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>SEMANTIC_TYPES</td>
+ <td>15</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>SCIM</td>
+ <td>17</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>PASSWORD_RESTRICTION</td>
+ <td>18</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>ENVIRONMENT</td>
+ <td>19</td>
+ <td><p></p></td>
+ </tr>
+
+ </tbody>
+ </table>
- <h3 id="bytebase.v1.Changelist.Change">Changelist.Change</h3>
- <p>A single change in a changelist.</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><a href="#string">string</a></td>
- <td></td>
- <td><p>The sheet containing the SQL statement.
-Format: projects/{project}/sheets/{sheet} </p></td>
- </tr>
-
- <tr>
- <td>source</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The source of this change.
-Format: instances/{instance}/databases/{database}/changelogs/{changelog}
-If empty, the change is from raw SQL. </p></td>
- </tr>
-
- </tbody>
- </table>
-
+
-
- <h3 id="bytebase.v1.CreateChangelistRequest">CreateChangelistRequest</h3>
- <p>Request message for creating a changelist.</p>
+ <h3 id="bytebase.v1.SettingService">SettingService</h3>
+ <p>SettingService manages workspace-level settings and configurations.</p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Method Name</td><td>Request Type</td><td>Response Type</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>ListSettings</td>
+ <td><a href="#bytebase.v1.ListSettingsRequest">ListSettingsRequest</a></td>
+ <td><a href="#bytebase.v1.ListSettingsResponse">ListSettingsResponse</a></td>
+ <td><p>Lists all workspace settings.
+Permissions required: bb.settings.list</p></td>
+ </tr>
+
+ <tr>
+ <td>GetSetting</td>
+ <td><a href="#bytebase.v1.GetSettingRequest">GetSettingRequest</a></td>
+ <td><a href="#bytebase.v1.Setting">Setting</a></td>
+ <td><p>Retrieves a workspace setting by name.
+Permissions required: bb.settings.get</p></td>
+ </tr>
+
+ <tr>
+ <td>UpdateSetting</td>
+ <td><a href="#bytebase.v1.UpdateSettingRequest">UpdateSettingRequest</a></td>
+ <td><a href="#bytebase.v1.Setting">Setting</a></td>
+ <td><p>Updates a workspace setting.
+Permissions required: bb.settings.set</p></td>
+ </tr>
+
+ </tbody>
+ </table>
- <table class="field-table">
+
+
+ <h4>Methods with HTTP bindings</h4>
+ <table>
<thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ <tr>
+ <td>Method Name</td>
+ <td>Method</td>
+ <td>Pattern</td>
+ <td>Body</td>
+ </tr>
</thead>
<tbody>
+
- <tr>
- <td>parent</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The parent resource where this changelist will be created.
-Format: projects/{project} </p></td>
- </tr>
- <tr>
- <td>changelist</td>
- <td><a href="#bytebase.v1.Changelist">Changelist</a></td>
- <td></td>
- <td><p>The changelist to create. </p></td>
- </tr>
+ <tr>
+ <td>ListSettings</td>
+ <td>GET</td>
+ <td>/v1/settings</td>
+ <td></td>
+ </tr>
- <tr>
- <td>changelist_id</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The ID to use for the changelist, which will become the final component of
-the changelist&#39;s resource name.
-
-This value should be 4-63 characters, and valid characters
-are /[a-z][0-9]-/. </p></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>
+
+
</tbody>
</table>
-
-
+
- <h3 id="bytebase.v1.DeleteChangelistRequest">DeleteChangelistRequest</h3>
- <p>Request message for deleting a changelist.</p>
+ <div class="file-heading">
+ <h2 id="v1/user_service.proto">v1/user_service.proto</h2><a href="#title">Top</a>
+ </div>
+ <p></p>
+
+
+ <h3 id="bytebase.v1.BatchGetUsersRequest">BatchGetUsersRequest</h3>
+ <p></p>
<table class="field-table">
@@ -16877,11 +16052,11 @@ are /[a-z][0-9]-/. </p></td>
<tbody>
<tr>
- <td>name</td>
+ <td>names</td>
<td><a href="#string">string</a></td>
- <td></td>
- <td><p>The name of the changelist to delete.
-Format: projects/{project}/changelists/{changelist} </p></td>
+ <td>repeated</td>
+ <td><p>The user names to retrieve.
+Format: users/{user uid or user email} </p></td>
</tr>
</tbody>
@@ -16891,8 +16066,8 @@ Format: projects/{project}/changelists/{changelist} </p></td>
- <h3 id="bytebase.v1.GetChangelistRequest">GetChangelistRequest</h3>
- <p>Request message for getting a changelist.</p>
+ <h3 id="bytebase.v1.BatchGetUsersResponse">BatchGetUsersResponse</h3>
+ <p></p>
<table class="field-table">
@@ -16902,11 +16077,10 @@ Format: projects/{project}/changelists/{changelist} </p></td>
<tbody>
<tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The name of the changelist to retrieve.
-Format: projects/{project}/changelists/{changelist} </p></td>
+ <td>users</td>
+ <td><a href="#bytebase.v1.User">User</a></td>
+ <td>repeated</td>
+ <td><p>The users from the specified request. </p></td>
</tr>
</tbody>
@@ -16916,9 +16090,9 @@ Format: projects/{project}/changelists/{changelist} </p></td>
- <h3 id="bytebase.v1.ListChangelistsRequest">ListChangelistsRequest</h3>
- <p>Request message for listing changelists.</p>
-
+ <h3 id="bytebase.v1.CreateUserRequest">CreateUserRequest</h3>
+ <p></p>
+
<table class="field-table">
<thead>
@@ -16927,11 +16101,10 @@ Format: projects/{project}/changelists/{changelist} </p></td>
<tbody>
<tr>
- <td>parent</td>
- <td><a href="#string">string</a></td>
+ <td>user</td>
+ <td><a href="#bytebase.v1.User">User</a></td>
<td></td>
- <td><p>The parent, which owns this collection of changelists.
-Format: projects/{project} </p></td>
+ <td><p>The user to create. </p></td>
</tr>
</tbody>
@@ -16941,8 +16114,8 @@ Format: projects/{project} </p></td>
- <h3 id="bytebase.v1.ListChangelistsResponse">ListChangelistsResponse</h3>
- <p>Response message for listing changelists.</p>
+ <h3 id="bytebase.v1.DeleteUserRequest">DeleteUserRequest</h3>
+ <p></p>
<table class="field-table">
@@ -16952,10 +16125,11 @@ Format: projects/{project} </p></td>
<tbody>
<tr>
- <td>changelists</td>
- <td><a href="#bytebase.v1.Changelist">Changelist</a></td>
- <td>repeated</td>
- <td><p>The changelists from the specified request. </p></td>
+ <td>name</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The name of the user to delete.
+Format: users/{user} </p></td>
</tr>
</tbody>
@@ -16965,8 +16139,8 @@ Format: projects/{project} </p></td>
- <h3 id="bytebase.v1.UpdateChangelistRequest">UpdateChangelistRequest</h3>
- <p>Request message for updating a changelist.</p>
+ <h3 id="bytebase.v1.GetUserRequest">GetUserRequest</h3>
+ <p></p>
<table class="field-table">
@@ -16976,28 +16150,11 @@ Format: projects/{project} </p></td>
<tbody>
<tr>
- <td>changelist</td>
- <td><a href="#bytebase.v1.Changelist">Changelist</a></td>
- <td></td>
- <td><p>The changelist to update.
-
-The changelist&#39;s `name` field is used to identify the changelist to update.
-Format: projects/{project}/changelists/{changelist} </p></td>
- </tr>
-
- <tr>
- <td>update_mask</td>
- <td><a href="#google.protobuf.FieldMask">google.protobuf.FieldMask</a></td>
- <td></td>
- <td><p>The list of fields to be updated. </p></td>
- </tr>
-
- <tr>
- <td>allow_missing</td>
- <td><a href="#bool">bool</a></td>
+ <td>name</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>If set to true, and the changelist is not found, a new changelist will be created.
-In this situation, `update_mask` is ignored. </p></td>
+ <td><p>The name of the user to retrieve.
+Format: users/{user uid or user email} </p></td>
</tr>
</tbody>
@@ -17007,143 +16164,8 @@ In this situation, `update_mask` is ignored. </p></td>
-
-
-
-
-
-
- <h3 id="bytebase.v1.ChangelistService">ChangelistService</h3>
- <p>ChangelistService manages changelists for grouping and organizing 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>CreateChangelist</td>
- <td><a href="#bytebase.v1.CreateChangelistRequest">CreateChangelistRequest</a></td>
- <td><a href="#bytebase.v1.Changelist">Changelist</a></td>
- <td><p>Creates a new changelist in a project.
-Permissions required: bb.changelists.create</p></td>
- </tr>
-
- <tr>
- <td>GetChangelist</td>
- <td><a href="#bytebase.v1.GetChangelistRequest">GetChangelistRequest</a></td>
- <td><a href="#bytebase.v1.Changelist">Changelist</a></td>
- <td><p>Gets a changelist by name.
-Permissions required: bb.changelists.get</p></td>
- </tr>
-
- <tr>
- <td>ListChangelists</td>
- <td><a href="#bytebase.v1.ListChangelistsRequest">ListChangelistsRequest</a></td>
- <td><a href="#bytebase.v1.ListChangelistsResponse">ListChangelistsResponse</a></td>
- <td><p>Lists changelists in a project.
-Permissions required: bb.changelists.list</p></td>
- </tr>
-
- <tr>
- <td>UpdateChangelist</td>
- <td><a href="#bytebase.v1.UpdateChangelistRequest">UpdateChangelistRequest</a></td>
- <td><a href="#bytebase.v1.Changelist">Changelist</a></td>
- <td><p>Updates a changelist.
-Permissions required: bb.changelists.update
-When allow_missing=true, also requires: bb.changelists.create</p></td>
- </tr>
-
- <tr>
- <td>DeleteChangelist</td>
- <td><a href="#bytebase.v1.DeleteChangelistRequest">DeleteChangelistRequest</a></td>
- <td><a href="#google.protobuf.Empty">.google.protobuf.Empty</a></td>
- <td><p>Deletes a changelist.
-Permissions required: bb.changelists.delete</p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
- <h4>Methods with HTTP bindings</h4>
- <table>
- <thead>
- <tr>
- <td>Method Name</td>
- <td>Method</td>
- <td>Pattern</td>
- <td>Body</td>
- </tr>
- </thead>
- <tbody>
-
-
-
- <tr>
- <td>CreateChangelist</td>
- <td>POST</td>
- <td>/v1/{parent=projects/*}/changelists</td>
- <td>changelist</td>
- </tr>
-
-
-
-
- <tr>
- <td>GetChangelist</td>
- <td>GET</td>
- <td>/v1/{name=projects/*/changelists/*}</td>
- <td></td>
- </tr>
-
-
-
-
- <tr>
- <td>ListChangelists</td>
- <td>GET</td>
- <td>/v1/{parent=projects/*}/changelists</td>
- <td></td>
- </tr>
-
-
-
-
- <tr>
- <td>UpdateChangelist</td>
- <td>PATCH</td>
- <td>/v1/{changelist.name=projects/*/changelists/*}</td>
- <td>changelist</td>
- </tr>
-
-
-
-
- <tr>
- <td>DeleteChangelist</td>
- <td>DELETE</td>
- <td>/v1/{name=projects/*/changelists/*}</td>
- <td></td>
- </tr>
-
-
- </tbody>
- </table>
-
-
-
-
- <div class="file-heading">
- <h2 id="v1/database_group_service.proto">v1/database_group_service.proto</h2><a href="#title">Top</a>
- </div>
- <p></p>
-
-
- <h3 id="bytebase.v1.CreateDatabaseGroupRequest">CreateDatabaseGroupRequest</h3>
- <p>Request message for creating a database group.</p>
+ <h3 id="bytebase.v1.ListUsersRequest">ListUsersRequest</h3>
+ <p></p>
<table class="field-table">
@@ -17153,36 +16175,60 @@ Permissions required: bb.changelists.delete</p></td>
<tbody>
<tr>
- <td>parent</td>
- <td><a href="#string">string</a></td>
+ <td>page_size</td>
+ <td><a href="#int32">int32</a></td>
<td></td>
- <td><p>The parent resource where this database group will be created.
-Format: projects/{project} </p></td>
+ <td><p>The maximum number of users to return. The service may return fewer than
+this value.
+If unspecified, at most 10 users will be returned.
+The maximum value is 1000; values above 1000 will be coerced to 1000. </p></td>
</tr>
<tr>
- <td>database_group</td>
- <td><a href="#bytebase.v1.DatabaseGroup">DatabaseGroup</a></td>
+ <td>page_token</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>The database group to create. </p></td>
+ <td><p>A page token, received from a previous `ListUsers` call.
+Provide this to retrieve the subsequent page.
+
+When paginating, all other parameters provided to `ListUsers` must match
+the call that provided the page token. </p></td>
</tr>
<tr>
- <td>database_group_id</td>
- <td><a href="#string">string</a></td>
+ <td>show_deleted</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p>The ID to use for the database group, which will become the final component of
-the database group&#39;s resource name.
-
-This value should be 4-63 characters, and valid characters
-are /[a-z][0-9]-/. </p></td>
+ <td><p>Show deleted users if specified. </p></td>
</tr>
<tr>
- <td>validate_only</td>
- <td><a href="#bool">bool</a></td>
+ <td>filter</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>If set, validate the create request and preview the full database group response, but do not actually create it. </p></td>
+ <td><p>Filter is used to filter users returned in the list.
+The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
+
+Supported filter:
+- name: the user name, support &#34;==&#34; and &#34;.matches()&#34; operator.
+- email: the user email, support &#34;==&#34; and &#34;.matches()&#34; operator.
+- user_type: the type, check UserType enum for values, support &#34;==&#34;, &#34;in [xx]&#34;, &#34;!(in [xx])&#34; operator.
+- state: check State enum for values, support &#34;==&#34; operator.
+- project: the project full name in &#34;projects/{id}&#34; format, support &#34;==&#34; operator.
+
+For example:
+name == &#34;ed&#34;
+name.matches(&#34;ed&#34;)
+email == &#34;[email protected]&#34;
+email.matches(&#34;ed&#34;)
+user_type == &#34;SERVICE_ACCOUNT&#34;
+user_type in [&#34;SERVICE_ACCOUNT&#34;, &#34;USER&#34;]
+!(user_type in [&#34;SERVICE_ACCOUNT&#34;, &#34;USER&#34;])
+state == &#34;DELETED&#34;
+project == &#34;projects/sample-project&#34;
+You can combine filter conditions like:
+name.matches(&#34;ed&#34;) &amp;&amp; project == &#34;projects/sample-project&#34;
+(name == &#34;ed&#34; || email == &#34;[email protected]&#34;) &amp;&amp; project == &#34;projects/sample-project&#34; </p></td>
</tr>
</tbody>
@@ -17192,8 +16238,8 @@ are /[a-z][0-9]-/. </p></td>
- <h3 id="bytebase.v1.DatabaseGroup">DatabaseGroup</h3>
- <p>A group of databases matched by expressions.</p>
+ <h3 id="bytebase.v1.ListUsersResponse">ListUsersResponse</h3>
+ <p></p>
<table class="field-table">
@@ -17203,44 +16249,18 @@ are /[a-z][0-9]-/. </p></td>
<tbody>
<tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The name of the database group.
-Format: projects/{project}/databaseGroups/{databaseGroup} </p></td>
+ <td>users</td>
+ <td><a href="#bytebase.v1.User">User</a></td>
+ <td>repeated</td>
+ <td><p>The users from the specified request. </p></td>
</tr>
<tr>
- <td>title</td>
+ <td>next_page_token</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The short name used in actual databases specified by users. </p></td>
- </tr>
-
- <tr>
- <td>database_expr</td>
- <td><a href="#google.type.Expr">google.type.Expr</a></td>
- <td></td>
- <td><p>The condition that is associated with this database group.
-The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
-
-Support variables:
-resource.environment_id: the environment resource id. Support &#34;==&#34;, &#34;!=&#34;, &#34;in [XX]&#34;, &#34;!(in [xx])&#34; operations.
-resource.instance_id: the instance resource id. Support &#34;==&#34;, &#34;!=&#34;, &#34;in [XX]&#34;, &#34;!(in [xx])&#34;, &#34;contains&#34;, &#34;matches&#34;, &#34;startsWith&#34;, &#34;endsWith&#34; operations.
-resource.database_name: the database name. Support &#34;==&#34;, &#34;!=&#34;, &#34;in [XX]&#34;, &#34;!(in [xx])&#34;, &#34;contains&#34;, &#34;matches&#34;, &#34;startsWith&#34;, &#34;endsWith&#34; operations.
-resource.database_labels: the database labels. Support map access operations.
-All variables should join with &#34;&amp;&amp;&#34; condition.
-
-For example:
-resource.environment_id == &#34;test&#34; &amp;&amp; resource.database_name.startsWith(&#34;sample_&#34;)
-resource.database_labels[&#34;tenant&#34;] == &#34;tenant1&#34; </p></td>
- </tr>
-
- <tr>
- <td>matched_databases</td>
- <td><a href="#bytebase.v1.DatabaseGroup.Database">DatabaseGroup.Database</a></td>
- <td>repeated</td>
- <td><p>The list of databases that match the database group condition. </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>
@@ -17250,8 +16270,8 @@ resource.database_labels[&#34;tenant&#34;] == &#34;tenant1&#34; </p></td>
- <h3 id="bytebase.v1.DatabaseGroup.Database">DatabaseGroup.Database</h3>
- <p>A database within a database group.</p>
+ <h3 id="bytebase.v1.UndeleteUserRequest">UndeleteUserRequest</h3>
+ <p></p>
<table class="field-table">
@@ -17264,8 +16284,8 @@ resource.database_labels[&#34;tenant&#34;] == &#34;tenant1&#34; </p></td>
<td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The resource name of the database.
-Format: instances/{instance}/databases/{database} </p></td>
+ <td><p>The name of the deleted user.
+Format: users/{user} </p></td>
</tr>
</tbody>
@@ -17275,8 +16295,8 @@ Format: instances/{instance}/databases/{database} </p></td>
- <h3 id="bytebase.v1.DeleteDatabaseGroupRequest">DeleteDatabaseGroupRequest</h3>
- <p>Request message for deleting a database group.</p>
+ <h3 id="bytebase.v1.UpdateUserRequest">UpdateUserRequest</h3>
+ <p></p>
<table class="field-table">
@@ -17286,11 +16306,50 @@ Format: instances/{instance}/databases/{database} </p></td>
<tbody>
<tr>
- <td>name</td>
+ <td>user</td>
+ <td><a href="#bytebase.v1.User">User</a></td>
+ <td></td>
+ <td><p>The user to update.
+
+The user&#39;s `name` field is used to identify the user to update.
+Format: users/{user} </p></td>
+ </tr>
+
+ <tr>
+ <td>update_mask</td>
+ <td><a href="#google.protobuf.FieldMask">google.protobuf.FieldMask</a></td>
+ <td></td>
+ <td><p>The list of fields to update. </p></td>
+ </tr>
+
+ <tr>
+ <td>otp_code</td>
<td><a href="#string">string</a></td>
+ <td>optional</td>
+ <td><p>The otp_code is used to verify the user&#39;s identity by MFA. </p></td>
+ </tr>
+
+ <tr>
+ <td>regenerate_temp_mfa_secret</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p>The name of the database group to delete.
-Format: projects/{project}/databaseGroups/{databaseGroup} </p></td>
+ <td><p>The regenerate_temp_mfa_secret flag means to regenerate temporary MFA secret for user.
+This is used for MFA setup. The temporary MFA secret and recovery codes will be returned in the response. </p></td>
+ </tr>
+
+ <tr>
+ <td>regenerate_recovery_codes</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>The regenerate_recovery_codes flag means to regenerate recovery codes for user. </p></td>
+ </tr>
+
+ <tr>
+ <td>allow_missing</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>If set to true, and the user is not found, a new user will be created.
+In this situation, `update_mask` is ignored. </p></td>
</tr>
</tbody>
@@ -17300,8 +16359,8 @@ Format: projects/{project}/databaseGroups/{databaseGroup} </p></td>
- <h3 id="bytebase.v1.GetDatabaseGroupRequest">GetDatabaseGroupRequest</h3>
- <p>Request message for getting a database group.</p>
+ <h3 id="bytebase.v1.User">User</h3>
+ <p></p>
<table class="field-table">
@@ -17314,71 +16373,101 @@ Format: projects/{project}/databaseGroups/{databaseGroup} </p></td>
<td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The name of the database group to retrieve.
-Format: projects/{project}/databaseGroups/{databaseGroup} </p></td>
+ <td><p>The name of the user.
+Format: users/{user}. {user} is a system-generated unique ID. </p></td>
</tr>
<tr>
- <td>view</td>
- <td><a href="#bytebase.v1.DatabaseGroupView">DatabaseGroupView</a></td>
+ <td>state</td>
+ <td><a href="#bytebase.v1.State">State</a></td>
<td></td>
- <td><p>The view to return. Defaults to DATABASE_GROUP_VIEW_BASIC. </p></td>
+ <td><p>The lifecycle state of the user account. </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.ListDatabaseGroupsRequest">ListDatabaseGroupsRequest</h3>
- <p>Request message for listing database groups.</p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
+ <tr>
+ <td>email</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The email address of the user, used for login and notifications. </p></td>
+ </tr>
<tr>
- <td>parent</td>
+ <td>title</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The parent resource whose database groups are to be listed.
-Format: projects/{project} </p></td>
+ <td><p>The display title or full name of the user. </p></td>
</tr>
<tr>
- <td>view</td>
- <td><a href="#bytebase.v1.DatabaseGroupView">DatabaseGroupView</a></td>
+ <td>user_type</td>
+ <td><a href="#bytebase.v1.UserType">UserType</a></td>
<td></td>
- <td><p>The view to return. Defaults to DATABASE_GROUP_VIEW_BASIC. </p></td>
+ <td><p>The type of user account. </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.ListDatabaseGroupsResponse">ListDatabaseGroupsResponse</h3>
- <p>Response message for listing database groups.</p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
+ <tr>
+ <td>password</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The password for authentication. Only used during user creation or password updates. </p></td>
+ </tr>
<tr>
- <td>database_groups</td>
- <td><a href="#bytebase.v1.DatabaseGroup">DatabaseGroup</a></td>
+ <td>service_key</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The service key for service account authentication. Only used for service accounts. </p></td>
+ </tr>
+
+ <tr>
+ <td>mfa_enabled</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>The mfa_enabled flag means if the user has enabled MFA. </p></td>
+ </tr>
+
+ <tr>
+ <td>temp_otp_secret</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>Temporary OTP secret used during MFA setup and regeneration. </p></td>
+ </tr>
+
+ <tr>
+ <td>temp_recovery_codes</td>
+ <td><a href="#string">string</a></td>
<td>repeated</td>
- <td><p>The database groups from the specified request. </p></td>
+ <td><p>Temporary recovery codes used during MFA setup and regeneration. </p></td>
+ </tr>
+
+ <tr>
+ <td>temp_otp_secret_created_time</td>
+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
+ <td></td>
+ <td><p>Timestamp when temp_otp_secret was created. Used by frontend to show countdown timer. </p></td>
+ </tr>
+
+ <tr>
+ <td>phone</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>Should be a valid E.164 compliant phone number.
+Could be empty. </p></td>
+ </tr>
+
+ <tr>
+ <td>profile</td>
+ <td><a href="#bytebase.v1.User.Profile">User.Profile</a></td>
+ <td></td>
+ <td><p>User profile metadata. </p></td>
+ </tr>
+
+ <tr>
+ <td>groups</td>
+ <td><a href="#string">string</a></td>
+ <td>repeated</td>
+ <td><p>The groups for the user.
+Format: groups/{email} </p></td>
</tr>
</tbody>
@@ -17388,8 +16477,8 @@ Format: projects/{project} </p></td>
- <h3 id="bytebase.v1.UpdateDatabaseGroupRequest">UpdateDatabaseGroupRequest</h3>
- <p>Request message for updating a database group.</p>
+ <h3 id="bytebase.v1.User.Profile">User.Profile</h3>
+ <p></p>
<table class="field-table">
@@ -17399,28 +16488,24 @@ Format: projects/{project} </p></td>
<tbody>
<tr>
- <td>database_group</td>
- <td><a href="#bytebase.v1.DatabaseGroup">DatabaseGroup</a></td>
+ <td>last_login_time</td>
+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
<td></td>
- <td><p>The database group to update.
-
-The database group&#39;s `name` field is used to identify the database group to update.
-Format: projects/{project}/databaseGroups/{databaseGroup} </p></td>
+ <td><p>The last time the user successfully logged in. </p></td>
</tr>
<tr>
- <td>update_mask</td>
- <td><a href="#google.protobuf.FieldMask">google.protobuf.FieldMask</a></td>
+ <td>last_change_password_time</td>
+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
<td></td>
- <td><p>The list of fields to update. </p></td>
+ <td><p>The last time the user changed their password. </p></td>
</tr>
<tr>
- <td>allow_missing</td>
- <td><a href="#bool">bool</a></td>
+ <td>source</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>If set to true, and the database group is not found, a new database group will be created.
-In this situation, `update_mask` is ignored. </p></td>
+ <td><p>source means where the user comes from. For now we support Entra ID SCIM sync, so the source could be Entra ID. </p></td>
</tr>
</tbody>
@@ -17432,8 +16517,8 @@ In this situation, `update_mask` is ignored. </p></td>
- <h3 id="bytebase.v1.DatabaseGroupView">DatabaseGroupView</h3>
- <p>View options for database group responses.</p>
+ <h3 id="bytebase.v1.UserType">UserType</h3>
+ <p></p>
<table class="enum-table">
<thead>
<tr><td>Name</td><td>Number</td><td>Description</td></tr>
@@ -17441,22 +16526,27 @@ In this situation, `update_mask` is ignored. </p></td>
<tbody>
<tr>
- <td>DATABASE_GROUP_VIEW_UNSPECIFIED</td>
+ <td>USER_TYPE_UNSPECIFIED</td>
<td>0</td>
- <td><p>The default / unset value.
-The API will default to the BASIC view.</p></td>
+ <td><p>Unspecified user type.</p></td>
</tr>
<tr>
- <td>DATABASE_GROUP_VIEW_BASIC</td>
+ <td>USER</td>
<td>1</td>
- <td><p>Include basic information about the database group, but exclude the list of matched databases and unmatched databases.</p></td>
+ <td><p>Regular human user account.</p></td>
</tr>
<tr>
- <td>DATABASE_GROUP_VIEW_FULL</td>
+ <td>SYSTEM_BOT</td>
<td>2</td>
- <td><p>Include everything.</p></td>
+ <td><p>System-managed bot account for automated operations.</p></td>
+ </tr>
+
+ <tr>
+ <td>SERVICE_ACCOUNT</td>
+ <td>3</td>
+ <td><p>Service account for API integrations.</p></td>
</tr>
</tbody>
@@ -17466,8 +16556,8 @@ The API will default to the BASIC view.</p></td>
- <h3 id="bytebase.v1.DatabaseGroupService">DatabaseGroupService</h3>
- <p>DatabaseGroupService manages database groups for organizing databases by criteria.</p>
+ <h3 id="bytebase.v1.UserService">UserService</h3>
+ <p>UserService manages user accounts and authentication.</p>
<table class="enum-table">
<thead>
<tr><td>Method Name</td><td>Request Type</td><td>Response Type</td><td>Description</td></tr>
@@ -17475,44 +16565,70 @@ The API will default to the BASIC view.</p></td>
<tbody>
<tr>
- <td>ListDatabaseGroups</td>
- <td><a href="#bytebase.v1.ListDatabaseGroupsRequest">ListDatabaseGroupsRequest</a></td>
- <td><a href="#bytebase.v1.ListDatabaseGroupsResponse">ListDatabaseGroupsResponse</a></td>
- <td><p>Lists database groups in a project.
-Permissions required: bb.projects.get</p></td>
+ <td>GetUser</td>
+ <td><a href="#bytebase.v1.GetUserRequest">GetUserRequest</a></td>
+ <td><a href="#bytebase.v1.User">User</a></td>
+ <td><p>Get the user.
+Any authenticated user can get the user.
+Permissions required: bb.users.get</p></td>
</tr>
<tr>
- <td>GetDatabaseGroup</td>
- <td><a href="#bytebase.v1.GetDatabaseGroupRequest">GetDatabaseGroupRequest</a></td>
- <td><a href="#bytebase.v1.DatabaseGroup">DatabaseGroup</a></td>
- <td><p>Gets a database group by name.
-Permissions required: bb.projects.get</p></td>
+ <td>BatchGetUsers</td>
+ <td><a href="#bytebase.v1.BatchGetUsersRequest">BatchGetUsersRequest</a></td>
+ <td><a href="#bytebase.v1.BatchGetUsersResponse">BatchGetUsersResponse</a></td>
+ <td><p>Get the users in batch.
+Any authenticated user can batch get users.
+Permissions required: bb.users.get</p></td>
</tr>
<tr>
- <td>CreateDatabaseGroup</td>
- <td><a href="#bytebase.v1.CreateDatabaseGroupRequest">CreateDatabaseGroupRequest</a></td>
- <td><a href="#bytebase.v1.DatabaseGroup">DatabaseGroup</a></td>
- <td><p>Creates a new database group.
-Permissions required: bb.projects.update</p></td>
+ <td>GetCurrentUser</td>
+ <td><a href="#google.protobuf.Empty">.google.protobuf.Empty</a></td>
+ <td><a href="#bytebase.v1.User">User</a></td>
+ <td><p>Get the current authenticated user.
+Permissions required: None</p></td>
</tr>
<tr>
- <td>UpdateDatabaseGroup</td>
- <td><a href="#bytebase.v1.UpdateDatabaseGroupRequest">UpdateDatabaseGroupRequest</a></td>
- <td><a href="#bytebase.v1.DatabaseGroup">DatabaseGroup</a></td>
- <td><p>Updates a database group.
-Permissions required: bb.projects.update
-When allow_missing=true, also requires: bb.projects.update</p></td>
+ <td>ListUsers</td>
+ <td><a href="#bytebase.v1.ListUsersRequest">ListUsersRequest</a></td>
+ <td><a href="#bytebase.v1.ListUsersResponse">ListUsersResponse</a></td>
+ <td><p>List all users.
+Any authenticated user can list users.
+Permissions required: bb.users.list</p></td>
</tr>
<tr>
- <td>DeleteDatabaseGroup</td>
- <td><a href="#bytebase.v1.DeleteDatabaseGroupRequest">DeleteDatabaseGroupRequest</a></td>
+ <td>CreateUser</td>
+ <td><a href="#bytebase.v1.CreateUserRequest">CreateUserRequest</a></td>
+ <td><a href="#bytebase.v1.User">User</a></td>
+ <td><p>Creates a user. When Disallow Signup is enabled, requires bb.users.create permission; otherwise any user can sign up.
+Permissions required: bb.users.create (only when Disallow Signup is enabled)</p></td>
+ </tr>
+
+ <tr>
+ <td>UpdateUser</td>
+ <td><a href="#bytebase.v1.UpdateUserRequest">UpdateUserRequest</a></td>
+ <td><a href="#bytebase.v1.User">User</a></td>
+ <td><p>Updates a user. Users can update their own profile, or users with bb.users.update permission can update any user.
+Permissions required: bb.users.update (or self)</p></td>
+ </tr>
+
+ <tr>
+ <td>DeleteUser</td>
+ <td><a href="#bytebase.v1.DeleteUserRequest">DeleteUserRequest</a></td>
<td><a href="#google.protobuf.Empty">.google.protobuf.Empty</a></td>
- <td><p>Deletes a database group.
-Permissions required: bb.projects.update</p></td>
+ <td><p>Deletes a user. Requires bb.users.delete permission with additional validation: the last remaining workspace admin cannot be deleted.
+Permissions required: bb.users.delete</p></td>
+ </tr>
+
+ <tr>
+ <td>UndeleteUser</td>
+ <td><a href="#bytebase.v1.UndeleteUserRequest">UndeleteUserRequest</a></td>
+ <td><a href="#bytebase.v1.User">User</a></td>
+ <td><p>Restores a deleted user.
+Permissions required: bb.users.undelete</p></td>
</tr>
</tbody>
@@ -17536,9 +16652,9 @@ Permissions required: bb.projects.update</p></td>
<tr>
- <td>ListDatabaseGroups</td>
+ <td>GetUser</td>
<td>GET</td>
- <td>/v1/{parent=projects/*}/databaseGroups</td>
+ <td>/v1/{name=users/*}</td>
<td></td>
</tr>
@@ -17546,9 +16662,9 @@ Permissions required: bb.projects.update</p></td>
<tr>
- <td>GetDatabaseGroup</td>
+ <td>BatchGetUsers</td>
<td>GET</td>
- <td>/v1/{name=projects/*/databaseGroups/*}</td>
+ <td>/v1/users:batchGet</td>
<td></td>
</tr>
@@ -17556,33 +16672,63 @@ Permissions required: bb.projects.update</p></td>
<tr>
- <td>CreateDatabaseGroup</td>
+ <td>GetCurrentUser</td>
+ <td>GET</td>
+ <td>/v1/users/me</td>
+ <td></td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>ListUsers</td>
+ <td>GET</td>
+ <td>/v1/users</td>
+ <td></td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>CreateUser</td>
<td>POST</td>
- <td>/v1/{parent=projects/*}/databaseGroups</td>
- <td>database_group</td>
+ <td>/v1/users</td>
+ <td>user</td>
</tr>
<tr>
- <td>UpdateDatabaseGroup</td>
+ <td>UpdateUser</td>
<td>PATCH</td>
- <td>/v1/{database_group.name=projects/*/databaseGroups/*}</td>
- <td>database_group</td>
+ <td>/v1/{user.name=users/*}</td>
+ <td>user</td>
</tr>
<tr>
- <td>DeleteDatabaseGroup</td>
+ <td>DeleteUser</td>
<td>DELETE</td>
- <td>/v1/{name=projects/*/databaseGroups/*}</td>
+ <td>/v1/{name=users/*}</td>
<td></td>
</tr>
+
+
+ <tr>
+ <td>UndeleteUser</td>
+ <td>POST</td>
+ <td>/v1/{name=users/*}:undelete</td>
+ <td>*</td>
+ </tr>
+
+
</tbody>
</table>
@@ -17590,13 +16736,13 @@ Permissions required: bb.projects.update</p></td>
<div class="file-heading">
- <h2 id="v1/group_service.proto">v1/group_service.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.BatchGetGroupsRequest">BatchGetGroupsRequest</h3>
- <p>Request message for batch getting groups.</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">
@@ -17606,203 +16752,157 @@ Permissions required: bb.projects.update</p></td>
<tbody>
<tr>
- <td>names</td>
+ <td>version</td>
<td><a href="#string">string</a></td>
- <td>repeated</td>
- <td><p>The group names to retrieve.
-Format: groups/{email} </p></td>
+ <td></td>
+ <td><p>The Bytebase server version. </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.BatchGetGroupsResponse">BatchGetGroupsResponse</h3>
- <p>Response message for batch getting groups.</p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
+ <tr>
+ <td>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>groups</td>
- <td><a href="#bytebase.v1.Group">Group</a></td>
- <td>repeated</td>
- <td><p>The groups from the specified request. </p></td>
+ <td>readonly</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>Whether the Bytebase instance is running in read-only mode. </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.CreateGroupRequest">CreateGroupRequest</h3>
- <p>Request message for creating a group.</p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
+ <tr>
+ <td>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>group</td>
- <td><a href="#bytebase.v1.Group">Group</a></td>
+ <td>demo</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p>The group to create. </p></td>
+ <td><p>Whether the Bytebase instance is running in demo mode. </p></td>
</tr>
<tr>
- <td>group_email</td>
+ <td>host</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The email to use for the group, which will become the final component
-of the group&#39;s resource name. </p></td>
+ <td><p>The host address of the Bytebase instance. </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.DeleteGroupRequest">DeleteGroupRequest</h3>
- <p>Request message for deleting a group.</p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
+ <tr>
+ <td>port</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The port number of the Bytebase instance. </p></td>
+ </tr>
<tr>
- <td>name</td>
+ <td>external_url</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The name of the group to delete.
-Format: groups/{email} </p></td>
+ <td><p>The external URL where users or webhook callbacks access Bytebase. </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.GetGroupRequest">GetGroupRequest</h3>
- <p>Request message for getting a group.</p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
+ <tr>
+ <td>need_admin_setup</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>Whether the Bytebase instance requires initial admin setup. </p></td>
+ </tr>
<tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
+ <td>disallow_signup</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p>The name of the group to retrieve.
-Format: groups/{email} </p></td>
+ <td><p>Whether self-service user signup is disabled. </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.Group">Group</h3>
- <p>A group of users within the workspace.</p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
+ <tr>
+ <td>last_active_time</td>
+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
+ <td></td>
+ <td><p>The last time any API call was made, refreshed on each request. </p></td>
+ </tr>
<tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
+ <td>require_2fa</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p>The name of the group to retrieve.
-Format: groups/{group}, group is an email. </p></td>
+ <td><p>Whether two-factor authentication is required for all users. </p></td>
</tr>
<tr>
- <td>title</td>
+ <td>workspace_id</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The display title of the group. </p></td>
+ <td><p>The unique identifier for the workspace. </p></td>
</tr>
<tr>
- <td>description</td>
- <td><a href="#string">string</a></td>
+ <td>debug</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p>The description of the group. </p></td>
+ <td><p>Whether debug mode is enabled. </p></td>
</tr>
<tr>
- <td>members</td>
- <td><a href="#bytebase.v1.GroupMember">GroupMember</a></td>
+ <td>unlicensed_features</td>
+ <td><a href="#string">string</a></td>
<td>repeated</td>
- <td><p>The members of the group. </p></td>
+ <td><p>List of features that are not licensed. </p></td>
</tr>
<tr>
- <td>source</td>
- <td><a href="#string">string</a></td>
+ <td>disallow_password_signin</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p>The source system where the group originated (e.g., Entra ID for SCIM sync). </p></td>
+ <td><p>Whether password-based signin is disabled (except for workspace admins). </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.GroupMember">GroupMember</h3>
- <p>A member of a group with a role.</p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
+ <tr>
+ <td>password_restriction</td>
+ <td><a href="#bytebase.v1.PasswordRestrictionSetting">PasswordRestrictionSetting</a></td>
+ <td></td>
+ <td><p>Password complexity and restriction requirements. </p></td>
+ </tr>
<tr>
- <td>member</td>
- <td><a href="#string">string</a></td>
+ <td>docker</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p>Member is the principal who belong to this group.
-
-Format: users/[email protected] </p></td>
+ <td><p>Whether the Bytebase instance is running in Docker. </p></td>
</tr>
<tr>
- <td>role</td>
- <td><a href="#bytebase.v1.GroupMember.Role">GroupMember.Role</a></td>
+ <td>user_stats</td>
+ <td><a href="#bytebase.v1.ActuatorInfo.StatUser">ActuatorInfo.StatUser</a></td>
+ <td>repeated</td>
+ <td><p>Statistics about users in the system. </p></td>
+ </tr>
+
+ <tr>
+ <td>activated_instance_count</td>
+ <td><a href="#int32">int32</a></td>
<td></td>
- <td><p>The member&#39;s role in the group. </p></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>
</tbody>
@@ -17812,8 +16912,8 @@ Format: users/[email protected] </p></td>
- <h3 id="bytebase.v1.ListGroupsRequest">ListGroupsRequest</h3>
- <p>Request message for listing groups.</p>
+ <h3 id="bytebase.v1.ActuatorInfo.StatUser">ActuatorInfo.StatUser</h3>
+ <p>User statistics by type and state.</p>
<table class="field-table">
@@ -17823,46 +16923,24 @@ Format: users/[email protected] </p></td>
<tbody>
<tr>
- <td>page_size</td>
- <td><a href="#int32">int32</a></td>
+ <td>user_type</td>
+ <td><a href="#bytebase.v1.UserType">UserType</a></td>
<td></td>
- <td><p>The maximum number of groups to return. The service may return fewer than
-this value.
-If unspecified, at most 10 groups will be returned.
-The maximum value is 1000; values above 1000 will be coerced to 1000. </p></td>
+ <td><p>The type of user. </p></td>
</tr>
<tr>
- <td>page_token</td>
- <td><a href="#string">string</a></td>
+ <td>state</td>
+ <td><a href="#bytebase.v1.State">State</a></td>
<td></td>
- <td><p>A page token, received from a previous `ListGroups` call.
-Provide this to retrieve the subsequent page.
-
-When paginating, all other parameters provided to `ListGroups` must match
-the call that provided the page token. </p></td>
+ <td><p>The state of the user. </p></td>
</tr>
<tr>
- <td>filter</td>
- <td><a href="#string">string</a></td>
+ <td>count</td>
+ <td><a href="#int32">int32</a></td>
<td></td>
- <td><p>Filter is used to filter groups returned in the list.
-The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
-
-Supported filter:
-- title: the group title, support &#34;==&#34; and &#34;.matches()&#34; operator.
-- email: the group email, support &#34;==&#34; and &#34;.matches()&#34; operator.
-- project: the project full name in &#34;projects/{id}&#34; format, support &#34;==&#34; operator.
-
-For example:
-title == &#34;dba&#34;
-email == &#34;[email protected]&#34;
-title.matches(&#34;dba&#34;)
-email.matches(&#34;dba&#34;)
-project == &#34;projects/sample-project&#34;
-You can combine filter conditions like:
-title.matches(&#34;dba&#34;) || email.matches(&#34;dba&#34;) </p></td>
+ <td><p>The count of users matching this type and state. </p></td>
</tr>
</tbody>
@@ -17872,8 +16950,29 @@ title.matches(&#34;dba&#34;) || email.matches(&#34;dba&#34;) </p></td>
- <h3 id="bytebase.v1.ListGroupsResponse">ListGroupsResponse</h3>
- <p>Response message for listing groups.</p>
+ <h3 id="bytebase.v1.DeleteCacheRequest">DeleteCacheRequest</h3>
+ <p>Request message for deleting cache.</p>
+
+
+
+
+
+ <h3 id="bytebase.v1.GetActuatorInfoRequest">GetActuatorInfoRequest</h3>
+ <p>Request message for getting actuator information.</p>
+
+
+
+
+
+ <h3 id="bytebase.v1.GetResourcePackageRequest">GetResourcePackageRequest</h3>
+ <p>Request message for getting branding resources.</p>
+
+
+
+
+
+ <h3 id="bytebase.v1.ResourcePackage">ResourcePackage</h3>
+ <p>Custom branding resources for the Bytebase instance.</p>
<table class="field-table">
@@ -17883,18 +16982,10 @@ title.matches(&#34;dba&#34;) || email.matches(&#34;dba&#34;) </p></td>
<tbody>
<tr>
- <td>groups</td>
- <td><a href="#bytebase.v1.Group">Group</a></td>
- <td>repeated</td>
- <td><p>The groups from the specified request. </p></td>
- </tr>
-
- <tr>
- <td>next_page_token</td>
- <td><a href="#string">string</a></td>
+ <td>logo</td>
+ <td><a href="#bytes">bytes</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 branding logo. </p></td>
</tr>
</tbody>
@@ -17904,8 +16995,15 @@ If this field is omitted, there are no subsequent pages. </p></td>
- <h3 id="bytebase.v1.UpdateGroupRequest">UpdateGroupRequest</h3>
- <p>Request message for updating a group.</p>
+ <h3 id="bytebase.v1.SetupSampleRequest">SetupSampleRequest</h3>
+ <p>Request message for setting up sample data.</p>
+
+
+
+
+
+ <h3 id="bytebase.v1.UpdateActuatorInfoRequest">UpdateActuatorInfoRequest</h3>
+ <p>Request message for updating actuator information.</p>
<table class="field-table">
@@ -17915,13 +17013,10 @@ If this field is omitted, there are no subsequent pages. </p></td>
<tbody>
<tr>
- <td>group</td>
- <td><a href="#bytebase.v1.Group">Group</a></td>
+ <td>actuator</td>
+ <td><a href="#bytebase.v1.ActuatorInfo">ActuatorInfo</a></td>
<td></td>
- <td><p>The group to update.
-
-The group&#39;s `name` field is used to identify the group to update.
-Format: groups/{email} </p></td>
+ <td><p>The actuator to update. </p></td>
</tr>
<tr>
@@ -17935,7 +17030,7 @@ Format: groups/{email} </p></td>
<td>allow_missing</td>
<td><a href="#bool">bool</a></td>
<td></td>
- <td><p>If set to true, and the group is not found, a new group will be created.
+ <td><p>If set to true, and the actuator is not found, a new actuator will be created.
In this situation, `update_mask` is ignored. </p></td>
</tr>
@@ -17948,94 +17043,56 @@ In this situation, `update_mask` is ignored. </p></td>
- <h3 id="bytebase.v1.GroupMember.Role">GroupMember.Role</h3>
- <p>The role of a group member.</p>
+
+
+
+
+ <h3 id="bytebase.v1.ActuatorService">ActuatorService</h3>
+ <p>ActuatorService manages system health and operational information.</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>ROLE_UNSPECIFIED</td>
- <td>0</td>
- <td><p>Unspecified role.</p></td>
+ <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.
+Permissions required: None</p></td>
</tr>
<tr>
- <td>OWNER</td>
- <td>1</td>
- <td><p>Group owner.</p></td>
- </tr>
-
- <tr>
- <td>MEMBER</td>
- <td>2</td>
- <td><p>Group member.</p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.GroupService">GroupService</h3>
- <p>GroupService manages user groups for organizing users and permissions.</p>
- <table class="enum-table">
- <thead>
- <tr><td>Method Name</td><td>Request Type</td><td>Response Type</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>GetGroup</td>
- <td><a href="#bytebase.v1.GetGroupRequest">GetGroupRequest</a></td>
- <td><a href="#bytebase.v1.Group">Group</a></td>
- <td><p>Gets a group by name.
-Permissions required: bb.groups.get</p></td>
- </tr>
-
- <tr>
- <td>BatchGetGroups</td>
- <td><a href="#bytebase.v1.BatchGetGroupsRequest">BatchGetGroupsRequest</a></td>
- <td><a href="#bytebase.v1.BatchGetGroupsResponse">BatchGetGroupsResponse</a></td>
- <td><p>Gets multiple groups in a single request.
-Permissions required: bb.groups.get</p></td>
- </tr>
-
- <tr>
- <td>ListGroups</td>
- <td><a href="#bytebase.v1.ListGroupsRequest">ListGroupsRequest</a></td>
- <td><a href="#bytebase.v1.ListGroupsResponse">ListGroupsResponse</a></td>
- <td><p>Lists all groups in the workspace.
-Permissions required: bb.groups.list</p></td>
+ <td>UpdateActuatorInfo</td>
+ <td><a href="#bytebase.v1.UpdateActuatorInfoRequest">UpdateActuatorInfoRequest</a></td>
+ <td><a href="#bytebase.v1.ActuatorInfo">ActuatorInfo</a></td>
+ <td><p>Updates system configuration settings for the Bytebase instance.
+Permissions required: bb.settings.set</p></td>
</tr>
<tr>
- <td>CreateGroup</td>
- <td><a href="#bytebase.v1.CreateGroupRequest">CreateGroupRequest</a></td>
- <td><a href="#bytebase.v1.Group">Group</a></td>
- <td><p>Creates a new group.
-Permissions required: bb.groups.create</p></td>
+ <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>
<tr>
- <td>UpdateGroup</td>
- <td><a href="#bytebase.v1.UpdateGroupRequest">UpdateGroupRequest</a></td>
- <td><a href="#bytebase.v1.Group">Group</a></td>
- <td><p>Updates a group. Group owners or users with bb.groups.update permission can update.
-Permissions required: bb.groups.update OR caller is group owner
-When allow_missing=true, also requires: bb.groups.create</p></td>
+ <td>DeleteCache</td>
+ <td><a href="#bytebase.v1.DeleteCacheRequest">DeleteCacheRequest</a></td>
+ <td><a href="#google.protobuf.Empty">.google.protobuf.Empty</a></td>
+ <td><p>Clears the system cache to force data refresh.
+Permissions required: None</p></td>
</tr>
<tr>
- <td>DeleteGroup</td>
- <td><a href="#bytebase.v1.DeleteGroupRequest">DeleteGroupRequest</a></td>
- <td><a href="#google.protobuf.Empty">.google.protobuf.Empty</a></td>
- <td><p>Deletes a group. Group owners or users with bb.groups.delete permission can delete.
-Permissions required: bb.groups.delete OR caller is group owner</p></td>
+ <td>GetResourcePackage</td>
+ <td><a href="#bytebase.v1.GetResourcePackageRequest">GetResourcePackageRequest</a></td>
+ <td><a href="#bytebase.v1.ResourcePackage">ResourcePackage</a></td>
+ <td><p>Gets custom branding resources such as logos.
+Permissions required: None</p></td>
</tr>
</tbody>
@@ -18059,19 +17116,9 @@ Permissions required: bb.groups.delete OR caller is group owner</p></td>
<tr>
- <td>GetGroup</td>
- <td>GET</td>
- <td>/v1/{name=groups/*}</td>
- <td></td>
- </tr>
-
-
-
-
- <tr>
- <td>BatchGetGroups</td>
+ <td>GetActuatorInfo</td>
<td>GET</td>
- <td>/v1/groups:batchGet</td>
+ <td>/v1/actuator/info</td>
<td></td>
</tr>
@@ -18079,39 +17126,39 @@ Permissions required: bb.groups.delete OR caller is group owner</p></td>
<tr>
- <td>ListGroups</td>
- <td>GET</td>
- <td>/v1/groups</td>
- <td></td>
+ <td>UpdateActuatorInfo</td>
+ <td>PATCH</td>
+ <td>/v1/actuator/info</td>
+ <td>actuator</td>
</tr>
<tr>
- <td>CreateGroup</td>
+ <td>SetupSample</td>
<td>POST</td>
- <td>/v1/groups</td>
- <td>group</td>
+ <td>/v1/actuator:setupSample</td>
+ <td></td>
</tr>
<tr>
- <td>UpdateGroup</td>
- <td>PATCH</td>
- <td>/v1/{group.name=groups/*}</td>
- <td>group</td>
+ <td>DeleteCache</td>
+ <td>DELETE</td>
+ <td>/v1/actuator/cache</td>
+ <td></td>
</tr>
<tr>
- <td>DeleteGroup</td>
- <td>DELETE</td>
- <td>/v1/{name=groups/*}</td>
+ <td>GetResourcePackage</td>
+ <td>GET</td>
+ <td>/v1/actuator/resources</td>
<td></td>
</tr>
@@ -18123,13 +17170,13 @@ Permissions required: bb.groups.delete OR caller is group owner</p></td>
<div class="file-heading">
- <h2 id="v1/idp_service.proto">v1/idp_service.proto</h2><a href="#title">Top</a>
+ <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.CreateIdentityProviderRequest">CreateIdentityProviderRequest</h3>
- <p></p>
+ <h3 id="bytebase.v1.AuditData">AuditData</h3>
+ <p>Additional audit data specific to certain operations.</p>
<table class="field-table">
@@ -18139,28 +17186,10 @@ Permissions required: bb.groups.delete OR caller is group owner</p></td>
<tbody>
<tr>
- <td>identity_provider</td>
- <td><a href="#bytebase.v1.IdentityProvider">IdentityProvider</a></td>
- <td></td>
- <td><p>The identity provider to create. </p></td>
- </tr>
-
- <tr>
- <td>identity_provider_id</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The ID to use for the identity provider, which will become the final component of
-the identity provider&#39;s resource name.
-
-This value should be 4-63 characters, and valid characters
-are /[a-z][0-9]-/. </p></td>
- </tr>
-
- <tr>
- <td>validate_only</td>
- <td><a href="#bool">bool</a></td>
+ <td>policy_delta</td>
+ <td><a href="#bytebase.v1.PolicyDelta">PolicyDelta</a></td>
<td></td>
- <td><p>If set to true, the request will be validated without actually creating the identity provider. </p></td>
+ <td><p>Changes to IAM policies. </p></td>
</tr>
</tbody>
@@ -18170,8 +17199,8 @@ are /[a-z][0-9]-/. </p></td>
- <h3 id="bytebase.v1.DeleteIdentityProviderRequest">DeleteIdentityProviderRequest</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">
@@ -18184,54 +17213,90 @@ are /[a-z][0-9]-/. </p></td>
<td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The name of the identity provider to delete.
-Format: idps/{identity_provider} </p></td>
+ <td><p>The name of the log.
+Formats:
+- projects/{project}/auditLogs/{uid}
+- workspaces/{workspace}/auditLogs/{uid} </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.FieldMapping">FieldMapping</h3>
- <p>FieldMapping saves the field names from user info API of identity provider.</p><p>As we save all raw json string of user info response data into `principal.idp_user_info`,</p><p>we can extract the relevant data based with `FieldMapping`.</p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
+ <tr>
+ <td>create_time</td>
+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
+ <td></td>
+ <td><p>The timestamp when the audit log was created. </p></td>
+ </tr>
<tr>
- <td>identifier</td>
+ <td>user</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>Identifier is the field name of the unique identifier in 3rd-party idp user info. Required. </p></td>
+ <td><p>The user who performed the action.
+Format: users/{email} </p></td>
</tr>
<tr>
- <td>display_name</td>
+ <td>method</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>DisplayName is the field name of display name in 3rd-party idp user info. Optional. </p></td>
+ <td><p>The method or action being audited.
+For example: /bytebase.v1.SQLService/Query or bb.project.repository.push </p></td>
</tr>
<tr>
- <td>phone</td>
+ <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>Phone is the field name of primary phone in 3rd-party idp user info. Optional. </p></td>
+ <td><p>The resource associated with this audit log. </p></td>
</tr>
<tr>
- <td>groups</td>
+ <td>request</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>Groups is the field name of groups in 3rd-party idp user info. Optional.
-Mainly used for OIDC: https://developer.okta.com/docs/guides/customize-tokens-groups-claim/main/ </p></td>
+ <td><p>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>
</tbody>
@@ -18241,8 +17306,8 @@ Mainly used for OIDC: https://developer.okta.com/docs/guides/customize-tokens-gr
- <h3 id="bytebase.v1.GetIdentityProviderRequest">GetIdentityProviderRequest</h3>
- <p></p>
+ <h3 id="bytebase.v1.ExportAuditLogsRequest">ExportAuditLogsRequest</h3>
+ <p>Request message for exporting audit logs.</p>
<table class="field-table">
@@ -18252,64 +17317,54 @@ Mainly used for OIDC: https://developer.okta.com/docs/guides/customize-tokens-gr
<tbody>
<tr>
- <td>name</td>
+ <td>parent</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The name of the identity provider to retrieve.
-Format: idps/{idp} </p></td>
+ <td><p> </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.IdentityProvider">IdentityProvider</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
<tr>
- <td>name</td>
+ <td>filter</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The name of the identity provider.
-Format: idps/{idp} </p></td>
+ <td><p>The filter of the log. It should be a valid CEL expression.
+Check the filter field in the SearchAuditLogsRequest message. </p></td>
</tr>
<tr>
- <td>title</td>
+ <td>order_by</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The display title of the identity provider. </p></td>
+ <td><p>The order by of the log.
+Only support order by create_time.
+For example:
+ - order_by = &#34;create_time asc&#34;
+ - order_by = &#34;create_time desc&#34; </p></td>
</tr>
<tr>
- <td>domain</td>
- <td><a href="#string">string</a></td>
+ <td>format</td>
+ <td><a href="#bytebase.v1.ExportFormat">ExportFormat</a></td>
<td></td>
- <td><p>The domain for email matching when using this identity provider. </p></td>
+ <td><p>The export format. </p></td>
</tr>
<tr>
- <td>type</td>
- <td><a href="#bytebase.v1.IdentityProviderType">IdentityProviderType</a></td>
+ <td>page_size</td>
+ <td><a href="#int32">int32</a></td>
<td></td>
- <td><p>The type of identity provider protocol. </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>config</td>
- <td><a href="#bytebase.v1.IdentityProviderConfig">IdentityProviderConfig</a></td>
+ <td>page_token</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>The configuration details for the identity provider. </p></td>
+ <td><p>A page token, received from a previous `ExportAuditLogs` call.
+Provide this to retrieve the subsequent page. </p></td>
</tr>
</tbody>
@@ -18319,8 +17374,8 @@ Format: idps/{idp} </p></td>
- <h3 id="bytebase.v1.IdentityProviderConfig">IdentityProviderConfig</h3>
- <p></p>
+ <h3 id="bytebase.v1.ExportAuditLogsResponse">ExportAuditLogsResponse</h3>
+ <p>Response message for exporting audit logs.</p>
<table class="field-table">
@@ -18330,24 +17385,19 @@ Format: idps/{idp} </p></td>
<tbody>
<tr>
- <td>oauth2_config</td>
- <td><a href="#bytebase.v1.OAuth2IdentityProviderConfig">OAuth2IdentityProviderConfig</a></td>
- <td></td>
- <td><p>OAuth2 protocol configuration. </p></td>
- </tr>
-
- <tr>
- <td>oidc_config</td>
- <td><a href="#bytebase.v1.OIDCIdentityProviderConfig">OIDCIdentityProviderConfig</a></td>
+ <td>content</td>
+ <td><a href="#bytes">bytes</a></td>
<td></td>
- <td><p>OIDC protocol configuration. </p></td>
+ <td><p>The exported audit log content in the requested format. </p></td>
</tr>
<tr>
- <td>ldap_config</td>
- <td><a href="#bytebase.v1.LDAPIdentityProviderConfig">LDAPIdentityProviderConfig</a></td>
+ <td>next_page_token</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>LDAP protocol configuration. </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>
@@ -18357,8 +17407,8 @@ Format: idps/{idp} </p></td>
- <h3 id="bytebase.v1.LDAPIdentityProviderConfig">LDAPIdentityProviderConfig</h3>
- <p>LDAPIdentityProviderConfig is the structure for LDAP identity provider config.</p>
+ <h3 id="bytebase.v1.RequestMetadata">RequestMetadata</h3>
+ <p>Metadata about the incoming request.</p>
<table class="field-table">
@@ -18368,72 +17418,91 @@ Format: idps/{idp} </p></td>
<tbody>
<tr>
- <td>host</td>
+ <td>caller_ip</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>Host is the hostname or IP address of the LDAP server, e.g.,
-&#34;ldap.example.com&#34;. </p></td>
- </tr>
-
- <tr>
- <td>port</td>
- <td><a href="#int32">int32</a></td>
- <td></td>
- <td><p>Port is the port number of the LDAP server, e.g., 389. When not set, the
-default port of the corresponding security protocol will be used, i.e. 389
-for StartTLS and 636 for LDAPS. </p></td>
- </tr>
-
- <tr>
- <td>skip_tls_verify</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>SkipTLSVerify controls whether to skip TLS certificate verification. </p></td>
+ <td><p>The IP address of the request originator. </p></td>
</tr>
<tr>
- <td>bind_dn</td>
+ <td>caller_supplied_user_agent</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>BindDN is the DN of the user to bind as a service account to perform
-search requests. </p></td>
+ <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>bind_password</td>
+ <td>parent</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>BindPassword is the password of the user to bind as a service account. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>base_dn</td>
+ <td>filter</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>BaseDN is the base DN to search for users, e.g., &#34;ou=users,dc=example,dc=com&#34;. </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 &#34;/bytebase.v1.&#34; prefix. For example &#34;/bytebase.v1.UserService/CreateUser&#34;. Support &#34;==&#34; operator.
+- severity: support &#34;==&#34; operator, check Severity enum in AuditLog message for values.
+- user: the actor, should in &#34;users/{email}&#34; format, support &#34;==&#34; operator.
+- create_time: support &#34;&gt;=&#34; and &#34;&lt;=&#34; operator.
+
+For example:
+ - filter = &#34;method == &#39;/bytebase.v1.SQLService/Query&#39;&#34;
+ - filter = &#34;method == &#39;/bytebase.v1.SQLService/Query&#39; &amp;&amp; severity == &#39;ERROR&#39;&#34;
+ - filter = &#34;method == &#39;/bytebase.v1.SQLService/Query&#39; &amp;&amp; severity == &#39;ERROR&#39; &amp;&amp; user == &#39;users/[email protected]&#39;&#34;
+ - filter = &#34;method == &#39;/bytebase.v1.SQLService/Query&#39; &amp;&amp; severity == &#39;ERROR&#39; &amp;&amp; create_time &lt;= &#39;2021-01-01T00:00:00Z&#39; &amp;&amp; create_time &gt;= &#39;2020-01-01T00:00:00Z&#39;&#34; </p></td>
</tr>
<tr>
- <td>user_filter</td>
+ <td>order_by</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>UserFilter is the filter to search for users, e.g., &#34;(uid=%s)&#34;. </p></td>
+ <td><p>The order by of the log.
+Only support order by create_time.
+For example:
+ - order_by = &#34;create_time asc&#34;
+ - order_by = &#34;create_time desc&#34; </p></td>
</tr>
<tr>
- <td>security_protocol</td>
- <td><a href="#bytebase.v1.LDAPIdentityProviderConfig.SecurityProtocol">LDAPIdentityProviderConfig.SecurityProtocol</a></td>
+ <td>page_size</td>
+ <td><a href="#int32">int32</a></td>
<td></td>
- <td><p>SecurityProtocol is the security protocol to be used for establishing
-connections with the LDAP server. </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>field_mapping</td>
- <td><a href="#bytebase.v1.FieldMapping">FieldMapping</a></td>
+ <td>page_token</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>FieldMapping is the mapping of the user attributes returned by the LDAP
-server. </p></td>
+ <td><p>A page token, received from a previous `SearchLogs` call.
+Provide this to retrieve the subsequent page. </p></td>
</tr>
</tbody>
@@ -18443,15 +17512,8 @@ server. </p></td>
- <h3 id="bytebase.v1.ListIdentityProvidersRequest">ListIdentityProvidersRequest</h3>
- <p></p>
-
-
-
-
-
- <h3 id="bytebase.v1.ListIdentityProvidersResponse">ListIdentityProvidersResponse</h3>
- <p></p>
+ <h3 id="bytebase.v1.SearchAuditLogsResponse">SearchAuditLogsResponse</h3>
+ <p>Response message for searching audit logs.</p>
<table class="field-table">
@@ -18461,10 +17523,19 @@ server. </p></td>
<tbody>
<tr>
- <td>identity_providers</td>
- <td><a href="#bytebase.v1.IdentityProvider">IdentityProvider</a></td>
+ <td>audit_logs</td>
+ <td><a href="#bytebase.v1.AuditLog">AuditLog</a></td>
<td>repeated</td>
- <td><p>The identity providers from the specified request. </p></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>
@@ -18474,88 +17545,167 @@ server. </p></td>
- <h3 id="bytebase.v1.OAuth2IdentityProviderConfig">OAuth2IdentityProviderConfig</h3>
- <p>OAuth2IdentityProviderConfig is the structure for OAuth2 identity provider config.</p>
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>auth_url</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The authorization endpoint URL for OAuth2 flow. </p></td>
- </tr>
-
- <tr>
- <td>token_url</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The token endpoint URL for exchanging authorization code. </p></td>
- </tr>
-
- <tr>
- <td>user_info_url</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The user information endpoint URL. </p></td>
- </tr>
-
- <tr>
- <td>client_id</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The OAuth2 client identifier. </p></td>
- </tr>
-
- <tr>
- <td>client_secret</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The OAuth2 client secret for authentication. </p></td>
- </tr>
-
- <tr>
- <td>scopes</td>
- <td><a href="#string">string</a></td>
- <td>repeated</td>
- <td><p>The list of OAuth2 scopes to request. </p></td>
- </tr>
-
- <tr>
- <td>field_mapping</td>
- <td><a href="#bytebase.v1.FieldMapping">FieldMapping</a></td>
- <td></td>
- <td><p>Mapping configuration for user attributes from OAuth2 response. </p></td>
- </tr>
+
+ <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>skip_tls_verify</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>Whether to skip TLS certificate verification. </p></td>
- </tr>
- <tr>
- <td>auth_style</td>
- <td><a href="#bytebase.v1.OAuth2AuthStyle">OAuth2AuthStyle</a></td>
- <td></td>
- <td><p>The authentication style for client credentials. </p></td>
- </tr>
+ <tr>
+ <td>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.OAuth2IdentityProviderTestRequestContext">OAuth2IdentityProviderTestRequestContext</h3>
- <p></p>
+ <div class="file-heading">
+ <h2 id="v1/auth_service.proto">v1/auth_service.proto</h2><a href="#title">Top</a>
+ </div>
+ <p></p>
+
+
+ <h3 id="bytebase.v1.IdentityProviderContext">IdentityProviderContext</h3>
+ <p>Context for identity provider authentication.</p>
<table class="field-table">
@@ -18565,10 +17715,17 @@ server. </p></td>
<tbody>
<tr>
- <td>code</td>
- <td><a href="#string">string</a></td>
+ <td>oauth2_context</td>
+ <td><a href="#bytebase.v1.OAuth2IdentityProviderContext">OAuth2IdentityProviderContext</a></td>
<td></td>
- <td><p>Authorize code from website. </p></td>
+ <td><p>OAuth2 authentication context. </p></td>
+ </tr>
+
+ <tr>
+ <td>oidc_context</td>
+ <td><a href="#bytebase.v1.OIDCIdentityProviderContext">OIDCIdentityProviderContext</a></td>
+ <td></td>
+ <td><p>OpenID Connect authentication context. </p></td>
</tr>
</tbody>
@@ -18578,8 +17735,8 @@ server. </p></td>
- <h3 id="bytebase.v1.OIDCIdentityProviderConfig">OIDCIdentityProviderConfig</h3>
- <p>OIDCIdentityProviderConfig is the structure for OIDC identity provider config.</p>
+ <h3 id="bytebase.v1.LoginRequest">LoginRequest</h3>
+ <p></p>
<table class="field-table">
@@ -18589,61 +17746,60 @@ server. </p></td>
<tbody>
<tr>
- <td>issuer</td>
+ <td>email</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The OIDC issuer URL for the identity provider. </p></td>
+ <td><p>User&#39;s email address. </p></td>
</tr>
<tr>
- <td>client_id</td>
+ <td>password</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The OIDC client identifier. </p></td>
+ <td><p>User&#39;s password for authentication. </p></td>
</tr>
<tr>
- <td>client_secret</td>
- <td><a href="#string">string</a></td>
+ <td>web</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p>The OIDC client secret for authentication. </p></td>
+ <td><p>If web is set, we will set access token, refresh token, and user to the cookie. </p></td>
</tr>
<tr>
- <td>scopes</td>
+ <td>idp_name</td>
<td><a href="#string">string</a></td>
- <td>repeated</td>
- <td><p>The scopes that the OIDC provider supports.
-Should be fetched from the well-known configuration file of the OIDC provider. </p></td>
+ <td></td>
+ <td><p>The name of the identity provider.
+Format: idps/{idp} </p></td>
</tr>
<tr>
- <td>field_mapping</td>
- <td><a href="#bytebase.v1.FieldMapping">FieldMapping</a></td>
+ <td>idp_context</td>
+ <td><a href="#bytebase.v1.IdentityProviderContext">IdentityProviderContext</a></td>
<td></td>
- <td><p>Mapping configuration for user attributes from OIDC claims. </p></td>
+ <td><p>The idp_context is using to get the user information from identity provider. </p></td>
</tr>
<tr>
- <td>skip_tls_verify</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>Whether to skip TLS certificate verification. </p></td>
+ <td>otp_code</td>
+ <td><a href="#string">string</a></td>
+ <td>optional</td>
+ <td><p>The otp_code is used to verify the user&#39;s identity by MFA. </p></td>
</tr>
<tr>
- <td>auth_style</td>
- <td><a href="#bytebase.v1.OAuth2AuthStyle">OAuth2AuthStyle</a></td>
- <td></td>
- <td><p>The authentication style for client credentials. </p></td>
+ <td>recovery_code</td>
+ <td><a href="#string">string</a></td>
+ <td>optional</td>
+ <td><p>The recovery_code is used to recovery the user&#39;s identity with MFA. </p></td>
</tr>
<tr>
- <td>auth_endpoint</td>
+ <td>mfa_temp_token</td>
<td><a href="#string">string</a></td>
- <td></td>
- <td><p>The authorization endpoint of the OIDC provider.
-Should be fetched from the well-known configuration file of the OIDC provider. </p></td>
+ <td>optional</td>
+ <td><p>The mfa_temp_token is used to verify the user&#39;s identity by MFA. </p></td>
</tr>
</tbody>
@@ -18653,7 +17809,7 @@ Should be fetched from the well-known configuration file of the OIDC provider. <
- <h3 id="bytebase.v1.TestIdentityProviderRequest">TestIdentityProviderRequest</h3>
+ <h3 id="bytebase.v1.LoginResponse">LoginResponse</h3>
<p></p>
@@ -18664,28 +17820,49 @@ Should be fetched from the well-known configuration file of the OIDC provider. <
<tbody>
<tr>
- <td>identity_provider</td>
- <td><a href="#bytebase.v1.IdentityProvider">IdentityProvider</a></td>
+ <td>token</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>The identity provider to test connection including uncreated. </p></td>
+ <td><p>Access token for authenticated requests. </p></td>
</tr>
<tr>
- <td>oauth2_context</td>
- <td><a href="#bytebase.v1.OAuth2IdentityProviderTestRequestContext">OAuth2IdentityProviderTestRequestContext</a></td>
- <td></td>
- <td><p> </p></td>
+ <td>mfa_temp_token</td>
+ <td><a href="#string">string</a></td>
+ <td>optional</td>
+ <td><p>Temporary token for MFA verification. </p></td>
</tr>
- </tbody>
- </table>
-
+ <tr>
+ <td>require_reset_password</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>Whether user must reset password before continuing. </p></td>
+ </tr>
+
+ <tr>
+ <td>user</td>
+ <td><a href="#bytebase.v1.User">User</a></td>
+ <td></td>
+ <td><p>The user from the successful login. </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
- <h3 id="bytebase.v1.TestIdentityProviderResponse">TestIdentityProviderResponse</h3>
- <p></p>
+ <h3 id="bytebase.v1.LogoutRequest">LogoutRequest</h3>
+ <p>Request to logout current user session.</p>
+
+
+
+
+
+ <h3 id="bytebase.v1.OAuth2IdentityProviderContext">OAuth2IdentityProviderContext</h3>
+ <p>OAuth2 authentication context.</p>
<table class="field-table">
@@ -18695,17 +17872,121 @@ Should be fetched from the well-known configuration file of the OIDC provider. <
<tbody>
<tr>
- <td>claims</td>
- <td><a href="#bytebase.v1.TestIdentityProviderResponse.ClaimsEntry">TestIdentityProviderResponse.ClaimsEntry</a></td>
- <td>repeated</td>
- <td><p>The map of claims returned by the identity provider. </p></td>
+ <td>code</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>Authorization code from OAuth2 provider. </p></td>
</tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.OIDCIdentityProviderContext">OIDCIdentityProviderContext</h3>
+ <p>OpenID Connect authentication context.</p>
+
+
+
+
+
+
+
+
+
+
+
+ <h3 id="bytebase.v1.AuthService">AuthService</h3>
+ <p>AuthService handles user authentication operations.</p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Method Name</td><td>Request Type</td><td>Response Type</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>Login</td>
+ <td><a href="#bytebase.v1.LoginRequest">LoginRequest</a></td>
+ <td><a href="#bytebase.v1.LoginResponse">LoginResponse</a></td>
+ <td><p>Authenticates a user and returns access tokens.
+Permissions required: None</p></td>
+ </tr>
+
+ <tr>
+ <td>Logout</td>
+ <td><a href="#bytebase.v1.LogoutRequest">LogoutRequest</a></td>
+ <td><a href="#google.protobuf.Empty">.google.protobuf.Empty</a></td>
+ <td><p>Logs out the current user session.
+Permissions required: None</p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
+ <h4>Methods with HTTP bindings</h4>
+ <table>
+ <thead>
+ <tr>
+ <td>Method Name</td>
+ <td>Method</td>
+ <td>Pattern</td>
+ <td>Body</td>
+ </tr>
+ </thead>
+ <tbody>
+
+
+
+ <tr>
+ <td>Login</td>
+ <td>POST</td>
+ <td>/v1/auth/login</td>
+ <td>*</td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>Logout</td>
+ <td>POST</td>
+ <td>/v1/auth/logout</td>
+ <td>*</td>
+ </tr>
+
+
+ </tbody>
+ </table>
+
+
+
+
+ <div class="file-heading">
+ <h2 id="v1/cel_service.proto">v1/cel_service.proto</h2><a href="#title">Top</a>
+ </div>
+ <p></p>
+
+
+ <h3 id="bytebase.v1.BatchDeparseRequest">BatchDeparseRequest</h3>
+ <p>Request message for batch deparsing CEL expressions.</p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
<tr>
- <td>user_info</td>
- <td><a href="#bytebase.v1.TestIdentityProviderResponse.UserInfoEntry">TestIdentityProviderResponse.UserInfoEntry</a></td>
+ <td>expressions</td>
+ <td><a href="#google.api.expr.v1alpha1.Expr">google.api.expr.v1alpha1.Expr</a></td>
<td>repeated</td>
- <td><p>The matched user info from the claims. </p></td>
+ <td><p>The CEL expression ASTs to deparse. </p></td>
</tr>
</tbody>
@@ -18715,8 +17996,8 @@ Should be fetched from the well-known configuration file of the OIDC provider. <
- <h3 id="bytebase.v1.TestIdentityProviderResponse.ClaimsEntry">TestIdentityProviderResponse.ClaimsEntry</h3>
- <p></p>
+ <h3 id="bytebase.v1.BatchDeparseResponse">BatchDeparseResponse</h3>
+ <p>Response message for batch deparsing CEL expressions.</p>
<table class="field-table">
@@ -18726,17 +18007,10 @@ Should be fetched from the well-known configuration file of the OIDC provider. <
<tbody>
<tr>
- <td>key</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>value</td>
+ <td>expressions</td>
<td><a href="#string">string</a></td>
- <td></td>
- <td><p> </p></td>
+ <td>repeated</td>
+ <td><p>The deparsed CEL expressions as strings. </p></td>
</tr>
</tbody>
@@ -18746,8 +18020,8 @@ Should be fetched from the well-known configuration file of the OIDC provider. <
- <h3 id="bytebase.v1.TestIdentityProviderResponse.UserInfoEntry">TestIdentityProviderResponse.UserInfoEntry</h3>
- <p></p>
+ <h3 id="bytebase.v1.BatchParseRequest">BatchParseRequest</h3>
+ <p>Request message for batch parsing CEL expressions.</p>
<table class="field-table">
@@ -18757,17 +18031,10 @@ Should be fetched from the well-known configuration file of the OIDC provider. <
<tbody>
<tr>
- <td>key</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>value</td>
+ <td>expressions</td>
<td><a href="#string">string</a></td>
- <td></td>
- <td><p> </p></td>
+ <td>repeated</td>
+ <td><p>The CEL expression strings to parse. </p></td>
</tr>
</tbody>
@@ -18777,8 +18044,8 @@ Should be fetched from the well-known configuration file of the OIDC provider. <
- <h3 id="bytebase.v1.UpdateIdentityProviderRequest">UpdateIdentityProviderRequest</h3>
- <p></p>
+ <h3 id="bytebase.v1.BatchParseResponse">BatchParseResponse</h3>
+ <p>Response message for batch parsing CEL expressions.</p>
<table class="field-table">
@@ -18788,28 +18055,10 @@ Should be fetched from the well-known configuration file of the OIDC provider. <
<tbody>
<tr>
- <td>identity_provider</td>
- <td><a href="#bytebase.v1.IdentityProvider">IdentityProvider</a></td>
- <td></td>
- <td><p>The identity provider to update.
-
-The identity provider&#39;s `name` field is used to identify the identity provider to update.
-Format: idps/{identity_provider} </p></td>
- </tr>
-
- <tr>
- <td>update_mask</td>
- <td><a href="#google.protobuf.FieldMask">google.protobuf.FieldMask</a></td>
- <td></td>
- <td><p>The list of fields to update. </p></td>
- </tr>
-
- <tr>
- <td>allow_missing</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>If set to true, and the identity provider is not found, a new identity provider will be created.
-In this situation, `update_mask` is ignored. </p></td>
+ <td>expressions</td>
+ <td><a href="#google.api.expr.v1alpha1.Expr">google.api.expr.v1alpha1.Expr</a></td>
+ <td>repeated</td>
+ <td><p>The parsed CEL expressions as AST. </p></td>
</tr>
</tbody>
@@ -18821,236 +18070,68 @@ In this situation, `update_mask` is ignored. </p></td>
- <h3 id="bytebase.v1.IdentityProviderType">IdentityProviderType</h3>
- <p></p>
+
+
+
+
+ <h3 id="bytebase.v1.CelService">CelService</h3>
+ <p>CelService manages CEL (Common Expression Language) parsing and formatting operations.</p>
<table class="enum-table">
<thead>
- <tr><td>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>IDENTITY_PROVIDER_TYPE_UNSPECIFIED</td>
- <td>0</td>
- <td><p>Unspecified identity provider type.</p></td>
+ <td>BatchParse</td>
+ <td><a href="#bytebase.v1.BatchParseRequest">BatchParseRequest</a></td>
+ <td><a href="#bytebase.v1.BatchParseResponse">BatchParseResponse</a></td>
+ <td><p>Parses multiple CEL expression strings into AST representations.
+Permissions required: None</p></td>
</tr>
<tr>
- <td>OAUTH2</td>
- <td>1</td>
- <td><p>OAuth 2.0 authentication protocol.</p></td>
+ <td>BatchDeparse</td>
+ <td><a href="#bytebase.v1.BatchDeparseRequest">BatchDeparseRequest</a></td>
+ <td><a href="#bytebase.v1.BatchDeparseResponse">BatchDeparseResponse</a></td>
+ <td><p>Converts multiple CEL AST representations back into expression strings.
+Permissions required: None</p></td>
</tr>
+ </tbody>
+ </table>
+
+
+
+
+ <h4>Methods with HTTP bindings</h4>
+ <table>
+ <thead>
<tr>
- <td>OIDC</td>
- <td>2</td>
- <td><p>OpenID Connect authentication protocol.</p></td>
+ <td>Method Name</td>
+ <td>Method</td>
+ <td>Pattern</td>
+ <td>Body</td>
</tr>
+ </thead>
+ <tbody>
+
+
<tr>
- <td>LDAP</td>
- <td>3</td>
- <td><p>LDAP directory service authentication.</p></td>
- </tr>
-
- </tbody>
- </table>
-
- <h3 id="bytebase.v1.LDAPIdentityProviderConfig.SecurityProtocol">LDAPIdentityProviderConfig.SecurityProtocol</h3>
- <p></p>
- <table class="enum-table">
- <thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>SECURITY_PROTOCOL_UNSPECIFIED</td>
- <td>0</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>START_TLS</td>
- <td>1</td>
- <td><p>StartTLS is the security protocol that starts with an unencrypted connection and then upgrades to TLS.</p></td>
- </tr>
-
- <tr>
- <td>LDAPS</td>
- <td>2</td>
- <td><p>LDAPS is the security protocol that uses TLS from the beginning.</p></td>
- </tr>
-
- </tbody>
- </table>
-
- <h3 id="bytebase.v1.OAuth2AuthStyle">OAuth2AuthStyle</h3>
- <p></p>
- <table class="enum-table">
- <thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>OAUTH2_AUTH_STYLE_UNSPECIFIED</td>
- <td>0</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>IN_PARAMS</td>
- <td>1</td>
- <td><p>IN_PARAMS sends the &#34;client_id&#34; and &#34;client_secret&#34; in the POST body
-as application/x-www-form-urlencoded parameters.</p></td>
- </tr>
-
- <tr>
- <td>IN_HEADER</td>
- <td>2</td>
- <td><p>IN_HEADER sends the client_id and client_password using HTTP Basic Authorization.
-This is an optional style described in the OAuth2 RFC 6749 section 2.3.1.</p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.IdentityProviderService">IdentityProviderService</h3>
- <p>IdentityProviderService manages external identity providers for SSO authentication.</p>
- <table class="enum-table">
- <thead>
- <tr><td>Method Name</td><td>Request Type</td><td>Response Type</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>GetIdentityProvider</td>
- <td><a href="#bytebase.v1.GetIdentityProviderRequest">GetIdentityProviderRequest</a></td>
- <td><a href="#bytebase.v1.IdentityProvider">IdentityProvider</a></td>
- <td><p>Gets an identity provider by name.
-Permissions required: bb.identityProviders.get</p></td>
- </tr>
-
- <tr>
- <td>ListIdentityProviders</td>
- <td><a href="#bytebase.v1.ListIdentityProvidersRequest">ListIdentityProvidersRequest</a></td>
- <td><a href="#bytebase.v1.ListIdentityProvidersResponse">ListIdentityProvidersResponse</a></td>
- <td><p>Lists all configured identity providers (public endpoint for login page).
-Permissions required: None</p></td>
- </tr>
-
- <tr>
- <td>CreateIdentityProvider</td>
- <td><a href="#bytebase.v1.CreateIdentityProviderRequest">CreateIdentityProviderRequest</a></td>
- <td><a href="#bytebase.v1.IdentityProvider">IdentityProvider</a></td>
- <td><p>Creates a new identity provider.
-Permissions required: bb.identityProviders.create</p></td>
- </tr>
-
- <tr>
- <td>UpdateIdentityProvider</td>
- <td><a href="#bytebase.v1.UpdateIdentityProviderRequest">UpdateIdentityProviderRequest</a></td>
- <td><a href="#bytebase.v1.IdentityProvider">IdentityProvider</a></td>
- <td><p>Updates an identity provider.
-Permissions required: bb.identityProviders.update
-When allow_missing=true, also requires: bb.identityProviders.create</p></td>
- </tr>
-
- <tr>
- <td>DeleteIdentityProvider</td>
- <td><a href="#bytebase.v1.DeleteIdentityProviderRequest">DeleteIdentityProviderRequest</a></td>
- <td><a href="#google.protobuf.Empty">.google.protobuf.Empty</a></td>
- <td><p>Deletes an identity provider.
-Permissions required: bb.identityProviders.delete</p></td>
- </tr>
-
- <tr>
- <td>TestIdentityProvider</td>
- <td><a href="#bytebase.v1.TestIdentityProviderRequest">TestIdentityProviderRequest</a></td>
- <td><a href="#bytebase.v1.TestIdentityProviderResponse">TestIdentityProviderResponse</a></td>
- <td><p>Tests the connection and configuration of an identity provider.
-Permissions required: bb.identityProviders.update</p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
- <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>GetIdentityProvider</td>
- <td>GET</td>
- <td>/v1/{name=idps/*}</td>
- <td></td>
- </tr>
-
-
-
-
- <tr>
- <td>ListIdentityProviders</td>
- <td>GET</td>
- <td>/v1/idps</td>
- <td></td>
- </tr>
-
-
-
-
- <tr>
- <td>CreateIdentityProvider</td>
+ <td>BatchParse</td>
<td>POST</td>
- <td>/v1/idps</td>
- <td>identity_provider</td>
- </tr>
-
-
-
-
- <tr>
- <td>UpdateIdentityProvider</td>
- <td>PATCH</td>
- <td>/v1/{identity_provider.name=idps/*}</td>
- <td>identity_provider</td>
- </tr>
-
-
-
-
- <tr>
- <td>DeleteIdentityProvider</td>
- <td>DELETE</td>
- <td>/v1/{name=idps/*}</td>
- <td></td>
+ <td>/v1/cel/batchParse</td>
+ <td>*</td>
</tr>
<tr>
- <td>TestIdentityProvider</td>
+ <td>BatchDeparse</td>
<td>POST</td>
- <td>/v1/idps/*:test</td>
+ <td>/v1/cel/batchDeparse</td>
<td>*</td>
</tr>
@@ -19062,13 +18143,13 @@ Permissions required: bb.identityProviders.update</p></td>
<div class="file-heading">
- <h2 id="v1/org_policy_service.proto">v1/org_policy_service.proto</h2><a href="#title">Top</a>
+ <h2 id="v1/changelist_service.proto">v1/changelist_service.proto</h2><a href="#title">Top</a>
</div>
<p></p>
- <h3 id="bytebase.v1.CreatePolicyRequest">CreatePolicyRequest</h3>
- <p></p>
+ <h3 id="bytebase.v1.Changelist">Changelist</h3>
+ <p>A changelist groups multiple database changes together.</p>
<table class="field-table">
@@ -19078,28 +18159,41 @@ Permissions required: bb.identityProviders.update</p></td>
<tbody>
<tr>
- <td>parent</td>
+ <td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The parent resource where this instance will be created.
-Workspace resource name: &#34;&#34;.
-Environment resource name: environments/environment-id.
-Instance resource name: instances/instance-id.
-Database resource name: instances/instance-id/databases/database-name. </p></td>
+ <td><p>The name of the changelist resource.
+Canonical parent is project.
+Format: projects/{project}/changelists/{changelist} </p></td>
</tr>
<tr>
- <td>policy</td>
- <td><a href="#bytebase.v1.Policy">Policy</a></td>
+ <td>description</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>The policy to create. </p></td>
+ <td><p>The description of the changelist. </p></td>
</tr>
<tr>
- <td>type</td>
- <td><a href="#bytebase.v1.PolicyType">PolicyType</a></td>
+ <td>creator</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>The type of policy to create. </p></td>
+ <td><p>The creator of the changelist.
+Format: users/{email} </p></td>
+ </tr>
+
+ <tr>
+ <td>update_time</td>
+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
+ <td></td>
+ <td><p>The last time the changelist was updated. </p></td>
+ </tr>
+
+ <tr>
+ <td>changes</td>
+ <td><a href="#bytebase.v1.Changelist.Change">Changelist.Change</a></td>
+ <td>repeated</td>
+ <td><p>The list of changes in this changelist. </p></td>
</tr>
</tbody>
@@ -19109,8 +18203,8 @@ Database resource name: instances/instance-id/databases/database-name. </p></td>
- <h3 id="bytebase.v1.DataSourceQueryPolicy">DataSourceQueryPolicy</h3>
- <p>Policy for controlling which data sources can be queried in the SQL editor.</p>
+ <h3 id="bytebase.v1.Changelist.Change">Changelist.Change</h3>
+ <p>A single change in a changelist.</p>
<table class="field-table">
@@ -19120,24 +18214,20 @@ Database resource name: instances/instance-id/databases/database-name. </p></td>
<tbody>
<tr>
- <td>admin_data_source_restriction</td>
- <td><a href="#bytebase.v1.DataSourceQueryPolicy.Restriction">DataSourceQueryPolicy.Restriction</a></td>
+ <td>sheet</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>Restriction for admin data source queries. </p></td>
+ <td><p>The sheet containing the SQL statement.
+Format: projects/{project}/sheets/{sheet} </p></td>
</tr>
<tr>
- <td>disallow_ddl</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>Disallow running DDL statements in the SQL editor. </p></td>
- </tr>
-
- <tr>
- <td>disallow_dml</td>
- <td><a href="#bool">bool</a></td>
+ <td>source</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>Disallow running DML statements in the SQL editor. </p></td>
+ <td><p>The source of this change.
+Format: instances/{instance}/databases/{database}/changelogs/{changelog}
+If empty, the change is from raw SQL. </p></td>
</tr>
</tbody>
@@ -19147,8 +18237,8 @@ Database resource name: instances/instance-id/databases/database-name. </p></td>
- <h3 id="bytebase.v1.DeletePolicyRequest">DeletePolicyRequest</h3>
- <p></p>
+ <h3 id="bytebase.v1.CreateChangelistRequest">CreateChangelistRequest</h3>
+ <p>Request message for creating a changelist.</p>
<table class="field-table">
@@ -19158,15 +18248,29 @@ Database resource name: instances/instance-id/databases/database-name. </p></td>
<tbody>
<tr>
- <td>name</td>
+ <td>parent</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The policy&#39;s `name` field is used to identify the instance to update.
-Format: {resource name}/policies/{policy type}
-Workspace resource name: &#34;&#34;.
-Environment resource name: environments/environment-id.
-Instance resource name: instances/instance-id.
-Database resource name: instances/instance-id/databases/database-name. </p></td>
+ <td><p>The parent resource where this changelist will be created.
+Format: projects/{project} </p></td>
+ </tr>
+
+ <tr>
+ <td>changelist</td>
+ <td><a href="#bytebase.v1.Changelist">Changelist</a></td>
+ <td></td>
+ <td><p>The changelist to create. </p></td>
+ </tr>
+
+ <tr>
+ <td>changelist_id</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The ID to use for the changelist, which will become the final component of
+the changelist&#39;s resource name.
+
+This value should be 4-63 characters, and valid characters
+are /[a-z][0-9]-/. </p></td>
</tr>
</tbody>
@@ -19176,8 +18280,8 @@ Database resource name: instances/instance-id/databases/database-name. </p></td>
- <h3 id="bytebase.v1.GetPolicyRequest">GetPolicyRequest</h3>
- <p></p>
+ <h3 id="bytebase.v1.DeleteChangelistRequest">DeleteChangelistRequest</h3>
+ <p>Request message for deleting a changelist.</p>
<table class="field-table">
@@ -19190,8 +18294,8 @@ Database resource name: instances/instance-id/databases/database-name. </p></td>
<td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The name of the policy to retrieve.
-Format: {resource type}/{resource id}/policies/{policy type} </p></td>
+ <td><p>The name of the changelist to delete.
+Format: projects/{project}/changelists/{changelist} </p></td>
</tr>
</tbody>
@@ -19201,8 +18305,8 @@ Format: {resource type}/{resource id}/policies/{policy type} </p></td>
- <h3 id="bytebase.v1.ListPoliciesRequest">ListPoliciesRequest</h3>
- <p></p>
+ <h3 id="bytebase.v1.GetChangelistRequest">GetChangelistRequest</h3>
+ <p>Request message for getting a changelist.</p>
<table class="field-table">
@@ -19212,25 +18316,11 @@ Format: {resource type}/{resource id}/policies/{policy type} </p></td>
<tbody>
<tr>
- <td>parent</td>
+ <td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The parent, which owns this collection of policies.
-Format: {resource type}/{resource id} </p></td>
- </tr>
-
- <tr>
- <td>policy_type</td>
- <td><a href="#bytebase.v1.PolicyType">PolicyType</a></td>
- <td>optional</td>
- <td><p>Filter by specific policy type. </p></td>
- </tr>
-
- <tr>
- <td>show_deleted</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>Show deleted policies if specified. </p></td>
+ <td><p>The name of the changelist to retrieve.
+Format: projects/{project}/changelists/{changelist} </p></td>
</tr>
</tbody>
@@ -19240,8 +18330,8 @@ Format: {resource type}/{resource id} </p></td>
- <h3 id="bytebase.v1.ListPoliciesResponse">ListPoliciesResponse</h3>
- <p></p>
+ <h3 id="bytebase.v1.ListChangelistsRequest">ListChangelistsRequest</h3>
+ <p>Request message for listing changelists.</p>
<table class="field-table">
@@ -19251,10 +18341,11 @@ Format: {resource type}/{resource id} </p></td>
<tbody>
<tr>
- <td>policies</td>
- <td><a href="#bytebase.v1.Policy">Policy</a></td>
- <td>repeated</td>
- <td><p>The policies from the specified request. </p></td>
+ <td>parent</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The parent, which owns this collection of changelists.
+Format: projects/{project} </p></td>
</tr>
</tbody>
@@ -19264,8 +18355,8 @@ Format: {resource type}/{resource id} </p></td>
- <h3 id="bytebase.v1.MaskingExceptionPolicy">MaskingExceptionPolicy</h3>
- <p>MaskingExceptionPolicy is the allowlist of users who can access sensitive data.</p>
+ <h3 id="bytebase.v1.ListChangelistsResponse">ListChangelistsResponse</h3>
+ <p>Response message for listing changelists.</p>
<table class="field-table">
@@ -19275,10 +18366,10 @@ Format: {resource type}/{resource id} </p></td>
<tbody>
<tr>
- <td>masking_exceptions</td>
- <td><a href="#bytebase.v1.MaskingExceptionPolicy.MaskingException">MaskingExceptionPolicy.MaskingException</a></td>
+ <td>changelists</td>
+ <td><a href="#bytebase.v1.Changelist">Changelist</a></td>
<td>repeated</td>
- <td><p>The list of masking exceptions. </p></td>
+ <td><p>The changelists from the specified request. </p></td>
</tr>
</tbody>
@@ -19288,8 +18379,8 @@ Format: {resource type}/{resource id} </p></td>
- <h3 id="bytebase.v1.MaskingExceptionPolicy.MaskingException">MaskingExceptionPolicy.MaskingException</h3>
- <p>An exception allowing specific users to access masked data.</p>
+ <h3 id="bytebase.v1.UpdateChangelistRequest">UpdateChangelistRequest</h3>
+ <p>Request message for updating a changelist.</p>
<table class="field-table">
@@ -19299,42 +18390,28 @@ Format: {resource type}/{resource id} </p></td>
<tbody>
<tr>
- <td>action</td>
- <td><a href="#bytebase.v1.MaskingExceptionPolicy.MaskingException.Action">MaskingExceptionPolicy.MaskingException.Action</a></td>
+ <td>changelist</td>
+ <td><a href="#bytebase.v1.Changelist">Changelist</a></td>
<td></td>
- <td><p>The action that the user can perform on sensitive data. </p></td>
+ <td><p>The changelist to update.
+
+The changelist&#39;s `name` field is used to identify the changelist to update.
+Format: projects/{project}/changelists/{changelist} </p></td>
</tr>
<tr>
- <td>member</td>
- <td><a href="#string">string</a></td>
+ <td>update_mask</td>
+ <td><a href="#google.protobuf.FieldMask">google.protobuf.FieldMask</a></td>
<td></td>
- <td><p>Member is the principal who bind to this exception policy instance.
-
-- `user:{email}`: An email address that represents a specific Bytebase account. For example, `[email protected]`.
-- `group:{email}`: An email address for group. </p></td>
+ <td><p>The list of fields to be updated. </p></td>
</tr>
<tr>
- <td>condition</td>
- <td><a href="#google.type.Expr">google.type.Expr</a></td>
+ <td>allow_missing</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p>The condition that is associated with this exception policy instance.
-The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
-If the condition is empty, means the user can access all databases without expiration.
-
-Support variables:
-resource.instance_id: the instance resource id. Only support &#34;==&#34; operation.
-resource.database_name: the database name. Only support &#34;==&#34; operation.
-resource.schema_name: the schema name. Only support &#34;==&#34; operation.
-resource.table_name: the table name. Only support &#34;==&#34; operation.
-resource.column_name: the column name. Only support &#34;==&#34; operation.
-request.time: the expiration. Only support &#34;&lt;&#34; operation in `request.time &lt; timestamp(&#34;{ISO datetime string format}&#34;)`
-All variables should join with &#34;&amp;&amp;&#34; condition.
-
-For example:
-resource.instance_id == &#34;local&#34; &amp;&amp; resource.database_name == &#34;employee&#34; &amp;&amp; request.time &lt; timestamp(&#34;2025-04-30T11:10:39.000Z&#34;)
-resource.instance_id == &#34;local&#34; &amp;&amp; resource.database_name == &#34;employee&#34; </p></td>
+ <td><p>If set to true, and the changelist is not found, a new changelist will be created.
+In this situation, `update_mask` is ignored. </p></td>
</tr>
</tbody>
@@ -19344,92 +18421,143 @@ resource.instance_id == &#34;local&#34; &amp;&amp; resource.database_name == &#3
- <h3 id="bytebase.v1.MaskingRulePolicy">MaskingRulePolicy</h3>
- <p>Policy for configuring data masking rules.</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.MaskingRulePolicy.MaskingRule">MaskingRulePolicy.MaskingRule</a></td>
- <td>repeated</td>
- <td><p>The list of masking rules. </p></td>
- </tr>
-
- </tbody>
- </table>
+
-
+
-
- <h3 id="bytebase.v1.MaskingRulePolicy.MaskingRule">MaskingRulePolicy.MaskingRule</h3>
- <p>A rule that defines when and how to mask data.</p>
+ <h3 id="bytebase.v1.ChangelistService">ChangelistService</h3>
+ <p>ChangelistService manages changelists for grouping and organizing 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>CreateChangelist</td>
+ <td><a href="#bytebase.v1.CreateChangelistRequest">CreateChangelistRequest</a></td>
+ <td><a href="#bytebase.v1.Changelist">Changelist</a></td>
+ <td><p>Creates a new changelist in a project.
+Permissions required: bb.changelists.create</p></td>
+ </tr>
+
+ <tr>
+ <td>GetChangelist</td>
+ <td><a href="#bytebase.v1.GetChangelistRequest">GetChangelistRequest</a></td>
+ <td><a href="#bytebase.v1.Changelist">Changelist</a></td>
+ <td><p>Gets a changelist by name.
+Permissions required: bb.changelists.get</p></td>
+ </tr>
+
+ <tr>
+ <td>ListChangelists</td>
+ <td><a href="#bytebase.v1.ListChangelistsRequest">ListChangelistsRequest</a></td>
+ <td><a href="#bytebase.v1.ListChangelistsResponse">ListChangelistsResponse</a></td>
+ <td><p>Lists changelists in a project.
+Permissions required: bb.changelists.list</p></td>
+ </tr>
+
+ <tr>
+ <td>UpdateChangelist</td>
+ <td><a href="#bytebase.v1.UpdateChangelistRequest">UpdateChangelistRequest</a></td>
+ <td><a href="#bytebase.v1.Changelist">Changelist</a></td>
+ <td><p>Updates a changelist.
+Permissions required: bb.changelists.update
+When allow_missing=true, also requires: bb.changelists.create</p></td>
+ </tr>
+
+ <tr>
+ <td>DeleteChangelist</td>
+ <td><a href="#bytebase.v1.DeleteChangelistRequest">DeleteChangelistRequest</a></td>
+ <td><a href="#google.protobuf.Empty">.google.protobuf.Empty</a></td>
+ <td><p>Deletes a changelist.
+Permissions required: bb.changelists.delete</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>id</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>A unique identifier for the rule in UUID format. </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 masking rule.
-The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
-
-Support variables:
-resource.environment_id: the environment resource id.
-resource.project_id: the project resource id.
-resource.instance_id: the instance resource id.
-resource.database_name: the database name.
-resource.table_name: the table name.
-resource.column_name: the column name.
-resource.classification_level: the classification level.
-
-Each variable support following operations:
-==: the value equals the target.
-!=: the value not equals the target.
-in: the value matches one of the targets.
-!(in): the value not matches any of the targets.
-
-For example:
-resource.environment_id == &#34;test&#34; &amp;&amp; resource.project_id == &#34;sample-project&#34;
-resource.instance_id == &#34;sample-instance&#34; &amp;&amp; resource.database_name == &#34;employee&#34; &amp;&amp; resource.table_name in [&#34;table1&#34;, &#34;table2&#34;]
-resource.environment_id != &#34;test&#34; || !(resource.project_id in [&#34;poject1&#34;, &#34;prject2&#34;])
-resource.instance_id == &#34;sample-instance&#34; &amp;&amp; (resource.database_name == &#34;db1&#34; || resource.database_name == &#34;db2&#34;) </p></td>
- </tr>
+ <tr>
+ <td>CreateChangelist</td>
+ <td>POST</td>
+ <td>/v1/{parent=projects/*}/changelists</td>
+ <td>changelist</td>
+ </tr>
- <tr>
- <td>semantic_type</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The semantic type of data to mask (e.g., &#34;SSN&#34;, &#34;EMAIL&#34;). </p></td>
- </tr>
+
+
+
+ <tr>
+ <td>GetChangelist</td>
+ <td>GET</td>
+ <td>/v1/{name=projects/*/changelists/*}</td>
+ <td></td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>ListChangelists</td>
+ <td>GET</td>
+ <td>/v1/{parent=projects/*}/changelists</td>
+ <td></td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>UpdateChangelist</td>
+ <td>PATCH</td>
+ <td>/v1/{changelist.name=projects/*/changelists/*}</td>
+ <td>changelist</td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>DeleteChangelist</td>
+ <td>DELETE</td>
+ <td>/v1/{name=projects/*/changelists/*}</td>
+ <td></td>
+ </tr>
+
</tbody>
</table>
-
-
+
- <h3 id="bytebase.v1.Policy">Policy</h3>
- <p></p>
+ <div class="file-heading">
+ <h2 id="v1/database_group_service.proto">v1/database_group_service.proto</h2><a href="#title">Top</a>
+ </div>
+ <p></p>
+
+
+ <h3 id="bytebase.v1.CreateDatabaseGroupRequest">CreateDatabaseGroupRequest</h3>
+ <p>Request message for creating a database group.</p>
<table class="field-table">
@@ -19439,85 +18567,36 @@ resource.instance_id == &#34;sample-instance&#34; &amp;&amp; (resource.database_
<tbody>
<tr>
- <td>name</td>
+ <td>parent</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The name of the policy.
-Format: {resource name}/policies/{policy type}
-Workspace resource name: &#34;&#34;.
-Environment resource name: environments/environment-id.
-Instance resource name: instances/instance-id.
-Database resource name: instances/instance-id/databases/database-name. </p></td>
- </tr>
-
- <tr>
- <td>inherit_from_parent</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>Whether this policy inherits from its parent resource. </p></td>
- </tr>
-
- <tr>
- <td>type</td>
- <td><a href="#bytebase.v1.PolicyType">PolicyType</a></td>
- <td></td>
- <td><p>The type of policy. </p></td>
- </tr>
-
- <tr>
- <td>rollout_policy</td>
- <td><a href="#bytebase.v1.RolloutPolicy">RolloutPolicy</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>masking_rule_policy</td>
- <td><a href="#bytebase.v1.MaskingRulePolicy">MaskingRulePolicy</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>masking_exception_policy</td>
- <td><a href="#bytebase.v1.MaskingExceptionPolicy">MaskingExceptionPolicy</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>tag_policy</td>
- <td><a href="#bytebase.v1.TagPolicy">TagPolicy</a></td>
- <td></td>
- <td><p> </p></td>
+ <td><p>The parent resource where this database group will be created.
+Format: projects/{project} </p></td>
</tr>
<tr>
- <td>data_source_query_policy</td>
- <td><a href="#bytebase.v1.DataSourceQueryPolicy">DataSourceQueryPolicy</a></td>
+ <td>database_group</td>
+ <td><a href="#bytebase.v1.DatabaseGroup">DatabaseGroup</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The database group to create. </p></td>
</tr>
<tr>
- <td>query_data_policy</td>
- <td><a href="#bytebase.v1.QueryDataPolicy">QueryDataPolicy</a></td>
+ <td>database_group_id</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The ID to use for the database group, which will become the final component of
+the database group&#39;s resource name.
+
+This value should be 4-63 characters, and valid characters
+are /[a-z][0-9]-/. </p></td>
</tr>
<tr>
- <td>enforce</td>
+ <td>validate_only</td>
<td><a href="#bool">bool</a></td>
<td></td>
- <td><p>Whether the policy is enforced. </p></td>
- </tr>
-
- <tr>
- <td>resource_type</td>
- <td><a href="#bytebase.v1.PolicyResourceType">PolicyResourceType</a></td>
- <td></td>
- <td><p>The resource type for the policy. </p></td>
+ <td><p>If set, validate the create request and preview the full database group response, but do not actually create it. </p></td>
</tr>
</tbody>
@@ -19527,8 +18606,8 @@ Database resource name: instances/instance-id/databases/database-name. </p></td>
- <h3 id="bytebase.v1.QueryDataPolicy">QueryDataPolicy</h3>
- <p>QueryDataPolicy is the policy configuration for querying data.</p>
+ <h3 id="bytebase.v1.DatabaseGroup">DatabaseGroup</h3>
+ <p>A group of databases matched by expressions.</p>
<table class="field-table">
@@ -19538,40 +18617,44 @@ Database resource name: instances/instance-id/databases/database-name. </p></td>
<tbody>
<tr>
- <td>timeout</td>
- <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>
- <td></td>
- <td><p>The query timeout duration. </p></td>
- </tr>
-
- <tr>
- <td>disable_export</td>
- <td><a href="#bool">bool</a></td>
+ <td>name</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>Disable data export in the SQL editor. </p></td>
+ <td><p>The name of the database group.
+Format: projects/{project}/databaseGroups/{databaseGroup} </p></td>
</tr>
<tr>
- <td>maximum_result_size</td>
- <td><a href="#int64">int64</a></td>
+ <td>title</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>The maximum result size limit in bytes.
-The default value is 100MB, we will use the default value if the setting not exists, or the limit &lt;= 0. </p></td>
+ <td><p>The short name used in actual databases specified by users. </p></td>
</tr>
<tr>
- <td>maximum_result_rows</td>
- <td><a href="#int32">int32</a></td>
+ <td>database_expr</td>
+ <td><a href="#google.type.Expr">google.type.Expr</a></td>
<td></td>
- <td><p>The maximum number of rows to return.
-The default value is -1, means no limit. </p></td>
+ <td><p>The condition that is associated with this database group.
+The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
+
+Support variables:
+resource.environment_id: the environment resource id. Support &#34;==&#34;, &#34;!=&#34;, &#34;in [XX]&#34;, &#34;!(in [xx])&#34; operations.
+resource.instance_id: the instance resource id. Support &#34;==&#34;, &#34;!=&#34;, &#34;in [XX]&#34;, &#34;!(in [xx])&#34;, &#34;contains&#34;, &#34;matches&#34;, &#34;startsWith&#34;, &#34;endsWith&#34; operations.
+resource.database_name: the database name. Support &#34;==&#34;, &#34;!=&#34;, &#34;in [XX]&#34;, &#34;!(in [xx])&#34;, &#34;contains&#34;, &#34;matches&#34;, &#34;startsWith&#34;, &#34;endsWith&#34; operations.
+resource.database_labels: the database labels. Support map access operations.
+All variables should join with &#34;&amp;&amp;&#34; condition.
+
+For example:
+resource.environment_id == &#34;test&#34; &amp;&amp; resource.database_name.startsWith(&#34;sample_&#34;)
+resource.database_labels[&#34;tenant&#34;] == &#34;tenant1&#34; </p></td>
</tr>
<tr>
- <td>disable_copy_data</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>Disable copying query results. </p></td>
+ <td>matched_databases</td>
+ <td><a href="#bytebase.v1.DatabaseGroup.Database">DatabaseGroup.Database</a></td>
+ <td>repeated</td>
+ <td><p>The list of databases that match the database group condition. </p></td>
</tr>
</tbody>
@@ -19581,8 +18664,8 @@ The default value is -1, means no limit. </p></td>
- <h3 id="bytebase.v1.RolloutPolicy">RolloutPolicy</h3>
- <p>Rollout policy configuration.</p>
+ <h3 id="bytebase.v1.DatabaseGroup.Database">DatabaseGroup.Database</h3>
+ <p>A database within a database group.</p>
<table class="field-table">
@@ -19592,25 +18675,11 @@ The default value is -1, means no limit. </p></td>
<tbody>
<tr>
- <td>automatic</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>Whether rollout is automatic without manual approval. </p></td>
- </tr>
-
- <tr>
- <td>roles</td>
+ <td>name</td>
<td><a href="#string">string</a></td>
- <td>repeated</td>
- <td><p>The roles that can approve rollout execution. </p></td>
- </tr>
-
- <tr>
- <td>checkers</td>
- <td><a href="#bytebase.v1.RolloutPolicy.Checkers">RolloutPolicy.Checkers</a></td>
<td></td>
- <td><p>Checkers that must pass before rollout execution.
-These checks are performed in UI workflows only. </p></td>
+ <td><p>The resource name of the database.
+Format: instances/{instance}/databases/{database} </p></td>
</tr>
</tbody>
@@ -19620,8 +18689,8 @@ These checks are performed in UI workflows only. </p></td>
- <h3 id="bytebase.v1.RolloutPolicy.Checkers">RolloutPolicy.Checkers</h3>
- <p></p>
+ <h3 id="bytebase.v1.DeleteDatabaseGroupRequest">DeleteDatabaseGroupRequest</h3>
+ <p>Request message for deleting a database group.</p>
<table class="field-table">
@@ -19631,17 +18700,11 @@ These checks are performed in UI workflows only. </p></td>
<tbody>
<tr>
- <td>required_issue_approval</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>Whether issue approval is required before proceeding with rollout. </p></td>
- </tr>
-
- <tr>
- <td>required_status_checks</td>
- <td><a href="#bytebase.v1.RolloutPolicy.Checkers.RequiredStatusChecks">RolloutPolicy.Checkers.RequiredStatusChecks</a></td>
+ <td>name</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>Status checks that must pass before rollout can be executed. </p></td>
+ <td><p>The name of the database group to delete.
+Format: projects/{project}/databaseGroups/{databaseGroup} </p></td>
</tr>
</tbody>
@@ -19651,8 +18714,8 @@ These checks are performed in UI workflows only. </p></td>
- <h3 id="bytebase.v1.RolloutPolicy.Checkers.RequiredStatusChecks">RolloutPolicy.Checkers.RequiredStatusChecks</h3>
- <p></p>
+ <h3 id="bytebase.v1.GetDatabaseGroupRequest">GetDatabaseGroupRequest</h3>
+ <p>Request message for getting a database group.</p>
<table class="field-table">
@@ -19662,10 +18725,18 @@ These checks are performed in UI workflows only. </p></td>
<tbody>
<tr>
- <td>plan_check_enforcement</td>
- <td><a href="#bytebase.v1.RolloutPolicy.Checkers.PlanCheckEnforcement">RolloutPolicy.Checkers.PlanCheckEnforcement</a></td>
+ <td>name</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>Enforcement level for plan check results during rollout validation. </p></td>
+ <td><p>The name of the database group to retrieve.
+Format: projects/{project}/databaseGroups/{databaseGroup} </p></td>
+ </tr>
+
+ <tr>
+ <td>view</td>
+ <td><a href="#bytebase.v1.DatabaseGroupView">DatabaseGroupView</a></td>
+ <td></td>
+ <td><p>The view to return. Defaults to DATABASE_GROUP_VIEW_BASIC. </p></td>
</tr>
</tbody>
@@ -19675,8 +18746,8 @@ These checks are performed in UI workflows only. </p></td>
- <h3 id="bytebase.v1.SQLReviewRule">SQLReviewRule</h3>
- <p>SQL review rule configuration. Check the SQL_REVIEW_RULES_DOCUMENTATION.md for details.</p>
+ <h3 id="bytebase.v1.ListDatabaseGroupsRequest">ListDatabaseGroupsRequest</h3>
+ <p>Request message for listing database groups.</p>
<table class="field-table">
@@ -19686,38 +18757,18 @@ These checks are performed in UI workflows only. </p></td>
<tbody>
<tr>
- <td>type</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The type of SQL review rule. </p></td>
- </tr>
-
- <tr>
- <td>level</td>
- <td><a href="#bytebase.v1.SQLReviewRuleLevel">SQLReviewRuleLevel</a></td>
- <td></td>
- <td><p>The severity level of the rule. </p></td>
- </tr>
-
- <tr>
- <td>payload</td>
+ <td>parent</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The payload is a JSON string that varies by rule type. </p></td>
- </tr>
-
- <tr>
- <td>engine</td>
- <td><a href="#bytebase.v1.Engine">Engine</a></td>
- <td></td>
- <td><p>The database engine this rule applies to. </p></td>
+ <td><p>The parent resource whose database groups are to be listed.
+Format: projects/{project} </p></td>
</tr>
<tr>
- <td>comment</td>
- <td><a href="#string">string</a></td>
+ <td>view</td>
+ <td><a href="#bytebase.v1.DatabaseGroupView">DatabaseGroupView</a></td>
<td></td>
- <td><p>Additional comment for the rule. </p></td>
+ <td><p>The view to return. Defaults to DATABASE_GROUP_VIEW_BASIC. </p></td>
</tr>
</tbody>
@@ -19727,8 +18778,8 @@ These checks are performed in UI workflows only. </p></td>
- <h3 id="bytebase.v1.TagPolicy">TagPolicy</h3>
- <p>Policy for tagging resources with metadata.</p>
+ <h3 id="bytebase.v1.ListDatabaseGroupsResponse">ListDatabaseGroupsResponse</h3>
+ <p>Response message for listing database groups.</p>
<table class="field-table">
@@ -19738,42 +18789,10 @@ These checks are performed in UI workflows only. </p></td>
<tbody>
<tr>
- <td>tags</td>
- <td><a href="#bytebase.v1.TagPolicy.TagsEntry">TagPolicy.TagsEntry</a></td>
+ <td>database_groups</td>
+ <td><a href="#bytebase.v1.DatabaseGroup">DatabaseGroup</a></td>
<td>repeated</td>
- <td><p>tags is the key - value map for resources.
-for example, the environment resource can have the sql review config tag, like &#34;bb.tag.review_config&#34;: &#34;reviewConfigs/{review config resource id}&#34; </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.TagPolicy.TagsEntry">TagPolicy.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><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>
+ <td><p>The database groups from the specified request. </p></td>
</tr>
</tbody>
@@ -19783,8 +18802,8 @@ for example, the environment resource can have the sql review config tag, like &
- <h3 id="bytebase.v1.UpdatePolicyRequest">UpdatePolicyRequest</h3>
- <p></p>
+ <h3 id="bytebase.v1.UpdateDatabaseGroupRequest">UpdateDatabaseGroupRequest</h3>
+ <p>Request message for updating a database group.</p>
<table class="field-table">
@@ -19794,17 +18813,13 @@ for example, the environment resource can have the sql review config tag, like &
<tbody>
<tr>
- <td>policy</td>
- <td><a href="#bytebase.v1.Policy">Policy</a></td>
+ <td>database_group</td>
+ <td><a href="#bytebase.v1.DatabaseGroup">DatabaseGroup</a></td>
<td></td>
- <td><p>The policy to update.
+ <td><p>The database group to update.
-The policy&#39;s `name` field is used to identify the instance to update.
-Format: {resource name}/policies/{policy type}
-Workspace resource name: &#34;&#34;.
-Environment resource name: environments/environment-id.
-Instance resource name: instances/instance-id.
-Database resource name: instances/instance-id/databases/database-name. </p></td>
+The database group&#39;s `name` field is used to identify the database group to update.
+Format: projects/{project}/databaseGroups/{databaseGroup} </p></td>
</tr>
<tr>
@@ -19818,7 +18833,7 @@ Database resource name: instances/instance-id/databases/database-name. </p></td>
<td>allow_missing</td>
<td><a href="#bool">bool</a></td>
<td></td>
- <td><p>If set to true, and the policy is not found, a new policy will be created.
+ <td><p>If set to true, and the database group is not found, a new database group will be created.
In this situation, `update_mask` is ignored. </p></td>
</tr>
@@ -19831,8 +18846,8 @@ In this situation, `update_mask` is ignored. </p></td>
- <h3 id="bytebase.v1.DataSourceQueryPolicy.Restriction">DataSourceQueryPolicy.Restriction</h3>
- <p>Restriction level for admin data source access.</p>
+ <h3 id="bytebase.v1.DatabaseGroupView">DatabaseGroupView</h3>
+ <p>View options for database group responses.</p>
<table class="enum-table">
<thead>
<tr><td>Name</td><td>Number</td><td>Description</td></tr>
@@ -19840,474 +18855,1016 @@ In this situation, `update_mask` is ignored. </p></td>
<tbody>
<tr>
- <td>RESTRICTION_UNSPECIFIED</td>
+ <td>DATABASE_GROUP_VIEW_UNSPECIFIED</td>
<td>0</td>
- <td><p>Unspecified restriction.</p></td>
+ <td><p>The default / unset value.
+The API will default to the BASIC view.</p></td>
</tr>
<tr>
- <td>FALLBACK</td>
+ <td>DATABASE_GROUP_VIEW_BASIC</td>
<td>1</td>
- <td><p>Allow querying admin data sources when there is no read-only data source.</p></td>
+ <td><p>Include basic information about the database group, but exclude the list of matched databases and unmatched databases.</p></td>
</tr>
<tr>
- <td>DISALLOW</td>
+ <td>DATABASE_GROUP_VIEW_FULL</td>
<td>2</td>
- <td><p>Disallow querying admin data sources.</p></td>
+ <td><p>Include everything.</p></td>
</tr>
</tbody>
</table>
- <h3 id="bytebase.v1.MaskingExceptionPolicy.MaskingException.Action">MaskingExceptionPolicy.MaskingException.Action</h3>
- <p>The action that the exception permits.</p>
+
+
+
+
+ <h3 id="bytebase.v1.DatabaseGroupService">DatabaseGroupService</h3>
+ <p>DatabaseGroupService manages database groups for organizing databases by criteria.</p>
<table class="enum-table">
<thead>
- <tr><td>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>ACTION_UNSPECIFIED</td>
- <td>0</td>
- <td><p>Unspecified action.</p></td>
- </tr>
-
- <tr>
- <td>QUERY</td>
- <td>1</td>
- <td><p>Allow querying sensitive data.</p></td>
- </tr>
-
- <tr>
- <td>EXPORT</td>
- <td>2</td>
- <td><p>Allow exporting sensitive data.</p></td>
+ <td>ListDatabaseGroups</td>
+ <td><a href="#bytebase.v1.ListDatabaseGroupsRequest">ListDatabaseGroupsRequest</a></td>
+ <td><a href="#bytebase.v1.ListDatabaseGroupsResponse">ListDatabaseGroupsResponse</a></td>
+ <td><p>Lists database groups in a project.
+Permissions required: bb.projects.get</p></td>
</tr>
- </tbody>
- </table>
-
- <h3 id="bytebase.v1.PolicyResourceType">PolicyResourceType</h3>
- <p>The resource type that a policy can be attached to.</p>
- <table class="enum-table">
- <thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
- </thead>
- <tbody>
-
<tr>
- <td>RESOURCE_TYPE_UNSPECIFIED</td>
- <td>0</td>
- <td><p>Unspecified resource type.</p></td>
+ <td>GetDatabaseGroup</td>
+ <td><a href="#bytebase.v1.GetDatabaseGroupRequest">GetDatabaseGroupRequest</a></td>
+ <td><a href="#bytebase.v1.DatabaseGroup">DatabaseGroup</a></td>
+ <td><p>Gets a database group by name.
+Permissions required: bb.projects.get</p></td>
</tr>
<tr>
- <td>WORKSPACE</td>
- <td>1</td>
- <td><p>Workspace-level policy.</p></td>
+ <td>CreateDatabaseGroup</td>
+ <td><a href="#bytebase.v1.CreateDatabaseGroupRequest">CreateDatabaseGroupRequest</a></td>
+ <td><a href="#bytebase.v1.DatabaseGroup">DatabaseGroup</a></td>
+ <td><p>Creates a new database group.
+Permissions required: bb.projects.update</p></td>
</tr>
<tr>
- <td>ENVIRONMENT</td>
- <td>2</td>
- <td><p>Environment-level policy.</p></td>
+ <td>UpdateDatabaseGroup</td>
+ <td><a href="#bytebase.v1.UpdateDatabaseGroupRequest">UpdateDatabaseGroupRequest</a></td>
+ <td><a href="#bytebase.v1.DatabaseGroup">DatabaseGroup</a></td>
+ <td><p>Updates a database group.
+Permissions required: bb.projects.update
+When allow_missing=true, also requires: bb.projects.update</p></td>
</tr>
<tr>
- <td>PROJECT</td>
- <td>3</td>
- <td><p>Project-level policy.</p></td>
+ <td>DeleteDatabaseGroup</td>
+ <td><a href="#bytebase.v1.DeleteDatabaseGroupRequest">DeleteDatabaseGroupRequest</a></td>
+ <td><a href="#google.protobuf.Empty">.google.protobuf.Empty</a></td>
+ <td><p>Deletes a database group.
+Permissions required: bb.projects.update</p></td>
</tr>
</tbody>
</table>
-
- <h3 id="bytebase.v1.PolicyType">PolicyType</h3>
- <p>The type of organizational policy.</p>
- <table class="enum-table">
- <thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
- </thead>
- <tbody>
-
+
+
+
+
+ <h4>Methods with HTTP bindings</h4>
+ <table>
+ <thead>
<tr>
- <td>POLICY_TYPE_UNSPECIFIED</td>
- <td>0</td>
- <td><p>Unspecified policy type.</p></td>
+ <td>Method Name</td>
+ <td>Method</td>
+ <td>Pattern</td>
+ <td>Body</td>
</tr>
+ </thead>
+ <tbody>
+
+
<tr>
- <td>ROLLOUT_POLICY</td>
- <td>11</td>
- <td><p>Rollout deployment policy.</p></td>
+ <td>ListDatabaseGroups</td>
+ <td>GET</td>
+ <td>/v1/{parent=projects/*}/databaseGroups</td>
+ <td></td>
</tr>
+
+
+
<tr>
- <td>MASKING_RULE</td>
- <td>9</td>
- <td><p>Data masking rule policy.</p></td>
+ <td>GetDatabaseGroup</td>
+ <td>GET</td>
+ <td>/v1/{name=projects/*/databaseGroups/*}</td>
+ <td></td>
</tr>
+
+
+
<tr>
- <td>MASKING_EXCEPTION</td>
- <td>10</td>
- <td><p>Data masking exception policy.</p></td>
+ <td>CreateDatabaseGroup</td>
+ <td>POST</td>
+ <td>/v1/{parent=projects/*}/databaseGroups</td>
+ <td>database_group</td>
</tr>
+
+
+
<tr>
- <td>TAG</td>
- <td>13</td>
- <td><p>Resource tag policy.</p></td>
- </tr>
-
- <tr>
- <td>DATA_SOURCE_QUERY</td>
- <td>14</td>
- <td><p>Data source query restrictions policy.</p></td>
- </tr>
-
- <tr>
- <td>DATA_QUERY</td>
- <td>16</td>
- <td><p>Query data access policy.</p></td>
- </tr>
-
- </tbody>
- </table>
-
- <h3 id="bytebase.v1.RolloutPolicy.Checkers.PlanCheckEnforcement">RolloutPolicy.Checkers.PlanCheckEnforcement</h3>
- <p></p>
- <table class="enum-table">
- <thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>PLAN_CHECK_ENFORCEMENT_UNSPECIFIED</td>
- <td>0</td>
- <td><p>Allow rollout regardless of plan check results (no enforcement).</p></td>
- </tr>
-
- <tr>
- <td>ERROR_ONLY</td>
- <td>1</td>
- <td><p>Block rollout only when plan check finds errors.</p></td>
- </tr>
-
- <tr>
- <td>STRICT</td>
- <td>2</td>
- <td><p>Block rollout when plan check finds errors or warnings.</p></td>
- </tr>
-
- </tbody>
- </table>
-
- <h3 id="bytebase.v1.SQLReviewRuleLevel">SQLReviewRuleLevel</h3>
- <p>The severity level for SQL review rules.</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 level.</p></td>
- </tr>
-
- <tr>
- <td>ERROR</td>
- <td>1</td>
- <td><p>Rule violation is an error.</p></td>
+ <td>UpdateDatabaseGroup</td>
+ <td>PATCH</td>
+ <td>/v1/{database_group.name=projects/*/databaseGroups/*}</td>
+ <td>database_group</td>
</tr>
+
+
+
<tr>
- <td>WARNING</td>
- <td>2</td>
- <td><p>Rule violation is a warning.</p></td>
+ <td>DeleteDatabaseGroup</td>
+ <td>DELETE</td>
+ <td>/v1/{name=projects/*/databaseGroups/*}</td>
+ <td></td>
</tr>
+
- </tbody>
- </table>
+ </tbody>
+ </table>
+
+
+
+ <div class="file-heading">
+ <h2 id="v1/group_service.proto">v1/group_service.proto</h2><a href="#title">Top</a>
+ </div>
+ <p></p>
+ <h3 id="bytebase.v1.BatchGetGroupsRequest">BatchGetGroupsRequest</h3>
+ <p>Request message for batch getting groups.</p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>names</td>
+ <td><a href="#string">string</a></td>
+ <td>repeated</td>
+ <td><p>The group names to retrieve.
+Format: groups/{email} </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
- <h3 id="bytebase.v1.OrgPolicyService">OrgPolicyService</h3>
- <p>OrgPolicyService manages organizational policies at various resource levels.</p>
- <table class="enum-table">
- <thead>
- <tr><td>Method Name</td><td>Request Type</td><td>Response Type</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>GetPolicy</td>
- <td><a href="#bytebase.v1.GetPolicyRequest">GetPolicyRequest</a></td>
- <td><a href="#bytebase.v1.Policy">Policy</a></td>
- <td><p>Retrieves a policy by name.
-Permissions required: bb.policies.get</p></td>
- </tr>
-
- <tr>
- <td>ListPolicies</td>
- <td><a href="#bytebase.v1.ListPoliciesRequest">ListPoliciesRequest</a></td>
- <td><a href="#bytebase.v1.ListPoliciesResponse">ListPoliciesResponse</a></td>
- <td><p>Lists policies at a specified resource level.
-Permissions required: bb.policies.list</p></td>
- </tr>
-
- <tr>
- <td>CreatePolicy</td>
- <td><a href="#bytebase.v1.CreatePolicyRequest">CreatePolicyRequest</a></td>
- <td><a href="#bytebase.v1.Policy">Policy</a></td>
- <td><p>Creates a new organizational policy.
-Permissions required: bb.policies.create</p></td>
- </tr>
-
- <tr>
- <td>UpdatePolicy</td>
- <td><a href="#bytebase.v1.UpdatePolicyRequest">UpdatePolicyRequest</a></td>
- <td><a href="#bytebase.v1.Policy">Policy</a></td>
- <td><p>Updates an existing organizational policy.
-Permissions required: bb.policies.update</p></td>
- </tr>
-
- <tr>
- <td>DeletePolicy</td>
- <td><a href="#bytebase.v1.DeletePolicyRequest">DeletePolicyRequest</a></td>
- <td><a href="#google.protobuf.Empty">.google.protobuf.Empty</a></td>
- <td><p>Deletes an organizational policy.
-Permissions required: bb.policies.delete</p></td>
- </tr>
-
- </tbody>
- </table>
+ <h3 id="bytebase.v1.BatchGetGroupsResponse">BatchGetGroupsResponse</h3>
+ <p>Response message for batch getting groups.</p>
-
-
- <h4>Methods with HTTP bindings</h4>
- <table>
+ <table class="field-table">
<thead>
- <tr>
- <td>Method Name</td>
- <td>Method</td>
- <td>Pattern</td>
- <td>Body</td>
- </tr>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
</thead>
<tbody>
-
+ <tr>
+ <td>groups</td>
+ <td><a href="#bytebase.v1.Group">Group</a></td>
+ <td>repeated</td>
+ <td><p>The groups from the specified request. </p></td>
+ </tr>
- <tr>
- <td>GetPolicy</td>
- <td>GET</td>
- <td>/v1/{name=policies/*}</td>
- <td></td>
- </tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.CreateGroupRequest">CreateGroupRequest</h3>
+ <p>Request message for creating a group.</p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
- <tr>
- <td>GetPolicy</td>
- <td>GET</td>
- <td>/v1/{name=projects/*/policies/*}</td>
- <td></td>
- </tr>
+ <tr>
+ <td>group</td>
+ <td><a href="#bytebase.v1.Group">Group</a></td>
+ <td></td>
+ <td><p>The group to create. </p></td>
+ </tr>
- <tr>
- <td>GetPolicy</td>
- <td>GET</td>
- <td>/v1/{name=environments/*/policies/*}</td>
- <td></td>
- </tr>
+ <tr>
+ <td>group_email</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The email to use for the group, which will become the final component
+of the group&#39;s resource name. </p></td>
+ </tr>
- <tr>
- <td>GetPolicy</td>
- <td>GET</td>
- <td>/v1/{name=instances/*/policies/*}</td>
- <td></td>
- </tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.DeleteGroupRequest">DeleteGroupRequest</h3>
+ <p>Request message for deleting a group.</p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>name</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The name of the group to delete.
+Format: groups/{email} </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.GetGroupRequest">GetGroupRequest</h3>
+ <p>Request message for getting a group.</p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>name</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The name of the group to retrieve.
+Format: groups/{email} </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.Group">Group</h3>
+ <p>A group of users within the workspace.</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 group to retrieve.
+Format: groups/{group}, group is an email. </p></td>
+ </tr>
+
+ <tr>
+ <td>title</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The display title of the group. </p></td>
+ </tr>
+
+ <tr>
+ <td>description</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The description of the group. </p></td>
+ </tr>
+
+ <tr>
+ <td>members</td>
+ <td><a href="#bytebase.v1.GroupMember">GroupMember</a></td>
+ <td>repeated</td>
+ <td><p>The members of the group. </p></td>
+ </tr>
+
+ <tr>
+ <td>source</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The source system where the group originated (e.g., Entra ID for SCIM sync). </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.GroupMember">GroupMember</h3>
+ <p>A member of a group with a role.</p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>member</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>Member is the principal who belong to this group.
+
+Format: users/[email protected] </p></td>
+ </tr>
+
+ <tr>
+ <td>role</td>
+ <td><a href="#bytebase.v1.GroupMember.Role">GroupMember.Role</a></td>
+ <td></td>
+ <td><p>The member&#39;s role in the group. </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.ListGroupsRequest">ListGroupsRequest</h3>
+ <p>Request message for listing groups.</p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>page_size</td>
+ <td><a href="#int32">int32</a></td>
+ <td></td>
+ <td><p>The maximum number of groups to return. The service may return fewer than
+this value.
+If unspecified, at most 10 groups will be returned.
+The maximum value is 1000; values above 1000 will be coerced to 1000. </p></td>
+ </tr>
+
+ <tr>
+ <td>page_token</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>A page token, received from a previous `ListGroups` call.
+Provide this to retrieve the subsequent page.
+
+When paginating, all other parameters provided to `ListGroups` must match
+the call that provided the page token. </p></td>
+ </tr>
+
+ <tr>
+ <td>filter</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>Filter is used to filter groups returned in the list.
+The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
+
+Supported filter:
+- title: the group title, support &#34;==&#34; and &#34;.matches()&#34; operator.
+- email: the group email, support &#34;==&#34; and &#34;.matches()&#34; operator.
+- project: the project full name in &#34;projects/{id}&#34; format, support &#34;==&#34; operator.
+
+For example:
+title == &#34;dba&#34;
+email == &#34;[email protected]&#34;
+title.matches(&#34;dba&#34;)
+email.matches(&#34;dba&#34;)
+project == &#34;projects/sample-project&#34;
+You can combine filter conditions like:
+title.matches(&#34;dba&#34;) || email.matches(&#34;dba&#34;) </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.ListGroupsResponse">ListGroupsResponse</h3>
+ <p>Response message for listing groups.</p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>groups</td>
+ <td><a href="#bytebase.v1.Group">Group</a></td>
+ <td>repeated</td>
+ <td><p>The groups from the specified request. </p></td>
+ </tr>
+
+ <tr>
+ <td>next_page_token</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>A token, which can be sent as `page_token` to retrieve the next page.
+If this field is omitted, there are no subsequent pages. </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.UpdateGroupRequest">UpdateGroupRequest</h3>
+ <p>Request message for updating a group.</p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>group</td>
+ <td><a href="#bytebase.v1.Group">Group</a></td>
+ <td></td>
+ <td><p>The group to update.
+
+The group&#39;s `name` field is used to identify the group to update.
+Format: groups/{email} </p></td>
+ </tr>
+
+ <tr>
+ <td>update_mask</td>
+ <td><a href="#google.protobuf.FieldMask">google.protobuf.FieldMask</a></td>
+ <td></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 group is not found, a new group will be created.
+In this situation, `update_mask` is ignored. </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
+
+
+
+ <h3 id="bytebase.v1.GroupMember.Role">GroupMember.Role</h3>
+ <p>The role of a group member.</p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
<tr>
- <td>GetPolicy</td>
+ <td>ROLE_UNSPECIFIED</td>
+ <td>0</td>
+ <td><p>Unspecified role.</p></td>
+ </tr>
+
+ <tr>
+ <td>OWNER</td>
+ <td>1</td>
+ <td><p>Group owner.</p></td>
+ </tr>
+
+ <tr>
+ <td>MEMBER</td>
+ <td>2</td>
+ <td><p>Group member.</p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.GroupService">GroupService</h3>
+ <p>GroupService manages user groups for organizing users and permissions.</p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Method Name</td><td>Request Type</td><td>Response Type</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>GetGroup</td>
+ <td><a href="#bytebase.v1.GetGroupRequest">GetGroupRequest</a></td>
+ <td><a href="#bytebase.v1.Group">Group</a></td>
+ <td><p>Gets a group by name.
+Permissions required: bb.groups.get</p></td>
+ </tr>
+
+ <tr>
+ <td>BatchGetGroups</td>
+ <td><a href="#bytebase.v1.BatchGetGroupsRequest">BatchGetGroupsRequest</a></td>
+ <td><a href="#bytebase.v1.BatchGetGroupsResponse">BatchGetGroupsResponse</a></td>
+ <td><p>Gets multiple groups in a single request.
+Permissions required: bb.groups.get</p></td>
+ </tr>
+
+ <tr>
+ <td>ListGroups</td>
+ <td><a href="#bytebase.v1.ListGroupsRequest">ListGroupsRequest</a></td>
+ <td><a href="#bytebase.v1.ListGroupsResponse">ListGroupsResponse</a></td>
+ <td><p>Lists all groups in the workspace.
+Permissions required: bb.groups.list</p></td>
+ </tr>
+
+ <tr>
+ <td>CreateGroup</td>
+ <td><a href="#bytebase.v1.CreateGroupRequest">CreateGroupRequest</a></td>
+ <td><a href="#bytebase.v1.Group">Group</a></td>
+ <td><p>Creates a new group.
+Permissions required: bb.groups.create</p></td>
+ </tr>
+
+ <tr>
+ <td>UpdateGroup</td>
+ <td><a href="#bytebase.v1.UpdateGroupRequest">UpdateGroupRequest</a></td>
+ <td><a href="#bytebase.v1.Group">Group</a></td>
+ <td><p>Updates a group. Group owners or users with bb.groups.update permission can update.
+Permissions required: bb.groups.update OR caller is group owner
+When allow_missing=true, also requires: bb.groups.create</p></td>
+ </tr>
+
+ <tr>
+ <td>DeleteGroup</td>
+ <td><a href="#bytebase.v1.DeleteGroupRequest">DeleteGroupRequest</a></td>
+ <td><a href="#google.protobuf.Empty">.google.protobuf.Empty</a></td>
+ <td><p>Deletes a group. Group owners or users with bb.groups.delete permission can delete.
+Permissions required: bb.groups.delete OR caller is group owner</p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
+ <h4>Methods with HTTP bindings</h4>
+ <table>
+ <thead>
+ <tr>
+ <td>Method Name</td>
+ <td>Method</td>
+ <td>Pattern</td>
+ <td>Body</td>
+ </tr>
+ </thead>
+ <tbody>
+
+
+
+ <tr>
+ <td>GetGroup</td>
<td>GET</td>
- <td>/v1/{name=instances/*/databases/*/policies/*}</td>
+ <td>/v1/{name=groups/*}</td>
+ <td></td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>BatchGetGroups</td>
+ <td>GET</td>
+ <td>/v1/groups:batchGet</td>
+ <td></td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>ListGroups</td>
+ <td>GET</td>
+ <td>/v1/groups</td>
<td></td>
</tr>
- <tr>
- <td>ListPolicies</td>
- <td>GET</td>
- <td>/v1/policies</td>
- <td></td>
- </tr>
+ <tr>
+ <td>CreateGroup</td>
+ <td>POST</td>
+ <td>/v1/groups</td>
+ <td>group</td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>UpdateGroup</td>
+ <td>PATCH</td>
+ <td>/v1/{group.name=groups/*}</td>
+ <td>group</td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>DeleteGroup</td>
+ <td>DELETE</td>
+ <td>/v1/{name=groups/*}</td>
+ <td></td>
+ </tr>
+
+
+ </tbody>
+ </table>
+
+
+
+
+ <div class="file-heading">
+ <h2 id="v1/idp_service.proto">v1/idp_service.proto</h2><a href="#title">Top</a>
+ </div>
+ <p></p>
+
+
+ <h3 id="bytebase.v1.CreateIdentityProviderRequest">CreateIdentityProviderRequest</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>identity_provider</td>
+ <td><a href="#bytebase.v1.IdentityProvider">IdentityProvider</a></td>
+ <td></td>
+ <td><p>The identity provider to create. </p></td>
+ </tr>
+
+ <tr>
+ <td>identity_provider_id</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The ID to use for the identity provider, which will become the final component of
+the identity provider&#39;s resource name.
+
+This value should be 4-63 characters, and valid characters
+are /[a-z][0-9]-/. </p></td>
+ </tr>
+
+ <tr>
+ <td>validate_only</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>If set to true, the request will be validated without actually creating the identity provider. </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.DeleteIdentityProviderRequest">DeleteIdentityProviderRequest</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>name</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The name of the identity provider to delete.
+Format: idps/{identity_provider} </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.FieldMapping">FieldMapping</h3>
+ <p>FieldMapping saves the field names from user info API of identity provider.</p><p>As we save all raw json string of user info response data into `principal.idp_user_info`,</p><p>we can extract the relevant data based with `FieldMapping`.</p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>identifier</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>Identifier is the field name of the unique identifier in 3rd-party idp user info. Required. </p></td>
+ </tr>
- <tr>
- <td>ListPolicies</td>
- <td>GET</td>
- <td>/v1/{parent=projects/*}/policies</td>
- <td></td>
- </tr>
+ <tr>
+ <td>display_name</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>DisplayName is the field name of display name in 3rd-party idp user info. Optional. </p></td>
+ </tr>
- <tr>
- <td>ListPolicies</td>
- <td>GET</td>
- <td>/v1/{parent=environments/*}/policies</td>
- <td></td>
- </tr>
+ <tr>
+ <td>phone</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>Phone is the field name of primary phone in 3rd-party idp user info. Optional. </p></td>
+ </tr>
- <tr>
- <td>ListPolicies</td>
- <td>GET</td>
- <td>/v1/{parent=instances/*}/policies</td>
- <td></td>
- </tr>
+ <tr>
+ <td>groups</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>Groups is the field name of groups in 3rd-party idp user info. Optional.
+Mainly used for OIDC: https://developer.okta.com/docs/guides/customize-tokens-groups-claim/main/ </p></td>
+ </tr>
- <tr>
- <td>ListPolicies</td>
- <td>GET</td>
- <td>/v1/{parent=instances/*/databases/*}/policies</td>
- <td></td>
- </tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.GetIdentityProviderRequest">GetIdentityProviderRequest</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
-
+ <tr>
+ <td>name</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The name of the identity provider to retrieve.
+Format: idps/{idp} </p></td>
+ </tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.IdentityProvider">IdentityProvider</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
- <tr>
- <td>CreatePolicy</td>
- <td>POST</td>
- <td>/v1/policies</td>
- <td>policy</td>
- </tr>
+ <tr>
+ <td>name</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The name of the identity provider.
+Format: idps/{idp} </p></td>
+ </tr>
- <tr>
- <td>CreatePolicy</td>
- <td>POST</td>
- <td>/v1/{parent=projects/*}/policies</td>
- <td>policy</td>
- </tr>
+ <tr>
+ <td>title</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The display title of the identity provider. </p></td>
+ </tr>
- <tr>
- <td>CreatePolicy</td>
- <td>POST</td>
- <td>/v1/{parent=environments/*}/policies</td>
- <td>policy</td>
- </tr>
+ <tr>
+ <td>domain</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The domain for email matching when using this identity provider. </p></td>
+ </tr>
- <tr>
- <td>CreatePolicy</td>
- <td>POST</td>
- <td>/v1/{parent=instances/*}/policies</td>
- <td>policy</td>
- </tr>
+ <tr>
+ <td>type</td>
+ <td><a href="#bytebase.v1.IdentityProviderType">IdentityProviderType</a></td>
+ <td></td>
+ <td><p>The type of identity provider protocol. </p></td>
+ </tr>
- <tr>
- <td>CreatePolicy</td>
- <td>POST</td>
- <td>/v1/{parent=instances/*/databases/*}/policies</td>
- <td>policy</td>
- </tr>
+ <tr>
+ <td>config</td>
+ <td><a href="#bytebase.v1.IdentityProviderConfig">IdentityProviderConfig</a></td>
+ <td></td>
+ <td><p>The configuration details for the identity provider. </p></td>
+ </tr>
-
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.IdentityProviderConfig">IdentityProviderConfig</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>oauth2_config</td>
+ <td><a href="#bytebase.v1.OAuth2IdentityProviderConfig">OAuth2IdentityProviderConfig</a></td>
+ <td></td>
+ <td><p>OAuth2 protocol configuration. </p></td>
+ </tr>
- <tr>
- <td>UpdatePolicy</td>
- <td>PATCH</td>
- <td>/v1/{policy.name=policies/*}</td>
- <td>policy</td>
- </tr>
+ <tr>
+ <td>oidc_config</td>
+ <td><a href="#bytebase.v1.OIDCIdentityProviderConfig">OIDCIdentityProviderConfig</a></td>
+ <td></td>
+ <td><p>OIDC protocol configuration. </p></td>
+ </tr>
- <tr>
- <td>UpdatePolicy</td>
- <td>PATCH</td>
- <td>/v1/{policy.name=projects/*/policies/*}</td>
- <td>policy</td>
- </tr>
+ <tr>
+ <td>ldap_config</td>
+ <td><a href="#bytebase.v1.LDAPIdentityProviderConfig">LDAPIdentityProviderConfig</a></td>
+ <td></td>
+ <td><p>LDAP protocol configuration. </p></td>
+ </tr>
- <tr>
- <td>UpdatePolicy</td>
- <td>PATCH</td>
- <td>/v1/{policy.name=environments/*/policies/*}</td>
- <td>policy</td>
- </tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.LDAPIdentityProviderConfig">LDAPIdentityProviderConfig</h3>
+ <p>LDAPIdentityProviderConfig is the structure for LDAP identity provider config.</p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
- <tr>
- <td>UpdatePolicy</td>
- <td>PATCH</td>
- <td>/v1/{policy.name=instances/*/policies/*}</td>
- <td>policy</td>
- </tr>
+ <tr>
+ <td>host</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>Host is the hostname or IP address of the LDAP server, e.g.,
+&#34;ldap.example.com&#34;. </p></td>
+ </tr>
- <tr>
- <td>UpdatePolicy</td>
- <td>PATCH</td>
- <td>/v1/{policy.name=instances/*/databases/*/policies/*}</td>
- <td>policy</td>
- </tr>
+ <tr>
+ <td>port</td>
+ <td><a href="#int32">int32</a></td>
+ <td></td>
+ <td><p>Port is the port number of the LDAP server, e.g., 389. When not set, the
+default port of the corresponding security protocol will be used, i.e. 389
+for StartTLS and 636 for LDAPS. </p></td>
+ </tr>
-
+ <tr>
+ <td>skip_tls_verify</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>SkipTLSVerify controls whether to skip TLS certificate verification. </p></td>
+ </tr>
+ <tr>
+ <td>bind_dn</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>BindDN is the DN of the user to bind as a service account to perform
+search requests. </p></td>
+ </tr>
- <tr>
- <td>DeletePolicy</td>
- <td>DELETE</td>
- <td>/v1/{name=policies/*}</td>
- <td></td>
- </tr>
+ <tr>
+ <td>bind_password</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>BindPassword is the password of the user to bind as a service account. </p></td>
+ </tr>
- <tr>
- <td>DeletePolicy</td>
- <td>DELETE</td>
- <td>/v1/{name=projects/*/policies/*}</td>
- <td></td>
- </tr>
+ <tr>
+ <td>base_dn</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>BaseDN is the base DN to search for users, e.g., &#34;ou=users,dc=example,dc=com&#34;. </p></td>
+ </tr>
- <tr>
- <td>DeletePolicy</td>
- <td>DELETE</td>
- <td>/v1/{name=environments/*/policies/*}</td>
- <td></td>
- </tr>
+ <tr>
+ <td>user_filter</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>UserFilter is the filter to search for users, e.g., &#34;(uid=%s)&#34;. </p></td>
+ </tr>
- <tr>
- <td>DeletePolicy</td>
- <td>DELETE</td>
- <td>/v1/{name=instances/*/policies/*}</td>
- <td></td>
- </tr>
+ <tr>
+ <td>security_protocol</td>
+ <td><a href="#bytebase.v1.LDAPIdentityProviderConfig.SecurityProtocol">LDAPIdentityProviderConfig.SecurityProtocol</a></td>
+ <td></td>
+ <td><p>SecurityProtocol is the security protocol to be used for establishing
+connections with the LDAP server. </p></td>
+ </tr>
- <tr>
- <td>DeletePolicy</td>
- <td>DELETE</td>
- <td>/v1/{name=instances/*/databases/*/policies/*}</td>
- <td></td>
- </tr>
+ <tr>
+ <td>field_mapping</td>
+ <td><a href="#bytebase.v1.FieldMapping">FieldMapping</a></td>
+ <td></td>
+ <td><p>FieldMapping is the mapping of the user attributes returned by the LDAP
+server. </p></td>
+ </tr>
-
</tbody>
</table>
+
+
-
- <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.ListIdentityProvidersRequest">ListIdentityProvidersRequest</h3>
+ <p></p>
+
+
+
- <h3 id="bytebase.v1.AICompletionRequest">AICompletionRequest</h3>
+ <h3 id="bytebase.v1.ListIdentityProvidersResponse">ListIdentityProvidersResponse</h3>
<p></p>
@@ -20318,10 +19875,10 @@ Permissions required: bb.policies.delete</p></td>
<tbody>
<tr>
- <td>messages</td>
- <td><a href="#bytebase.v1.AICompletionRequest.Message">AICompletionRequest.Message</a></td>
+ <td>identity_providers</td>
+ <td><a href="#bytebase.v1.IdentityProvider">IdentityProvider</a></td>
<td>repeated</td>
- <td><p> </p></td>
+ <td><p>The identity providers from the specified request. </p></td>
</tr>
</tbody>
@@ -20331,8 +19888,8 @@ Permissions required: bb.policies.delete</p></td>
- <h3 id="bytebase.v1.AICompletionRequest.Message">AICompletionRequest.Message</h3>
- <p></p>
+ <h3 id="bytebase.v1.OAuth2IdentityProviderConfig">OAuth2IdentityProviderConfig</h3>
+ <p>OAuth2IdentityProviderConfig is the structure for OAuth2 identity provider config.</p>
<table class="field-table">
@@ -20342,17 +19899,66 @@ Permissions required: bb.policies.delete</p></td>
<tbody>
<tr>
- <td>role</td>
+ <td>auth_url</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The authorization endpoint URL for OAuth2 flow. </p></td>
</tr>
<tr>
- <td>content</td>
+ <td>token_url</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The token endpoint URL for exchanging authorization code. </p></td>
+ </tr>
+
+ <tr>
+ <td>user_info_url</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The user information endpoint URL. </p></td>
+ </tr>
+
+ <tr>
+ <td>client_id</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The OAuth2 client identifier. </p></td>
+ </tr>
+
+ <tr>
+ <td>client_secret</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The OAuth2 client secret for authentication. </p></td>
+ </tr>
+
+ <tr>
+ <td>scopes</td>
+ <td><a href="#string">string</a></td>
+ <td>repeated</td>
+ <td><p>The list of OAuth2 scopes to request. </p></td>
+ </tr>
+
+ <tr>
+ <td>field_mapping</td>
+ <td><a href="#bytebase.v1.FieldMapping">FieldMapping</a></td>
+ <td></td>
+ <td><p>Mapping configuration for user attributes from OAuth2 response. </p></td>
+ </tr>
+
+ <tr>
+ <td>skip_tls_verify</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>Whether to skip TLS certificate verification. </p></td>
+ </tr>
+
+ <tr>
+ <td>auth_style</td>
+ <td><a href="#bytebase.v1.OAuth2AuthStyle">OAuth2AuthStyle</a></td>
+ <td></td>
+ <td><p>The authentication style for client credentials. </p></td>
</tr>
</tbody>
@@ -20362,7 +19968,7 @@ Permissions required: bb.policies.delete</p></td>
- <h3 id="bytebase.v1.AICompletionResponse">AICompletionResponse</h3>
+ <h3 id="bytebase.v1.OAuth2IdentityProviderTestRequestContext">OAuth2IdentityProviderTestRequestContext</h3>
<p></p>
@@ -20373,11 +19979,10 @@ Permissions required: bb.policies.delete</p></td>
<tbody>
<tr>
- <td>candidates</td>
- <td><a href="#bytebase.v1.AICompletionResponse.Candidate">AICompletionResponse.Candidate</a></td>
- <td>repeated</td>
- <td><p>candidates is used for results with multiple choices and candidates. Used
-for OpenAI and Gemini. </p></td>
+ <td>code</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>Authorize code from website. </p></td>
</tr>
</tbody>
@@ -20387,8 +19992,8 @@ for OpenAI and Gemini. </p></td>
- <h3 id="bytebase.v1.AICompletionResponse.Candidate">AICompletionResponse.Candidate</h3>
- <p></p>
+ <h3 id="bytebase.v1.OIDCIdentityProviderConfig">OIDCIdentityProviderConfig</h3>
+ <p>OIDCIdentityProviderConfig is the structure for OIDC identity provider config.</p>
<table class="field-table">
@@ -20398,10 +20003,61 @@ for OpenAI and Gemini. </p></td>
<tbody>
<tr>
- <td>content</td>
- <td><a href="#bytebase.v1.AICompletionResponse.Candidate.Content">AICompletionResponse.Candidate.Content</a></td>
+ <td>issuer</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The OIDC issuer URL for the identity provider. </p></td>
+ </tr>
+
+ <tr>
+ <td>client_id</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The OIDC client identifier. </p></td>
+ </tr>
+
+ <tr>
+ <td>client_secret</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The OIDC client secret for authentication. </p></td>
+ </tr>
+
+ <tr>
+ <td>scopes</td>
+ <td><a href="#string">string</a></td>
+ <td>repeated</td>
+ <td><p>The scopes that the OIDC provider supports.
+Should be fetched from the well-known configuration file of the OIDC provider. </p></td>
+ </tr>
+
+ <tr>
+ <td>field_mapping</td>
+ <td><a href="#bytebase.v1.FieldMapping">FieldMapping</a></td>
+ <td></td>
+ <td><p>Mapping configuration for user attributes from OIDC claims. </p></td>
+ </tr>
+
+ <tr>
+ <td>skip_tls_verify</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>Whether to skip TLS certificate verification. </p></td>
+ </tr>
+
+ <tr>
+ <td>auth_style</td>
+ <td><a href="#bytebase.v1.OAuth2AuthStyle">OAuth2AuthStyle</a></td>
+ <td></td>
+ <td><p>The authentication style for client credentials. </p></td>
+ </tr>
+
+ <tr>
+ <td>auth_endpoint</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The authorization endpoint of the OIDC provider.
+Should be fetched from the well-known configuration file of the OIDC provider. </p></td>
</tr>
</tbody>
@@ -20411,7 +20067,7 @@ for OpenAI and Gemini. </p></td>
- <h3 id="bytebase.v1.AICompletionResponse.Candidate.Content">AICompletionResponse.Candidate.Content</h3>
+ <h3 id="bytebase.v1.TestIdentityProviderRequest">TestIdentityProviderRequest</h3>
<p></p>
@@ -20422,10 +20078,17 @@ for OpenAI and Gemini. </p></td>
<tbody>
<tr>
- <td>parts</td>
- <td><a href="#bytebase.v1.AICompletionResponse.Candidate.Content.Part">AICompletionResponse.Candidate.Content.Part</a></td>
- <td>repeated</td>
- <td><p>parts is used for a result content with multiple parts. </p></td>
+ <td>identity_provider</td>
+ <td><a href="#bytebase.v1.IdentityProvider">IdentityProvider</a></td>
+ <td></td>
+ <td><p>The identity provider to test connection including uncreated. </p></td>
+ </tr>
+
+ <tr>
+ <td>oauth2_context</td>
+ <td><a href="#bytebase.v1.OAuth2IdentityProviderTestRequestContext">OAuth2IdentityProviderTestRequestContext</a></td>
+ <td></td>
+ <td><p> </p></td>
</tr>
</tbody>
@@ -20435,7 +20098,7 @@ for OpenAI and Gemini. </p></td>
- <h3 id="bytebase.v1.AICompletionResponse.Candidate.Content.Part">AICompletionResponse.Candidate.Content.Part</h3>
+ <h3 id="bytebase.v1.TestIdentityProviderResponse">TestIdentityProviderResponse</h3>
<p></p>
@@ -20446,10 +20109,17 @@ for OpenAI and Gemini. </p></td>
<tbody>
<tr>
- <td>text</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p> </p></td>
+ <td>claims</td>
+ <td><a href="#bytebase.v1.TestIdentityProviderResponse.ClaimsEntry">TestIdentityProviderResponse.ClaimsEntry</a></td>
+ <td>repeated</td>
+ <td><p>The map of claims returned by the identity provider. </p></td>
+ </tr>
+
+ <tr>
+ <td>user_info</td>
+ <td><a href="#bytebase.v1.TestIdentityProviderResponse.UserInfoEntry">TestIdentityProviderResponse.UserInfoEntry</a></td>
+ <td>repeated</td>
+ <td><p>The matched user info from the claims. </p></td>
</tr>
</tbody>
@@ -20459,7 +20129,7 @@ for OpenAI and Gemini. </p></td>
- <h3 id="bytebase.v1.AdminExecuteRequest">AdminExecuteRequest</h3>
+ <h3 id="bytebase.v1.TestIdentityProviderResponse.ClaimsEntry">TestIdentityProviderResponse.ClaimsEntry</h3>
<p></p>
@@ -20470,41 +20140,17 @@ for OpenAI and Gemini. </p></td>
<tbody>
<tr>
- <td>name</td>
+ <td>key</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The name is the instance name to execute the query against.
-Format: instances/{instance}/databases/{databaseName} </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>statement</td>
+ <td>value</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>
+ <td><p> </p></td>
</tr>
</tbody>
@@ -20514,7 +20160,7 @@ CosmosDB only. </p></td>
- <h3 id="bytebase.v1.AdminExecuteResponse">AdminExecuteResponse</h3>
+ <h3 id="bytebase.v1.TestIdentityProviderResponse.UserInfoEntry">TestIdentityProviderResponse.UserInfoEntry</h3>
<p></p>
@@ -20525,10 +20171,17 @@ CosmosDB only. </p></td>
<tbody>
<tr>
- <td>results</td>
- <td><a href="#bytebase.v1.QueryResult">QueryResult</a></td>
- <td>repeated</td>
- <td><p>The query results. </p></td>
+ <td>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>
@@ -20538,7 +20191,7 @@ CosmosDB only. </p></td>
- <h3 id="bytebase.v1.Advice">Advice</h3>
+ <h3 id="bytebase.v1.UpdateIdentityProviderRequest">UpdateIdentityProviderRequest</h3>
<p></p>
@@ -20549,46 +20202,28 @@ CosmosDB only. </p></td>
<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>identity_provider</td>
+ <td><a href="#bytebase.v1.IdentityProvider">IdentityProvider</a></td>
<td></td>
- <td><p>The advice content. </p></td>
+ <td><p>The identity provider to update.
+
+The identity provider&#39;s `name` field is used to identify the identity provider to update.
+Format: idps/{identity_provider} </p></td>
</tr>
<tr>
- <td>start_position</td>
- <td><a href="#bytebase.v1.Position">Position</a></td>
+ <td>update_mask</td>
+ <td><a href="#google.protobuf.FieldMask">google.protobuf.FieldMask</a></td>
<td></td>
- <td><p>The start_position is inclusive and the end_position is exclusive.
-TODO: use range instead </p></td>
+ <td><p>The list of fields to update. </p></td>
</tr>
<tr>
- <td>end_position</td>
- <td><a href="#bytebase.v1.Position">Position</a></td>
+ <td>allow_missing</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>If set to true, and the identity provider is not found, a new identity provider will be created.
+In this situation, `update_mask` is ignored. </p></td>
</tr>
</tbody>
@@ -20598,197 +20233,255 @@ TODO: use range instead </p></td>
- <h3 id="bytebase.v1.DiffMetadataRequest">DiffMetadataRequest</h3>
+
+
+ <h3 id="bytebase.v1.IdentityProviderType">IdentityProviderType</h3>
+ <p></p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>IDENTITY_PROVIDER_TYPE_UNSPECIFIED</td>
+ <td>0</td>
+ <td><p>Unspecified identity provider type.</p></td>
+ </tr>
+
+ <tr>
+ <td>OAUTH2</td>
+ <td>1</td>
+ <td><p>OAuth 2.0 authentication protocol.</p></td>
+ </tr>
+
+ <tr>
+ <td>OIDC</td>
+ <td>2</td>
+ <td><p>OpenID Connect authentication protocol.</p></td>
+ </tr>
+
+ <tr>
+ <td>LDAP</td>
+ <td>3</td>
+ <td><p>LDAP directory service authentication.</p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+ <h3 id="bytebase.v1.LDAPIdentityProviderConfig.SecurityProtocol">LDAPIdentityProviderConfig.SecurityProtocol</h3>
+ <p></p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>SECURITY_PROTOCOL_UNSPECIFIED</td>
+ <td>0</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>START_TLS</td>
+ <td>1</td>
+ <td><p>StartTLS is the security protocol that starts with an unencrypted connection and then upgrades to TLS.</p></td>
+ </tr>
+
+ <tr>
+ <td>LDAPS</td>
+ <td>2</td>
+ <td><p>LDAPS is the security protocol that uses TLS from the beginning.</p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+ <h3 id="bytebase.v1.OAuth2AuthStyle">OAuth2AuthStyle</h3>
<p></p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>OAUTH2_AUTH_STYLE_UNSPECIFIED</td>
+ <td>0</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>IN_PARAMS</td>
+ <td>1</td>
+ <td><p>IN_PARAMS sends the &#34;client_id&#34; and &#34;client_secret&#34; in the POST body
+as application/x-www-form-urlencoded parameters.</p></td>
+ </tr>
+
+ <tr>
+ <td>IN_HEADER</td>
+ <td>2</td>
+ <td><p>IN_HEADER sends the client_id and client_password using HTTP Basic Authorization.
+This is an optional style described in the OAuth2 RFC 6749 section 2.3.1.</p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.IdentityProviderService">IdentityProviderService</h3>
+ <p>IdentityProviderService manages external identity providers for SSO authentication.</p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Method Name</td><td>Request Type</td><td>Response Type</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>GetIdentityProvider</td>
+ <td><a href="#bytebase.v1.GetIdentityProviderRequest">GetIdentityProviderRequest</a></td>
+ <td><a href="#bytebase.v1.IdentityProvider">IdentityProvider</a></td>
+ <td><p>Gets an identity provider by name.
+Permissions required: bb.identityProviders.get</p></td>
+ </tr>
+
+ <tr>
+ <td>ListIdentityProviders</td>
+ <td><a href="#bytebase.v1.ListIdentityProvidersRequest">ListIdentityProvidersRequest</a></td>
+ <td><a href="#bytebase.v1.ListIdentityProvidersResponse">ListIdentityProvidersResponse</a></td>
+ <td><p>Lists all configured identity providers (public endpoint for login page).
+Permissions required: None</p></td>
+ </tr>
+
+ <tr>
+ <td>CreateIdentityProvider</td>
+ <td><a href="#bytebase.v1.CreateIdentityProviderRequest">CreateIdentityProviderRequest</a></td>
+ <td><a href="#bytebase.v1.IdentityProvider">IdentityProvider</a></td>
+ <td><p>Creates a new identity provider.
+Permissions required: bb.identityProviders.create</p></td>
+ </tr>
+
+ <tr>
+ <td>UpdateIdentityProvider</td>
+ <td><a href="#bytebase.v1.UpdateIdentityProviderRequest">UpdateIdentityProviderRequest</a></td>
+ <td><a href="#bytebase.v1.IdentityProvider">IdentityProvider</a></td>
+ <td><p>Updates an identity provider.
+Permissions required: bb.identityProviders.update
+When allow_missing=true, also requires: bb.identityProviders.create</p></td>
+ </tr>
+
+ <tr>
+ <td>DeleteIdentityProvider</td>
+ <td><a href="#bytebase.v1.DeleteIdentityProviderRequest">DeleteIdentityProviderRequest</a></td>
+ <td><a href="#google.protobuf.Empty">.google.protobuf.Empty</a></td>
+ <td><p>Deletes an identity provider.
+Permissions required: bb.identityProviders.delete</p></td>
+ </tr>
+
+ <tr>
+ <td>TestIdentityProvider</td>
+ <td><a href="#bytebase.v1.TestIdentityProviderRequest">TestIdentityProviderRequest</a></td>
+ <td><a href="#bytebase.v1.TestIdentityProviderResponse">TestIdentityProviderResponse</a></td>
+ <td><p>Tests the connection and configuration of an identity provider.
+Permissions required: bb.identityProviders.update</p></td>
+ </tr>
+
+ </tbody>
+ </table>
- <table class="field-table">
+
+
+ <h4>Methods with HTTP bindings</h4>
+ <table>
<thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ <tr>
+ <td>Method Name</td>
+ <td>Method</td>
+ <td>Pattern</td>
+ <td>Body</td>
+ </tr>
</thead>
<tbody>
+
- <tr>
- <td>source_metadata</td>
- <td><a href="#bytebase.v1.DatabaseMetadata">DatabaseMetadata</a></td>
- <td></td>
- <td><p>The metadata of the source schema. </p></td>
- </tr>
- <tr>
- <td>target_metadata</td>
- <td><a href="#bytebase.v1.DatabaseMetadata">DatabaseMetadata</a></td>
- <td></td>
- <td><p>The metadata of the target schema. </p></td>
- </tr>
+ <tr>
+ <td>GetIdentityProvider</td>
+ <td>GET</td>
+ <td>/v1/{name=idps/*}</td>
+ <td></td>
+ </tr>
- <tr>
- <td>source_catalog</td>
- <td><a href="#bytebase.v1.DatabaseCatalog">DatabaseCatalog</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
+
- <tr>
- <td>target_catalog</td>
- <td><a href="#bytebase.v1.DatabaseCatalog">DatabaseCatalog</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
- <tr>
- <td>engine</td>
- <td><a href="#bytebase.v1.Engine">Engine</a></td>
- <td></td>
- <td><p>The database engine of the schema. </p></td>
- </tr>
+ <tr>
+ <td>ListIdentityProviders</td>
+ <td>GET</td>
+ <td>/v1/idps</td>
+ <td></td>
+ </tr>
- <tr>
- <td>classification_from_config</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>If false, we will build the raw common by classification in database
-config. </p></td>
- </tr>
+
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.DiffMetadataResponse">DiffMetadataResponse</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
- <tr>
- <td>diff</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The diff of the metadata. </p></td>
- </tr>
+ <tr>
+ <td>CreateIdentityProvider</td>
+ <td>POST</td>
+ <td>/v1/idps</td>
+ <td>identity_provider</td>
+ </tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.ExportRequest">ExportRequest</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
+
- <tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The name is the resource name to execute the export against.
-Format: instances/{instance}/databases/{database}
-Format: instances/{instance}
-Format: projects/{project}/rollouts/{rollout}
-Format: projects/{project}/rollouts/{rollout}/stages/{stage} </p></td>
- </tr>
- <tr>
- <td>statement</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The SQL statement to execute. </p></td>
- </tr>
+ <tr>
+ <td>UpdateIdentityProvider</td>
+ <td>PATCH</td>
+ <td>/v1/{identity_provider.name=idps/*}</td>
+ <td>identity_provider</td>
+ </tr>
- <tr>
- <td>limit</td>
- <td><a href="#int32">int32</a></td>
- <td></td>
- <td><p>The maximum number of rows to return. </p></td>
- </tr>
+
- <tr>
- <td>format</td>
- <td><a href="#bytebase.v1.ExportFormat">ExportFormat</a></td>
- <td></td>
- <td><p>The export format. </p></td>
- </tr>
- <tr>
- <td>admin</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>The admin is used for workspace owner and DBA for exporting data from SQL
-Editor Admin mode. The exported data is not masked. </p></td>
- </tr>
+ <tr>
+ <td>DeleteIdentityProvider</td>
+ <td>DELETE</td>
+ <td>/v1/{name=idps/*}</td>
+ <td></td>
+ </tr>
- <tr>
- <td>password</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The zip password provide by users. </p></td>
- </tr>
+
- <tr>
- <td>data_source_id</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The id of data source.
-It is used for querying admin data source even if the instance has
-read-only data sources. Or it can be used to query a specific read-only
-data source. </p></td>
- </tr>
- <tr>
- <td>schema</td>
- <td><a href="#string">string</a></td>
- <td>optional</td>
- <td><p>The default schema to search objects. Equals to the current schema in
-Oracle and search path in Postgres. </p></td>
- </tr>
+ <tr>
+ <td>TestIdentityProvider</td>
+ <td>POST</td>
+ <td>/v1/idps/*:test</td>
+ <td>*</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>
-
- </tbody>
- </table>
-
-
+ <div class="file-heading">
+ <h2 id="v1/org_policy_service.proto">v1/org_policy_service.proto</h2><a href="#title">Top</a>
+ </div>
+ <p></p>
-
- <h3 id="bytebase.v1.MaskingReason">MaskingReason</h3>
+ <h3 id="bytebase.v1.CreatePolicyRequest">CreatePolicyRequest</h3>
<p></p>
@@ -20799,52 +20492,28 @@ Oracle and search path in Postgres. </p></td>
<tbody>
<tr>
- <td>semantic_type_id</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The semantic type that triggered masking (e.g., &#34;SSN&#34;, &#34;email&#34;, &#34;phone&#34;). </p></td>
- </tr>
-
- <tr>
- <td>semantic_type_title</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>Human-readable semantic type title. </p></td>
- </tr>
-
- <tr>
- <td>masking_rule_id</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The masking rule ID that matched (if applicable). </p></td>
- </tr>
-
- <tr>
- <td>algorithm</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The masking algorithm used. </p></td>
- </tr>
-
- <tr>
- <td>context</td>
+ <td>parent</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>Additional context (e.g., &#34;Matched global rule: PII Protection&#34;). </p></td>
+ <td><p>The parent resource where this instance will be created.
+Workspace resource name: &#34;&#34;.
+Environment resource name: environments/environment-id.
+Instance resource name: instances/instance-id.
+Database resource name: instances/instance-id/databases/database-name. </p></td>
</tr>
<tr>
- <td>classification_level</td>
- <td><a href="#string">string</a></td>
+ <td>policy</td>
+ <td><a href="#bytebase.v1.Policy">Policy</a></td>
<td></td>
- <td><p>Whether masking was due to classification level. </p></td>
+ <td><p>The policy to create. </p></td>
</tr>
<tr>
- <td>semantic_type_icon</td>
- <td><a href="#string">string</a></td>
+ <td>type</td>
+ <td><a href="#bytebase.v1.PolicyType">PolicyType</a></td>
<td></td>
- <td><p>Icon associated with the semantic type (if any). </p></td>
+ <td><p>The type of policy to create. </p></td>
</tr>
</tbody>
@@ -20854,8 +20523,8 @@ Oracle and search path in Postgres. </p></td>
- <h3 id="bytebase.v1.QueryHistory">QueryHistory</h3>
- <p></p>
+ <h3 id="bytebase.v1.DataSourceQueryPolicy">DataSourceQueryPolicy</h3>
+ <p>Policy for controlling which data sources can be queried in the SQL editor.</p>
<table class="field-table">
@@ -20865,61 +20534,24 @@ Oracle and search path in Postgres. </p></td>
<tbody>
<tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The name for the query history.
-Format: queryHistories/{uid} </p></td>
- </tr>
-
- <tr>
- <td>database</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The database name to execute the query.
-Format: instances/{instance}/databases/{databaseName} </p></td>
- </tr>
-
- <tr>
- <td>creator</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>create_time</td>
- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>statement</td>
- <td><a href="#string">string</a></td>
+ <td>admin_data_source_restriction</td>
+ <td><a href="#bytebase.v1.DataSourceQueryPolicy.Restriction">DataSourceQueryPolicy.Restriction</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>
+ <td><p>Restriction for admin data source queries. </p></td>
</tr>
<tr>
- <td>duration</td>
- <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>
+ <td>disallow_ddl</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>Disallow running DDL statements in the SQL editor. </p></td>
</tr>
<tr>
- <td>type</td>
- <td><a href="#bytebase.v1.QueryHistory.Type">QueryHistory.Type</a></td>
+ <td>disallow_dml</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>Disallow running DML statements in the SQL editor. </p></td>
</tr>
</tbody>
@@ -20929,7 +20561,7 @@ Format: instances/{instance}/databases/{databaseName} </p></td>
- <h3 id="bytebase.v1.QueryOption">QueryOption</h3>
+ <h3 id="bytebase.v1.DeletePolicyRequest">DeletePolicyRequest</h3>
<p></p>
@@ -20940,10 +20572,15 @@ Format: instances/{instance}/databases/{databaseName} </p></td>
<tbody>
<tr>
- <td>redis_run_commands_on</td>
- <td><a href="#bytebase.v1.QueryOption.RedisRunCommandsOn">QueryOption.RedisRunCommandsOn</a></td>
+ <td>name</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The policy&#39;s `name` field is used to identify the instance to update.
+Format: {resource name}/policies/{policy type}
+Workspace resource name: &#34;&#34;.
+Environment resource name: environments/environment-id.
+Instance resource name: instances/instance-id.
+Database resource name: instances/instance-id/databases/database-name. </p></td>
</tr>
</tbody>
@@ -20953,7 +20590,7 @@ Format: instances/{instance}/databases/{databaseName} </p></td>
- <h3 id="bytebase.v1.QueryRequest">QueryRequest</h3>
+ <h3 id="bytebase.v1.GetPolicyRequest">GetPolicyRequest</h3>
<p></p>
@@ -20967,62 +20604,47 @@ Format: instances/{instance}/databases/{databaseName} </p></td>
<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>
+ <td><p>The name of the policy to retrieve.
+Format: {resource type}/{resource id}/policies/{policy type} </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>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.ListPoliciesRequest">ListPoliciesRequest</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
<tr>
- <td>data_source_id</td>
+ <td>parent</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The id of data source.
-It is used for querying admin data source even if the instance has
-read-only data sources. Or it can be used to query a specific read-only
-data source. </p></td>
- </tr>
-
- <tr>
- <td>explain</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>Explain the statement. </p></td>
+ <td><p>The parent, which owns this collection of policies.
+Format: {resource type}/{resource id} </p></td>
</tr>
<tr>
- <td>schema</td>
- <td><a href="#string">string</a></td>
+ <td>policy_type</td>
+ <td><a href="#bytebase.v1.PolicyType">PolicyType</a></td>
<td>optional</td>
- <td><p>The default schema to search objects. Equals to the current schema in
-Oracle and search path in Postgres. </p></td>
+ <td><p>Filter by specific policy type. </p></td>
</tr>
<tr>
- <td>query_option</td>
- <td><a href="#bytebase.v1.QueryOption">QueryOption</a></td>
+ <td>show_deleted</td>
+ <td><a href="#bool">bool</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>Show deleted policies if specified. </p></td>
</tr>
</tbody>
@@ -21032,7 +20654,7 @@ CosmosDB only. </p></td>
- <h3 id="bytebase.v1.QueryResponse">QueryResponse</h3>
+ <h3 id="bytebase.v1.ListPoliciesResponse">ListPoliciesResponse</h3>
<p></p>
@@ -21043,10 +20665,10 @@ CosmosDB only. </p></td>
<tbody>
<tr>
- <td>results</td>
- <td><a href="#bytebase.v1.QueryResult">QueryResult</a></td>
+ <td>policies</td>
+ <td><a href="#bytebase.v1.Policy">Policy</a></td>
<td>repeated</td>
- <td><p>The query results. </p></td>
+ <td><p>The policies from the specified request. </p></td>
</tr>
</tbody>
@@ -21056,8 +20678,8 @@ CosmosDB only. </p></td>
- <h3 id="bytebase.v1.QueryResult">QueryResult</h3>
- <p></p>
+ <h3 id="bytebase.v1.MaskingExceptionPolicy">MaskingExceptionPolicy</h3>
+ <p>MaskingExceptionPolicy is the allowlist of users who can access sensitive data.</p>
<table class="field-table">
@@ -21067,82 +20689,66 @@ CosmosDB only. </p></td>
<tbody>
<tr>
- <td>column_names</td>
- <td><a href="#string">string</a></td>
- <td>repeated</td>
- <td><p>Column names of the query result. </p></td>
- </tr>
-
- <tr>
- <td>column_type_names</td>
- <td><a href="#string">string</a></td>
- <td>repeated</td>
- <td><p>Column types of the query result.
-The types come from the Golang SQL driver. </p></td>
- </tr>
-
- <tr>
- <td>rows</td>
- <td><a href="#bytebase.v1.QueryRow">QueryRow</a></td>
+ <td>masking_exceptions</td>
+ <td><a href="#bytebase.v1.MaskingExceptionPolicy.MaskingException">MaskingExceptionPolicy.MaskingException</a></td>
<td>repeated</td>
- <td><p>Rows of the query result. </p></td>
- </tr>
-
- <tr>
- <td>rows_count</td>
- <td><a href="#int64">int64</a></td>
- <td></td>
- <td><p> </p></td>
+ <td><p>The list of masking exceptions. </p></td>
</tr>
- <tr>
- <td>error</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The error message if the query failed. </p></td>
- </tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.MaskingExceptionPolicy.MaskingException">MaskingExceptionPolicy.MaskingException</h3>
+ <p>An exception allowing specific users to access masked data.</p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
<tr>
- <td>latency</td>
- <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>
+ <td>action</td>
+ <td><a href="#bytebase.v1.MaskingExceptionPolicy.MaskingException.Action">MaskingExceptionPolicy.MaskingException.Action</a></td>
<td></td>
- <td><p>The time it takes to execute the query. </p></td>
+ <td><p>The action that the user can perform on sensitive data. </p></td>
</tr>
<tr>
- <td>statement</td>
+ <td>member</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>allow_export</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>The query result is allowed to be exported or not. </p></td>
- </tr>
-
- <tr>
- <td>messages</td>
- <td><a href="#bytebase.v1.QueryResult.Message">QueryResult.Message</a></td>
- <td>repeated</td>
- <td><p>Informational or debug messages returned by the database engine during query execution.
-Examples include PostgreSQL&#39;s RAISE NOTICE, MSSQL&#39;s PRINT, or Oracle&#39;s DBMS_OUTPUT.PUT_LINE. </p></td>
+ <td></td>
+ <td><p>Member is the principal who bind to this exception policy instance.
+
+- `user:{email}`: An email address that represents a specific Bytebase account. For example, `[email protected]`.
+- `group:{email}`: An email address for group. </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>condition</td>
+ <td><a href="#google.type.Expr">google.type.Expr</a></td>
+ <td></td>
+ <td><p>The condition that is associated with this exception policy instance.
+The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
+If the condition is empty, means the user can access all databases without expiration.
+
+Support variables:
+resource.instance_id: the instance resource id. Only support &#34;==&#34; operation.
+resource.database_name: the database name. Only support &#34;==&#34; operation.
+resource.schema_name: the schema name. Only support &#34;==&#34; operation.
+resource.table_name: the table name. Only support &#34;==&#34; operation.
+resource.column_name: the column name. Only support &#34;==&#34; operation.
+request.time: the expiration. Only support &#34;&lt;&#34; operation in `request.time &lt; timestamp(&#34;{ISO datetime string format}&#34;)`
+All variables should join with &#34;&amp;&amp;&#34; condition.
+
+For example:
+resource.instance_id == &#34;local&#34; &amp;&amp; resource.database_name == &#34;employee&#34; &amp;&amp; request.time &lt; timestamp(&#34;2025-04-30T11:10:39.000Z&#34;)
+resource.instance_id == &#34;local&#34; &amp;&amp; resource.database_name == &#34;employee&#34; </p></td>
</tr>
</tbody>
@@ -21152,8 +20758,8 @@ Examples include PostgreSQL&#39;s RAISE NOTICE, MSSQL&#39;s PRINT, or Oracle&#39
- <h3 id="bytebase.v1.QueryResult.Message">QueryResult.Message</h3>
- <p></p>
+ <h3 id="bytebase.v1.MaskingRulePolicy">MaskingRulePolicy</h3>
+ <p>Policy for configuring data masking rules.</p>
<table class="field-table">
@@ -21163,17 +20769,10 @@ Examples include PostgreSQL&#39;s RAISE NOTICE, MSSQL&#39;s PRINT, or Oracle&#39
<tbody>
<tr>
- <td>level</td>
- <td><a href="#bytebase.v1.QueryResult.Message.Level">QueryResult.Message.Level</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>content</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p> </p></td>
+ <td>rules</td>
+ <td><a href="#bytebase.v1.MaskingRulePolicy.MaskingRule">MaskingRulePolicy.MaskingRule</a></td>
+ <td>repeated</td>
+ <td><p>The list of masking rules. </p></td>
</tr>
</tbody>
@@ -21183,8 +20782,8 @@ Examples include PostgreSQL&#39;s RAISE NOTICE, MSSQL&#39;s PRINT, or Oracle&#39
- <h3 id="bytebase.v1.QueryResult.PostgresError">QueryResult.PostgresError</h3>
- <p>refer https://www.postgresql.org/docs/11/protocol-error-fields.html</p><p>for field description.</p>
+ <h3 id="bytebase.v1.MaskingRulePolicy.MaskingRule">MaskingRulePolicy.MaskingRule</h3>
+ <p>A rule that defines when and how to mask data.</p>
<table class="field-table">
@@ -21194,146 +20793,145 @@ Examples include PostgreSQL&#39;s RAISE NOTICE, MSSQL&#39;s PRINT, or Oracle&#39
<tbody>
<tr>
- <td>severity</td>
+ <td>id</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>A unique identifier for the rule in UUID format. </p></td>
</tr>
<tr>
- <td>code</td>
- <td><a href="#string">string</a></td>
+ <td>condition</td>
+ <td><a href="#google.type.Expr">google.type.Expr</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The condition for the masking rule.
+The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
+
+Support variables:
+resource.environment_id: the environment resource id.
+resource.project_id: the project resource id.
+resource.instance_id: the instance resource id.
+resource.database_name: the database name.
+resource.table_name: the table name.
+resource.column_name: the column name.
+resource.classification_level: the classification level.
+
+Each variable support following operations:
+==: the value equals the target.
+!=: the value not equals the target.
+in: the value matches one of the targets.
+!(in): the value not matches any of the targets.
+
+For example:
+resource.environment_id == &#34;test&#34; &amp;&amp; resource.project_id == &#34;sample-project&#34;
+resource.instance_id == &#34;sample-instance&#34; &amp;&amp; resource.database_name == &#34;employee&#34; &amp;&amp; resource.table_name in [&#34;table1&#34;, &#34;table2&#34;]
+resource.environment_id != &#34;test&#34; || !(resource.project_id in [&#34;poject1&#34;, &#34;prject2&#34;])
+resource.instance_id == &#34;sample-instance&#34; &amp;&amp; (resource.database_name == &#34;db1&#34; || resource.database_name == &#34;db2&#34;) </p></td>
</tr>
<tr>
- <td>message</td>
+ <td>semantic_type</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The semantic type of data to mask (e.g., &#34;SSN&#34;, &#34;EMAIL&#34;). </p></td>
</tr>
- <tr>
- <td>detail</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.Policy">Policy</h3>
+ <p></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>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>position</td>
- <td><a href="#int32">int32</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>internal_position</td>
- <td><a href="#int32">int32</a></td>
- <td></td>
- <td><p> </p></td>
+ <td><p>The name of the policy.
+Format: {resource name}/policies/{policy type}
+Workspace resource name: &#34;&#34;.
+Environment resource name: environments/environment-id.
+Instance resource name: instances/instance-id.
+Database resource name: instances/instance-id/databases/database-name. </p></td>
</tr>
<tr>
- <td>internal_query</td>
- <td><a href="#string">string</a></td>
+ <td>inherit_from_parent</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>Whether this policy inherits from its parent resource. </p></td>
</tr>
<tr>
- <td>where</td>
- <td><a href="#string">string</a></td>
+ <td>type</td>
+ <td><a href="#bytebase.v1.PolicyType">PolicyType</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The type of policy. </p></td>
</tr>
<tr>
- <td>schema_name</td>
- <td><a href="#string">string</a></td>
+ <td>rollout_policy</td>
+ <td><a href="#bytebase.v1.RolloutPolicy">RolloutPolicy</a></td>
<td></td>
<td><p> </p></td>
</tr>
<tr>
- <td>table_name</td>
- <td><a href="#string">string</a></td>
+ <td>masking_rule_policy</td>
+ <td><a href="#bytebase.v1.MaskingRulePolicy">MaskingRulePolicy</a></td>
<td></td>
<td><p> </p></td>
</tr>
<tr>
- <td>column_name</td>
- <td><a href="#string">string</a></td>
+ <td>masking_exception_policy</td>
+ <td><a href="#bytebase.v1.MaskingExceptionPolicy">MaskingExceptionPolicy</a></td>
<td></td>
<td><p> </p></td>
</tr>
<tr>
- <td>data_type_name</td>
- <td><a href="#string">string</a></td>
+ <td>tag_policy</td>
+ <td><a href="#bytebase.v1.TagPolicy">TagPolicy</a></td>
<td></td>
<td><p> </p></td>
</tr>
<tr>
- <td>constraint_name</td>
- <td><a href="#string">string</a></td>
+ <td>data_source_query_policy</td>
+ <td><a href="#bytebase.v1.DataSourceQueryPolicy">DataSourceQueryPolicy</a></td>
<td></td>
<td><p> </p></td>
</tr>
<tr>
- <td>file</td>
- <td><a href="#string">string</a></td>
+ <td>query_data_policy</td>
+ <td><a href="#bytebase.v1.QueryDataPolicy">QueryDataPolicy</a></td>
<td></td>
<td><p> </p></td>
</tr>
<tr>
- <td>line</td>
- <td><a href="#int32">int32</a></td>
+ <td>enforce</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>Whether the policy is enforced. </p></td>
</tr>
<tr>
- <td>routine</td>
- <td><a href="#string">string</a></td>
+ <td>resource_type</td>
+ <td><a href="#bytebase.v1.PolicyResourceType">PolicyResourceType</a></td>
<td></td>
- <td><p> </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.QueryRow">QueryRow</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>values</td>
- <td><a href="#bytebase.v1.RowValue">RowValue</a></td>
- <td>repeated</td>
- <td><p>Row values of the query result. </p></td>
+ <td><p>The resource type for the policy. </p></td>
</tr>
</tbody>
@@ -21343,8 +20941,8 @@ Examples include PostgreSQL&#39;s RAISE NOTICE, MSSQL&#39;s PRINT, or Oracle&#39
- <h3 id="bytebase.v1.RowValue">RowValue</h3>
- <p></p>
+ <h3 id="bytebase.v1.QueryDataPolicy">QueryDataPolicy</h3>
+ <p>QueryDataPolicy is the policy configuration for querying data.</p>
<table class="field-table">
@@ -21354,98 +20952,79 @@ Examples include PostgreSQL&#39;s RAISE NOTICE, MSSQL&#39;s PRINT, or Oracle&#39
<tbody>
<tr>
- <td>null_value</td>
- <td><a href="#google.protobuf.NullValue">google.protobuf.NullValue</a></td>
+ <td>timeout</td>
+ <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The query timeout duration. </p></td>
</tr>
<tr>
- <td>bool_value</td>
+ <td>disable_export</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>
+ <td><p>Disable data export in the SQL editor. </p></td>
</tr>
<tr>
- <td>int64_value</td>
+ <td>maximum_result_size</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>
+ <td><p>The maximum result size limit in bytes.
+The default value is 100MB, we will use the default value if the setting not exists, or the limit &lt;= 0. </p></td>
</tr>
<tr>
- <td>uint32_value</td>
- <td><a href="#uint32">uint32</a></td>
+ <td>maximum_result_rows</td>
+ <td><a href="#int32">int32</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The maximum number of rows to return.
+The default value is -1, means no limit. </p></td>
</tr>
<tr>
- <td>uint64_value</td>
- <td><a href="#uint64">uint64</a></td>
+ <td>disable_copy_data</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>Disable copying query results. </p></td>
</tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.RolloutPolicy">RolloutPolicy</h3>
+ <p>Rollout policy configuration.</p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
<tr>
- <td>value_value</td>
- <td><a href="#google.protobuf.Value">google.protobuf.Value</a></td>
+ <td>automatic</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p>value_value is used for Spanner and TUPLE ARRAY MAP in Clickhouse only. </p></td>
+ <td><p>Whether rollout is automatic without manual approval. </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>roles</td>
+ <td><a href="#string">string</a></td>
+ <td>repeated</td>
+ <td><p>The roles that can approve rollout execution. </p></td>
</tr>
<tr>
- <td>timestamp_tz_value</td>
- <td><a href="#bytebase.v1.RowValue.TimestampTZ">RowValue.TimestampTZ</a></td>
+ <td>checkers</td>
+ <td><a href="#bytebase.v1.RolloutPolicy.Checkers">RolloutPolicy.Checkers</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>Checkers that must pass before rollout execution.
+These checks are performed in UI workflows only. </p></td>
</tr>
</tbody>
@@ -21455,7 +21034,7 @@ accurately represents the timestamp with location information. </p></td>
- <h3 id="bytebase.v1.RowValue.Timestamp">RowValue.Timestamp</h3>
+ <h3 id="bytebase.v1.RolloutPolicy.Checkers">RolloutPolicy.Checkers</h3>
<p></p>
@@ -21466,17 +21045,17 @@ accurately represents the timestamp with location information. </p></td>
<tbody>
<tr>
- <td>google_timestamp</td>
- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
+ <td>required_issue_approval</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>Whether issue approval is required before proceeding with rollout. </p></td>
</tr>
<tr>
- <td>accuracy</td>
- <td><a href="#int32">int32</a></td>
+ <td>required_status_checks</td>
+ <td><a href="#bytebase.v1.RolloutPolicy.Checkers.RequiredStatusChecks">RolloutPolicy.Checkers.RequiredStatusChecks</a></td>
<td></td>
- <td><p>The accuracy is the number of digits after the decimal point. </p></td>
+ <td><p>Status checks that must pass before rollout can be executed. </p></td>
</tr>
</tbody>
@@ -21486,7 +21065,7 @@ accurately represents the timestamp with location information. </p></td>
- <h3 id="bytebase.v1.RowValue.TimestampTZ">RowValue.TimestampTZ</h3>
+ <h3 id="bytebase.v1.RolloutPolicy.Checkers.RequiredStatusChecks">RolloutPolicy.Checkers.RequiredStatusChecks</h3>
<p></p>
@@ -21497,36 +21076,62 @@ accurately represents the timestamp with location information. </p></td>
<tbody>
<tr>
- <td>google_timestamp</td>
- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
+ <td>plan_check_enforcement</td>
+ <td><a href="#bytebase.v1.RolloutPolicy.Checkers.PlanCheckEnforcement">RolloutPolicy.Checkers.PlanCheckEnforcement</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>Enforcement level for plan check results during rollout validation. </p></td>
</tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.SQLReviewRule">SQLReviewRule</h3>
+ <p>SQL review rule configuration. Check the SQL_REVIEW_RULES_DOCUMENTATION.md for 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>zone</td>
+ <td>type</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>Zone is the time zone abbreviations in timezone database such as &#34;PDT&#34;,
-&#34;PST&#34;. https://en.wikipedia.org/wiki/List_of_tz_database_time_zones We
-retrieve the time zone information from the timestamptz field in the
-database. A timestamp is in UTC or epoch time, and with zone info, we can
-convert it to a local time string. Zone and offset are returned by
-time.Time.Zone() </p></td>
+ <td><p>The type of SQL review rule. </p></td>
</tr>
<tr>
- <td>offset</td>
- <td><a href="#int32">int32</a></td>
+ <td>level</td>
+ <td><a href="#bytebase.v1.SQLReviewRuleLevel">SQLReviewRuleLevel</a></td>
<td></td>
- <td><p>The offset is in seconds east of UTC </p></td>
+ <td><p>The severity level of the rule. </p></td>
</tr>
<tr>
- <td>accuracy</td>
- <td><a href="#int32">int32</a></td>
+ <td>payload</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The payload is a JSON string that varies by rule type. </p></td>
+ </tr>
+
+ <tr>
+ <td>engine</td>
+ <td><a href="#bytebase.v1.Engine">Engine</a></td>
+ <td></td>
+ <td><p>The database engine this rule applies to. </p></td>
+ </tr>
+
+ <tr>
+ <td>comment</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>Additional comment for the rule. </p></td>
</tr>
</tbody>
@@ -21536,8 +21141,8 @@ time.Time.Zone() </p></td>
- <h3 id="bytebase.v1.SearchQueryHistoriesRequest">SearchQueryHistoriesRequest</h3>
- <p></p>
+ <h3 id="bytebase.v1.TagPolicy">TagPolicy</h3>
+ <p>Policy for tagging resources with metadata.</p>
<table class="field-table">
@@ -21547,45 +21152,42 @@ time.Time.Zone() </p></td>
<tbody>
<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>
+ <td>tags</td>
+ <td><a href="#bytebase.v1.TagPolicy.TagsEntry">TagPolicy.TagsEntry</a></td>
+ <td>repeated</td>
+ <td><p>tags is the key - value map for resources.
+for example, the environment resource can have the sql review config tag, like &#34;bb.tag.review_config&#34;: &#34;reviewConfigs/{review config resource id}&#34; </p></td>
</tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.TagPolicy.TagsEntry">TagPolicy.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>page_token</td>
+ <td>key</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>A page token, received from a previous `ListQueryHistory` call.
-Provide this to retrieve the subsequent page. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>filter</td>
+ <td>value</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 &#34;projects/{id}&#34; format, support &#34;==&#34; operator.
-- database: the database full name in &#34;instances/{id}/databases/{name}&#34; format, support &#34;==&#34; operator.
-- instance: the instance full name in &#34;instances/{id}&#34; format, support &#34;==&#34; operator.
-- type: the type, should be &#34;QUERY&#34; or &#34;EXPORT&#34;, support &#34;==&#34; operator.
-- statement: the SQL statement, support &#34;.matches()&#34; operator.
-
-For example:
-project == &#34;projects/{project}&#34;
-database == &#34;instances/{instance}/databases/{database}&#34;
-instance == &#34;instances/{instance}&#34;
-type == &#34;QUERY&#34;
-type == &#34;EXPORT&#34;
-statement.matches(&#34;select&#34;)
-type == &#34;QUERY&#34; &amp;&amp; statement.matches(&#34;select&#34;) </p></td>
+ <td><p> </p></td>
</tr>
</tbody>
@@ -21595,7 +21197,7 @@ type == &#34;QUERY&#34; &amp;&amp; statement.matches(&#34;select&#34;) </p></td>
- <h3 id="bytebase.v1.SearchQueryHistoriesResponse">SearchQueryHistoriesResponse</h3>
+ <h3 id="bytebase.v1.UpdatePolicyRequest">UpdatePolicyRequest</h3>
<p></p>
@@ -21606,19 +21208,32 @@ type == &#34;QUERY&#34; &amp;&amp; statement.matches(&#34;select&#34;) </p></td>
<tbody>
<tr>
- <td>query_histories</td>
- <td><a href="#bytebase.v1.QueryHistory">QueryHistory</a></td>
- <td>repeated</td>
- <td><p>The list of history. </p></td>
+ <td>policy</td>
+ <td><a href="#bytebase.v1.Policy">Policy</a></td>
+ <td></td>
+ <td><p>The policy to update.
+
+The policy&#39;s `name` field is used to identify the instance to update.
+Format: {resource name}/policies/{policy type}
+Workspace resource name: &#34;&#34;.
+Environment resource name: environments/environment-id.
+Instance resource name: instances/instance-id.
+Database resource name: instances/instance-id/databases/database-name. </p></td>
</tr>
<tr>
- <td>next_page_token</td>
- <td><a href="#string">string</a></td>
+ <td>update_mask</td>
+ <td><a href="#google.protobuf.FieldMask">google.protobuf.FieldMask</a></td>
<td></td>
- <td><p>A token to retrieve next page of history.
-Pass this value in the page_token field in the subsequent call to
-`ListQueryHistory` method to retrieve the next page of history. </p></td>
+ <td><p>The 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 policy is not found, a new policy will be created.
+In this situation, `update_mask` is ignored. </p></td>
</tr>
</tbody>
@@ -21630,8 +21245,37 @@ Pass this value in the page_token field in the subsequent call to
- <h3 id="bytebase.v1.Advice.Level">Advice.Level</h3>
- <p>Level represents the severity level of the advice.</p>
+ <h3 id="bytebase.v1.DataSourceQueryPolicy.Restriction">DataSourceQueryPolicy.Restriction</h3>
+ <p>Restriction level for admin data source access.</p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>RESTRICTION_UNSPECIFIED</td>
+ <td>0</td>
+ <td><p>Unspecified restriction.</p></td>
+ </tr>
+
+ <tr>
+ <td>FALLBACK</td>
+ <td>1</td>
+ <td><p>Allow querying admin data sources when there is no read-only data source.</p></td>
+ </tr>
+
+ <tr>
+ <td>DISALLOW</td>
+ <td>2</td>
+ <td><p>Disallow querying admin data sources.</p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+ <h3 id="bytebase.v1.MaskingExceptionPolicy.MaskingException.Action">MaskingExceptionPolicy.MaskingException.Action</h3>
+ <p>The action that the exception permits.</p>
<table class="enum-table">
<thead>
<tr><td>Name</td><td>Number</td><td>Description</td></tr>
@@ -21639,34 +21283,28 @@ Pass this value in the page_token field in the subsequent call to
<tbody>
<tr>
- <td>ADVICE_LEVEL_UNSPECIFIED</td>
+ <td>ACTION_UNSPECIFIED</td>
<td>0</td>
- <td><p>Unspecified advice level.</p></td>
+ <td><p>Unspecified action.</p></td>
</tr>
<tr>
- <td>SUCCESS</td>
+ <td>QUERY</td>
<td>1</td>
- <td><p>Success status indicating the check passed without issues.</p></td>
+ <td><p>Allow querying sensitive data.</p></td>
</tr>
<tr>
- <td>WARNING</td>
+ <td>EXPORT</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>
+ <td><p>Allow exporting sensitive data.</p></td>
</tr>
</tbody>
</table>
- <h3 id="bytebase.v1.QueryHistory.Type">QueryHistory.Type</h3>
- <p></p>
+ <h3 id="bytebase.v1.PolicyResourceType">PolicyResourceType</h3>
+ <p>The resource type that a policy can be attached to.</p>
<table class="enum-table">
<thead>
<tr><td>Name</td><td>Number</td><td>Description</td></tr>
@@ -21674,28 +21312,34 @@ Pass this value in the page_token field in the subsequent call to
<tbody>
<tr>
- <td>TYPE_UNSPECIFIED</td>
+ <td>RESOURCE_TYPE_UNSPECIFIED</td>
<td>0</td>
- <td><p>Unspecified query history type.</p></td>
+ <td><p>Unspecified resource type.</p></td>
</tr>
<tr>
- <td>QUERY</td>
+ <td>WORKSPACE</td>
<td>1</td>
- <td><p>Query execution for data retrieval.</p></td>
+ <td><p>Workspace-level policy.</p></td>
</tr>
<tr>
- <td>EXPORT</td>
+ <td>ENVIRONMENT</td>
<td>2</td>
- <td><p>Data export operation to file.</p></td>
+ <td><p>Environment-level policy.</p></td>
+ </tr>
+
+ <tr>
+ <td>PROJECT</td>
+ <td>3</td>
+ <td><p>Project-level policy.</p></td>
</tr>
</tbody>
</table>
- <h3 id="bytebase.v1.QueryOption.RedisRunCommandsOn">QueryOption.RedisRunCommandsOn</h3>
- <p></p>
+ <h3 id="bytebase.v1.PolicyType">PolicyType</h3>
+ <p>The type of organizational policy.</p>
<table class="enum-table">
<thead>
<tr><td>Name</td><td>Number</td><td>Description</td></tr>
@@ -21703,27 +21347,51 @@ Pass this value in the page_token field in the subsequent call to
<tbody>
<tr>
- <td>REDIS_RUN_COMMANDS_ON_UNSPECIFIED</td>
+ <td>POLICY_TYPE_UNSPECIFIED</td>
<td>0</td>
- <td><p>UNSPECIFIED defaults to SINGLE_NODE.</p></td>
+ <td><p>Unspecified policy type.</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>ROLLOUT_POLICY</td>
+ <td>11</td>
+ <td><p>Rollout deployment policy.</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>MASKING_RULE</td>
+ <td>9</td>
+ <td><p>Data masking rule policy.</p></td>
+ </tr>
+
+ <tr>
+ <td>MASKING_EXCEPTION</td>
+ <td>10</td>
+ <td><p>Data masking exception policy.</p></td>
+ </tr>
+
+ <tr>
+ <td>TAG</td>
+ <td>13</td>
+ <td><p>Resource tag policy.</p></td>
+ </tr>
+
+ <tr>
+ <td>DATA_SOURCE_QUERY</td>
+ <td>14</td>
+ <td><p>Data source query restrictions policy.</p></td>
+ </tr>
+
+ <tr>
+ <td>DATA_QUERY</td>
+ <td>16</td>
+ <td><p>Query data access policy.</p></td>
</tr>
</tbody>
</table>
- <h3 id="bytebase.v1.QueryResult.Message.Level">QueryResult.Message.Level</h3>
+ <h3 id="bytebase.v1.RolloutPolicy.Checkers.PlanCheckEnforcement">RolloutPolicy.Checkers.PlanCheckEnforcement</h3>
<p></p>
<table class="enum-table">
<thead>
@@ -21732,45 +21400,50 @@ Pass this value in the page_token field in the subsequent call to
<tbody>
<tr>
- <td>LEVEL_UNSPECIFIED</td>
+ <td>PLAN_CHECK_ENFORCEMENT_UNSPECIFIED</td>
<td>0</td>
- <td><p>Unspecified message level.</p></td>
+ <td><p>Allow rollout regardless of plan check results (no enforcement).</p></td>
</tr>
<tr>
- <td>INFO</td>
+ <td>ERROR_ONLY</td>
<td>1</td>
- <td><p>Informational message.</p></td>
+ <td><p>Block rollout only when plan check finds errors.</p></td>
</tr>
<tr>
- <td>WARNING</td>
+ <td>STRICT</td>
<td>2</td>
- <td><p>Warning message indicating potential issues.</p></td>
+ <td><p>Block rollout when plan check finds errors or warnings.</p></td>
</tr>
- <tr>
- <td>DEBUG</td>
- <td>3</td>
- <td><p>Debug message for development and troubleshooting.</p></td>
- </tr>
+ </tbody>
+ </table>
+
+ <h3 id="bytebase.v1.SQLReviewRuleLevel">SQLReviewRuleLevel</h3>
+ <p>The severity level for SQL review rules.</p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>
+ </thead>
+ <tbody>
<tr>
- <td>LOG</td>
- <td>4</td>
- <td><p>General log message.</p></td>
+ <td>LEVEL_UNSPECIFIED</td>
+ <td>0</td>
+ <td><p>Unspecified level.</p></td>
</tr>
<tr>
- <td>NOTICE</td>
- <td>5</td>
- <td><p>Notice message for important information.</p></td>
+ <td>ERROR</td>
+ <td>1</td>
+ <td><p>Rule violation is an error.</p></td>
</tr>
<tr>
- <td>EXCEPTION</td>
- <td>6</td>
- <td><p>Exception message indicating error conditions.</p></td>
+ <td>WARNING</td>
+ <td>2</td>
+ <td><p>Rule violation is a warning.</p></td>
</tr>
</tbody>
@@ -21780,8 +21453,8 @@ Pass this value in the page_token field in the subsequent call to
- <h3 id="bytebase.v1.SQLService">SQLService</h3>
- <p>SQLService executes SQL queries and manages query operations.</p>
+ <h3 id="bytebase.v1.OrgPolicyService">OrgPolicyService</h3>
+ <p>OrgPolicyService manages organizational policies at various resource levels.</p>
<table class="enum-table">
<thead>
<tr><td>Method Name</td><td>Request Type</td><td>Response Type</td><td>Description</td></tr>
@@ -21789,51 +21462,43 @@ Pass this value in the page_token field in the subsequent call to
<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>
+ <td>GetPolicy</td>
+ <td><a href="#bytebase.v1.GetPolicyRequest">GetPolicyRequest</a></td>
+ <td><a href="#bytebase.v1.Policy">Policy</a></td>
+ <td><p>Retrieves a policy by name.
+Permissions required: bb.policies.get</p></td>
</tr>
<tr>
- <td>SearchQueryHistories</td>
- <td><a href="#bytebase.v1.SearchQueryHistoriesRequest">SearchQueryHistoriesRequest</a></td>
- <td><a href="#bytebase.v1.SearchQueryHistoriesResponse">SearchQueryHistoriesResponse</a></td>
- <td><p>SearchQueryHistories searches query histories for the caller.
-Permissions required: None (only returns caller&#39;s own query histories)</p></td>
+ <td>ListPolicies</td>
+ <td><a href="#bytebase.v1.ListPoliciesRequest">ListPoliciesRequest</a></td>
+ <td><a href="#bytebase.v1.ListPoliciesResponse">ListPoliciesResponse</a></td>
+ <td><p>Lists policies at a specified resource level.
+Permissions required: bb.policies.list</p></td>
</tr>
<tr>
- <td>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>CreatePolicy</td>
+ <td><a href="#bytebase.v1.CreatePolicyRequest">CreatePolicyRequest</a></td>
+ <td><a href="#bytebase.v1.Policy">Policy</a></td>
+ <td><p>Creates a new organizational policy.
+Permissions required: bb.policies.create</p></td>
</tr>
<tr>
- <td>DiffMetadata</td>
- <td><a href="#bytebase.v1.DiffMetadataRequest">DiffMetadataRequest</a></td>
- <td><a href="#bytebase.v1.DiffMetadataResponse">DiffMetadataResponse</a></td>
- <td><p>Computes schema differences between two database metadata.
-Permissions required: None</p></td>
+ <td>UpdatePolicy</td>
+ <td><a href="#bytebase.v1.UpdatePolicyRequest">UpdatePolicyRequest</a></td>
+ <td><a href="#bytebase.v1.Policy">Policy</a></td>
+ <td><p>Updates an existing organizational policy.
+Permissions required: bb.policies.update</p></td>
</tr>
<tr>
- <td>AICompletion</td>
- <td><a href="#bytebase.v1.AICompletionRequest">AICompletionRequest</a></td>
- <td><a href="#bytebase.v1.AICompletionResponse">AICompletionResponse</a></td>
- <td><p>Provides AI-powered SQL completion and generation.
-Permissions required: None (authenticated users only, requires AI to be enabled)</p></td>
+ <td>DeletePolicy</td>
+ <td><a href="#bytebase.v1.DeletePolicyRequest">DeletePolicyRequest</a></td>
+ <td><a href="#google.protobuf.Empty">.google.protobuf.Empty</a></td>
+ <td><p>Deletes an organizational policy.
+Permissions required: bb.policies.delete</p></td>
</tr>
</tbody>
@@ -21851,25 +21516,81 @@ Permissions required: None (authenticated users only, requires AI to be enabled)
<td>Pattern</td>
<td>Body</td>
</tr>
- </thead>
- <tbody>
-
-
+ </thead>
+ <tbody>
+
+
+
+ <tr>
+ <td>GetPolicy</td>
+ <td>GET</td>
+ <td>/v1/{name=policies/*}</td>
+ <td></td>
+ </tr>
+
+ <tr>
+ <td>GetPolicy</td>
+ <td>GET</td>
+ <td>/v1/{name=projects/*/policies/*}</td>
+ <td></td>
+ </tr>
+
+ <tr>
+ <td>GetPolicy</td>
+ <td>GET</td>
+ <td>/v1/{name=environments/*/policies/*}</td>
+ <td></td>
+ </tr>
+
+ <tr>
+ <td>GetPolicy</td>
+ <td>GET</td>
+ <td>/v1/{name=instances/*/policies/*}</td>
+ <td></td>
+ </tr>
+
+ <tr>
+ <td>GetPolicy</td>
+ <td>GET</td>
+ <td>/v1/{name=instances/*/databases/*/policies/*}</td>
+ <td></td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>ListPolicies</td>
+ <td>GET</td>
+ <td>/v1/policies</td>
+ <td></td>
+ </tr>
+
+ <tr>
+ <td>ListPolicies</td>
+ <td>GET</td>
+ <td>/v1/{parent=projects/*}/policies</td>
+ <td></td>
+ </tr>
+
+ <tr>
+ <td>ListPolicies</td>
+ <td>GET</td>
+ <td>/v1/{parent=environments/*}/policies</td>
+ <td></td>
+ </tr>
<tr>
- <td>Query</td>
- <td>POST</td>
- <td>/v1/{name=instances/*/databases/*}:query</td>
- <td>*</td>
+ <td>ListPolicies</td>
+ <td>GET</td>
+ <td>/v1/{parent=instances/*}/policies</td>
+ <td></td>
</tr>
-
-
-
<tr>
- <td>AdminExecute</td>
+ <td>ListPolicies</td>
<td>GET</td>
- <td>/v1:adminExecute</td>
+ <td>/v1/{parent=instances/*/databases/*}/policies</td>
<td></td>
</tr>
@@ -21877,70 +21598,258 @@ Permissions required: None (authenticated users only, requires AI to be enabled)
<tr>
- <td>SearchQueryHistories</td>
+ <td>CreatePolicy</td>
<td>POST</td>
- <td>/v1/queryHistories:search</td>
- <td>*</td>
+ <td>/v1/policies</td>
+ <td>policy</td>
</tr>
-
-
+ <tr>
+ <td>CreatePolicy</td>
+ <td>POST</td>
+ <td>/v1/{parent=projects/*}/policies</td>
+ <td>policy</td>
+ </tr>
<tr>
- <td>Export</td>
+ <td>CreatePolicy</td>
<td>POST</td>
- <td>/v1/{name=instances/*/databases/*}:export</td>
- <td>*</td>
+ <td>/v1/{parent=environments/*}/policies</td>
+ <td>policy</td>
</tr>
<tr>
- <td>Export</td>
+ <td>CreatePolicy</td>
<td>POST</td>
- <td>/v1/{name=projects/*/rollouts/*}:export</td>
- <td>*</td>
+ <td>/v1/{parent=instances/*}/policies</td>
+ <td>policy</td>
</tr>
<tr>
- <td>Export</td>
+ <td>CreatePolicy</td>
<td>POST</td>
- <td>/v1/{name=projects/*/rollouts/*/stages/*}:export</td>
- <td>*</td>
+ <td>/v1/{parent=instances/*/databases/*}/policies</td>
+ <td>policy</td>
</tr>
<tr>
- <td>DiffMetadata</td>
- <td>POST</td>
- <td>/v1/schemaDesign:diffMetadata</td>
- <td>*</td>
+ <td>UpdatePolicy</td>
+ <td>PATCH</td>
+ <td>/v1/{policy.name=policies/*}</td>
+ <td>policy</td>
+ </tr>
+
+ <tr>
+ <td>UpdatePolicy</td>
+ <td>PATCH</td>
+ <td>/v1/{policy.name=projects/*/policies/*}</td>
+ <td>policy</td>
+ </tr>
+
+ <tr>
+ <td>UpdatePolicy</td>
+ <td>PATCH</td>
+ <td>/v1/{policy.name=environments/*/policies/*}</td>
+ <td>policy</td>
+ </tr>
+
+ <tr>
+ <td>UpdatePolicy</td>
+ <td>PATCH</td>
+ <td>/v1/{policy.name=instances/*/policies/*}</td>
+ <td>policy</td>
+ </tr>
+
+ <tr>
+ <td>UpdatePolicy</td>
+ <td>PATCH</td>
+ <td>/v1/{policy.name=instances/*/databases/*/policies/*}</td>
+ <td>policy</td>
</tr>
<tr>
- <td>AICompletion</td>
- <td>POST</td>
- <td>/v1/sql/aiCompletion</td>
- <td>*</td>
+ <td>DeletePolicy</td>
+ <td>DELETE</td>
+ <td>/v1/{name=policies/*}</td>
+ <td></td>
+ </tr>
+
+ <tr>
+ <td>DeletePolicy</td>
+ <td>DELETE</td>
+ <td>/v1/{name=projects/*/policies/*}</td>
+ <td></td>
+ </tr>
+
+ <tr>
+ <td>DeletePolicy</td>
+ <td>DELETE</td>
+ <td>/v1/{name=environments/*/policies/*}</td>
+ <td></td>
+ </tr>
+
+ <tr>
+ <td>DeletePolicy</td>
+ <td>DELETE</td>
+ <td>/v1/{name=instances/*/policies/*}</td>
+ <td></td>
+ </tr>
+
+ <tr>
+ <td>DeletePolicy</td>
+ <td>DELETE</td>
+ <td>/v1/{name=instances/*/databases/*/policies/*}</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.AICompletionRequest">AICompletionRequest</h3>
+ <p></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.AICompletionRequest.Message">AICompletionRequest.Message</a></td>
+ <td>repeated</td>
+ <td><p> </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.AICompletionRequest.Message">AICompletionRequest.Message</h3>
+ <p></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> </p></td>
+ </tr>
+
+ <tr>
+ <td>content</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.AICompletionResponse">AICompletionResponse</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>candidates</td>
+ <td><a href="#bytebase.v1.AICompletionResponse.Candidate">AICompletionResponse.Candidate</a></td>
+ <td>repeated</td>
+ <td><p>candidates is used for results with multiple choices and candidates. Used
+for OpenAI and Gemini. </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.AICompletionResponse.Candidate">AICompletionResponse.Candidate</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>content</td>
+ <td><a href="#bytebase.v1.AICompletionResponse.Candidate.Content">AICompletionResponse.Candidate.Content</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.AICompletionResponse.Candidate.Content">AICompletionResponse.Candidate.Content</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>parts</td>
+ <td><a href="#bytebase.v1.AICompletionResponse.Candidate.Content.Part">AICompletionResponse.Candidate.Content.Part</a></td>
+ <td>repeated</td>
+ <td><p>parts is used for a result content with multiple parts. </p></td>
+ </tr>
+
</tbody>
</table>
+
-
-
-
- <div class="file-heading">
- <h2 id="v1/plan_service.proto">v1/plan_service.proto</h2><a href="#title">Top</a>
- </div>
- <p></p>
+
- <h3 id="bytebase.v1.BatchCancelPlanCheckRunsRequest">BatchCancelPlanCheckRunsRequest</h3>
+ <h3 id="bytebase.v1.AICompletionResponse.Candidate.Content.Part">AICompletionResponse.Candidate.Content.Part</h3>
<p></p>
@@ -21951,20 +21860,10 @@ Permissions required: None (authenticated users only, requires AI to be enabled)
<tbody>
<tr>
- <td>parent</td>
+ <td>text</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The name of the parent of the planChecks.
-Format: projects/{project}/plans/{plan} </p></td>
- </tr>
-
- <tr>
- <td>plan_check_runs</td>
- <td><a href="#string">string</a></td>
- <td>repeated</td>
- <td><p>TODO(d): update this API.
-The planCheckRuns to cancel.
-Format: projects/{project}/plans/{plan}/planCheckRuns/{planCheckRun} </p></td>
+ <td><p> </p></td>
</tr>
</tbody>
@@ -21974,14 +21873,7 @@ Format: projects/{project}/plans/{plan}/planCheckRuns/{planCheckRun} </p></td>
- <h3 id="bytebase.v1.BatchCancelPlanCheckRunsResponse">BatchCancelPlanCheckRunsResponse</h3>
- <p></p>
-
-
-
-
-
- <h3 id="bytebase.v1.CreatePlanRequest">CreatePlanRequest</h3>
+ <h3 id="bytebase.v1.AdminExecuteRequest">AdminExecuteRequest</h3>
<p></p>
@@ -21992,18 +21884,41 @@ Format: projects/{project}/plans/{plan}/planCheckRuns/{planCheckRun} </p></td>
<tbody>
<tr>
- <td>parent</td>
+ <td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The parent project where this plan will be created.
-Format: projects/{project} </p></td>
+ <td><p>The name is the instance name to execute the query against.
+Format: instances/{instance}/databases/{databaseName} </p></td>
</tr>
<tr>
- <td>plan</td>
- <td><a href="#bytebase.v1.Plan">Plan</a></td>
+ <td>statement</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>The plan to create. </p></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>
@@ -22013,7 +21928,7 @@ Format: projects/{project} </p></td>
- <h3 id="bytebase.v1.GetPlanRequest">GetPlanRequest</h3>
+ <h3 id="bytebase.v1.AdminExecuteResponse">AdminExecuteResponse</h3>
<p></p>
@@ -22024,11 +21939,10 @@ Format: projects/{project} </p></td>
<tbody>
<tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The name of the plan to retrieve.
-Format: projects/{project}/plans/{plan} </p></td>
+ <td>results</td>
+ <td><a href="#bytebase.v1.QueryResult">QueryResult</a></td>
+ <td>repeated</td>
+ <td><p>The query results. </p></td>
</tr>
</tbody>
@@ -22038,7 +21952,7 @@ Format: projects/{project}/plans/{plan} </p></td>
- <h3 id="bytebase.v1.ListPlanCheckRunsRequest">ListPlanCheckRunsRequest</h3>
+ <h3 id="bytebase.v1.Advice">Advice</h3>
<p></p>
@@ -22049,36 +21963,106 @@ Format: projects/{project}/plans/{plan} </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 plan check runs.
-Format: projects/{project}/plans/{plan} </p></td>
+ <td><p>The advice level. </p></td>
</tr>
<tr>
- <td>latest_only</td>
- <td><a href="#bool">bool</a></td>
+ <td>code</td>
+ <td><a href="#int32">int32</a></td>
<td></td>
- <td><p>If set to true, only the latest plan check run will be returned. </p></td>
+ <td><p>The advice code. </p></td>
</tr>
<tr>
- <td>filter</td>
+ <td>title</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>Filter is used to filter plan check runs returned in the list.
-The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
+ <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>
+
+ </tbody>
+ </table>
-Supported filters:
-- status: the plan check run status, support &#34;==&#34; and &#34;in&#34; operator, check the Status enum in the PlanCheckRun message for the values.
-- result_status: the plan check run result status, support &#34;==&#34; and &#34;in&#34; operator, check the Result.Status enum in the PlanCheckRun message for the values.
+
-For example:
-status in [&#34;DONE&#34;, &#34;FAILED&#34;]
-status == &#34;RUNNING&#34;
-result_status in [&#34;SUCCESS&#34;, &#34;ERROR&#34;]
-result_status == &#34;WARNING&#34; </p></td>
+
+
+ <h3 id="bytebase.v1.DiffMetadataRequest">DiffMetadataRequest</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>source_metadata</td>
+ <td><a href="#bytebase.v1.DatabaseMetadata">DatabaseMetadata</a></td>
+ <td></td>
+ <td><p>The metadata of the source schema. </p></td>
+ </tr>
+
+ <tr>
+ <td>target_metadata</td>
+ <td><a href="#bytebase.v1.DatabaseMetadata">DatabaseMetadata</a></td>
+ <td></td>
+ <td><p>The metadata of the target schema. </p></td>
+ </tr>
+
+ <tr>
+ <td>source_catalog</td>
+ <td><a href="#bytebase.v1.DatabaseCatalog">DatabaseCatalog</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>target_catalog</td>
+ <td><a href="#bytebase.v1.DatabaseCatalog">DatabaseCatalog</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>engine</td>
+ <td><a href="#bytebase.v1.Engine">Engine</a></td>
+ <td></td>
+ <td><p>The database engine of the schema. </p></td>
+ </tr>
+
+ <tr>
+ <td>classification_from_config</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>If false, we will build the raw common by classification in database
+config. </p></td>
</tr>
</tbody>
@@ -22088,7 +22072,7 @@ result_status == &#34;WARNING&#34; </p></td>
- <h3 id="bytebase.v1.ListPlanCheckRunsResponse">ListPlanCheckRunsResponse</h3>
+ <h3 id="bytebase.v1.DiffMetadataResponse">DiffMetadataResponse</h3>
<p></p>
@@ -22099,10 +22083,10 @@ result_status == &#34;WARNING&#34; </p></td>
<tbody>
<tr>
- <td>plan_check_runs</td>
- <td><a href="#bytebase.v1.PlanCheckRun">PlanCheckRun</a></td>
- <td>repeated</td>
- <td><p>The plan check runs from the specified request. </p></td>
+ <td>diff</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The diff of the metadata. </p></td>
</tr>
</tbody>
@@ -22112,7 +22096,7 @@ result_status == &#34;WARNING&#34; </p></td>
- <h3 id="bytebase.v1.ListPlansRequest">ListPlansRequest</h3>
+ <h3 id="bytebase.v1.ExportRequest">ExportRequest</h3>
<p></p>
@@ -22123,33 +22107,68 @@ result_status == &#34;WARNING&#34; </p></td>
<tbody>
<tr>
- <td>parent</td>
+ <td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The parent, which owns this collection of plans.
-Format: projects/{project}
-Use &#34;projects/-&#34; to list all plans from all projects. </p></td>
+ <td><p>The name is the resource name to execute the export against.
+Format: instances/{instance}/databases/{database}
+Format: instances/{instance}
+Format: projects/{project}/rollouts/{rollout}
+Format: projects/{project}/rollouts/{rollout}/stages/{stage} </p></td>
</tr>
<tr>
- <td>page_size</td>
+ <td>statement</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The SQL statement to execute. </p></td>
+ </tr>
+
+ <tr>
+ <td>limit</td>
<td><a href="#int32">int32</a></td>
<td></td>
- <td><p>The maximum number of plans to return. The service may return fewer than
-this value.
-If unspecified, at most 10 plans will be returned.
-The maximum value is 1000; values above 1000 will be coerced to 1000. </p></td>
+ <td><p>The maximum number of rows to return. </p></td>
+ </tr>
+
+ <tr>
+ <td>format</td>
+ <td><a href="#bytebase.v1.ExportFormat">ExportFormat</a></td>
+ <td></td>
+ <td><p>The export format. </p></td>
+ </tr>
+
+ <tr>
+ <td>admin</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>The admin is used for workspace owner and DBA for exporting data from SQL
+Editor Admin mode. The exported data is not masked. </p></td>
+ </tr>
+
+ <tr>
+ <td>password</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The zip password provide by users. </p></td>
+ </tr>
+
+ <tr>
+ <td>data_source_id</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The id of data source.
+It is used for querying admin data source even if the instance has
+read-only data sources. Or it can be used to query a specific read-only
+data source. </p></td>
</tr>
<tr>
- <td>page_token</td>
+ <td>schema</td>
<td><a href="#string">string</a></td>
- <td></td>
- <td><p>A page token, received from a previous `ListPlans` call.
-Provide this to retrieve the subsequent page.
-
-When paginating, all other parameters provided to `ListPlans` must match
-the call that provided the page token. </p></td>
+ <td>optional</td>
+ <td><p>The default schema to search objects. Equals to the current schema in
+Oracle and search path in Postgres. </p></td>
</tr>
</tbody>
@@ -22159,7 +22178,7 @@ the call that provided the page token. </p></td>
- <h3 id="bytebase.v1.ListPlansResponse">ListPlansResponse</h3>
+ <h3 id="bytebase.v1.ExportResponse">ExportResponse</h3>
<p></p>
@@ -22170,18 +22189,10 @@ the call that provided the page token. </p></td>
<tbody>
<tr>
- <td>plans</td>
- <td><a href="#bytebase.v1.Plan">Plan</a></td>
- <td>repeated</td>
- <td><p>The plans from the specified request. </p></td>
- </tr>
-
- <tr>
- <td>next_page_token</td>
- <td><a href="#string">string</a></td>
+ <td>content</td>
+ <td><a href="#bytes">bytes</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 export file content. </p></td>
</tr>
</tbody>
@@ -22191,7 +22202,7 @@ If this field is omitted, there are no subsequent pages. </p></td>
- <h3 id="bytebase.v1.Plan">Plan</h3>
+ <h3 id="bytebase.v1.MaskingReason">MaskingReason</h3>
<p></p>
@@ -22202,98 +22213,52 @@ If this field is omitted, there are no subsequent pages. </p></td>
<tbody>
<tr>
- <td>name</td>
+ <td>semantic_type_id</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>
+ <td><p>The semantic type that triggered masking (e.g., &#34;SSN&#34;, &#34;email&#34;, &#34;phone&#34;). </p></td>
</tr>
<tr>
- <td>issue</td>
+ <td>semantic_type_title</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>
+ <td><p>Human-readable semantic type title. </p></td>
</tr>
<tr>
- <td>rollout</td>
+ <td>masking_rule_id</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The rollout associated with the plan.
-Can be empty.
-Format: projects/{project}/rollouts/{rollout} </p></td>
+ <td><p>The masking rule ID that matched (if applicable). </p></td>
</tr>
<tr>
- <td>title</td>
+ <td>algorithm</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The title of the plan. </p></td>
+ <td><p>The masking algorithm used. </p></td>
</tr>
<tr>
- <td>description</td>
+ <td>context</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>Additional context (e.g., &#34;Matched global rule: PII Protection&#34;). </p></td>
</tr>
<tr>
- <td>creator</td>
+ <td>classification_level</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>Format: users/[email protected] </p></td>
- </tr>
-
- <tr>
- <td>create_time</td>
- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>update_time</td>
- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>plan_check_run_status_count</td>
- <td><a href="#bytebase.v1.Plan.PlanCheckRunStatusCountEntry">Plan.PlanCheckRunStatusCountEntry</a></td>
- <td>repeated</td>
- <td><p>The status count of the latest plan check runs.
-Keys are:
-- SUCCESS
-- WARNING
-- ERROR
-- RUNNING </p></td>
+ <td><p>Whether masking was due to classification level. </p></td>
</tr>
<tr>
- <td>deployment</td>
- <td><a href="#bytebase.v1.Plan.Deployment">Plan.Deployment</a></td>
+ <td>semantic_type_icon</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>Icon associated with the semantic type (if any). </p></td>
</tr>
</tbody>
@@ -22303,7 +22268,7 @@ Keys are:
- <h3 id="bytebase.v1.Plan.ChangeDatabaseConfig">Plan.ChangeDatabaseConfig</h3>
+ <h3 id="bytebase.v1.QueryHistory">QueryHistory</h3>
<p></p>
@@ -22314,57 +22279,61 @@ Keys are:
<tbody>
<tr>
- <td>targets</td>
+ <td>name</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 name for the query history.
+Format: queryHistories/{uid} </p></td>
</tr>
<tr>
- <td>sheet</td>
+ <td>database</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The resource name of the sheet.
-Format: projects/{project}/sheets/{sheet} </p></td>
+ <td><p>The database name to execute the query.
+Format: instances/{instance}/databases/{databaseName} </p></td>
</tr>
<tr>
- <td>release</td>
+ <td>creator</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> </p></td>
</tr>
<tr>
- <td>type</td>
- <td><a href="#bytebase.v1.DatabaseChangeType">DatabaseChangeType</a></td>
+ <td>create_time</td>
+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
<td></td>
- <td><p>Type is the database change type. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>migration_type</td>
- <td><a href="#bytebase.v1.MigrationType">MigrationType</a></td>
+ <td>statement</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>migration_type is the migration type for imperative schema migration.
-It is only set when type is MIGRATE. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>ghost_flags</td>
- <td><a href="#bytebase.v1.Plan.ChangeDatabaseConfig.GhostFlagsEntry">Plan.ChangeDatabaseConfig.GhostFlagsEntry</a></td>
- <td>repeated</td>
+ <td>error</td>
+ <td><a href="#string">string</a></td>
+ <td>optional</td>
<td><p> </p></td>
</tr>
<tr>
- <td>enable_prior_backup</td>
- <td><a href="#bool">bool</a></td>
+ <td>duration</td>
+ <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>
<td></td>
- <td><p>If set, a backup of the modified data will be created automatically before any changes are applied. </p></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>
@@ -22374,7 +22343,7 @@ It is only set when type is MIGRATE. </p></td>
- <h3 id="bytebase.v1.Plan.ChangeDatabaseConfig.GhostFlagsEntry">Plan.ChangeDatabaseConfig.GhostFlagsEntry</h3>
+ <h3 id="bytebase.v1.QueryOption">QueryOption</h3>
<p></p>
@@ -22385,15 +22354,8 @@ It is only set when type is MIGRATE. </p></td>
<tbody>
<tr>
- <td>key</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>value</td>
- <td><a href="#string">string</a></td>
+ <td>redis_run_commands_on</td>
+ <td><a href="#bytebase.v1.QueryOption.RedisRunCommandsOn">QueryOption.RedisRunCommandsOn</a></td>
<td></td>
<td><p> </p></td>
</tr>
@@ -22405,7 +22367,7 @@ It is only set when type is MIGRATE. </p></td>
- <h3 id="bytebase.v1.Plan.CreateDatabaseConfig">Plan.CreateDatabaseConfig</h3>
+ <h3 id="bytebase.v1.QueryRequest">QueryRequest</h3>
<p></p>
@@ -22416,93 +22378,65 @@ It is only set when type is MIGRATE. </p></td>
<tbody>
<tr>
- <td>target</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The resource name of the instance on which the database is created.
-Format: instances/{instance} </p></td>
- </tr>
-
- <tr>
- <td>database</td>
+ <td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The name of the database to create. </p></td>
+ <td><p>The name is the instance name to execute the query against.
+Format: instances/{instance}/databases/{databaseName} </p></td>
</tr>
<tr>
- <td>table</td>
+ <td>statement</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>table is the name of the table, if it is not empty, Bytebase should create a table after creating the database.
-For example, in MongoDB, it only creates the database when we first store data in that database. </p></td>
+ <td><p>The SQL statement to execute. </p></td>
</tr>
<tr>
- <td>character_set</td>
- <td><a href="#string">string</a></td>
+ <td>limit</td>
+ <td><a href="#int32">int32</a></td>
<td></td>
- <td><p>character_set is the character set of the database. </p></td>
+ <td><p>The maximum number of rows to return. </p></td>
</tr>
<tr>
- <td>collation</td>
+ <td>data_source_id</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>collation is the collation of the database. </p></td>
+ <td><p>The id of data source.
+It is used for querying admin data source even if the instance has
+read-only data sources. Or it can be used to query a specific read-only
+data source. </p></td>
</tr>
<tr>
- <td>cluster</td>
- <td><a href="#string">string</a></td>
+ <td>explain</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p>cluster is the cluster of the database. This is only applicable to ClickHouse for &#34;ON CLUSTER &lt;&lt;cluster&gt;&gt;&#34;. </p></td>
+ <td><p>Explain the statement. </p></td>
</tr>
<tr>
- <td>owner</td>
+ <td>schema</td>
<td><a href="#string">string</a></td>
- <td></td>
- <td><p>owner is the owner of the database. This is only applicable to Postgres for &#34;WITH OWNER &lt;&lt;owner&gt;&gt;&#34;. </p></td>
+ <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>environment</td>
- <td><a href="#string">string</a></td>
+ <td>query_option</td>
+ <td><a href="#bytebase.v1.QueryOption">QueryOption</a></td>
<td></td>
- <td><p>The environment resource.
-Format: environments/prod where prod is the environment resource ID. </p></td>
+ <td><p> </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.Plan.Deployment">Plan.Deployment</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
<tr>
- <td>environments</td>
+ <td>container</td>
<td><a href="#string">string</a></td>
- <td>repeated</td>
- <td><p>The environments deploy order. </p></td>
- </tr>
-
- <tr>
- <td>database_group_mappings</td>
- <td><a href="#bytebase.v1.Plan.Deployment.DatabaseGroupMapping">Plan.Deployment.DatabaseGroupMapping</a></td>
- <td>repeated</td>
- <td><p>The database group mapping. </p></td>
+ <td>optional</td>
+ <td><p>Container is the container name to execute the query against, used for
+CosmosDB only. </p></td>
</tr>
</tbody>
@@ -22512,7 +22446,7 @@ Format: environments/prod where prod is the environment resource ID. </p></td>
- <h3 id="bytebase.v1.Plan.Deployment.DatabaseGroupMapping">Plan.Deployment.DatabaseGroupMapping</h3>
+ <h3 id="bytebase.v1.QueryResponse">QueryResponse</h3>
<p></p>
@@ -22523,17 +22457,10 @@ Format: environments/prod where prod is the environment resource ID. </p></td>
<tbody>
<tr>
- <td>database_group</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>Format: projects/{project}/databaseGroups/{databaseGroup}. </p></td>
- </tr>
-
- <tr>
- <td>databases</td>
- <td><a href="#string">string</a></td>
+ <td>results</td>
+ <td><a href="#bytebase.v1.QueryResult">QueryResult</a></td>
<td>repeated</td>
- <td><p>Format: instances/{instance-id}/databases/{database-name}. </p></td>
+ <td><p>The query results. </p></td>
</tr>
</tbody>
@@ -22543,7 +22470,7 @@ Format: environments/prod where prod is the environment resource ID. </p></td>
- <h3 id="bytebase.v1.Plan.ExportDataConfig">Plan.ExportDataConfig</h3>
+ <h3 id="bytebase.v1.QueryResult">QueryResult</h3>
<p></p>
@@ -22554,35 +22481,82 @@ Format: environments/prod where prod is the environment resource ID. </p></td>
<tbody>
<tr>
- <td>targets</td>
+ <td>column_names</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><p>Column names of the query result. </p></td>
</tr>
<tr>
- <td>sheet</td>
+ <td>column_type_names</td>
+ <td><a href="#string">string</a></td>
+ <td>repeated</td>
+ <td><p>Column types of the query result.
+The types come from the Golang SQL driver. </p></td>
+ </tr>
+
+ <tr>
+ <td>rows</td>
+ <td><a href="#bytebase.v1.QueryRow">QueryRow</a></td>
+ <td>repeated</td>
+ <td><p>Rows of the query result. </p></td>
+ </tr>
+
+ <tr>
+ <td>rows_count</td>
+ <td><a href="#int64">int64</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>error</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The resource name of the sheet.
-Format: projects/{project}/sheets/{sheet} </p></td>
+ <td><p>The error message if the query failed. </p></td>
</tr>
<tr>
- <td>format</td>
- <td><a href="#bytebase.v1.ExportFormat">ExportFormat</a></td>
+ <td>latency</td>
+ <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>
<td></td>
- <td><p>The format of the exported file. </p></td>
+ <td><p>The time it takes to execute the query. </p></td>
</tr>
<tr>
- <td>password</td>
+ <td>statement</td>
<td><a href="#string">string</a></td>
- <td>optional</td>
- <td><p>The zip password provide by users.
-Leave it empty if no needs to encrypt the zip file. </p></td>
+ <td></td>
+ <td><p>The query statement for the result. </p></td>
+ </tr>
+
+ <tr>
+ <td>postgres_error</td>
+ <td><a href="#bytebase.v1.QueryResult.PostgresError">QueryResult.PostgresError</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>allow_export</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>The query result is allowed to be exported or not. </p></td>
+ </tr>
+
+ <tr>
+ <td>messages</td>
+ <td><a href="#bytebase.v1.QueryResult.Message">QueryResult.Message</a></td>
+ <td>repeated</td>
+ <td><p>Informational or debug messages returned by the database engine during query execution.
+Examples include PostgreSQL&#39;s RAISE NOTICE, MSSQL&#39;s PRINT, or Oracle&#39;s DBMS_OUTPUT.PUT_LINE. </p></td>
+ </tr>
+
+ <tr>
+ <td>masked</td>
+ <td><a href="#bytebase.v1.MaskingReason">MaskingReason</a></td>
+ <td>repeated</td>
+ <td><p>Masking reasons for each column (empty for non-masked columns). </p></td>
</tr>
</tbody>
@@ -22592,7 +22566,7 @@ Leave it empty if no needs to encrypt the zip file. </p></td>
- <h3 id="bytebase.v1.Plan.PlanCheckRunStatusCountEntry">Plan.PlanCheckRunStatusCountEntry</h3>
+ <h3 id="bytebase.v1.QueryResult.Message">QueryResult.Message</h3>
<p></p>
@@ -22603,15 +22577,15 @@ Leave it empty if no needs to encrypt the zip file. </p></td>
<tbody>
<tr>
- <td>key</td>
- <td><a href="#string">string</a></td>
+ <td>level</td>
+ <td><a href="#bytebase.v1.QueryResult.Message.Level">QueryResult.Message.Level</a></td>
<td></td>
<td><p> </p></td>
</tr>
<tr>
- <td>value</td>
- <td><a href="#int32">int32</a></td>
+ <td>content</td>
+ <td><a href="#string">string</a></td>
<td></td>
<td><p> </p></td>
</tr>
@@ -22623,8 +22597,8 @@ Leave it empty if no needs to encrypt the zip file. </p></td>
- <h3 id="bytebase.v1.Plan.Spec">Plan.Spec</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">
@@ -22634,102 +22608,120 @@ Leave it empty if no needs to encrypt the zip file. </p></td>
<tbody>
<tr>
- <td>id</td>
+ <td>severity</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>A UUID4 string that uniquely identifies the Spec. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>create_database_config</td>
- <td><a href="#bytebase.v1.Plan.CreateDatabaseConfig">Plan.CreateDatabaseConfig</a></td>
+ <td>code</td>
+ <td><a href="#string">string</a></td>
<td></td>
<td><p> </p></td>
</tr>
<tr>
- <td>change_database_config</td>
- <td><a href="#bytebase.v1.Plan.ChangeDatabaseConfig">Plan.ChangeDatabaseConfig</a></td>
+ <td>message</td>
+ <td><a href="#string">string</a></td>
<td></td>
<td><p> </p></td>
</tr>
<tr>
- <td>export_data_config</td>
- <td><a href="#bytebase.v1.Plan.ExportDataConfig">Plan.ExportDataConfig</a></td>
+ <td>detail</td>
+ <td><a href="#string">string</a></td>
<td></td>
<td><p> </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.PlanCheckRun">PlanCheckRun</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
+ <tr>
+ <td>hint</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
<tr>
- <td>name</td>
+ <td>position</td>
+ <td><a href="#int32">int32</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>internal_position</td>
+ <td><a href="#int32">int32</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>internal_query</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>Format: projects/{project}/plans/{plan}/planCheckRuns/{planCheckRun} </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>type</td>
- <td><a href="#bytebase.v1.PlanCheckRun.Type">PlanCheckRun.Type</a></td>
+ <td>where</td>
+ <td><a href="#string">string</a></td>
<td></td>
<td><p> </p></td>
</tr>
<tr>
- <td>status</td>
- <td><a href="#bytebase.v1.PlanCheckRun.Status">PlanCheckRun.Status</a></td>
+ <td>schema_name</td>
+ <td><a href="#string">string</a></td>
<td></td>
<td><p> </p></td>
</tr>
<tr>
- <td>target</td>
+ <td>table_name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>Format: instances/{instance}/databases/{database} </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>sheet</td>
+ <td>column_name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>Format: project/{project}/sheets/{sheet} </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>results</td>
- <td><a href="#bytebase.v1.PlanCheckRun.Result">PlanCheckRun.Result</a></td>
- <td>repeated</td>
+ <td>data_type_name</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
<td><p> </p></td>
</tr>
<tr>
- <td>error</td>
+ <td>constraint_name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>error is set if the Status is FAILED. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>create_time</td>
- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
+ <td>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>
@@ -22741,7 +22733,31 @@ Leave it empty if no needs to encrypt the zip file. </p></td>
- <h3 id="bytebase.v1.PlanCheckRun.Result">PlanCheckRun.Result</h3>
+ <h3 id="bytebase.v1.QueryRow">QueryRow</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>values</td>
+ <td><a href="#bytebase.v1.RowValue">RowValue</a></td>
+ <td>repeated</td>
+ <td><p>Row values of the query result. </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.RowValue">RowValue</h3>
<p></p>
@@ -22752,76 +22768,98 @@ Leave it empty if no needs to encrypt the zip file. </p></td>
<tbody>
<tr>
- <td>status</td>
- <td><a href="#bytebase.v1.Advice.Level">Advice.Level</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>title</td>
- <td><a href="#string">string</a></td>
+ <td>int32_value</td>
+ <td><a href="#int32">int32</a></td>
<td></td>
<td><p> </p></td>
</tr>
<tr>
- <td>content</td>
- <td><a href="#string">string</a></td>
+ <td>int64_value</td>
+ <td><a href="#int64">int64</a></td>
<td></td>
<td><p> </p></td>
</tr>
<tr>
- <td>code</td>
- <td><a href="#int32">int32</a></td>
+ <td>string_value</td>
+ <td><a href="#string">string</a></td>
<td></td>
<td><p> </p></td>
</tr>
<tr>
- <td>sql_summary_report</td>
- <td><a href="#bytebase.v1.PlanCheckRun.Result.SqlSummaryReport">PlanCheckRun.Result.SqlSummaryReport</a></td>
+ <td>uint32_value</td>
+ <td><a href="#uint32">uint32</a></td>
<td></td>
<td><p> </p></td>
</tr>
<tr>
- <td>sql_review_report</td>
- <td><a href="#bytebase.v1.PlanCheckRun.Result.SqlReviewReport">PlanCheckRun.Result.SqlReviewReport</a></td>
+ <td>uint64_value</td>
+ <td><a href="#uint64">uint64</a></td>
<td></td>
<td><p> </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>value_value</td>
+ <td><a href="#google.protobuf.Value">google.protobuf.Value</a></td>
+ <td></td>
+ <td><p>value_value is used for Spanner and TUPLE ARRAY MAP in Clickhouse only. </p></td>
+ </tr>
<tr>
- <td>start_position</td>
- <td><a href="#bytebase.v1.Position">Position</a></td>
+ <td>timestamp_value</td>
+ <td><a href="#bytebase.v1.RowValue.Timestamp">RowValue.Timestamp</a></td>
<td></td>
- <td><p>Position of the SQL statement. </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>end_position</td>
- <td><a href="#bytebase.v1.Position">Position</a></td>
+ <td>timestamp_tz_value</td>
+ <td><a href="#bytebase.v1.RowValue.TimestampTZ">RowValue.TimestampTZ</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>timestamp_tz_value is used for the timestamptz data type, which
+accurately represents the timestamp with location information. </p></td>
</tr>
</tbody>
@@ -22831,7 +22869,7 @@ Leave it empty if no needs to encrypt the zip file. </p></td>
- <h3 id="bytebase.v1.PlanCheckRun.Result.SqlSummaryReport">PlanCheckRun.Result.SqlSummaryReport</h3>
+ <h3 id="bytebase.v1.RowValue.Timestamp">RowValue.Timestamp</h3>
<p></p>
@@ -22842,24 +22880,17 @@ Leave it empty if no needs to encrypt the zip file. </p></td>
<tbody>
<tr>
- <td>statement_types</td>
- <td><a href="#string">string</a></td>
- <td>repeated</td>
- <td><p>statement_types are the types of statements that are found in the sql. </p></td>
- </tr>
-
- <tr>
- <td>affected_rows</td>
- <td><a href="#int64">int64</a></td>
+ <td>google_timestamp</td>
+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
<td></td>
<td><p> </p></td>
</tr>
<tr>
- <td>changed_resources</td>
- <td><a href="#bytebase.v1.ChangedResources">ChangedResources</a></td>
+ <td>accuracy</td>
+ <td><a href="#int32">int32</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The accuracy is the number of digits after the decimal point. </p></td>
</tr>
</tbody>
@@ -22869,7 +22900,7 @@ Leave it empty if no needs to encrypt the zip file. </p></td>
- <h3 id="bytebase.v1.RunPlanChecksRequest">RunPlanChecksRequest</h3>
+ <h3 id="bytebase.v1.RowValue.TimestampTZ">RowValue.TimestampTZ</h3>
<p></p>
@@ -22880,20 +22911,36 @@ Leave it empty if no needs to encrypt the zip file. </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 plan to run plan checks.
-Format: projects/{project}/plans/{plan} </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>spec_id</td>
+ <td>zone</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>Zone is the time zone abbreviations in timezone database such as &#34;PDT&#34;,
+&#34;PST&#34;. https://en.wikipedia.org/wiki/List_of_tz_database_time_zones We
+retrieve the time zone information from the timestamptz field in the
+database. A timestamp is in UTC or epoch time, and with zone info, we can
+convert it to a local time string. Zone and offset are returned by
+time.Time.Zone() </p></td>
+ </tr>
+
+ <tr>
+ <td>offset</td>
+ <td><a href="#int32">int32</a></td>
+ <td></td>
+ <td><p>The offset is in seconds east of UTC </p></td>
+ </tr>
+
+ <tr>
+ <td>accuracy</td>
+ <td><a href="#int32">int32</a></td>
+ <td></td>
+ <td><p> </p></td>
</tr>
</tbody>
@@ -22903,14 +22950,7 @@ If not set, all specs in the plan will be used. </p></td>
- <h3 id="bytebase.v1.RunPlanChecksResponse">RunPlanChecksResponse</h3>
- <p></p>
-
-
-
-
-
- <h3 id="bytebase.v1.SearchPlansRequest">SearchPlansRequest</h3>
+ <h3 id="bytebase.v1.SearchQueryHistoriesRequest">SearchQueryHistoriesRequest</h3>
<p></p>
@@ -22920,22 +22960,13 @@ If not set, all specs in the plan will be used. </p></td>
</thead>
<tbody>
- <tr>
- <td>parent</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The parent, which owns this collection of plans.
-Format: projects/{project}
-Use &#34;projects/-&#34; to list all plans from all projects. </p></td>
- </tr>
-
<tr>
<td>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>
@@ -22943,36 +22974,32 @@ 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 `SearchPlans` call.
-Provide this to retrieve the subsequent page.
-
-When paginating, all other parameters provided to `SearchPlans` must match
-the call that provided the page token. </p></td>
+ <td><p>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 used to filter plans returned in the list.
+ <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 filters:
-- creator: the plan creator full name in &#34;users/{email or id}&#34; format, support &#34;==&#34; operator.
-- create_time: the plan create time in &#34;2006-01-02T15:04:05Z07:00&#34; format, support &#34;&gt;=&#34; or &#34;&lt;=&#34; operator.
-- has_pipeline: the plan has pipeline or not, support &#34;==&#34; operator, the value should be &#34;true&#34; or &#34;false&#34;.
-- has_issue: the plan has issue or not, support &#34;==&#34; operator, the value should be &#34;true&#34; or &#34;false&#34;.
-- title: the plan title, support &#34;==&#34; operator for exact match and &#34;.matches()&#34; operator for case-insensitive substring match.
-- spec_type: the plan spec config type, support &#34;==&#34; operator, the value should be &#34;create_database_config&#34;, &#34;change_database_config&#34;, or &#34;export_data_config&#34;.
-- state: the plan state, support &#34;==&#34; operator, the value should be &#34;ACTIVE&#34; or &#34;DELETED&#34;.
+Supported filter:
+- project: the project full name in &#34;projects/{id}&#34; format, support &#34;==&#34; operator.
+- database: the database full name in &#34;instances/{id}/databases/{name}&#34; format, support &#34;==&#34; operator.
+- instance: the instance full name in &#34;instances/{id}&#34; format, support &#34;==&#34; operator.
+- type: the type, should be &#34;QUERY&#34; or &#34;EXPORT&#34;, support &#34;==&#34; operator.
+- statement: the SQL statement, support &#34;.matches()&#34; operator.
For example:
-creator == &#34;users/[email protected]&#34; &amp;&amp; create_time &gt;= &#34;2025-01-02T15:04:05Z07:00&#34;
-has_pipeline == false &amp;&amp; has_issue == true
-title == &#34;My Plan&#34;
-title.matches(&#34;database migration&#34;)
-spec_type == &#34;change_database_config&#34;
-state == &#34;ACTIVE&#34; </p></td>
+project == &#34;projects/{project}&#34;
+database == &#34;instances/{instance}/databases/{database}&#34;
+instance == &#34;instances/{instance}&#34;
+type == &#34;QUERY&#34;
+type == &#34;EXPORT&#34;
+statement.matches(&#34;select&#34;)
+type == &#34;QUERY&#34; &amp;&amp; statement.matches(&#34;select&#34;) </p></td>
</tr>
</tbody>
@@ -22982,7 +23009,7 @@ state == &#34;ACTIVE&#34; </p></td>
- <h3 id="bytebase.v1.SearchPlansResponse">SearchPlansResponse</h3>
+ <h3 id="bytebase.v1.SearchQueryHistoriesResponse">SearchQueryHistoriesResponse</h3>
<p></p>
@@ -22993,18 +23020,19 @@ state == &#34;ACTIVE&#34; </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 history. </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
+`ListQueryHistory` method to retrieve the next page of history. </p></td>
</tr>
</tbody>
@@ -23014,51 +23042,44 @@ If this field is omitted, there are no subsequent pages. </p></td>
- <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></td>
- <td><p>The plan to update.
-
-The plan&#39;s `name` field is used to identify the plan to update.
-Format: projects/{project}/plans/{plan} </p></td>
- </tr>
-
- <tr>
- <td>update_mask</td>
- <td><a href="#google.protobuf.FieldMask">google.protobuf.FieldMask</a></td>
- <td></td>
- <td><p>The list of fields to update. </p></td>
- </tr>
-
- <tr>
- <td>allow_missing</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>If set to true, and the 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.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.PlanCheckRun.Status">PlanCheckRun.Status</h3>
+ <h3 id="bytebase.v1.QueryHistory.Type">QueryHistory.Type</h3>
<p></p>
<table class="enum-table">
<thead>
@@ -23067,39 +23088,56 @@ In this situation, `update_mask` is ignored. </p></td>
<tbody>
<tr>
- <td>STATUS_UNSPECIFIED</td>
+ <td>TYPE_UNSPECIFIED</td>
<td>0</td>
- <td><p></p></td>
+ <td><p>Unspecified query history type.</p></td>
</tr>
<tr>
- <td>RUNNING</td>
+ <td>QUERY</td>
<td>1</td>
- <td><p></p></td>
+ <td><p>Query execution for data retrieval.</p></td>
</tr>
<tr>
- <td>DONE</td>
+ <td>EXPORT</td>
<td>2</td>
- <td><p></p></td>
+ <td><p>Data export operation to file.</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>FAILED</td>
- <td>3</td>
- <td><p></p></td>
+ <td>SINGLE_NODE</td>
+ <td>1</td>
+ <td><p>Execute Redis commands on a single node in the cluster.</p></td>
</tr>
<tr>
- <td>CANCELED</td>
- <td>4</td>
- <td><p></p></td>
+ <td>ALL_NODES</td>
+ <td>2</td>
+ <td><p>Execute Redis commands on all nodes in the cluster for cluster-wide operations.</p></td>
</tr>
</tbody>
</table>
- <h3 id="bytebase.v1.PlanCheckRun.Type">PlanCheckRun.Type</h3>
+ <h3 id="bytebase.v1.QueryResult.Message.Level">QueryResult.Message.Level</h3>
<p></p>
<table class="enum-table">
<thead>
@@ -23108,39 +23146,45 @@ In this situation, `update_mask` is ignored. </p></td>
<tbody>
<tr>
- <td>TYPE_UNSPECIFIED</td>
+ <td>LEVEL_UNSPECIFIED</td>
<td>0</td>
- <td><p>Unspecified check type.</p></td>
+ <td><p>Unspecified message level.</p></td>
</tr>
<tr>
- <td>DATABASE_STATEMENT_FAKE_ADVISE</td>
+ <td>INFO</td>
<td>1</td>
- <td><p>Fake advise check for testing purposes without executing against database.</p></td>
+ <td><p>Informational message.</p></td>
</tr>
<tr>
- <td>DATABASE_STATEMENT_ADVISE</td>
+ <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>SQL review check that analyzes statements against configured SQL review rules.</p></td>
+ <td><p>Debug message for development and troubleshooting.</p></td>
</tr>
<tr>
- <td>DATABASE_STATEMENT_SUMMARY_REPORT</td>
- <td>5</td>
- <td><p>Summary report check that generates impact analysis for the statements.</p></td>
+ <td>LOG</td>
+ <td>4</td>
+ <td><p>General log message.</p></td>
</tr>
<tr>
- <td>DATABASE_CONNECT</td>
- <td>6</td>
- <td><p>Connection check that verifies database connectivity.</p></td>
+ <td>NOTICE</td>
+ <td>5</td>
+ <td><p>Notice message for important information.</p></td>
</tr>
<tr>
- <td>DATABASE_GHOST_SYNC</td>
- <td>7</td>
- <td><p>Ghost sync check that validates gh-ost online schema change compatibility.</p></td>
+ <td>EXCEPTION</td>
+ <td>6</td>
+ <td><p>Exception message indicating error conditions.</p></td>
</tr>
</tbody>
@@ -23150,8 +23194,8 @@ In this situation, `update_mask` is ignored. </p></td>
- <h3 id="bytebase.v1.PlanService">PlanService</h3>
- <p>PlanService manages deployment plans for database changes.</p>
+ <h3 id="bytebase.v1.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>
@@ -23159,68 +23203,51 @@ In this situation, `update_mask` is ignored. </p></td>
<tbody>
<tr>
- <td>GetPlan</td>
- <td><a href="#bytebase.v1.GetPlanRequest">GetPlanRequest</a></td>
- <td><a href="#bytebase.v1.Plan">Plan</a></td>
- <td><p>Retrieves a deployment plan by name.
-Permissions required: bb.plans.get</p></td>
- </tr>
-
- <tr>
- <td>ListPlans</td>
- <td><a href="#bytebase.v1.ListPlansRequest">ListPlansRequest</a></td>
- <td><a href="#bytebase.v1.ListPlansResponse">ListPlansResponse</a></td>
- <td><p>Lists deployment plans in a project.
-Permissions required: bb.plans.list</p></td>
- </tr>
-
- <tr>
- <td>SearchPlans</td>
- <td><a href="#bytebase.v1.SearchPlansRequest">SearchPlansRequest</a></td>
- <td><a href="#bytebase.v1.SearchPlansResponse">SearchPlansResponse</a></td>
- <td><p>Search for plans that the caller has the bb.plans.get permission on and also satisfy the specified filter &amp; query.
-Permissions required: bb.plans.get</p></td>
+ <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>CreatePlan</td>
- <td><a href="#bytebase.v1.CreatePlanRequest">CreatePlanRequest</a></td>
- <td><a href="#bytebase.v1.Plan">Plan</a></td>
- <td><p>Creates a new deployment plan.
-Permissions required: bb.plans.create</p></td>
+ <td>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>UpdatePlan</td>
- <td><a href="#bytebase.v1.UpdatePlanRequest">UpdatePlanRequest</a></td>
- <td><a href="#bytebase.v1.Plan">Plan</a></td>
- <td><p>UpdatePlan updates the plan.
-The plan creator and the user with bb.plans.update permission on the project can update the plan.
-Permissions required: bb.plans.update (or creator)</p></td>
+ <td>SearchQueryHistories</td>
+ <td><a href="#bytebase.v1.SearchQueryHistoriesRequest">SearchQueryHistoriesRequest</a></td>
+ <td><a href="#bytebase.v1.SearchQueryHistoriesResponse">SearchQueryHistoriesResponse</a></td>
+ <td><p>SearchQueryHistories searches query histories for the caller.
+Permissions required: None (only returns caller&#39;s own query histories)</p></td>
</tr>
<tr>
- <td>ListPlanCheckRuns</td>
- <td><a href="#bytebase.v1.ListPlanCheckRunsRequest">ListPlanCheckRunsRequest</a></td>
- <td><a href="#bytebase.v1.ListPlanCheckRunsResponse">ListPlanCheckRunsResponse</a></td>
- <td><p>Lists plan check runs for a deployment plan.
-Permissions required: bb.planCheckRuns.list</p></td>
+ <td>Export</td>
+ <td><a href="#bytebase.v1.ExportRequest">ExportRequest</a></td>
+ <td><a href="#bytebase.v1.ExportResponse">ExportResponse</a></td>
+ <td><p>Exports query results to a file format.
+Permissions required: bb.databases.get</p></td>
</tr>
<tr>
- <td>RunPlanChecks</td>
- <td><a href="#bytebase.v1.RunPlanChecksRequest">RunPlanChecksRequest</a></td>
- <td><a href="#bytebase.v1.RunPlanChecksResponse">RunPlanChecksResponse</a></td>
- <td><p>Executes validation checks on a deployment plan.
-Permissions required: bb.planCheckRuns.run</p></td>
+ <td>DiffMetadata</td>
+ <td><a href="#bytebase.v1.DiffMetadataRequest">DiffMetadataRequest</a></td>
+ <td><a href="#bytebase.v1.DiffMetadataResponse">DiffMetadataResponse</a></td>
+ <td><p>Computes schema differences between two database metadata.
+Permissions required: None</p></td>
</tr>
<tr>
- <td>BatchCancelPlanCheckRuns</td>
- <td><a href="#bytebase.v1.BatchCancelPlanCheckRunsRequest">BatchCancelPlanCheckRunsRequest</a></td>
- <td><a href="#bytebase.v1.BatchCancelPlanCheckRunsResponse">BatchCancelPlanCheckRunsResponse</a></td>
- <td><p>Cancels multiple plan check runs.
-Permissions required: bb.planCheckRuns.run</p></td>
+ <td>AICompletion</td>
+ <td><a href="#bytebase.v1.AICompletionRequest">AICompletionRequest</a></td>
+ <td><a href="#bytebase.v1.AICompletionResponse">AICompletionResponse</a></td>
+ <td><p>Provides AI-powered SQL completion and generation.
+Permissions required: None (authenticated users only, requires AI to be enabled)</p></td>
</tr>
</tbody>
@@ -23244,19 +23271,19 @@ Permissions required: bb.planCheckRuns.run</p></td>
<tr>
- <td>GetPlan</td>
- <td>GET</td>
- <td>/v1/{name=projects/*/plans/*}</td>
- <td></td>
+ <td>Query</td>
+ <td>POST</td>
+ <td>/v1/{name=instances/*/databases/*}:query</td>
+ <td>*</td>
</tr>
<tr>
- <td>ListPlans</td>
+ <td>AdminExecute</td>
<td>GET</td>
- <td>/v1/{parent=projects/*}/plans</td>
+ <td>/v1:adminExecute</td>
<td></td>
</tr>
@@ -23264,9 +23291,9 @@ Permissions required: bb.planCheckRuns.run</p></td>
<tr>
- <td>SearchPlans</td>
+ <td>SearchQueryHistories</td>
<td>POST</td>
- <td>/v1/{parent=projects/*}/plans:search</td>
+ <td>/v1/queryHistories:search</td>
<td>*</td>
</tr>
@@ -23274,39 +23301,33 @@ Permissions required: bb.planCheckRuns.run</p></td>
<tr>
- <td>CreatePlan</td>
+ <td>Export</td>
<td>POST</td>
- <td>/v1/{parent=projects/*}/plans</td>
- <td>plan</td>
+ <td>/v1/{name=instances/*/databases/*}:export</td>
+ <td>*</td>
</tr>
-
-
-
<tr>
- <td>UpdatePlan</td>
- <td>PATCH</td>
- <td>/v1/{plan.name=projects/*/plans/*}</td>
- <td>plan</td>
+ <td>Export</td>
+ <td>POST</td>
+ <td>/v1/{name=projects/*/rollouts/*}:export</td>
+ <td>*</td>
</tr>
-
-
-
<tr>
- <td>ListPlanCheckRuns</td>
- <td>GET</td>
- <td>/v1/{parent=projects/*/plans/*}/planCheckRuns</td>
- <td></td>
+ <td>Export</td>
+ <td>POST</td>
+ <td>/v1/{name=projects/*/rollouts/*/stages/*}:export</td>
+ <td>*</td>
</tr>
<tr>
- <td>RunPlanChecks</td>
+ <td>DiffMetadata</td>
<td>POST</td>
- <td>/v1/{name=projects/*/plans/*}:runPlanChecks</td>
+ <td>/v1/schemaDesign:diffMetadata</td>
<td>*</td>
</tr>
@@ -23314,33 +23335,67 @@ Permissions required: bb.planCheckRuns.run</p></td>
<tr>
- <td>BatchCancelPlanCheckRuns</td>
+ <td>AICompletion</td>
<td>POST</td>
- <td>/v1/{parent=projects/*/plans/*}/planCheckRuns:batchCancel</td>
+ <td>/v1/sql/aiCompletion</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.BatchCancelPlanCheckRunsRequest">BatchCancelPlanCheckRunsRequest</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>parent</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The name of the parent of the planChecks.
+Format: projects/{project}/plans/{plan} </p></td>
+ </tr>
+
+ <tr>
+ <td>plan_check_runs</td>
+ <td><a href="#string">string</a></td>
+ <td>repeated</td>
+ <td><p>TODO(d): update this API.
+The planCheckRuns to cancel.
+Format: projects/{project}/plans/{plan}/planCheckRuns/{planCheckRun} </p></td>
+ </tr>
+
</tbody>
</table>
+
-
-
-
- <div class="file-heading">
- <h2 id="v1/project_service.proto">v1/project_service.proto</h2><a href="#title">Top</a>
- </div>
- <p></p>
+
- <h3 id="bytebase.v1.Activity">Activity</h3>
- <p>Activity types for webhook notifications.</p>
+ <h3 id="bytebase.v1.BatchCancelPlanCheckRunsResponse">BatchCancelPlanCheckRunsResponse</h3>
+ <p></p>
- <h3 id="bytebase.v1.AddWebhookRequest">AddWebhookRequest</h3>
+ <h3 id="bytebase.v1.CreatePlanRequest">CreatePlanRequest</h3>
<p></p>
@@ -23351,18 +23406,18 @@ Permissions required: bb.planCheckRuns.run</p></td>
<tbody>
<tr>
- <td>project</td>
+ <td>parent</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The name of the project to add the webhook to.
+ <td><p>The parent project where this plan will be created.
Format: projects/{project} </p></td>
</tr>
<tr>
- <td>webhook</td>
- <td><a href="#bytebase.v1.Webhook">Webhook</a></td>
+ <td>plan</td>
+ <td><a href="#bytebase.v1.Plan">Plan</a></td>
<td></td>
- <td><p>The webhook to add. </p></td>
+ <td><p>The plan to create. </p></td>
</tr>
</tbody>
@@ -23372,7 +23427,7 @@ Format: projects/{project} </p></td>
- <h3 id="bytebase.v1.BatchDeleteProjectsRequest">BatchDeleteProjectsRequest</h3>
+ <h3 id="bytebase.v1.GetPlanRequest">GetPlanRequest</h3>
<p></p>
@@ -23383,21 +23438,11 @@ Format: projects/{project} </p></td>
<tbody>
<tr>
- <td>names</td>
+ <td>name</td>
<td><a href="#string">string</a></td>
- <td>repeated</td>
- <td><p>The names of the projects to delete.
-Format: projects/{project} </p></td>
- </tr>
-
- <tr>
- <td>force</td>
- <td><a href="#bool">bool</a></td>
<td></td>
- <td><p>If set to true, any databases from this project will be moved to default project.
-Sheets are not moved since BYTEBASE_ARTIFACT sheets belong to the issue and issue project.
-Open issues will remain open but associated with the deleted project.
-If set to false, the operation will fail if the project has databases or open issues. </p></td>
+ <td><p>The name of the plan to retrieve.
+Format: projects/{project}/plans/{plan} </p></td>
</tr>
</tbody>
@@ -23407,7 +23452,7 @@ If set to false, the operation will fail if the project has databases or open is
- <h3 id="bytebase.v1.BatchGetIamPolicyRequest">BatchGetIamPolicyRequest</h3>
+ <h3 id="bytebase.v1.ListPlanCheckRunsRequest">ListPlanCheckRunsRequest</h3>
<p></p>
@@ -23418,17 +23463,36 @@ If set to false, the operation will fail if the project has databases or open is
<tbody>
<tr>
- <td>scope</td>
+ <td>parent</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The scope of the batch get. Typically it&#39;s &#34;projects/-&#34;. </p></td>
+ <td><p>The parent, which owns this collection of plan check runs.
+Format: projects/{project}/plans/{plan} </p></td>
</tr>
<tr>
- <td>names</td>
+ <td>latest_only</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>If set to true, only the latest plan check run will be returned. </p></td>
+ </tr>
+
+ <tr>
+ <td>filter</td>
<td><a href="#string">string</a></td>
- <td>repeated</td>
- <td><p> </p></td>
+ <td></td>
+ <td><p>Filter is used to filter plan check runs returned in the list.
+The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
+
+Supported filters:
+- status: the plan check run status, support &#34;==&#34; and &#34;in&#34; operator, check the Status enum in the PlanCheckRun message for the values.
+- result_status: the plan check run result status, support &#34;==&#34; and &#34;in&#34; operator, check the Result.Status enum in the PlanCheckRun message for the values.
+
+For example:
+status in [&#34;DONE&#34;, &#34;FAILED&#34;]
+status == &#34;RUNNING&#34;
+result_status in [&#34;SUCCESS&#34;, &#34;ERROR&#34;]
+result_status == &#34;WARNING&#34; </p></td>
</tr>
</tbody>
@@ -23438,7 +23502,7 @@ If set to false, the operation will fail if the project has databases or open is
- <h3 id="bytebase.v1.BatchGetIamPolicyResponse">BatchGetIamPolicyResponse</h3>
+ <h3 id="bytebase.v1.ListPlanCheckRunsResponse">ListPlanCheckRunsResponse</h3>
<p></p>
@@ -23449,10 +23513,10 @@ If set to false, the operation will fail if the project has databases or open is
<tbody>
<tr>
- <td>policy_results</td>
- <td><a href="#bytebase.v1.BatchGetIamPolicyResponse.PolicyResult">BatchGetIamPolicyResponse.PolicyResult</a></td>
+ <td>plan_check_runs</td>
+ <td><a href="#bytebase.v1.PlanCheckRun">PlanCheckRun</a></td>
<td>repeated</td>
- <td><p>The policy results for each requested project. </p></td>
+ <td><p>The plan check runs from the specified request. </p></td>
</tr>
</tbody>
@@ -23462,8 +23526,8 @@ If set to false, the operation will fail if the project has databases or open is
- <h3 id="bytebase.v1.BatchGetIamPolicyResponse.PolicyResult">BatchGetIamPolicyResponse.PolicyResult</h3>
- <p>Result for a single project's IAM policy.</p>
+ <h3 id="bytebase.v1.ListPlansRequest">ListPlansRequest</h3>
+ <p></p>
<table class="field-table">
@@ -23473,17 +23537,33 @@ If set to false, the operation will fail if the project has databases or open is
<tbody>
<tr>
- <td>project</td>
+ <td>parent</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The project resource name. </p></td>
+ <td><p>The parent, which owns this collection of plans.
+Format: projects/{project}
+Use &#34;projects/-&#34; to list all plans from all projects. </p></td>
</tr>
<tr>
- <td>policy</td>
- <td><a href="#bytebase.v1.IamPolicy">IamPolicy</a></td>
+ <td>page_size</td>
+ <td><a href="#int32">int32</a></td>
<td></td>
- <td><p>The IAM policy for the project. </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>page_token</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>A page token, received from a previous `ListPlans` call.
+Provide this to retrieve the subsequent page.
+
+When paginating, all other parameters provided to `ListPlans` must match
+the call that provided the page token. </p></td>
</tr>
</tbody>
@@ -23493,7 +23573,7 @@ If set to false, the operation will fail if the project has databases or open is
- <h3 id="bytebase.v1.CreateProjectRequest">CreateProjectRequest</h3>
+ <h3 id="bytebase.v1.ListPlansResponse">ListPlansResponse</h3>
<p></p>
@@ -23504,21 +23584,18 @@ If set to false, the operation will fail if the project has databases or open is
<tbody>
<tr>
- <td>project</td>
- <td><a href="#bytebase.v1.Project">Project</a></td>
- <td></td>
- <td><p>The project to create. </p></td>
+ <td>plans</td>
+ <td><a href="#bytebase.v1.Plan">Plan</a></td>
+ <td>repeated</td>
+ <td><p>The plans from the specified request. </p></td>
</tr>
<tr>
- <td>project_id</td>
+ <td>next_page_token</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The ID to use for the project, which will become the final component of
-the project&#39;s resource name.
-
-This value should be 4-63 characters, and valid characters
-are /[a-z][0-9]-/. </p></td>
+ <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>
@@ -23528,7 +23605,7 @@ are /[a-z][0-9]-/. </p></td>
- <h3 id="bytebase.v1.DeleteProjectRequest">DeleteProjectRequest</h3>
+ <h3 id="bytebase.v1.Plan">Plan</h3>
<p></p>
@@ -23542,91 +23619,95 @@ are /[a-z][0-9]-/. </p></td>
<td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The name of the project to delete.
-Format: projects/{project} </p></td>
+ <td><p>The name of the plan.
+`plan` is a system generated ID.
+Format: projects/{project}/plans/{plan} </p></td>
</tr>
<tr>
- <td>force</td>
- <td><a href="#bool">bool</a></td>
+ <td>state</td>
+ <td><a href="#bytebase.v1.State">State</a></td>
<td></td>
- <td><p>If set to true, any databases from this project will be moved to default project.
-Sheets are not moved since BYTEBASE_ARTIFACT sheets belong to the issue and issue project.
-Open issues will remain open but associated with the deleted project.
-If set to false, the operation will fail if the project has databases or open issues. </p></td>
+ <td><p>The state of the plan. </p></td>
</tr>
<tr>
- <td>purge</td>
- <td><a href="#bool">bool</a></td>
+ <td>issue</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>If set to true, permanently purge the soft-deleted project and all related resources.
-This operation is irreversible. Following AIP-165, this should only be used for
-administrative cleanup of old soft-deleted projects.
-The project must already be soft-deleted for this to work. </p></td>
+ <td><p>The issue associated with the plan.
+Can be empty.
+Format: projects/{project}/issues/{issue} </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.GetProjectRequest">GetProjectRequest</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
<tr>
- <td>name</td>
+ <td>rollout</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The name of the project to retrieve.
-Format: projects/{project} </p></td>
+ <td><p>The rollout associated with the plan.
+Can be empty.
+Format: projects/{project}/rollouts/{rollout} </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.Label">Label</h3>
- <p>A label for categorizing and organizing issues.</p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
+ <tr>
+ <td>title</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The title of the plan. </p></td>
+ </tr>
<tr>
- <td>value</td>
+ <td>description</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The label value/name. </p></td>
+ <td><p>The description of the plan. </p></td>
</tr>
<tr>
- <td>color</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>creator</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The color code for the label (e.g., hex color). </p></td>
+ <td><p>Format: users/[email protected] </p></td>
+ </tr>
+
+ <tr>
+ <td>create_time</td>
+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>update_time</td>
+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>plan_check_run_status_count</td>
+ <td><a href="#bytebase.v1.Plan.PlanCheckRunStatusCountEntry">Plan.PlanCheckRunStatusCountEntry</a></td>
+ <td>repeated</td>
+ <td><p>The status count of the latest plan check runs.
+Keys are:
+- SUCCESS
+- WARNING
+- ERROR
+- RUNNING </p></td>
</tr>
<tr>
- <td>group</td>
- <td><a href="#string">string</a></td>
+ <td>deployment</td>
+ <td><a href="#bytebase.v1.Plan.Deployment">Plan.Deployment</a></td>
<td></td>
- <td><p>The group this label belongs to. </p></td>
+ <td><p> </p></td>
</tr>
</tbody>
@@ -23636,7 +23717,7 @@ Format: projects/{project} </p></td>
- <h3 id="bytebase.v1.ListProjectsRequest">ListProjectsRequest</h3>
+ <h3 id="bytebase.v1.Plan.ChangeDatabaseConfig">Plan.ChangeDatabaseConfig</h3>
<p></p>
@@ -23647,40 +23728,57 @@ Format: projects/{project} </p></td>
<tbody>
<tr>
- <td>page_size</td>
- <td><a href="#int32">int32</a></td>
+ <td>targets</td>
+ <td><a href="#string">string</a></td>
+ <td>repeated</td>
+ <td><p>The list of targets.
+Multi-database format: [instances/{instance-id}/databases/{database-name}].
+Single database group format: [projects/{project}/databaseGroups/{databaseGroup}]. </p></td>
+ </tr>
+
+ <tr>
+ <td>sheet</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>The maximum number of projects to return. The service may return fewer than
-this value.
-If unspecified, at most 10 projects will be returned.
-The maximum value is 1000; values above 1000 will be coerced to 1000. </p></td>
+ <td><p>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 `ListProjects` call.
-Provide this to retrieve the subsequent page.
-
-When paginating, all other parameters provided to `ListProjects` must match
-the call that provided the page token. </p></td>
+ <td><p>The resource name of the release.
+Format: projects/{project}/releases/{release} </p></td>
</tr>
<tr>
- <td>show_deleted</td>
- <td><a href="#bool">bool</a></td>
+ <td>type</td>
+ <td><a href="#bytebase.v1.DatabaseChangeType">DatabaseChangeType</a></td>
<td></td>
- <td><p>Show deleted projects if specified. </p></td>
+ <td><p>Type is the database change type. </p></td>
</tr>
<tr>
- <td>filter</td>
- <td><a href="#string">string</a></td>
+ <td>migration_type</td>
+ <td><a href="#bytebase.v1.MigrationType">MigrationType</a></td>
<td></td>
- <td><p>Filter the project.
-Check filter for SearchProjectsRequest for details.
-Supports filtering by name, resource_id, state, and labels (e.g., labels.environment == &#34;production&#34;). </p></td>
+ <td><p>migration_type is the migration type for imperative schema migration.
+It is only set when type is MIGRATE. </p></td>
+ </tr>
+
+ <tr>
+ <td>ghost_flags</td>
+ <td><a href="#bytebase.v1.Plan.ChangeDatabaseConfig.GhostFlagsEntry">Plan.ChangeDatabaseConfig.GhostFlagsEntry</a></td>
+ <td>repeated</td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>enable_prior_backup</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>If set, a backup of the modified data will be created automatically before any changes are applied. </p></td>
</tr>
</tbody>
@@ -23690,7 +23788,7 @@ Supports filtering by name, resource_id, state, and labels (e.g., labels.environ
- <h3 id="bytebase.v1.ListProjectsResponse">ListProjectsResponse</h3>
+ <h3 id="bytebase.v1.Plan.ChangeDatabaseConfig.GhostFlagsEntry">Plan.ChangeDatabaseConfig.GhostFlagsEntry</h3>
<p></p>
@@ -23701,18 +23799,17 @@ Supports filtering by name, resource_id, state, and labels (e.g., labels.environ
<tbody>
<tr>
- <td>projects</td>
- <td><a href="#bytebase.v1.Project">Project</a></td>
- <td>repeated</td>
- <td><p>The projects from the specified request. </p></td>
+ <td>key</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>next_page_token</td>
+ <td>value</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>A token, 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>
@@ -23722,7 +23819,7 @@ If this field is omitted, there are no subsequent pages. </p></td>
- <h3 id="bytebase.v1.Project">Project</h3>
+ <h3 id="bytebase.v1.Plan.CreateDatabaseConfig">Plan.CreateDatabaseConfig</h3>
<p></p>
@@ -23733,141 +23830,124 @@ If this field is omitted, there are no subsequent pages. </p></td>
<tbody>
<tr>
- <td>name</td>
+ <td>target</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The name of the project.
-Format: projects/{project} </p></td>
- </tr>
-
- <tr>
- <td>state</td>
- <td><a href="#bytebase.v1.State">State</a></td>
- <td></td>
- <td><p>The lifecycle state of the project. </p></td>
+ <td><p>The resource name of the instance on which the database is created.
+Format: instances/{instance} </p></td>
</tr>
<tr>
- <td>title</td>
+ <td>database</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The title or name of a project. It&#39;s not unique within the workspace. </p></td>
- </tr>
-
- <tr>
- <td>webhooks</td>
- <td><a href="#bytebase.v1.Webhook">Webhook</a></td>
- <td>repeated</td>
- <td><p>The list of webhooks configured for the project. </p></td>
+ <td><p>The name of the database to create. </p></td>
</tr>
<tr>
- <td>data_classification_config_id</td>
+ <td>table</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The data classification configuration ID for the project. </p></td>
- </tr>
-
- <tr>
- <td>issue_labels</td>
- <td><a href="#bytebase.v1.Label">Label</a></td>
- <td>repeated</td>
- <td><p>Labels available for tagging issues in this project. </p></td>
- </tr>
-
- <tr>
- <td>force_issue_labels</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>Force issue labels to be used when creating an issue. </p></td>
+ <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>allow_modify_statement</td>
- <td><a href="#bool">bool</a></td>
+ <td>character_set</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>Allow modifying SQL statements after issue is created. </p></td>
+ <td><p>character_set is the character set of the database. </p></td>
</tr>
<tr>
- <td>auto_resolve_issue</td>
- <td><a href="#bool">bool</a></td>
+ <td>collation</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>Enable automatic issue resolution when tasks complete. </p></td>
+ <td><p>collation is the collation of the database. </p></td>
</tr>
<tr>
- <td>enforce_issue_title</td>
- <td><a href="#bool">bool</a></td>
+ <td>cluster</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>Enforce issue title to be created by user instead of generated by Bytebase. </p></td>
+ <td><p>cluster is the cluster of the database. This is only applicable to ClickHouse for &#34;ON CLUSTER &lt;&lt;cluster&gt;&gt;&#34;. </p></td>
</tr>
<tr>
- <td>auto_enable_backup</td>
- <td><a href="#bool">bool</a></td>
+ <td>owner</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>Whether to automatically enable backup for database changes. </p></td>
+ <td><p>owner is the owner of the database. This is only applicable to Postgres for &#34;WITH OWNER &lt;&lt;owner&gt;&gt;&#34;. </p></td>
</tr>
<tr>
- <td>skip_backup_errors</td>
- <td><a href="#bool">bool</a></td>
+ <td>environment</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>Whether to skip backup errors and continue with data migration. </p></td>
+ <td><p>The environment resource.
+Format: environments/prod where prod is the environment resource ID. </p></td>
</tr>
- <tr>
- <td>postgres_database_tenant_mode</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>Whether to enable database tenant mode for PostgreSQL.
-If enabled, issues will include &#34;set role &lt;db_owner&gt;&#34; statement. </p></td>
- </tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.Plan.Deployment">Plan.Deployment</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
<tr>
- <td>allow_self_approval</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>Whether to allow issue creators to self-approve their own issues. </p></td>
+ <td>environments</td>
+ <td><a href="#string">string</a></td>
+ <td>repeated</td>
+ <td><p>The environments deploy order. </p></td>
</tr>
<tr>
- <td>execution_retry_policy</td>
- <td><a href="#bytebase.v1.Project.ExecutionRetryPolicy">Project.ExecutionRetryPolicy</a></td>
- <td></td>
- <td><p>Execution retry policy for task runs. </p></td>
+ <td>database_group_mappings</td>
+ <td><a href="#bytebase.v1.Plan.Deployment.DatabaseGroupMapping">Plan.Deployment.DatabaseGroupMapping</a></td>
+ <td>repeated</td>
+ <td><p>The database group mapping. </p></td>
</tr>
- <tr>
- <td>ci_sampling_size</td>
- <td><a href="#int32">int32</a></td>
- <td></td>
- <td><p>The maximum number of database rows to sample during CI data validation.
-Without specification, sampling is disabled, resulting in full validation. </p></td>
- </tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.Plan.Deployment.DatabaseGroupMapping">Plan.Deployment.DatabaseGroupMapping</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
<tr>
- <td>parallel_tasks_per_rollout</td>
- <td><a href="#int32">int32</a></td>
+ <td>database_group</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>The maximum number of parallel tasks allowed during rollout execution. </p></td>
+ <td><p>Format: projects/{project}/databaseGroups/{databaseGroup}. </p></td>
</tr>
<tr>
- <td>labels</td>
- <td><a href="#bytebase.v1.Project.LabelsEntry">Project.LabelsEntry</a></td>
+ <td>databases</td>
+ <td><a href="#string">string</a></td>
<td>repeated</td>
- <td><p>Labels are key-value pairs that can be attached to the project.
-For example, { &#34;environment&#34;: &#34;production&#34;, &#34;team&#34;: &#34;backend&#34; } </p></td>
- </tr>
-
- <tr>
- <td>enforce_sql_review</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>Whether to enforce SQL review checks to pass before issue creation.
-If enabled, issues cannot be created when SQL review finds errors. </p></td>
+ <td><p>Format: instances/{instance-id}/databases/{database-name}. </p></td>
</tr>
</tbody>
@@ -23877,8 +23957,8 @@ If enabled, issues cannot be created when SQL review finds errors. </p></td>
- <h3 id="bytebase.v1.Project.ExecutionRetryPolicy">Project.ExecutionRetryPolicy</h3>
- <p>Execution retry policy configuration.</p>
+ <h3 id="bytebase.v1.Plan.ExportDataConfig">Plan.ExportDataConfig</h3>
+ <p></p>
<table class="field-table">
@@ -23888,10 +23968,35 @@ If enabled, issues cannot be created when SQL review finds errors. </p></td>
<tbody>
<tr>
- <td>maximum_retries</td>
- <td><a href="#int32">int32</a></td>
+ <td>targets</td>
+ <td><a href="#string">string</a></td>
+ <td>repeated</td>
+ <td><p>The list of targets.
+Multi-database format: [instances/{instance-id}/databases/{database-name}].
+Single database group format: [projects/{project}/databaseGroups/{databaseGroup}]. </p></td>
+ </tr>
+
+ <tr>
+ <td>sheet</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The resource name of the sheet.
+Format: projects/{project}/sheets/{sheet} </p></td>
+ </tr>
+
+ <tr>
+ <td>format</td>
+ <td><a href="#bytebase.v1.ExportFormat">ExportFormat</a></td>
<td></td>
- <td><p>The maximum number of retries for lock timeout errors. </p></td>
+ <td><p>The format of the exported file. </p></td>
+ </tr>
+
+ <tr>
+ <td>password</td>
+ <td><a href="#string">string</a></td>
+ <td>optional</td>
+ <td><p>The zip password provide by users.
+Leave it empty if no needs to encrypt the zip file. </p></td>
</tr>
</tbody>
@@ -23901,7 +24006,7 @@ If enabled, issues cannot be created when SQL review finds errors. </p></td>
- <h3 id="bytebase.v1.Project.LabelsEntry">Project.LabelsEntry</h3>
+ <h3 id="bytebase.v1.Plan.PlanCheckRunStatusCountEntry">Plan.PlanCheckRunStatusCountEntry</h3>
<p></p>
@@ -23920,7 +24025,7 @@ If enabled, issues cannot be created when SQL review finds errors. </p></td>
<tr>
<td>value</td>
- <td><a href="#string">string</a></td>
+ <td><a href="#int32">int32</a></td>
<td></td>
<td><p> </p></td>
</tr>
@@ -23932,7 +24037,7 @@ If enabled, issues cannot be created when SQL review finds errors. </p></td>
- <h3 id="bytebase.v1.RemoveWebhookRequest">RemoveWebhookRequest</h3>
+ <h3 id="bytebase.v1.Plan.Spec">Plan.Spec</h3>
<p></p>
@@ -23943,10 +24048,31 @@ If enabled, issues cannot be created when SQL review finds errors. </p></td>
<tbody>
<tr>
- <td>webhook</td>
- <td><a href="#bytebase.v1.Webhook">Webhook</a></td>
+ <td>id</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>The webhook to remove. Identified by its url. </p></td>
+ <td><p>A UUID4 string that uniquely identifies the Spec. </p></td>
+ </tr>
+
+ <tr>
+ <td>create_database_config</td>
+ <td><a href="#bytebase.v1.Plan.CreateDatabaseConfig">Plan.CreateDatabaseConfig</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>change_database_config</td>
+ <td><a href="#bytebase.v1.Plan.ChangeDatabaseConfig">Plan.ChangeDatabaseConfig</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>export_data_config</td>
+ <td><a href="#bytebase.v1.Plan.ExportDataConfig">Plan.ExportDataConfig</a></td>
+ <td></td>
+ <td><p> </p></td>
</tr>
</tbody>
@@ -23956,7 +24082,7 @@ If enabled, issues cannot be created when SQL review finds errors. </p></td>
- <h3 id="bytebase.v1.SearchProjectsRequest">SearchProjectsRequest</h3>
+ <h3 id="bytebase.v1.PlanCheckRun">PlanCheckRun</h3>
<p></p>
@@ -23967,61 +24093,59 @@ If enabled, issues cannot be created when SQL review finds errors. </p></td>
<tbody>
<tr>
- <td>show_deleted</td>
- <td><a href="#bool">bool</a></td>
+ <td>name</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>Show deleted projects if specified. </p></td>
+ <td><p>Format: projects/{project}/plans/{plan}/planCheckRuns/{planCheckRun} </p></td>
</tr>
<tr>
- <td>filter</td>
+ <td>type</td>
+ <td><a href="#bytebase.v1.PlanCheckRun.Type">PlanCheckRun.Type</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>status</td>
+ <td><a href="#bytebase.v1.PlanCheckRun.Status">PlanCheckRun.Status</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>target</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>Filter the project.
-The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
-
-Supported filters:
-- name: the project name, support &#34;==&#34; and &#34;.matches()&#34; operator.
-- resource_id: the project id, support &#34;==&#34; and &#34;.matches()&#34; operator.
-- exclude_default: if not include the default project, should be &#34;true&#34; or &#34;false&#34;, support &#34;==&#34; operator.
-- state: check the State enum for the values, support &#34;==&#34; operator.
-- labels.{key}: the project label, support &#34;==&#34; and &#34;in&#34; operators.
-
-For example:
-name == &#34;project name&#34;
-name.matches(&#34;project name&#34;)
-resource_id == &#34;project id&#34;
-resource_id.matches(&#34;project id&#34;)
-exclude_default == true
-state == &#34;DELETED&#34;
-labels.environment == &#34;production&#34;
-labels.tier == &#34;critical&#34;
-labels.environment in [&#34;staging&#34;, &#34;prod&#34;]
-You can combine filter conditions like:
-name == &#34;project name&#34; &amp;&amp; resource_id.matches(&#34;project id&#34;)
-name.matches(&#34;project name&#34;) || resource_id == &#34;project id&#34;
-labels.environment == &#34;production&#34; &amp;&amp; labels.tier == &#34;critical&#34; </p></td>
+ <td><p>Format: instances/{instance}/databases/{database} </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 projects to return. The service may return fewer than
-this value.
-If unspecified, at most 10 projects will be returned.
-The maximum value is 1000; values above 1000 will be coerced to 1000. </p></td>
+ <td><p>Format: project/{project}/sheets/{sheet} </p></td>
</tr>
<tr>
- <td>page_token</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>A page token, received from a previous `SearchProjects` call.
-Provide this to retrieve the subsequent page.
-
-When paginating, all other parameters provided to `SearchProjects` must match
-the call that provided the page token. </p></td>
+ <td><p>error is set if the Status is FAILED. </p></td>
+ </tr>
+
+ <tr>
+ <td>create_time</td>
+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
+ <td></td>
+ <td><p> </p></td>
</tr>
</tbody>
@@ -24031,7 +24155,7 @@ the call that provided the page token. </p></td>
- <h3 id="bytebase.v1.SearchProjectsResponse">SearchProjectsResponse</h3>
+ <h3 id="bytebase.v1.PlanCheckRun.Result">PlanCheckRun.Result</h3>
<p></p>
@@ -24042,18 +24166,45 @@ the call that provided the page token. </p></td>
<tbody>
<tr>
- <td>projects</td>
- <td><a href="#bytebase.v1.Project">Project</a></td>
- <td>repeated</td>
- <td><p>The projects from the specified request. </p></td>
+ <td>status</td>
+ <td><a href="#bytebase.v1.Advice.Level">Advice.Level</a></td>
+ <td></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>next_page_token</td>
+ <td>title</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>A token, which can be sent as `page_token` to retrieve the next page.
-If this field is omitted, there are no subsequent pages. </p></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>content</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>code</td>
+ <td><a href="#int32">int32</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>sql_summary_report</td>
+ <td><a href="#bytebase.v1.PlanCheckRun.Result.SqlSummaryReport">PlanCheckRun.Result.SqlSummaryReport</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>sql_review_report</td>
+ <td><a href="#bytebase.v1.PlanCheckRun.Result.SqlReviewReport">PlanCheckRun.Result.SqlReviewReport</a></td>
+ <td></td>
+ <td><p> </p></td>
</tr>
</tbody>
@@ -24063,7 +24214,7 @@ If this field is omitted, there are no subsequent pages. </p></td>
- <h3 id="bytebase.v1.TestWebhookRequest">TestWebhookRequest</h3>
+ <h3 id="bytebase.v1.PlanCheckRun.Result.SqlReviewReport">PlanCheckRun.Result.SqlReviewReport</h3>
<p></p>
@@ -24074,18 +24225,17 @@ If this field is omitted, there are no subsequent pages. </p></td>
<tbody>
<tr>
- <td>project</td>
- <td><a href="#string">string</a></td>
+ <td>start_position</td>
+ <td><a href="#bytebase.v1.Position">Position</a></td>
<td></td>
- <td><p>The name of the project which owns the webhook to test.
-Format: projects/{project} </p></td>
+ <td><p>Position of the SQL statement. </p></td>
</tr>
<tr>
- <td>webhook</td>
- <td><a href="#bytebase.v1.Webhook">Webhook</a></td>
+ <td>end_position</td>
+ <td><a href="#bytebase.v1.Position">Position</a></td>
<td></td>
- <td><p>The webhook to test. Identified by its url. </p></td>
+ <td><p> </p></td>
</tr>
</tbody>
@@ -24095,7 +24245,7 @@ Format: projects/{project} </p></td>
- <h3 id="bytebase.v1.TestWebhookResponse">TestWebhookResponse</h3>
+ <h3 id="bytebase.v1.PlanCheckRun.Result.SqlSummaryReport">PlanCheckRun.Result.SqlSummaryReport</h3>
<p></p>
@@ -24106,10 +24256,24 @@ Format: projects/{project} </p></td>
<tbody>
<tr>
- <td>error</td>
+ <td>statement_types</td>
<td><a href="#string">string</a></td>
+ <td>repeated</td>
+ <td><p>statement_types are the types of statements that are found in the sql. </p></td>
+ </tr>
+
+ <tr>
+ <td>affected_rows</td>
+ <td><a href="#int64">int64</a></td>
<td></td>
- <td><p>The result of the test, empty if the test is successful. </p></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>changed_resources</td>
+ <td><a href="#bytebase.v1.ChangedResources">ChangedResources</a></td>
+ <td></td>
+ <td><p> </p></td>
</tr>
</tbody>
@@ -24119,7 +24283,7 @@ Format: projects/{project} </p></td>
- <h3 id="bytebase.v1.UndeleteProjectRequest">UndeleteProjectRequest</h3>
+ <h3 id="bytebase.v1.RunPlanChecksRequest">RunPlanChecksRequest</h3>
<p></p>
@@ -24133,8 +24297,17 @@ Format: projects/{project} </p></td>
<td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The name of the deleted project.
-Format: projects/{project} </p></td>
+ <td><p>The plan to run plan checks.
+Format: projects/{project}/plans/{plan} </p></td>
+ </tr>
+
+ <tr>
+ <td>spec_id</td>
+ <td><a href="#string">string</a></td>
+ <td>optional</td>
+ <td><p>The UUID of the specific spec to run plan checks for.
+This should match the spec.id field in Plan.Spec.
+If not set, all specs in the plan will be used. </p></td>
</tr>
</tbody>
@@ -24144,7 +24317,14 @@ Format: projects/{project} </p></td>
- <h3 id="bytebase.v1.UpdateProjectRequest">UpdateProjectRequest</h3>
+ <h3 id="bytebase.v1.RunPlanChecksResponse">RunPlanChecksResponse</h3>
+ <p></p>
+
+
+
+
+
+ <h3 id="bytebase.v1.SearchPlansRequest">SearchPlansRequest</h3>
<p></p>
@@ -24155,28 +24335,58 @@ Format: projects/{project} </p></td>
<tbody>
<tr>
- <td>project</td>
- <td><a href="#bytebase.v1.Project">Project</a></td>
+ <td>parent</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>The project to update.
-
-The project&#39;s `name` field is used to identify the project to update.
-Format: projects/{project} </p></td>
+ <td><p>The parent, which owns this collection of plans.
+Format: projects/{project}
+Use &#34;projects/-&#34; to list all plans from all projects. </p></td>
+ </tr>
+
+ <tr>
+ <td>page_size</td>
+ <td><a href="#int32">int32</a></td>
+ <td></td>
+ <td><p>The maximum number of plans to return. The service may return fewer than
+this value.
+If unspecified, at most 10 plans will be returned.
+The maximum value is 1000; values above 1000 will be coerced to 1000. </p></td>
</tr>
<tr>
- <td>update_mask</td>
- <td><a href="#google.protobuf.FieldMask">google.protobuf.FieldMask</a></td>
+ <td>page_token</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>The list of fields to update. </p></td>
+ <td><p>A page token, received from a previous `SearchPlans` call.
+Provide this to retrieve the subsequent page.
+
+When paginating, all other parameters provided to `SearchPlans` must match
+the call that provided the page token. </p></td>
</tr>
<tr>
- <td>allow_missing</td>
- <td><a href="#bool">bool</a></td>
+ <td>filter</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>If set to true, and the project is not found, a new project will be created.
-In this situation, `update_mask` is ignored. </p></td>
+ <td><p>Filter is used to filter plans returned in the list.
+The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
+
+Supported filters:
+- creator: the plan creator full name in &#34;users/{email or id}&#34; format, support &#34;==&#34; operator.
+- create_time: the plan create time in &#34;2006-01-02T15:04:05Z07:00&#34; format, support &#34;&gt;=&#34; or &#34;&lt;=&#34; operator.
+- has_pipeline: the plan has pipeline or not, support &#34;==&#34; operator, the value should be &#34;true&#34; or &#34;false&#34;.
+- has_issue: the plan has issue or not, support &#34;==&#34; operator, the value should be &#34;true&#34; or &#34;false&#34;.
+- title: the plan title, support &#34;==&#34; operator for exact match and &#34;.matches()&#34; operator for case-insensitive substring match.
+- spec_type: the plan spec config type, support &#34;==&#34; operator, the value should be &#34;create_database_config&#34;, &#34;change_database_config&#34;, or &#34;export_data_config&#34;.
+- state: the plan state, support &#34;==&#34; operator, the value should be &#34;ACTIVE&#34; or &#34;DELETED&#34;.
+
+For example:
+creator == &#34;users/[email protected]&#34; &amp;&amp; create_time &gt;= &#34;2025-01-02T15:04:05Z07:00&#34;
+has_pipeline == false &amp;&amp; has_issue == true
+title == &#34;My Plan&#34;
+title.matches(&#34;database migration&#34;)
+spec_type == &#34;change_database_config&#34;
+state == &#34;ACTIVE&#34; </p></td>
</tr>
</tbody>
@@ -24186,7 +24396,7 @@ In this situation, `update_mask` is ignored. </p></td>
- <h3 id="bytebase.v1.UpdateWebhookRequest">UpdateWebhookRequest</h3>
+ <h3 id="bytebase.v1.SearchPlansResponse">SearchPlansResponse</h3>
<p></p>
@@ -24197,25 +24407,18 @@ In this situation, `update_mask` is ignored. </p></td>
<tbody>
<tr>
- <td>webhook</td>
- <td><a href="#bytebase.v1.Webhook">Webhook</a></td>
- <td></td>
- <td><p>The webhook to modify. </p></td>
- </tr>
-
- <tr>
- <td>update_mask</td>
- <td><a href="#google.protobuf.FieldMask">google.protobuf.FieldMask</a></td>
- <td></td>
- <td><p>The list of fields to update. </p></td>
+ <td>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>allow_missing</td>
- <td><a href="#bool">bool</a></td>
+ <td>next_page_token</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>If set to true, and the webhook is not found, a new webhook will be created.
-In this situation, `update_mask` is ignored. </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>
@@ -24225,7 +24428,7 @@ In this situation, `update_mask` is ignored. </p></td>
- <h3 id="bytebase.v1.Webhook">Webhook</h3>
+ <h3 id="bytebase.v1.UpdatePlanRequest">UpdatePlanRequest</h3>
<p></p>
@@ -24236,59 +24439,28 @@ In this situation, `update_mask` is ignored. </p></td>
<tbody>
<tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>name is the name of the webhook, generated by the server.
-format: projects/{project}/webhooks/{webhook} </p></td>
- </tr>
-
- <tr>
- <td>type</td>
- <td><a href="#bytebase.v1.Webhook.Type">Webhook.Type</a></td>
- <td></td>
- <td><p>type is the type of the webhook. </p></td>
- </tr>
-
- <tr>
- <td>title</td>
- <td><a href="#string">string</a></td>
+ <td>plan</td>
+ <td><a href="#bytebase.v1.Plan">Plan</a></td>
<td></td>
- <td><p>title is the title of the webhook. </p></td>
+ <td><p>The plan to update.
+
+The plan&#39;s `name` field is used to identify the plan to update.
+Format: projects/{project}/plans/{plan} </p></td>
</tr>
<tr>
- <td>url</td>
- <td><a href="#string">string</a></td>
+ <td>update_mask</td>
+ <td><a href="#google.protobuf.FieldMask">google.protobuf.FieldMask</a></td>
<td></td>
- <td><p>url is the url of the webhook, should be unique within the project. </p></td>
+ <td><p>The list of fields to update. </p></td>
</tr>
<tr>
- <td>direct_message</td>
+ <td>allow_missing</td>
<td><a href="#bool">bool</a></td>
<td></td>
- <td><p>if direct_message is set, the notification is sent directly
-to the persons and url will be ignored.
-IM integration setting should be set for this function to work. </p></td>
- </tr>
-
- <tr>
- <td>notification_types</td>
- <td><a href="#bytebase.v1.Activity.Type">Activity.Type</a></td>
- <td>repeated</td>
- <td><p>notification_types is the list of activities types that the webhook is interested in.
-Bytebase will only send notifications to the webhook if the activity type is in the list.
-It should not be empty, and should be a subset of the following:
-- ISSUE_CREATE
-- ISSUE_COMMENT_CREATE
-- ISSUE_FIELD_UPDATE
-- ISSUE_STATUS_UPDATE
-- ISSUE_APPROVAL_NOTIFY
-- ISSUE_PIPELINE_STAGE_STATUS_UPDATE
-- ISSUE_PIPELINE_TASK_RUN_STATUS_UPDATE
-- NOTIFY_ISSUE_APPROVED
-- NOTIFY_PIPELINE_ROLLOUT </p></td>
+ <td><p>If set to true, and the plan is not found, a new plan will be created.
+In this situation, `update_mask` is ignored. </p></td>
</tr>
</tbody>
@@ -24300,83 +24472,8 @@ It should not be empty, and should be a subset of the following:
- <h3 id="bytebase.v1.Activity.Type">Activity.Type</h3>
- <p>Activity type enumeration.</p>
- <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>NOTIFY_ISSUE_APPROVED</td>
- <td>23</td>
- <td><p>Notifications via webhooks.
-
-NOTIFY_ISSUE_APPROVED represents the issue approved notification.</p></td>
- </tr>
-
- <tr>
- <td>NOTIFY_PIPELINE_ROLLOUT</td>
- <td>24</td>
- <td><p>NOTIFY_PIPELINE_ROLLOUT represents the pipeline rollout notification.</p></td>
- </tr>
-
- <tr>
- <td>ISSUE_CREATE</td>
- <td>1</td>
- <td><p>Issue related activity types.
-
-ISSUE_CREATE represents creating an issue.</p></td>
- </tr>
-
- <tr>
- <td>ISSUE_COMMENT_CREATE</td>
- <td>2</td>
- <td><p>ISSUE_COMMENT_CREATE represents commenting on an issue.</p></td>
- </tr>
-
- <tr>
- <td>ISSUE_FIELD_UPDATE</td>
- <td>3</td>
- <td><p>ISSUE_FIELD_UPDATE represents updating the issue field, likes title, description, etc.</p></td>
- </tr>
-
- <tr>
- <td>ISSUE_STATUS_UPDATE</td>
- <td>4</td>
- <td><p>ISSUE_STATUS_UPDATE represents the issue status change, including OPEN, CLOSE, CANCEL fow now.</p></td>
- </tr>
-
- <tr>
- <td>ISSUE_APPROVAL_NOTIFY</td>
- <td>21</td>
- <td><p>ISSUE_APPROVAL_NOTIFY is the type for notifying issue approval.</p></td>
- </tr>
-
- <tr>
- <td>ISSUE_PIPELINE_STAGE_STATUS_UPDATE</td>
- <td>5</td>
- <td><p>ISSUE_PIPELINE_STAGE_STATUS_UPDATE represents the pipeline stage status change, including BEGIN, END for now.</p></td>
- </tr>
-
- <tr>
- <td>ISSUE_PIPELINE_TASK_RUN_STATUS_UPDATE</td>
- <td>22</td>
- <td><p>ISSUE_PIPELINE_TASK_RUN_STATUS_UPDATE represents the pipeline task run status change, including PENDING, RUNNING, DONE, FAILED, CANCELED.</p></td>
- </tr>
-
- </tbody>
- </table>
-
- <h3 id="bytebase.v1.Webhook.Type">Webhook.Type</h3>
- <p>Webhook integration type.</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>
@@ -24384,187 +24481,160 @@ ISSUE_CREATE represents creating an issue.</p></td>
<tbody>
<tr>
- <td>TYPE_UNSPECIFIED</td>
+ <td>STATUS_UNSPECIFIED</td>
<td>0</td>
- <td><p>Unspecified type.</p></td>
+ <td><p></p></td>
</tr>
<tr>
- <td>SLACK</td>
+ <td>RUNNING</td>
<td>1</td>
- <td><p>Slack integration.</p></td>
+ <td><p></p></td>
</tr>
<tr>
- <td>DISCORD</td>
+ <td>DONE</td>
<td>2</td>
- <td><p>Discord integration.</p></td>
+ <td><p></p></td>
</tr>
<tr>
- <td>TEAMS</td>
+ <td>FAILED</td>
<td>3</td>
- <td><p>Microsoft Teams integration.</p></td>
+ <td><p></p></td>
</tr>
<tr>
- <td>DINGTALK</td>
+ <td>CANCELED</td>
<td>4</td>
- <td><p>DingTalk integration.</p></td>
- </tr>
-
- <tr>
- <td>FEISHU</td>
- <td>5</td>
- <td><p>Feishu integration.</p></td>
- </tr>
-
- <tr>
- <td>WECOM</td>
- <td>6</td>
- <td><p>WeCom (WeChat Work) integration.</p></td>
- </tr>
-
- <tr>
- <td>LARK</td>
- <td>8</td>
- <td><p>Lark integration.</p></td>
+ <td><p></p></td>
</tr>
</tbody>
</table>
-
-
-
-
- <h3 id="bytebase.v1.ProjectService">ProjectService</h3>
- <p>ProjectService manages projects that group databases and 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>GetProject</td>
- <td><a href="#bytebase.v1.GetProjectRequest">GetProjectRequest</a></td>
- <td><a href="#bytebase.v1.Project">Project</a></td>
- <td><p>GetProject retrieves a project by name.
-Users with &#34;bb.projects.get&#34; permission on the workspace or the project owner can access this method.
-Permissions required: bb.projects.get</p></td>
- </tr>
+ <h3 id="bytebase.v1.PlanCheckRun.Type">PlanCheckRun.Type</h3>
+ <p></p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>
+ </thead>
+ <tbody>
<tr>
- <td>ListProjects</td>
- <td><a href="#bytebase.v1.ListProjectsRequest">ListProjectsRequest</a></td>
- <td><a href="#bytebase.v1.ListProjectsResponse">ListProjectsResponse</a></td>
- <td><p>Lists all projects in the workspace with optional filtering.
-Permissions required: bb.projects.list</p></td>
+ <td>TYPE_UNSPECIFIED</td>
+ <td>0</td>
+ <td><p>Unspecified check type.</p></td>
</tr>
<tr>
- <td>SearchProjects</td>
- <td><a href="#bytebase.v1.SearchProjectsRequest">SearchProjectsRequest</a></td>
- <td><a href="#bytebase.v1.SearchProjectsResponse">SearchProjectsResponse</a></td>
- <td><p>Searches for projects with advanced filtering capabilities.
-Permissions required: bb.projects.get (or project-level bb.projects.get for specific projects)</p></td>
+ <td>DATABASE_STATEMENT_FAKE_ADVISE</td>
+ <td>1</td>
+ <td><p>Fake advise check for testing purposes without executing against database.</p></td>
</tr>
<tr>
- <td>CreateProject</td>
- <td><a href="#bytebase.v1.CreateProjectRequest">CreateProjectRequest</a></td>
- <td><a href="#bytebase.v1.Project">Project</a></td>
- <td><p>Creates a new project in the workspace.
-Permissions required: bb.projects.create</p></td>
+ <td>DATABASE_STATEMENT_ADVISE</td>
+ <td>3</td>
+ <td><p>SQL review check that analyzes statements against configured SQL review rules.</p></td>
</tr>
<tr>
- <td>UpdateProject</td>
- <td><a href="#bytebase.v1.UpdateProjectRequest">UpdateProjectRequest</a></td>
- <td><a href="#bytebase.v1.Project">Project</a></td>
- <td><p>Updates an existing project&#39;s properties.
-Permissions required: bb.projects.update</p></td>
+ <td>DATABASE_STATEMENT_SUMMARY_REPORT</td>
+ <td>5</td>
+ <td><p>Summary report check that generates impact analysis for the statements.</p></td>
</tr>
<tr>
- <td>DeleteProject</td>
- <td><a href="#bytebase.v1.DeleteProjectRequest">DeleteProjectRequest</a></td>
- <td><a href="#google.protobuf.Empty">.google.protobuf.Empty</a></td>
- <td><p>Deletes (soft-delete or purge) a project.
-Permissions required: bb.projects.delete</p></td>
+ <td>DATABASE_CONNECT</td>
+ <td>6</td>
+ <td><p>Connection check that verifies database connectivity.</p></td>
</tr>
<tr>
- <td>UndeleteProject</td>
- <td><a href="#bytebase.v1.UndeleteProjectRequest">UndeleteProjectRequest</a></td>
- <td><a href="#bytebase.v1.Project">Project</a></td>
- <td><p>Restores a soft-deleted project.
-Permissions required: bb.projects.undelete</p></td>
+ <td>DATABASE_GHOST_SYNC</td>
+ <td>7</td>
+ <td><p>Ghost sync check that validates gh-ost online schema change compatibility.</p></td>
</tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.PlanService">PlanService</h3>
+ <p>PlanService manages deployment plans for database changes.</p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Method Name</td><td>Request Type</td><td>Response Type</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
<tr>
- <td>BatchDeleteProjects</td>
- <td><a href="#bytebase.v1.BatchDeleteProjectsRequest">BatchDeleteProjectsRequest</a></td>
- <td><a href="#google.protobuf.Empty">.google.protobuf.Empty</a></td>
- <td><p>Deletes multiple projects in a single operation.
-Permissions required: bb.projects.delete</p></td>
+ <td>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>GetIamPolicy</td>
- <td><a href="#bytebase.v1.GetIamPolicyRequest">GetIamPolicyRequest</a></td>
- <td><a href="#bytebase.v1.IamPolicy">IamPolicy</a></td>
- <td><p>Retrieves the IAM policy for a project.
-Permissions required: bb.projects.getIamPolicy</p></td>
+ <td>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>BatchGetIamPolicy</td>
- <td><a href="#bytebase.v1.BatchGetIamPolicyRequest">BatchGetIamPolicyRequest</a></td>
- <td><a href="#bytebase.v1.BatchGetIamPolicyResponse">BatchGetIamPolicyResponse</a></td>
- <td><p>Deprecated. No permission check implemented.
-Permissions required: None</p></td>
+ <td>SearchPlans</td>
+ <td><a href="#bytebase.v1.SearchPlansRequest">SearchPlansRequest</a></td>
+ <td><a href="#bytebase.v1.SearchPlansResponse">SearchPlansResponse</a></td>
+ <td><p>Search for plans that the caller has the bb.plans.get permission on and also satisfy the specified filter &amp; query.
+Permissions required: bb.plans.get</p></td>
</tr>
<tr>
- <td>SetIamPolicy</td>
- <td><a href="#bytebase.v1.SetIamPolicyRequest">SetIamPolicyRequest</a></td>
- <td><a href="#bytebase.v1.IamPolicy">IamPolicy</a></td>
- <td><p>Sets the IAM policy for a project.
-Permissions required: bb.projects.setIamPolicy</p></td>
+ <td>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>AddWebhook</td>
- <td><a href="#bytebase.v1.AddWebhookRequest">AddWebhookRequest</a></td>
- <td><a href="#bytebase.v1.Project">Project</a></td>
- <td><p>Adds a webhook to a project for notifications.
-Permissions required: bb.projects.update</p></td>
+ <td>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>UpdateWebhook</td>
- <td><a href="#bytebase.v1.UpdateWebhookRequest">UpdateWebhookRequest</a></td>
- <td><a href="#bytebase.v1.Project">Project</a></td>
- <td><p>Updates an existing webhook configuration.
-Permissions required: bb.projects.update</p></td>
+ <td>ListPlanCheckRuns</td>
+ <td><a href="#bytebase.v1.ListPlanCheckRunsRequest">ListPlanCheckRunsRequest</a></td>
+ <td><a href="#bytebase.v1.ListPlanCheckRunsResponse">ListPlanCheckRunsResponse</a></td>
+ <td><p>Lists plan check runs for a deployment plan.
+Permissions required: bb.planCheckRuns.list</p></td>
</tr>
<tr>
- <td>RemoveWebhook</td>
- <td><a href="#bytebase.v1.RemoveWebhookRequest">RemoveWebhookRequest</a></td>
- <td><a href="#bytebase.v1.Project">Project</a></td>
- <td><p>Removes a webhook from a project.
-Permissions required: bb.projects.update</p></td>
+ <td>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>TestWebhook</td>
- <td><a href="#bytebase.v1.TestWebhookRequest">TestWebhookRequest</a></td>
- <td><a href="#bytebase.v1.TestWebhookResponse">TestWebhookResponse</a></td>
- <td><p>Tests a webhook by sending a test notification.
-Permissions required: bb.projects.update</p></td>
+ <td>BatchCancelPlanCheckRuns</td>
+ <td><a href="#bytebase.v1.BatchCancelPlanCheckRunsRequest">BatchCancelPlanCheckRunsRequest</a></td>
+ <td><a href="#bytebase.v1.BatchCancelPlanCheckRunsResponse">BatchCancelPlanCheckRunsResponse</a></td>
+ <td><p>Cancels multiple plan check runs.
+Permissions required: bb.planCheckRuns.run</p></td>
</tr>
</tbody>
@@ -24588,9 +24658,9 @@ Permissions required: bb.projects.update</p></td>
<tr>
- <td>GetProject</td>
+ <td>GetPlan</td>
<td>GET</td>
- <td>/v1/{name=projects/*}</td>
+ <td>/v1/{name=projects/*/plans/*}</td>
<td></td>
</tr>
@@ -24598,9 +24668,9 @@ Permissions required: bb.projects.update</p></td>
<tr>
- <td>ListProjects</td>
+ <td>ListPlans</td>
<td>GET</td>
- <td>/v1/projects</td>
+ <td>/v1/{parent=projects/*}/plans</td>
<td></td>
</tr>
@@ -24608,9 +24678,9 @@ Permissions required: bb.projects.update</p></td>
<tr>
- <td>SearchProjects</td>
+ <td>SearchPlans</td>
<td>POST</td>
- <td>/v1/projects:search</td>
+ <td>/v1/{parent=projects/*}/plans:search</td>
<td>*</td>
</tr>
@@ -24618,69 +24688,29 @@ Permissions required: bb.projects.update</p></td>
<tr>
- <td>CreateProject</td>
+ <td>CreatePlan</td>
<td>POST</td>
- <td>/v1/projects</td>
- <td>project</td>
+ <td>/v1/{parent=projects/*}/plans</td>
+ <td>plan</td>
</tr>
<tr>
- <td>UpdateProject</td>
+ <td>UpdatePlan</td>
<td>PATCH</td>
- <td>/v1/{project.name=projects/*}</td>
- <td>project</td>
- </tr>
-
-
-
-
- <tr>
- <td>DeleteProject</td>
- <td>DELETE</td>
- <td>/v1/{name=projects/*}</td>
- <td></td>
- </tr>
-
-
-
-
- <tr>
- <td>UndeleteProject</td>
- <td>POST</td>
- <td>/v1/{name=projects/*}:undelete</td>
- <td>*</td>
- </tr>
-
-
-
-
- <tr>
- <td>BatchDeleteProjects</td>
- <td>POST</td>
- <td>/v1/projects:batchDelete</td>
- <td>*</td>
- </tr>
-
-
-
-
- <tr>
- <td>GetIamPolicy</td>
- <td>GET</td>
- <td>/v1/{resource=projects/*}:getIamPolicy</td>
- <td></td>
+ <td>/v1/{plan.name=projects/*/plans/*}</td>
+ <td>plan</td>
</tr>
<tr>
- <td>BatchGetIamPolicy</td>
+ <td>ListPlanCheckRuns</td>
<td>GET</td>
- <td>/v1/{scope=*/*}/iamPolicies:batchGet</td>
+ <td>/v1/{parent=projects/*/plans/*}/planCheckRuns</td>
<td></td>
</tr>
@@ -24688,39 +24718,9 @@ Permissions required: bb.projects.update</p></td>
<tr>
- <td>SetIamPolicy</td>
- <td>POST</td>
- <td>/v1/{resource=projects/*}:setIamPolicy</td>
- <td>*</td>
- </tr>
-
-
-
-
- <tr>
- <td>AddWebhook</td>
- <td>POST</td>
- <td>/v1/{project=projects/*}:addWebhook</td>
- <td>*</td>
- </tr>
-
-
-
-
- <tr>
- <td>UpdateWebhook</td>
- <td>PATCH</td>
- <td>/v1/{webhook.name=projects/*/webhooks/*}:updateWebhook</td>
- <td>webhook</td>
- </tr>
-
-
-
-
- <tr>
- <td>RemoveWebhook</td>
+ <td>RunPlanChecks</td>
<td>POST</td>
- <td>/v1/{webhook.name=projects/*/webhooks/*}:removeWebhook</td>
+ <td>/v1/{name=projects/*/plans/*}:runPlanChecks</td>
<td>*</td>
</tr>
@@ -24728,9 +24728,9 @@ Permissions required: bb.projects.update</p></td>
<tr>
- <td>TestWebhook</td>
+ <td>BatchCancelPlanCheckRuns</td>
<td>POST</td>
- <td>/v1/{project=projects/*}:testWebhook</td>
+ <td>/v1/{parent=projects/*/plans/*}/planCheckRuns:batchCancel</td>
<td>*</td>
</tr>
diff --git a/proto/store/store/setting.proto b/proto/store/store/setting.proto
index afd4945468..e8b2e6b18f 100644
--- a/proto/store/store/setting.proto
+++ b/proto/store/store/setting.proto
@@ -7,6 +7,7 @@ import "google/type/expr.proto";
import "store/approval.proto";
import "store/common.proto";
import "store/database.proto";
+import "store/project_webhook.proto";
option go_package = "generated-go/store";
@@ -243,37 +244,39 @@ message Algorithm {
message AppIMSetting {
message Slack {
- bool enabled = 1;
- string token = 2;
+ string token = 1;
}
message Feishu {
- bool enabled = 1;
- string app_id = 2;
- string app_secret = 3;
+ string app_id = 1;
+ string app_secret = 2;
}
message Wecom {
- bool enabled = 1;
- string corp_id = 2;
- string agent_id = 3;
- string secret = 4;
+ string corp_id = 1;
+ string agent_id = 2;
+ string secret = 3;
}
message Lark {
- bool enabled = 1;
- string app_id = 2;
- string app_secret = 3;
+ string app_id = 1;
+ string app_secret = 2;
}
message DingTalk {
- bool enabled = 1;
- string client_id = 2;
- string client_secret = 3;
- string robot_code = 4;
+ string client_id = 1;
+ string client_secret = 2;
+ string robot_code = 3;
}
- Slack slack = 1;
- Feishu feishu = 2;
- Wecom wecom = 3;
- Lark lark = 4;
- DingTalk dingtalk = 5;
+ message IMSetting {
+ ProjectWebhook.Type type = 1;
+ oneof payload {
+ Slack slack = 2;
+ Feishu feishu = 3;
+ Wecom wecom = 4;
+ Lark lark = 5;
+ DingTalk dingtalk = 6;
+ }
+ }
+
+ repeated IMSetting settings = 1;
}
enum DatabaseChangeMode {
diff --git a/proto/v1/v1/setting_service.proto b/proto/v1/v1/setting_service.proto
index fb38d808a5..94b4f4de74 100644
--- a/proto/v1/v1/setting_service.proto
+++ b/proto/v1/v1/setting_service.proto
@@ -14,6 +14,7 @@ import "v1/common.proto";
import "v1/database_catalog_service.proto";
import "v1/database_service.proto";
import "v1/issue_service.proto";
+import "v1/project_service.proto";
option go_package = "github.com/bytebase/bytebase/backend/generated-go/v1";
@@ -148,37 +149,39 @@ message Value {
message AppIMSetting {
message Slack {
- bool enabled = 1;
- string token = 2 [(google.api.field_behavior) = INPUT_ONLY];
+ string token = 1 [(google.api.field_behavior) = INPUT_ONLY];
}
message Feishu {
- bool enabled = 1;
- string app_id = 2 [(google.api.field_behavior) = INPUT_ONLY];
- string app_secret = 3 [(google.api.field_behavior) = INPUT_ONLY];
+ string app_id = 1 [(google.api.field_behavior) = INPUT_ONLY];
+ string app_secret = 2 [(google.api.field_behavior) = INPUT_ONLY];
}
message Wecom {
- bool enabled = 1;
- string corp_id = 2 [(google.api.field_behavior) = INPUT_ONLY];
- string agent_id = 3 [(google.api.field_behavior) = INPUT_ONLY];
- string secret = 4 [(google.api.field_behavior) = INPUT_ONLY];
+ string corp_id = 1 [(google.api.field_behavior) = INPUT_ONLY];
+ string agent_id = 2 [(google.api.field_behavior) = INPUT_ONLY];
+ string secret = 3 [(google.api.field_behavior) = INPUT_ONLY];
}
message Lark {
- bool enabled = 1;
- string app_id = 2 [(google.api.field_behavior) = INPUT_ONLY];
- string app_secret = 3 [(google.api.field_behavior) = INPUT_ONLY];
+ string app_id = 1 [(google.api.field_behavior) = INPUT_ONLY];
+ string app_secret = 2 [(google.api.field_behavior) = INPUT_ONLY];
}
message DingTalk {
- bool enabled = 1;
- string client_id = 2 [(google.api.field_behavior) = INPUT_ONLY];
- string client_secret = 3 [(google.api.field_behavior) = INPUT_ONLY];
- string robot_code = 4 [(google.api.field_behavior) = INPUT_ONLY];
+ string client_id = 1 [(google.api.field_behavior) = INPUT_ONLY];
+ string client_secret = 2 [(google.api.field_behavior) = INPUT_ONLY];
+ string robot_code = 3 [(google.api.field_behavior) = INPUT_ONLY];
}
- Slack slack = 1;
- Feishu feishu = 2;
- Wecom wecom = 3;
- Lark lark = 4;
- DingTalk dingtalk = 5;
+ message IMSetting {
+ Webhook.Type type = 1;
+ oneof payload {
+ Slack slack = 2;
+ Feishu feishu = 3;
+ Wecom wecom = 4;
+ Lark lark = 5;
+ DingTalk dingtalk = 6;
+ }
+ }
+
+ repeated IMSetting settings = 1;
}
message WorkspaceProfileSetting {
diff --git a/scripts/azure-marketplace/README.md b/scripts/azure-marketplace/README.md
index c08687fc50..71a230acb9 100644
--- a/scripts/azure-marketplace/README.md
+++ b/scripts/azure-marketplace/README.md
@@ -420,21 +420,7 @@ If your bundle shows `mediaType: "application/vnd.docker.distribution.manifest.v
## Support and Resources
- **Azure Marketplace Docs**: https://learn.microsoft.com/en-us/partner-center/marketplace-offers/marketplace-containers
+- **Prepare Azure container technical assets for a Kubernetes app**: https://learn.microsoft.com/en-us/partner-center/marketplace-offers/azure-container-technical-assets-kubernetes
- **Mastering the Marketplace**: https://microsoft.github.io/Mastering-the-Marketplace/container/
- **CreateUI Sandbox**: https://portal.azure.com/#blade/Microsoft_Azure_CreateUIDef/SandboxBlade
- **Partner Center**: https://partner.microsoft.com/dashboard
-- **Microsoft Support**: Open a ticket through Partner Center
-
-## Next Steps
-
-1. ✅ Modify Helm chart statefulset.yaml (Step 1)
-2. ✅ Set up Azure Container Registry (Step 2)
-3. ✅ Build and push Docker image (Step 3)
-4. ✅ Update manifest.yaml with your ACR (Step 4)
-5. ✅ Package application with cpa tool (Step 5)
-6. ✅ Test createUiDefinition in sandbox (Step 6)
-7. ✅ Create Partner Center offer (Step 7)
-8. ✅ Submit for certification (Step 8)
-9. ✅ Publish to Azure Marketplace (Step 9)
-
-Good luck with your Azure Marketplace launch! 🚀