Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
feat(sql editor): support custom theme (dev only) (#20627)
ecmadao8d322c0bb503
diff --git a/backend/api/mcp/gen/openapi.yaml b/backend/api/mcp/gen/openapi.yamlindex 9f3f552c30..949f7f4383 100644--- a/backend/api/mcp/gen/openapi.yaml+++ b/backend/api/mcp/gen/openapi.yaml@@ -8341,10 +8341,6 @@ components:bytebase.v1.Announcement:type: objectproperties:- level:- title: level- description: The alert level of announcement- $ref: '#/components/schemas/bytebase.v1.Announcement.AlertLevel'text:type: stringtitle: text@@ -8353,17 +8349,27 @@ components:type: stringtitle: linkdescription: The optional link, user can follow the link to check extra details+ theme:+ title: theme+ description: |-+ Banner colors. Built-in presets (info/warning/critical) are a+ frontend-only concept that seeds these colors; the store only holds them.+ $ref: '#/components/schemas/bytebase.v1.Announcement.AnnouncementTheme'title: AnnouncementadditionalProperties: false- bytebase.v1.Announcement.AlertLevel:- type: string- title: AlertLevel- enum:- - ALERT_LEVEL_UNSPECIFIED- - INFO- - WARNING- - CRITICAL- description: 'We support three levels of AlertLevel: INFO, WARNING, and ERROR.'+ bytebase.v1.Announcement.AnnouncementTheme:+ type: object+ properties:+ background:+ type: string+ title: background+ description: '"r g b"'+ text:+ type: string+ title: text+ description: '"r g b"'+ title: AnnouncementTheme+ additionalProperties: falsebytebase.v1.AppIMSetting:type: objectproperties:@@ -16861,6 +16867,37 @@ components:- krbConfigtitle: SASLConfigadditionalProperties: false+ bytebase.v1.SQLEditorThemeSetting:+ type: object+ properties:+ id:+ type: string+ title: id+ name:+ type: string+ title: name+ monacoBase:+ type: string+ title: monaco_base+ tokens:+ type: object+ title: tokens+ additionalProperties:+ type: string+ title: value+ title: SQLEditorThemeSetting+ additionalProperties: false+ bytebase.v1.SQLEditorThemeSetting.TokensEntry:+ type: object+ properties:+ key:+ type: string+ title: key+ value:+ type: string+ title: value+ title: TokensEntry+ additionalProperties: falsebytebase.v1.SQLReviewRule:type: objectallOf:@@ -20693,6 +20730,18 @@ components:description: |-Allow signin/signup using email + a 6-digit one-time verification code.Requires the EMAIL setting to be configured on the workspace.+ sqlEditorThemeId:+ type: string+ title: sql_editor_theme_id+ description: |-+ Enforced SQL Editor theme id: OPAQUE — a frontend-resolved built-in preset id+ OR a custom theme's uuid. Empty ⇒ default light.+ sqlEditorCustomTheme:+ title: sql_editor_custom_theme+ description: |-+ The enforced CUSTOM theme's full definition — present ONLY when+ sql_editor_theme_id is a custom uuid. tokens is always complete.+ $ref: '#/components/schemas/bytebase.v1.SQLEditorThemeSetting'title: WorkspaceProfileSettingadditionalProperties: falsebytebase.v1.WorkspaceProfileSetting.PasswordRestriction:diff --git a/backend/api/v1/setting_service.go b/backend/api/v1/setting_service.goindex 052957e405..d289ccefa9 100644--- a/backend/api/v1/setting_service.go+++ b/backend/api/v1/setting_service.go@@ -4,6 +4,8 @@ import ("context""log/slog""regexp"+ "strconv"+ "strings""time""connectrpc.com/connect"@@ -360,6 +362,13 @@ func (s *SettingService) UpdateSetting(ctx context.Context, request *connect.ReqoldSetting.SqlResultSize = payload.SqlResultSizecase "value.workspace_profile.query_timeout":oldSetting.QueryTimeout = payload.QueryTimeout+ case "value.workspace_profile.sql_editor_theme_id":+ oldSetting.SqlEditorThemeId = payload.SqlEditorThemeId+ case "value.workspace_profile.sql_editor_custom_theme":+ if err := validateSQLEditorCustomTheme(payload.SqlEditorCustomTheme); err != nil {+ return nil, err+ }+ oldSetting.SqlEditorCustomTheme = payload.SqlEditorCustomThemedefault:return nil, connect.NewError(connect.CodeInvalidArgument, errors.Errorf("invalid update mask path %v", path))}@@ -867,6 +876,53 @@ func validateDomains(domains []string) error {return nil}+// validateSQLEditorCustomTheme checks the SHAPE of a custom theme, not the+// frontend's token vocabulary. The `--color-*` token keys are a frontend/CSS+// concern owned by SQL_EDITOR_THEME_TOKENS; the server only ensures the stored+// value isn't garbage (non-empty tokens, each an "r g b" triple). The frontend+// derives the full token set and falls back to a built-in if one is missing, so+// the backend stays theme-catalog-agnostic.+func validateSQLEditorCustomTheme(t *storepb.SQLEditorThemeSetting) error {+ if t == nil {+ return nil // built-in reference or unset+ }+ if t.Id == "" {+ return connect.NewError(connect.CodeInvalidArgument, errors.Errorf("sql_editor_custom_theme.id is required"))+ }+ if t.Name == "" {+ return connect.NewError(connect.CodeInvalidArgument, errors.Errorf("sql_editor_custom_theme.name is required"))+ }+ // monaco_base is a registered VSCode color-theme id (e.g. "vs", "vs-dark",+ // "Dark Modern"). The valid set is owned by the frontend theme service, so the+ // server only requires it be non-empty rather than hardcoding the vocabulary.+ if t.MonacoBase == "" {+ return connect.NewError(connect.CodeInvalidArgument, errors.Errorf("sql_editor_custom_theme.monaco_base is required"))+ }+ if len(t.Tokens) == 0 {+ return connect.NewError(connect.CodeInvalidArgument, errors.Errorf("sql_editor_custom_theme.tokens is required"))+ }+ for k, v := range t.Tokens {+ if !isRGBTriple(v) {+ return connect.NewError(connect.CodeInvalidArgument, errors.Errorf("sql_editor_custom_theme token %s invalid: %q", k, v))+ }+ }+ return nil+}++func isRGBTriple(s string) bool {+ parts := strings.Fields(s)+ if len(parts) != 3 {+ return false+ }+ for _, p := range parts {+ n, err := strconv.Atoi(p)+ if err != nil || n < 0 || n > 255 {+ return false+ }+ }+ return true+}+func (s *SettingService) validateEnvironments(ctx context.Context, workspaceID string, envs []*v1pb.EnvironmentSetting_Environment) error {used := map[string]bool{}for _, env := range envs {diff --git a/backend/api/v1/setting_service_converter.go b/backend/api/v1/setting_service_converter.goindex 6a4e6dd41a..269aa3dd62 100644--- a/backend/api/v1/setting_service_converter.go+++ b/backend/api/v1/setting_service_converter.go@@ -271,51 +271,51 @@ func convertWorkspaceProfileSetting(v1Setting *v1pb.WorkspaceProfileSetting) *stEnableDebug: v1Setting.EnableDebug,SqlResultSize: v1Setting.SqlResultSize,QueryTimeout: v1Setting.QueryTimeout,+ SqlEditorThemeId: v1Setting.SqlEditorThemeId,+ SqlEditorCustomTheme: convertToStoreSQLEditorThemeSetting(v1Setting.SqlEditorCustomTheme),}- // Convert announcement if present+ // Convert announcement if present. The store only holds the theme colors.if v1Setting.Announcement != nil {storeSetting.Announcement = &storepb.WorkspaceProfileSetting_Announcement{- Text: v1Setting.Announcement.Text,- Link: v1Setting.Announcement.Link,- }- // Convert alert level- switch v1Setting.Announcement.Level {- case v1pb.Announcement_ALERT_LEVEL_UNSPECIFIED:- storeSetting.Announcement.Level = storepb.WorkspaceProfileSetting_Announcement_ALERT_LEVEL_UNSPECIFIED- case v1pb.Announcement_INFO:- storeSetting.Announcement.Level = storepb.WorkspaceProfileSetting_Announcement_INFO- case v1pb.Announcement_WARNING:- storeSetting.Announcement.Level = storepb.WorkspaceProfileSetting_Announcement_WARNING- case v1pb.Announcement_CRITICAL:- storeSetting.Announcement.Level = storepb.WorkspaceProfileSetting_Announcement_CRITICAL- default:+ Text: v1Setting.Announcement.Text,+ Link: v1Setting.Announcement.Link,+ Theme: convertToStoreAnnouncementTheme(v1Setting.Announcement.Theme),}}return storeSetting}+func convertToStoreAnnouncementTheme(theme *v1pb.Announcement_AnnouncementTheme) *storepb.WorkspaceProfileSetting_Announcement_AnnouncementTheme {+ if theme == nil {+ return nil+ }+ return &storepb.WorkspaceProfileSetting_Announcement_AnnouncementTheme{+ Background: theme.Background,+ Text: theme.Text,+ }+}++func convertToV1AnnouncementTheme(theme *storepb.WorkspaceProfileSetting_Announcement_AnnouncementTheme) *v1pb.Announcement_AnnouncementTheme {+ if theme == nil {+ return nil+ }+ return &v1pb.Announcement_AnnouncementTheme{+ Background: theme.Background,+ Text: theme.Text,+ }+}+func convertToV1Announcement(announcement *storepb.WorkspaceProfileSetting_Announcement) *v1pb.Announcement {- if announcement != nil {- v1Announcement := &v1pb.Announcement{- Text: announcement.Text,- Link: announcement.Link,- }- switch announcement.Level {- case storepb.WorkspaceProfileSetting_Announcement_ALERT_LEVEL_UNSPECIFIED:- v1Announcement.Level = v1pb.Announcement_ALERT_LEVEL_UNSPECIFIED- case storepb.WorkspaceProfileSetting_Announcement_INFO:- v1Announcement.Level = v1pb.Announcement_INFO- case storepb.WorkspaceProfileSetting_Announcement_WARNING:- v1Announcement.Level = v1pb.Announcement_WARNING- case storepb.WorkspaceProfileSetting_Announcement_CRITICAL:- v1Announcement.Level = v1pb.Announcement_CRITICAL- default:- }- return v1Announcement+ if announcement == nil {+ return nil+ }+ return &v1pb.Announcement{+ Text: announcement.Text,+ Link: announcement.Link,+ Theme: convertToV1AnnouncementTheme(announcement.Theme),}- return nil}func convertToWorkspaceProfileSetting(storeSetting *storepb.WorkspaceProfileSetting) *v1pb.WorkspaceProfileSetting {@@ -345,6 +345,32 @@ func convertToWorkspaceProfileSetting(storeSetting *storepb.WorkspaceProfileSettEnableDebug: storeSetting.EnableDebug,SqlResultSize: storeSetting.SqlResultSize,QueryTimeout: storeSetting.QueryTimeout,+ SqlEditorThemeId: storeSetting.SqlEditorThemeId,+ SqlEditorCustomTheme: convertToV1SQLEditorThemeSetting(storeSetting.SqlEditorCustomTheme),+ }+}++func convertToStoreSQLEditorThemeSetting(theme *v1pb.SQLEditorThemeSetting) *storepb.SQLEditorThemeSetting {+ if theme == nil {+ return nil+ }+ return &storepb.SQLEditorThemeSetting{+ Id: theme.Id,+ Name: theme.Name,+ MonacoBase: theme.MonacoBase,+ Tokens: theme.Tokens,+ }+}++func convertToV1SQLEditorThemeSetting(theme *storepb.SQLEditorThemeSetting) *v1pb.SQLEditorThemeSetting {+ if theme == nil {+ return nil+ }+ return &v1pb.SQLEditorThemeSetting{+ Id: theme.Id,+ Name: theme.Name,+ MonacoBase: theme.MonacoBase,+ Tokens: theme.Tokens,}}diff --git a/backend/api/v1/setting_service_test.go b/backend/api/v1/setting_service_test.goindex 3a6903360d..fc69525865 100644--- a/backend/api/v1/setting_service_test.go+++ b/backend/api/v1/setting_service_test.go@@ -4,6 +4,8 @@ import ("testing""github.com/stretchr/testify/require"++ storepb "github.com/bytebase/bytebase/backend/generated-go/store")func TestValidateDomains(t *testing.T) {@@ -52,3 +54,49 @@ func TestValidateDomains(t *testing.T) {}}}++func TestValidateSQLEditorCustomTheme(t *testing.T) {+ // The server validates shape, not the frontend token vocabulary: a non-empty+ // map whose values are "r g b" triples. A representative subset is enough.+ tokens := func() map[string]string {+ return map[string]string{+ "--color-background": "1 2 3",+ "--color-accent": "4 5 6",+ }+ }+ with := func(m map[string]string) *storepb.SQLEditorThemeSetting {+ return &storepb.SQLEditorThemeSetting{Id: "u1", Name: "Brand", MonacoBase: "vs-dark", Tokens: m}+ }+ bad := func(k, v string) *storepb.SQLEditorThemeSetting {+ m := tokens()+ m[k] = v+ return with(m)+ }+ cases := []struct {+ name string+ theme *storepb.SQLEditorThemeSetting+ wantErr bool+ }{+ {"nil ok", nil, false},+ {"valid", with(tokens()), false},+ // Backend is vocabulary-agnostic: any key with a valid triple is fine.+ {"arbitrary keys ok", with(map[string]string{"--anything": "7 8 9"}), false},+ {"empty tokens", with(map[string]string{}), true},+ {"bad triple", bad("--color-accent", "300 0 0"), true},+ {"empty id", &storepb.SQLEditorThemeSetting{Id: "", Name: "Brand", MonacoBase: "vs-dark", Tokens: tokens()}, true},+ {"empty name", &storepb.SQLEditorThemeSetting{Id: "u1", Name: "", MonacoBase: "vs-dark", Tokens: tokens()}, true},+ {"empty base", &storepb.SQLEditorThemeSetting{Id: "u1", Name: "Brand", MonacoBase: "", Tokens: tokens()}, true},+ // monaco_base is a frontend-owned theme id; any non-empty value is fine.+ {"non-builtin base ok", &storepb.SQLEditorThemeSetting{Id: "u1", Name: "Brand", MonacoBase: "Dark Modern", Tokens: tokens()}, false},+ }+ for _, tc := range cases {+ t.Run(tc.name, func(t *testing.T) {+ err := validateSQLEditorCustomTheme(tc.theme)+ if tc.wantErr {+ require.Error(t, err)+ } else {+ require.NoError(t, err)+ }+ })+ }+}diff --git a/backend/generated-go/store/setting.pb.go b/backend/generated-go/store/setting.pb.goindex 644b0813c6..c351c7ef10 100644--- a/backend/generated-go/store/setting.pb.go+++ b/backend/generated-go/store/setting.pb.go@@ -146,59 +146,6 @@ func (WorkspaceProfileSetting_DatabaseChangeMode) EnumDescriptor() ([]byte, []inreturn file_store_setting_proto_rawDescGZIP(), []int{1, 0}}-// We support three levels of AlertLevel: INFO, WARNING, and ERROR.-type WorkspaceProfileSetting_Announcement_AlertLevel int32--const (- WorkspaceProfileSetting_Announcement_ALERT_LEVEL_UNSPECIFIED WorkspaceProfileSetting_Announcement_AlertLevel = 0- WorkspaceProfileSetting_Announcement_INFO WorkspaceProfileSetting_Announcement_AlertLevel = 1- WorkspaceProfileSetting_Announcement_WARNING WorkspaceProfileSetting_Announcement_AlertLevel = 2- WorkspaceProfileSetting_Announcement_CRITICAL WorkspaceProfileSetting_Announcement_AlertLevel = 3-)--// Enum value maps for WorkspaceProfileSetting_Announcement_AlertLevel.-var (- WorkspaceProfileSetting_Announcement_AlertLevel_name = map[int32]string{- 0: "ALERT_LEVEL_UNSPECIFIED",- 1: "INFO",- 2: "WARNING",- 3: "CRITICAL",- }- WorkspaceProfileSetting_Announcement_AlertLevel_value = map[string]int32{- "ALERT_LEVEL_UNSPECIFIED": 0,- "INFO": 1,- "WARNING": 2,- "CRITICAL": 3,- }-)--func (x WorkspaceProfileSetting_Announcement_AlertLevel) Enum() *WorkspaceProfileSetting_Announcement_AlertLevel {- p := new(WorkspaceProfileSetting_Announcement_AlertLevel)- *p = x- return p-}--func (x WorkspaceProfileSetting_Announcement_AlertLevel) String() string {- return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))-}--func (WorkspaceProfileSetting_Announcement_AlertLevel) Descriptor() protoreflect.EnumDescriptor {- return file_store_setting_proto_enumTypes[2].Descriptor()-}--func (WorkspaceProfileSetting_Announcement_AlertLevel) Type() protoreflect.EnumType {- return &file_store_setting_proto_enumTypes[2]-}--func (x WorkspaceProfileSetting_Announcement_AlertLevel) Number() protoreflect.EnumNumber {- return protoreflect.EnumNumber(x)-}--// Deprecated: Use WorkspaceProfileSetting_Announcement_AlertLevel.Descriptor instead.-func (WorkspaceProfileSetting_Announcement_AlertLevel) EnumDescriptor() ([]byte, []int) {- return file_store_setting_proto_rawDescGZIP(), []int{1, 0, 0}-}-type WorkspaceApprovalSetting_Rule_Source int32const (@@ -241,11 +188,11 @@ func (x WorkspaceApprovalSetting_Rule_Source) String() string {}func (WorkspaceApprovalSetting_Rule_Source) Descriptor() protoreflect.EnumDescriptor {- return file_store_setting_proto_enumTypes[3].Descriptor()+ return file_store_setting_proto_enumTypes[2].Descriptor()}func (WorkspaceApprovalSetting_Rule_Source) Type() protoreflect.EnumType {- return &file_store_setting_proto_enumTypes[3]+ return &file_store_setting_proto_enumTypes[2]}func (x WorkspaceApprovalSetting_Rule_Source) Number() protoreflect.EnumNumber {@@ -254,7 +201,7 @@ func (x WorkspaceApprovalSetting_Rule_Source) Number() protoreflect.EnumNumber {// Deprecated: Use WorkspaceApprovalSetting_Rule_Source.Descriptor instead.func (WorkspaceApprovalSetting_Rule_Source) EnumDescriptor() ([]byte, []int) {- return file_store_setting_proto_rawDescGZIP(), []int{2, 0, 0}+ return file_store_setting_proto_rawDescGZIP(), []int{3, 0, 0}}type Algorithm_InnerOuterMask_MaskType int32@@ -290,11 +237,11 @@ func (x Algorithm_InnerOuterMask_MaskType) String() string {}func (Algorithm_InnerOuterMask_MaskType) Descriptor() protoreflect.EnumDescriptor {- return file_store_setting_proto_enumTypes[4].Descriptor()+ return file_store_setting_proto_enumTypes[3].Descriptor()}func (Algorithm_InnerOuterMask_MaskType) Type() protoreflect.EnumType {- return &file_store_setting_proto_enumTypes[4]+ return &file_store_setting_proto_enumTypes[3]}func (x Algorithm_InnerOuterMask_MaskType) Number() protoreflect.EnumNumber {@@ -303,7 +250,7 @@ func (x Algorithm_InnerOuterMask_MaskType) Number() protoreflect.EnumNumber {// Deprecated: Use Algorithm_InnerOuterMask_MaskType.Descriptor instead.func (Algorithm_InnerOuterMask_MaskType) EnumDescriptor() ([]byte, []int) {- return file_store_setting_proto_rawDescGZIP(), []int{4, 3, 0}+ return file_store_setting_proto_rawDescGZIP(), []int{5, 3, 0}}type AISetting_Provider int32@@ -345,11 +292,11 @@ func (x AISetting_Provider) String() string {}func (AISetting_Provider) Descriptor() protoreflect.EnumDescriptor {- return file_store_setting_proto_enumTypes[5].Descriptor()+ return file_store_setting_proto_enumTypes[4].Descriptor()}func (AISetting_Provider) Type() protoreflect.EnumType {- return &file_store_setting_proto_enumTypes[5]+ return &file_store_setting_proto_enumTypes[4]}func (x AISetting_Provider) Number() protoreflect.EnumNumber {@@ -358,7 +305,7 @@ func (x AISetting_Provider) Number() protoreflect.EnumNumber {// Deprecated: Use AISetting_Provider.Descriptor instead.func (AISetting_Provider) EnumDescriptor() ([]byte, []int) {- return file_store_setting_proto_rawDescGZIP(), []int{7, 0}+ return file_store_setting_proto_rawDescGZIP(), []int{8, 0}}type EmailSetting_Type int32@@ -391,11 +338,11 @@ func (x EmailSetting_Type) String() string {}func (EmailSetting_Type) Descriptor() protoreflect.EnumDescriptor {- return file_store_setting_proto_enumTypes[6].Descriptor()+ return file_store_setting_proto_enumTypes[5].Descriptor()}func (EmailSetting_Type) Type() protoreflect.EnumType {- return &file_store_setting_proto_enumTypes[6]+ return &file_store_setting_proto_enumTypes[5]}func (x EmailSetting_Type) Number() protoreflect.EnumNumber {@@ -404,7 +351,7 @@ func (x EmailSetting_Type) Number() protoreflect.EnumNumber {// Deprecated: Use EmailSetting_Type.Descriptor instead.func (EmailSetting_Type) EnumDescriptor() ([]byte, []int) {- return file_store_setting_proto_rawDescGZIP(), []int{9, 0}+ return file_store_setting_proto_rawDescGZIP(), []int{10, 0}}type EmailSetting_SMTPConfig_Encryption int32@@ -443,11 +390,11 @@ func (x EmailSetting_SMTPConfig_Encryption) String() string {}func (EmailSetting_SMTPConfig_Encryption) Descriptor() protoreflect.EnumDescriptor {- return file_store_setting_proto_enumTypes[7].Descriptor()+ return file_store_setting_proto_enumTypes[6].Descriptor()}func (EmailSetting_SMTPConfig_Encryption) Type() protoreflect.EnumType {- return &file_store_setting_proto_enumTypes[7]+ return &file_store_setting_proto_enumTypes[6]}func (x EmailSetting_SMTPConfig_Encryption) Number() protoreflect.EnumNumber {@@ -456,7 +403,7 @@ func (x EmailSetting_SMTPConfig_Encryption) Number() protoreflect.EnumNumber {// Deprecated: Use EmailSetting_SMTPConfig_Encryption.Descriptor instead.func (EmailSetting_SMTPConfig_Encryption) EnumDescriptor() ([]byte, []int) {- return file_store_setting_proto_rawDescGZIP(), []int{9, 0, 0}+ return file_store_setting_proto_rawDescGZIP(), []int{10, 0, 0}}type EmailSetting_SMTPConfig_Authentication int32@@ -498,11 +445,11 @@ func (x EmailSetting_SMTPConfig_Authentication) String() string {}func (EmailSetting_SMTPConfig_Authentication) Descriptor() protoreflect.EnumDescriptor {- return file_store_setting_proto_enumTypes[8].Descriptor()+ return file_store_setting_proto_enumTypes[7].Descriptor()}func (EmailSetting_SMTPConfig_Authentication) Type() protoreflect.EnumType {- return &file_store_setting_proto_enumTypes[8]+ return &file_store_setting_proto_enumTypes[7]}func (x EmailSetting_SMTPConfig_Authentication) Number() protoreflect.EnumNumber {@@ -511,7 +458,7 @@ func (x EmailSetting_SMTPConfig_Authentication) Number() protoreflect.EnumNumber// Deprecated: Use EmailSetting_SMTPConfig_Authentication.Descriptor instead.func (EmailSetting_SMTPConfig_Authentication) EnumDescriptor() ([]byte, []int) {- return file_store_setting_proto_rawDescGZIP(), []int{9, 0, 1}+ return file_store_setting_proto_rawDescGZIP(), []int{10, 0, 1}}type SystemSetting struct {@@ -607,6 +554,12 @@ type WorkspaceProfileSetting struct {// Allow signin/signup using email + a 6-digit one-time verification code.// Requires the EMAIL setting to be configured on the workspace.AllowEmailCodeSignin bool `protobuf:"varint,22,opt,name=allow_email_code_signin,json=allowEmailCodeSignin,proto3" json:"allow_email_code_signin,omitempty"`+ // Enforced SQL Editor theme id: OPAQUE — a frontend-resolved built-in preset id+ // OR a custom theme's uuid. Empty ⇒ default light.+ SqlEditorThemeId string `protobuf:"bytes,23,opt,name=sql_editor_theme_id,json=sqlEditorThemeId,proto3" json:"sql_editor_theme_id,omitempty"`+ // The enforced CUSTOM theme's full definition — present ONLY when+ // sql_editor_theme_id is a custom uuid. tokens is always complete.+ SqlEditorCustomTheme *SQLEditorThemeSetting `protobuf:"bytes,24,opt,name=sql_editor_custom_theme,json=sqlEditorCustomTheme,proto3" json:"sql_editor_custom_theme,omitempty"`unknownFields protoimpl.UnknownFieldssizeCache protoimpl.SizeCache}@@ -788,6 +741,88 @@ func (x *WorkspaceProfileSetting) GetAllowEmailCodeSignin() bool {return false}+func (x *WorkspaceProfileSetting) GetSqlEditorThemeId() string {+ if x != nil {+ return x.SqlEditorThemeId+ }+ return ""+}++func (x *WorkspaceProfileSetting) GetSqlEditorCustomTheme() *SQLEditorThemeSetting {+ if x != nil {+ return x.SqlEditorCustomTheme+ }+ return nil+}++type SQLEditorThemeSetting struct {+ state protoimpl.MessageState `protogen:"open.v1"`+ Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`+ Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`+ MonacoBase string `protobuf:"bytes,3,opt,name=monaco_base,json=monacoBase,proto3" json:"monaco_base,omitempty"`+ Tokens map[string]string `protobuf:"bytes,4,rep,name=tokens,proto3" json:"tokens,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`+ unknownFields protoimpl.UnknownFields+ sizeCache protoimpl.SizeCache+}++func (x *SQLEditorThemeSetting) Reset() {+ *x = SQLEditorThemeSetting{}+ mi := &file_store_setting_proto_msgTypes[2]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+}++func (x *SQLEditorThemeSetting) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*SQLEditorThemeSetting) ProtoMessage() {}++func (x *SQLEditorThemeSetting) ProtoReflect() protoreflect.Message {+ mi := &file_store_setting_proto_msgTypes[2]+ if x != nil {+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ if ms.LoadMessageInfo() == nil {+ ms.StoreMessageInfo(mi)+ }+ return ms+ }+ return mi.MessageOf(x)+}++// Deprecated: Use SQLEditorThemeSetting.ProtoReflect.Descriptor instead.+func (*SQLEditorThemeSetting) Descriptor() ([]byte, []int) {+ return file_store_setting_proto_rawDescGZIP(), []int{2}+}++func (x *SQLEditorThemeSetting) GetId() string {+ if x != nil {+ return x.Id+ }+ return ""+}++func (x *SQLEditorThemeSetting) GetName() string {+ if x != nil {+ return x.Name+ }+ return ""+}++func (x *SQLEditorThemeSetting) GetMonacoBase() string {+ if x != nil {+ return x.MonacoBase+ }+ return ""+}++func (x *SQLEditorThemeSetting) GetTokens() map[string]string {+ if x != nil {+ return x.Tokens+ }+ return nil+}+type WorkspaceApprovalSetting struct {state protoimpl.MessageState `protogen:"open.v1"`Rules []*WorkspaceApprovalSetting_Rule `protobuf:"bytes,1,rep,name=rules,proto3" json:"rules,omitempty"`@@ -797,7 +832,7 @@ type WorkspaceApprovalSetting struct {func (x *WorkspaceApprovalSetting) Reset() {*x = WorkspaceApprovalSetting{}- mi := &file_store_setting_proto_msgTypes[2]+ mi := &file_store_setting_proto_msgTypes[3]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -809,7 +844,7 @@ func (x *WorkspaceApprovalSetting) String() string {func (*WorkspaceApprovalSetting) ProtoMessage() {}func (x *WorkspaceApprovalSetting) ProtoReflect() protoreflect.Message {- mi := &file_store_setting_proto_msgTypes[2]+ mi := &file_store_setting_proto_msgTypes[3]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -822,7 +857,7 @@ func (x *WorkspaceApprovalSetting) ProtoReflect() protoreflect.Message {// Deprecated: Use WorkspaceApprovalSetting.ProtoReflect.Descriptor instead.func (*WorkspaceApprovalSetting) Descriptor() ([]byte, []int) {- return file_store_setting_proto_rawDescGZIP(), []int{2}+ return file_store_setting_proto_rawDescGZIP(), []int{3}}func (x *WorkspaceApprovalSetting) GetRules() []*WorkspaceApprovalSetting_Rule {@@ -841,7 +876,7 @@ type DataClassificationSetting struct {func (x *DataClassificationSetting) Reset() {*x = DataClassificationSetting{}- mi := &file_store_setting_proto_msgTypes[3]+ mi := &file_store_setting_proto_msgTypes[4]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -853,7 +888,7 @@ func (x *DataClassificationSetting) String() string {func (*DataClassificationSetting) ProtoMessage() {}func (x *DataClassificationSetting) ProtoReflect() protoreflect.Message {- mi := &file_store_setting_proto_msgTypes[3]+ mi := &file_store_setting_proto_msgTypes[4]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -866,7 +901,7 @@ func (x *DataClassificationSetting) ProtoReflect() protoreflect.Message {// Deprecated: Use DataClassificationSetting.ProtoReflect.Descriptor instead.func (*DataClassificationSetting) Descriptor() ([]byte, []int) {- return file_store_setting_proto_rawDescGZIP(), []int{3}+ return file_store_setting_proto_rawDescGZIP(), []int{4}}func (x *DataClassificationSetting) GetConfigs() []*DataClassificationSetting_DataClassificationConfig {@@ -891,7 +926,7 @@ type Algorithm struct {func (x *Algorithm) Reset() {*x = Algorithm{}- mi := &file_store_setting_proto_msgTypes[4]+ mi := &file_store_setting_proto_msgTypes[5]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -903,7 +938,7 @@ func (x *Algorithm) String() string {func (*Algorithm) ProtoMessage() {}func (x *Algorithm) ProtoReflect() protoreflect.Message {- mi := &file_store_setting_proto_msgTypes[4]+ mi := &file_store_setting_proto_msgTypes[5]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -916,7 +951,7 @@ func (x *Algorithm) ProtoReflect() protoreflect.Message {// Deprecated: Use Algorithm.ProtoReflect.Descriptor instead.func (*Algorithm) Descriptor() ([]byte, []int) {- return file_store_setting_proto_rawDescGZIP(), []int{4}+ return file_store_setting_proto_rawDescGZIP(), []int{5}}func (x *Algorithm) GetMask() isAlgorithm_Mask {@@ -999,7 +1034,7 @@ type SemanticTypeSetting struct {func (x *SemanticTypeSetting) Reset() {*x = SemanticTypeSetting{}- mi := &file_store_setting_proto_msgTypes[5]+ mi := &file_store_setting_proto_msgTypes[6]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -1011,7 +1046,7 @@ func (x *SemanticTypeSetting) String() string {func (*SemanticTypeSetting) ProtoMessage() {}func (x *SemanticTypeSetting) ProtoReflect() protoreflect.Message {- mi := &file_store_setting_proto_msgTypes[5]+ mi := &file_store_setting_proto_msgTypes[6]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -1024,7 +1059,7 @@ func (x *SemanticTypeSetting) ProtoReflect() protoreflect.Message {// Deprecated: Use SemanticTypeSetting.ProtoReflect.Descriptor instead.func (*SemanticTypeSetting) Descriptor() ([]byte, []int) {- return file_store_setting_proto_rawDescGZIP(), []int{5}+ return file_store_setting_proto_rawDescGZIP(), []int{6}}func (x *SemanticTypeSetting) GetTypes() []*SemanticTypeSetting_SemanticType {@@ -1043,7 +1078,7 @@ type AppIMSetting struct {func (x *AppIMSetting) Reset() {*x = AppIMSetting{}- mi := &file_store_setting_proto_msgTypes[6]+ mi := &file_store_setting_proto_msgTypes[7]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -1055,7 +1090,7 @@ func (x *AppIMSetting) String() string {func (*AppIMSetting) ProtoMessage() {}func (x *AppIMSetting) ProtoReflect() protoreflect.Message {- mi := &file_store_setting_proto_msgTypes[6]+ mi := &file_store_setting_proto_msgTypes[7]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -1068,7 +1103,7 @@ func (x *AppIMSetting) ProtoReflect() protoreflect.Message {// Deprecated: Use AppIMSetting.ProtoReflect.Descriptor instead.func (*AppIMSetting) Descriptor() ([]byte, []int) {- return file_store_setting_proto_rawDescGZIP(), []int{6}+ return file_store_setting_proto_rawDescGZIP(), []int{7}}func (x *AppIMSetting) GetSettings() []*AppIMSetting_IMSetting {@@ -1092,7 +1127,7 @@ type AISetting struct {func (x *AISetting) Reset() {*x = AISetting{}- mi := &file_store_setting_proto_msgTypes[7]+ mi := &file_store_setting_proto_msgTypes[8]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -1104,7 +1139,7 @@ func (x *AISetting) String() string {func (*AISetting) ProtoMessage() {}func (x *AISetting) ProtoReflect() protoreflect.Message {- mi := &file_store_setting_proto_msgTypes[7]+ mi := &file_store_setting_proto_msgTypes[8]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -1117,7 +1152,7 @@ func (x *AISetting) ProtoReflect() protoreflect.Message {// Deprecated: Use AISetting.ProtoReflect.Descriptor instead.func (*AISetting) Descriptor() ([]byte, []int) {- return file_store_setting_proto_rawDescGZIP(), []int{7}+ return file_store_setting_proto_rawDescGZIP(), []int{8}}func (x *AISetting) GetEnabled() bool {@@ -1171,7 +1206,7 @@ type EnvironmentSetting struct {func (x *EnvironmentSetting) Reset() {*x = EnvironmentSetting{}- mi := &file_store_setting_proto_msgTypes[8]+ mi := &file_store_setting_proto_msgTypes[9]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -1183,7 +1218,7 @@ func (x *EnvironmentSetting) String() string {func (*EnvironmentSetting) ProtoMessage() {}func (x *EnvironmentSetting) ProtoReflect() protoreflect.Message {- mi := &file_store_setting_proto_msgTypes[8]+ mi := &file_store_setting_proto_msgTypes[9]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -1196,7 +1231,7 @@ func (x *EnvironmentSetting) ProtoReflect() protoreflect.Message {// Deprecated: Use EnvironmentSetting.ProtoReflect.Descriptor instead.func (*EnvironmentSetting) Descriptor() ([]byte, []int) {- return file_store_setting_proto_rawDescGZIP(), []int{8}+ return file_store_setting_proto_rawDescGZIP(), []int{9}}func (x *EnvironmentSetting) GetEnvironments() []*EnvironmentSetting_Environment {@@ -1221,7 +1256,7 @@ type EmailSetting struct {func (x *EmailSetting) Reset() {*x = EmailSetting{}- mi := &file_store_setting_proto_msgTypes[9]+ mi := &file_store_setting_proto_msgTypes[10]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -1233,7 +1268,7 @@ func (x *EmailSetting) String() string {func (*EmailSetting) ProtoMessage() {}func (x *EmailSetting) ProtoReflect() protoreflect.Message {- mi := &file_store_setting_proto_msgTypes[9]+ mi := &file_store_setting_proto_msgTypes[10]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -1246,7 +1281,7 @@ func (x *EmailSetting) ProtoReflect() protoreflect.Message {// Deprecated: Use EmailSetting.ProtoReflect.Descriptor instead.func (*EmailSetting) Descriptor() ([]byte, []int) {- return file_store_setting_proto_rawDescGZIP(), []int{9}+ return file_store_setting_proto_rawDescGZIP(), []int{10}}func (x *EmailSetting) GetFrom() string {@@ -1298,19 +1333,20 @@ func (*EmailSetting_Smtp) isEmailSetting_Config() {}type WorkspaceProfileSetting_Announcement struct {state protoimpl.MessageState `protogen:"open.v1"`- // The alert level of the announcement.- Level WorkspaceProfileSetting_Announcement_AlertLevel `protobuf:"varint,1,opt,name=level,proto3,enum=bytebase.store.WorkspaceProfileSetting_Announcement_AlertLevel" json:"level,omitempty"`// The text of the announcement.Text string `protobuf:"bytes,2,opt,name=text,proto3" json:"text,omitempty"`// The optional link, user can follow the link to check extra details- Link string `protobuf:"bytes,3,opt,name=link,proto3" json:"link,omitempty"`+ Link string `protobuf:"bytes,3,opt,name=link,proto3" json:"link,omitempty"`+ // Banner colors. Built-in presets (info/warning/critical) are a+ // frontend-only concept that seeds these colors; the store only holds them.+ Theme *WorkspaceProfileSetting_Announcement_AnnouncementTheme `protobuf:"bytes,4,opt,name=theme,proto3" json:"theme,omitempty"`unknownFields protoimpl.UnknownFieldssizeCache protoimpl.SizeCache}func (x *WorkspaceProfileSetting_Announcement) Reset() {*x = WorkspaceProfileSetting_Announcement{}- mi := &file_store_setting_proto_msgTypes[10]+ mi := &file_store_setting_proto_msgTypes[11]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -1322,7 +1358,7 @@ func (x *WorkspaceProfileSetting_Announcement) String() string {func (*WorkspaceProfileSetting_Announcement) ProtoMessage() {}func (x *WorkspaceProfileSetting_Announcement) ProtoReflect() protoreflect.Message {- mi := &file_store_setting_proto_msgTypes[10]+ mi := &file_store_setting_proto_msgTypes[11]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -1338,13 +1374,6 @@ func (*WorkspaceProfileSetting_Announcement) Descriptor() ([]byte, []int) {return file_store_setting_proto_rawDescGZIP(), []int{1, 0}}-func (x *WorkspaceProfileSetting_Announcement) GetLevel() WorkspaceProfileSetting_Announcement_AlertLevel {- if x != nil {- return x.Level- }- return WorkspaceProfileSetting_Announcement_ALERT_LEVEL_UNSPECIFIED-}-func (x *WorkspaceProfileSetting_Announcement) GetText() string {if x != nil {return x.Text@@ -1359,6 +1388,13 @@ func (x *WorkspaceProfileSetting_Announcement) GetLink() string {return ""}+func (x *WorkspaceProfileSetting_Announcement) GetTheme() *WorkspaceProfileSetting_Announcement_AnnouncementTheme {+ if x != nil {+ return x.Theme+ }+ return nil+}+type WorkspaceProfileSetting_PasswordRestriction struct {state protoimpl.MessageState `protogen:"open.v1"`// min_length is the minimum length for password, should be no less than 8.@@ -1381,7 +1417,7 @@ type WorkspaceProfileSetting_PasswordRestriction struct {func (x *WorkspaceProfileSetting_PasswordRestriction) Reset() {*x = WorkspaceProfileSetting_PasswordRestriction{}- mi := &file_store_setting_proto_msgTypes[11]+ mi := &file_store_setting_proto_msgTypes[12]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -1393,7 +1429,7 @@ func (x *WorkspaceProfileSetting_PasswordRestriction) String() string {func (*WorkspaceProfileSetting_PasswordRestriction) ProtoMessage() {}func (x *WorkspaceProfileSetting_PasswordRestriction) ProtoReflect() protoreflect.Message {- mi := &file_store_setting_proto_msgTypes[11]+ mi := &file_store_setting_proto_msgTypes[12]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -1458,6 +1494,58 @@ func (x *WorkspaceProfileSetting_PasswordRestriction) GetPasswordRotation() *durreturn nil}+type WorkspaceProfileSetting_Announcement_AnnouncementTheme struct {+ state protoimpl.MessageState `protogen:"open.v1"`+ Background string `protobuf:"bytes,1,opt,name=background,proto3" json:"background,omitempty"` // "r g b"+ Text string `protobuf:"bytes,2,opt,name=text,proto3" json:"text,omitempty"` // "r g b"+ unknownFields protoimpl.UnknownFields+ sizeCache protoimpl.SizeCache+}++func (x *WorkspaceProfileSetting_Announcement_AnnouncementTheme) Reset() {+ *x = WorkspaceProfileSetting_Announcement_AnnouncementTheme{}+ mi := &file_store_setting_proto_msgTypes[13]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+}++func (x *WorkspaceProfileSetting_Announcement_AnnouncementTheme) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*WorkspaceProfileSetting_Announcement_AnnouncementTheme) ProtoMessage() {}++func (x *WorkspaceProfileSetting_Announcement_AnnouncementTheme) ProtoReflect() protoreflect.Message {+ mi := &file_store_setting_proto_msgTypes[13]+ 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 WorkspaceProfileSetting_Announcement_AnnouncementTheme.ProtoReflect.Descriptor instead.+func (*WorkspaceProfileSetting_Announcement_AnnouncementTheme) Descriptor() ([]byte, []int) {+ return file_store_setting_proto_rawDescGZIP(), []int{1, 0, 0}+}++func (x *WorkspaceProfileSetting_Announcement_AnnouncementTheme) GetBackground() string {+ if x != nil {+ return x.Background+ }+ return ""+}++func (x *WorkspaceProfileSetting_Announcement_AnnouncementTheme) GetText() string {+ if x != nil {+ return x.Text+ }+ return ""+}+type WorkspaceApprovalSetting_Rule struct {state protoimpl.MessageState `protogen:"open.v1"`Template *ApprovalTemplate `protobuf:"bytes,1,opt,name=template,proto3" json:"template,omitempty"`@@ -1469,7 +1557,7 @@ type WorkspaceApprovalSetting_Rule struct {func (x *WorkspaceApprovalSetting_Rule) Reset() {*x = WorkspaceApprovalSetting_Rule{}- mi := &file_store_setting_proto_msgTypes[12]+ mi := &file_store_setting_proto_msgTypes[15]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -1481,7 +1569,7 @@ func (x *WorkspaceApprovalSetting_Rule) String() string {func (*WorkspaceApprovalSetting_Rule) ProtoMessage() {}func (x *WorkspaceApprovalSetting_Rule) ProtoReflect() protoreflect.Message {- mi := &file_store_setting_proto_msgTypes[12]+ mi := &file_store_setting_proto_msgTypes[15]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -1494,7 +1582,7 @@ func (x *WorkspaceApprovalSetting_Rule) ProtoReflect() protoreflect.Message {// Deprecated: Use WorkspaceApprovalSetting_Rule.ProtoReflect.Descriptor instead.func (*WorkspaceApprovalSetting_Rule) Descriptor() ([]byte, []int) {- return file_store_setting_proto_rawDescGZIP(), []int{2, 0}+ return file_store_setting_proto_rawDescGZIP(), []int{3, 0}}func (x *WorkspaceApprovalSetting_Rule) GetTemplate() *ApprovalTemplate {@@ -1535,7 +1623,7 @@ type DataClassificationSetting_DataClassificationConfig struct {func (x *DataClassificationSetting_DataClassificationConfig) Reset() {*x = DataClassificationSetting_DataClassificationConfig{}- mi := &file_store_setting_proto_msgTypes[13]+ mi := &file_store_setting_proto_msgTypes[16]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -1547,7 +1635,7 @@ func (x *DataClassificationSetting_DataClassificationConfig) String() string {func (*DataClassificationSetting_DataClassificationConfig) ProtoMessage() {}func (x *DataClassificationSetting_DataClassificationConfig) ProtoReflect() protoreflect.Message {- mi := &file_store_setting_proto_msgTypes[13]+ mi := &file_store_setting_proto_msgTypes[16]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -1560,7 +1648,7 @@ func (x *DataClassificationSetting_DataClassificationConfig) ProtoReflect() prot// Deprecated: Use DataClassificationSetting_DataClassificationConfig.ProtoReflect.Descriptor instead.func (*DataClassificationSetting_DataClassificationConfig) Descriptor() ([]byte, []int) {- return file_store_setting_proto_rawDescGZIP(), []int{3, 0}+ return file_store_setting_proto_rawDescGZIP(), []int{4, 0}}func (x *DataClassificationSetting_DataClassificationConfig) GetId() string {@@ -1602,7 +1690,7 @@ type DataClassificationSetting_DataClassificationConfig_Level struct {func (x *DataClassificationSetting_DataClassificationConfig_Level) Reset() {*x = DataClassificationSetting_DataClassificationConfig_Level{}- mi := &file_store_setting_proto_msgTypes[14]+ mi := &file_store_setting_proto_msgTypes[17]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -1614,7 +1702,7 @@ func (x *DataClassificationSetting_DataClassificationConfig_Level) String() strifunc (*DataClassificationSetting_DataClassificationConfig_Level) ProtoMessage() {}func (x *DataClassificationSetting_DataClassificationConfig_Level) ProtoReflect() protoreflect.Message {- mi := &file_store_setting_proto_msgTypes[14]+ mi := &file_store_setting_proto_msgTypes[17]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -1627,7 +1715,7 @@ func (x *DataClassificationSetting_DataClassificationConfig_Level) ProtoReflect(// Deprecated: Use DataClassificationSetting_DataClassificationConfig_Level.ProtoReflect.Descriptor instead.func (*DataClassificationSetting_DataClassificationConfig_Level) Descriptor() ([]byte, []int) {- return file_store_setting_proto_rawDescGZIP(), []int{3, 0, 0}+ return file_store_setting_proto_rawDescGZIP(), []int{4, 0, 0}}func (x *DataClassificationSetting_DataClassificationConfig_Level) GetTitle() string {@@ -1657,7 +1745,7 @@ type DataClassificationSetting_DataClassificationConfig_DataClassification strucfunc (x *DataClassificationSetting_DataClassificationConfig_DataClassification) Reset() {*x = DataClassificationSetting_DataClassificationConfig_DataClassification{}- mi := &file_store_setting_proto_msgTypes[15]+ mi := &file_store_setting_proto_msgTypes[18]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -1669,7 +1757,7 @@ func (x *DataClassificationSetting_DataClassificationConfig_DataClassification)func (*DataClassificationSetting_DataClassificationConfig_DataClassification) ProtoMessage() {}func (x *DataClassificationSetting_DataClassificationConfig_DataClassification) ProtoReflect() protoreflect.Message {- mi := &file_store_setting_proto_msgTypes[15]+ mi := &file_store_setting_proto_msgTypes[18]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -1682,7 +1770,7 @@ func (x *DataClassificationSetting_DataClassificationConfig_DataClassification)// Deprecated: Use DataClassificationSetting_DataClassificationConfig_DataClassification.ProtoReflect.Descriptor instead.func (*DataClassificationSetting_DataClassificationConfig_DataClassification) Descriptor() ([]byte, []int) {- return file_store_setting_proto_rawDescGZIP(), []int{3, 0, 1}+ return file_store_setting_proto_rawDescGZIP(), []int{4, 0, 1}}func (x *DataClassificationSetting_DataClassificationConfig_DataClassification) GetId() string {@@ -1717,7 +1805,7 @@ type Algorithm_FullMask struct {func (x *Algorithm_FullMask) Reset() {*x = Algorithm_FullMask{}- mi := &file_store_setting_proto_msgTypes[17]+ mi := &file_store_setting_proto_msgTypes[20]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -1729,7 +1817,7 @@ func (x *Algorithm_FullMask) String() string {func (*Algorithm_FullMask) ProtoMessage() {}func (x *Algorithm_FullMask) ProtoReflect() protoreflect.Message {- mi := &file_store_setting_proto_msgTypes[17]+ mi := &file_store_setting_proto_msgTypes[20]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -1742,7 +1830,7 @@ func (x *Algorithm_FullMask) ProtoReflect() protoreflect.Message {// Deprecated: Use Algorithm_FullMask.ProtoReflect.Descriptor instead.func (*Algorithm_FullMask) Descriptor() ([]byte, []int) {- return file_store_setting_proto_rawDescGZIP(), []int{4, 0}+ return file_store_setting_proto_rawDescGZIP(), []int{5, 0}}func (x *Algorithm_FullMask) GetSubstitution() string {@@ -1763,7 +1851,7 @@ type Algorithm_RangeMask struct {func (x *Algorithm_RangeMask) Reset() {*x = Algorithm_RangeMask{}- mi := &file_store_setting_proto_msgTypes[18]+ mi := &file_store_setting_proto_msgTypes[21]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -1775,7 +1863,7 @@ func (x *Algorithm_RangeMask) String() string {func (*Algorithm_RangeMask) ProtoMessage() {}func (x *Algorithm_RangeMask) ProtoReflect() protoreflect.Message {- mi := &file_store_setting_proto_msgTypes[18]+ mi := &file_store_setting_proto_msgTypes[21]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -1788,7 +1876,7 @@ func (x *Algorithm_RangeMask) ProtoReflect() protoreflect.Message {// Deprecated: Use Algorithm_RangeMask.ProtoReflect.Descriptor instead.func (*Algorithm_RangeMask) Descriptor() ([]byte, []int) {- return file_store_setting_proto_rawDescGZIP(), []int{4, 1}+ return file_store_setting_proto_rawDescGZIP(), []int{5, 1}}func (x *Algorithm_RangeMask) GetSlices() []*Algorithm_RangeMask_Slice {@@ -1808,7 +1896,7 @@ type Algorithm_MD5Mask struct {func (x *Algorithm_MD5Mask) Reset() {*x = Algorithm_MD5Mask{}- mi := &file_store_setting_proto_msgTypes[19]+ mi := &file_store_setting_proto_msgTypes[22]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -1820,7 +1908,7 @@ func (x *Algorithm_MD5Mask) String() string {func (*Algorithm_MD5Mask) ProtoMessage() {}func (x *Algorithm_MD5Mask) ProtoReflect() protoreflect.Message {- mi := &file_store_setting_proto_msgTypes[19]+ mi := &file_store_setting_proto_msgTypes[22]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -1833,7 +1921,7 @@ func (x *Algorithm_MD5Mask) ProtoReflect() protoreflect.Message {// Deprecated: Use Algorithm_MD5Mask.ProtoReflect.Descriptor instead.func (*Algorithm_MD5Mask) Descriptor() ([]byte, []int) {- return file_store_setting_proto_rawDescGZIP(), []int{4, 2}+ return file_store_setting_proto_rawDescGZIP(), []int{5, 2}}func (x *Algorithm_MD5Mask) GetSalt() string {@@ -1855,7 +1943,7 @@ type Algorithm_InnerOuterMask struct {func (x *Algorithm_InnerOuterMask) Reset() {*x = Algorithm_InnerOuterMask{}- mi := &file_store_setting_proto_msgTypes[20]+ mi := &file_store_setting_proto_msgTypes[23]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -1867,7 +1955,7 @@ func (x *Algorithm_InnerOuterMask) String() string {func (*Algorithm_InnerOuterMask) ProtoMessage() {}func (x *Algorithm_InnerOuterMask) ProtoReflect() protoreflect.Message {- mi := &file_store_setting_proto_msgTypes[20]+ mi := &file_store_setting_proto_msgTypes[23]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -1880,7 +1968,7 @@ func (x *Algorithm_InnerOuterMask) ProtoReflect() protoreflect.Message {// Deprecated: Use Algorithm_InnerOuterMask.ProtoReflect.Descriptor instead.func (*Algorithm_InnerOuterMask) Descriptor() ([]byte, []int) {- return file_store_setting_proto_rawDescGZIP(), []int{4, 3}+ return file_store_setting_proto_rawDescGZIP(), []int{5, 3}}func (x *Algorithm_InnerOuterMask) GetPrefixLen() int32 {@@ -1928,7 +2016,7 @@ type Algorithm_RangeMask_Slice struct {func (x *Algorithm_RangeMask_Slice) Reset() {*x = Algorithm_RangeMask_Slice{}- mi := &file_store_setting_proto_msgTypes[21]+ mi := &file_store_setting_proto_msgTypes[24]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -1940,7 +2028,7 @@ func (x *Algorithm_RangeMask_Slice) String() string {func (*Algorithm_RangeMask_Slice) ProtoMessage() {}func (x *Algorithm_RangeMask_Slice) ProtoReflect() protoreflect.Message {- mi := &file_store_setting_proto_msgTypes[21]+ mi := &file_store_setting_proto_msgTypes[24]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -1953,7 +2041,7 @@ func (x *Algorithm_RangeMask_Slice) ProtoReflect() protoreflect.Message {// Deprecated: Use Algorithm_RangeMask_Slice.ProtoReflect.Descriptor instead.func (*Algorithm_RangeMask_Slice) Descriptor() ([]byte, []int) {- return file_store_setting_proto_rawDescGZIP(), []int{4, 1, 0}+ return file_store_setting_proto_rawDescGZIP(), []int{5, 1, 0}}func (x *Algorithm_RangeMask_Slice) GetStart() int32 {@@ -1994,7 +2082,7 @@ type SemanticTypeSetting_SemanticType struct {func (x *SemanticTypeSetting_SemanticType) Reset() {*x = SemanticTypeSetting_SemanticType{}- mi := &file_store_setting_proto_msgTypes[22]+ mi := &file_store_setting_proto_msgTypes[25]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -2006,7 +2094,7 @@ func (x *SemanticTypeSetting_SemanticType) String() string {func (*SemanticTypeSetting_SemanticType) ProtoMessage() {}func (x *SemanticTypeSetting_SemanticType) ProtoReflect() protoreflect.Message {- mi := &file_store_setting_proto_msgTypes[22]+ mi := &file_store_setting_proto_msgTypes[25]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -2019,7 +2107,7 @@ func (x *SemanticTypeSetting_SemanticType) ProtoReflect() protoreflect.Message {// Deprecated: Use SemanticTypeSetting_SemanticType.ProtoReflect.Descriptor instead.func (*SemanticTypeSetting_SemanticType) Descriptor() ([]byte, []int) {- return file_store_setting_proto_rawDescGZIP(), []int{5, 0}+ return file_store_setting_proto_rawDescGZIP(), []int{6, 0}}func (x *SemanticTypeSetting_SemanticType) GetId() string {@@ -2066,7 +2154,7 @@ type AppIMSetting_Slack struct {func (x *AppIMSetting_Slack) Reset() {*x = AppIMSetting_Slack{}- mi := &file_store_setting_proto_msgTypes[23]+ mi := &file_store_setting_proto_msgTypes[26]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -2078,7 +2166,7 @@ func (x *AppIMSetting_Slack) String() string {func (*AppIMSetting_Slack) ProtoMessage() {}func (x *AppIMSetting_Slack) ProtoReflect() protoreflect.Message {- mi := &file_store_setting_proto_msgTypes[23]+ mi := &file_store_setting_proto_msgTypes[26]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -2091,7 +2179,7 @@ func (x *AppIMSetting_Slack) ProtoReflect() protoreflect.Message {// Deprecated: Use AppIMSetting_Slack.ProtoReflect.Descriptor instead.func (*AppIMSetting_Slack) Descriptor() ([]byte, []int) {- return file_store_setting_proto_rawDescGZIP(), []int{6, 0}+ return file_store_setting_proto_rawDescGZIP(), []int{7, 0}}func (x *AppIMSetting_Slack) GetToken() string {@@ -2111,7 +2199,7 @@ type AppIMSetting_Feishu struct {func (x *AppIMSetting_Feishu) Reset() {*x = AppIMSetting_Feishu{}- mi := &file_store_setting_proto_msgTypes[24]+ mi := &file_store_setting_proto_msgTypes[27]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -2123,7 +2211,7 @@ func (x *AppIMSetting_Feishu) String() string {func (*AppIMSetting_Feishu) ProtoMessage() {}func (x *AppIMSetting_Feishu) ProtoReflect() protoreflect.Message {- mi := &file_store_setting_proto_msgTypes[24]+ mi := &file_store_setting_proto_msgTypes[27]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -2136,7 +2224,7 @@ func (x *AppIMSetting_Feishu) ProtoReflect() protoreflect.Message {// Deprecated: Use AppIMSetting_Feishu.ProtoReflect.Descriptor instead.func (*AppIMSetting_Feishu) Descriptor() ([]byte, []int) {- return file_store_setting_proto_rawDescGZIP(), []int{6, 1}+ return file_store_setting_proto_rawDescGZIP(), []int{7, 1}}func (x *AppIMSetting_Feishu) GetAppId() string {@@ -2164,7 +2252,7 @@ type AppIMSetting_Wecom struct {func (x *AppIMSetting_Wecom) Reset() {*x = AppIMSetting_Wecom{}- mi := &file_store_setting_proto_msgTypes[25]+ mi := &file_store_setting_proto_msgTypes[28]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -2176,7 +2264,7 @@ func (x *AppIMSetting_Wecom) String() string {func (*AppIMSetting_Wecom) ProtoMessage() {}func (x *AppIMSetting_Wecom) ProtoReflect() protoreflect.Message {- mi := &file_store_setting_proto_msgTypes[25]+ mi := &file_store_setting_proto_msgTypes[28]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -2189,7 +2277,7 @@ func (x *AppIMSetting_Wecom) ProtoReflect() protoreflect.Message {// Deprecated: Use AppIMSetting_Wecom.ProtoReflect.Descriptor instead.func (*AppIMSetting_Wecom) Descriptor() ([]byte, []int) {- return file_store_setting_proto_rawDescGZIP(), []int{6, 2}+ return file_store_setting_proto_rawDescGZIP(), []int{7, 2}}func (x *AppIMSetting_Wecom) GetCorpId() string {@@ -2223,7 +2311,7 @@ type AppIMSetting_Lark struct {func (x *AppIMSetting_Lark) Reset() {*x = AppIMSetting_Lark{}- mi := &file_store_setting_proto_msgTypes[26]+ mi := &file_store_setting_proto_msgTypes[29]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -2235,7 +2323,7 @@ func (x *AppIMSetting_Lark) String() string {func (*AppIMSetting_Lark) ProtoMessage() {}func (x *AppIMSetting_Lark) ProtoReflect() protoreflect.Message {- mi := &file_store_setting_proto_msgTypes[26]+ mi := &file_store_setting_proto_msgTypes[29]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -2248,7 +2336,7 @@ func (x *AppIMSetting_Lark) ProtoReflect() protoreflect.Message {// Deprecated: Use AppIMSetting_Lark.ProtoReflect.Descriptor instead.func (*AppIMSetting_Lark) Descriptor() ([]byte, []int) {- return file_store_setting_proto_rawDescGZIP(), []int{6, 3}+ return file_store_setting_proto_rawDescGZIP(), []int{7, 3}}func (x *AppIMSetting_Lark) GetAppId() string {@@ -2276,7 +2364,7 @@ type AppIMSetting_DingTalk struct {func (x *AppIMSetting_DingTalk) Reset() {*x = AppIMSetting_DingTalk{}- mi := &file_store_setting_proto_msgTypes[27]+ mi := &file_store_setting_proto_msgTypes[30]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -2288,7 +2376,7 @@ func (x *AppIMSetting_DingTalk) String() string {func (*AppIMSetting_DingTalk) ProtoMessage() {}func (x *AppIMSetting_DingTalk) ProtoReflect() protoreflect.Message {- mi := &file_store_setting_proto_msgTypes[27]+ mi := &file_store_setting_proto_msgTypes[30]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -2301,7 +2389,7 @@ func (x *AppIMSetting_DingTalk) ProtoReflect() protoreflect.Message {// Deprecated: Use AppIMSetting_DingTalk.ProtoReflect.Descriptor instead.func (*AppIMSetting_DingTalk) Descriptor() ([]byte, []int) {- return file_store_setting_proto_rawDescGZIP(), []int{6, 4}+ return file_store_setting_proto_rawDescGZIP(), []int{7, 4}}func (x *AppIMSetting_DingTalk) GetClientId() string {@@ -2339,7 +2427,7 @@ type AppIMSetting_Teams struct {func (x *AppIMSetting_Teams) Reset() {*x = AppIMSetting_Teams{}- mi := &file_store_setting_proto_msgTypes[28]+ mi := &file_store_setting_proto_msgTypes[31]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -2351,7 +2439,7 @@ func (x *AppIMSetting_Teams) String() string {func (*AppIMSetting_Teams) ProtoMessage() {}func (x *AppIMSetting_Teams) ProtoReflect() protoreflect.Message {- mi := &file_store_setting_proto_msgTypes[28]+ mi := &file_store_setting_proto_msgTypes[31]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -2364,7 +2452,7 @@ func (x *AppIMSetting_Teams) ProtoReflect() protoreflect.Message {// Deprecated: Use AppIMSetting_Teams.ProtoReflect.Descriptor instead.func (*AppIMSetting_Teams) Descriptor() ([]byte, []int) {- return file_store_setting_proto_rawDescGZIP(), []int{6, 5}+ return file_store_setting_proto_rawDescGZIP(), []int{7, 5}}func (x *AppIMSetting_Teams) GetTenantId() string {@@ -2406,7 +2494,7 @@ type AppIMSetting_IMSetting struct {func (x *AppIMSetting_IMSetting) Reset() {*x = AppIMSetting_IMSetting{}- mi := &file_store_setting_proto_msgTypes[29]+ mi := &file_store_setting_proto_msgTypes[32]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -2418,7 +2506,7 @@ func (x *AppIMSetting_IMSetting) String() string {func (*AppIMSetting_IMSetting) ProtoMessage() {}func (x *AppIMSetting_IMSetting) ProtoReflect() protoreflect.Message {- mi := &file_store_setting_proto_msgTypes[29]+ mi := &file_store_setting_proto_msgTypes[32]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -2431,7 +2519,7 @@ func (x *AppIMSetting_IMSetting) ProtoReflect() protoreflect.Message {// Deprecated: Use AppIMSetting_IMSetting.ProtoReflect.Descriptor instead.func (*AppIMSetting_IMSetting) Descriptor() ([]byte, []int) {- return file_store_setting_proto_rawDescGZIP(), []int{6, 6}+ return file_store_setting_proto_rawDescGZIP(), []int{7, 6}}func (x *AppIMSetting_IMSetting) GetType() WebhookType {@@ -2559,7 +2647,7 @@ type EnvironmentSetting_Environment struct {func (x *EnvironmentSetting_Environment) Reset() {*x = EnvironmentSetting_Environment{}- mi := &file_store_setting_proto_msgTypes[30]+ mi := &file_store_setting_proto_msgTypes[33]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -2571,7 +2659,7 @@ func (x *EnvironmentSetting_Environment) String() string {func (*EnvironmentSetting_Environment) ProtoMessage() {}func (x *EnvironmentSetting_Environment) ProtoReflect() protoreflect.Message {- mi := &file_store_setting_proto_msgTypes[30]+ mi := &file_store_setting_proto_msgTypes[33]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -2584,7 +2672,7 @@ func (x *EnvironmentSetting_Environment) ProtoReflect() protoreflect.Message {// Deprecated: Use EnvironmentSetting_Environment.ProtoReflect.Descriptor instead.func (*EnvironmentSetting_Environment) Descriptor() ([]byte, []int) {- return file_store_setting_proto_rawDescGZIP(), []int{8, 0}+ return file_store_setting_proto_rawDescGZIP(), []int{9, 0}}func (x *EnvironmentSetting_Environment) GetName() string {@@ -2636,7 +2724,7 @@ type EmailSetting_SMTPConfig struct {func (x *EmailSetting_SMTPConfig) Reset() {*x = EmailSetting_SMTPConfig{}- mi := &file_store_setting_proto_msgTypes[32]+ mi := &file_store_setting_proto_msgTypes[35]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -2648,7 +2736,7 @@ func (x *EmailSetting_SMTPConfig) String() string {func (*EmailSetting_SMTPConfig) ProtoMessage() {}func (x *EmailSetting_SMTPConfig) ProtoReflect() protoreflect.Message {- mi := &file_store_setting_proto_msgTypes[32]+ mi := &file_store_setting_proto_msgTypes[35]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -2661,7 +2749,7 @@ func (x *EmailSetting_SMTPConfig) ProtoReflect() protoreflect.Message {// Deprecated: Use EmailSetting_SMTPConfig.ProtoReflect.Descriptor instead.func (*EmailSetting_SMTPConfig) Descriptor() ([]byte, []int) {- return file_store_setting_proto_rawDescGZIP(), []int{9, 0}+ return file_store_setting_proto_rawDescGZIP(), []int{10, 0}}func (x *EmailSetting_SMTPConfig) GetHost() string {@@ -2712,7 +2800,7 @@ const file_store_setting_proto_rawDesc = "" +"\n" +"\x13store/setting.proto\x12\x0ebytebase.store\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x16google/type/expr.proto\x1a\x14store/approval.proto\x1a\x12store/common.proto\"P\n" +"\rSystemSetting\x12\x18\n" +- "\alicense\x18\x03 \x01(\tR\alicenseJ\x04\b\x01\x10\x02J\x04\b\x02\x10\x03R\vauth_secretR\fworkspace_id\"\xe7\x0f\n" ++ "\alicense\x18\x03 \x01(\tR\alicenseJ\x04\b\x01\x10\x02J\x04\b\x02\x10\x03R\vauth_secretR\fworkspace_id\"\x81\x11\n" +"\x17WorkspaceProfileSetting\x12!\n" +"\fexternal_url\x18\x01 \x01(\tR\vexternalUrl\x12'\n" +"\x0fdisallow_signup\x18\x02 \x01(\bR\x0edisallowSignup\x12\x1f\n" +@@ -2736,17 +2824,18 @@ const file_store_setting_proto_rawDesc = "" +"\fenable_debug\x18\x13 \x01(\bR\venableDebug\x12&\n" +"\x0fsql_result_size\x18\x14 \x01(\x03R\rsqlResultSize\x12>\n" +"\rquery_timeout\x18\x15 \x01(\v2\x19.google.protobuf.DurationR\fqueryTimeout\x125\n" +- "\x17allow_email_code_signin\x18\x16 \x01(\bR\x14allowEmailCodeSignin\x1a\xdd\x01\n" +- "\fAnnouncement\x12U\n" +- "\x05level\x18\x01 \x01(\x0e2?.bytebase.store.WorkspaceProfileSetting.Announcement.AlertLevelR\x05level\x12\x12\n" ++ "\x17allow_email_code_signin\x18\x16 \x01(\bR\x14allowEmailCodeSignin\x12-\n" ++ "\x13sql_editor_theme_id\x18\x17 \x01(\tR\x10sqlEditorThemeId\x12\\\n" ++ "\x17sql_editor_custom_theme\x18\x18 \x01(\v2%.bytebase.store.SQLEditorThemeSettingR\x14sqlEditorCustomTheme\x1a\xea\x01\n" ++ "\fAnnouncement\x12\x12\n" +"\x04text\x18\x02 \x01(\tR\x04text\x12\x12\n" +- "\x04link\x18\x03 \x01(\tR\x04link\"N\n" ++ "\x04link\x18\x03 \x01(\tR\x04link\x12\\\n" ++ "\x05theme\x18\x04 \x01(\v2F.bytebase.store.WorkspaceProfileSetting.Announcement.AnnouncementThemeR\x05theme\x1aG\n" ++ "\x11AnnouncementTheme\x12\x1e\n" +"\n" +- "AlertLevel\x12\x1b\n" +- "\x17ALERT_LEVEL_UNSPECIFIED\x10\x00\x12\b\n" +- "\x04INFO\x10\x01\x12\v\n" +- "\aWARNING\x10\x02\x12\f\n" +- "\bCRITICAL\x10\x03\x1a\x93\x03\n" ++ "background\x18\x01 \x01(\tR\n" ++ "background\x12\x12\n" ++ "\x04text\x18\x02 \x01(\tR\x04textJ\x04\b\x01\x10\x02R\x05level\x1a\x93\x03\n" +"\x13PasswordRestriction\x12\x1d\n" +"\n" +"min_length\x18\x01 \x01(\x05R\tminLength\x12%\n" +@@ -2760,7 +2849,16 @@ const file_store_setting_proto_rawDesc = "" +" DATABASE_CHANGE_MODE_UNSPECIFIED\x10\x00\x12\f\n" +"\bPIPELINE\x10\x01\x12\n" +"\n" +- "\x06EDITOR\x10\x02J\x04\b\x10\x10\x11\"\xa9\x03\n" ++ "\x06EDITOR\x10\x02J\x04\b\x10\x10\x11\"\xe2\x01\n" ++ "\x15SQLEditorThemeSetting\x12\x0e\n" ++ "\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n" ++ "\x04name\x18\x02 \x01(\tR\x04name\x12\x1f\n" ++ "\vmonaco_base\x18\x03 \x01(\tR\n" ++ "monacoBase\x12I\n" ++ "\x06tokens\x18\x04 \x03(\v21.bytebase.store.SQLEditorThemeSetting.TokensEntryR\x06tokens\x1a9\n" ++ "\vTokensEntry\x12\x10\n" ++ "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" ++ "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"\xa9\x03\n" +"\x18WorkspaceApprovalSetting\x12C\n" +"\x05rules\x18\x01 \x03(\v2-.bytebase.store.WorkspaceApprovalSetting.RuleR\x05rules\x1a\xc7\x02\n" +"\x04Rule\x12<\n" +@@ -2946,103 +3044,107 @@ func file_store_setting_proto_rawDescGZIP() []byte {return file_store_setting_proto_rawDescData}-var file_store_setting_proto_enumTypes = make([]protoimpl.EnumInfo, 9)-var file_store_setting_proto_msgTypes = make([]protoimpl.MessageInfo, 33)+var file_store_setting_proto_enumTypes = make([]protoimpl.EnumInfo, 8)+var file_store_setting_proto_msgTypes = make([]protoimpl.MessageInfo, 36)var file_store_setting_proto_goTypes = []any{(SettingName)(0), // 0: bytebase.store.SettingName- (WorkspaceProfileSetting_DatabaseChangeMode)(0), // 1: bytebase.store.WorkspaceProfileSetting.DatabaseChangeMode- (WorkspaceProfileSetting_Announcement_AlertLevel)(0), // 2: bytebase.store.WorkspaceProfileSetting.Announcement.AlertLevel- (WorkspaceApprovalSetting_Rule_Source)(0), // 3: bytebase.store.WorkspaceApprovalSetting.Rule.Source- (Algorithm_InnerOuterMask_MaskType)(0), // 4: bytebase.store.Algorithm.InnerOuterMask.MaskType- (AISetting_Provider)(0), // 5: bytebase.store.AISetting.Provider- (EmailSetting_Type)(0), // 6: bytebase.store.EmailSetting.Type- (EmailSetting_SMTPConfig_Encryption)(0), // 7: bytebase.store.EmailSetting.SMTPConfig.Encryption- (EmailSetting_SMTPConfig_Authentication)(0), // 8: bytebase.store.EmailSetting.SMTPConfig.Authentication- (*SystemSetting)(nil), // 9: bytebase.store.SystemSetting- (*WorkspaceProfileSetting)(nil), // 10: bytebase.store.WorkspaceProfileSetting- (*WorkspaceApprovalSetting)(nil), // 11: bytebase.store.WorkspaceApprovalSetting- (*DataClassificationSetting)(nil), // 12: bytebase.store.DataClassificationSetting- (*Algorithm)(nil), // 13: bytebase.store.Algorithm- (*SemanticTypeSetting)(nil), // 14: bytebase.store.SemanticTypeSetting- (*AppIMSetting)(nil), // 15: bytebase.store.AppIMSetting- (*AISetting)(nil), // 16: bytebase.store.AISetting- (*EnvironmentSetting)(nil), // 17: bytebase.store.EnvironmentSetting- (*EmailSetting)(nil), // 18: bytebase.store.EmailSetting- (*WorkspaceProfileSetting_Announcement)(nil), // 19: bytebase.store.WorkspaceProfileSetting.Announcement- (*WorkspaceProfileSetting_PasswordRestriction)(nil), // 20: bytebase.store.WorkspaceProfileSetting.PasswordRestriction- (*WorkspaceApprovalSetting_Rule)(nil), // 21: bytebase.store.WorkspaceApprovalSetting.Rule- (*DataClassificationSetting_DataClassificationConfig)(nil), // 22: bytebase.store.DataClassificationSetting.DataClassificationConfig- (*DataClassificationSetting_DataClassificationConfig_Level)(nil), // 23: bytebase.store.DataClassificationSetting.DataClassificationConfig.Level- (*DataClassificationSetting_DataClassificationConfig_DataClassification)(nil), // 24: bytebase.store.DataClassificationSetting.DataClassificationConfig.DataClassification- nil, // 25: bytebase.store.DataClassificationSetting.DataClassificationConfig.ClassificationEntry- (*Algorithm_FullMask)(nil), // 26: bytebase.store.Algorithm.FullMask- (*Algorithm_RangeMask)(nil), // 27: bytebase.store.Algorithm.RangeMask- (*Algorithm_MD5Mask)(nil), // 28: bytebase.store.Algorithm.MD5Mask- (*Algorithm_InnerOuterMask)(nil), // 29: bytebase.store.Algorithm.InnerOuterMask- (*Algorithm_RangeMask_Slice)(nil), // 30: bytebase.store.Algorithm.RangeMask.Slice- (*SemanticTypeSetting_SemanticType)(nil), // 31: bytebase.store.SemanticTypeSetting.SemanticType- (*AppIMSetting_Slack)(nil), // 32: bytebase.store.AppIMSetting.Slack- (*AppIMSetting_Feishu)(nil), // 33: bytebase.store.AppIMSetting.Feishu- (*AppIMSetting_Wecom)(nil), // 34: bytebase.store.AppIMSetting.Wecom- (*AppIMSetting_Lark)(nil), // 35: bytebase.store.AppIMSetting.Lark- (*AppIMSetting_DingTalk)(nil), // 36: bytebase.store.AppIMSetting.DingTalk- (*AppIMSetting_Teams)(nil), // 37: bytebase.store.AppIMSetting.Teams- (*AppIMSetting_IMSetting)(nil), // 38: bytebase.store.AppIMSetting.IMSetting- (*EnvironmentSetting_Environment)(nil), // 39: bytebase.store.EnvironmentSetting.Environment- nil, // 40: bytebase.store.EnvironmentSetting.Environment.TagsEntry- (*EmailSetting_SMTPConfig)(nil), // 41: bytebase.store.EmailSetting.SMTPConfig- (*durationpb.Duration)(nil), // 42: google.protobuf.Duration- (*ApprovalTemplate)(nil), // 43: bytebase.store.ApprovalTemplate- (*expr.Expr)(nil), // 44: google.type.Expr- (WebhookType)(0), // 45: bytebase.store.WebhookType+ (WorkspaceProfileSetting_DatabaseChangeMode)(0), // 1: bytebase.store.WorkspaceProfileSetting.DatabaseChangeMode+ (WorkspaceApprovalSetting_Rule_Source)(0), // 2: bytebase.store.WorkspaceApprovalSetting.Rule.Source+ (Algorithm_InnerOuterMask_MaskType)(0), // 3: bytebase.store.Algorithm.InnerOuterMask.MaskType+ (AISetting_Provider)(0), // 4: bytebase.store.AISetting.Provider+ (EmailSetting_Type)(0), // 5: bytebase.store.EmailSetting.Type+ (EmailSetting_SMTPConfig_Encryption)(0), // 6: bytebase.store.EmailSetting.SMTPConfig.Encryption+ (EmailSetting_SMTPConfig_Authentication)(0), // 7: bytebase.store.EmailSetting.SMTPConfig.Authentication+ (*SystemSetting)(nil), // 8: bytebase.store.SystemSetting+ (*WorkspaceProfileSetting)(nil), // 9: bytebase.store.WorkspaceProfileSetting+ (*SQLEditorThemeSetting)(nil), // 10: bytebase.store.SQLEditorThemeSetting+ (*WorkspaceApprovalSetting)(nil), // 11: bytebase.store.WorkspaceApprovalSetting+ (*DataClassificationSetting)(nil), // 12: bytebase.store.DataClassificationSetting+ (*Algorithm)(nil), // 13: bytebase.store.Algorithm+ (*SemanticTypeSetting)(nil), // 14: bytebase.store.SemanticTypeSetting+ (*AppIMSetting)(nil), // 15: bytebase.store.AppIMSetting+ (*AISetting)(nil), // 16: bytebase.store.AISetting+ (*EnvironmentSetting)(nil), // 17: bytebase.store.EnvironmentSetting+ (*EmailSetting)(nil), // 18: bytebase.store.EmailSetting+ (*WorkspaceProfileSetting_Announcement)(nil), // 19: bytebase.store.WorkspaceProfileSetting.Announcement+ (*WorkspaceProfileSetting_PasswordRestriction)(nil), // 20: bytebase.store.WorkspaceProfileSetting.PasswordRestriction+ (*WorkspaceProfileSetting_Announcement_AnnouncementTheme)(nil), // 21: bytebase.store.WorkspaceProfileSetting.Announcement.AnnouncementTheme+ nil, // 22: bytebase.store.SQLEditorThemeSetting.TokensEntry+ (*WorkspaceApprovalSetting_Rule)(nil), // 23: bytebase.store.WorkspaceApprovalSetting.Rule+ (*DataClassificationSetting_DataClassificationConfig)(nil), // 24: bytebase.store.DataClassificationSetting.DataClassificationConfig+ (*DataClassificationSetting_DataClassificationConfig_Level)(nil), // 25: bytebase.store.DataClassificationSetting.DataClassificationConfig.Level+ (*DataClassificationSetting_DataClassificationConfig_DataClassification)(nil), // 26: bytebase.store.DataClassificationSetting.DataClassificationConfig.DataClassification+ nil, // 27: bytebase.store.DataClassificationSetting.DataClassificationConfig.ClassificationEntry+ (*Algorithm_FullMask)(nil), // 28: bytebase.store.Algorithm.FullMask+ (*Algorithm_RangeMask)(nil), // 29: bytebase.store.Algorithm.RangeMask+ (*Algorithm_MD5Mask)(nil), // 30: bytebase.store.Algorithm.MD5Mask+ (*Algorithm_InnerOuterMask)(nil), // 31: bytebase.store.Algorithm.InnerOuterMask+ (*Algorithm_RangeMask_Slice)(nil), // 32: bytebase.store.Algorithm.RangeMask.Slice+ (*SemanticTypeSetting_SemanticType)(nil), // 33: bytebase.store.SemanticTypeSetting.SemanticType+ (*AppIMSetting_Slack)(nil), // 34: bytebase.store.AppIMSetting.Slack+ (*AppIMSetting_Feishu)(nil), // 35: bytebase.store.AppIMSetting.Feishu+ (*AppIMSetting_Wecom)(nil), // 36: bytebase.store.AppIMSetting.Wecom+ (*AppIMSetting_Lark)(nil), // 37: bytebase.store.AppIMSetting.Lark+ (*AppIMSetting_DingTalk)(nil), // 38: bytebase.store.AppIMSetting.DingTalk+ (*AppIMSetting_Teams)(nil), // 39: bytebase.store.AppIMSetting.Teams+ (*AppIMSetting_IMSetting)(nil), // 40: bytebase.store.AppIMSetting.IMSetting+ (*EnvironmentSetting_Environment)(nil), // 41: bytebase.store.EnvironmentSetting.Environment+ nil, // 42: bytebase.store.EnvironmentSetting.Environment.TagsEntry+ (*EmailSetting_SMTPConfig)(nil), // 43: bytebase.store.EmailSetting.SMTPConfig+ (*durationpb.Duration)(nil), // 44: google.protobuf.Duration+ (*ApprovalTemplate)(nil), // 45: bytebase.store.ApprovalTemplate+ (*expr.Expr)(nil), // 46: google.type.Expr+ (WebhookType)(0), // 47: bytebase.store.WebhookType}var file_store_setting_proto_depIdxs = []int32{- 42, // 0: bytebase.store.WorkspaceProfileSetting.refresh_token_duration:type_name -> google.protobuf.Duration+ 44, // 0: bytebase.store.WorkspaceProfileSetting.refresh_token_duration:type_name -> google.protobuf.Duration19, // 1: bytebase.store.WorkspaceProfileSetting.announcement:type_name -> bytebase.store.WorkspaceProfileSetting.Announcement- 42, // 2: bytebase.store.WorkspaceProfileSetting.maximum_role_expiration:type_name -> google.protobuf.Duration+ 44, // 2: bytebase.store.WorkspaceProfileSetting.maximum_role_expiration:type_name -> google.protobuf.Duration1, // 3: bytebase.store.WorkspaceProfileSetting.database_change_mode:type_name -> bytebase.store.WorkspaceProfileSetting.DatabaseChangeMode- 42, // 4: bytebase.store.WorkspaceProfileSetting.inactive_session_timeout:type_name -> google.protobuf.Duration+ 44, // 4: bytebase.store.WorkspaceProfileSetting.inactive_session_timeout:type_name -> google.protobuf.Duration20, // 5: bytebase.store.WorkspaceProfileSetting.password_restriction:type_name -> bytebase.store.WorkspaceProfileSetting.PasswordRestriction- 42, // 6: bytebase.store.WorkspaceProfileSetting.access_token_duration:type_name -> google.protobuf.Duration- 42, // 7: bytebase.store.WorkspaceProfileSetting.query_timeout:type_name -> google.protobuf.Duration- 21, // 8: bytebase.store.WorkspaceApprovalSetting.rules:type_name -> bytebase.store.WorkspaceApprovalSetting.Rule- 22, // 9: bytebase.store.DataClassificationSetting.configs:type_name -> bytebase.store.DataClassificationSetting.DataClassificationConfig- 26, // 10: bytebase.store.Algorithm.full_mask:type_name -> bytebase.store.Algorithm.FullMask- 27, // 11: bytebase.store.Algorithm.range_mask:type_name -> bytebase.store.Algorithm.RangeMask- 28, // 12: bytebase.store.Algorithm.md5_mask:type_name -> bytebase.store.Algorithm.MD5Mask- 29, // 13: bytebase.store.Algorithm.inner_outer_mask:type_name -> bytebase.store.Algorithm.InnerOuterMask- 31, // 14: bytebase.store.SemanticTypeSetting.types:type_name -> bytebase.store.SemanticTypeSetting.SemanticType- 38, // 15: bytebase.store.AppIMSetting.settings:type_name -> bytebase.store.AppIMSetting.IMSetting- 5, // 16: bytebase.store.AISetting.provider:type_name -> bytebase.store.AISetting.Provider- 39, // 17: bytebase.store.EnvironmentSetting.environments:type_name -> bytebase.store.EnvironmentSetting.Environment- 6, // 18: bytebase.store.EmailSetting.type:type_name -> bytebase.store.EmailSetting.Type- 41, // 19: bytebase.store.EmailSetting.smtp:type_name -> bytebase.store.EmailSetting.SMTPConfig- 2, // 20: bytebase.store.WorkspaceProfileSetting.Announcement.level:type_name -> bytebase.store.WorkspaceProfileSetting.Announcement.AlertLevel- 42, // 21: bytebase.store.WorkspaceProfileSetting.PasswordRestriction.password_rotation:type_name -> google.protobuf.Duration- 43, // 22: bytebase.store.WorkspaceApprovalSetting.Rule.template:type_name -> bytebase.store.ApprovalTemplate- 44, // 23: bytebase.store.WorkspaceApprovalSetting.Rule.condition:type_name -> google.type.Expr- 3, // 24: bytebase.store.WorkspaceApprovalSetting.Rule.source:type_name -> bytebase.store.WorkspaceApprovalSetting.Rule.Source- 23, // 25: bytebase.store.DataClassificationSetting.DataClassificationConfig.levels:type_name -> bytebase.store.DataClassificationSetting.DataClassificationConfig.Level- 25, // 26: bytebase.store.DataClassificationSetting.DataClassificationConfig.classification:type_name -> bytebase.store.DataClassificationSetting.DataClassificationConfig.ClassificationEntry- 24, // 27: bytebase.store.DataClassificationSetting.DataClassificationConfig.ClassificationEntry.value:type_name -> bytebase.store.DataClassificationSetting.DataClassificationConfig.DataClassification- 30, // 28: bytebase.store.Algorithm.RangeMask.slices:type_name -> bytebase.store.Algorithm.RangeMask.Slice- 4, // 29: bytebase.store.Algorithm.InnerOuterMask.type:type_name -> bytebase.store.Algorithm.InnerOuterMask.MaskType- 13, // 30: bytebase.store.SemanticTypeSetting.SemanticType.algorithm:type_name -> bytebase.store.Algorithm- 45, // 31: bytebase.store.AppIMSetting.IMSetting.type:type_name -> bytebase.store.WebhookType- 32, // 32: bytebase.store.AppIMSetting.IMSetting.slack:type_name -> bytebase.store.AppIMSetting.Slack- 33, // 33: bytebase.store.AppIMSetting.IMSetting.feishu:type_name -> bytebase.store.AppIMSetting.Feishu- 34, // 34: bytebase.store.AppIMSetting.IMSetting.wecom:type_name -> bytebase.store.AppIMSetting.Wecom- 35, // 35: bytebase.store.AppIMSetting.IMSetting.lark:type_name -> bytebase.store.AppIMSetting.Lark- 36, // 36: bytebase.store.AppIMSetting.IMSetting.dingtalk:type_name -> bytebase.store.AppIMSetting.DingTalk- 37, // 37: bytebase.store.AppIMSetting.IMSetting.teams:type_name -> bytebase.store.AppIMSetting.Teams- 40, // 38: bytebase.store.EnvironmentSetting.Environment.tags:type_name -> bytebase.store.EnvironmentSetting.Environment.TagsEntry- 7, // 39: bytebase.store.EmailSetting.SMTPConfig.encryption:type_name -> bytebase.store.EmailSetting.SMTPConfig.Encryption- 8, // 40: bytebase.store.EmailSetting.SMTPConfig.authentication:type_name -> bytebase.store.EmailSetting.SMTPConfig.Authentication- 41, // [41:41] is the sub-list for method output_type- 41, // [41:41] is the sub-list for method input_type- 41, // [41:41] is the sub-list for extension type_name- 41, // [41:41] is the sub-list for extension extendee- 0, // [0:41] is the sub-list for field type_name+ 44, // 6: bytebase.store.WorkspaceProfileSetting.access_token_duration:type_name -> google.protobuf.Duration+ 44, // 7: bytebase.store.WorkspaceProfileSetting.query_timeout:type_name -> google.protobuf.Duration+ 10, // 8: bytebase.store.WorkspaceProfileSetting.sql_editor_custom_theme:type_name -> bytebase.store.SQLEditorThemeSetting+ 22, // 9: bytebase.store.SQLEditorThemeSetting.tokens:type_name -> bytebase.store.SQLEditorThemeSetting.TokensEntry+ 23, // 10: bytebase.store.WorkspaceApprovalSetting.rules:type_name -> bytebase.store.WorkspaceApprovalSetting.Rule+ 24, // 11: bytebase.store.DataClassificationSetting.configs:type_name -> bytebase.store.DataClassificationSetting.DataClassificationConfig+ 28, // 12: bytebase.store.Algorithm.full_mask:type_name -> bytebase.store.Algorithm.FullMask+ 29, // 13: bytebase.store.Algorithm.range_mask:type_name -> bytebase.store.Algorithm.RangeMask+ 30, // 14: bytebase.store.Algorithm.md5_mask:type_name -> bytebase.store.Algorithm.MD5Mask+ 31, // 15: bytebase.store.Algorithm.inner_outer_mask:type_name -> bytebase.store.Algorithm.InnerOuterMask+ 33, // 16: bytebase.store.SemanticTypeSetting.types:type_name -> bytebase.store.SemanticTypeSetting.SemanticType+ 40, // 17: bytebase.store.AppIMSetting.settings:type_name -> bytebase.store.AppIMSetting.IMSetting+ 4, // 18: bytebase.store.AISetting.provider:type_name -> bytebase.store.AISetting.Provider+ 41, // 19: bytebase.store.EnvironmentSetting.environments:type_name -> bytebase.store.EnvironmentSetting.Environment+ 5, // 20: bytebase.store.EmailSetting.type:type_name -> bytebase.store.EmailSetting.Type+ 43, // 21: bytebase.store.EmailSetting.smtp:type_name -> bytebase.store.EmailSetting.SMTPConfig+ 21, // 22: bytebase.store.WorkspaceProfileSetting.Announcement.theme:type_name -> bytebase.store.WorkspaceProfileSetting.Announcement.AnnouncementTheme+ 44, // 23: bytebase.store.WorkspaceProfileSetting.PasswordRestriction.password_rotation:type_name -> google.protobuf.Duration+ 45, // 24: bytebase.store.WorkspaceApprovalSetting.Rule.template:type_name -> bytebase.store.ApprovalTemplate+ 46, // 25: bytebase.store.WorkspaceApprovalSetting.Rule.condition:type_name -> google.type.Expr+ 2, // 26: bytebase.store.WorkspaceApprovalSetting.Rule.source:type_name -> bytebase.store.WorkspaceApprovalSetting.Rule.Source+ 25, // 27: bytebase.store.DataClassificationSetting.DataClassificationConfig.levels:type_name -> bytebase.store.DataClassificationSetting.DataClassificationConfig.Level+ 27, // 28: bytebase.store.DataClassificationSetting.DataClassificationConfig.classification:type_name -> bytebase.store.DataClassificationSetting.DataClassificationConfig.ClassificationEntry+ 26, // 29: bytebase.store.DataClassificationSetting.DataClassificationConfig.ClassificationEntry.value:type_name -> bytebase.store.DataClassificationSetting.DataClassificationConfig.DataClassification+ 32, // 30: bytebase.store.Algorithm.RangeMask.slices:type_name -> bytebase.store.Algorithm.RangeMask.Slice+ 3, // 31: bytebase.store.Algorithm.InnerOuterMask.type:type_name -> bytebase.store.Algorithm.InnerOuterMask.MaskType+ 13, // 32: bytebase.store.SemanticTypeSetting.SemanticType.algorithm:type_name -> bytebase.store.Algorithm+ 47, // 33: bytebase.store.AppIMSetting.IMSetting.type:type_name -> bytebase.store.WebhookType+ 34, // 34: bytebase.store.AppIMSetting.IMSetting.slack:type_name -> bytebase.store.AppIMSetting.Slack+ 35, // 35: bytebase.store.AppIMSetting.IMSetting.feishu:type_name -> bytebase.store.AppIMSetting.Feishu+ 36, // 36: bytebase.store.AppIMSetting.IMSetting.wecom:type_name -> bytebase.store.AppIMSetting.Wecom+ 37, // 37: bytebase.store.AppIMSetting.IMSetting.lark:type_name -> bytebase.store.AppIMSetting.Lark+ 38, // 38: bytebase.store.AppIMSetting.IMSetting.dingtalk:type_name -> bytebase.store.AppIMSetting.DingTalk+ 39, // 39: bytebase.store.AppIMSetting.IMSetting.teams:type_name -> bytebase.store.AppIMSetting.Teams+ 42, // 40: bytebase.store.EnvironmentSetting.Environment.tags:type_name -> bytebase.store.EnvironmentSetting.Environment.TagsEntry+ 6, // 41: bytebase.store.EmailSetting.SMTPConfig.encryption:type_name -> bytebase.store.EmailSetting.SMTPConfig.Encryption+ 7, // 42: bytebase.store.EmailSetting.SMTPConfig.authentication:type_name -> bytebase.store.EmailSetting.SMTPConfig.Authentication+ 43, // [43:43] is the sub-list for method output_type+ 43, // [43:43] is the sub-list for method input_type+ 43, // [43:43] is the sub-list for extension type_name+ 43, // [43:43] is the sub-list for extension extendee+ 0, // [0:43] is the sub-list for field type_name}func init() { file_store_setting_proto_init() }@@ -3052,17 +3154,17 @@ func file_store_setting_proto_init() {}file_store_approval_proto_init()file_store_common_proto_init()- file_store_setting_proto_msgTypes[4].OneofWrappers = []any{+ file_store_setting_proto_msgTypes[5].OneofWrappers = []any{(*Algorithm_FullMask_)(nil),(*Algorithm_RangeMask_)(nil),(*Algorithm_Md5Mask)(nil),(*Algorithm_InnerOuterMask_)(nil),}- file_store_setting_proto_msgTypes[9].OneofWrappers = []any{+ file_store_setting_proto_msgTypes[10].OneofWrappers = []any{(*EmailSetting_Smtp)(nil),}- file_store_setting_proto_msgTypes[15].OneofWrappers = []any{}- file_store_setting_proto_msgTypes[29].OneofWrappers = []any{+ file_store_setting_proto_msgTypes[18].OneofWrappers = []any{}+ file_store_setting_proto_msgTypes[32].OneofWrappers = []any{(*AppIMSetting_IMSetting_Slack)(nil),(*AppIMSetting_IMSetting_Feishu)(nil),(*AppIMSetting_IMSetting_Wecom)(nil),@@ -3075,8 +3177,8 @@ func file_store_setting_proto_init() {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: 9,- NumMessages: 33,+ NumEnums: 8,+ NumMessages: 36,NumExtensions: 0,NumServices: 0,},diff --git a/backend/generated-go/store/setting_equal.pb.go b/backend/generated-go/store/setting_equal.pb.goindex d79d456bce..b35ecc5e3d 100644--- a/backend/generated-go/store/setting_equal.pb.go+++ b/backend/generated-go/store/setting_equal.pb.go@@ -21,22 +21,38 @@ func (x *SystemSetting) Equal(y *SystemSetting) bool {return true}-func (x *WorkspaceProfileSetting_Announcement) Equal(y *WorkspaceProfileSetting_Announcement) bool {+func (x *WorkspaceProfileSetting_Announcement_AnnouncementTheme) Equal(y *WorkspaceProfileSetting_Announcement_AnnouncementTheme) bool {if x == y {return true}if x == nil || y == nil {return x == nil && y == nil}- if x.Level != y.Level {+ if x.Background != y.Background {return false}if x.Text != y.Text {return false}+ return true+}++func (x *WorkspaceProfileSetting_Announcement) Equal(y *WorkspaceProfileSetting_Announcement) bool {+ if x == y {+ return true+ }+ if x == nil || y == nil {+ return x == nil && y == nil+ }+ if x.Text != y.Text {+ return false+ }if x.Link != y.Link {return false}+ if !x.Theme.Equal(y.Theme) {+ return false+ }return true}@@ -146,6 +162,43 @@ func (x *WorkspaceProfileSetting) Equal(y *WorkspaceProfileSetting) bool {if x.AllowEmailCodeSignin != y.AllowEmailCodeSignin {return false}+ if x.SqlEditorThemeId != y.SqlEditorThemeId {+ return false+ }+ if !x.SqlEditorCustomTheme.Equal(y.SqlEditorCustomTheme) {+ return false+ }+ return true+}++func (x *SQLEditorThemeSetting) Equal(y *SQLEditorThemeSetting) bool {+ if x == y {+ return true+ }+ if x == nil || y == nil {+ return x == nil && y == nil+ }+ if x.Id != y.Id {+ return false+ }+ if x.Name != y.Name {+ return false+ }+ if x.MonacoBase != y.MonacoBase {+ return false+ }+ if len(x.Tokens) != len(y.Tokens) {+ return false+ }+ for k := range x.Tokens {+ _, ok := y.Tokens[k]+ if !ok {+ return false+ }+ if x.Tokens[k] != y.Tokens[k] {+ return false+ }+ }return true}diff --git a/backend/generated-go/v1/setting_service.pb.go b/backend/generated-go/v1/setting_service.pb.goindex 2c0e5a7b48..a24b366271 100644--- a/backend/generated-go/v1/setting_service.pb.go+++ b/backend/generated-go/v1/setting_service.pb.go@@ -144,59 +144,6 @@ func (Setting_SettingName) EnumDescriptor() ([]byte, []int) {return file_v1_setting_service_proto_rawDescGZIP(), []int{5, 0}}-// We support three levels of AlertLevel: INFO, WARNING, and ERROR.-type Announcement_AlertLevel int32--const (- Announcement_ALERT_LEVEL_UNSPECIFIED Announcement_AlertLevel = 0- Announcement_INFO Announcement_AlertLevel = 1- Announcement_WARNING Announcement_AlertLevel = 2- Announcement_CRITICAL Announcement_AlertLevel = 3-)--// Enum value maps for Announcement_AlertLevel.-var (- Announcement_AlertLevel_name = map[int32]string{- 0: "ALERT_LEVEL_UNSPECIFIED",- 1: "INFO",- 2: "WARNING",- 3: "CRITICAL",- }- Announcement_AlertLevel_value = map[string]int32{- "ALERT_LEVEL_UNSPECIFIED": 0,- "INFO": 1,- "WARNING": 2,- "CRITICAL": 3,- }-)--func (x Announcement_AlertLevel) Enum() *Announcement_AlertLevel {- p := new(Announcement_AlertLevel)- *p = x- return p-}--func (x Announcement_AlertLevel) String() string {- return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))-}--func (Announcement_AlertLevel) Descriptor() protoreflect.EnumDescriptor {- return file_v1_setting_service_proto_enumTypes[2].Descriptor()-}--func (Announcement_AlertLevel) Type() protoreflect.EnumType {- return &file_v1_setting_service_proto_enumTypes[2]-}--func (x Announcement_AlertLevel) Number() protoreflect.EnumNumber {- return protoreflect.EnumNumber(x)-}--// Deprecated: Use Announcement_AlertLevel.Descriptor instead.-func (Announcement_AlertLevel) EnumDescriptor() ([]byte, []int) {- return file_v1_setting_service_proto_rawDescGZIP(), []int{9, 0}-}-type WorkspaceApprovalSetting_Rule_Source int32const (@@ -239,11 +186,11 @@ func (x WorkspaceApprovalSetting_Rule_Source) String() string {}func (WorkspaceApprovalSetting_Rule_Source) Descriptor() protoreflect.EnumDescriptor {- return file_v1_setting_service_proto_enumTypes[3].Descriptor()+ return file_v1_setting_service_proto_enumTypes[2].Descriptor()}func (WorkspaceApprovalSetting_Rule_Source) Type() protoreflect.EnumType {- return &file_v1_setting_service_proto_enumTypes[3]+ return &file_v1_setting_service_proto_enumTypes[2]}func (x WorkspaceApprovalSetting_Rule_Source) Number() protoreflect.EnumNumber {@@ -252,7 +199,7 @@ func (x WorkspaceApprovalSetting_Rule_Source) Number() protoreflect.EnumNumber {// Deprecated: Use WorkspaceApprovalSetting_Rule_Source.Descriptor instead.func (WorkspaceApprovalSetting_Rule_Source) EnumDescriptor() ([]byte, []int) {- return file_v1_setting_service_proto_rawDescGZIP(), []int{10, 0, 0}+ return file_v1_setting_service_proto_rawDescGZIP(), []int{11, 0, 0}}type Algorithm_InnerOuterMask_MaskType int32@@ -288,11 +235,11 @@ func (x Algorithm_InnerOuterMask_MaskType) String() string {}func (Algorithm_InnerOuterMask_MaskType) Descriptor() protoreflect.EnumDescriptor {- return file_v1_setting_service_proto_enumTypes[4].Descriptor()+ return file_v1_setting_service_proto_enumTypes[3].Descriptor()}func (Algorithm_InnerOuterMask_MaskType) Type() protoreflect.EnumType {- return &file_v1_setting_service_proto_enumTypes[4]+ return &file_v1_setting_service_proto_enumTypes[3]}func (x Algorithm_InnerOuterMask_MaskType) Number() protoreflect.EnumNumber {@@ -301,7 +248,7 @@ func (x Algorithm_InnerOuterMask_MaskType) Number() protoreflect.EnumNumber {// Deprecated: Use Algorithm_InnerOuterMask_MaskType.Descriptor instead.func (Algorithm_InnerOuterMask_MaskType) EnumDescriptor() ([]byte, []int) {- return file_v1_setting_service_proto_rawDescGZIP(), []int{13, 3, 0}+ return file_v1_setting_service_proto_rawDescGZIP(), []int{14, 3, 0}}type AISetting_Provider int32@@ -343,11 +290,11 @@ func (x AISetting_Provider) String() string {}func (AISetting_Provider) Descriptor() protoreflect.EnumDescriptor {- return file_v1_setting_service_proto_enumTypes[5].Descriptor()+ return file_v1_setting_service_proto_enumTypes[4].Descriptor()}func (AISetting_Provider) Type() protoreflect.EnumType {- return &file_v1_setting_service_proto_enumTypes[5]+ return &file_v1_setting_service_proto_enumTypes[4]}func (x AISetting_Provider) Number() protoreflect.EnumNumber {@@ -356,7 +303,7 @@ func (x AISetting_Provider) Number() protoreflect.EnumNumber {// Deprecated: Use AISetting_Provider.Descriptor instead.func (AISetting_Provider) EnumDescriptor() ([]byte, []int) {- return file_v1_setting_service_proto_rawDescGZIP(), []int{14, 0}+ return file_v1_setting_service_proto_rawDescGZIP(), []int{15, 0}}type EmailSetting_Type int32@@ -389,11 +336,11 @@ func (x EmailSetting_Type) String() string {}func (EmailSetting_Type) Descriptor() protoreflect.EnumDescriptor {- return file_v1_setting_service_proto_enumTypes[6].Descriptor()+ return file_v1_setting_service_proto_enumTypes[5].Descriptor()}func (EmailSetting_Type) Type() protoreflect.EnumType {- return &file_v1_setting_service_proto_enumTypes[6]+ return &file_v1_setting_service_proto_enumTypes[5]}func (x EmailSetting_Type) Number() protoreflect.EnumNumber {@@ -402,7 +349,7 @@ func (x EmailSetting_Type) Number() protoreflect.EnumNumber {// Deprecated: Use EmailSetting_Type.Descriptor instead.func (EmailSetting_Type) EnumDescriptor() ([]byte, []int) {- return file_v1_setting_service_proto_rawDescGZIP(), []int{16, 0}+ return file_v1_setting_service_proto_rawDescGZIP(), []int{17, 0}}type EmailSetting_SMTPConfig_Encryption int32@@ -441,11 +388,11 @@ func (x EmailSetting_SMTPConfig_Encryption) String() string {}func (EmailSetting_SMTPConfig_Encryption) Descriptor() protoreflect.EnumDescriptor {- return file_v1_setting_service_proto_enumTypes[7].Descriptor()+ return file_v1_setting_service_proto_enumTypes[6].Descriptor()}func (EmailSetting_SMTPConfig_Encryption) Type() protoreflect.EnumType {- return &file_v1_setting_service_proto_enumTypes[7]+ return &file_v1_setting_service_proto_enumTypes[6]}func (x EmailSetting_SMTPConfig_Encryption) Number() protoreflect.EnumNumber {@@ -454,7 +401,7 @@ func (x EmailSetting_SMTPConfig_Encryption) Number() protoreflect.EnumNumber {// Deprecated: Use EmailSetting_SMTPConfig_Encryption.Descriptor instead.func (EmailSetting_SMTPConfig_Encryption) EnumDescriptor() ([]byte, []int) {- return file_v1_setting_service_proto_rawDescGZIP(), []int{16, 0, 0}+ return file_v1_setting_service_proto_rawDescGZIP(), []int{17, 0, 0}}type EmailSetting_SMTPConfig_Authentication int32@@ -496,11 +443,11 @@ func (x EmailSetting_SMTPConfig_Authentication) String() string {}func (EmailSetting_SMTPConfig_Authentication) Descriptor() protoreflect.EnumDescriptor {- return file_v1_setting_service_proto_enumTypes[8].Descriptor()+ return file_v1_setting_service_proto_enumTypes[7].Descriptor()}func (EmailSetting_SMTPConfig_Authentication) Type() protoreflect.EnumType {- return &file_v1_setting_service_proto_enumTypes[8]+ return &file_v1_setting_service_proto_enumTypes[7]}func (x EmailSetting_SMTPConfig_Authentication) Number() protoreflect.EnumNumber {@@ -509,7 +456,7 @@ func (x EmailSetting_SMTPConfig_Authentication) Number() protoreflect.EnumNumber// Deprecated: Use EmailSetting_SMTPConfig_Authentication.Descriptor instead.func (EmailSetting_SMTPConfig_Authentication) EnumDescriptor() ([]byte, []int) {- return file_v1_setting_service_proto_rawDescGZIP(), []int{16, 0, 1}+ return file_v1_setting_service_proto_rawDescGZIP(), []int{17, 0, 1}}type ListSettingsRequest struct {@@ -1084,6 +1031,12 @@ type WorkspaceProfileSetting struct {// Allow signin/signup using email + a 6-digit one-time verification code.// Requires the EMAIL setting to be configured on the workspace.AllowEmailCodeSignin bool `protobuf:"varint,22,opt,name=allow_email_code_signin,json=allowEmailCodeSignin,proto3" json:"allow_email_code_signin,omitempty"`+ // Enforced SQL Editor theme id: OPAQUE — a frontend-resolved built-in preset id+ // OR a custom theme's uuid. Empty ⇒ default light.+ SqlEditorThemeId string `protobuf:"bytes,23,opt,name=sql_editor_theme_id,json=sqlEditorThemeId,proto3" json:"sql_editor_theme_id,omitempty"`+ // The enforced CUSTOM theme's full definition — present ONLY when+ // sql_editor_theme_id is a custom uuid. tokens is always complete.+ SqlEditorCustomTheme *SQLEditorThemeSetting `protobuf:"bytes,24,opt,name=sql_editor_custom_theme,json=sqlEditorCustomTheme,proto3" json:"sql_editor_custom_theme,omitempty"`unknownFields protoimpl.UnknownFieldssizeCache protoimpl.SizeCache}@@ -1265,21 +1218,104 @@ func (x *WorkspaceProfileSetting) GetAllowEmailCodeSignin() bool {return false}+func (x *WorkspaceProfileSetting) GetSqlEditorThemeId() string {+ if x != nil {+ return x.SqlEditorThemeId+ }+ return ""+}++func (x *WorkspaceProfileSetting) GetSqlEditorCustomTheme() *SQLEditorThemeSetting {+ if x != nil {+ return x.SqlEditorCustomTheme+ }+ return nil+}++type SQLEditorThemeSetting struct {+ state protoimpl.MessageState `protogen:"open.v1"`+ Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`+ Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`+ MonacoBase string `protobuf:"bytes,3,opt,name=monaco_base,json=monacoBase,proto3" json:"monaco_base,omitempty"`+ Tokens map[string]string `protobuf:"bytes,4,rep,name=tokens,proto3" json:"tokens,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`+ unknownFields protoimpl.UnknownFields+ sizeCache protoimpl.SizeCache+}++func (x *SQLEditorThemeSetting) Reset() {+ *x = SQLEditorThemeSetting{}+ mi := &file_v1_setting_service_proto_msgTypes[9]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+}++func (x *SQLEditorThemeSetting) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*SQLEditorThemeSetting) ProtoMessage() {}++func (x *SQLEditorThemeSetting) ProtoReflect() protoreflect.Message {+ mi := &file_v1_setting_service_proto_msgTypes[9]+ 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 SQLEditorThemeSetting.ProtoReflect.Descriptor instead.+func (*SQLEditorThemeSetting) Descriptor() ([]byte, []int) {+ return file_v1_setting_service_proto_rawDescGZIP(), []int{9}+}++func (x *SQLEditorThemeSetting) GetId() string {+ if x != nil {+ return x.Id+ }+ return ""+}++func (x *SQLEditorThemeSetting) GetName() string {+ if x != nil {+ return x.Name+ }+ return ""+}++func (x *SQLEditorThemeSetting) GetMonacoBase() string {+ if x != nil {+ return x.MonacoBase+ }+ return ""+}++func (x *SQLEditorThemeSetting) GetTokens() map[string]string {+ if x != nil {+ return x.Tokens+ }+ return nil+}+type Announcement struct {state protoimpl.MessageState `protogen:"open.v1"`- // The alert level of announcement- Level Announcement_AlertLevel `protobuf:"varint,1,opt,name=level,proto3,enum=bytebase.v1.Announcement_AlertLevel" json:"level,omitempty"`// The text of announcementText string `protobuf:"bytes,2,opt,name=text,proto3" json:"text,omitempty"`// The optional link, user can follow the link to check extra details- Link string `protobuf:"bytes,3,opt,name=link,proto3" json:"link,omitempty"`+ Link string `protobuf:"bytes,3,opt,name=link,proto3" json:"link,omitempty"`+ // Banner colors. Built-in presets (info/warning/critical) are a+ // frontend-only concept that seeds these colors; the store only holds them.+ Theme *Announcement_AnnouncementTheme `protobuf:"bytes,4,opt,name=theme,proto3" json:"theme,omitempty"`unknownFields protoimpl.UnknownFieldssizeCache protoimpl.SizeCache}func (x *Announcement) Reset() {*x = Announcement{}- mi := &file_v1_setting_service_proto_msgTypes[9]+ mi := &file_v1_setting_service_proto_msgTypes[10]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -1291,7 +1327,7 @@ func (x *Announcement) String() string {func (*Announcement) ProtoMessage() {}func (x *Announcement) ProtoReflect() protoreflect.Message {- mi := &file_v1_setting_service_proto_msgTypes[9]+ mi := &file_v1_setting_service_proto_msgTypes[10]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -1304,14 +1340,7 @@ func (x *Announcement) ProtoReflect() protoreflect.Message {// Deprecated: Use Announcement.ProtoReflect.Descriptor instead.func (*Announcement) Descriptor() ([]byte, []int) {- return file_v1_setting_service_proto_rawDescGZIP(), []int{9}-}--func (x *Announcement) GetLevel() Announcement_AlertLevel {- if x != nil {- return x.Level- }- return Announcement_ALERT_LEVEL_UNSPECIFIED+ return file_v1_setting_service_proto_rawDescGZIP(), []int{10}}func (x *Announcement) GetText() string {@@ -1328,6 +1357,13 @@ func (x *Announcement) GetLink() string {return ""}+func (x *Announcement) GetTheme() *Announcement_AnnouncementTheme {+ if x != nil {+ return x.Theme+ }+ return nil+}+type WorkspaceApprovalSetting struct {state protoimpl.MessageState `protogen:"open.v1"`Rules []*WorkspaceApprovalSetting_Rule `protobuf:"bytes,1,rep,name=rules,proto3" json:"rules,omitempty"`@@ -1337,7 +1373,7 @@ type WorkspaceApprovalSetting struct {func (x *WorkspaceApprovalSetting) Reset() {*x = WorkspaceApprovalSetting{}- mi := &file_v1_setting_service_proto_msgTypes[10]+ mi := &file_v1_setting_service_proto_msgTypes[11]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -1349,7 +1385,7 @@ func (x *WorkspaceApprovalSetting) String() string {func (*WorkspaceApprovalSetting) ProtoMessage() {}func (x *WorkspaceApprovalSetting) ProtoReflect() protoreflect.Message {- mi := &file_v1_setting_service_proto_msgTypes[10]+ mi := &file_v1_setting_service_proto_msgTypes[11]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -1362,7 +1398,7 @@ func (x *WorkspaceApprovalSetting) ProtoReflect() protoreflect.Message {// Deprecated: Use WorkspaceApprovalSetting.ProtoReflect.Descriptor instead.func (*WorkspaceApprovalSetting) Descriptor() ([]byte, []int) {- return file_v1_setting_service_proto_rawDescGZIP(), []int{10}+ return file_v1_setting_service_proto_rawDescGZIP(), []int{11}}func (x *WorkspaceApprovalSetting) GetRules() []*WorkspaceApprovalSetting_Rule {@@ -1381,7 +1417,7 @@ type DataClassificationSetting struct {func (x *DataClassificationSetting) Reset() {*x = DataClassificationSetting{}- mi := &file_v1_setting_service_proto_msgTypes[11]+ mi := &file_v1_setting_service_proto_msgTypes[12]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -1393,7 +1429,7 @@ func (x *DataClassificationSetting) String() string {func (*DataClassificationSetting) ProtoMessage() {}func (x *DataClassificationSetting) ProtoReflect() protoreflect.Message {- mi := &file_v1_setting_service_proto_msgTypes[11]+ mi := &file_v1_setting_service_proto_msgTypes[12]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -1406,7 +1442,7 @@ func (x *DataClassificationSetting) ProtoReflect() protoreflect.Message {// Deprecated: Use DataClassificationSetting.ProtoReflect.Descriptor instead.func (*DataClassificationSetting) Descriptor() ([]byte, []int) {- return file_v1_setting_service_proto_rawDescGZIP(), []int{11}+ return file_v1_setting_service_proto_rawDescGZIP(), []int{12}}func (x *DataClassificationSetting) GetConfigs() []*DataClassificationSetting_DataClassificationConfig {@@ -1425,7 +1461,7 @@ type SemanticTypeSetting struct {func (x *SemanticTypeSetting) Reset() {*x = SemanticTypeSetting{}- mi := &file_v1_setting_service_proto_msgTypes[12]+ mi := &file_v1_setting_service_proto_msgTypes[13]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -1437,7 +1473,7 @@ func (x *SemanticTypeSetting) String() string {func (*SemanticTypeSetting) ProtoMessage() {}func (x *SemanticTypeSetting) ProtoReflect() protoreflect.Message {- mi := &file_v1_setting_service_proto_msgTypes[12]+ mi := &file_v1_setting_service_proto_msgTypes[13]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -1450,7 +1486,7 @@ func (x *SemanticTypeSetting) ProtoReflect() protoreflect.Message {// Deprecated: Use SemanticTypeSetting.ProtoReflect.Descriptor instead.func (*SemanticTypeSetting) Descriptor() ([]byte, []int) {- return file_v1_setting_service_proto_rawDescGZIP(), []int{12}+ return file_v1_setting_service_proto_rawDescGZIP(), []int{13}}func (x *SemanticTypeSetting) GetTypes() []*SemanticTypeSetting_SemanticType {@@ -1475,7 +1511,7 @@ type Algorithm struct {func (x *Algorithm) Reset() {*x = Algorithm{}- mi := &file_v1_setting_service_proto_msgTypes[13]+ mi := &file_v1_setting_service_proto_msgTypes[14]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -1487,7 +1523,7 @@ func (x *Algorithm) String() string {func (*Algorithm) ProtoMessage() {}func (x *Algorithm) ProtoReflect() protoreflect.Message {- mi := &file_v1_setting_service_proto_msgTypes[13]+ mi := &file_v1_setting_service_proto_msgTypes[14]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -1500,7 +1536,7 @@ func (x *Algorithm) ProtoReflect() protoreflect.Message {// Deprecated: Use Algorithm.ProtoReflect.Descriptor instead.func (*Algorithm) Descriptor() ([]byte, []int) {- return file_v1_setting_service_proto_rawDescGZIP(), []int{13}+ return file_v1_setting_service_proto_rawDescGZIP(), []int{14}}func (x *Algorithm) GetMask() isAlgorithm_Mask {@@ -1588,7 +1624,7 @@ type AISetting struct {func (x *AISetting) Reset() {*x = AISetting{}- mi := &file_v1_setting_service_proto_msgTypes[14]+ mi := &file_v1_setting_service_proto_msgTypes[15]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -1600,7 +1636,7 @@ func (x *AISetting) String() string {func (*AISetting) ProtoMessage() {}func (x *AISetting) ProtoReflect() protoreflect.Message {- mi := &file_v1_setting_service_proto_msgTypes[14]+ mi := &file_v1_setting_service_proto_msgTypes[15]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -1613,7 +1649,7 @@ func (x *AISetting) ProtoReflect() protoreflect.Message {// Deprecated: Use AISetting.ProtoReflect.Descriptor instead.func (*AISetting) Descriptor() ([]byte, []int) {- return file_v1_setting_service_proto_rawDescGZIP(), []int{14}+ return file_v1_setting_service_proto_rawDescGZIP(), []int{15}}func (x *AISetting) GetEnabled() bool {@@ -1667,7 +1703,7 @@ type EnvironmentSetting struct {func (x *EnvironmentSetting) Reset() {*x = EnvironmentSetting{}- mi := &file_v1_setting_service_proto_msgTypes[15]+ mi := &file_v1_setting_service_proto_msgTypes[16]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -1679,7 +1715,7 @@ func (x *EnvironmentSetting) String() string {func (*EnvironmentSetting) ProtoMessage() {}func (x *EnvironmentSetting) ProtoReflect() protoreflect.Message {- mi := &file_v1_setting_service_proto_msgTypes[15]+ mi := &file_v1_setting_service_proto_msgTypes[16]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -1692,7 +1728,7 @@ func (x *EnvironmentSetting) ProtoReflect() protoreflect.Message {// Deprecated: Use EnvironmentSetting.ProtoReflect.Descriptor instead.func (*EnvironmentSetting) Descriptor() ([]byte, []int) {- return file_v1_setting_service_proto_rawDescGZIP(), []int{15}+ return file_v1_setting_service_proto_rawDescGZIP(), []int{16}}func (x *EnvironmentSetting) GetEnvironments() []*EnvironmentSetting_Environment {@@ -1717,7 +1753,7 @@ type EmailSetting struct {func (x *EmailSetting) Reset() {*x = EmailSetting{}- mi := &file_v1_setting_service_proto_msgTypes[16]+ mi := &file_v1_setting_service_proto_msgTypes[17]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -1729,7 +1765,7 @@ func (x *EmailSetting) String() string {func (*EmailSetting) ProtoMessage() {}func (x *EmailSetting) ProtoReflect() protoreflect.Message {- mi := &file_v1_setting_service_proto_msgTypes[16]+ mi := &file_v1_setting_service_proto_msgTypes[17]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -1742,7 +1778,7 @@ func (x *EmailSetting) ProtoReflect() protoreflect.Message {// Deprecated: Use EmailSetting.ProtoReflect.Descriptor instead.func (*EmailSetting) Descriptor() ([]byte, []int) {- return file_v1_setting_service_proto_rawDescGZIP(), []int{16}+ return file_v1_setting_service_proto_rawDescGZIP(), []int{17}}func (x *EmailSetting) GetFrom() string {@@ -1803,7 +1839,7 @@ type TestEmailSettingRequest struct {func (x *TestEmailSettingRequest) Reset() {*x = TestEmailSettingRequest{}- mi := &file_v1_setting_service_proto_msgTypes[17]+ mi := &file_v1_setting_service_proto_msgTypes[18]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -1815,7 +1851,7 @@ func (x *TestEmailSettingRequest) String() string {func (*TestEmailSettingRequest) ProtoMessage() {}func (x *TestEmailSettingRequest) ProtoReflect() protoreflect.Message {- mi := &file_v1_setting_service_proto_msgTypes[17]+ mi := &file_v1_setting_service_proto_msgTypes[18]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -1828,7 +1864,7 @@ func (x *TestEmailSettingRequest) ProtoReflect() protoreflect.Message {// Deprecated: Use TestEmailSettingRequest.ProtoReflect.Descriptor instead.func (*TestEmailSettingRequest) Descriptor() ([]byte, []int) {- return file_v1_setting_service_proto_rawDescGZIP(), []int{17}+ return file_v1_setting_service_proto_rawDescGZIP(), []int{18}}func (x *TestEmailSettingRequest) GetParent() string {@@ -1862,7 +1898,7 @@ type TestEmailSettingResponse struct {func (x *TestEmailSettingResponse) Reset() {*x = TestEmailSettingResponse{}- mi := &file_v1_setting_service_proto_msgTypes[18]+ mi := &file_v1_setting_service_proto_msgTypes[19]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -1874,7 +1910,7 @@ func (x *TestEmailSettingResponse) String() string {func (*TestEmailSettingResponse) ProtoMessage() {}func (x *TestEmailSettingResponse) ProtoReflect() protoreflect.Message {- mi := &file_v1_setting_service_proto_msgTypes[18]+ mi := &file_v1_setting_service_proto_msgTypes[19]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -1887,7 +1923,7 @@ func (x *TestEmailSettingResponse) ProtoReflect() protoreflect.Message {// Deprecated: Use TestEmailSettingResponse.ProtoReflect.Descriptor instead.func (*TestEmailSettingResponse) Descriptor() ([]byte, []int) {- return file_v1_setting_service_proto_rawDescGZIP(), []int{18}+ return file_v1_setting_service_proto_rawDescGZIP(), []int{19}}func (x *TestEmailSettingResponse) GetSuccess() bool {@@ -1913,7 +1949,7 @@ type AppIMSetting_Slack struct {func (x *AppIMSetting_Slack) Reset() {*x = AppIMSetting_Slack{}- mi := &file_v1_setting_service_proto_msgTypes[19]+ mi := &file_v1_setting_service_proto_msgTypes[20]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -1925,7 +1961,7 @@ func (x *AppIMSetting_Slack) String() string {func (*AppIMSetting_Slack) ProtoMessage() {}func (x *AppIMSetting_Slack) ProtoReflect() protoreflect.Message {- mi := &file_v1_setting_service_proto_msgTypes[19]+ mi := &file_v1_setting_service_proto_msgTypes[20]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -1958,7 +1994,7 @@ type AppIMSetting_Feishu struct {func (x *AppIMSetting_Feishu) Reset() {*x = AppIMSetting_Feishu{}- mi := &file_v1_setting_service_proto_msgTypes[20]+ mi := &file_v1_setting_service_proto_msgTypes[21]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -1970,7 +2006,7 @@ func (x *AppIMSetting_Feishu) String() string {func (*AppIMSetting_Feishu) ProtoMessage() {}func (x *AppIMSetting_Feishu) ProtoReflect() protoreflect.Message {- mi := &file_v1_setting_service_proto_msgTypes[20]+ mi := &file_v1_setting_service_proto_msgTypes[21]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -2011,7 +2047,7 @@ type AppIMSetting_Wecom struct {func (x *AppIMSetting_Wecom) Reset() {*x = AppIMSetting_Wecom{}- mi := &file_v1_setting_service_proto_msgTypes[21]+ mi := &file_v1_setting_service_proto_msgTypes[22]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -2023,7 +2059,7 @@ func (x *AppIMSetting_Wecom) String() string {func (*AppIMSetting_Wecom) ProtoMessage() {}func (x *AppIMSetting_Wecom) ProtoReflect() protoreflect.Message {- mi := &file_v1_setting_service_proto_msgTypes[21]+ mi := &file_v1_setting_service_proto_msgTypes[22]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -2070,7 +2106,7 @@ type AppIMSetting_Lark struct {func (x *AppIMSetting_Lark) Reset() {*x = AppIMSetting_Lark{}- mi := &file_v1_setting_service_proto_msgTypes[22]+ mi := &file_v1_setting_service_proto_msgTypes[23]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -2082,7 +2118,7 @@ func (x *AppIMSetting_Lark) String() string {func (*AppIMSetting_Lark) ProtoMessage() {}func (x *AppIMSetting_Lark) ProtoReflect() protoreflect.Message {- mi := &file_v1_setting_service_proto_msgTypes[22]+ mi := &file_v1_setting_service_proto_msgTypes[23]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -2123,7 +2159,7 @@ type AppIMSetting_DingTalk struct {func (x *AppIMSetting_DingTalk) Reset() {*x = AppIMSetting_DingTalk{}- mi := &file_v1_setting_service_proto_msgTypes[23]+ mi := &file_v1_setting_service_proto_msgTypes[24]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -2135,7 +2171,7 @@ func (x *AppIMSetting_DingTalk) String() string {func (*AppIMSetting_DingTalk) ProtoMessage() {}func (x *AppIMSetting_DingTalk) ProtoReflect() protoreflect.Message {- mi := &file_v1_setting_service_proto_msgTypes[23]+ mi := &file_v1_setting_service_proto_msgTypes[24]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -2186,7 +2222,7 @@ type AppIMSetting_Teams struct {func (x *AppIMSetting_Teams) Reset() {*x = AppIMSetting_Teams{}- 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)}@@ -2198,7 +2234,7 @@ func (x *AppIMSetting_Teams) String() string {func (*AppIMSetting_Teams) ProtoMessage() {}func (x *AppIMSetting_Teams) 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 {@@ -2253,7 +2289,7 @@ type AppIMSetting_IMSetting struct {func (x *AppIMSetting_IMSetting) Reset() {*x = AppIMSetting_IMSetting{}- 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)}@@ -2265,7 +2301,7 @@ func (x *AppIMSetting_IMSetting) String() string {func (*AppIMSetting_IMSetting) ProtoMessage() {}func (x *AppIMSetting_IMSetting) 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 {@@ -2411,7 +2447,7 @@ type WorkspaceProfileSetting_PasswordRestriction struct {func (x *WorkspaceProfileSetting_PasswordRestriction) Reset() {*x = WorkspaceProfileSetting_PasswordRestriction{}- 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)}@@ -2423,7 +2459,7 @@ func (x *WorkspaceProfileSetting_PasswordRestriction) String() string {func (*WorkspaceProfileSetting_PasswordRestriction) ProtoMessage() {}func (x *WorkspaceProfileSetting_PasswordRestriction) 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 {@@ -2488,6 +2524,58 @@ func (x *WorkspaceProfileSetting_PasswordRestriction) GetPasswordRotation() *durreturn nil}+type Announcement_AnnouncementTheme struct {+ state protoimpl.MessageState `protogen:"open.v1"`+ Background string `protobuf:"bytes,1,opt,name=background,proto3" json:"background,omitempty"` // "r g b"+ Text string `protobuf:"bytes,2,opt,name=text,proto3" json:"text,omitempty"` // "r g b"+ unknownFields protoimpl.UnknownFields+ sizeCache protoimpl.SizeCache+}++func (x *Announcement_AnnouncementTheme) Reset() {+ *x = Announcement_AnnouncementTheme{}+ mi := &file_v1_setting_service_proto_msgTypes[29]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+}++func (x *Announcement_AnnouncementTheme) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*Announcement_AnnouncementTheme) ProtoMessage() {}++func (x *Announcement_AnnouncementTheme) ProtoReflect() protoreflect.Message {+ mi := &file_v1_setting_service_proto_msgTypes[29]+ 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 Announcement_AnnouncementTheme.ProtoReflect.Descriptor instead.+func (*Announcement_AnnouncementTheme) Descriptor() ([]byte, []int) {+ return file_v1_setting_service_proto_rawDescGZIP(), []int{10, 0}+}++func (x *Announcement_AnnouncementTheme) GetBackground() string {+ if x != nil {+ return x.Background+ }+ return ""+}++func (x *Announcement_AnnouncementTheme) GetText() string {+ if x != nil {+ return x.Text+ }+ return ""+}+type WorkspaceApprovalSetting_Rule struct {state protoimpl.MessageState `protogen:"open.v1"`Template *ApprovalTemplate `protobuf:"bytes,1,opt,name=template,proto3" json:"template,omitempty"`@@ -2527,7 +2615,7 @@ type WorkspaceApprovalSetting_Rule struct {func (x *WorkspaceApprovalSetting_Rule) Reset() {*x = WorkspaceApprovalSetting_Rule{}- mi := &file_v1_setting_service_proto_msgTypes[27]+ mi := &file_v1_setting_service_proto_msgTypes[30]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -2539,7 +2627,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[27]+ mi := &file_v1_setting_service_proto_msgTypes[30]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -2552,7 +2640,7 @@ func (x *WorkspaceApprovalSetting_Rule) ProtoReflect() protoreflect.Message {// Deprecated: Use WorkspaceApprovalSetting_Rule.ProtoReflect.Descriptor instead.func (*WorkspaceApprovalSetting_Rule) Descriptor() ([]byte, []int) {- return file_v1_setting_service_proto_rawDescGZIP(), []int{10, 0}+ return file_v1_setting_service_proto_rawDescGZIP(), []int{11, 0}}func (x *WorkspaceApprovalSetting_Rule) GetTemplate() *ApprovalTemplate {@@ -2592,7 +2680,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[31]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -2604,7 +2692,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[31]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -2617,7 +2705,7 @@ func (x *DataClassificationSetting_DataClassificationConfig) ProtoReflect() prot// Deprecated: Use DataClassificationSetting_DataClassificationConfig.ProtoReflect.Descriptor instead.func (*DataClassificationSetting_DataClassificationConfig) Descriptor() ([]byte, []int) {- return file_v1_setting_service_proto_rawDescGZIP(), []int{11, 0}+ return file_v1_setting_service_proto_rawDescGZIP(), []int{12, 0}}func (x *DataClassificationSetting_DataClassificationConfig) GetId() string {@@ -2659,7 +2747,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[32]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -2671,7 +2759,7 @@ func (x *DataClassificationSetting_DataClassificationConfig_Level) String() strifunc (*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[32]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -2684,7 +2772,7 @@ func (x *DataClassificationSetting_DataClassificationConfig_Level) ProtoReflect(// Deprecated: Use DataClassificationSetting_DataClassificationConfig_Level.ProtoReflect.Descriptor instead.func (*DataClassificationSetting_DataClassificationConfig_Level) Descriptor() ([]byte, []int) {- return file_v1_setting_service_proto_rawDescGZIP(), []int{11, 0, 0}+ return file_v1_setting_service_proto_rawDescGZIP(), []int{12, 0, 0}}func (x *DataClassificationSetting_DataClassificationConfig_Level) GetTitle() string {@@ -2714,7 +2802,7 @@ type DataClassificationSetting_DataClassificationConfig_DataClassification strucfunc (x *DataClassificationSetting_DataClassificationConfig_DataClassification) Reset() {*x = DataClassificationSetting_DataClassificationConfig_DataClassification{}- mi := &file_v1_setting_service_proto_msgTypes[30]+ mi := &file_v1_setting_service_proto_msgTypes[33]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -2726,7 +2814,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[33]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -2739,7 +2827,7 @@ func (x *DataClassificationSetting_DataClassificationConfig_DataClassification)// Deprecated: Use DataClassificationSetting_DataClassificationConfig_DataClassification.ProtoReflect.Descriptor instead.func (*DataClassificationSetting_DataClassificationConfig_DataClassification) Descriptor() ([]byte, []int) {- return file_v1_setting_service_proto_rawDescGZIP(), []int{11, 0, 1}+ return file_v1_setting_service_proto_rawDescGZIP(), []int{12, 0, 1}}func (x *DataClassificationSetting_DataClassificationConfig_DataClassification) GetId() string {@@ -2780,7 +2868,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[35]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -2792,7 +2880,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[35]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -2805,7 +2893,7 @@ func (x *SemanticTypeSetting_SemanticType) ProtoReflect() protoreflect.Message {// Deprecated: Use SemanticTypeSetting_SemanticType.ProtoReflect.Descriptor instead.func (*SemanticTypeSetting_SemanticType) Descriptor() ([]byte, []int) {- return file_v1_setting_service_proto_rawDescGZIP(), []int{12, 0}+ return file_v1_setting_service_proto_rawDescGZIP(), []int{13, 0}}func (x *SemanticTypeSetting_SemanticType) GetId() string {@@ -2854,7 +2942,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[36]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -2866,7 +2954,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[36]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -2879,7 +2967,7 @@ func (x *Algorithm_FullMask) ProtoReflect() protoreflect.Message {// Deprecated: Use Algorithm_FullMask.ProtoReflect.Descriptor instead.func (*Algorithm_FullMask) Descriptor() ([]byte, []int) {- return file_v1_setting_service_proto_rawDescGZIP(), []int{13, 0}+ return file_v1_setting_service_proto_rawDescGZIP(), []int{14, 0}}func (x *Algorithm_FullMask) GetSubstitution() string {@@ -2900,7 +2988,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[37]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -2912,7 +3000,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[37]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -2925,7 +3013,7 @@ func (x *Algorithm_RangeMask) ProtoReflect() protoreflect.Message {// Deprecated: Use Algorithm_RangeMask.ProtoReflect.Descriptor instead.func (*Algorithm_RangeMask) Descriptor() ([]byte, []int) {- return file_v1_setting_service_proto_rawDescGZIP(), []int{13, 1}+ return file_v1_setting_service_proto_rawDescGZIP(), []int{14, 1}}func (x *Algorithm_RangeMask) GetSlices() []*Algorithm_RangeMask_Slice {@@ -2945,7 +3033,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[38]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -2957,7 +3045,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[38]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -2970,7 +3058,7 @@ func (x *Algorithm_MD5Mask) ProtoReflect() protoreflect.Message {// Deprecated: Use Algorithm_MD5Mask.ProtoReflect.Descriptor instead.func (*Algorithm_MD5Mask) Descriptor() ([]byte, []int) {- return file_v1_setting_service_proto_rawDescGZIP(), []int{13, 2}+ return file_v1_setting_service_proto_rawDescGZIP(), []int{14, 2}}func (x *Algorithm_MD5Mask) GetSalt() string {@@ -2992,7 +3080,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[39]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -3004,7 +3092,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[39]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -3017,7 +3105,7 @@ func (x *Algorithm_InnerOuterMask) ProtoReflect() protoreflect.Message {// Deprecated: Use Algorithm_InnerOuterMask.ProtoReflect.Descriptor instead.func (*Algorithm_InnerOuterMask) Descriptor() ([]byte, []int) {- return file_v1_setting_service_proto_rawDescGZIP(), []int{13, 3}+ return file_v1_setting_service_proto_rawDescGZIP(), []int{14, 3}}func (x *Algorithm_InnerOuterMask) GetPrefixLen() int32 {@@ -3065,7 +3153,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[40]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -3077,7 +3165,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[40]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -3090,7 +3178,7 @@ func (x *Algorithm_RangeMask_Slice) ProtoReflect() protoreflect.Message {// Deprecated: Use Algorithm_RangeMask_Slice.ProtoReflect.Descriptor instead.func (*Algorithm_RangeMask_Slice) Descriptor() ([]byte, []int) {- return file_v1_setting_service_proto_rawDescGZIP(), []int{13, 1, 0}+ return file_v1_setting_service_proto_rawDescGZIP(), []int{14, 1, 0}}func (x *Algorithm_RangeMask_Slice) GetStart() int32 {@@ -3134,7 +3222,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[41]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -3146,7 +3234,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[41]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -3159,7 +3247,7 @@ func (x *EnvironmentSetting_Environment) ProtoReflect() protoreflect.Message {// Deprecated: Use EnvironmentSetting_Environment.ProtoReflect.Descriptor instead.func (*EnvironmentSetting_Environment) Descriptor() ([]byte, []int) {- return file_v1_setting_service_proto_rawDescGZIP(), []int{15, 0}+ return file_v1_setting_service_proto_rawDescGZIP(), []int{16, 0}}func (x *EnvironmentSetting_Environment) GetName() string {@@ -3211,7 +3299,7 @@ type EmailSetting_SMTPConfig struct {func (x *EmailSetting_SMTPConfig) Reset() {*x = EmailSetting_SMTPConfig{}- mi := &file_v1_setting_service_proto_msgTypes[40]+ mi := &file_v1_setting_service_proto_msgTypes[43]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -3223,7 +3311,7 @@ func (x *EmailSetting_SMTPConfig) String() string {func (*EmailSetting_SMTPConfig) ProtoMessage() {}func (x *EmailSetting_SMTPConfig) ProtoReflect() protoreflect.Message {- mi := &file_v1_setting_service_proto_msgTypes[40]+ mi := &file_v1_setting_service_proto_msgTypes[43]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -3236,7 +3324,7 @@ func (x *EmailSetting_SMTPConfig) ProtoReflect() protoreflect.Message {// Deprecated: Use EmailSetting_SMTPConfig.ProtoReflect.Descriptor instead.func (*EmailSetting_SMTPConfig) Descriptor() ([]byte, []int) {- return file_v1_setting_service_proto_rawDescGZIP(), []int{16, 0}+ return file_v1_setting_service_proto_rawDescGZIP(), []int{17, 0}}func (x *EmailSetting_SMTPConfig) GetHost() string {@@ -3358,7 +3446,7 @@ const file_v1_setting_service_proto_rawDesc = "" +"\x04lark\x18\x05 \x01(\v2\x1e.bytebase.v1.AppIMSetting.LarkH\x00R\x04lark\x12@\n" +"\bdingtalk\x18\x06 \x01(\v2\".bytebase.v1.AppIMSetting.DingTalkH\x00R\bdingtalk\x127\n" +"\x05teams\x18\a \x01(\v2\x1f.bytebase.v1.AppIMSetting.TeamsH\x00R\x05teamsB\t\n" +- "\apayload\"\xf8\f\n" ++ "\apayload\"\x82\x0e\n" +"\x17WorkspaceProfileSetting\x12!\n" +"\fexternal_url\x18\x01 \x01(\tR\vexternalUrl\x12'\n" +"\x0fdisallow_signup\x18\x02 \x01(\bR\x0edisallowSignup\x12\x1f\n" +@@ -3382,7 +3470,9 @@ const file_v1_setting_service_proto_rawDesc = "" +"\fenable_debug\x18\x13 \x01(\bR\venableDebug\x12&\n" +"\x0fsql_result_size\x18\x14 \x01(\x03R\rsqlResultSize\x12>\n" +"\rquery_timeout\x18\x15 \x01(\v2\x19.google.protobuf.DurationR\fqueryTimeout\x125\n" +- "\x17allow_email_code_signin\x18\x16 \x01(\bR\x14allowEmailCodeSignin\x1a\x93\x03\n" ++ "\x17allow_email_code_signin\x18\x16 \x01(\bR\x14allowEmailCodeSignin\x12-\n" ++ "\x13sql_editor_theme_id\x18\x17 \x01(\tR\x10sqlEditorThemeId\x12Y\n" ++ "\x17sql_editor_custom_theme\x18\x18 \x01(\v2\".bytebase.v1.SQLEditorThemeSettingR\x14sqlEditorCustomTheme\x1a\x93\x03\n" +"\x13PasswordRestriction\x12\x1d\n" +"\n" +"min_length\x18\x01 \x01(\x05R\tminLength\x12%\n" +@@ -3391,17 +3481,25 @@ const file_v1_setting_service_proto_rawDesc = "" +"\x18require_uppercase_letter\x18\x04 \x01(\bR\x16requireUppercaseLetter\x12:\n" +"\x19require_special_character\x18\x05 \x01(\bR\x17requireSpecialCharacter\x12Q\n" +"&require_reset_password_for_first_login\x18\x06 \x01(\bR!requireResetPasswordForFirstLogin\x12F\n" +- "\x11password_rotation\x18\a \x01(\v2\x19.google.protobuf.DurationR\x10passwordRotationJ\x04\b\x10\x10\x11\"\xc2\x01\n" +- "\fAnnouncement\x12:\n" +- "\x05level\x18\x01 \x01(\x0e2$.bytebase.v1.Announcement.AlertLevelR\x05level\x12\x12\n" ++ "\x11password_rotation\x18\a \x01(\v2\x19.google.protobuf.DurationR\x10passwordRotationJ\x04\b\x10\x10\x11\"\xdf\x01\n" ++ "\x15SQLEditorThemeSetting\x12\x0e\n" ++ "\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n" ++ "\x04name\x18\x02 \x01(\tR\x04name\x12\x1f\n" ++ "\vmonaco_base\x18\x03 \x01(\tR\n" ++ "monacoBase\x12F\n" ++ "\x06tokens\x18\x04 \x03(\v2..bytebase.v1.SQLEditorThemeSetting.TokensEntryR\x06tokens\x1a9\n" ++ "\vTokensEntry\x12\x10\n" ++ "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" ++ "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"\xcf\x01\n" ++ "\fAnnouncement\x12\x12\n" +"\x04text\x18\x02 \x01(\tR\x04text\x12\x12\n" +- "\x04link\x18\x03 \x01(\tR\x04link\"N\n" ++ "\x04link\x18\x03 \x01(\tR\x04link\x12A\n" ++ "\x05theme\x18\x04 \x01(\v2+.bytebase.v1.Announcement.AnnouncementThemeR\x05theme\x1aG\n" ++ "\x11AnnouncementTheme\x12\x1e\n" +"\n" +- "AlertLevel\x12\x1b\n" +- "\x17ALERT_LEVEL_UNSPECIFIED\x10\x00\x12\b\n" +- "\x04INFO\x10\x01\x12\v\n" +- "\aWARNING\x10\x02\x12\f\n" +- "\bCRITICAL\x10\x03\"\xa0\x03\n" ++ "background\x18\x01 \x01(\tR\n" ++ "background\x12\x12\n" ++ "\x04text\x18\x02 \x01(\tR\x04textJ\x04\b\x01\x10\x02R\x05level\"\xa0\x03\n" +"\x18WorkspaceApprovalSetting\x12@\n" +"\x05rules\x18\x01 \x03(\v2*.bytebase.v1.WorkspaceApprovalSetting.RuleR\x05rules\x1a\xc1\x02\n" +"\x04Rule\x129\n" +@@ -3558,73 +3656,75 @@ func file_v1_setting_service_proto_rawDescGZIP() []byte {return file_v1_setting_service_proto_rawDescData}-var file_v1_setting_service_proto_enumTypes = make([]protoimpl.EnumInfo, 9)-var file_v1_setting_service_proto_msgTypes = make([]protoimpl.MessageInfo, 41)+var file_v1_setting_service_proto_enumTypes = make([]protoimpl.EnumInfo, 8)+var file_v1_setting_service_proto_msgTypes = make([]protoimpl.MessageInfo, 44)var file_v1_setting_service_proto_goTypes = []any{- (DatabaseChangeMode)(0), // 0: bytebase.v1.DatabaseChangeMode- (Setting_SettingName)(0), // 1: bytebase.v1.Setting.SettingName- (Announcement_AlertLevel)(0), // 2: bytebase.v1.Announcement.AlertLevel- (WorkspaceApprovalSetting_Rule_Source)(0), // 3: bytebase.v1.WorkspaceApprovalSetting.Rule.Source- (Algorithm_InnerOuterMask_MaskType)(0), // 4: bytebase.v1.Algorithm.InnerOuterMask.MaskType- (AISetting_Provider)(0), // 5: bytebase.v1.AISetting.Provider- (EmailSetting_Type)(0), // 6: bytebase.v1.EmailSetting.Type- (EmailSetting_SMTPConfig_Encryption)(0), // 7: bytebase.v1.EmailSetting.SMTPConfig.Encryption- (EmailSetting_SMTPConfig_Authentication)(0), // 8: bytebase.v1.EmailSetting.SMTPConfig.Authentication- (*ListSettingsRequest)(nil), // 9: bytebase.v1.ListSettingsRequest- (*ListSettingsResponse)(nil), // 10: bytebase.v1.ListSettingsResponse- (*GetSettingRequest)(nil), // 11: bytebase.v1.GetSettingRequest- (*GetSettingResponse)(nil), // 12: bytebase.v1.GetSettingResponse- (*UpdateSettingRequest)(nil), // 13: bytebase.v1.UpdateSettingRequest- (*Setting)(nil), // 14: bytebase.v1.Setting- (*SettingValue)(nil), // 15: bytebase.v1.SettingValue- (*AppIMSetting)(nil), // 16: bytebase.v1.AppIMSetting- (*WorkspaceProfileSetting)(nil), // 17: bytebase.v1.WorkspaceProfileSetting- (*Announcement)(nil), // 18: bytebase.v1.Announcement- (*WorkspaceApprovalSetting)(nil), // 19: bytebase.v1.WorkspaceApprovalSetting- (*DataClassificationSetting)(nil), // 20: bytebase.v1.DataClassificationSetting- (*SemanticTypeSetting)(nil), // 21: bytebase.v1.SemanticTypeSetting- (*Algorithm)(nil), // 22: bytebase.v1.Algorithm- (*AISetting)(nil), // 23: bytebase.v1.AISetting- (*EnvironmentSetting)(nil), // 24: bytebase.v1.EnvironmentSetting- (*EmailSetting)(nil), // 25: bytebase.v1.EmailSetting- (*TestEmailSettingRequest)(nil), // 26: bytebase.v1.TestEmailSettingRequest- (*TestEmailSettingResponse)(nil), // 27: bytebase.v1.TestEmailSettingResponse- (*AppIMSetting_Slack)(nil), // 28: bytebase.v1.AppIMSetting.Slack- (*AppIMSetting_Feishu)(nil), // 29: bytebase.v1.AppIMSetting.Feishu- (*AppIMSetting_Wecom)(nil), // 30: bytebase.v1.AppIMSetting.Wecom- (*AppIMSetting_Lark)(nil), // 31: bytebase.v1.AppIMSetting.Lark- (*AppIMSetting_DingTalk)(nil), // 32: bytebase.v1.AppIMSetting.DingTalk- (*AppIMSetting_Teams)(nil), // 33: bytebase.v1.AppIMSetting.Teams- (*AppIMSetting_IMSetting)(nil), // 34: bytebase.v1.AppIMSetting.IMSetting- (*WorkspaceProfileSetting_PasswordRestriction)(nil), // 35: bytebase.v1.WorkspaceProfileSetting.PasswordRestriction- (*WorkspaceApprovalSetting_Rule)(nil), // 36: bytebase.v1.WorkspaceApprovalSetting.Rule- (*DataClassificationSetting_DataClassificationConfig)(nil), // 37: bytebase.v1.DataClassificationSetting.DataClassificationConfig- (*DataClassificationSetting_DataClassificationConfig_Level)(nil), // 38: bytebase.v1.DataClassificationSetting.DataClassificationConfig.Level- (*DataClassificationSetting_DataClassificationConfig_DataClassification)(nil), // 39: bytebase.v1.DataClassificationSetting.DataClassificationConfig.DataClassification- nil, // 40: bytebase.v1.DataClassificationSetting.DataClassificationConfig.ClassificationEntry- (*SemanticTypeSetting_SemanticType)(nil), // 41: bytebase.v1.SemanticTypeSetting.SemanticType- (*Algorithm_FullMask)(nil), // 42: bytebase.v1.Algorithm.FullMask- (*Algorithm_RangeMask)(nil), // 43: bytebase.v1.Algorithm.RangeMask- (*Algorithm_MD5Mask)(nil), // 44: bytebase.v1.Algorithm.MD5Mask- (*Algorithm_InnerOuterMask)(nil), // 45: bytebase.v1.Algorithm.InnerOuterMask- (*Algorithm_RangeMask_Slice)(nil), // 46: bytebase.v1.Algorithm.RangeMask.Slice- (*EnvironmentSetting_Environment)(nil), // 47: bytebase.v1.EnvironmentSetting.Environment- nil, // 48: bytebase.v1.EnvironmentSetting.Environment.TagsEntry- (*EmailSetting_SMTPConfig)(nil), // 49: bytebase.v1.EmailSetting.SMTPConfig- (*fieldmaskpb.FieldMask)(nil), // 50: google.protobuf.FieldMask- (*durationpb.Duration)(nil), // 51: google.protobuf.Duration- (WebhookType)(0), // 52: bytebase.v1.WebhookType- (*ApprovalTemplate)(nil), // 53: bytebase.v1.ApprovalTemplate- (*expr.Expr)(nil), // 54: google.type.Expr+ (DatabaseChangeMode)(0), // 0: bytebase.v1.DatabaseChangeMode+ (Setting_SettingName)(0), // 1: bytebase.v1.Setting.SettingName+ (WorkspaceApprovalSetting_Rule_Source)(0), // 2: bytebase.v1.WorkspaceApprovalSetting.Rule.Source+ (Algorithm_InnerOuterMask_MaskType)(0), // 3: bytebase.v1.Algorithm.InnerOuterMask.MaskType+ (AISetting_Provider)(0), // 4: bytebase.v1.AISetting.Provider+ (EmailSetting_Type)(0), // 5: bytebase.v1.EmailSetting.Type+ (EmailSetting_SMTPConfig_Encryption)(0), // 6: bytebase.v1.EmailSetting.SMTPConfig.Encryption+ (EmailSetting_SMTPConfig_Authentication)(0), // 7: bytebase.v1.EmailSetting.SMTPConfig.Authentication+ (*ListSettingsRequest)(nil), // 8: bytebase.v1.ListSettingsRequest+ (*ListSettingsResponse)(nil), // 9: bytebase.v1.ListSettingsResponse+ (*GetSettingRequest)(nil), // 10: bytebase.v1.GetSettingRequest+ (*GetSettingResponse)(nil), // 11: bytebase.v1.GetSettingResponse+ (*UpdateSettingRequest)(nil), // 12: bytebase.v1.UpdateSettingRequest+ (*Setting)(nil), // 13: bytebase.v1.Setting+ (*SettingValue)(nil), // 14: bytebase.v1.SettingValue+ (*AppIMSetting)(nil), // 15: bytebase.v1.AppIMSetting+ (*WorkspaceProfileSetting)(nil), // 16: bytebase.v1.WorkspaceProfileSetting+ (*SQLEditorThemeSetting)(nil), // 17: bytebase.v1.SQLEditorThemeSetting+ (*Announcement)(nil), // 18: bytebase.v1.Announcement+ (*WorkspaceApprovalSetting)(nil), // 19: bytebase.v1.WorkspaceApprovalSetting+ (*DataClassificationSetting)(nil), // 20: bytebase.v1.DataClassificationSetting+ (*SemanticTypeSetting)(nil), // 21: bytebase.v1.SemanticTypeSetting+ (*Algorithm)(nil), // 22: bytebase.v1.Algorithm+ (*AISetting)(nil), // 23: bytebase.v1.AISetting+ (*EnvironmentSetting)(nil), // 24: bytebase.v1.EnvironmentSetting+ (*EmailSetting)(nil), // 25: bytebase.v1.EmailSetting+ (*TestEmailSettingRequest)(nil), // 26: bytebase.v1.TestEmailSettingRequest+ (*TestEmailSettingResponse)(nil), // 27: bytebase.v1.TestEmailSettingResponse+ (*AppIMSetting_Slack)(nil), // 28: bytebase.v1.AppIMSetting.Slack+ (*AppIMSetting_Feishu)(nil), // 29: bytebase.v1.AppIMSetting.Feishu+ (*AppIMSetting_Wecom)(nil), // 30: bytebase.v1.AppIMSetting.Wecom+ (*AppIMSetting_Lark)(nil), // 31: bytebase.v1.AppIMSetting.Lark+ (*AppIMSetting_DingTalk)(nil), // 32: bytebase.v1.AppIMSetting.DingTalk+ (*AppIMSetting_Teams)(nil), // 33: bytebase.v1.AppIMSetting.Teams+ (*AppIMSetting_IMSetting)(nil), // 34: bytebase.v1.AppIMSetting.IMSetting+ (*WorkspaceProfileSetting_PasswordRestriction)(nil), // 35: bytebase.v1.WorkspaceProfileSetting.PasswordRestriction+ nil, // 36: bytebase.v1.SQLEditorThemeSetting.TokensEntry+ (*Announcement_AnnouncementTheme)(nil), // 37: bytebase.v1.Announcement.AnnouncementTheme+ (*WorkspaceApprovalSetting_Rule)(nil), // 38: bytebase.v1.WorkspaceApprovalSetting.Rule+ (*DataClassificationSetting_DataClassificationConfig)(nil), // 39: bytebase.v1.DataClassificationSetting.DataClassificationConfig+ (*DataClassificationSetting_DataClassificationConfig_Level)(nil), // 40: bytebase.v1.DataClassificationSetting.DataClassificationConfig.Level+ (*DataClassificationSetting_DataClassificationConfig_DataClassification)(nil), // 41: bytebase.v1.DataClassificationSetting.DataClassificationConfig.DataClassification+ nil, // 42: bytebase.v1.DataClassificationSetting.DataClassificationConfig.ClassificationEntry+ (*SemanticTypeSetting_SemanticType)(nil), // 43: bytebase.v1.SemanticTypeSetting.SemanticType+ (*Algorithm_FullMask)(nil), // 44: bytebase.v1.Algorithm.FullMask+ (*Algorithm_RangeMask)(nil), // 45: bytebase.v1.Algorithm.RangeMask+ (*Algorithm_MD5Mask)(nil), // 46: bytebase.v1.Algorithm.MD5Mask+ (*Algorithm_InnerOuterMask)(nil), // 47: bytebase.v1.Algorithm.InnerOuterMask+ (*Algorithm_RangeMask_Slice)(nil), // 48: bytebase.v1.Algorithm.RangeMask.Slice+ (*EnvironmentSetting_Environment)(nil), // 49: bytebase.v1.EnvironmentSetting.Environment+ nil, // 50: bytebase.v1.EnvironmentSetting.Environment.TagsEntry+ (*EmailSetting_SMTPConfig)(nil), // 51: bytebase.v1.EmailSetting.SMTPConfig+ (*fieldmaskpb.FieldMask)(nil), // 52: google.protobuf.FieldMask+ (*durationpb.Duration)(nil), // 53: google.protobuf.Duration+ (WebhookType)(0), // 54: bytebase.v1.WebhookType+ (*ApprovalTemplate)(nil), // 55: bytebase.v1.ApprovalTemplate+ (*expr.Expr)(nil), // 56: google.type.Expr}var file_v1_setting_service_proto_depIdxs = []int32{- 14, // 0: bytebase.v1.ListSettingsResponse.settings:type_name -> bytebase.v1.Setting- 14, // 1: bytebase.v1.GetSettingResponse.setting:type_name -> bytebase.v1.Setting- 14, // 2: bytebase.v1.UpdateSettingRequest.setting:type_name -> bytebase.v1.Setting- 50, // 3: bytebase.v1.UpdateSettingRequest.update_mask:type_name -> google.protobuf.FieldMask- 15, // 4: bytebase.v1.Setting.value:type_name -> bytebase.v1.SettingValue- 16, // 5: bytebase.v1.SettingValue.app_im:type_name -> bytebase.v1.AppIMSetting- 17, // 6: bytebase.v1.SettingValue.workspace_profile:type_name -> bytebase.v1.WorkspaceProfileSetting+ 13, // 0: bytebase.v1.ListSettingsResponse.settings:type_name -> bytebase.v1.Setting+ 13, // 1: bytebase.v1.GetSettingResponse.setting:type_name -> bytebase.v1.Setting+ 13, // 2: bytebase.v1.UpdateSettingRequest.setting:type_name -> bytebase.v1.Setting+ 52, // 3: bytebase.v1.UpdateSettingRequest.update_mask:type_name -> google.protobuf.FieldMask+ 14, // 4: bytebase.v1.Setting.value:type_name -> bytebase.v1.SettingValue+ 15, // 5: bytebase.v1.SettingValue.app_im:type_name -> bytebase.v1.AppIMSetting+ 16, // 6: bytebase.v1.SettingValue.workspace_profile:type_name -> bytebase.v1.WorkspaceProfileSetting19, // 7: bytebase.v1.SettingValue.workspace_approval:type_name -> bytebase.v1.WorkspaceApprovalSetting20, // 8: bytebase.v1.SettingValue.data_classification:type_name -> bytebase.v1.DataClassificationSetting21, // 9: bytebase.v1.SettingValue.semantic_type:type_name -> bytebase.v1.SemanticTypeSetting@@ -3632,60 +3732,62 @@ var file_v1_setting_service_proto_depIdxs = []int32{24, // 11: bytebase.v1.SettingValue.environment:type_name -> bytebase.v1.EnvironmentSetting25, // 12: bytebase.v1.SettingValue.email:type_name -> bytebase.v1.EmailSetting34, // 13: bytebase.v1.AppIMSetting.settings:type_name -> bytebase.v1.AppIMSetting.IMSetting- 51, // 14: bytebase.v1.WorkspaceProfileSetting.refresh_token_duration:type_name -> google.protobuf.Duration+ 53, // 14: bytebase.v1.WorkspaceProfileSetting.refresh_token_duration:type_name -> google.protobuf.Duration18, // 15: bytebase.v1.WorkspaceProfileSetting.announcement:type_name -> bytebase.v1.Announcement- 51, // 16: bytebase.v1.WorkspaceProfileSetting.maximum_role_expiration:type_name -> google.protobuf.Duration+ 53, // 16: bytebase.v1.WorkspaceProfileSetting.maximum_role_expiration:type_name -> google.protobuf.Duration0, // 17: bytebase.v1.WorkspaceProfileSetting.database_change_mode:type_name -> bytebase.v1.DatabaseChangeMode- 51, // 18: bytebase.v1.WorkspaceProfileSetting.inactive_session_timeout:type_name -> google.protobuf.Duration+ 53, // 18: bytebase.v1.WorkspaceProfileSetting.inactive_session_timeout:type_name -> google.protobuf.Duration35, // 19: bytebase.v1.WorkspaceProfileSetting.password_restriction:type_name -> bytebase.v1.WorkspaceProfileSetting.PasswordRestriction- 51, // 20: bytebase.v1.WorkspaceProfileSetting.access_token_duration:type_name -> google.protobuf.Duration- 51, // 21: bytebase.v1.WorkspaceProfileSetting.query_timeout:type_name -> google.protobuf.Duration- 2, // 22: bytebase.v1.Announcement.level:type_name -> bytebase.v1.Announcement.AlertLevel- 36, // 23: bytebase.v1.WorkspaceApprovalSetting.rules:type_name -> bytebase.v1.WorkspaceApprovalSetting.Rule- 37, // 24: bytebase.v1.DataClassificationSetting.configs:type_name -> bytebase.v1.DataClassificationSetting.DataClassificationConfig- 41, // 25: bytebase.v1.SemanticTypeSetting.types:type_name -> bytebase.v1.SemanticTypeSetting.SemanticType- 42, // 26: bytebase.v1.Algorithm.full_mask:type_name -> bytebase.v1.Algorithm.FullMask- 43, // 27: bytebase.v1.Algorithm.range_mask:type_name -> bytebase.v1.Algorithm.RangeMask- 44, // 28: bytebase.v1.Algorithm.md5_mask:type_name -> bytebase.v1.Algorithm.MD5Mask- 45, // 29: bytebase.v1.Algorithm.inner_outer_mask:type_name -> bytebase.v1.Algorithm.InnerOuterMask- 5, // 30: bytebase.v1.AISetting.provider:type_name -> bytebase.v1.AISetting.Provider- 47, // 31: bytebase.v1.EnvironmentSetting.environments:type_name -> bytebase.v1.EnvironmentSetting.Environment- 6, // 32: bytebase.v1.EmailSetting.type:type_name -> bytebase.v1.EmailSetting.Type- 49, // 33: bytebase.v1.EmailSetting.smtp:type_name -> bytebase.v1.EmailSetting.SMTPConfig- 25, // 34: bytebase.v1.TestEmailSettingRequest.email_setting:type_name -> bytebase.v1.EmailSetting- 52, // 35: bytebase.v1.AppIMSetting.IMSetting.type:type_name -> bytebase.v1.WebhookType- 28, // 36: bytebase.v1.AppIMSetting.IMSetting.slack:type_name -> bytebase.v1.AppIMSetting.Slack- 29, // 37: bytebase.v1.AppIMSetting.IMSetting.feishu:type_name -> bytebase.v1.AppIMSetting.Feishu- 30, // 38: bytebase.v1.AppIMSetting.IMSetting.wecom:type_name -> bytebase.v1.AppIMSetting.Wecom- 31, // 39: bytebase.v1.AppIMSetting.IMSetting.lark:type_name -> bytebase.v1.AppIMSetting.Lark- 32, // 40: bytebase.v1.AppIMSetting.IMSetting.dingtalk:type_name -> bytebase.v1.AppIMSetting.DingTalk- 33, // 41: bytebase.v1.AppIMSetting.IMSetting.teams:type_name -> bytebase.v1.AppIMSetting.Teams- 51, // 42: bytebase.v1.WorkspaceProfileSetting.PasswordRestriction.password_rotation:type_name -> google.protobuf.Duration- 53, // 43: bytebase.v1.WorkspaceApprovalSetting.Rule.template:type_name -> bytebase.v1.ApprovalTemplate- 54, // 44: bytebase.v1.WorkspaceApprovalSetting.Rule.condition:type_name -> google.type.Expr- 3, // 45: bytebase.v1.WorkspaceApprovalSetting.Rule.source:type_name -> bytebase.v1.WorkspaceApprovalSetting.Rule.Source- 38, // 46: bytebase.v1.DataClassificationSetting.DataClassificationConfig.levels:type_name -> bytebase.v1.DataClassificationSetting.DataClassificationConfig.Level- 40, // 47: bytebase.v1.DataClassificationSetting.DataClassificationConfig.classification:type_name -> bytebase.v1.DataClassificationSetting.DataClassificationConfig.ClassificationEntry- 39, // 48: bytebase.v1.DataClassificationSetting.DataClassificationConfig.ClassificationEntry.value:type_name -> bytebase.v1.DataClassificationSetting.DataClassificationConfig.DataClassification- 22, // 49: bytebase.v1.SemanticTypeSetting.SemanticType.algorithm:type_name -> bytebase.v1.Algorithm- 46, // 50: bytebase.v1.Algorithm.RangeMask.slices:type_name -> bytebase.v1.Algorithm.RangeMask.Slice- 4, // 51: bytebase.v1.Algorithm.InnerOuterMask.type:type_name -> bytebase.v1.Algorithm.InnerOuterMask.MaskType- 48, // 52: bytebase.v1.EnvironmentSetting.Environment.tags:type_name -> bytebase.v1.EnvironmentSetting.Environment.TagsEntry- 7, // 53: bytebase.v1.EmailSetting.SMTPConfig.encryption:type_name -> bytebase.v1.EmailSetting.SMTPConfig.Encryption- 8, // 54: bytebase.v1.EmailSetting.SMTPConfig.authentication:type_name -> bytebase.v1.EmailSetting.SMTPConfig.Authentication- 9, // 55: bytebase.v1.SettingService.ListSettings:input_type -> bytebase.v1.ListSettingsRequest- 11, // 56: bytebase.v1.SettingService.GetSetting:input_type -> bytebase.v1.GetSettingRequest- 13, // 57: bytebase.v1.SettingService.UpdateSetting:input_type -> bytebase.v1.UpdateSettingRequest- 26, // 58: bytebase.v1.SettingService.TestEmailSetting:input_type -> bytebase.v1.TestEmailSettingRequest- 10, // 59: bytebase.v1.SettingService.ListSettings:output_type -> bytebase.v1.ListSettingsResponse- 14, // 60: bytebase.v1.SettingService.GetSetting:output_type -> bytebase.v1.Setting- 14, // 61: bytebase.v1.SettingService.UpdateSetting:output_type -> bytebase.v1.Setting- 27, // 62: bytebase.v1.SettingService.TestEmailSetting:output_type -> bytebase.v1.TestEmailSettingResponse- 59, // [59:63] is the sub-list for method output_type- 55, // [55:59] 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+ 53, // 20: bytebase.v1.WorkspaceProfileSetting.access_token_duration:type_name -> google.protobuf.Duration+ 53, // 21: bytebase.v1.WorkspaceProfileSetting.query_timeout:type_name -> google.protobuf.Duration+ 17, // 22: bytebase.v1.WorkspaceProfileSetting.sql_editor_custom_theme:type_name -> bytebase.v1.SQLEditorThemeSetting+ 36, // 23: bytebase.v1.SQLEditorThemeSetting.tokens:type_name -> bytebase.v1.SQLEditorThemeSetting.TokensEntry+ 37, // 24: bytebase.v1.Announcement.theme:type_name -> bytebase.v1.Announcement.AnnouncementTheme+ 38, // 25: bytebase.v1.WorkspaceApprovalSetting.rules:type_name -> bytebase.v1.WorkspaceApprovalSetting.Rule+ 39, // 26: bytebase.v1.DataClassificationSetting.configs:type_name -> bytebase.v1.DataClassificationSetting.DataClassificationConfig+ 43, // 27: bytebase.v1.SemanticTypeSetting.types:type_name -> bytebase.v1.SemanticTypeSetting.SemanticType+ 44, // 28: bytebase.v1.Algorithm.full_mask:type_name -> bytebase.v1.Algorithm.FullMask+ 45, // 29: bytebase.v1.Algorithm.range_mask:type_name -> bytebase.v1.Algorithm.RangeMask+ 46, // 30: bytebase.v1.Algorithm.md5_mask:type_name -> bytebase.v1.Algorithm.MD5Mask+ 47, // 31: bytebase.v1.Algorithm.inner_outer_mask:type_name -> bytebase.v1.Algorithm.InnerOuterMask+ 4, // 32: bytebase.v1.AISetting.provider:type_name -> bytebase.v1.AISetting.Provider+ 49, // 33: bytebase.v1.EnvironmentSetting.environments:type_name -> bytebase.v1.EnvironmentSetting.Environment+ 5, // 34: bytebase.v1.EmailSetting.type:type_name -> bytebase.v1.EmailSetting.Type+ 51, // 35: bytebase.v1.EmailSetting.smtp:type_name -> bytebase.v1.EmailSetting.SMTPConfig+ 25, // 36: bytebase.v1.TestEmailSettingRequest.email_setting:type_name -> bytebase.v1.EmailSetting+ 54, // 37: bytebase.v1.AppIMSetting.IMSetting.type:type_name -> bytebase.v1.WebhookType+ 28, // 38: bytebase.v1.AppIMSetting.IMSetting.slack:type_name -> bytebase.v1.AppIMSetting.Slack+ 29, // 39: bytebase.v1.AppIMSetting.IMSetting.feishu:type_name -> bytebase.v1.AppIMSetting.Feishu+ 30, // 40: bytebase.v1.AppIMSetting.IMSetting.wecom:type_name -> bytebase.v1.AppIMSetting.Wecom+ 31, // 41: bytebase.v1.AppIMSetting.IMSetting.lark:type_name -> bytebase.v1.AppIMSetting.Lark+ 32, // 42: bytebase.v1.AppIMSetting.IMSetting.dingtalk:type_name -> bytebase.v1.AppIMSetting.DingTalk+ 33, // 43: bytebase.v1.AppIMSetting.IMSetting.teams:type_name -> bytebase.v1.AppIMSetting.Teams+ 53, // 44: bytebase.v1.WorkspaceProfileSetting.PasswordRestriction.password_rotation:type_name -> google.protobuf.Duration+ 55, // 45: bytebase.v1.WorkspaceApprovalSetting.Rule.template:type_name -> bytebase.v1.ApprovalTemplate+ 56, // 46: bytebase.v1.WorkspaceApprovalSetting.Rule.condition:type_name -> google.type.Expr+ 2, // 47: bytebase.v1.WorkspaceApprovalSetting.Rule.source:type_name -> bytebase.v1.WorkspaceApprovalSetting.Rule.Source+ 40, // 48: bytebase.v1.DataClassificationSetting.DataClassificationConfig.levels:type_name -> bytebase.v1.DataClassificationSetting.DataClassificationConfig.Level+ 42, // 49: bytebase.v1.DataClassificationSetting.DataClassificationConfig.classification:type_name -> bytebase.v1.DataClassificationSetting.DataClassificationConfig.ClassificationEntry+ 41, // 50: bytebase.v1.DataClassificationSetting.DataClassificationConfig.ClassificationEntry.value:type_name -> bytebase.v1.DataClassificationSetting.DataClassificationConfig.DataClassification+ 22, // 51: bytebase.v1.SemanticTypeSetting.SemanticType.algorithm:type_name -> bytebase.v1.Algorithm+ 48, // 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+ 50, // 54: bytebase.v1.EnvironmentSetting.Environment.tags:type_name -> bytebase.v1.EnvironmentSetting.Environment.TagsEntry+ 6, // 55: bytebase.v1.EmailSetting.SMTPConfig.encryption:type_name -> bytebase.v1.EmailSetting.SMTPConfig.Encryption+ 7, // 56: bytebase.v1.EmailSetting.SMTPConfig.authentication:type_name -> bytebase.v1.EmailSetting.SMTPConfig.Authentication+ 8, // 57: bytebase.v1.SettingService.ListSettings:input_type -> bytebase.v1.ListSettingsRequest+ 10, // 58: bytebase.v1.SettingService.GetSetting:input_type -> bytebase.v1.GetSettingRequest+ 12, // 59: bytebase.v1.SettingService.UpdateSetting:input_type -> bytebase.v1.UpdateSettingRequest+ 26, // 60: bytebase.v1.SettingService.TestEmailSetting:input_type -> bytebase.v1.TestEmailSettingRequest+ 9, // 61: bytebase.v1.SettingService.ListSettings:output_type -> bytebase.v1.ListSettingsResponse+ 13, // 62: bytebase.v1.SettingService.GetSetting:output_type -> bytebase.v1.Setting+ 13, // 63: bytebase.v1.SettingService.UpdateSetting:output_type -> bytebase.v1.Setting+ 27, // 64: bytebase.v1.SettingService.TestEmailSetting:output_type -> bytebase.v1.TestEmailSettingResponse+ 61, // [61:65] is the sub-list for method output_type+ 57, // [57:61] 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() }@@ -3706,16 +3808,16 @@ func file_v1_setting_service_proto_init() {(*SettingValue_Environment)(nil),(*SettingValue_Email)(nil),}- file_v1_setting_service_proto_msgTypes[13].OneofWrappers = []any{+ file_v1_setting_service_proto_msgTypes[14].OneofWrappers = []any{(*Algorithm_FullMask_)(nil),(*Algorithm_RangeMask_)(nil),(*Algorithm_Md5Mask)(nil),(*Algorithm_InnerOuterMask_)(nil),}- file_v1_setting_service_proto_msgTypes[16].OneofWrappers = []any{+ file_v1_setting_service_proto_msgTypes[17].OneofWrappers = []any{(*EmailSetting_Smtp)(nil),}- file_v1_setting_service_proto_msgTypes[25].OneofWrappers = []any{+ file_v1_setting_service_proto_msgTypes[26].OneofWrappers = []any{(*AppIMSetting_IMSetting_Slack)(nil),(*AppIMSetting_IMSetting_Feishu)(nil),(*AppIMSetting_IMSetting_Wecom)(nil),@@ -3723,14 +3825,14 @@ func file_v1_setting_service_proto_init() {(*AppIMSetting_IMSetting_Dingtalk)(nil),(*AppIMSetting_IMSetting_Teams)(nil),}- file_v1_setting_service_proto_msgTypes[30].OneofWrappers = []any{}+ file_v1_setting_service_proto_msgTypes[33].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: 9,- NumMessages: 41,+ NumEnums: 8,+ NumMessages: 44,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.goindex 1f16747a62..ca200347fd 100644--- a/backend/generated-go/v1/setting_service_equal.pb.go+++ b/backend/generated-go/v1/setting_service_equal.pb.go@@ -396,25 +396,78 @@ func (x *WorkspaceProfileSetting) Equal(y *WorkspaceProfileSetting) bool {if x.AllowEmailCodeSignin != y.AllowEmailCodeSignin {return false}+ if x.SqlEditorThemeId != y.SqlEditorThemeId {+ return false+ }+ if !x.SqlEditorCustomTheme.Equal(y.SqlEditorCustomTheme) {+ return false+ }return true}-func (x *Announcement) Equal(y *Announcement) bool {+func (x *SQLEditorThemeSetting) Equal(y *SQLEditorThemeSetting) bool {if x == y {return true}if x == nil || y == nil {return x == nil && y == nil}- if x.Level != y.Level {+ if x.Id != y.Id {+ return false+ }+ if x.Name != y.Name {+ return false+ }+ if x.MonacoBase != y.MonacoBase {+ return false+ }+ if len(x.Tokens) != len(y.Tokens) {+ return false+ }+ for k := range x.Tokens {+ _, ok := y.Tokens[k]+ if !ok {+ return false+ }+ if x.Tokens[k] != y.Tokens[k] {+ return false+ }+ }+ return true+}++func (x *Announcement_AnnouncementTheme) Equal(y *Announcement_AnnouncementTheme) bool {+ if x == y {+ return true+ }+ if x == nil || y == nil {+ return x == nil && y == nil+ }+ if x.Background != y.Background {return false}if x.Text != y.Text {return false}+ return true+}++func (x *Announcement) Equal(y *Announcement) bool {+ if x == y {+ return true+ }+ if x == nil || y == nil {+ return x == nil && y == nil+ }+ if x.Text != y.Text {+ return false+ }if x.Link != y.Link {return false}+ if !x.Theme.Equal(y.Theme) {+ return false+ }return true}diff --git a/backend/migrator/migration/3.20/0000##migrate_announcement_level_to_theme.sql b/backend/migrator/migration/3.20/0000##migrate_announcement_level_to_theme.sqlnew file mode 100644index 0000000000..aa123539aa--- /dev/null+++ b/backend/migrator/migration/3.20/0000##migrate_announcement_level_to_theme.sql@@ -0,0 +1,29 @@+-- Convert the deprecated announcement `level` enum into the new `theme` colors+-- (background/text "r g b"), then drop the obsolete `level` key. Levels map to+-- the previous banner colors: INFO=--color-info, WARNING=--color-warning,+-- CRITICAL=--color-error; text was always white.+--+-- Safety:+-- * Only touches a WORKSPACE_PROFILE row whose value has a real announcement+-- OBJECT carrying a `level` (the `? 'level'` test is false for a missing /+-- null / scalar announcement), so it never fabricates an announcement.+-- * Idempotent: the run removes `level` and the WHERE also excludes rows that+-- already have a `theme`, so a re-run matches nothing (and never overwrites+-- an existing theme).+UPDATE setting+SET value = jsonb_set(+ value #- '{announcement,level}',+ '{announcement,theme}',+ CASE+ WHEN value->'announcement'->>'level' IN ('WARNING', '2')+ THEN jsonb_build_object('background', '245 158 11', 'text', '255 255 255')+ WHEN value->'announcement'->>'level' IN ('CRITICAL', '3')+ THEN jsonb_build_object('background', '220 38 38', 'text', '255 255 255')+ ELSE jsonb_build_object('background', '37 99 235', 'text', '255 255 255')+ END,+ true+)+WHERE name = 'WORKSPACE_PROFILE'+ AND value ? 'announcement'+ AND value->'announcement' ? 'level'+ AND NOT (value->'announcement' ? 'theme');diff --git a/backend/migrator/migrator_test.go b/backend/migrator/migrator_test.goindex 17941ea732..a9440b3211 100644--- a/backend/migrator/migrator_test.go+++ b/backend/migrator/migrator_test.go@@ -15,8 +15,8 @@ import (func TestLatestVersion(t *testing.T) {files, err := getSortedVersionedFiles()require.NoError(t, err)- require.Equal(t, semver.MustParse("3.19.1"), *files[len(files)-1].version)- require.Equal(t, "migration/3.19/0001##mirror_export_data_approval_to_request_access.sql", files[len(files)-1].path)+ require.Equal(t, semver.MustParse("3.20.0"), *files[len(files)-1].version)+ require.Equal(t, "migration/3.20/0000##migrate_announcement_level_to_theme.sql", files[len(files)-1].path)}func TestVersionUnique(t *testing.T) {diff --git a/frontend/scripts/check-react-i18n.mjs b/frontend/scripts/check-react-i18n.mjsindex ee1db80fbf..4d4d42af67 100644--- a/frontend/scripts/check-react-i18n.mjs+++ b/frontend/scripts/check-react-i18n.mjs@@ -30,6 +30,9 @@ const DYNAMIC_PREFIXES = ["subscription.plan.","subscription.purchase.cancel-dialog.reason.","settings.sensitive-data.algorithms.",+ // SQL Editor theme anchor labels, rendered via t(`…anchor.${key}`) over a+ // key list in ThemeAnchorEditor.tsx, not as literal t("…") calls.+ "settings.general.workspace.sql-editor-theme.anchor.","instance.selected-n-instances","settings.sidebar.",// Stored as messageKey string literals and translated via t(messageKey) atdiff --git a/frontend/src/locales/en-US.json b/frontend/src/locales/en-US.jsonindex 5c6e4e95fb..35a2de9fc5 100644--- a/frontend/src/locales/en-US.json+++ b/frontend/src/locales/en-US.json@@ -2157,7 +2157,6 @@"self": "Announcement"},"announcement-alert-level": {- "description": "Level","field": {"critical": "Critical","info": "Normal",@@ -2169,6 +2168,13 @@"placeholder": "Input announcement title","self": "Title"},+ "announcement-theme": {+ "background": "Background",+ "custom": "Custom",+ "description": "Choose a built-in theme or define custom colors for the announcement banner.",+ "self": "Theme",+ "text": "Text"+ },"audit-log-stdout": {"description": "Output structured JSON audit logs to stdout for ingestion by log aggregators (Splunk, ELK, Datadog, Loki). Requires TEAM or ENTERPRISE license.","enable": "Enable audit logging to stdout"@@ -2304,6 +2310,23 @@},"security": "Security","select-logo": "Upload a file",+ "sql-editor-theme": {+ "anchor": {+ "accent": "Accent",+ "accent-tip": "Buttons, active tabs, links, and selections.",+ "background": "Background",+ "background-tip": "The main editor canvas background.",+ "border": "Border",+ "border-tip": "Dividers and outlines around inputs, tables, and panels.",+ "text": "Text",+ "text-tip": "Primary text and control color."+ },+ "custom": "Custom",+ "description": "Choose a built-in theme or define a custom one for the workspace SQL Editor.",+ "editor-theme": "Editor syntax",+ "editor-theme-tip": "Syntax highlighting palette for the code editor.",+ "self": "SQL Editor theme"+ },"title": "Workspace title","watermark": {"description": "Display watermarks on pages, including username, ID and email.",@@ -2872,9 +2895,6 @@"table-empty-placeholder": "Click Run to execute the query.","table-view": "Table view","text-format": "Text format",- "theme": {- "self": "Theme"- },"unable-to-connect-database": "Unable to connect to database {{name}}","upload-file": "Upload file","url-copied-to-clipboard": "The URL is copied to your clipboard",diff --git a/frontend/src/locales/es-ES.json b/frontend/src/locales/es-ES.jsonindex ef286f5302..e15e6cd27e 100644--- a/frontend/src/locales/es-ES.json+++ b/frontend/src/locales/es-ES.json@@ -2157,7 +2157,6 @@"self": "Anuncio"},"announcement-alert-level": {- "description": "Nivel","field": {"critical": "Importante","info": "Común",@@ -2169,6 +2168,13 @@"placeholder": "Título del anuncio de entrada","self": "Título"},+ "announcement-theme": {+ "background": "Fondo",+ "custom": "Personalizado",+ "description": "Elija un tema integrado o defina colores personalizados para el banner del anuncio.",+ "self": "Tema",+ "text": "Texto"+ },"audit-log-stdout": {"description": "Generar registros de auditoría JSON estructurados en la salida estándar para su ingesta por agregadores de registros (Splunk, ELK, Datadog, Loki). Requiere licencia TEAM o ENTERPRISE.","enable": "Habilitar el registro de auditoría en la salida estándar"@@ -2304,6 +2310,23 @@},"security": "Seguridad","select-logo": "Subir un archivo",+ "sql-editor-theme": {+ "anchor": {+ "accent": "Acento",+ "accent-tip": "Botones, pestañas activas, enlaces y selecciones.",+ "background": "Fondo",+ "background-tip": "El fondo principal del lienzo del editor.",+ "border": "Borde",+ "border-tip": "Divisores y bordes de campos, tablas y paneles.",+ "text": "Texto",+ "text-tip": "Color principal del texto y los controles."+ },+ "custom": "Personalizado",+ "description": "Elija un tema integrado o defina uno personalizado para el Editor SQL del espacio de trabajo.",+ "editor-theme": "Sintaxis del editor",+ "editor-theme-tip": "Paleta de resaltado de sintaxis del editor de código.",+ "self": "Tema del Editor SQL"+ },"title": "Nombre del espacio de trabajo","watermark": {"description": "Mostrar marcas de agua en las páginas, incluyendo el nombre de usuario, el ID y el correo electrónico.",@@ -2872,9 +2895,6 @@"table-empty-placeholder": "Haga clic en Ejecutar para ejecutar la consulta.","table-view": "Vista de tabla","text-format": "Formato de texto",- "theme": {- "self": "Tema"- },"unable-to-connect-database": "No se puede conectar a la base de datos {{name}}","upload-file": "Subir archivo","url-copied-to-clipboard": "La URL se copia al portapapeles.",diff --git a/frontend/src/locales/ja-JP.json b/frontend/src/locales/ja-JP.jsonindex dd49afbb5c..0827d654c2 100644--- a/frontend/src/locales/ja-JP.json+++ b/frontend/src/locales/ja-JP.json@@ -2157,7 +2157,6 @@"self": "お知らせ"},"announcement-alert-level": {- "description": "レベル","field": {"critical": "重要","info": "情報",@@ -2169,6 +2168,13 @@"placeholder": "お知らせのタイトルを入力してください","self": "タイトル"},+ "announcement-theme": {+ "background": "背景",+ "custom": "カスタム",+ "description": "組み込みのテーマを選択するか、お知らせバナーのカスタムカラーを定義します。",+ "self": "テーマ",+ "text": "テキスト"+ },"audit-log-stdout": {"description": "構造化されたJSON監査ログを標準出力に出力し、ログアグリゲーター(Splunk、ELK、Datadog、Loki)で取り込めるようにします。TEAMまたはENTERPRISEライセンスが必要です。","enable": "監査ログの標準出力への出力を有効にする"@@ -2304,6 +2310,23 @@},"security": "セキュリティ","select-logo": "選ぶ",+ "sql-editor-theme": {+ "anchor": {+ "accent": "アクセント",+ "accent-tip": "ボタン、アクティブなタブ、リンク、選択項目。",+ "background": "背景",+ "background-tip": "エディター本体の背景色。",+ "border": "境界線",+ "border-tip": "入力欄・表・パネルの区切り線と枠線。",+ "text": "テキスト",+ "text-tip": "主要なテキストとコントロールの色。"+ },+ "custom": "カスタム",+ "description": "ワークスペースの SQL エディター用に、組み込みテーマを選択するかカスタムテーマを定義します。",+ "editor-theme": "エディター構文",+ "editor-theme-tip": "コードエディターの構文ハイライト配色。",+ "self": "SQL エディターのテーマ"+ },"title": "ワークスペース名","watermark": {"description": "ユーザー名、ID、メールアドレスを含むページにウォーターマークを表示します。",@@ -2872,9 +2895,6 @@"table-empty-placeholder": "「実行」をクリックしてクエリを実行します。","table-view": "テーブルビュー","text-format": "テキスト形式",- "theme": {- "self": "テーマ"- },"unable-to-connect-database": "データベース {{name}} に接続できません","upload-file": "ファイルをアップロードする","url-copied-to-clipboard": "URLがクリップボードにコピーされました",diff --git a/frontend/src/locales/vi-VN.json b/frontend/src/locales/vi-VN.jsonindex a651fd7d24..468fd1e274 100644--- a/frontend/src/locales/vi-VN.json+++ b/frontend/src/locales/vi-VN.json@@ -2157,7 +2157,6 @@"self": "Thông báo"},"announcement-alert-level": {- "description": "Cấp độ","field": {"critical": "Quan trọng","info": "Bình thường",@@ -2169,6 +2168,13 @@"placeholder": "Nhập tiêu đề thông báo","self": "Tiêu đề"},+ "announcement-theme": {+ "background": "Nền",+ "custom": "Tùy chỉnh",+ "description": "Chọn một chủ đề có sẵn hoặc xác định màu sắc tùy chỉnh cho biểu ngữ thông báo.",+ "self": "Chủ đề",+ "text": "Văn bản"+ },"audit-log-stdout": {"description": "Xuất nhật ký kiểm toán JSON có cấu trúc vào đầu ra chuẩn để thu thập bởi các bộ tổng hợp nhật ký (Splunk, ELK, Datadog, Loki). Yêu cầu giấy phép TEAM hoặc ENTERPRISE.","enable": "Bật ghi nhật ký kiểm toán vào đầu ra chuẩn"@@ -2304,6 +2310,23 @@},"security": "Bảo mật","select-logo": "Tải lên một tệp",+ "sql-editor-theme": {+ "anchor": {+ "accent": "Màu nhấn",+ "accent-tip": "Nút, tab đang chọn, liên kết và vùng chọn.",+ "background": "Nền",+ "background-tip": "Màu nền chính của trình soạn thảo.",+ "border": "Viền",+ "border-tip": "Đường phân cách và viền của ô nhập, bảng và bảng điều khiển.",+ "text": "Văn bản",+ "text-tip": "Màu chữ và điều khiển chính."+ },+ "custom": "Tùy chỉnh",+ "description": "Chọn một giao diện có sẵn hoặc tự định nghĩa giao diện cho SQL Editor của không gian làm việc.",+ "editor-theme": "Cú pháp trình soạn thảo",+ "editor-theme-tip": "Bảng màu tô sáng cú pháp của trình soạn thảo mã.",+ "self": "Giao diện SQL Editor"+ },"title": "Tên không gian làm việc","watermark": {"description": "Hiển thị hình mờ trên các trang, bao gồm tên người dùng, ID và email.",@@ -2872,9 +2895,6 @@"table-empty-placeholder": "Nhấp vào Chạy để thực hiện truy vấn.","table-view": "Chế độ xem bảng","text-format": "Định dạng văn bản",- "theme": {- "self": "Giao diện"- },"unable-to-connect-database": "Không thể kết nối đến cơ sở dữ liệu {{name}}","upload-file": "Tải lên tệp","url-copied-to-clipboard": "URL đã được sao chép vào bảng nhớ tạm của bạn",diff --git a/frontend/src/locales/zh-CN.json b/frontend/src/locales/zh-CN.jsonindex 16f740f70a..7dae841e10 100644--- a/frontend/src/locales/zh-CN.json+++ b/frontend/src/locales/zh-CN.json@@ -2157,7 +2157,6 @@"self": "公告"},"announcement-alert-level": {- "description": "等级","field": {"critical": "重要","info": "普通",@@ -2169,6 +2168,13 @@"placeholder": "输入公告标题","self": "标题"},+ "announcement-theme": {+ "background": "背景",+ "custom": "自定义",+ "description": "选择内置主题或为公告横幅定义自定义颜色。",+ "self": "主题",+ "text": "文字"+ },"audit-log-stdout": {"description": "将结构化的 JSON 审计日志输出到标准输出,以便日志聚合器(Splunk、ELK、Datadog、Loki)摄取。需要 TEAM 或 ENTERPRISE 许可证。","enable": "启用审计日志输出到标准输出"@@ -2304,6 +2310,23 @@},"security": "安全","select-logo": "选择",+ "sql-editor-theme": {+ "anchor": {+ "accent": "强调色",+ "accent-tip": "按钮、当前标签页、链接和选中项。",+ "background": "背景",+ "background-tip": "编辑器主画布的背景色。",+ "border": "边框",+ "border-tip": "输入框、表格和面板的分隔线与边框。",+ "text": "文本",+ "text-tip": "主要文字与控件颜色。"+ },+ "custom": "自定义",+ "description": "为工作空间的 SQL 编辑器选择内置主题或自定义主题。",+ "editor-theme": "编辑器语法",+ "editor-theme-tip": "代码编辑器的语法高亮配色。",+ "self": "SQL 编辑器主题"+ },"title": "工作空间名称","watermark": {"description": "在页面上显示水印,包含用户名、ID 和 Email。",@@ -2872,9 +2895,6 @@"table-empty-placeholder": "点击 \"运行\" 执行查询","table-view": "表格视图","text-format": "文本格式",- "theme": {- "self": "主题"- },"unable-to-connect-database": "无法连接到数据库 {{name}}","upload-file": "上传文件","url-copied-to-clipboard": "URL 已复制到剪贴板",diff --git a/frontend/src/react/components/AnnouncementBanner.tsx b/frontend/src/react/components/AnnouncementBanner.tsxnew file mode 100644index 0000000000..6bed1adbe1--- /dev/null+++ b/frontend/src/react/components/AnnouncementBanner.tsx@@ -0,0 +1,75 @@+import { ArrowRight } from "lucide-react";+import { cn } from "@/react/lib/utils";++interface AnnouncementBannerProps {+ /** Banner message. */+ text: string;+ /** When set, an arrow affordance is shown next to the text. */+ link?: string;+ /** Background color as an `"r g b"` triple. */+ background: string;+ /** Text color as an `"r g b"` triple. */+ textColor: string;+ /**+ * When true (default), the link navigates (`<a target="_blank">`). Pass+ * `false` for a static, non-navigating render — e.g. the settings preview.+ */+ interactive?: boolean;+ /** Extra container classes (e.g. `rounded` for a boxed preview). */+ className?: string;+}++/**+ * Presentational announcement banner shared by the real workspace banner+ * (`BannersWrapper`) and the settings theme preview, so the two stay in visual+ * sync. It only renders — callers own fetching, feature-gating, and the+ * empty-text guard.+ */+export function AnnouncementBanner({+ text,+ link,+ background,+ textColor,+ interactive = true,+ className,+}: Readonly<AnnouncementBannerProps>) {+ const linkBody = (+ <>+ <span className="px-1">{text}</span>+ <ArrowRight className="mr-3 size-5" />+ </>+ );++ // Plain text by default; with a link, navigate (real banner) or stay static+ // (preview). Kept as if/else to avoid a nested JSX ternary.+ let content = <span>{text}</span>;+ if (link) {+ content = interactive ? (+ <a+ href={link}+ target="_blank"+ rel="noreferrer"+ className="flex flex-row items-center hover:underline hover:opacity-90"+ >+ {linkBody}+ </a>+ ) : (+ <span className="flex flex-row items-center">{linkBody}</span>+ );+ }++ return (+ <div+ className={cn(+ "mx-auto flex w-full flex-row flex-wrap justify-center px-3 py-1 text-center font-medium",+ className+ )}+ style={{+ backgroundColor: `rgb(${background})`,+ color: `rgb(${textColor})`,+ }}+ >+ {content}+ </div>+ );+}diff --git a/frontend/src/react/components/BannersWrapper.test.tsx b/frontend/src/react/components/BannersWrapper.test.tsxindex 9668be3cfc..45f44f9144 100644--- a/frontend/src/react/components/BannersWrapper.test.tsx+++ b/frontend/src/react/components/BannersWrapper.test.tsx@@ -2,10 +2,7 @@ import type { ReactElement, ReactNode } from "react";import { act } from "react";import { createRoot } from "react-dom/client";import { beforeEach, describe, expect, test, vi } from "vitest";-import {- Announcement_AlertLevel,- type WorkspaceProfileSetting,-} from "@/types/proto-es/v1/setting_service_pb";+import type { WorkspaceProfileSetting } from "@/types/proto-es/v1/setting_service_pb";import { PlanType } from "@/types/proto-es/v1/subscription_service_pb";(@@ -210,11 +207,11 @@ describe("BannersWrapper", () => {unmount();});- test("renders announcement only when feature is available", () => {+ test("renders announcement with stored inline theme when feature is available", () => {mocks.usePlanFeature.mockReturnValue(true);mocks.useWorkspaceProfile.mockReturnValue({announcement: {- level: Announcement_AlertLevel.INFO,+ theme: { background: "0 83 226", text: "255 255 255" },link: "example.com/path",text: "Maintenance window",},@@ -222,8 +219,32 @@ describe("BannersWrapper", () => {const { container, unmount } = renderIntoContainer(<BannersWrapper />);const link = container.querySelector("a");+ const banner = Array.from(container.querySelectorAll("div")).find((el) =>+ el.textContent?.includes("Maintenance window")+ );expect(container.textContent).toContain("Maintenance window");expect(link?.getAttribute("href")).toBe("https://example.com/path");+ expect(banner?.style.backgroundColor).toBe("rgb(0, 83, 226)");+ expect(banner?.style.color).toBe("rgb(255, 255, 255)");+ unmount();+ });++ test("falls back to the info preset when an announcement has no theme", () => {+ mocks.usePlanFeature.mockReturnValue(true);+ mocks.useWorkspaceProfile.mockReturnValue({+ announcement: {+ link: "",+ text: "Untheméd banner",+ },+ } as WorkspaceProfileSetting);+ const { container, unmount } = renderIntoContainer(<BannersWrapper />);++ const banner = Array.from(container.querySelectorAll("div")).find((el) =>+ el.textContent?.includes("Untheméd banner")+ );+ // info preset background: "37 99 235", white text.+ expect(banner?.style.backgroundColor).toBe("rgb(37, 99, 235)");+ expect(banner?.style.color).toBe("rgb(255, 255, 255)");unmount();});diff --git a/frontend/src/react/components/BannersWrapper.tsx b/frontend/src/react/components/BannersWrapper.tsxindex fd40c957b8..b80e21cbfe 100644--- a/frontend/src/react/components/BannersWrapper.tsx+++ b/frontend/src/react/components/BannersWrapper.tsx@@ -1,13 +1,8 @@-import {- AlertCircle,- ArrowRight,- ShoppingCart,- Sparkles,- Wrench,- X,-} from "lucide-react";+import { AlertCircle, ShoppingCart, Sparkles, Wrench, X } from "lucide-react";import { useMemo, useState } from "react";import { Trans, useTranslation } from "react-i18next";+import { AnnouncementBanner } from "@/react/components/AnnouncementBanner";+import { resolveAnnouncementTheme } from "@/react/components/announcement-theme";import { RouterLink } from "@/react/components/RouterLink";import { Button, buttonVariants } from "@/react/components/ui/button";import {@@ -27,10 +22,6 @@ import {SETTING_ROUTE_WORKSPACE_SUBSCRIPTION,} from "@/react/router";import { useAppStore } from "@/react/stores/app";-import {- type Announcement,- Announcement_AlertLevel,-} from "@/types/proto-es/v1/setting_service_pb";import {PlanFeature,PlanType,@@ -176,17 +167,6 @@ function BannerSubscription() {);}-function announcementColors(level: Announcement["level"] | undefined) {- switch (level) {- case Announcement_AlertLevel.WARNING:- return "bg-warning hover:bg-warning-hover";- case Announcement_AlertLevel.CRITICAL:- return "bg-error hover:bg-error-hover";- default:- return "bg-info hover:bg-info-hover";- }-}-function BannerAnnouncement() {const workspaceProfile = useWorkspaceProfile();const hasAnnouncementFeature = usePlanFeature(@@ -196,29 +176,18 @@ function BannerAnnouncement() {const text = announcement?.text ?? "";const rawLink = announcement?.link ?? "";const link = rawLink ? urlfy(rawLink) : "";+ const { background, text: textColor } =+ resolveAnnouncementTheme(announcement);if (!text || !hasAnnouncementFeature) return null;return (- <div- className={`mx-auto flex w-full flex-row flex-wrap justify-center px-3 py-1 text-center font-medium text-white ${announcementColors(- announcement?.level- )}`}- >- {link ? (- <a- href={link}- target="_blank"- rel="noreferrer"- className="flex flex-row items-center hover:underline"- >- <p className="px-1">{text}</p>- <ArrowRight className="mr-3 size-5" />- </a>- ) : (- <p>{text}</p>- )}- </div>+ <AnnouncementBanner+ text={text}+ link={link}+ background={background}+ textColor={textColor}+ />);}diff --git a/frontend/src/react/components/announcement-theme.ts b/frontend/src/react/components/announcement-theme.tsnew file mode 100644index 0000000000..acfdbc0b64--- /dev/null+++ b/frontend/src/react/components/announcement-theme.ts@@ -0,0 +1,75 @@+import type { Announcement } from "@/types/proto-es/v1/setting_service_pb";+import { hexToRgb, rgbToHex } from "@/utils/css";++export interface AnnouncementTheme {+ background: string;+ text: string;+}++export type AnnouncementPresetKey = "info" | "warning" | "critical";++/**+ * Built-in presets are a frontend-only concept that seed the two banner colors.+ * Each value is an `"r g b"` triple. The backgrounds match+ * `--color-info` / `--color-warning` / `--color-error`, all with white text.+ */+export const ANNOUNCEMENT_PRESETS: Record<+ AnnouncementPresetKey,+ AnnouncementTheme+> = {+ info: { background: "37 99 235", text: "255 255 255" },+ warning: { background: "245 158 11", text: "255 255 255" },+ critical: { background: "220 38 38", text: "255 255 255" },+};++export const ANNOUNCEMENT_PRESET_KEYS: AnnouncementPresetKey[] = [+ "info",+ "warning",+ "critical",+];++/**+ * Resolves the banner theme for an announcement.+ *+ * Prefers the stored `theme`, defaulting to the `info` preset.+ */+export function resolveAnnouncementTheme(+ announcement: Pick<Announcement, "theme"> | undefined+): AnnouncementTheme {+ if (announcement?.theme?.background) {+ return {+ background: announcement.theme.background,+ text: announcement.theme.text,+ };+ }+ return ANNOUNCEMENT_PRESETS.info;+}++/**+ * Returns the preset key whose theme exactly match the given theme, or+ * `"custom"` when no preset matches. Used by the admin UI to highlight the+ * selected option.+ */+export function matchPresetKey(+ theme: AnnouncementTheme+): AnnouncementPresetKey | "custom" {+ for (const key of ANNOUNCEMENT_PRESET_KEYS) {+ const preset = ANNOUNCEMENT_PRESETS[key];+ if (preset.background === theme.background && preset.text === theme.text) {+ return key;+ }+ }+ return "custom";+}++/** Converts an `"r g b"` triple to a `#rrggbb` hex string for color inputs. */+export function tripleToHex(triple: string): string {+ const parts = triple.trim().split(/\s+/).map(Number);+ const [r, g, b] = [parts[0] ?? 0, parts[1] ?? 0, parts[2] ?? 0];+ return rgbToHex(r, g, b);+}++/** Converts a `#rrggbb` hex string to an `"r g b"` triple for storage. */+export function hexToTriple(hex: string): string {+ return hexToRgb(hex).join(" ");+}diff --git a/frontend/src/react/components/monaco/core.test.ts b/frontend/src/react/components/monaco/core.test.tsindex aae310d026..00ae8d9efe 100644--- a/frontend/src/react/components/monaco/core.test.ts+++ b/frontend/src/react/components/monaco/core.test.ts@@ -20,12 +20,6 @@ const mocks = vi.hoisted(() => {editor: {create: vi.fn(() => editor),createDiffEditor: vi.fn(() => diffEditor),- // Simulate the codingame VSCode theme service that silently rejects- // custom themes in some runtime modes: defineTheme throws, so no `bb-*`- // theme registers and getResolvedTheme must fall back to each theme's base.- defineTheme: vi.fn(() => {- throw new Error("theme registration swallowed");- }),},};return {@@ -41,16 +35,13 @@ vi.mock("./services", () => ({initializeMonacoServices: vi.fn(async () => undefined),}));-vi.mock("@/react/components/sql-editor/theme/presets", () => ({- PRESETS: [- { id: "light", monacoBase: "vs" },- { id: "dark", monacoBase: "vs-dark" },- ],-}));--vi.mock("@/react/components/sql-editor/theme/derive", () => ({- buildMonacoTheme: vi.fn(() => ({})),- monacoThemeName: vi.fn((p: { id: string }) => `bb-${p.id}`),+// The theme enumeration the editor registers on init.+vi.mock("./editorThemes", () => ({+ BUILTIN_EDITOR_THEMES: [{ id: "vs", label: "Light", type: "light" }],+ getAvailableEditorThemes: vi.fn(async () => [+ { id: "Dark Modern", label: "Dark Modern", type: "dark" },+ { id: "Light Modern", label: "Light Modern", type: "light" },+ ]),}));vi.mock("monaco-editor", () => mocks.monaco);@@ -98,18 +89,16 @@ describe("monaco core", () => {);});- test("getResolvedTheme falls back to a theme's own base when it failed to register", async () => {- // Creating any editor runs initializeTheme, which records each preset's- // base and (here) fails to register the custom themes.+ test("getResolvedTheme allows enumerated themes and falls back by type", async () => {+ // Creating any editor runs registerEditorThemes, adding the enumerated+ // themes to the allowlist + recording each one's light/dark fallback.await createMonacoEditor({ container: document.createElement("div") });- // A dark theme that didn't register must fall back to `vs-dark`, NOT the- // light `vs` — this is the bug that left the editor light under a dark theme.- expect(getResolvedTheme("bb-dark")).toBe("vs-dark");- // A light theme falls back to `vs`; the default (no arg) resolves the same.- expect(getResolvedTheme("bb-light")).toBe("vs");+ // Enumerated + standalone built-ins are applied as-is.+ expect(getResolvedTheme("Dark Modern")).toBe("Dark Modern");+ expect(getResolvedTheme("vs-dark")).toBe("vs-dark");+ // An unregistered id falls back to `vs` (the default).+ expect(getResolvedTheme("Nonexistent")).toBe("vs");expect(getResolvedTheme()).toBe("vs");- // An unknown name with no recorded base falls back to the built-in `vs`.- expect(getResolvedTheme("bb-unknown")).toBe("vs");});});diff --git a/frontend/src/react/components/monaco/core.ts b/frontend/src/react/components/monaco/core.tsindex 1aba0d2ef8..0ee2cae2d1 100644--- a/frontend/src/react/components/monaco/core.ts+++ b/frontend/src/react/components/monaco/core.ts@@ -1,11 +1,7 @@import type * as MonacoType from "monaco-editor";-import {- buildMonacoTheme,- monacoThemeName,-} from "@/react/components/sql-editor/theme/derive";-import { PRESETS } from "@/react/components/sql-editor/theme/presets";import type { Language } from "@/types";import { defer } from "@/utils";+import { getAvailableEditorThemes } from "./editorThemes";import { initializeMonacoServices } from "./services";let monacoModule: typeof MonacoType | undefined;@@ -17,34 +13,28 @@ export const MonacoEditorReady = monacoEditorReadyDefer.promise;const state = {themeInitialized: false,registeredThemes: new Set<string>(["vs", "vs-dark", "hc-black", "hc-light"]),- // The Monaco base ("vs" | "vs-dark") for each generated theme name. When a- // custom theme fails to register (the codingame VSCode theme service silently- // ignores `defineTheme` in some runtime modes), `getResolvedTheme` falls back- // to the theme's OWN base — so a dark theme falls back to `vs-dark`, not the- // light `vs`. Recorded for every preset whether or not registration succeeds.+ // The light/dark fallback base for each known theme id. If `setTheme` is+ // called with an id that isn't registered, `getResolvedTheme` falls back to+ // the theme's OWN type (dark → `vs-dark`, not the light `vs`).themeBase: new Map<string, "vs" | "vs-dark">(),};-const initializeTheme = () => {+// Add the color themes the VSCode theme service actually has registered to the+// allowlist (so `getResolvedTheme` lets `setTheme` apply them) and record each+// one's light/dark fallback. The standalone built-ins above are always present.+const registerEditorThemes = async () => {if (state.themeInitialized) return;state.themeInitialized = true;- if (!monacoModule) return;- for (const preset of PRESETS) {- const name = monacoThemeName(preset);- state.themeBase.set(name, preset.monacoBase);- try {- monacoModule.editor.defineTheme(name, buildMonacoTheme(preset));- state.registeredThemes.add(name);- } catch {- // The vscode theme-service override owns themes in some runtime modes;- // an un-registered theme falls back to its base via getResolvedTheme.- }+ const themes = await getAvailableEditorThemes();+ for (const theme of themes) {+ state.registeredThemes.add(theme.id);+ state.themeBase.set(theme.id, theme.type === "dark" ? "vs-dark" : "vs");}};/*** Returns the requested theme if it's known to be registered with- * Monaco, otherwise falls back to the always-available built-in `vs`.+ * Monaco, otherwise falls back to the theme's own light/dark base (or `vs`).** Use this anywhere `monaco.editor.setTheme(...)` is called from* application code — calling `setTheme` with an unregistered theme@@ -53,17 +43,15 @@ const initializeTheme = () => {* per-instance, so a stale `vs-dark` from a recently-disposed* terminal editor can bleed into a freshly-mounted worksheet editor).*/-export const getResolvedTheme = (requested = "bb-light"): string => {+export const getResolvedTheme = (requested = "vs"): string => {if (state.registeredThemes.has(requested)) return requested;- // Custom theme not registered → use its own base (vs / vs-dark), so a dark- // theme never falls back to the light `vs`.return state.themeBase.get(requested) ?? "vs";};const initialize = async () => {await initializeMonacoServices();await loadMonacoEditor();- initializeTheme();+ await registerEditorThemes();};export const loadMonacoEditor = async (): Promise<typeof MonacoType> => {@@ -144,7 +132,7 @@ export const defaultEditorOptions =return {renderValidationDecorations: "on",accessibilitySupport: "off",- theme: "bb-light",+ theme: "vs",tabSize: 2,insertSpaces: true,autoClosingQuotes: "never",@@ -185,7 +173,7 @@ export const defaultDiffEditorOptions =enableSplitViewResizing: false,accessibilitySupport: "off",renderValidationDecorations: "on",- theme: "bb-light",+ theme: "vs",autoClosingQuotes: "never",folding: false,automaticLayout: true,diff --git a/frontend/src/react/components/monaco/editorThemes.ts b/frontend/src/react/components/monaco/editorThemes.tsnew file mode 100644index 0000000000..36ef1f97f0--- /dev/null+++ b/frontend/src/react/components/monaco/editorThemes.ts@@ -0,0 +1,56 @@+import { initializeMonacoServices } from "./services";++export interface EditorThemeOption {+ /** The id passed to `monaco.editor.setTheme`. */+ id: string;+ label: string;+ type: "light" | "dark";+}++/**+ * Always-available standalone built-ins — the safe fallback when enumeration+ * isn't possible (service not ready, API shape drift, etc.).+ */+export const BUILTIN_EDITOR_THEMES: EditorThemeOption[] = [+ { id: "vs", label: "Light", type: "light" },+ { id: "vs-dark", label: "Dark", type: "dark" },+];++/**+ * Enumerate the color themes actually registered with the VSCode theme service,+ * so the editor-theme picker is data-driven instead of relying on guessed ids+ * (the codingame service owns the registry; `defineTheme` ids it doesn't know+ * silently no-op). Defensive by design: any failure degrades to the built-ins,+ * and the dynamic import means a bad path can't break module load.+ */+export async function getAvailableEditorThemes(): Promise<EditorThemeOption[]> {+ try {+ await initializeMonacoServices();+ const { getService, IWorkbenchThemeService } = await import(+ "@codingame/monaco-vscode-api/services"+ );+ const themeService = await getService(IWorkbenchThemeService);+ const themes = await themeService.getColorThemes();+ const mapped = themes+ .map((theme): EditorThemeOption | null => {+ const id = theme.settingsId ?? theme.id;+ if (!id) return null;+ const isDark = String(theme.type ?? "")+ .toLowerCase()+ .includes("dark");+ return {+ id,+ label: theme.label ?? id,+ type: isDark ? "dark" : "light",+ };+ })+ .filter((theme): theme is EditorThemeOption => theme !== null);+ return mapped.length > 0 ? mapped : BUILTIN_EDITOR_THEMES;+ } catch (e) {+ console.warn(+ "[sql-editor-theme] editor-theme enumeration failed; using built-ins",+ e+ );+ return BUILTIN_EDITOR_THEMES;+ }+}diff --git a/frontend/src/react/components/sql-editor/AccessGrantRequestDrawer.test.tsx b/frontend/src/react/components/sql-editor/AccessGrantRequestDrawer.test.tsxindex 8a028199d7..09fc87121a 100644--- a/frontend/src/react/components/sql-editor/AccessGrantRequestDrawer.test.tsx+++ b/frontend/src/react/components/sql-editor/AccessGrantRequestDrawer.test.tsx@@ -42,6 +42,10 @@ vi.mock("@/react/stores/app", () => {const state = () => ({fetchDatabases: mocks.fetchDatabases,notify: mocks.pushNotification,+ // Consumed by useWorkspaceSQLEditorTheme (via useActiveSQLEditorTheme,+ // which drives the drawer's Monaco theme). Empty profile resolves to the+ // default theme.+ getWorkspaceProfile: () => ({}),});return {useAppStore: Object.assign(diff --git a/frontend/src/react/components/sql-editor/EditorAction.tsx b/frontend/src/react/components/sql-editor/EditorAction.tsxindex 9e5278d731..38e4117996 100644--- a/frontend/src/react/components/sql-editor/EditorAction.tsx+++ b/frontend/src/react/components/sql-editor/EditorAction.tsx@@ -21,14 +21,13 @@ import {} from "@/react/stores/sqlEditor/tab";import type { SQLEditorQueryParams } from "@/types";import { Engine } from "@/types/proto-es/v1/common_pb";-import { isDev, isWorksheetWritableV1, keyboardShortcutStr } from "@/utils";+import { isWorksheetWritableV1, keyboardShortcutStr } from "@/utils";import { sqlEditorEvents } from "@/views/sql-editor/events";import { AdminModeButton } from "./AdminModeButton";import { ChooserGroup } from "./ChooserGroup";import { OpenAIButton } from "./OpenAIButton";import { QueryContextSettingPopover } from "./QueryContextSettingPopover";import { SharePopoverBody } from "./SharePopoverBody";-import { ThemeSelect } from "./ThemeSelect";type Props = {readonly onExecute?: (params: SQLEditorQueryParams) => void;@@ -242,8 +241,6 @@ export function EditorAction({ onExecute }: Props) {)}</div><div className="action-right gap-x-2 flex overflow-x-auto sm:overflow-x-hidden sm:justify-end items-center">- {/* Theme switcher is dev-only until the theme feature ships. */}- {isDev() && <ThemeSelect />}<ChooserGroup /><OpenAIButtonsize="sm"diff --git a/frontend/src/react/components/sql-editor/ResultView/SingleResultView.tsx b/frontend/src/react/components/sql-editor/ResultView/SingleResultView.tsxindex 15e4e2a552..914bbc272f 100644--- a/frontend/src/react/components/sql-editor/ResultView/SingleResultView.tsx+++ b/frontend/src/react/components/sql-editor/ResultView/SingleResultView.tsx@@ -596,7 +596,7 @@ function SingleResultViewInner({<Buttonsize="sm"variant="outline"- className="h-7 px-2 rounded-r-none border-r-0 bg-control-bg text-control border-control-border hover:bg-control-bg-hover"+ className="h-7 px-2 rounded-r-none border-r-0 text-control border-control-border hover:bg-control-bg-hover"onClick={() => copy("all", formatAsText)}><CopyIcon className="size-4" />@@ -611,7 +611,7 @@ function SingleResultViewInner({size="sm"variant="outline"aria-label={t("common.copy")}- className="h-7 w-6 px-0 rounded-l-none bg-control-bg text-control border-control-border hover:bg-control-bg-hover"+ className="h-7 w-6 px-0 rounded-l-none text-control border-control-border hover:bg-control-bg-hover"><ChevronDownIcon className="size-4" /></Button>diff --git a/frontend/src/react/components/sql-editor/ResultView/VirtualDataBlock.tsx b/frontend/src/react/components/sql-editor/ResultView/VirtualDataBlock.tsxindex 8c4f6798a1..82d0e56b87 100644--- a/frontend/src/react/components/sql-editor/ResultView/VirtualDataBlock.tsx+++ b/frontend/src/react/components/sql-editor/ResultView/VirtualDataBlock.tsx@@ -150,7 +150,10 @@ export const VirtualDataBlock = forwardRef<</p><divclassName={cn(- "py-2 px-3 bg-control-bg rounded relative",+ // Subtle surface tint (matches VirtualDataTable's zebra+ // rows) rather than full surface, so a dark custom surface+ // doesn't make each card too heavy.+ "py-2 px-3 bg-control-bg/40 rounded relative",isActive && "border-2 border-accent/20 bg-accent/10!")}>diff --git a/frontend/src/react/components/sql-editor/ResultView/pretty-print-json.css b/frontend/src/react/components/sql-editor/ResultView/pretty-print-json.cssindex d378f77f3e..63429af82e 100644--- a/frontend/src/react/components/sql-editor/ResultView/pretty-print-json.css+++ b/frontend/src/react/components/sql-editor/ResultView/pretty-print-json.css@@ -44,103 +44,52 @@ ol.json-lines > li {transition: all 400ms;}-/* Custom Colors */-ol.json-lines {- --colorGraphite: #303030;- --colorCharcoal: #222222;- --colorTar: #161616;-}--/* Colors */+/* Colors — driven by the SQL Editor theme tokens so JSON follows the active+ theme (light or dark) instead of fixed colors. `.json-mark` is the+ punctuation (braces/brackets/commas/colons), which used to be hardcoded black+ and disappeared on dark themes. */.json-container {- background-color: white;+ background-color: transparent;+}+.json-mark {+ color: rgb(var(--color-control));}.json-key {- color: brown;+ color: rgb(var(--color-accent));}.json-string {- color: olive;+ color: rgb(var(--color-success));}.json-number {- color: navy;+ color: rgb(var(--color-info));}.json-boolean {- color: teal;+ color: rgb(var(--color-warning));}.json-null {- color: dimgray;-}-.json-mark {- color: black;+ color: rgb(var(--color-control-light));}a.json-link {- color: purple;+ color: rgb(var(--color-accent));}a.json-link:visited {- color: slategray;+ color: rgb(var(--color-control-light));}a.json-link:hover {- color: blueviolet;+ color: rgb(var(--color-accent-hover));}a.json-link:active {- color: slategray;+ color: rgb(var(--color-control-light));}ol.json-lines > li::marker {- color: dimgray;+ color: rgb(var(--color-control-light));}ol.json-lines > li:nth-child(odd) {- background-color: gainsboro;+ background-color: rgb(var(--color-control-bg) / 0.4);}ol.json-lines > li:nth-child(even) {- background-color: whitesmoke;+ background-color: transparent;}ol.json-lines > li:hover {- background-color: lemonchiffon;-}--/* Dark Mode */-.dark-mode .json-container {- background-color: black;-}-.dark-mode .json-key {- color: indianred;-}-.dark-mode .json-string {- color: khaki;-}-.dark-mode .json-number {- color: deepskyblue;-}-.dark-mode .json-boolean {- color: mediumseagreen;-}-.dark-mode .json-null {- color: darkorange;-}-.dark-mode .json-mark {- color: silver;-}-.dark-mode a.json-link {- color: mediumorchid;-}-.dark-mode a.json-link:visited {- color: slategray;-}-.dark-mode a.json-link:hover {- color: violet;-}-.dark-mode a.json-link:active {- color: slategray;-}-.dark-mode ol.json-lines > li::marker {- color: silver;-}-.dark-mode ol.json-lines > li:nth-child(odd) {- background-color: var(--colorCharcoal);-}-.dark-mode ol.json-lines > li:nth-child(even) {- background-color: var(--colorTar);-}-.dark-mode ol.json-lines > li:hover {- background-color: dimgray;+ background-color: rgb(var(--color-control-bg-hover));}diff --git a/frontend/src/react/components/sql-editor/SQLEditorLayout.tsx b/frontend/src/react/components/sql-editor/SQLEditorLayout.tsxindex 2505306d34..b7ac2ec2cb 100644--- a/frontend/src/react/components/sql-editor/SQLEditorLayout.tsx+++ b/frontend/src/react/components/sql-editor/SQLEditorLayout.tsx@@ -2,18 +2,17 @@ import { type ReactNode, useEffect, useState } from "react";import { BannersWrapper } from "@/react/components/BannersWrapper";import { useEnsureWorkspaceCommonData } from "@/react/hooks/useEnsureWorkspaceCommonData";import { router } from "@/react/router";-import { useSQLEditorEditorState } from "@/react/stores/sqlEditor/editor";import { provideSheetContext } from "@/views/sql-editor/Sheet";import { RequestDrawerHost } from "./RequestDrawerHost";import { SQLEditorRouteShell } from "./SQLEditorRouteShell";-import { resolveThemeId } from "./theme/presets";import { SQLEditorThemeScope } from "./theme/SQLEditorThemeScope";import { useMonacoThemeController } from "./theme/useMonacoThemeController";import { useSQLEditorOverlayTheme } from "./theme/useSQLEditorOverlayTheme";+import { useWorkspaceSQLEditorTheme } from "./theme/useWorkspaceSQLEditorTheme";import { useSQLEditorAutoSave } from "./useSQLEditorAutoSave";function SQLEditorThemeRoot({ children }: Readonly<{ children: ReactNode }>) {- const themeId = useSQLEditorEditorState((s) => s.themeId);+ const theme = useWorkspaceSQLEditorTheme();// Live-applies the theme on switch. It deliberately does NOT call setTheme on// mount — editors theme themselves at construction via options.theme — so it// never races Monaco construction (see useMonacoThemeController).@@ -22,7 +21,7 @@ function SQLEditorThemeRoot({ children }: Readonly<{ children: ReactNode }>) {// render outside the SQL Editor DOM subtree.useSQLEditorOverlayTheme();return (- <SQLEditorThemeScope theme={resolveThemeId(themeId)} asContents>+ <SQLEditorThemeScope theme={theme} asContents>{children}</SQLEditorThemeScope>);diff --git a/frontend/src/react/components/sql-editor/SheetTree.tsx b/frontend/src/react/components/sql-editor/SheetTree.tsxindex 3ba39e39ac..17c62adcb4 100644--- a/frontend/src/react/components/sql-editor/SheetTree.tsx+++ b/frontend/src/react/components/sql-editor/SheetTree.tsx@@ -950,8 +950,10 @@ export function SheetTree({data-item-key={folderNode.key}className={cn("flex items-center gap-x-1 w-full py-0.5 text-sm cursor-pointer select-none",- "hover:bg-control-bg rounded-xs",- isSelected && "bg-control-bg"+ // Align with the connection-panel database tree: subtle neutral+ // hover, accent-tinted selection (was a too-light gray fill).+ "hover:bg-control-bg/70 rounded-xs",+ isSelected && "bg-accent/10")}onClick={(e) => {// Only handle clicks on text/prefix area, not suffixdiff --git a/frontend/src/react/components/sql-editor/StandardPanel/SQLEditor.tsx b/frontend/src/react/components/sql-editor/StandardPanel/SQLEditor.tsxindex 8d91c2849c..bff7865c6e 100644--- a/frontend/src/react/components/sql-editor/StandardPanel/SQLEditor.tsx+++ b/frontend/src/react/components/sql-editor/StandardPanel/SQLEditor.tsx@@ -439,7 +439,7 @@ export function SQLEditor({ onExecute }: SQLEditorProps) {);return (- <div className="w-full h-full grow flex flex-col justify-start items-start overflow-hidden">+ <div className="w-full h-full grow flex flex-col justify-start items-start overflow-hidden bg-background"><MonacoEditorkey={filename}autoHeight={false}diff --git a/frontend/src/react/components/sql-editor/TabItem.test.tsx b/frontend/src/react/components/sql-editor/TabItem.test.tsxindex 78c5dba87a..2a505889c8 100644--- a/frontend/src/react/components/sql-editor/TabItem.test.tsx+++ b/frontend/src/react/components/sql-editor/TabItem.test.tsx@@ -102,8 +102,9 @@ describe("TabItem", () => {);render();const button = container.querySelector("button");- expect(button?.className).toContain("bg-accent/10");- expect(button?.className).toContain("text-accent");+ // Active = solid accent fill + on-accent text.+ expect(button?.className).toContain("bg-accent");+ expect(button?.className).toContain("text-accent-text");unmount();});@@ -114,7 +115,8 @@ describe("TabItem", () => {);render();const button = container.querySelector("button");- expect(button?.className).not.toContain("bg-accent/10");+ // Inactive has no on-accent text (only a faint hover tint).+ expect(button?.className).not.toContain("text-accent-text");unmount();});diff --git a/frontend/src/react/components/sql-editor/TabItem.tsx b/frontend/src/react/components/sql-editor/TabItem.tsxindex 8cc7c647b8..45e6eed446 100644--- a/frontend/src/react/components/sql-editor/TabItem.tsx+++ b/frontend/src/react/components/sql-editor/TabItem.tsx@@ -43,8 +43,13 @@ export function TabItem({ tab, onClick }: TabItemProps) {variant="ghost"className={cn("size-10 p-0",- isActive &&- "bg-accent/10 text-accent hover:bg-accent/10 hover:text-accent"+ // Active is a solid accent fill with the on-accent text color; hover+ // is a faint accent tint. Both keyed off the accent hue so active+ // always reads stronger than hover — the ghost default's full-surface+ // hover would otherwise outweigh it under a saturated custom theme.+ isActive+ ? "bg-accent/80 text-accent-text hover:bg-accent/80 hover:text-accent-text"+ : "hover:bg-accent/20")}onClick={onClick}>diff --git a/frontend/src/react/components/sql-editor/ThemeSelect.test.tsx b/frontend/src/react/components/sql-editor/ThemeSelect.test.tsxdeleted file mode 100644index 4f5cf0d5fa..0000000000--- a/frontend/src/react/components/sql-editor/ThemeSelect.test.tsx+++ /dev/null@@ -1,152 +0,0 @@-import type { ReactElement } from "react";-import { act } from "react";-import { createRoot } from "react-dom/client";-import { beforeEach, describe, expect, test, vi } from "vitest";--(- globalThis as { IS_REACT_ACT_ENVIRONMENT?: boolean }-).IS_REACT_ACT_ENVIRONMENT = true;--const mocks = vi.hoisted(() => ({- useTranslation: vi.fn(() => ({ t: (key: string) => key })),- editorState: {- themeId: "light",- },- setThemeId: vi.fn(),-}));--vi.mock("react-i18next", () => ({- useTranslation: mocks.useTranslation,-}));--vi.mock("@/react/stores/sqlEditor/editor", () => ({- useSQLEditorEditorState: (selector: (s: unknown) => unknown) =>- selector(mocks.editorState),- getSQLEditorEditorState: () => ({- setThemeId: mocks.setThemeId,- }),-}));--vi.mock("@/react/components/ui/select", () => ({- Select: ({- children,- value,- onValueChange,- }: {- children: React.ReactNode;- value?: string;- onValueChange?: (v: string) => void;- }) => (- <div- data-testid="select-root"- data-value={value}- data-change-handler={onValueChange ? "true" : "false"}- >- {children}- </div>- ),- SelectTrigger: ({- children,- "aria-label": ariaLabel,- }: {- children: React.ReactNode;- "aria-label"?: string;- size?: string;- }) => (- <button data-testid="select-trigger" aria-label={ariaLabel}>- {children}- </button>- ),- SelectValue: () => <span data-testid="select-value" />,- SelectContent: ({ children }: { children: React.ReactNode }) => (- <div data-testid="select-content">{children}</div>- ),- SelectItem: ({- children,- value,- }: {- children: React.ReactNode;- value?: string;- }) => (- <div data-testid="select-item" data-value={value}>- {children}- </div>- ),-}));--let ThemeSelect: typeof import("./ThemeSelect").ThemeSelect;--const renderIntoContainer = (element: ReactElement) => {- const container = document.createElement("div");- const root = createRoot(container);- document.body.appendChild(container);- return {- container,- render: () => {- act(() => {- root.render(element);- });- },- unmount: () => {- act(() => {- root.unmount();- });- container.remove();- },- };-};--beforeEach(async () => {- vi.clearAllMocks();- mocks.useTranslation.mockReturnValue({ t: (key: string) => key });- mocks.editorState = { themeId: "light" };- ({ ThemeSelect } = await import("./ThemeSelect"));-});--describe("ThemeSelect", () => {- test("renders the select trigger with correct aria-label", () => {- const { container, render, unmount } = renderIntoContainer(<ThemeSelect />);- render();-- const trigger = container.querySelector("[data-testid='select-trigger']");- expect(trigger).not.toBeNull();- expect(trigger?.getAttribute("aria-label")).toBe("sql-editor.theme.self");-- unmount();- });-- test("current themeId is forwarded to Select value", () => {- mocks.editorState = { themeId: "dark" };- const { container, render, unmount } = renderIntoContainer(<ThemeSelect />);- render();-- const root = container.querySelector("[data-testid='select-root']");- expect(root?.getAttribute("data-value")).toBe("dark");-- unmount();- });-- test("renders one SelectItem per PRESET", async () => {- const { PRESETS } = await import("./theme/presets");- const { container, render, unmount } = renderIntoContainer(<ThemeSelect />);- render();-- const items = container.querySelectorAll("[data-testid='select-item']");- expect(items.length).toBe(PRESETS.length);-- unmount();- });-- test("renders each preset's literal name (no i18n on theme names)", () => {- const { container, render, unmount } = renderIntoContainer(<ThemeSelect />);- render();-- const items = container.querySelectorAll("[data-testid='select-item']");- const lightItem = Array.from(items).find(- (el) => el.getAttribute("data-value") === "light"- );- expect(lightItem?.textContent).toBe("Default Light");-- unmount();- });-});diff --git a/frontend/src/react/components/sql-editor/ThemeSelect.tsx b/frontend/src/react/components/sql-editor/ThemeSelect.tsxdeleted file mode 100644index e504dccac9..0000000000--- a/frontend/src/react/components/sql-editor/ThemeSelect.tsx+++ /dev/null@@ -1,57 +0,0 @@-import { useTranslation } from "react-i18next";-import {- Select,- SelectContent,- SelectItem,- SelectTrigger,- SelectValue,-} from "@/react/components/ui/select";-import {- getSQLEditorEditorState,- useSQLEditorEditorState,-} from "@/react/stores/sqlEditor/editor";-import { PRESETS } from "./theme/presets";--// NOTE: preset names below are rendered as literal strings, NOT i18n keys, by-// design. This switcher is dev-only (mounted behind `isDev()`), so end users-// never see it; the names are largely proper nouns (e.g. "Solarized Dark") that-// aren't translated anyway; and future user-defined custom themes will carry-// arbitrary user-provided names. Only the switcher's own chrome label is-// localized (`sql-editor.theme.self`). See the theme design doc's as-shipped-// notes. (Intentional exception to the AGENTS.md "all UI text in locales" rule.)-export function ThemeSelect() {- const { t } = useTranslation();- const themeId = useSQLEditorEditorState((s) => s.themeId);-- return (- <Select- value={themeId}- onValueChange={(value) => {- if (typeof value === "string") {- getSQLEditorEditorState().setThemeId(value);- }- }}- >- <SelectTrigger- size="sm"- className="h-8"- aria-label={t("sql-editor.theme.self")}- >- {/* Render the preset's display name, not the raw id ("light"). */}- <SelectValue>- {(value) => {- const preset = PRESETS.find((p) => p.id === value);- return preset ? preset.name : String(value ?? "");- }}- </SelectValue>- </SelectTrigger>- <SelectContent>- {PRESETS.map((preset) => (- <SelectItem key={preset.id} value={preset.id}>- {preset.name}- </SelectItem>- ))}- </SelectContent>- </Select>- );-}diff --git a/frontend/src/react/components/sql-editor/theme/derive.test.ts b/frontend/src/react/components/sql-editor/theme/derive.test.tsindex 8e1612c845..cd2eabb5d9 100644--- a/frontend/src/react/components/sql-editor/theme/derive.test.ts+++ b/frontend/src/react/components/sql-editor/theme/derive.test.ts@@ -1,13 +1,21 @@import { describe, expect, test } from "vitest";import {- buildMonacoTheme,+ deriveThemeFromAnchors,+ isDarkTheme,monacoThemeName,resolveAdminTheme,+ type ThemeAnchors,+ themeToAnchors,themeToCssVars,validateTheme,} from "./derive";-import type { SQLEditorTheme } from "./types";-import { SQL_EDITOR_THEME_TOKENS } from "./types";+import { PRESET_BY_ID } from "./presets";+import {+ DEFAULT_DARK_EDITOR_THEME,+ DEFAULT_LIGHT_EDITOR_THEME,+ SQL_EDITOR_THEME_TOKENS,+ type SQLEditorTheme,+} from "./types";// Minimal complete fixture (token values arbitrary but every key present).const fixture = (over: Partial<SQLEditorTheme> = {}): SQLEditorTheme => {@@ -32,29 +40,46 @@ describe("themeToCssVars", () => {});describe("monacoThemeName", () => {- test("prefixes the theme id", () => {- expect(monacoThemeName(fixture({ id: "monokai" }))).toBe("bb-monokai");+ test("returns the theme's registered editor theme id (monacoBase)", () => {+ expect(monacoThemeName(fixture({ monacoBase: "Dark Modern" }))).toBe(+ "Dark Modern"+ );});});-describe("buildMonacoTheme", () => {- test("carries the base and the word-highlight reset, no rules", () => {- const data = buildMonacoTheme(fixture({ monacoBase: "vs-dark" }));- expect(data.base).toBe("vs-dark");- expect(data.inherit).toBe(true);- expect(data.rules).toEqual([]);- expect(data.colors["editor.wordHighlightBackground"]).toBe("#00000000");+// Helpers that set a recognizably light/dark chrome background, since+// `isDarkTheme` (and thus resolveAdminTheme/themeColorScheme) keys off it.+const lightThemed = (over: Partial<SQLEditorTheme> = {}) =>+ fixture({+ ...over,+ tokens: {+ ...fixture().tokens,+ "--color-background": "255 255 255",+ } as SQLEditorTheme["tokens"],+ });+const darkThemed = (over: Partial<SQLEditorTheme> = {}) =>+ fixture({+ ...over,+ tokens: {+ ...fixture().tokens,+ "--color-background": "30 30 30",+ } as SQLEditorTheme["tokens"],+ });++describe("isDarkTheme", () => {+ test("keys off the chrome background luminance, not monacoBase", () => {+ // A light theme that nonetheless carries a dark editor theme id.+ expect(isDarkTheme(lightThemed({ monacoBase: "Dark Modern" }))).toBe(false);+ expect(isDarkTheme(darkThemed({ monacoBase: "vs" }))).toBe(true);});});describe("resolveAdminTheme", () => {test("keeps a dark selected theme", () => {- const dark = fixture({ id: "monokai", monacoBase: "vs-dark" });- expect(resolveAdminTheme(dark).id).toBe("monokai");+ expect(resolveAdminTheme(darkThemed({ id: "monokai" })).id).toBe("monokai");});test("falls back to the dark preset for a light selected theme", () => {- const light = fixture({ id: "light", monacoBase: "vs" });- expect(resolveAdminTheme(light).id).toBe("dark");+ expect(resolveAdminTheme(lightThemed({ id: "light" })).id).toBe("dark");});});@@ -69,3 +94,81 @@ describe("validateTheme", () => {expect(() => validateTheme(bad)).toThrow(/--color-accent/);});});++const lightAnchors: ThemeAnchors = {+ background: "#ffffff",+ text: "#18181b",+ accent: "#4f46e5",+ border: "#e5e7eb",+};+const darkAnchors: ThemeAnchors = {+ background: "#1e1e1e",+ text: "#f4f4f5",+ accent: "#6366f1",+ border: "#3f3f46",+};++describe("deriveThemeFromAnchors", () => {+ test("complete + valid", () => {+ const t = deriveThemeFromAnchors(lightAnchors, "Brand");+ expect(() => validateTheme(t)).not.toThrow();+ expect(Object.keys(t.tokens)).toHaveLength(SQL_EDITOR_THEME_TOKENS.length);+ expect(t.name).toBe("Brand");+ });+ test("anchors map to direct tokens", () => {+ const t = deriveThemeFromAnchors(lightAnchors, "B");+ expect(t.tokens["--color-background"]).toBe("255 255 255");+ expect(t.tokens["--color-main"]).toBe("24 24 27");+ expect(t.tokens["--color-accent"]).toBe("79 70 229");+ expect(t.tokens["--color-block-border"]).toBe("229 231 235");+ });+ test("surface is derived from the background (not an anchor)", () => {+ // white bg nudged 6% toward near-black text → a light gray.+ expect(+ deriveThemeFromAnchors(lightAnchors, "B").tokens["--color-control-bg"]+ ).toBe("241 241 241");+ });+ test("monacoBase default by luminance", () => {+ expect(deriveThemeFromAnchors(lightAnchors, "L").monacoBase).toBe(+ DEFAULT_LIGHT_EDITOR_THEME+ );+ expect(deriveThemeFromAnchors(darkAnchors, "D").monacoBase).toBe(+ DEFAULT_DARK_EDITOR_THEME+ );+ });+ test("explicit monacoBase overrides luminance", () => {+ // Light anchors derive `vs`, but an explicit base wins (and vice versa).+ expect(+ deriveThemeFromAnchors(lightAnchors, "L", "vs-dark").monacoBase+ ).toBe("vs-dark");+ expect(deriveThemeFromAnchors(darkAnchors, "D", "vs").monacoBase).toBe(+ "vs"+ );+ });+ test("status + matrix fixed (anchor-independent)", () => {+ const a = deriveThemeFromAnchors(lightAnchors, "A").tokens;+ const b = deriveThemeFromAnchors(darkAnchors, "B").tokens;+ for (const k of [+ "--color-error",+ "--color-warning",+ "--color-success",+ "--color-matrix-green",+ ] as const) {+ expect(a[k]).toBe(b[k]);+ expect(a[k]).toBe(PRESET_BY_ID.light.tokens[k]);+ }+ });+ test("info mirrors the accent (not a fixed status color)", () => {+ const t = deriveThemeFromAnchors(lightAnchors, "A").tokens;+ expect(t["--color-info"]).toBe(t["--color-accent"]);+ expect(t["--color-info-hover"]).toBe(t["--color-accent-hover"]);+ });+});++describe("themeToAnchors", () => {+ test("round-trips", () => {+ expect(themeToAnchors(deriveThemeFromAnchors(darkAnchors, "D"))).toEqual(+ darkAnchors+ );+ });+});diff --git a/frontend/src/react/components/sql-editor/theme/derive.ts b/frontend/src/react/components/sql-editor/theme/derive.tsindex e9286aa4ed..d4b621a323 100644--- a/frontend/src/react/components/sql-editor/theme/derive.ts+++ b/frontend/src/react/components/sql-editor/theme/derive.ts@@ -1,8 +1,15 @@-import type { editor as Editor } from "monaco-editor";import type { CSSProperties } from "react";-import { PRESET_BY_ID } from "./presets";-import type { SQLEditorTheme } from "./types";-import { SQL_EDITOR_THEME_TOKENS } from "./types";+// Import the `dark` preset DIRECTLY (a plain token object), NOT the `./presets`+// barrel — the barrel may pull in presets *derived* from this file (via+// `deriveThemeFromAnchors`), which would create an init-order cycle (TDZ on the+// helper consts below).+import { dark } from "./presets/dark";+import {+ DEFAULT_DARK_EDITOR_THEME,+ DEFAULT_LIGHT_EDITOR_THEME,+ SQL_EDITOR_THEME_TOKENS,+ type SQLEditorTheme,+} from "./types";/** Chrome: tokens → inline CSS custom properties for a container's `style`. */export function themeToCssVars(@@ -15,39 +22,27 @@ export function themeToCssVars(return vars as CSSProperties & Record<string, string>;}-/** Monaco theme name registered via defineTheme + used by setTheme. */+/**+ * The registered Monaco/VSCode theme id to apply via `monaco.editor.setTheme`+ * for this theme — i.e. its `monacoBase` (e.g. "vs-dark", "Dark Modern"). Kept+ * as a function so call sites read intent ("the editor theme to apply") rather+ * than poking the field.+ */export function monacoThemeName(theme: SQLEditorTheme): string {- return `bb-${theme.id}`;+ return theme.monacoBase;}-/**- * Monaco: a theme → registered standalone theme data. The editor canvas is- * owned by the codingame VSCode theme service (which ignores per-theme colors- * passed to `defineTheme`), so this only carries the base (`vs`/`vs-dark`) plus- * the long-standing "no word-highlight box" reset. The editor background comes- * from the chrome `--color-background` via the transparent-canvas CSS; syntax- * token colors come from the base.- */-export function buildMonacoTheme(- theme: SQLEditorTheme-): Editor.IStandaloneThemeData {- return {- base: theme.monacoBase,- inherit: true,- rules: [],- colors: {- "editor.wordHighlightBackground": "#00000000",- "editor.wordHighlightStrongBackground": "#00000000",- },- };+/** Whether the theme reads as dark (by its chrome background luminance). */+export function isDarkTheme(theme: SQLEditorTheme): boolean {+ return luminance(fromStr(theme.tokens["--color-background"])) < 0.5;}/**- * Admin foreground resolution: keep dark themes (those keyed off the- * `vs-dark` Monaco base), else fall back to the dark preset.+ * Admin foreground resolution: keep a dark theme, else fall back to the dark+ * preset (admin mode is always dark).*/export function resolveAdminTheme(selected: SQLEditorTheme): SQLEditorTheme {- return selected.monacoBase === "vs-dark" ? selected : PRESET_BY_ID.dark;+ return isDarkTheme(selected) ? selected : dark;}/**@@ -58,7 +53,7 @@ export function resolveAdminTheme(selected: SQLEditorTheme): SQLEditorTheme {* lever. Keyed off the Monaco base so a dark theme reports `dark`.*/export function themeColorScheme(theme: SQLEditorTheme): "dark" | "light" {- return theme.monacoBase === "vs-dark" ? "dark" : "light";+ return isDarkTheme(theme) ? "dark" : "light";}/** Throws if any chrome token is missing. */@@ -69,3 +64,132 @@ export function validateTheme(theme: SQLEditorTheme): void {}}}++/**+ * The 4 colors an admin picks (each a `#rrggbb` hex). We derive all 29 chrome+ * tokens from these — the elevated "surface" is the background nudged toward the+ * text, status + matrix-green are held fixed.+ */+export interface ThemeAnchors {+ background: string;+ text: string;+ accent: string;+ border: string;+}++// Semantic status + matrix-green tokens — constant across brands so they stay+// recognizable (warning=amber, error=red, success=green). Inlined (the light+// preset's values) so `deriveThemeFromAnchors` has no dependency on the preset+// catalog. NOTE: `--color-info` is intentionally NOT here — it's derived from+// the accent (the least-semantic "brand" status) so info surfaces match the+// theme instead of clashing with a fixed blue.+const FIXED_TOKEN_VALUES: Record<string, string> = {+ "--color-warning": "245 158 11",+ "--color-warning-hover": "180 83 9",+ "--color-error": "220 38 38",+ "--color-error-hover": "185 28 28",+ "--color-success": "22 163 74",+ "--color-success-hover": "21 128 61",+ "--color-matrix-green": "0 204 0",+ "--color-matrix-green-hover": "136 255 136",+};++type RGB3 = [number, number, number];+const hexToRgb = (h: string): RGB3 => {+ const x = h.replace("#", "");+ return [0, 2, 4].map((i) => Number.parseInt(x.slice(i, i + 2), 16)) as RGB3;+};+const toStr = (c: RGB3): string =>+ c.map((n) => Math.max(0, Math.min(255, Math.round(n)))).join(" ");+const fromStr = (s: string): RGB3 => s.split(" ").map(Number) as RGB3;+const toHex = (s: string): string =>+ "#" ++ fromStr(s)+ .map((n) => n.toString(16).padStart(2, "0"))+ .join("");+const mix = (a: RGB3, b: RGB3, t: number): RGB3 =>+ a.map((v, i) => v + (b[i] - v) * t) as RGB3;+const luminance = ([r, g, b]: RGB3): number =>+ (0.2126 * r + 0.7152 * g + 0.0722 * b) / 255;++/**+ * Derive a complete theme from 5 anchor colors. The 5 anchors map directly to+ * background/control-bg/main/accent/block-border; the rest are blended toward+ * the text or background to keep contrast. Status + matrix tokens are fixed.+ * `monacoBase` defaults to the background luminance (dark background →+ * `vs-dark`), but callers may pass an explicit base to override that — the+ * editor's syntax palette (light/dark) is then admin-chosen, not inferred.+ */+export function deriveThemeFromAnchors(+ anchors: ThemeAnchors,+ name: string,+ monacoBase?: SQLEditorTheme["monacoBase"]+): SQLEditorTheme {+ const bg = hexToRgb(anchors.background);+ const text = hexToRgb(anchors.text);+ const accent = hexToRgb(anchors.accent);+ const border = hexToRgb(anchors.border);+ const dark = luminance(bg) < 0.5;+ const elevate = (c: RGB3, t: number) => mix(c, text, t); // toward text (more contrast)+ const recede = (c: RGB3, t: number) => mix(c, bg, t); // toward background++ // Elevated surface (panels/headers/hover) — the background nudged toward the+ // text. Derived (not an anchor) so the admin only picks 4 colors.+ const surface = elevate(bg, 0.06);+ const accentRgb = toStr(accent);+ const accentHover = toStr(dark ? elevate(accent, 0.15) : recede(accent, 0.2));++ const tokens: Record<string, string> = {+ "--color-background": toStr(bg),+ "--color-dark-bg": toStr(bg),+ "--color-control-bg": toStr(surface),+ "--color-control-bg-hover": toStr(elevate(surface, 0.06)),+ "--color-control": toStr(text),+ "--color-control-hover": toStr(recede(text, 0.15)),+ "--color-control-light": toStr(recede(text, 0.3)),+ "--color-control-light-hover": toStr(recede(text, 0.15)),+ "--color-control-placeholder": toStr(recede(text, 0.5)),+ "--color-control-border": toStr(border),+ "--color-block-border": toStr(border),+ "--color-link-hover": toStr(border),+ "--color-accent": accentRgb,+ "--color-accent-hover": accentHover,+ "--color-accent-disabled": toStr(recede(accent, 0.5)),+ // On-accent text (e.g. the Run button label): use whichever of the theme's+ // Text / Background anchors contrasts better with the accent — so it follows+ // the theme's own colors while staying legible on the accent fill.+ "--color-accent-text":+ Math.abs(luminance(bg) - luminance(accent)) >=+ Math.abs(luminance(text) - luminance(accent))+ ? toStr(bg)+ : toStr(text),+ // Info mirrors the brand accent (warning/error/success stay semantic).+ "--color-info": accentRgb,+ "--color-info-hover": accentHover,+ "--color-main": toStr(text),+ "--color-main-hover": toStr(recede(text, 0.2)),+ "--color-main-text": luminance(text) < 0.5 ? "255 255 255" : "24 24 27",+ };+ Object.assign(tokens, FIXED_TOKEN_VALUES);++ const theme: SQLEditorTheme = {+ id: "",+ name,+ monacoBase:+ monacoBase ??+ (dark ? DEFAULT_DARK_EDITOR_THEME : DEFAULT_LIGHT_EDITOR_THEME),+ tokens,+ };+ validateTheme(theme); // throws if a key is missing+ return theme;+}++/** Inverse of {@link deriveThemeFromAnchors}: recover the 4 picked anchors. */+export function themeToAnchors(theme: SQLEditorTheme): ThemeAnchors {+ return {+ background: toHex(theme.tokens["--color-background"]),+ text: toHex(theme.tokens["--color-main"]),+ accent: toHex(theme.tokens["--color-accent"]),+ border: toHex(theme.tokens["--color-block-border"]),+ };+}diff --git a/frontend/src/react/components/sql-editor/theme/presets/dark.ts b/frontend/src/react/components/sql-editor/theme/presets/dark.tsindex 4c46e27500..7e5fac66e3 100644--- a/frontend/src/react/components/sql-editor/theme/presets/dark.ts+++ b/frontend/src/react/components/sql-editor/theme/presets/dark.ts@@ -1,9 +1,9 @@-import type { SQLEditorTheme } from "../types";+import { DEFAULT_DARK_EDITOR_THEME, type SQLEditorTheme } from "../types";export const dark: SQLEditorTheme = {id: "dark",name: "Default Dark",- monacoBase: "vs-dark",+ monacoBase: DEFAULT_DARK_EDITOR_THEME,tokens: {"--color-control": "229 231 235","--color-control-hover": "243 244 246",diff --git a/frontend/src/react/components/sql-editor/theme/presets/light.ts b/frontend/src/react/components/sql-editor/theme/presets/light.tsindex 1be36bad3a..08ae17147f 100644--- a/frontend/src/react/components/sql-editor/theme/presets/light.ts+++ b/frontend/src/react/components/sql-editor/theme/presets/light.ts@@ -1,9 +1,9 @@-import type { SQLEditorTheme } from "../types";+import { DEFAULT_LIGHT_EDITOR_THEME, type SQLEditorTheme } from "../types";export const light: SQLEditorTheme = {id: "light",name: "Default Light",- monacoBase: "vs",+ monacoBase: DEFAULT_LIGHT_EDITOR_THEME,tokens: {"--color-control": "82 82 91","--color-control-hover": "24 24 27",diff --git a/frontend/src/react/components/sql-editor/theme/presets/solarized-dark.ts b/frontend/src/react/components/sql-editor/theme/presets/solarized-dark.tsindex 0155cbc5e9..9387f85da8 100644--- a/frontend/src/react/components/sql-editor/theme/presets/solarized-dark.ts+++ b/frontend/src/react/components/sql-editor/theme/presets/solarized-dark.ts@@ -1,4 +1,4 @@-import type { SQLEditorTheme } from "../types";+import { DEFAULT_DARK_EDITOR_THEME, type SQLEditorTheme } from "../types";// Ethan Schoonover's Solarized Dark palette.// base03 #002b36 base02 #073642 base01 #586e75 base00 #657b83@@ -9,22 +9,24 @@ import type { SQLEditorTheme } from "../types";export const solarizedDark: SQLEditorTheme = {id: "solarized-dark",name: "Solarized Dark",- monacoBase: "vs-dark",+ monacoBase: DEFAULT_DARK_EDITOR_THEME,tokens: {- "--color-control": "131 148 150", // base0- "--color-control-hover": "147 161 161", // base1- "--color-control-light": "88 110 117", // base01- "--color-control-light-hover": "101 123 131", // base00+ // Text bumped up the palette for readability — base01 (#586e75) is too dim+ // for UI secondary text on the dark base03 bg.+ "--color-control": "147 161 161", // base1+ "--color-control-hover": "203 213 213", // lightened base1+ "--color-control-light": "131 148 150", // base0+ "--color-control-light-hover": "147 161 161", // base1"--color-control-bg": "7 54 66", // base02"--color-control-bg-hover": "18 71 84",- "--color-control-placeholder": "88 110 117", // base01+ "--color-control-placeholder": "101 123 131", // base00"--color-control-border": "30 80 92","--color-accent": "38 139 210", // blue"--color-accent-hover": "77 163 222","--color-accent-disabled": "44 100 130","--color-accent-text": "253 246 227", // base3"--color-main": "147 161 161", // base1- "--color-main-hover": "131 148 150", // base0+ "--color-main-hover": "203 213 213", // lightened base1 (brighter, not dimmer)"--color-main-text": "0 43 54", // base03 (text on a base1 surface)"--color-background": "0 43 54", // base03"--color-block-border": "18 71 84",diff --git a/frontend/src/react/components/sql-editor/theme/types.ts b/frontend/src/react/components/sql-editor/theme/types.tsindex d0690f952e..a5b8432cae 100644--- a/frontend/src/react/components/sql-editor/theme/types.ts+++ b/frontend/src/react/components/sql-editor/theme/types.ts@@ -43,14 +43,23 @@ export interface SQLEditorTheme {// theme names aren't translated). Built-ins, proper-noun presets, and future// user-named custom themes all just set this.name: string;- // Picks the Monaco editor base. The editor canvas is themed by the codingame- // VSCode theme service (which ignores `monaco.editor.defineTheme`), so a theme- // only chooses light vs dark here — the editor background then shows the- // chrome `--color-background` through the transparent-canvas CSS, and syntax- // token colors come from the base. (Per-theme editor/syntax palettes were- // removed: they never reached the canvas in this runtime.)- monacoBase: "vs" | "vs-dark";+ // The registered Monaco/VSCode color-theme id applied via+ // `monaco.editor.setTheme` (e.g. "vs", "vs-dark", "Dark Modern", "Light+"). The+ // editor canvas is themed by the codingame VSCode theme service, which owns the+ // theme registry — only ids it has registered (enumerated via+ // `getAvailableEditorThemes`) take effect; unknown ids fall back via+ // `getResolvedTheme`. The editor background still shows the chrome+ // `--color-background` through the transparent-canvas CSS; this id drives the+ // syntax token colors (and is light/dark per the chosen theme).+ monacoBase: string;// Chrome layer: the SQL-Editor `--color-*` token values for this theme,// each a "r g b" triple (Tailwind resolves to `rgb(var(--color-x) / <alpha>)`).tokens: Record<SQLEditorThemeToken, string>;}++// The enumerated VSCode color-theme ids used as the light/dark defaults (the+// theme service registers these; `getAvailableEditorThemes` lists them). The+// standalone `vs`/`vs-dark` aliases are kept only as the catch-path fallback in+// `core.ts`/`editorThemes.ts` for when enumeration fails.+export const DEFAULT_LIGHT_EDITOR_THEME = "Visual Studio Light";+export const DEFAULT_DARK_EDITOR_THEME = "Visual Studio Dark";diff --git a/frontend/src/react/components/sql-editor/theme/useActiveSQLEditorTheme.ts b/frontend/src/react/components/sql-editor/theme/useActiveSQLEditorTheme.tsindex 23875d5776..a032d31eda 100644--- a/frontend/src/react/components/sql-editor/theme/useActiveSQLEditorTheme.ts+++ b/frontend/src/react/components/sql-editor/theme/useActiveSQLEditorTheme.ts@@ -1,8 +1,7 @@-import { useSQLEditorEditorState } from "@/react/stores/sqlEditor/editor";import { useSQLEditorTabState } from "@/react/stores/sqlEditor/tab";import { resolveAdminTheme } from "./derive";-import { resolveThemeId } from "./presets";import type { SQLEditorTheme } from "./types";+import { useWorkspaceSQLEditorTheme } from "./useWorkspaceSQLEditorTheme";/*** The SQL Editor theme that should currently apply to the foreground code@@ -11,10 +10,9 @@ import type { SQLEditorTheme } from "./types";* Monaco theme name and to drive the global Monaco theme controller.*/export function useActiveSQLEditorTheme(): SQLEditorTheme {- const themeId = useSQLEditorEditorState((s) => s.themeId);+ const selected = useWorkspaceSQLEditorTheme();const mode = useSQLEditorTabState((s) => s.tabsById.get(s.currentTabId)?.mode);- const selected = resolveThemeId(themeId);return mode === "ADMIN" ? resolveAdminTheme(selected) : selected;}diff --git a/frontend/src/react/components/sql-editor/theme/useWorkspaceSQLEditorTheme.test.ts b/frontend/src/react/components/sql-editor/theme/useWorkspaceSQLEditorTheme.test.tsnew file mode 100644index 0000000000..03f1d8f8d3--- /dev/null+++ b/frontend/src/react/components/sql-editor/theme/useWorkspaceSQLEditorTheme.test.ts@@ -0,0 +1,71 @@+import { describe, expect, test } from "vitest";+import { deriveThemeFromAnchors } from "./derive";+import { PRESET_BY_ID } from "./presets";+import { resolveWorkspaceTheme } from "./useWorkspaceSQLEditorTheme";++const customDef = {+ ...deriveThemeFromAnchors(+ {+ background: "#1e1e1e",+ text: "#f4f4f5",+ accent: "#6366f1",+ border: "#3f3f46",+ },+ "Brand"+ ),+ id: "u1",+};++describe("resolveWorkspaceTheme", () => {+ test("custom matching id → custom", () => {+ expect(+ resolveWorkspaceTheme({+ sqlEditorThemeId: "u1",+ sqlEditorCustomTheme: customDef,+ })?.id+ ).toBe("u1");+ });+ test("known preset id → catalog", () => {+ expect(+ resolveWorkspaceTheme({+ sqlEditorThemeId: "dark",+ sqlEditorCustomTheme: undefined,+ })+ ).toBe(PRESET_BY_ID.dark);+ });+ test("unknown / empty id → light", () => {+ expect(+ resolveWorkspaceTheme({+ sqlEditorThemeId: "",+ sqlEditorCustomTheme: undefined,+ })+ ).toBe(PRESET_BY_ID.light);+ expect(+ resolveWorkspaceTheme({+ sqlEditorThemeId: "nope",+ sqlEditorCustomTheme: undefined,+ })+ ).toBe(PRESET_BY_ID.light);+ });+ test("custom id mismatch → falls through to preset/light", () => {+ expect(+ resolveWorkspaceTheme({+ sqlEditorThemeId: "dark",+ sqlEditorCustomTheme: customDef,+ })+ ).toBe(PRESET_BY_ID.dark);+ });+ test("malformed custom (incomplete tokens) → light", () => {+ expect(+ resolveWorkspaceTheme({+ sqlEditorThemeId: "u1",+ sqlEditorCustomTheme: {+ id: "u1",+ name: "x",+ monacoBase: "vs",+ tokens: {},+ },+ })+ ).toBe(PRESET_BY_ID.light);+ });+});diff --git a/frontend/src/react/components/sql-editor/theme/useWorkspaceSQLEditorTheme.ts b/frontend/src/react/components/sql-editor/theme/useWorkspaceSQLEditorTheme.tsnew file mode 100644index 0000000000..f13a8559af--- /dev/null+++ b/frontend/src/react/components/sql-editor/theme/useWorkspaceSQLEditorTheme.ts@@ -0,0 +1,55 @@+import { useMemo } from "react";+import { useAppStore } from "@/react/stores/app";+import { validateTheme } from "./derive";+import { PRESET_BY_ID, resolveThemeId } from "./presets";+import type { SQLEditorTheme } from "./types";++// Mirrors WorkspaceProfileSetting's two theme fields (protojson camelCase).+export interface WorkspaceThemeInput {+ sqlEditorThemeId?: string;+ sqlEditorCustomTheme?: {+ id: string;+ name: string;+ monacoBase: string;+ tokens: Record<string, string>;+ };+}++/** Pure resolution: custom (matching id) → preset (by id) → light. */+export function resolveWorkspaceTheme(+ input: WorkspaceThemeInput+): SQLEditorTheme {+ const id = input.sqlEditorThemeId ?? "";+ const custom = input.sqlEditorCustomTheme;+ // `&& custom` keeps the type narrowing the optional chain alone doesn't give.+ if (custom?.id === id && custom) {+ const theme: SQLEditorTheme = {+ id: custom.id,+ name: custom.name,+ monacoBase: custom.monacoBase,+ tokens: custom.tokens,+ };+ try {+ validateTheme(theme);+ return theme;+ } catch {+ return PRESET_BY_ID.light;+ }+ }+ return resolveThemeId(id);+}++export function useWorkspaceSQLEditorTheme(): SQLEditorTheme {+ const profile = useAppStore((s) => s.getWorkspaceProfile());+ // Memoize on the (stable) profile reference so the resolved theme keeps a+ // STABLE identity across renders. `useMonacoThemeController` decides whether+ // to call the global `monaco.editor.setTheme` by comparing the theme BY+ // REFERENCE (`prev === theme`); a fresh object every render — which+ // `resolveWorkspaceTheme` returns for a custom theme — would make it fire+ // mid-construction, racing the codingame theme service and dropping the+ // editor to its read-only <pre> fallback.+ return useMemo(+ () => resolveWorkspaceTheme(profile as WorkspaceThemeInput),+ [profile]+ );+}diff --git a/frontend/src/react/components/ui/alert.tsx b/frontend/src/react/components/ui/alert.tsxindex a3cc710933..2a81c2e513 100644--- a/frontend/src/react/components/ui/alert.tsx+++ b/frontend/src/react/components/ui/alert.tsx@@ -10,13 +10,15 @@ import type { ComponentProps, ReactNode } from "react";import { cn } from "@/react/lib/utils";const alertVariants = cva(- "relative flex w-full items-start gap-x-3 rounded-xs border px-4 py-3 text-sm leading-5 text-control shadow-xs",+ "relative flex w-full items-start gap-x-3 rounded-xs border px-4 py-3 text-sm leading-5 shadow-xs",{variants: {+ // Text follows the variant's status color so a colored alert reads+ // cohesively (info tracks the theme accent; warning/error stay semantic).variant: {- info: "border-info/40 bg-info/10",- warning: "border-warning/40 bg-warning/10",- error: "border-error/40 bg-error/10",+ info: "border-info/40 bg-info/10 text-info",+ warning: "border-warning/40 bg-warning/10 text-warning",+ error: "border-error/40 bg-error/10 text-error",},},defaultVariants: {@@ -81,7 +83,9 @@ function Alert({{description !== undefined && (<divclassName={cn(- "text-sm text-control-light leading-6",+ // Inherit the variant text color (slightly softened) so the+ // body follows the theme like the rest of the alert.+ "text-sm leading-6 opacity-90",title !== undefined && "mt-1")}>diff --git a/frontend/src/react/components/ui/color-input.tsx b/frontend/src/react/components/ui/color-input.tsxnew file mode 100644index 0000000000..b0125ec151--- /dev/null+++ b/frontend/src/react/components/ui/color-input.tsx@@ -0,0 +1,95 @@+import { throttle } from "lodash-es";+import { useEffect, useMemo, useRef, useState } from "react";+import { Input } from "@/react/components/ui/input";+import { cn } from "@/react/lib/utils";++const HEX_RE = /^#?([0-9a-fA-F]{6})$/;++/** Normalize free text to `#rrggbb`, or null when it isn't a 6-digit hex. */+function normalizeHex(raw: string): string | null {+ const match = HEX_RE.exec(raw.trim());+ return match ? `#${match[1].toLowerCase()}` : null;+}++interface ColorInputProps {+ /** Current color as `#rrggbb`. */+ value: string;+ /** Called with a normalized `#rrggbb` whenever a valid color is entered. */+ onChange: (value: string) => void;+ id?: string;+ disabled?: boolean;+ ariaLabel?: string;+}++/**+ * A color control pairing the native swatch picker with an editable hex text+ * field, so a color can be picked visually OR typed as `#081C56`. The text+ * field accepts free input while typing and commits only a valid 6-digit hex+ * (reverting to the last good value on blur); the swatch always commits.+ */+export function ColorInput({+ value,+ onChange,+ id,+ disabled,+ ariaLabel,+}: Readonly<ColorInputProps>) {+ const [draft, setDraft] = useState(value);++ // The native swatch fires `input` events continuously while dragging. Throttle+ // them (via a ref so the throttled fn isn't recreated each render) so expensive+ // downstream work — re-deriving the theme + re-rendering the preview — runs at+ // a steady rate instead of on every tick. Trailing keeps the final color.+ const onChangeRef = useRef(onChange);+ onChangeRef.current = onChange;+ const emitSwatch = useMemo(+ () => throttle((next: string) => onChangeRef.current(next), 40),+ []+ );+ useEffect(() => () => emitSwatch.cancel(), [emitSwatch]);++ // Adopt external changes (swatch, preset switch, revert) but keep the user's+ // raw text while they are typing an equivalent value.+ useEffect(() => {+ setDraft((prev) => (normalizeHex(prev) === value ? prev : value));+ }, [value]);++ return (+ <>+ <input+ id={id}+ type="color"+ className={cn(+ // Strip the native swatch chrome (`appearance-none` + `p-0` + the+ // ::*-color-swatch pseudo-elements) so only our single outer border+ // shows — the browser otherwise draws its own inner swatch border.+ "size-8 shrink-0 appearance-none rounded-xs border border-control-border bg-transparent p-0",+ "[&::-webkit-color-swatch-wrapper]:p-0 [&::-webkit-color-swatch]:rounded-xs [&::-webkit-color-swatch]:border-0 [&::-moz-color-swatch]:rounded-xs [&::-moz-color-swatch]:border-0",+ disabled ? "cursor-not-allowed opacity-50" : "cursor-pointer"+ )}+ value={value}+ disabled={disabled}+ aria-label={ariaLabel}+ onChange={(e) => emitSwatch(e.target.value)}+ />+ <Input+ size="sm"+ className="h-8 w-28 font-mono"+ value={draft}+ disabled={disabled}+ aria-label={ariaLabel}+ spellCheck={false}+ autoComplete="off"+ onChange={(e) => {+ const raw = e.target.value;+ setDraft(raw);+ const normalized = normalizeHex(raw);+ if (normalized) onChange(normalized);+ }}+ onBlur={() => {+ if (!normalizeHex(draft)) setDraft(value);+ }}+ />+ </>+ );+}diff --git a/frontend/src/react/components/ui/segmented-control.tsx b/frontend/src/react/components/ui/segmented-control.tsxindex a287d7e193..fd005a8eda 100644--- a/frontend/src/react/components/ui/segmented-control.tsx+++ b/frontend/src/react/components/ui/segmented-control.tsx@@ -63,8 +63,9 @@ export function SegmentedControl<T extends string>({selected? "bg-accent text-accent-text": "bg-background text-control hover:bg-control-bg",- optionDisabled &&- "cursor-not-allowed opacity-50 hover:bg-background"+ optionDisabled+ ? "cursor-not-allowed opacity-50 hover:bg-background"+ : "cursor-pointer")}><Radio.Rootdiff --git a/frontend/src/react/components/ui/switch.tsx b/frontend/src/react/components/ui/switch.tsxindex d729bdf02c..5b2a33633b 100644--- a/frontend/src/react/components/ui/switch.tsx+++ b/frontend/src/react/components/ui/switch.tsx@@ -47,7 +47,10 @@ function Switch({className={cn("relative inline-flex cursor-pointer items-center rounded-full transition-colors",sizeClasses.root,- "bg-control-border data-[checked]:bg-accent",+ // Off-track: a muted, text-derived neutral (`control` @ 30%) rather than+ // the border token — so a saturated custom `border` color doesn't turn+ // the off state into a colored fill. Checked uses the accent.+ "bg-control/30 data-[checked]:bg-accent","focus:outline-hidden focus-visible:ring-2 focus-visible:ring-accent focus-visible:ring-offset-2","disabled:cursor-not-allowed disabled:opacity-50",classNamediff --git a/frontend/src/react/pages/settings/general/AnnouncementSection.tsx b/frontend/src/react/pages/settings/general/AnnouncementSection.tsxindex fb1030e8c0..912c91e574 100644--- a/frontend/src/react/pages/settings/general/AnnouncementSection.tsx+++ b/frontend/src/react/pages/settings/general/AnnouncementSection.tsx@@ -9,16 +9,28 @@ import {useState,} from "react";import { useTranslation } from "react-i18next";+import { AnnouncementBanner } from "@/react/components/AnnouncementBanner";+import {+ ANNOUNCEMENT_PRESET_KEYS,+ ANNOUNCEMENT_PRESETS,+ type AnnouncementTheme,+ hexToTriple,+ matchPresetKey,+ resolveAnnouncementTheme,+ tripleToHex,+} from "@/react/components/announcement-theme";import { FeatureBadge } from "@/react/components/FeatureBadge";import {PermissionGuard,usePermissionCheck,} from "@/react/components/PermissionGuard";+import { ColorInput } from "@/react/components/ui/color-input";import { Input } from "@/react/components/ui/input";+import { SegmentedControl } from "@/react/components/ui/segmented-control";import { usePlanFeature } from "@/react/hooks/useAppState";import { useAppStore } from "@/react/stores/app";import {- Announcement_AlertLevel,+ Announcement_AnnouncementThemeSchema,AnnouncementSchema,} from "@/types/proto-es/v1/setting_service_pb";import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";@@ -30,17 +42,20 @@ interface AnnouncementSectionProps {}interface AnnouncementState {- level: Announcement_AlertLevel;+ theme: AnnouncementTheme;text: string;link: string;}-const ALERT_LEVELS = [- Announcement_AlertLevel.INFO,- Announcement_AlertLevel.WARNING,- Announcement_AlertLevel.CRITICAL,+const CUSTOM_THEME_OPTION = "custom";++const THEME_OPTIONS = [+ ...ANNOUNCEMENT_PRESET_KEYS,+ CUSTOM_THEME_OPTION,] as const;+type ThemeOption = (typeof THEME_OPTIONS)[number];+export const AnnouncementSection = forwardRef<SectionHandle,AnnouncementSectionProps@@ -55,17 +70,10 @@ export const AnnouncementSection = forwardRef<const announcement = useAppStore.getState().getWorkspaceProfile().announcement;- if (announcement) {- return {- level: announcement.level,- text: announcement.text,- link: announcement.link,- };- }return {- level: Announcement_AlertLevel.INFO,- text: "",- link: "",+ theme: resolveAnnouncementTheme(announcement),+ text: announcement?.text ?? "",+ link: announcement?.link ?? "",};}, []);@@ -73,19 +81,31 @@ export const AnnouncementSection = forwardRef<cloneDeep(getRawAnnouncement()));+ // UI-only: keep "Custom" sticky even when the edited theme happens to match a+ // preset. Not persisted — the store only holds the resolved theme.+ const [customSelected, setCustomSelected] = useState(+ () => matchPresetKey(getRawAnnouncement().theme) === "custom"+ );+const isDirty = useCallback(() => !isEqual(state, getRawAnnouncement()),[state, getRawAnnouncement]);const revert = useCallback(() => {- setState(cloneDeep(getRawAnnouncement()));+ const raw = getRawAnnouncement();+ setState(cloneDeep(raw));+ setCustomSelected(matchPresetKey(raw.theme) === "custom");}, [getRawAnnouncement]);const update = useCallback(async () => {await useAppStore.getState().updateWorkspaceProfile({payload: {- announcement: create(AnnouncementSchema, { ...state }),+ announcement: create(AnnouncementSchema, {+ text: state.text,+ link: state.link,+ theme: create(Announcement_AnnouncementThemeSchema, state.theme),+ }),},updateMask: create(FieldMaskSchema, {paths: ["value.workspace_profile.announcement"],@@ -95,12 +115,48 @@ export const AnnouncementSection = forwardRef<useImperativeHandle(ref, () => ({ isDirty, revert, update }));+ const selectedTheme: ThemeOption =+ customSelected || matchPresetKey(state.theme) === "custom"+ ? "custom"+ : matchPresetKey(state.theme);++ const onSelectTheme = useCallback((option: ThemeOption) => {+ if (option === "custom") {+ setCustomSelected(true);+ return;+ }+ setCustomSelected(false);+ setState((s) => ({ ...s, theme: { ...ANNOUNCEMENT_PRESETS[option] } }));+ }, []);+useEffect(() => {onDirtyChange();}, [state, onDirtyChange]);const disabled = !canEdit || !hasFeature;+ const themeOptionLabel = (option: ThemeOption): string => {+ switch (option) {+ case "info":+ return t(+ "settings.general.workspace.announcement-alert-level.field.info"+ );+ case "warning":+ return t(+ "settings.general.workspace.announcement-alert-level.field.warning"+ );+ case "critical":+ return t(+ "settings.general.workspace.announcement-alert-level.field.critical"+ );+ default:+ return t("settings.general.workspace.announcement-theme.custom");+ }+ };++ const previewText =+ state.text || t("settings.general.workspace.announcement-text.placeholder");+return (<div id="announcement" className="py-6 lg:flex"><div className="text-left lg:w-1/4">@@ -117,84 +173,137 @@ export const AnnouncementSection = forwardRef<display="block"><div className="flex-1 lg:px-5">- <div className="mt-5 lg:mt-0">- {/* Alert level radio */}- <label className="flex items-center gap-x-2">- <span className="text-base font-semibold">- {t(- "settings.general.workspace.announcement-alert-level.description"+ <div className="mt-5 flex flex-col gap-y-6 lg:mt-0">+ {/* Theme selector */}+ <div className="flex flex-col gap-y-3">+ <div>+ <p className="text-base font-semibold">+ {t("settings.general.workspace.announcement-theme.self")}+ </p>+ <p className="mt-1 text-sm text-gray-400">+ {t(+ "settings.general.workspace.announcement-theme.description"+ )}+ </p>+ </div>++ <SegmentedControl+ ariaLabel={t(+ "settings.general.workspace.announcement-theme.self")}- </span>- </label>- <div className="flex flex-wrap py-2 gap-4">- {ALERT_LEVELS.map((level) => (- <label- key={level}- className="flex items-center gap-x-2 cursor-pointer"- >- <input- type="radio"- name="announcementLevel"- disabled={disabled}- checked={state.level === level}- onChange={() => setState((s) => ({ ...s, level }))}- />- <span>- {level === Announcement_AlertLevel.INFO &&- t(- "settings.general.workspace.announcement-alert-level.field.info"+ disabled={disabled}+ value={selectedTheme}+ onValueChange={onSelectTheme}+ options={THEME_OPTIONS.map((option) => ({+ value: option,+ label: themeOptionLabel(option),+ }))}+ />++ {selectedTheme === "custom" && (+ <div className="flex flex-col gap-y-3">+ <div className="flex items-center gap-x-3">+ <label+ className="w-28 text-sm text-control"+ htmlFor="announcement-theme-background"+ >+ {t(+ "settings.general.workspace.announcement-theme.background")}- {level === Announcement_AlertLevel.WARNING &&- t(- "settings.general.workspace.announcement-alert-level.field.warning"+ </label>+ <ColorInput+ id="announcement-theme-background"+ value={tripleToHex(state.theme.background)}+ disabled={disabled}+ ariaLabel={t(+ "settings.general.workspace.announcement-theme.background")}- {level === Announcement_AlertLevel.CRITICAL &&- t(- "settings.general.workspace.announcement-alert-level.field.critical"+ onChange={(hex) =>+ setState((s) => ({+ ...s,+ theme: { ...s.theme, background: hexToTriple(hex) },+ }))+ }+ />+ </div>+ <div className="flex items-center gap-x-3">+ <label+ className="w-28 text-sm text-control"+ htmlFor="announcement-theme-text"+ >+ {t("settings.general.workspace.announcement-theme.text")}+ </label>+ <ColorInput+ id="announcement-theme-text"+ value={tripleToHex(state.theme.text)}+ disabled={disabled}+ ariaLabel={t(+ "settings.general.workspace.announcement-theme.text")}- </span>- </label>- ))}+ onChange={(hex) =>+ setState((s) => ({+ ...s,+ theme: { ...s.theme, text: hexToTriple(hex) },+ }))+ }+ />+ </div>+ </div>+ )}++ <div className="flex flex-col gap-y-2">+ <p className="text-sm font-medium text-control">+ {t("common.preview")}+ </p>+ <AnnouncementBanner+ text={previewText}+ link={state.link}+ background={state.theme.background}+ textColor={state.theme.text}+ interactive={false}+ className="rounded-xs"+ />+ </div></div>{/* Announcement text */}- <label className="flex items-center mt-2 gap-x-2">- <span className="text-base font-semibold">+ <div>+ <p className="text-base font-semibold">{t("settings.general.workspace.announcement-text.self")}- </span>- </label>- <div className="mb-3 text-sm text-gray-400">- {t("settings.general.workspace.announcement-text.description")}+ </p>+ <p className="mb-3 text-sm text-gray-400">+ {t("settings.general.workspace.announcement-text.description")}+ </p>+ <Input+ value={state.text}+ className="w-full"+ placeholder={t(+ "settings.general.workspace.announcement-text.placeholder"+ )}+ disabled={disabled}+ onChange={(e) =>+ setState((s) => ({ ...s, text: e.target.value }))+ }+ /></div>- <Input- value={state.text}- className="mb-3 w-full"- placeholder={t(- "settings.general.workspace.announcement-text.placeholder"- )}- disabled={disabled}- onChange={(e) =>- setState((s) => ({ ...s, text: e.target.value }))- }- />{/* Extra link */}- <label className="flex items-center py-2 gap-x-2">- <span className="text-base font-semibold">+ <div>+ <p className="mb-2 text-base font-semibold">{t("settings.general.workspace.extra-link.self")}- </span>- </label>- <Input- value={state.link}- className="w-full"- placeholder={t(- "settings.general.workspace.extra-link.placeholder"- )}- disabled={disabled}- onChange={(e) =>- setState((s) => ({ ...s, link: e.target.value }))- }- />+ </p>+ <Input+ value={state.link}+ className="w-full"+ placeholder={t(+ "settings.general.workspace.extra-link.placeholder"+ )}+ disabled={disabled}+ onChange={(e) =>+ setState((s) => ({ ...s, link: e.target.value }))+ }+ />+ </div></div></div></PermissionGuard>diff --git a/frontend/src/react/pages/settings/general/SQLEditorSection.test.tsx b/frontend/src/react/pages/settings/general/SQLEditorSection.test.tsxnew file mode 100644index 0000000000..589bf7b0c7--- /dev/null+++ b/frontend/src/react/pages/settings/general/SQLEditorSection.test.tsx@@ -0,0 +1,288 @@+import { act, createRef, type ReactElement } from "react";+import { createRoot, type Root } from "react-dom/client";+import { afterEach, beforeEach, describe, expect, test, vi } from "vitest";++(+ globalThis as { IS_REACT_ACT_ENVIRONMENT?: boolean }+).IS_REACT_ACT_ENVIRONMENT = true;++const mocks = vi.hoisted(() => {+ return {+ profile: {+ sqlEditorThemeId: "",+ sqlEditorCustomTheme: undefined as+ | undefined+ | {+ id: string;+ name: string;+ monacoBase: string;+ tokens: Record<string, string>;+ },+ sqlResultSize: 0n,+ queryTimeout: undefined as undefined | { seconds: bigint },+ },+ policy: {+ disableExport: false,+ disableCopyData: false,+ allowAdminDataSource: false,+ maximumResultRows: 0n,+ },+ updateWorkspaceProfile: vi.fn(+ async (_params: {+ payload: {+ sqlEditorThemeId?: string;+ sqlEditorCustomTheme?: {+ id: string;+ name: string;+ tokens: Record<string, string>;+ };+ };+ updateMask: { paths: string[] };+ }) => {}+ ),+ upsertPolicy: vi.fn(async (_params: unknown) => {}),+ getOrFetchPolicyByParentAndType: vi.fn(async (_params: unknown) => {}),+ hasWorkspacePermissionV2: vi.fn((_permission: string) => true),+ };+});++vi.mock("react-i18next", () => ({+ useTranslation: () => ({ t: (key: string) => key }),+ // ThemePreview now embeds MonacoEditor, whose transitive imports pull in+ // src/react/i18n.ts which calls `i18n.use(initReactI18next)`.+ initReactI18next: { type: "3rdParty", init: () => {} },+}));++vi.mock("@/utils", () => ({+ hasWorkspacePermissionV2: mocks.hasWorkspacePermissionV2,+ isDev: () => true,+}));++vi.mock("@/react/hooks/useAppState", () => ({+ usePlanFeature: () => true,+ useWorkspaceResourceName: () => "workspaces/-",+}));++vi.mock("@/react/components/FeatureBadge", () => ({+ FeatureBadge: () => null,+}));++// ThemePreview embeds a real Monaco editor; stub it so the heavy codingame+// monaco runtime (which imports .css) isn't loaded in the node test env.+vi.mock("@/react/components/monaco/MonacoEditor", () => ({+ MonacoEditor: ({ content }: { content: string }) => (+ <textarea data-testid="monaco-editor" readOnly value={content} />+ ),+}));++// The editor-theme enumeration dynamic-imports the codingame VSCode api ++// services; stub it so the test doesn't pull that chain into jsdom.+vi.mock("@/react/components/monaco/editorThemes", () => ({+ BUILTIN_EDITOR_THEMES: [{ id: "vs", label: "Light", type: "light" }],+ getAvailableEditorThemes: vi.fn(async () => [+ { id: "vs", label: "Light", type: "light" },+ { id: "vs-dark", label: "Dark", type: "dark" },+ ]),+}));++// ThemePreview now embeds the real result grid (SQLResultViewProvider ++// VirtualDataTable / VirtualDataBlock). Those transitively pull in the SQL+// Editor store chain (src/react/stores/sqlEditor/editor.ts), which reads+// useAppStore.getState() at module-eval time — colliding with this file's+// hoisted app-store mock. Stub them like MonacoEditor: render-only shells with+// no store usage. The theme preview only needs them to mount.+vi.mock("@/react/components/sql-editor/ResultView/context", () => ({+ SQLResultViewProvider: ({ children }: { children: React.ReactNode }) => (+ <>{children}</>+ ),+}));+vi.mock("@/react/components/sql-editor/ResultView/VirtualDataTable", () => ({+ VirtualDataTable: () => <div data-testid="virtual-data-table" />,+}));+vi.mock("@/react/components/sql-editor/ResultView/VirtualDataBlock", () => ({+ VirtualDataBlock: () => <div data-testid="virtual-data-block" />,+}));++vi.mock("@/react/components/PermissionGuard", () => ({+ PermissionGuard: ({ children }: { children: React.ReactNode }) => (+ <>{children}</>+ ),+}));++// The theme preview/editor import SQLEditorThemeScope etc.; render them as-is.++const storeState = {+ getWorkspaceProfile: () => mocks.profile,+ getQueryDataPolicyByParent: () => mocks.policy,+ getOrFetchPolicyByParentAndType: mocks.getOrFetchPolicyByParentAndType,+ updateWorkspaceProfile: mocks.updateWorkspaceProfile,+ upsertPolicy: mocks.upsertPolicy,+};++vi.mock("@/react/stores/app", () => ({+ useAppStore: Object.assign(+ (selector: (s: typeof storeState) => unknown) => selector(storeState),+ { getState: () => storeState }+ ),+}));++vi.mock("@/store", () => ({+ DEFAULT_MAX_RESULT_SIZE_IN_MB: 100,+}));++import { SQLEditorSection } from "./SQLEditorSection";+import type { SectionHandle } from "./useSettingSection";++let container: HTMLDivElement;+let root: Root;++function render(el: ReactElement) {+ act(() => {+ root.render(el);+ });+}++beforeEach(() => {+ container = document.createElement("div");+ document.body.appendChild(container);+ root = createRoot(container);+ mocks.profile.sqlEditorThemeId = "";+ mocks.profile.sqlEditorCustomTheme = undefined;+ mocks.updateWorkspaceProfile.mockClear();+ mocks.hasWorkspacePermissionV2.mockReturnValue(true);+});++afterEach(() => {+ act(() => root.unmount());+ container.remove();+});++function querySegment(label: string): HTMLElement | undefined {+ // Segment labels render their text; find the clickable label by text.+ const labels = Array.from(container.querySelectorAll("label"));+ return labels.find((l) => l.textContent?.trim() === label);+}++describe("SQLEditorSection theme", () => {+ test("selecting a preset sets dirty and saves the theme id, clearing custom", async () => {+ const ref = createRef<SectionHandle>();+ render(+ <SQLEditorSection ref={ref} title="SQL Editor" onDirtyChange={() => {}} />+ );++ expect(ref.current?.isDirty()).toBe(false);++ // Pick the "dark" preset (preset.name === "Dark").+ const darkSegment = querySegment("Default Dark");+ expect(darkSegment).toBeTruthy();+ const radio = darkSegment?.querySelector("input");+ act(() => {+ radio?.click();+ });++ expect(ref.current?.isDirty()).toBe(true);++ await act(async () => {+ await ref.current?.update();+ });++ const themeCall = mocks.updateWorkspaceProfile.mock.calls.find((c) =>+ c[0].updateMask.paths.includes(+ "value.workspace_profile.sql_editor_theme_id"+ )+ );+ expect(themeCall).toBeTruthy();+ expect(themeCall![0].payload.sqlEditorThemeId).toBe("dark");+ expect(themeCall![0].payload.sqlEditorCustomTheme).toBeUndefined();+ expect(themeCall![0].updateMask.paths).toEqual([+ "value.workspace_profile.sql_editor_theme_id",+ "value.workspace_profile.sql_editor_custom_theme",+ ]);+ });++ test("selecting Custom + editing an anchor yields a full-token draft with stable uuid", async () => {+ const ref = createRef<SectionHandle>();+ render(+ <SQLEditorSection ref={ref} title="SQL Editor" onDirtyChange={() => {}} />+ );++ const customSegment = querySegment(+ "settings.general.workspace.sql-editor-theme.custom"+ );+ expect(customSegment).toBeTruthy();+ const radio = customSegment?.querySelector("input");+ act(() => {+ radio?.click();+ });++ expect(ref.current?.isDirty()).toBe(true);++ // Capture the seeded uuid from the first save.+ await act(async () => {+ await ref.current?.update();+ });+ const firstCall = mocks.updateWorkspaceProfile.mock.calls.find(+ (c) => c[0].payload.sqlEditorCustomTheme+ );+ expect(firstCall).toBeTruthy();+ const draft = firstCall![0].payload.sqlEditorCustomTheme!;+ const id = draft.id;+ expect(id).toMatch(/[0-9a-f-]{36}/);+ // Tokens are complete (background present).+ expect(draft.tokens["--color-background"]).toBeTruthy();+ expect(draft.tokens["--color-main"]).toBeTruthy();++ // Edit a color anchor; uuid must be preserved.+ const colorInput = container.querySelector(+ 'input[type="color"]'+ ) as HTMLInputElement;+ expect(colorInput).toBeTruthy();+ act(() => {+ colorInput.value = "#123456";+ colorInput.dispatchEvent(new Event("input", { bubbles: true }));+ });++ mocks.updateWorkspaceProfile.mockClear();+ await act(async () => {+ await ref.current?.update();+ });+ const editedCall = mocks.updateWorkspaceProfile.mock.calls.find(+ (c) => c[0].payload.sqlEditorCustomTheme+ );+ expect(editedCall![0].payload.sqlEditorCustomTheme!.id).toBe(id);+ });++ test("revert restores the initial theme", () => {+ const ref = createRef<SectionHandle>();+ render(+ <SQLEditorSection ref={ref} title="SQL Editor" onDirtyChange={() => {}} />+ );++ const darkSegment = querySegment("Default Dark");+ act(() => {+ darkSegment?.querySelector("input")?.click();+ });+ expect(ref.current?.isDirty()).toBe(true);++ act(() => {+ ref.current?.revert();+ });+ expect(ref.current?.isDirty()).toBe(false);+ });++ test("without setWorkspaceProfile permission the theme control is disabled", () => {+ mocks.hasWorkspacePermissionV2.mockImplementation(+ (p: string) => p !== "bb.settings.setWorkspaceProfile"+ );+ const ref = createRef<SectionHandle>();+ render(+ <SQLEditorSection ref={ref} title="SQL Editor" onDirtyChange={() => {}} />+ );++ const group = container.querySelector('[role="radiogroup"]');+ // SegmentedControl renders radios; when disabled they carry data-disabled.+ const anyDisabled = container.querySelector("input[data-disabled]");+ expect(group || anyDisabled).toBeTruthy();+ expect(anyDisabled).toBeTruthy();+ });+});diff --git a/frontend/src/react/pages/settings/general/SQLEditorSection.tsx b/frontend/src/react/pages/settings/general/SQLEditorSection.tsxindex f563618040..b2cab5ed2e 100644--- a/frontend/src/react/pages/settings/general/SQLEditorSection.tsx+++ b/frontend/src/react/pages/settings/general/SQLEditorSection.tsx@@ -10,10 +10,28 @@ import {useState,} from "react";import { useTranslation } from "react-i18next";+import { v4 as uuidv4 } from "uuid";import { FeatureBadge } from "@/react/components/FeatureBadge";+import {+ BUILTIN_EDITOR_THEMES,+ type EditorThemeOption,+ getAvailableEditorThemes,+} from "@/react/components/monaco/editorThemes";import { PermissionGuard } from "@/react/components/PermissionGuard";+import {+ deriveThemeFromAnchors,+ type ThemeAnchors,+ themeToAnchors,+} from "@/react/components/sql-editor/theme/derive";+import {+ PRESET_BY_ID,+ PRESETS,+} from "@/react/components/sql-editor/theme/presets";+import type { SQLEditorTheme } from "@/react/components/sql-editor/theme/types";+import { resolveWorkspaceTheme } from "@/react/components/sql-editor/theme/useWorkspaceSQLEditorTheme";import { Checkbox } from "@/react/components/ui/checkbox";import { NumberInput } from "@/react/components/ui/number-input";+import { SegmentedControl } from "@/react/components/ui/segmented-control";import {usePlanFeature,useWorkspaceResourceName,@@ -25,10 +43,15 @@ import {PolicyType,QueryDataPolicySchema,} from "@/types/proto-es/v1/org_policy_service_pb";+import { SQLEditorThemeSettingSchema } from "@/types/proto-es/v1/setting_service_pb";import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";-import { hasWorkspacePermissionV2 } from "@/utils";+import { hasWorkspacePermissionV2, isDev } from "@/utils";+import { ThemeAnchorEditor } from "./sql-editor-theme/ThemeAnchorEditor";+import { ThemePreview } from "./sql-editor-theme/ThemePreview";import type { SectionHandle } from "./useSettingSection";+const CUSTOM_THEME_OPTION = "__custom__";+interface SQLEditorSectionProps {title: string;onDirtyChange: () => void;@@ -78,6 +101,22 @@ export const SQLEditorSection = forwardRef<});}, [resource]);+ // The editor color themes registered with the VSCode theme service, for the+ // custom-theme "Editor syntax" picker. Falls back to the built-ins. Dev-only.+ const [editorThemes, setEditorThemes] = useState<EditorThemeOption[]>(+ BUILTIN_EDITOR_THEMES+ );+ useEffect(() => {+ if (!isDev()) return;+ let active = true;+ void getAvailableEditorThemes().then((themes) => {+ if (active) setEditorThemes(themes);+ });+ return () => {+ active = false;+ };+ }, []);+const policyPayload = useAppStore((s) =>s.getQueryDataPolicyByParent(resource));@@ -117,6 +156,100 @@ export const SQLEditorSection = forwardRef<}}, [getInitialState]);+ // --- SQL Editor theme ---+ const getInitialTheme = useCallback((): {+ selectedThemeId: string;+ customDraft: SQLEditorTheme | null;+ } => {+ const custom = workspaceProfile.sqlEditorCustomTheme;+ return {+ selectedThemeId: workspaceProfile.sqlEditorThemeId || "",+ customDraft: custom+ ? {+ id: custom.id,+ name: custom.name,+ monacoBase: custom.monacoBase as SQLEditorTheme["monacoBase"],+ tokens: custom.tokens as SQLEditorTheme["tokens"],+ }+ : null,+ };+ }, [workspaceProfile]);++ const [selectedThemeId, setSelectedThemeId] = useState<string>(+ () => getInitialTheme().selectedThemeId+ );+ const [customDraft, setCustomDraft] = useState<SQLEditorTheme | null>(+ () => getInitialTheme().customDraft+ );++ // Re-sync theme state when the profile loads/changes.+ const prevInitialThemeRef = useRef(getInitialTheme());+ useEffect(() => {+ const next = getInitialTheme();+ if (!isEqual(prevInitialThemeRef.current, next)) {+ prevInitialThemeRef.current = next;+ setSelectedThemeId(next.selectedThemeId);+ setCustomDraft(next.customDraft);+ }+ }, [getInitialTheme]);++ const isCustomSelected =+ customDraft !== null && selectedThemeId === customDraft.id;++ const previewTheme: SQLEditorTheme = isCustomSelected+ ? customDraft+ : (PRESET_BY_ID[selectedThemeId] ?? PRESET_BY_ID.light);++ const handleSelectTheme = (value: string) => {+ if (value === CUSTOM_THEME_OPTION) {+ if (customDraft) {+ setSelectedThemeId(customDraft.id);+ return;+ }+ // Seed the custom draft as a FULL copy of the currently-selected theme+ // (all tokens + the editor theme), not a 5-anchor re-derivation — so it+ // starts identical to the built-in. Editing an anchor afterwards+ // re-derives the chrome tokens from the 5 anchors.+ const source = resolveWorkspaceTheme({+ sqlEditorThemeId: selectedThemeId,+ sqlEditorCustomTheme: customDraft ?? undefined,+ });+ const draft: SQLEditorTheme = {+ id: uuidv4(),+ name: t("settings.general.workspace.sql-editor-theme.custom"),+ monacoBase: source.monacoBase,+ tokens: { ...source.tokens },+ };+ setCustomDraft(draft);+ setSelectedThemeId(draft.id);+ return;+ }+ setSelectedThemeId(value);+ setCustomDraft(null);+ };++ const handleAnchorsChange = (nextAnchors: ThemeAnchors) => {+ if (!customDraft) return;+ // Name + the chosen editor base are preserved; only the anchors re-derive+ // the chrome tokens. Passing `customDraft.monacoBase` keeps the admin's+ // explicit light/dark choice from being overwritten by the luminance+ // default on every anchor edit.+ setCustomDraft({+ ...deriveThemeFromAnchors(+ nextAnchors,+ customDraft.name,+ customDraft.monacoBase+ ),+ id: customDraft.id,+ });+ };++ const handleEditorThemeChange = (id: string) => {+ if (!customDraft) return;+ // Only swaps the editor's syntax theme — chrome tokens are unchanged.+ setCustomDraft({ ...customDraft, monacoBase: id });+ };+// Normalize `null` (transiently empty inputs) to the same defaults used by// `update()` so that a cleared-then-saved field doesn't leave the section// permanently dirty.@@ -130,14 +263,26 @@ export const SQLEditorSection = forwardRef<[]);+ const isThemeDirty = useCallback(() => {+ const init = getInitialTheme();+ return (+ init.selectedThemeId !== selectedThemeId ||+ !isEqual(init.customDraft, customDraft)+ );+ }, [getInitialTheme, selectedThemeId, customDraft]);+const isDirty = useCallback(- () => !isEqual(normalizeForCompare(state), getInitialState()),- [state, getInitialState, normalizeForCompare]+ () =>+ !isEqual(normalizeForCompare(state), getInitialState()) || isThemeDirty(),+ [state, getInitialState, normalizeForCompare, isThemeDirty]);const revert = useCallback(() => {setState(getInitialState());- }, [getInitialState]);+ const initTheme = getInitialTheme();+ setSelectedThemeId(initTheme.selectedThemeId);+ setCustomDraft(initTheme.customDraft);+ }, [getInitialState, getInitialTheme]);const update = useCallback(async () => {const init = getInitialState();@@ -191,14 +336,41 @@ export const SQLEditorSection = forwardRef<},},});- }, [state, resource, policyPayload, getInitialState]);++ // Update SQL Editor theme if changed.+ if (isThemeDirty()) {+ await useAppStore.getState().updateWorkspaceProfile({+ payload: {+ sqlEditorThemeId: selectedThemeId,+ // `undefined` clears the custom theme when a built-in is selected.+ sqlEditorCustomTheme: customDraft+ ? create(SQLEditorThemeSettingSchema, customDraft)+ : undefined,+ },+ updateMask: create(FieldMaskSchema, {+ paths: [+ "value.workspace_profile.sql_editor_theme_id",+ "value.workspace_profile.sql_editor_custom_theme",+ ],+ }),+ });+ }+ }, [+ state,+ resource,+ policyPayload,+ getInitialState,+ isThemeDirty,+ selectedThemeId,+ customDraft,+ ]);useImperativeHandle(ref, () => ({ isDirty, revert, update }));// Notify parent of dirty changesuseEffect(() => {onDirtyChange();- }, [state, onDirtyChange]);+ }, [state, selectedThemeId, customDraft, onDirtyChange]);const handleToggle = (field: "disableExport" | "disableCopyData" | "allowAdminDataSource",@@ -388,6 +560,64 @@ export const SQLEditorSection = forwardRef<</div></div></PermissionGuard>++ {/* SQL Editor theme — dev-only until the feature ships. */}+ {isDev() && (+ <PermissionGuard+ permissions={["bb.settings.setWorkspaceProfile"]}+ display="block"+ >+ <div className="flex flex-col gap-y-3">+ <div>+ <p className="text-base font-semibold">+ {t("settings.general.workspace.sql-editor-theme.self")}+ </p>+ <p className="text-sm text-gray-400 mt-1">+ {t("settings.general.workspace.sql-editor-theme.description")}+ </p>+ </div>++ <SegmentedControl+ ariaLabel={t(+ "settings.general.workspace.sql-editor-theme.self"+ )}+ disabled={!canSetWorkspaceProfile}+ value={isCustomSelected ? CUSTOM_THEME_OPTION : selectedThemeId}+ onValueChange={handleSelectTheme}+ options={[+ ...PRESETS.map((preset) => ({+ value: preset.id,+ label: preset.name,+ })),+ {+ value: CUSTOM_THEME_OPTION,+ label: t(+ "settings.general.workspace.sql-editor-theme.custom"+ ),+ },+ ]}+ />++ {isCustomSelected && customDraft && (+ <ThemeAnchorEditor+ value={themeToAnchors(customDraft)}+ editorTheme={customDraft.monacoBase}+ editorThemes={editorThemes}+ disabled={!canSetWorkspaceProfile}+ onChange={handleAnchorsChange}+ onEditorThemeChange={handleEditorThemeChange}+ />+ )}++ <div className="flex flex-col gap-y-2">+ <p className="text-sm font-medium text-control">+ {t("common.preview")}+ </p>+ <ThemePreview theme={previewTheme} />+ </div>+ </div>+ </PermissionGuard>+ )}</div></div>);diff --git a/frontend/src/react/pages/settings/general/sql-editor-theme/ThemeAnchorEditor.tsx b/frontend/src/react/pages/settings/general/sql-editor-theme/ThemeAnchorEditor.tsxnew file mode 100644index 0000000000..865a1030d5--- /dev/null+++ b/frontend/src/react/pages/settings/general/sql-editor-theme/ThemeAnchorEditor.tsx@@ -0,0 +1,140 @@+import { CircleHelp } from "lucide-react";+import { useTranslation } from "react-i18next";+import type { EditorThemeOption } from "@/react/components/monaco/editorThemes";+import type { ThemeAnchors } from "@/react/components/sql-editor/theme/derive";+import { ColorInput } from "@/react/components/ui/color-input";+import {+ Select,+ SelectContent,+ SelectItem,+ SelectTrigger,+ SelectValue,+} from "@/react/components/ui/select";+import { Tooltip } from "@/react/components/ui/tooltip";++interface ThemeAnchorEditorProps {+ value: ThemeAnchors;+ /** The chosen editor theme id (`monacoBase`). */+ editorTheme: string;+ /** Editor color themes registered with the VSCode theme service. */+ editorThemes: EditorThemeOption[];+ disabled?: boolean;+ onChange: (next: ThemeAnchors) => void;+ onEditorThemeChange: (id: string) => void;+}++const ANCHOR_KEYS: (keyof ThemeAnchors)[] = [+ "background",+ "text",+ "accent",+ "border",+];++// Friendly labels for the standalone-alias ids, in case a stored theme still+// references one (they aren't part of the enumerated list).+const ALIAS_LABELS: Record<string, string> = { vs: "Light", "vs-dark": "Dark" };++// A fixed-width field label with a help tooltip explaining what the color drives+// (e.g. "Surface" isn't self-explanatory).+function FieldLabel({+ htmlFor,+ label,+ tip,+}: Readonly<{ htmlFor?: string; label: string; tip: string }>) {+ return (+ <div className="flex w-28 items-center gap-x-1">+ {htmlFor ? (+ <label className="text-sm text-control" htmlFor={htmlFor}>+ {label}+ </label>+ ) : (+ <span className="text-sm text-control">{label}</span>+ )}+ <Tooltip content={tip}>+ <span className="inline-flex">+ <CircleHelp className="size-3.5 shrink-0 cursor-help text-control-light" />+ </span>+ </Tooltip>+ </div>+ );+}++export function ThemeAnchorEditor({+ value,+ editorTheme,+ editorThemes,+ disabled,+ onChange,+ onEditorThemeChange,+}: Readonly<ThemeAnchorEditorProps>) {+ const { t } = useTranslation();++ // Ensure the current value is always representable so the trigger never shows+ // a bare id (e.g. a legacy "vs" that isn't in the enumerated list).+ const themeOptions = editorThemes.some((option) => option.id === editorTheme)+ ? editorThemes+ : [+ {+ id: editorTheme,+ label: ALIAS_LABELS[editorTheme] ?? editorTheme,+ type: "light" as const,+ },+ ...editorThemes,+ ];++ return (+ <div className="flex flex-col gap-y-3">+ {ANCHOR_KEYS.map((key) => (+ <div key={key} className="flex items-center gap-x-3">+ <FieldLabel+ htmlFor={`anchor-${key}`}+ label={t(+ `settings.general.workspace.sql-editor-theme.anchor.${key}`+ )}+ tip={t(+ `settings.general.workspace.sql-editor-theme.anchor.${key}-tip`+ )}+ />+ <ColorInput+ id={`anchor-${key}`}+ value={value[key]}+ disabled={disabled}+ ariaLabel={t(+ `settings.general.workspace.sql-editor-theme.anchor.${key}`+ )}+ onChange={(hex) => onChange({ ...value, [key]: hex })}+ />+ </div>+ ))}++ {/* Editor syntax theme — the VSCode color theme applied to the code+ editor. Data-driven from the themes the theme service has registered;+ the chrome background still shows through the transparent canvas. */}+ <div className="flex items-center gap-x-3">+ <FieldLabel+ label={t("settings.general.workspace.sql-editor-theme.editor-theme")}+ tip={t(+ "settings.general.workspace.sql-editor-theme.editor-theme-tip"+ )}+ />+ <Select+ value={editorTheme}+ onValueChange={(id) => {+ if (typeof id === "string") onEditorThemeChange(id);+ }}+ >+ <SelectTrigger size="sm" className="w-60" disabled={disabled}>+ <SelectValue />+ </SelectTrigger>+ <SelectContent>+ {themeOptions.map((option) => (+ <SelectItem key={option.id} value={option.id}>+ {option.label}+ </SelectItem>+ ))}+ </SelectContent>+ </Select>+ </div>+ </div>+ );+}diff --git a/frontend/src/react/pages/settings/general/sql-editor-theme/ThemePreview.tsx b/frontend/src/react/pages/settings/general/sql-editor-theme/ThemePreview.tsxnew file mode 100644index 0000000000..b70193aa85--- /dev/null+++ b/frontend/src/react/pages/settings/general/sql-editor-theme/ThemePreview.tsx@@ -0,0 +1,265 @@+import { create } from "@bufbuild/protobuf";+import { Copy, Play, Plus, Save, Share2, X } from "lucide-react";+import { useState } from "react";+import { useTranslation } from "react-i18next";+import {+ AdvancedSearch,+ type SearchParams,+} from "@/react/components/AdvancedSearch";+import { MonacoEditor } from "@/react/components/monaco/MonacoEditor";+import { SQLResultViewProvider } from "@/react/components/sql-editor/ResultView/context";+import type {+ ResultTableColumn,+ ResultTableRow,+} from "@/react/components/sql-editor/ResultView/types";+import { VirtualDataBlock } from "@/react/components/sql-editor/ResultView/VirtualDataBlock";+import { VirtualDataTable } from "@/react/components/sql-editor/ResultView/VirtualDataTable";+import { monacoThemeName } from "@/react/components/sql-editor/theme/derive";+import { SQLEditorThemeScope } from "@/react/components/sql-editor/theme/SQLEditorThemeScope";+import type { SQLEditorTheme } from "@/react/components/sql-editor/theme/types";+import { Button } from "@/react/components/ui/button";+import { Switch } from "@/react/components/ui/switch";+import { Engine } from "@/types/proto-es/v1/common_pb";+import { DatabaseSchema$ } from "@/types/proto-es/v1/database_service_pb";+import {+ QueryRowSchema,+ RowValueSchema,+} from "@/types/proto-es/v1/sql_service_pb";++interface ThemePreviewProps {+ theme: SQLEditorTheme;+}++// Illustrative sample DATA (a user's SQL, rows, worksheet/timestamp names) —+// representative content, not translatable UI text, so literals are correct+// here. The chrome LABELS (Run/Save/Share/Copy all/rows/etc.) use i18n via `t`.+const PREVIEW_SQL = `SELECT id, name, created_at+FROM "users"+WHERE status = 'active'+ORDER BY created_at DESC+LIMIT 50;`;++const noop = () => {};++// Sample result set fed into the REAL VirtualDataTable / VirtualDataBlock so+// the preview grid re-themes through live result components instead of mock+// markup. Columns/rows mirror the `PREVIEW_SQL` SELECT (id, name, created_at;+// all status='active', ordered by created_at DESC). Illustrative literals.+const SAMPLE_COLUMNS: ResultTableColumn[] = [+ { id: "id", name: "id", columnType: "int4" },+ { id: "name", name: "name", columnType: "varchar" },+ { id: "created_at", name: "created_at", columnType: "timestamp" },+];++const str = (value: string) =>+ create(RowValueSchema, { kind: { case: "stringValue", value } });++const SAMPLE_ROWS: ResultTableRow[] = [+ ["101", "alice", "2026-06-17 09:18"],+ ["102", "bob", "2026-06-16 14:02"],+ ["103", "carol", "2026-06-15 11:47"],+ ["104", "dave", "2026-06-14 08:30"],+ ["105", "erin", "2026-06-13 16:05"],+].map((cells, index) => ({+ key: index,+ item: create(QueryRowSchema, { values: cells.map(str) }),+}));++const SAMPLE_DATABASE = create(DatabaseSchema$, {+ name: "instances/sample/databases/users",+});++const EMPTY_SEARCH: SearchParams = { query: "", scopes: [] };++/**+ * A miniature SQL Editor right-panel rendered with the given theme's tokens:+ * worksheet tabs, the operation toolbar, a real (read-only) Monaco editor, and+ * a result sample. The whole box is wrapped in a single `SQLEditorThemeScope`+ * so every descendant re-themes purely through the scope's CSS custom+ * properties.+ *+ * Tabs mirror `TabItem`, the toolbar mirrors `EditorAction` (minus admin/AI/+ * connection buttons), and the Monaco integration mirrors `StandardPanel`'s+ * `SQLEditor` (transparent canvas + base-preset Monaco theme).+ */+export function ThemePreview({ theme }: Readonly<ThemePreviewProps>) {+ const { t } = useTranslation();+ // The chrome bg comes from the scope's `--color-background` (via the+ // transparent canvas); the chosen editor theme drives the syntax colors.++ // Mirrors `SingleResultView`'s table/vertical toggle.+ const [vertical, setVertical] = useState(false);++ return (+ <SQLEditorThemeScope+ theme={theme}+ className="overflow-hidden rounded border border-block-border bg-background text-main"+ >+ <div className="flex flex-col">+ {/* Tabs row. Each tab carries a top accent stripe + a right divider,+ mirroring the real `TabItem` (`border-r` + body `border-t`). The bar+ itself shows the editor background (the real `TabList` has no fill),+ not the surface tint. */}+ <div className="flex items-stretch border-b border-block-border bg-background text-sm">+ <div className="flex h-9 items-center gap-x-2 border-r border-t-[3px] border-r-block-border border-t-accent bg-background px-3 text-accent">+ <span>{t("common.untitled")}</span>+ <X className="size-3.5" />+ </div>+ {/* Inactive tab: bg changes on hover, like the real editor. */}+ <div className="flex h-9 items-center gap-x-2 border-r border-t-[3px] border-r-block-border border-t-transparent px-3 text-control-light transition-colors hover:bg-control-bg">+ <span>Worksheet 2</span>+ <X className="size-3.5" />+ </div>+ <div className="flex h-9 items-center px-2 text-control-light">+ <Plus className="size-4" />+ </div>+ </div>++ {/* Toolbar row */}+ <div className="flex items-center gap-x-2 border-b border-block-border bg-background p-2">+ <Button+ type="button"+ variant="default"+ size="sm"+ className="h-7 gap-1 px-1.5"+ >+ <Play className="size-4 fill-current" />+ <span>{t("common.run")}</span>+ </Button>+ <Button+ type="button"+ variant="outline"+ size="sm"+ className="h-7 px-1.5"+ aria-label={t("common.save")}+ >+ <Save className="size-4" />+ </Button>+ <Button+ type="button"+ variant="outline"+ size="sm"+ className="h-7 px-1.5"+ aria-label={t("common.share")}+ >+ <Share2 className="size-4" />+ </Button>+ </div>++ {/* Editor */}+ <div className="sqleditor--monaco-transparent h-64 bg-background">+ <MonacoEditor+ key={theme.monacoBase}+ autoHeight={false}+ className="h-full w-full"+ content={`-- Preview\n${PREVIEW_SQL}`}+ language="sql"+ readOnly+ options={{+ theme: monacoThemeName(theme),+ minimap: { enabled: false },+ lineNumbers: "on",+ scrollBeyondLastLine: false,+ }}+ onChange={noop}+ />+ </div>++ {/* Result panel — top border divides it from the editor; given real+ height (history tabs + toolbar + a fuller grid) so it reads on par+ with the Monaco editor above, like the real SQL Editor. */}+ <div className="flex flex-col border-t-2 border-block-border bg-background">+ {/* Result history tabs (query timestamps; active one accent), each+ with a close icon like the real editor. */}+ <div className="flex items-center gap-x-4 border-b border-block-border px-3 text-sm">+ <span className="flex items-center gap-x-2 border-b-2 border-accent py-1.5 text-accent">+ 9:19:44 AM+ <X className="size-3.5" />+ </span>+ <span className="flex items-center gap-x-2 py-1.5 text-control-light">+ 9:18:29 AM+ <X className="size-3.5" />+ </span>+ </div>+ {/* Result toolbar — the real AdvancedSearch (left), row count + Copy+ all button (right). Same component the live result view renders, so+ it themes identically; static here (empty scopes, noop change). */}+ <div className="flex items-center gap-x-3 border-b border-block-border px-3 py-2">+ <div className="w-72 max-w-full">+ <AdvancedSearch+ params={EMPTY_SEARCH}+ scopeOptions={[]}+ placeholder=""+ onParamsChange={noop}+ />+ </div>+ <span className="shrink-0 text-sm text-control-light">+ 50 {t("sql-editor.rows.self")}+ </span>+ <div className="ml-auto flex shrink-0 items-center gap-x-1">+ <Switch checked={vertical} onCheckedChange={setVertical} />+ <span className="text-sm text-control-light">+ {t("sql-editor.vertical-display")}+ </span>+ </div>+ <Button+ type="button"+ variant="outline"+ size="sm"+ className="h-7 shrink-0 gap-1 px-2"+ >+ <Copy className="size-4" />+ <span>{t("common.copy-all")}</span>+ </Button>+ </div>+ {/* Real result grid — the live VirtualDataTable / VirtualDataBlock+ wrapped in SQLResultViewProvider so the grid re-themes through the+ actual result components. They virtual-scroll, so the body needs a+ height-defined flex parent (`h-64 flex-col`). */}+ <SQLResultViewProvider+ engine={Engine.POSTGRES}+ rows={SAMPLE_ROWS}+ columns={SAMPLE_COLUMNS}+ disallowCopyingData+ >+ <div className="flex h-64 flex-col mt-3 px-3 pb-2">+ {vertical ? (+ <VirtualDataBlock+ rows={SAMPLE_ROWS}+ columns={SAMPLE_COLUMNS}+ activeRowIndex={-1}+ isSensitiveColumn={() => false}+ database={SAMPLE_DATABASE}+ statement={PREVIEW_SQL}+ search={EMPTY_SEARCH}+ />+ ) : (+ <VirtualDataTable+ rows={SAMPLE_ROWS}+ columns={SAMPLE_COLUMNS}+ activeRowIndex={-1}+ isSensitiveColumn={() => false}+ database={SAMPLE_DATABASE}+ statement={PREVIEW_SQL}+ search={EMPTY_SEARCH}+ sortState={undefined}+ onToggleSort={noop}+ />+ )}+ </div>+ </SQLResultViewProvider>+ </div>++ {/* Bottom status bar — connection + executed statement + query time,+ like the real SQL Editor footer (statement lives HERE, not atop the+ result panel). */}+ <div className="flex items-center justify-between border-t border-block-border bg-background px-3 py-1 text-xs text-control-light">+ <span className="truncate">{PREVIEW_SQL.split("\n").join(" ")}</span>+ <span className="shrink-0 pl-2">+ {t("sql-editor.query-time")}: 5 ms+ </span>+ </div>+ </div>+ </SQLEditorThemeScope>+ );+}diff --git a/frontend/src/react/stores/sqlEditor/editor.test.ts b/frontend/src/react/stores/sqlEditor/editor.test.tsindex f2e8d37de9..2202496d90 100644--- a/frontend/src/react/stores/sqlEditor/editor.test.ts+++ b/frontend/src/react/stores/sqlEditor/editor.test.ts@@ -1,10 +1,8 @@import { afterEach, beforeEach, describe, expect, test } from "vitest";-import { DEFAULT_THEME_ID } from "@/react/components/sql-editor/theme/presets";import {STORAGE_KEY_SQL_EDITOR_REDIS_NODE,STORAGE_KEY_SQL_EDITOR_RESULT_LIMIT,storageKeySqlEditorLastProject,- storageKeySqlEditorTheme,} from "@/utils/storage-keys";import {getSQLEditorEditorState,@@ -47,7 +45,6 @@ beforeEach(() => {redisCommandOption: 1,isShowExecutingHint: false,executingHintDatabase: undefined,- themeId: "light",});});@@ -123,18 +120,3 @@ describe("useSQLEditorEditorStore", () => {expect(calls).toBeGreaterThanOrEqual(3);});});--describe("theme persistence", () => {- test("setThemeId updates state and persists", () => {- getSQLEditorEditorState().setThemeId("dark");- expect(useSQLEditorEditorStore.getState().themeId).toBe("dark");- expect(storage.get(storageKeySqlEditorTheme(""))).toBe(- JSON.stringify("dark")- );- });-- test("setThemeId rejects an unknown id and falls back to the default", () => {- getSQLEditorEditorState().setThemeId("does-not-exist");- expect(useSQLEditorEditorStore.getState().themeId).toBe(DEFAULT_THEME_ID);- });-});diff --git a/frontend/src/react/stores/sqlEditor/editor.ts b/frontend/src/react/stores/sqlEditor/editor.tsindex 75427569b8..057b1ebee6 100644--- a/frontend/src/react/stores/sqlEditor/editor.ts+++ b/frontend/src/react/stores/sqlEditor/editor.ts@@ -1,10 +1,6 @@import { useSyncExternalStore } from "react";import { create, type StoreApi, type UseBoundStore } from "zustand";import { immer } from "zustand/middleware/immer";-import {- DEFAULT_THEME_ID,- PRESET_BY_ID,-} from "@/react/components/sql-editor/theme/presets";import { useAppStore } from "@/react/stores/app";import type { Database } from "@/types/proto-es/v1/database_service_pb";import { QueryOption_RedisRunCommandsOn } from "@/types/proto-es/v1/sql_service_pb";@@ -12,7 +8,6 @@ import {STORAGE_KEY_SQL_EDITOR_REDIS_NODE,STORAGE_KEY_SQL_EDITOR_RESULT_LIMIT,storageKeySqlEditorLastProject,- storageKeySqlEditorTheme,workspaceCacheScope,} from "@/utils/storage-keys";@@ -23,7 +18,6 @@ export interface SQLEditorEditorState {redisCommandOption: QueryOption_RedisRunCommandsOn;isShowExecutingHint: boolean;executingHintDatabase: Database | undefined;- themeId: string;setProject: (project: string) => void;setProjectContextReady: (ready: boolean) => void;@@ -31,7 +25,6 @@ export interface SQLEditorEditorState {setRedisCommandOption: (option: QueryOption_RedisRunCommandsOn) => void;setShowExecutingHint: (show: boolean) => void;setExecutingHintDatabase: (db: Database | undefined) => void;- setThemeId: (id: string) => void;}const DEFAULT_RESULT_ROWS_LIMIT = 1000;@@ -85,22 +78,6 @@ const readProject = () =>"");-const themeKey = () => {- const state = useAppStore.getState();- const isSaaS =- typeof state?.isSaaSMode === "function" ? state.isSaaSMode() : false;- return storageKeySqlEditorTheme(- workspaceCacheScope(isSaaS, state?.currentUser?.workspace ?? "")- );-};--const readThemeId = () =>- safeRead<string>(- themeKey(),- (v) => (typeof v === "string" && PRESET_BY_ID[v] ? v : undefined),- DEFAULT_THEME_ID- );-const readResultRowsLimit = () =>safeRead<number>(STORAGE_KEY_SQL_EDITOR_RESULT_LIMIT,@@ -130,7 +107,6 @@ export const useSQLEditorEditorStore: UseBoundStore<redisCommandOption: readRedisOption(),isShowExecutingHint: false,executingHintDatabase: undefined,- themeId: readThemeId(),setProject(project) {set((s) => {@@ -150,14 +126,6 @@ export const useSQLEditorEditorStore: UseBoundStore<});safeWrite(STORAGE_KEY_SQL_EDITOR_RESULT_LIMIT, limit);},- setThemeId(id) {- // Ignore ids not in the catalog so a stale/garbage value can't break theming.- const next = PRESET_BY_ID[id] ? id : DEFAULT_THEME_ID;- set((s) => {- s.themeId = next;- });- safeWrite(themeKey(), next);- },setRedisCommandOption(option) {set((s) => {s.redisCommandOption = option;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.tsindex 8ac29b515e..415f56927c 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@@ -639,6 +639,22 @@ export declare type WorkspaceProfileSetting = Message<"bytebase.v1.WorkspaceProf* @generated from field: bool allow_email_code_signin = 22;*/allowEmailCodeSignin: boolean;++ /**+ * Enforced SQL Editor theme id: OPAQUE — a frontend-resolved built-in preset id+ * OR a custom theme's uuid. Empty ⇒ default light.+ *+ * @generated from field: string sql_editor_theme_id = 23;+ */+ sqlEditorThemeId: string;++ /**+ * The enforced CUSTOM theme's full definition — present ONLY when+ * sql_editor_theme_id is a custom uuid. tokens is always complete.+ *+ * @generated from field: bytebase.v1.SQLEditorThemeSetting sql_editor_custom_theme = 24;+ */+ sqlEditorCustomTheme?: SQLEditorThemeSetting | undefined;};/**@@ -708,16 +724,40 @@ export declare type WorkspaceProfileSetting_PasswordRestriction = Message<"bytebexport declare const WorkspaceProfileSetting_PasswordRestrictionSchema: GenMessage<WorkspaceProfileSetting_PasswordRestriction>;/**- * @generated from message bytebase.v1.Announcement+ * @generated from message bytebase.v1.SQLEditorThemeSetting*/-export declare type Announcement = Message<"bytebase.v1.Announcement"> & {+export declare type SQLEditorThemeSetting = Message<"bytebase.v1.SQLEditorThemeSetting"> & {/**- * The alert level of announcement- *- * @generated from field: bytebase.v1.Announcement.AlertLevel level = 1;+ * @generated from field: string id = 1;*/- level: Announcement_AlertLevel;+ id: string;++ /**+ * @generated from field: string name = 2;+ */+ name: string;++ /**+ * @generated from field: string monaco_base = 3;+ */+ monacoBase: string;++ /**+ * @generated from field: map<string, string> tokens = 4;+ */+ tokens: { [key: string]: string };+};+/**+ * Describes the message bytebase.v1.SQLEditorThemeSetting.+ * Use `create(SQLEditorThemeSettingSchema)` to create a new message.+ */+export declare const SQLEditorThemeSettingSchema: GenMessage<SQLEditorThemeSetting>;++/**+ * @generated from message bytebase.v1.Announcement+ */+export declare type Announcement = Message<"bytebase.v1.Announcement"> & {/*** The text of announcement*@@ -731,6 +771,14 @@ export declare type Announcement = Message<"bytebase.v1.Announcement"> & {* @generated from field: string link = 3;*/link: string;++ /**+ * Banner colors. Built-in presets (info/warning/critical) are a+ * frontend-only concept that seeds these colors; the store only holds them.+ *+ * @generated from field: bytebase.v1.Announcement.AnnouncementTheme theme = 4;+ */+ theme?: Announcement_AnnouncementTheme | undefined;};/**@@ -740,36 +788,29 @@ export declare type Announcement = Message<"bytebase.v1.Announcement"> & {export declare const AnnouncementSchema: GenMessage<Announcement>;/**- * We support three levels of AlertLevel: INFO, WARNING, and ERROR.- *- * @generated from enum bytebase.v1.Announcement.AlertLevel+ * @generated from message bytebase.v1.Announcement.AnnouncementTheme*/-export enum Announcement_AlertLevel {+export declare type Announcement_AnnouncementTheme = Message<"bytebase.v1.Announcement.AnnouncementTheme"> & {/**- * @generated from enum value: ALERT_LEVEL_UNSPECIFIED = 0;- */- ALERT_LEVEL_UNSPECIFIED = 0,-- /**- * @generated from enum value: INFO = 1;- */- INFO = 1,-- /**- * @generated from enum value: WARNING = 2;+ * "r g b"+ *+ * @generated from field: string background = 1;*/- WARNING = 2,+ background: string;/**- * @generated from enum value: CRITICAL = 3;+ * "r g b"+ *+ * @generated from field: string text = 2;*/- CRITICAL = 3,-}+ text: string;+};/**- * Describes the enum bytebase.v1.Announcement.AlertLevel.+ * Describes the message bytebase.v1.Announcement.AnnouncementTheme.+ * Use `create(Announcement_AnnouncementThemeSchema)` to create a new message.*/-export declare const Announcement_AlertLevelSchema: GenEnum<Announcement_AlertLevel>;+export declare const Announcement_AnnouncementThemeSchema: GenMessage<Announcement_AnnouncementTheme>;/*** @generated from message bytebase.v1.WorkspaceApprovalSettingdiff --git a/frontend/src/types/proto-es/v1/setting_service_pb.js b/frontend/src/types/proto-es/v1/setting_service_pb.jsindex f3e82bca73..43b152a104 100644--- a/frontend/src/types/proto-es/v1/setting_service_pb.js+++ b/frontend/src/types/proto-es/v1/setting_service_pb.js@@ -17,7 +17,7 @@ import { file_v1_issue_service } from "./issue_service_pb";* Describes the file v1/setting_service.proto.*/export const file_v1_setting_service = /*@__PURE__*/- fileDesc("Chh2MS9zZXR0aW5nX3NlcnZpY2UucHJvdG8SC2J5dGViYXNlLnYxIhUKE0xpc3RTZXR0aW5nc1JlcXVlc3QiPgoUTGlzdFNldHRpbmdzUmVzcG9uc2USJgoIc2V0dGluZ3MYASADKAsyFC5ieXRlYmFzZS52MS5TZXR0aW5nIj8KEUdldFNldHRpbmdSZXF1ZXN0EioKBG5hbWUYASABKAlCHOBBAvpBFgoUYnl0ZWJhc2UuY29tL1NldHRpbmciOwoSR2V0U2V0dGluZ1Jlc3BvbnNlEiUKB3NldHRpbmcYASABKAsyFC5ieXRlYmFzZS52MS5TZXR0aW5nIqEBChRVcGRhdGVTZXR0aW5nUmVxdWVzdBIqCgdzZXR0aW5nGAEgASgLMhQuYnl0ZWJhc2UudjEuU2V0dGluZ0ID4EECEhUKDXZhbGlkYXRlX29ubHkYAiABKAgSFQoNYWxsb3dfbWlzc2luZxgDIAEoCBIvCgt1cGRhdGVfbWFzaxgEIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5GaWVsZE1hc2sitAIKB1NldHRpbmcSEQoEbmFtZRgBIAEoCUID4EEIEi0KBXZhbHVlGAIgASgLMhkuYnl0ZWJhc2UudjEuU2V0dGluZ1ZhbHVlQgPgQQIitwEKC1NldHRpbmdOYW1lEhwKGFNFVFRJTkdfTkFNRV9VTlNQRUNJRklFRBAAEhUKEVdPUktTUEFDRV9QUk9GSUxFEAESFgoSV09SS1NQQUNFX0FQUFJPVkFMEAISCgoGQVBQX0lNEAMSBgoCQUkQBBIXChNEQVRBX0NMQVNTSUZJQ0FUSU9OEAUSEgoOU0VNQU5USUNfVFlQRVMQBhIPCgtFTlZJUk9OTUVOVBAHEgkKBUVNQUlMEAg6LepBKgoUYnl0ZWJhc2UuY29tL1NldHRpbmcSEnNldHRpbmdzL3tzZXR0aW5nfSLYAwoMU2V0dGluZ1ZhbHVlEisKBmFwcF9pbRgBIAEoCzIZLmJ5dGViYXNlLnYxLkFwcElNU2V0dGluZ0gAEkEKEXdvcmtzcGFjZV9wcm9maWxlGAIgASgLMiQuYnl0ZWJhc2UudjEuV29ya3NwYWNlUHJvZmlsZVNldHRpbmdIABJDChJ3b3Jrc3BhY2VfYXBwcm92YWwYAyABKAsyJS5ieXRlYmFzZS52MS5Xb3Jrc3BhY2VBcHByb3ZhbFNldHRpbmdIABJFChNkYXRhX2NsYXNzaWZpY2F0aW9uGAQgASgLMiYuYnl0ZWJhc2UudjEuRGF0YUNsYXNzaWZpY2F0aW9uU2V0dGluZ0gAEjkKDXNlbWFudGljX3R5cGUYBSABKAsyIC5ieXRlYmFzZS52MS5TZW1hbnRpY1R5cGVTZXR0aW5nSAASJAoCYWkYBiABKAsyFi5ieXRlYmFzZS52MS5BSVNldHRpbmdIABI2CgtlbnZpcm9ubWVudBgHIAEoCzIfLmJ5dGViYXNlLnYxLkVudmlyb25tZW50U2V0dGluZ0gAEioKBWVtYWlsGAggASgLMhkuYnl0ZWJhc2UudjEuRW1haWxTZXR0aW5nSABCBwoFdmFsdWUivAYKDEFwcElNU2V0dGluZxI1CghzZXR0aW5ncxgBIAMoCzIjLmJ5dGViYXNlLnYxLkFwcElNU2V0dGluZy5JTVNldHRpbmcaGwoFU2xhY2sSEgoFdG9rZW4YASABKAlCA+BBBBo2CgZGZWlzaHUSEwoGYXBwX2lkGAEgASgJQgPgQQQSFwoKYXBwX3NlY3JldBgCIAEoCUID4EEEGkkKBVdlY29tEhQKB2NvcnBfaWQYASABKAlCA+BBBBIVCghhZ2VudF9pZBgCIAEoCUID4EEEEhMKBnNlY3JldBgDIAEoCUID4EEEGjQKBExhcmsSEwoGYXBwX2lkGAEgASgJQgPgQQQSFwoKYXBwX3NlY3JldBgCIAEoCUID4EEEGlcKCERpbmdUYWxrEhYKCWNsaWVudF9pZBgBIAEoCUID4EEEEhoKDWNsaWVudF9zZWNyZXQYAiABKAlCA+BBBBIXCgpyb2JvdF9jb2RlGAMgASgJQgPgQQQaUwoFVGVhbXMSFgoJdGVuYW50X2lkGAEgASgJQgPgQQQSFgoJY2xpZW50X2lkGAIgASgJQgPgQQQSGgoNY2xpZW50X3NlY3JldBgDIAEoCUID4EEEGvACCglJTVNldHRpbmcSJgoEdHlwZRgBIAEoDjIYLmJ5dGViYXNlLnYxLldlYmhvb2tUeXBlEjAKBXNsYWNrGAIgASgLMh8uYnl0ZWJhc2UudjEuQXBwSU1TZXR0aW5nLlNsYWNrSAASMgoGZmVpc2h1GAMgASgLMiAuYnl0ZWJhc2UudjEuQXBwSU1TZXR0aW5nLkZlaXNodUgAEjAKBXdlY29tGAQgASgLMh8uYnl0ZWJhc2UudjEuQXBwSU1TZXR0aW5nLldlY29tSAASLgoEbGFyaxgFIAEoCzIeLmJ5dGViYXNlLnYxLkFwcElNU2V0dGluZy5MYXJrSAASNgoIZGluZ3RhbGsYBiABKAsyIi5ieXRlYmFzZS52MS5BcHBJTVNldHRpbmcuRGluZ1RhbGtIABIwCgV0ZWFtcxgHIAEoCzIfLmJ5dGViYXNlLnYxLkFwcElNU2V0dGluZy5UZWFtc0gAQgkKB3BheWxvYWQi6ggKF1dvcmtzcGFjZVByb2ZpbGVTZXR0aW5nEhQKDGV4dGVybmFsX3VybBgBIAEoCRIXCg9kaXNhbGxvd19zaWdudXAYAiABKAgSEwoLcmVxdWlyZV9tZmEYAyABKAgSOQoWcmVmcmVzaF90b2tlbl9kdXJhdGlvbhgEIAEoCzIZLmdvb2dsZS5wcm90b2J1Zi5EdXJhdGlvbhIvCgxhbm5vdW5jZW1lbnQYBSABKAsyGS5ieXRlYmFzZS52MS5Bbm5vdW5jZW1lbnQSOgoXbWF4aW11bV9yb2xlX2V4cGlyYXRpb24YBiABKAsyGS5nb29nbGUucHJvdG9idWYuRHVyYXRpb24SDwoHZG9tYWlucxgHIAMoCRIfChdlbmZvcmNlX2lkZW50aXR5X2RvbWFpbhgIIAEoCBI9ChRkYXRhYmFzZV9jaGFuZ2VfbW9kZRgJIAEoDjIfLmJ5dGViYXNlLnYxLkRhdGFiYXNlQ2hhbmdlTW9kZRIgChhkaXNhbGxvd19wYXNzd29yZF9zaWduaW4YCiABKAgSIAoYZW5hYmxlX21ldHJpY19jb2xsZWN0aW9uGAsgASgIEjsKGGluYWN0aXZlX3Nlc3Npb25fdGltZW91dBgMIAEoCzIZLmdvb2dsZS5wcm90b2J1Zi5EdXJhdGlvbhIfChdlbmFibGVfYXVkaXRfbG9nX3N0ZG91dBgNIAEoCBIRCgl3YXRlcm1hcmsYDiABKAgSHAoUZGlyZWN0b3J5X3N5bmNfdG9rZW4YDyABKAkSVgoUcGFzc3dvcmRfcmVzdHJpY3Rpb24YESABKAsyOC5ieXRlYmFzZS52MS5Xb3Jrc3BhY2VQcm9maWxlU2V0dGluZy5QYXNzd29yZFJlc3RyaWN0aW9uEjgKFWFjY2Vzc190b2tlbl9kdXJhdGlvbhgSIAEoCzIZLmdvb2dsZS5wcm90b2J1Zi5EdXJhdGlvbhIUCgxlbmFibGVfZGVidWcYEyABKAgSFwoPc3FsX3Jlc3VsdF9zaXplGBQgASgDEjAKDXF1ZXJ5X3RpbWVvdXQYFSABKAsyGS5nb29nbGUucHJvdG9idWYuRHVyYXRpb24SHwoXYWxsb3dfZW1haWxfY29kZV9zaWduaW4YFiABKAgahAIKE1Bhc3N3b3JkUmVzdHJpY3Rpb24SEgoKbWluX2xlbmd0aBgBIAEoBRIWCg5yZXF1aXJlX251bWJlchgCIAEoCBIWCg5yZXF1aXJlX2xldHRlchgDIAEoCBIgChhyZXF1aXJlX3VwcGVyY2FzZV9sZXR0ZXIYBCABKAgSIQoZcmVxdWlyZV9zcGVjaWFsX2NoYXJhY3RlchgFIAEoCBIuCiZyZXF1aXJlX3Jlc2V0X3Bhc3N3b3JkX2Zvcl9maXJzdF9sb2dpbhgGIAEoCBI0ChFwYXNzd29yZF9yb3RhdGlvbhgHIAEoCzIZLmdvb2dsZS5wcm90b2J1Zi5EdXJhdGlvbkoECBAQESKvAQoMQW5ub3VuY2VtZW50EjMKBWxldmVsGAEgASgOMiQuYnl0ZWJhc2UudjEuQW5ub3VuY2VtZW50LkFsZXJ0TGV2ZWwSDAoEdGV4dBgCIAEoCRIMCgRsaW5rGAMgASgJIk4KCkFsZXJ0TGV2ZWwSGwoXQUxFUlRfTEVWRUxfVU5TUEVDSUZJRUQQABIICgRJTkZPEAESCwoHV0FSTklORxACEgwKCENSSVRJQ0FMEAMi/AIKGFdvcmtzcGFjZUFwcHJvdmFsU2V0dGluZxI5CgVydWxlcxgBIAMoCzIqLmJ5dGViYXNlLnYxLldvcmtzcGFjZUFwcHJvdmFsU2V0dGluZy5SdWxlGqQCCgRSdWxlEi8KCHRlbXBsYXRlGAEgASgLMh0uYnl0ZWJhc2UudjEuQXBwcm92YWxUZW1wbGF0ZRIkCgljb25kaXRpb24YAiABKAsyES5nb29nbGUudHlwZS5FeHByEkEKBnNvdXJjZRgDIAEoDjIxLmJ5dGViYXNlLnYxLldvcmtzcGFjZUFwcHJvdmFsU2V0dGluZy5SdWxlLlNvdXJjZSKBAQoGU291cmNlEhYKElNPVVJDRV9VTlNQRUNJRklFRBAAEhMKD0NIQU5HRV9EQVRBQkFTRRABEhMKD0NSRUFURV9EQVRBQkFTRRACEg8KC0VYUE9SVF9EQVRBEAMSEAoMUkVRVUVTVF9ST0xFEAQSEgoOUkVRVUVTVF9BQ0NFU1MQBSLrBAoZRGF0YUNsYXNzaWZpY2F0aW9uU2V0dGluZxJQCgdjb25maWdzGAEgAygLMj8uYnl0ZWJhc2UudjEuRGF0YUNsYXNzaWZpY2F0aW9uU2V0dGluZy5EYXRhQ2xhc3NpZmljYXRpb25Db25maWca+wMKGERhdGFDbGFzc2lmaWNhdGlvbkNvbmZpZxIKCgJpZBgBIAEoCRINCgV0aXRsZRgCIAEoCRJVCgZsZXZlbHMYAyADKAsyRS5ieXRlYmFzZS52MS5EYXRhQ2xhc3NpZmljYXRpb25TZXR0aW5nLkRhdGFDbGFzc2lmaWNhdGlvbkNvbmZpZy5MZXZlbBJrCg5jbGFzc2lmaWNhdGlvbhgEIAMoCzJTLmJ5dGViYXNlLnYxLkRhdGFDbGFzc2lmaWNhdGlvblNldHRpbmcuRGF0YUNsYXNzaWZpY2F0aW9uQ29uZmlnLkNsYXNzaWZpY2F0aW9uRW50cnkaJQoFTGV2ZWwSDQoFdGl0bGUYAiABKAkSDQoFbGV2ZWwYBCABKAUaTQoSRGF0YUNsYXNzaWZpY2F0aW9uEgoKAmlkGAEgASgJEg0KBXRpdGxlGAIgASgJEhIKBWxldmVsGAQgASgFSACIAQFCCAoGX2xldmVsGokBChNDbGFzc2lmaWNhdGlvbkVudHJ5EgsKA2tleRgBIAEoCRJhCgV2YWx1ZRgCIAEoCzJSLmJ5dGViYXNlLnYxLkRhdGFDbGFzc2lmaWNhdGlvblNldHRpbmcuRGF0YUNsYXNzaWZpY2F0aW9uQ29uZmlnLkRhdGFDbGFzc2lmaWNhdGlvbjoCOAEizAEKE1NlbWFudGljVHlwZVNldHRpbmcSPAoFdHlwZXMYASADKAsyLS5ieXRlYmFzZS52MS5TZW1hbnRpY1R5cGVTZXR0aW5nLlNlbWFudGljVHlwZRp3CgxTZW1hbnRpY1R5cGUSCgoCaWQYASABKAkSDQoFdGl0bGUYAiABKAkSEwoLZGVzY3JpcHRpb24YAyABKAkSKQoJYWxnb3JpdGhtGAYgASgLMhYuYnl0ZWJhc2UudjEuQWxnb3JpdGhtEgwKBGljb24YByABKAki/wQKCUFsZ29yaXRobRI0CglmdWxsX21hc2sYASABKAsyHy5ieXRlYmFzZS52MS5BbGdvcml0aG0uRnVsbE1hc2tIABI2CgpyYW5nZV9tYXNrGAIgASgLMiAuYnl0ZWJhc2UudjEuQWxnb3JpdGhtLlJhbmdlTWFza0gAEjIKCG1kNV9tYXNrGAMgASgLMh4uYnl0ZWJhc2UudjEuQWxnb3JpdGhtLk1ENU1hc2tIABJBChBpbm5lcl9vdXRlcl9tYXNrGAQgASgLMiUuYnl0ZWJhc2UudjEuQWxnb3JpdGhtLklubmVyT3V0ZXJNYXNrSAAaIAoIRnVsbE1hc2sSFAoMc3Vic3RpdHV0aW9uGAEgASgJGn4KCVJhbmdlTWFzaxI2CgZzbGljZXMYASADKAsyJi5ieXRlYmFzZS52MS5BbGdvcml0aG0uUmFuZ2VNYXNrLlNsaWNlGjkKBVNsaWNlEg0KBXN0YXJ0GAEgASgFEgsKA2VuZBgCIAEoBRIUCgxzdWJzdGl0dXRpb24YAyABKAkaFwoHTUQ1TWFzaxIMCgRzYWx0GAEgASgJGskBCg5Jbm5lck91dGVyTWFzaxISCgpwcmVmaXhfbGVuGAEgASgFEhIKCnN1ZmZpeF9sZW4YAiABKAUSPAoEdHlwZRgDIAEoDjIuLmJ5dGViYXNlLnYxLkFsZ29yaXRobS5Jbm5lck91dGVyTWFzay5NYXNrVHlwZRIUCgxzdWJzdGl0dXRpb24YBCABKAkiOwoITWFza1R5cGUSGQoVTUFTS19UWVBFX1VOU1BFQ0lGSUVEEAASCQoFSU5ORVIQARIJCgVPVVRFUhACQgYKBG1hc2si7wEKCUFJU2V0dGluZxIPCgdlbmFibGVkGAEgASgIEjEKCHByb3ZpZGVyGAIgASgOMh8uYnl0ZWJhc2UudjEuQUlTZXR0aW5nLlByb3ZpZGVyEhAKCGVuZHBvaW50GAMgASgJEg8KB2FwaV9rZXkYBCABKAkSDQoFbW9kZWwYBSABKAkSDwoHdmVyc2lvbhgGIAEoCSJbCghQcm92aWRlchIYChRQUk9WSURFUl9VTlNQRUNJRklFRBAAEgsKB09QRU5fQUkQARIKCgZDTEFVREUQAhIKCgZHRU1JTkkQAxIQCgxBWlVSRV9PUEVOQUkQBCKWAgoSRW52aXJvbm1lbnRTZXR0aW5nEkEKDGVudmlyb25tZW50cxgBIAMoCzIrLmJ5dGViYXNlLnYxLkVudmlyb25tZW50U2V0dGluZy5FbnZpcm9ubWVudBq8AQoLRW52aXJvbm1lbnQSEQoEbmFtZRgBIAEoCUID4EEDEgoKAmlkGAIgASgJEg0KBXRpdGxlGAMgASgJEkMKBHRhZ3MYBCADKAsyNS5ieXRlYmFzZS52MS5FbnZpcm9ubWVudFNldHRpbmcuRW52aXJvbm1lbnQuVGFnc0VudHJ5Eg0KBWNvbG9yGAUgASgJGisKCVRhZ3NFbnRyeRILCgNrZXkYASABKAkSDQoFdmFsdWUYAiABKAk6AjgBIvQECgxFbWFpbFNldHRpbmcSDAoEZnJvbRgBIAEoCRIRCglmcm9tX25hbWUYAiABKAkSLAoEdHlwZRgDIAEoDjIeLmJ5dGViYXNlLnYxLkVtYWlsU2V0dGluZy5UeXBlEjQKBHNtdHAYBCABKAsyJC5ieXRlYmFzZS52MS5FbWFpbFNldHRpbmcuU01UUENvbmZpZ0gAGqwDCgpTTVRQQ29uZmlnEgwKBGhvc3QYASABKAkSDAoEcG9ydBgCIAEoBRIQCgh1c2VybmFtZRgDIAEoCRIVCghwYXNzd29yZBgEIAEoCUID4EEEEkMKCmVuY3J5cHRpb24YBSABKA4yLy5ieXRlYmFzZS52MS5FbWFpbFNldHRpbmcuU01UUENvbmZpZy5FbmNyeXB0aW9uEksKDmF1dGhlbnRpY2F0aW9uGAYgASgOMjMuYnl0ZWJhc2UudjEuRW1haWxTZXR0aW5nLlNNVFBDb25maWcuQXV0aGVudGljYXRpb24iWAoKRW5jcnlwdGlvbhIaChZFTkNSWVBUSU9OX1VOU1BFQ0lGSUVEEAASEwoPRU5DUllQVElPTl9OT05FEAESDAoIU1RBUlRUTFMQAhILCgdTU0xfVExTEAMibQoOQXV0aGVudGljYXRpb24SHgoaQVVUSEVOVElDQVRJT05fVU5TUEVDSUZJRUQQABIXChNBVVRIRU5USUNBVElPTl9OT05FEAESCQoFUExBSU4QAhIJCgVMT0dJThADEgwKCENSQU1fTUQ1EAQiJgoEVHlwZRIUChBUWVBFX1VOU1BFQ0lGSUVEEAASCAoEU01UUBABQggKBmNvbmZpZyJ2ChdUZXN0RW1haWxTZXR0aW5nUmVxdWVzdBITCgZwYXJlbnQYASABKAlCA+BBAhI1Cg1lbWFpbF9zZXR0aW5nGAIgASgLMhkuYnl0ZWJhc2UudjEuRW1haWxTZXR0aW5nQgPgQQISDwoCdG8YAyABKAlCA+BBAiI6ChhUZXN0RW1haWxTZXR0aW5nUmVzcG9uc2USDwoHc3VjY2VzcxgBIAEoCBINCgVlcnJvchgCIAEoCSpUChJEYXRhYmFzZUNoYW5nZU1vZGUSJAogREFUQUJBU0VfQ0hBTkdFX01PREVfVU5TUEVDSUZJRUQQABIMCghQSVBFTElORRABEgoKBkVESVRPUhACMuEECg5TZXR0aW5nU2VydmljZRKEAQoMTGlzdFNldHRpbmdzEiAuYnl0ZWJhc2UudjEuTGlzdFNldHRpbmdzUmVxdWVzdBohLmJ5dGViYXNlLnYxLkxpc3RTZXR0aW5nc1Jlc3BvbnNlIi/aQQCK6jAQYmIuc2V0dGluZ3MubGlzdJDqMAGC0+STAg4SDC92MS9zZXR0aW5ncxJ/CgpHZXRTZXR0aW5nEh4uYnl0ZWJhc2UudjEuR2V0U2V0dGluZ1JlcXVlc3QaFC5ieXRlYmFzZS52MS5TZXR0aW5nIjvaQQRuYW1liuowD2JiLnNldHRpbmdzLmdldJDqMAKC0+STAhcSFS92MS97bmFtZT1zZXR0aW5ncy8qfRKTAQoNVXBkYXRlU2V0dGluZxIhLmJ5dGViYXNlLnYxLlVwZGF0ZVNldHRpbmdSZXF1ZXN0GhQuYnl0ZWJhc2UudjEuU2V0dGluZyJJiuowD2JiLnNldHRpbmdzLnNldJDqMAKY6jABgtPkkwIoOgdzZXR0aW5nMh0vdjEve3NldHRpbmcubmFtZT1zZXR0aW5ncy8qfRKwAQoQVGVzdEVtYWlsU2V0dGluZxIkLmJ5dGViYXNlLnYxLlRlc3RFbWFpbFNldHRpbmdSZXF1ZXN0GiUuYnl0ZWJhc2UudjEuVGVzdEVtYWlsU2V0dGluZ1Jlc3BvbnNlIk+K6jAPYmIuc2V0dGluZ3Muc2V0kOowAYLT5JMCMjoBKiItL3YxL3twYXJlbnQ9d29ya3NwYWNlcy8qfS9zZXR0aW5ncy9FTUFJTDp0ZXN0QqkBCg9jb20uYnl0ZWJhc2UudjFCE1NldHRpbmdTZXJ2aWNlUHJvdG9QAVo0Z2l0aHViLmNvbS9ieXRlYmFzZS9ieXRlYmFzZS9iYWNrZW5kL2dlbmVyYXRlZC1nby92MaICA0JYWKoCC0J5dGViYXNlLlYxygILQnl0ZWJhc2VcVjHiAhdCeXRlYmFzZVxWMVxHUEJNZXRhZGF0YeoCDEJ5dGViYXNlOjpWMWIGcHJvdG8z", [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_issue_service]);+ fileDesc("Chh2MS9zZXR0aW5nX3NlcnZpY2UucHJvdG8SC2J5dGViYXNlLnYxIhUKE0xpc3RTZXR0aW5nc1JlcXVlc3QiPgoUTGlzdFNldHRpbmdzUmVzcG9uc2USJgoIc2V0dGluZ3MYASADKAsyFC5ieXRlYmFzZS52MS5TZXR0aW5nIj8KEUdldFNldHRpbmdSZXF1ZXN0EioKBG5hbWUYASABKAlCHOBBAvpBFgoUYnl0ZWJhc2UuY29tL1NldHRpbmciOwoSR2V0U2V0dGluZ1Jlc3BvbnNlEiUKB3NldHRpbmcYASABKAsyFC5ieXRlYmFzZS52MS5TZXR0aW5nIqEBChRVcGRhdGVTZXR0aW5nUmVxdWVzdBIqCgdzZXR0aW5nGAEgASgLMhQuYnl0ZWJhc2UudjEuU2V0dGluZ0ID4EECEhUKDXZhbGlkYXRlX29ubHkYAiABKAgSFQoNYWxsb3dfbWlzc2luZxgDIAEoCBIvCgt1cGRhdGVfbWFzaxgEIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5GaWVsZE1hc2sitAIKB1NldHRpbmcSEQoEbmFtZRgBIAEoCUID4EEIEi0KBXZhbHVlGAIgASgLMhkuYnl0ZWJhc2UudjEuU2V0dGluZ1ZhbHVlQgPgQQIitwEKC1NldHRpbmdOYW1lEhwKGFNFVFRJTkdfTkFNRV9VTlNQRUNJRklFRBAAEhUKEVdPUktTUEFDRV9QUk9GSUxFEAESFgoSV09SS1NQQUNFX0FQUFJPVkFMEAISCgoGQVBQX0lNEAMSBgoCQUkQBBIXChNEQVRBX0NMQVNTSUZJQ0FUSU9OEAUSEgoOU0VNQU5USUNfVFlQRVMQBhIPCgtFTlZJUk9OTUVOVBAHEgkKBUVNQUlMEAg6LepBKgoUYnl0ZWJhc2UuY29tL1NldHRpbmcSEnNldHRpbmdzL3tzZXR0aW5nfSLYAwoMU2V0dGluZ1ZhbHVlEisKBmFwcF9pbRgBIAEoCzIZLmJ5dGViYXNlLnYxLkFwcElNU2V0dGluZ0gAEkEKEXdvcmtzcGFjZV9wcm9maWxlGAIgASgLMiQuYnl0ZWJhc2UudjEuV29ya3NwYWNlUHJvZmlsZVNldHRpbmdIABJDChJ3b3Jrc3BhY2VfYXBwcm92YWwYAyABKAsyJS5ieXRlYmFzZS52MS5Xb3Jrc3BhY2VBcHByb3ZhbFNldHRpbmdIABJFChNkYXRhX2NsYXNzaWZpY2F0aW9uGAQgASgLMiYuYnl0ZWJhc2UudjEuRGF0YUNsYXNzaWZpY2F0aW9uU2V0dGluZ0gAEjkKDXNlbWFudGljX3R5cGUYBSABKAsyIC5ieXRlYmFzZS52MS5TZW1hbnRpY1R5cGVTZXR0aW5nSAASJAoCYWkYBiABKAsyFi5ieXRlYmFzZS52MS5BSVNldHRpbmdIABI2CgtlbnZpcm9ubWVudBgHIAEoCzIfLmJ5dGViYXNlLnYxLkVudmlyb25tZW50U2V0dGluZ0gAEioKBWVtYWlsGAggASgLMhkuYnl0ZWJhc2UudjEuRW1haWxTZXR0aW5nSABCBwoFdmFsdWUivAYKDEFwcElNU2V0dGluZxI1CghzZXR0aW5ncxgBIAMoCzIjLmJ5dGViYXNlLnYxLkFwcElNU2V0dGluZy5JTVNldHRpbmcaGwoFU2xhY2sSEgoFdG9rZW4YASABKAlCA+BBBBo2CgZGZWlzaHUSEwoGYXBwX2lkGAEgASgJQgPgQQQSFwoKYXBwX3NlY3JldBgCIAEoCUID4EEEGkkKBVdlY29tEhQKB2NvcnBfaWQYASABKAlCA+BBBBIVCghhZ2VudF9pZBgCIAEoCUID4EEEEhMKBnNlY3JldBgDIAEoCUID4EEEGjQKBExhcmsSEwoGYXBwX2lkGAEgASgJQgPgQQQSFwoKYXBwX3NlY3JldBgCIAEoCUID4EEEGlcKCERpbmdUYWxrEhYKCWNsaWVudF9pZBgBIAEoCUID4EEEEhoKDWNsaWVudF9zZWNyZXQYAiABKAlCA+BBBBIXCgpyb2JvdF9jb2RlGAMgASgJQgPgQQQaUwoFVGVhbXMSFgoJdGVuYW50X2lkGAEgASgJQgPgQQQSFgoJY2xpZW50X2lkGAIgASgJQgPgQQQSGgoNY2xpZW50X3NlY3JldBgDIAEoCUID4EEEGvACCglJTVNldHRpbmcSJgoEdHlwZRgBIAEoDjIYLmJ5dGViYXNlLnYxLldlYmhvb2tUeXBlEjAKBXNsYWNrGAIgASgLMh8uYnl0ZWJhc2UudjEuQXBwSU1TZXR0aW5nLlNsYWNrSAASMgoGZmVpc2h1GAMgASgLMiAuYnl0ZWJhc2UudjEuQXBwSU1TZXR0aW5nLkZlaXNodUgAEjAKBXdlY29tGAQgASgLMh8uYnl0ZWJhc2UudjEuQXBwSU1TZXR0aW5nLldlY29tSAASLgoEbGFyaxgFIAEoCzIeLmJ5dGViYXNlLnYxLkFwcElNU2V0dGluZy5MYXJrSAASNgoIZGluZ3RhbGsYBiABKAsyIi5ieXRlYmFzZS52MS5BcHBJTVNldHRpbmcuRGluZ1RhbGtIABIwCgV0ZWFtcxgHIAEoCzIfLmJ5dGViYXNlLnYxLkFwcElNU2V0dGluZy5UZWFtc0gAQgkKB3BheWxvYWQizAkKF1dvcmtzcGFjZVByb2ZpbGVTZXR0aW5nEhQKDGV4dGVybmFsX3VybBgBIAEoCRIXCg9kaXNhbGxvd19zaWdudXAYAiABKAgSEwoLcmVxdWlyZV9tZmEYAyABKAgSOQoWcmVmcmVzaF90b2tlbl9kdXJhdGlvbhgEIAEoCzIZLmdvb2dsZS5wcm90b2J1Zi5EdXJhdGlvbhIvCgxhbm5vdW5jZW1lbnQYBSABKAsyGS5ieXRlYmFzZS52MS5Bbm5vdW5jZW1lbnQSOgoXbWF4aW11bV9yb2xlX2V4cGlyYXRpb24YBiABKAsyGS5nb29nbGUucHJvdG9idWYuRHVyYXRpb24SDwoHZG9tYWlucxgHIAMoCRIfChdlbmZvcmNlX2lkZW50aXR5X2RvbWFpbhgIIAEoCBI9ChRkYXRhYmFzZV9jaGFuZ2VfbW9kZRgJIAEoDjIfLmJ5dGViYXNlLnYxLkRhdGFiYXNlQ2hhbmdlTW9kZRIgChhkaXNhbGxvd19wYXNzd29yZF9zaWduaW4YCiABKAgSIAoYZW5hYmxlX21ldHJpY19jb2xsZWN0aW9uGAsgASgIEjsKGGluYWN0aXZlX3Nlc3Npb25fdGltZW91dBgMIAEoCzIZLmdvb2dsZS5wcm90b2J1Zi5EdXJhdGlvbhIfChdlbmFibGVfYXVkaXRfbG9nX3N0ZG91dBgNIAEoCBIRCgl3YXRlcm1hcmsYDiABKAgSHAoUZGlyZWN0b3J5X3N5bmNfdG9rZW4YDyABKAkSVgoUcGFzc3dvcmRfcmVzdHJpY3Rpb24YESABKAsyOC5ieXRlYmFzZS52MS5Xb3Jrc3BhY2VQcm9maWxlU2V0dGluZy5QYXNzd29yZFJlc3RyaWN0aW9uEjgKFWFjY2Vzc190b2tlbl9kdXJhdGlvbhgSIAEoCzIZLmdvb2dsZS5wcm90b2J1Zi5EdXJhdGlvbhIUCgxlbmFibGVfZGVidWcYEyABKAgSFwoPc3FsX3Jlc3VsdF9zaXplGBQgASgDEjAKDXF1ZXJ5X3RpbWVvdXQYFSABKAsyGS5nb29nbGUucHJvdG9idWYuRHVyYXRpb24SHwoXYWxsb3dfZW1haWxfY29kZV9zaWduaW4YFiABKAgSGwoTc3FsX2VkaXRvcl90aGVtZV9pZBgXIAEoCRJDChdzcWxfZWRpdG9yX2N1c3RvbV90aGVtZRgYIAEoCzIiLmJ5dGViYXNlLnYxLlNRTEVkaXRvclRoZW1lU2V0dGluZxqEAgoTUGFzc3dvcmRSZXN0cmljdGlvbhISCgptaW5fbGVuZ3RoGAEgASgFEhYKDnJlcXVpcmVfbnVtYmVyGAIgASgIEhYKDnJlcXVpcmVfbGV0dGVyGAMgASgIEiAKGHJlcXVpcmVfdXBwZXJjYXNlX2xldHRlchgEIAEoCBIhChlyZXF1aXJlX3NwZWNpYWxfY2hhcmFjdGVyGAUgASgIEi4KJnJlcXVpcmVfcmVzZXRfcGFzc3dvcmRfZm9yX2ZpcnN0X2xvZ2luGAYgASgIEjQKEXBhc3N3b3JkX3JvdGF0aW9uGAcgASgLMhkuZ29vZ2xlLnByb3RvYnVmLkR1cmF0aW9uSgQIEBARIrUBChVTUUxFZGl0b3JUaGVtZVNldHRpbmcSCgoCaWQYASABKAkSDAoEbmFtZRgCIAEoCRITCgttb25hY29fYmFzZRgDIAEoCRI+CgZ0b2tlbnMYBCADKAsyLi5ieXRlYmFzZS52MS5TUUxFZGl0b3JUaGVtZVNldHRpbmcuVG9rZW5zRW50cnkaLQoLVG9rZW5zRW50cnkSCwoDa2V5GAEgASgJEg0KBXZhbHVlGAIgASgJOgI4ASKqAQoMQW5ub3VuY2VtZW50EgwKBHRleHQYAiABKAkSDAoEbGluaxgDIAEoCRI6CgV0aGVtZRgEIAEoCzIrLmJ5dGViYXNlLnYxLkFubm91bmNlbWVudC5Bbm5vdW5jZW1lbnRUaGVtZRo1ChFBbm5vdW5jZW1lbnRUaGVtZRISCgpiYWNrZ3JvdW5kGAEgASgJEgwKBHRleHQYAiABKAlKBAgBEAJSBWxldmVsIvwCChhXb3Jrc3BhY2VBcHByb3ZhbFNldHRpbmcSOQoFcnVsZXMYASADKAsyKi5ieXRlYmFzZS52MS5Xb3Jrc3BhY2VBcHByb3ZhbFNldHRpbmcuUnVsZRqkAgoEUnVsZRIvCgh0ZW1wbGF0ZRgBIAEoCzIdLmJ5dGViYXNlLnYxLkFwcHJvdmFsVGVtcGxhdGUSJAoJY29uZGl0aW9uGAIgASgLMhEuZ29vZ2xlLnR5cGUuRXhwchJBCgZzb3VyY2UYAyABKA4yMS5ieXRlYmFzZS52MS5Xb3Jrc3BhY2VBcHByb3ZhbFNldHRpbmcuUnVsZS5Tb3VyY2UigQEKBlNvdXJjZRIWChJTT1VSQ0VfVU5TUEVDSUZJRUQQABITCg9DSEFOR0VfREFUQUJBU0UQARITCg9DUkVBVEVfREFUQUJBU0UQAhIPCgtFWFBPUlRfREFUQRADEhAKDFJFUVVFU1RfUk9MRRAEEhIKDlJFUVVFU1RfQUNDRVNTEAUi6wQKGURhdGFDbGFzc2lmaWNhdGlvblNldHRpbmcSUAoHY29uZmlncxgBIAMoCzI/LmJ5dGViYXNlLnYxLkRhdGFDbGFzc2lmaWNhdGlvblNldHRpbmcuRGF0YUNsYXNzaWZpY2F0aW9uQ29uZmlnGvsDChhEYXRhQ2xhc3NpZmljYXRpb25Db25maWcSCgoCaWQYASABKAkSDQoFdGl0bGUYAiABKAkSVQoGbGV2ZWxzGAMgAygLMkUuYnl0ZWJhc2UudjEuRGF0YUNsYXNzaWZpY2F0aW9uU2V0dGluZy5EYXRhQ2xhc3NpZmljYXRpb25Db25maWcuTGV2ZWwSawoOY2xhc3NpZmljYXRpb24YBCADKAsyUy5ieXRlYmFzZS52MS5EYXRhQ2xhc3NpZmljYXRpb25TZXR0aW5nLkRhdGFDbGFzc2lmaWNhdGlvbkNvbmZpZy5DbGFzc2lmaWNhdGlvbkVudHJ5GiUKBUxldmVsEg0KBXRpdGxlGAIgASgJEg0KBWxldmVsGAQgASgFGk0KEkRhdGFDbGFzc2lmaWNhdGlvbhIKCgJpZBgBIAEoCRINCgV0aXRsZRgCIAEoCRISCgVsZXZlbBgEIAEoBUgAiAEBQggKBl9sZXZlbBqJAQoTQ2xhc3NpZmljYXRpb25FbnRyeRILCgNrZXkYASABKAkSYQoFdmFsdWUYAiABKAsyUi5ieXRlYmFzZS52MS5EYXRhQ2xhc3NpZmljYXRpb25TZXR0aW5nLkRhdGFDbGFzc2lmaWNhdGlvbkNvbmZpZy5EYXRhQ2xhc3NpZmljYXRpb246AjgBIswBChNTZW1hbnRpY1R5cGVTZXR0aW5nEjwKBXR5cGVzGAEgAygLMi0uYnl0ZWJhc2UudjEuU2VtYW50aWNUeXBlU2V0dGluZy5TZW1hbnRpY1R5cGUadwoMU2VtYW50aWNUeXBlEgoKAmlkGAEgASgJEg0KBXRpdGxlGAIgASgJEhMKC2Rlc2NyaXB0aW9uGAMgASgJEikKCWFsZ29yaXRobRgGIAEoCzIWLmJ5dGViYXNlLnYxLkFsZ29yaXRobRIMCgRpY29uGAcgASgJIv8ECglBbGdvcml0aG0SNAoJZnVsbF9tYXNrGAEgASgLMh8uYnl0ZWJhc2UudjEuQWxnb3JpdGhtLkZ1bGxNYXNrSAASNgoKcmFuZ2VfbWFzaxgCIAEoCzIgLmJ5dGViYXNlLnYxLkFsZ29yaXRobS5SYW5nZU1hc2tIABIyCghtZDVfbWFzaxgDIAEoCzIeLmJ5dGViYXNlLnYxLkFsZ29yaXRobS5NRDVNYXNrSAASQQoQaW5uZXJfb3V0ZXJfbWFzaxgEIAEoCzIlLmJ5dGViYXNlLnYxLkFsZ29yaXRobS5Jbm5lck91dGVyTWFza0gAGiAKCEZ1bGxNYXNrEhQKDHN1YnN0aXR1dGlvbhgBIAEoCRp+CglSYW5nZU1hc2sSNgoGc2xpY2VzGAEgAygLMiYuYnl0ZWJhc2UudjEuQWxnb3JpdGhtLlJhbmdlTWFzay5TbGljZRo5CgVTbGljZRINCgVzdGFydBgBIAEoBRILCgNlbmQYAiABKAUSFAoMc3Vic3RpdHV0aW9uGAMgASgJGhcKB01ENU1hc2sSDAoEc2FsdBgBIAEoCRrJAQoOSW5uZXJPdXRlck1hc2sSEgoKcHJlZml4X2xlbhgBIAEoBRISCgpzdWZmaXhfbGVuGAIgASgFEjwKBHR5cGUYAyABKA4yLi5ieXRlYmFzZS52MS5BbGdvcml0aG0uSW5uZXJPdXRlck1hc2suTWFza1R5cGUSFAoMc3Vic3RpdHV0aW9uGAQgASgJIjsKCE1hc2tUeXBlEhkKFU1BU0tfVFlQRV9VTlNQRUNJRklFRBAAEgkKBUlOTkVSEAESCQoFT1VURVIQAkIGCgRtYXNrIu8BCglBSVNldHRpbmcSDwoHZW5hYmxlZBgBIAEoCBIxCghwcm92aWRlchgCIAEoDjIfLmJ5dGViYXNlLnYxLkFJU2V0dGluZy5Qcm92aWRlchIQCghlbmRwb2ludBgDIAEoCRIPCgdhcGlfa2V5GAQgASgJEg0KBW1vZGVsGAUgASgJEg8KB3ZlcnNpb24YBiABKAkiWwoIUHJvdmlkZXISGAoUUFJPVklERVJfVU5TUEVDSUZJRUQQABILCgdPUEVOX0FJEAESCgoGQ0xBVURFEAISCgoGR0VNSU5JEAMSEAoMQVpVUkVfT1BFTkFJEAQilgIKEkVudmlyb25tZW50U2V0dGluZxJBCgxlbnZpcm9ubWVudHMYASADKAsyKy5ieXRlYmFzZS52MS5FbnZpcm9ubWVudFNldHRpbmcuRW52aXJvbm1lbnQavAEKC0Vudmlyb25tZW50EhEKBG5hbWUYASABKAlCA+BBAxIKCgJpZBgCIAEoCRINCgV0aXRsZRgDIAEoCRJDCgR0YWdzGAQgAygLMjUuYnl0ZWJhc2UudjEuRW52aXJvbm1lbnRTZXR0aW5nLkVudmlyb25tZW50LlRhZ3NFbnRyeRINCgVjb2xvchgFIAEoCRorCglUYWdzRW50cnkSCwoDa2V5GAEgASgJEg0KBXZhbHVlGAIgASgJOgI4ASL0BAoMRW1haWxTZXR0aW5nEgwKBGZyb20YASABKAkSEQoJZnJvbV9uYW1lGAIgASgJEiwKBHR5cGUYAyABKA4yHi5ieXRlYmFzZS52MS5FbWFpbFNldHRpbmcuVHlwZRI0CgRzbXRwGAQgASgLMiQuYnl0ZWJhc2UudjEuRW1haWxTZXR0aW5nLlNNVFBDb25maWdIABqsAwoKU01UUENvbmZpZxIMCgRob3N0GAEgASgJEgwKBHBvcnQYAiABKAUSEAoIdXNlcm5hbWUYAyABKAkSFQoIcGFzc3dvcmQYBCABKAlCA+BBBBJDCgplbmNyeXB0aW9uGAUgASgOMi8uYnl0ZWJhc2UudjEuRW1haWxTZXR0aW5nLlNNVFBDb25maWcuRW5jcnlwdGlvbhJLCg5hdXRoZW50aWNhdGlvbhgGIAEoDjIzLmJ5dGViYXNlLnYxLkVtYWlsU2V0dGluZy5TTVRQQ29uZmlnLkF1dGhlbnRpY2F0aW9uIlgKCkVuY3J5cHRpb24SGgoWRU5DUllQVElPTl9VTlNQRUNJRklFRBAAEhMKD0VOQ1JZUFRJT05fTk9ORRABEgwKCFNUQVJUVExTEAISCwoHU1NMX1RMUxADIm0KDkF1dGhlbnRpY2F0aW9uEh4KGkFVVEhFTlRJQ0FUSU9OX1VOU1BFQ0lGSUVEEAASFwoTQVVUSEVOVElDQVRJT05fTk9ORRABEgkKBVBMQUlOEAISCQoFTE9HSU4QAxIMCghDUkFNX01ENRAEIiYKBFR5cGUSFAoQVFlQRV9VTlNQRUNJRklFRBAAEggKBFNNVFAQAUIICgZjb25maWcidgoXVGVzdEVtYWlsU2V0dGluZ1JlcXVlc3QSEwoGcGFyZW50GAEgASgJQgPgQQISNQoNZW1haWxfc2V0dGluZxgCIAEoCzIZLmJ5dGViYXNlLnYxLkVtYWlsU2V0dGluZ0ID4EECEg8KAnRvGAMgASgJQgPgQQIiOgoYVGVzdEVtYWlsU2V0dGluZ1Jlc3BvbnNlEg8KB3N1Y2Nlc3MYASABKAgSDQoFZXJyb3IYAiABKAkqVAoSRGF0YWJhc2VDaGFuZ2VNb2RlEiQKIERBVEFCQVNFX0NIQU5HRV9NT0RFX1VOU1BFQ0lGSUVEEAASDAoIUElQRUxJTkUQARIKCgZFRElUT1IQAjLhBAoOU2V0dGluZ1NlcnZpY2UShAEKDExpc3RTZXR0aW5ncxIgLmJ5dGViYXNlLnYxLkxpc3RTZXR0aW5nc1JlcXVlc3QaIS5ieXRlYmFzZS52MS5MaXN0U2V0dGluZ3NSZXNwb25zZSIv2kEAiuowEGJiLnNldHRpbmdzLmxpc3SQ6jABgtPkkwIOEgwvdjEvc2V0dGluZ3MSfwoKR2V0U2V0dGluZxIeLmJ5dGViYXNlLnYxLkdldFNldHRpbmdSZXF1ZXN0GhQuYnl0ZWJhc2UudjEuU2V0dGluZyI72kEEbmFtZYrqMA9iYi5zZXR0aW5ncy5nZXSQ6jACgtPkkwIXEhUvdjEve25hbWU9c2V0dGluZ3MvKn0SkwEKDVVwZGF0ZVNldHRpbmcSIS5ieXRlYmFzZS52MS5VcGRhdGVTZXR0aW5nUmVxdWVzdBoULmJ5dGViYXNlLnYxLlNldHRpbmciSYrqMA9iYi5zZXR0aW5ncy5zZXSQ6jACmOowAYLT5JMCKDoHc2V0dGluZzIdL3YxL3tzZXR0aW5nLm5hbWU9c2V0dGluZ3MvKn0SsAEKEFRlc3RFbWFpbFNldHRpbmcSJC5ieXRlYmFzZS52MS5UZXN0RW1haWxTZXR0aW5nUmVxdWVzdBolLmJ5dGViYXNlLnYxLlRlc3RFbWFpbFNldHRpbmdSZXNwb25zZSJPiuowD2JiLnNldHRpbmdzLnNldJDqMAGC0+STAjI6ASoiLS92MS97cGFyZW50PXdvcmtzcGFjZXMvKn0vc2V0dGluZ3MvRU1BSUw6dGVzdEKpAQoPY29tLmJ5dGViYXNlLnYxQhNTZXR0aW5nU2VydmljZVByb3RvUAFaNGdpdGh1Yi5jb20vYnl0ZWJhc2UvYnl0ZWJhc2UvYmFja2VuZC9nZW5lcmF0ZWQtZ28vdjGiAgNCWFiqAgtCeXRlYmFzZS5WMcoCC0J5dGViYXNlXFYx4gIXQnl0ZWJhc2VcVjFcR1BCTWV0YWRhdGHqAgxCeXRlYmFzZTo6VjFiBnByb3RvMw", [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_issue_service]);/*** Describes the message bytebase.v1.ListSettingsRequest.@@ -151,45 +151,45 @@ export const WorkspaceProfileSetting_PasswordRestrictionSchema = /*@__PURE__*/messageDesc(file_v1_setting_service, 8, 0);/**- * Describes the message bytebase.v1.Announcement.- * Use `create(AnnouncementSchema)` to create a new message.+ * Describes the message bytebase.v1.SQLEditorThemeSetting.+ * Use `create(SQLEditorThemeSettingSchema)` to create a new message.*/-export const AnnouncementSchema = /*@__PURE__*/+export const SQLEditorThemeSettingSchema = /*@__PURE__*/messageDesc(file_v1_setting_service, 9);/**- * Describes the enum bytebase.v1.Announcement.AlertLevel.+ * Describes the message bytebase.v1.Announcement.+ * Use `create(AnnouncementSchema)` to create a new message.*/-export const Announcement_AlertLevelSchema = /*@__PURE__*/- enumDesc(file_v1_setting_service, 9, 0);+export const AnnouncementSchema = /*@__PURE__*/+ messageDesc(file_v1_setting_service, 10);/**- * We support three levels of AlertLevel: INFO, WARNING, and ERROR.- *- * @generated from enum bytebase.v1.Announcement.AlertLevel+ * Describes the message bytebase.v1.Announcement.AnnouncementTheme.+ * Use `create(Announcement_AnnouncementThemeSchema)` to create a new message.*/-export const Announcement_AlertLevel = /*@__PURE__*/- tsEnum(Announcement_AlertLevelSchema);+export const Announcement_AnnouncementThemeSchema = /*@__PURE__*/+ messageDesc(file_v1_setting_service, 10, 0);/*** Describes the message bytebase.v1.WorkspaceApprovalSetting.* Use `create(WorkspaceApprovalSettingSchema)` to create a new message.*/export const WorkspaceApprovalSettingSchema = /*@__PURE__*/- messageDesc(file_v1_setting_service, 10);+ messageDesc(file_v1_setting_service, 11);/*** Describes the message bytebase.v1.WorkspaceApprovalSetting.Rule.* Use `create(WorkspaceApprovalSetting_RuleSchema)` to create a new message.*/export const WorkspaceApprovalSetting_RuleSchema = /*@__PURE__*/- messageDesc(file_v1_setting_service, 10, 0);+ messageDesc(file_v1_setting_service, 11, 0);/*** Describes the enum bytebase.v1.WorkspaceApprovalSetting.Rule.Source.*/export const WorkspaceApprovalSetting_Rule_SourceSchema = /*@__PURE__*/- enumDesc(file_v1_setting_service, 10, 0, 0);+ enumDesc(file_v1_setting_service, 11, 0, 0);/*** @generated from enum bytebase.v1.WorkspaceApprovalSetting.Rule.Source@@ -202,90 +202,90 @@ export const WorkspaceApprovalSetting_Rule_Source = /*@__PURE__*/* Use `create(DataClassificationSettingSchema)` to create a new message.*/export const DataClassificationSettingSchema = /*@__PURE__*/- messageDesc(file_v1_setting_service, 11);+ messageDesc(file_v1_setting_service, 12);/*** Describes the message bytebase.v1.DataClassificationSetting.DataClassificationConfig.* Use `create(DataClassificationSetting_DataClassificationConfigSchema)` to create a new message.*/export const DataClassificationSetting_DataClassificationConfigSchema = /*@__PURE__*/- messageDesc(file_v1_setting_service, 11, 0);+ messageDesc(file_v1_setting_service, 12, 0);/*** Describes the message bytebase.v1.DataClassificationSetting.DataClassificationConfig.Level.* Use `create(DataClassificationSetting_DataClassificationConfig_LevelSchema)` to create a new message.*/export const DataClassificationSetting_DataClassificationConfig_LevelSchema = /*@__PURE__*/- messageDesc(file_v1_setting_service, 11, 0, 0);+ messageDesc(file_v1_setting_service, 12, 0, 0);/*** Describes the message bytebase.v1.DataClassificationSetting.DataClassificationConfig.DataClassification.* Use `create(DataClassificationSetting_DataClassificationConfig_DataClassificationSchema)` to create a new message.*/export const DataClassificationSetting_DataClassificationConfig_DataClassificationSchema = /*@__PURE__*/- messageDesc(file_v1_setting_service, 11, 0, 1);+ messageDesc(file_v1_setting_service, 12, 0, 1);/*** Describes the message bytebase.v1.SemanticTypeSetting.* Use `create(SemanticTypeSettingSchema)` to create a new message.*/export const SemanticTypeSettingSchema = /*@__PURE__*/- messageDesc(file_v1_setting_service, 12);+ messageDesc(file_v1_setting_service, 13);/*** Describes the message bytebase.v1.SemanticTypeSetting.SemanticType.* Use `create(SemanticTypeSetting_SemanticTypeSchema)` to create a new message.*/export const SemanticTypeSetting_SemanticTypeSchema = /*@__PURE__*/- messageDesc(file_v1_setting_service, 12, 0);+ messageDesc(file_v1_setting_service, 13, 0);/*** Describes the message bytebase.v1.Algorithm.* Use `create(AlgorithmSchema)` to create a new message.*/export const AlgorithmSchema = /*@__PURE__*/- messageDesc(file_v1_setting_service, 13);+ messageDesc(file_v1_setting_service, 14);/*** Describes the message bytebase.v1.Algorithm.FullMask.* Use `create(Algorithm_FullMaskSchema)` to create a new message.*/export const Algorithm_FullMaskSchema = /*@__PURE__*/- messageDesc(file_v1_setting_service, 13, 0);+ messageDesc(file_v1_setting_service, 14, 0);/*** Describes the message bytebase.v1.Algorithm.RangeMask.* Use `create(Algorithm_RangeMaskSchema)` to create a new message.*/export const Algorithm_RangeMaskSchema = /*@__PURE__*/- messageDesc(file_v1_setting_service, 13, 1);+ messageDesc(file_v1_setting_service, 14, 1);/*** Describes the message bytebase.v1.Algorithm.RangeMask.Slice.* Use `create(Algorithm_RangeMask_SliceSchema)` to create a new message.*/export const Algorithm_RangeMask_SliceSchema = /*@__PURE__*/- messageDesc(file_v1_setting_service, 13, 1, 0);+ messageDesc(file_v1_setting_service, 14, 1, 0);/*** Describes the message bytebase.v1.Algorithm.MD5Mask.* Use `create(Algorithm_MD5MaskSchema)` to create a new message.*/export const Algorithm_MD5MaskSchema = /*@__PURE__*/- messageDesc(file_v1_setting_service, 13, 2);+ messageDesc(file_v1_setting_service, 14, 2);/*** Describes the message bytebase.v1.Algorithm.InnerOuterMask.* Use `create(Algorithm_InnerOuterMaskSchema)` to create a new message.*/export const Algorithm_InnerOuterMaskSchema = /*@__PURE__*/- messageDesc(file_v1_setting_service, 13, 3);+ messageDesc(file_v1_setting_service, 14, 3);/*** Describes the enum bytebase.v1.Algorithm.InnerOuterMask.MaskType.*/export const Algorithm_InnerOuterMask_MaskTypeSchema = /*@__PURE__*/- enumDesc(file_v1_setting_service, 13, 3, 0);+ enumDesc(file_v1_setting_service, 14, 3, 0);/*** @generated from enum bytebase.v1.Algorithm.InnerOuterMask.MaskType@@ -298,13 +298,13 @@ export const Algorithm_InnerOuterMask_MaskType = /*@__PURE__*/* Use `create(AISettingSchema)` to create a new message.*/export const AISettingSchema = /*@__PURE__*/- messageDesc(file_v1_setting_service, 14);+ messageDesc(file_v1_setting_service, 15);/*** Describes the enum bytebase.v1.AISetting.Provider.*/export const AISetting_ProviderSchema = /*@__PURE__*/- enumDesc(file_v1_setting_service, 14, 0);+ enumDesc(file_v1_setting_service, 15, 0);/*** @generated from enum bytebase.v1.AISetting.Provider@@ -317,34 +317,34 @@ export const AISetting_Provider = /*@__PURE__*/* Use `create(EnvironmentSettingSchema)` to create a new message.*/export const EnvironmentSettingSchema = /*@__PURE__*/- messageDesc(file_v1_setting_service, 15);+ messageDesc(file_v1_setting_service, 16);/*** Describes the message bytebase.v1.EnvironmentSetting.Environment.* Use `create(EnvironmentSetting_EnvironmentSchema)` to create a new message.*/export const EnvironmentSetting_EnvironmentSchema = /*@__PURE__*/- messageDesc(file_v1_setting_service, 15, 0);+ messageDesc(file_v1_setting_service, 16, 0);/*** Describes the message bytebase.v1.EmailSetting.* Use `create(EmailSettingSchema)` to create a new message.*/export const EmailSettingSchema = /*@__PURE__*/- messageDesc(file_v1_setting_service, 16);+ messageDesc(file_v1_setting_service, 17);/*** Describes the message bytebase.v1.EmailSetting.SMTPConfig.* Use `create(EmailSetting_SMTPConfigSchema)` to create a new message.*/export const EmailSetting_SMTPConfigSchema = /*@__PURE__*/- messageDesc(file_v1_setting_service, 16, 0);+ messageDesc(file_v1_setting_service, 17, 0);/*** Describes the enum bytebase.v1.EmailSetting.SMTPConfig.Encryption.*/export const EmailSetting_SMTPConfig_EncryptionSchema = /*@__PURE__*/- enumDesc(file_v1_setting_service, 16, 0, 0);+ enumDesc(file_v1_setting_service, 17, 0, 0);/*** @generated from enum bytebase.v1.EmailSetting.SMTPConfig.Encryption@@ -356,7 +356,7 @@ export const EmailSetting_SMTPConfig_Encryption = /*@__PURE__*/* Describes the enum bytebase.v1.EmailSetting.SMTPConfig.Authentication.*/export const EmailSetting_SMTPConfig_AuthenticationSchema = /*@__PURE__*/- enumDesc(file_v1_setting_service, 16, 0, 1);+ enumDesc(file_v1_setting_service, 17, 0, 1);/*** @generated from enum bytebase.v1.EmailSetting.SMTPConfig.Authentication@@ -368,7 +368,7 @@ export const EmailSetting_SMTPConfig_Authentication = /*@__PURE__*/* Describes the enum bytebase.v1.EmailSetting.Type.*/export const EmailSetting_TypeSchema = /*@__PURE__*/- enumDesc(file_v1_setting_service, 16, 0);+ enumDesc(file_v1_setting_service, 17, 0);/*** @generated from enum bytebase.v1.EmailSetting.Type@@ -381,14 +381,14 @@ export const EmailSetting_Type = /*@__PURE__*/* Use `create(TestEmailSettingRequestSchema)` to create a new message.*/export const TestEmailSettingRequestSchema = /*@__PURE__*/- messageDesc(file_v1_setting_service, 17);+ messageDesc(file_v1_setting_service, 18);/*** Describes the message bytebase.v1.TestEmailSettingResponse.* Use `create(TestEmailSettingResponseSchema)` to create a new message.*/export const TestEmailSettingResponseSchema = /*@__PURE__*/- messageDesc(file_v1_setting_service, 18);+ messageDesc(file_v1_setting_service, 19);/*** Describes the enum bytebase.v1.DatabaseChangeMode.diff --git a/frontend/src/utils/storage-keys.ts b/frontend/src/utils/storage-keys.tsindex 97e507996a..97c3093f7f 100644--- a/frontend/src/utils/storage-keys.ts+++ b/frontend/src/utils/storage-keys.ts@@ -69,9 +69,6 @@ export const storageKeyContextMenu = (key: string) => `bb.context-menu.${key}`;// unique only within a workspace (so they collide across workspaces in SaaS).export const storageKeySqlEditorLastProject = (scope: string) =>withScope("bb.sql-editor.last-project", scope);-// Workspace-scoped like other SQL Editor prefs.-export const storageKeySqlEditorTheme = (scope: string) =>- withScope("bb.sql-editor.theme", scope);export const storageKeySqlEditorTabs = (scope: string,project: string,diff --git a/proto/gen/grpc-doc/openapi.yaml b/proto/gen/grpc-doc/openapi.yamlindex dc04cf3444..d4c7a59e9f 100644--- a/proto/gen/grpc-doc/openapi.yaml+++ b/proto/gen/grpc-doc/openapi.yaml@@ -39,11 +39,6 @@ paths:schema:type: stringtitle: name- description: |-- Optional. The workspace to scope the response to.- Format: workspaces/{workspace}- When unset, the workspace is resolved from the request context (self-hosted)- or no workspace-scoped fields are returned (SaaS).responses:"200":description: Success@@ -404,14 +399,12 @@ paths:- $ref: '#/components/schemas/bytebase.v1.PolicyType'- type: "null"title: policy_type- description: Filter by specific policy type.- name: showDeletedin: querydescription: Show deleted policies if specified.schema:type: booleantitle: show_deleted- description: Show deleted policies if specified.responses:"200":description: Success@@ -439,7 +432,6 @@ paths:description: The type of policy to create.schema:title: type- description: The type of policy to create.$ref: '#/components/schemas/bytebase.v1.PolicyType'requestBody:description: The policy to create.@@ -536,209 +528,208 @@ paths:type: string- name: updateMaskin: query- description: The list of fields to update.- schema:- type: string- description: |-- `FieldMask` represents a set of symbolic field paths, for example:+ description: |-+ `FieldMask` represents a set of symbolic field paths, for example:- paths: "f.a"- paths: "f.b.d"+ paths: "f.a"+ paths: "f.b.d"- Here `f` represents a field in some root message, `a` and `b`- fields in the message found in `f`, and `d` a field found in the- message in `f.b`.+ Here `f` represents a field in some root message, `a` and `b`+ fields in the message found in `f`, and `d` a field found in the+ message in `f.b`.- Field masks are used to specify a subset of fields that should be- returned by a get operation or modified by an update operation.- Field masks also have a custom JSON encoding (see below).+ Field masks are used to specify a subset of fields that should be+ returned by a get operation or modified by an update operation.+ Field masks also have a custom JSON encoding (see below).- # Field Masks in Projections+ # Field Masks in Projections- When used in the context of a projection, a response message or- sub-message is filtered by the API to only contain those fields as- specified in the mask. For example, if the mask in the previous- example is applied to a response message as follows:+ When used in the context of a projection, a response message or+ sub-message is filtered by the API to only contain those fields as+ specified in the mask. For example, if the mask in the previous+ example is applied to a response message as follows:- f {- a : 22- b {- d : 1- x : 2- }- y : 13+ f {+ a : 22+ b {+ d : 1+ x : 2}- z: 8+ y : 13+ }+ z: 8- The result will not contain specific values for fields x,y and z- (their value will be set to the default, and omitted in proto text- output):+ The result will not contain specific values for fields x,y and z+ (their value will be set to the default, and omitted in proto text+ output):- f {- a : 22- b {- d : 1- }+ f {+ a : 22+ b {+ d : 1}+ }++ A repeated field is not allowed except at the last position of a+ paths string.++ If a FieldMask object is not present in a get operation, the+ operation applies to all fields (as if a FieldMask of all fields+ had been specified).++ Note that a field mask does not necessarily apply to the+ top-level response message. In case of a REST get operation, the+ field mask applies directly to the response, but in case of a REST+ list operation, the mask instead applies to each individual message+ in the returned resource list. In case of a REST custom method,+ other definitions may be used. Where the mask applies will be+ clearly documented together with its declaration in the API. In+ any case, the effect on the returned resource/resources is required+ behavior for APIs.++ # Field Masks in Update Operations++ A field mask in update operations specifies which fields of the+ targeted resource are going to be updated. The API is required+ to only change the values of the fields as specified in the mask+ and leave the others untouched. If a resource is passed in to+ describe the updated values, the API ignores the values of all+ fields not covered by the mask.++ If a repeated field is specified for an update operation, new values will+ be appended to the existing repeated field in the target resource. Note that+ a repeated field is only allowed in the last position of a `paths` string.++ If a sub-message is specified in the last position of the field mask for an+ update operation, then new value will be merged into the existing sub-message+ in the target resource.- A repeated field is not allowed except at the last position of a- paths string.-- If a FieldMask object is not present in a get operation, the- operation applies to all fields (as if a FieldMask of all fields- had been specified).-- Note that a field mask does not necessarily apply to the- top-level response message. In case of a REST get operation, the- field mask applies directly to the response, but in case of a REST- list operation, the mask instead applies to each individual message- in the returned resource list. In case of a REST custom method,- other definitions may be used. Where the mask applies will be- clearly documented together with its declaration in the API. In- any case, the effect on the returned resource/resources is required- behavior for APIs.-- # Field Masks in Update Operations-- A field mask in update operations specifies which fields of the- targeted resource are going to be updated. The API is required- to only change the values of the fields as specified in the mask- and leave the others untouched. If a resource is passed in to- describe the updated values, the API ignores the values of all- fields not covered by the mask.-- If a repeated field is specified for an update operation, new values will- be appended to the existing repeated field in the target resource. Note that- a repeated field is only allowed in the last position of a `paths` string.-- If a sub-message is specified in the last position of the field mask for an- update operation, then new value will be merged into the existing sub-message- in the target resource.-- For example, given the target message:-- f {- b {- d: 1- x: 2- }- c: [1]+ For example, given the target message:++ f {+ b {+ d: 1+ x: 2}+ c: [1]+ }- And an update message:+ And an update message:- f {- b {- d: 10- }- c: [2]+ f {+ b {+ d: 10}+ c: [2]+ }- then if the field mask is:+ then if the field mask is:- paths: ["f.b", "f.c"]+ paths: ["f.b", "f.c"]- then the result will be:+ then the result will be:- f {- b {- d: 10- x: 2- }- c: [1, 2]+ f {+ b {+ d: 10+ x: 2}+ c: [1, 2]+ }- An implementation may provide options to override this default behavior for- repeated and message fields.+ An implementation may provide options to override this default behavior for+ repeated and message fields.- In order to reset a field's value to the default, the field must- be in the mask and set to the default value in the provided resource.- Hence, in order to reset all fields of a resource, provide a default- instance of the resource and set all fields in the mask, or do- not provide a mask as described below.+ In order to reset a field's value to the default, the field must+ be in the mask and set to the default value in the provided resource.+ Hence, in order to reset all fields of a resource, provide a default+ instance of the resource and set all fields in the mask, or do+ not provide a mask as described below.- If a field mask is not present on update, the operation applies to- all fields (as if a field mask of all fields has been specified).- Note that in the presence of schema evolution, this may mean that- fields the client does not know and has therefore not filled into- the request will be reset to their default. If this is unwanted- behavior, a specific service may require a client to always specify- a field mask, producing an error if not.+ If a field mask is not present on update, the operation applies to+ all fields (as if a field mask of all fields has been specified).+ Note that in the presence of schema evolution, this may mean that+ fields the client does not know and has therefore not filled into+ the request will be reset to their default. If this is unwanted+ behavior, a specific service may require a client to always specify+ a field mask, producing an error if not.- As with get operations, the location of the resource which- describes the updated values in the request message depends on the- operation kind. In any case, the effect of the field mask is- required to be honored by the API.+ As with get operations, the location of the resource which+ describes the updated values in the request message depends on the+ operation kind. In any case, the effect of the field mask is+ required to be honored by the API.- ## Considerations for HTTP REST+ ## Considerations for HTTP REST- The HTTP kind of an update operation which uses a field mask must- be set to PATCH instead of PUT in order to satisfy HTTP semantics- (PUT must only be used for full updates).+ The HTTP kind of an update operation which uses a field mask must+ be set to PATCH instead of PUT in order to satisfy HTTP semantics+ (PUT must only be used for full updates).- # JSON Encoding of Field Masks+ # JSON Encoding of Field Masks- In JSON, a field mask is encoded as a single string where paths are- separated by a comma. Fields name in each path are converted- to/from lower-camel naming conventions.+ In JSON, a field mask is encoded as a single string where paths are+ separated by a comma. Fields name in each path are converted+ to/from lower-camel naming conventions.- As an example, consider the following message declarations:+ As an example, consider the following message declarations:- message Profile {- User user = 1;- Photo photo = 2;- }- message User {- string display_name = 1;- string address = 2;- }+ message Profile {+ User user = 1;+ Photo photo = 2;+ }+ message User {+ string display_name = 1;+ string address = 2;+ }- In proto a field mask for `Profile` may look as such:+ In proto a field mask for `Profile` may look as such:- mask {- paths: "user.display_name"- paths: "photo"- }+ mask {+ paths: "user.display_name"+ paths: "photo"+ }- In JSON, the same mask is represented as below:+ In JSON, the same mask is represented as below:- {- mask: "user.displayName,photo"- }+ {+ mask: "user.displayName,photo"+ }- # Field Masks and Oneof Fields+ # Field Masks and Oneof Fields- Field masks treat fields in oneofs just as regular fields. Consider the- following message:+ Field masks treat fields in oneofs just as regular fields. Consider the+ following message:- message SampleMessage {- oneof test_oneof {- string name = 4;- SubMessage sub_message = 9;- }+ message SampleMessage {+ oneof test_oneof {+ string name = 4;+ SubMessage sub_message = 9;}+ }- The field mask can be:+ The field mask can be:- mask {- paths: "name"- }+ mask {+ paths: "name"+ }- Or:+ Or:- mask {- paths: "sub_message"- }+ mask {+ paths: "sub_message"+ }- Note that oneof type names ("test_oneof" in this case) cannot be used in- paths.+ Note that oneof type names ("test_oneof" in this case) cannot be used in+ paths.- ## Field Mask Verification+ ## Field Mask Verification- The implementation of any API method which has a FieldMask type field in the- request should verify the included field paths, and return an- `INVALID_ARGUMENT` error if any path is unmappable.+ The implementation of any API method which has a FieldMask type field in the+ request should verify the included field paths, and return an+ `INVALID_ARGUMENT` error if any path is unmappable.+ schema:+ type: string- name: allowMissingin: querydescription: |-@@ -747,9 +738,6 @@ paths:schema:type: booleantitle: allow_missing- description: |-- If set to true, and the policy is not found, a new policy will be created.- In this situation, `update_mask` is ignored.requestBody:description: |-The policy to update.@@ -802,11 +790,6 @@ paths:type: integertitle: page_sizeformat: int32- description: |-- 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.- name: pageTokenin: querydescription: |-@@ -818,12 +801,6 @@ paths:schema:type: stringtitle: page_token- description: |-- 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.- name: filterin: querydescription: |-@@ -846,23 +823,6 @@ paths:schema:type: stringtitle: filter- description: |-- Filter is used to filter groups returned in the list.- The syntax and semantics of CEL are documented at https://github.com/google/cel-spec-- Supported filter:- - title: the group title, support "==" and ".contains()" operator.- - email: the group email, support "==" and ".contains()" operator.- - project: the project full name in "projects/{id}" format, support "==" operator.-- For example:- title == "dba"- email == "[email protected]"- title.contains("dba")- email.contains("dba")- project == "projects/sample-project"- You can combine filter conditions like:- title.contains("dba") || email.contains("dba")responses:"200":description: Success@@ -888,9 +848,6 @@ paths:schema:type: stringtitle: group_email- description: |-- The email to use for the group, which will become the final component- of the group's resource name.requestBody:description: The group to create.content:@@ -970,209 +927,208 @@ paths:type: string- name: updateMaskin: query- description: The list of fields to update.- schema:- type: string- description: |-- `FieldMask` represents a set of symbolic field paths, for example:+ description: |-+ `FieldMask` represents a set of symbolic field paths, for example:- paths: "f.a"- paths: "f.b.d"+ paths: "f.a"+ paths: "f.b.d"- Here `f` represents a field in some root message, `a` and `b`- fields in the message found in `f`, and `d` a field found in the- message in `f.b`.+ Here `f` represents a field in some root message, `a` and `b`+ fields in the message found in `f`, and `d` a field found in the+ message in `f.b`.- Field masks are used to specify a subset of fields that should be- returned by a get operation or modified by an update operation.- Field masks also have a custom JSON encoding (see below).+ Field masks are used to specify a subset of fields that should be+ returned by a get operation or modified by an update operation.+ Field masks also have a custom JSON encoding (see below).- # Field Masks in Projections+ # Field Masks in Projections- When used in the context of a projection, a response message or- sub-message is filtered by the API to only contain those fields as- specified in the mask. For example, if the mask in the previous- example is applied to a response message as follows:+ When used in the context of a projection, a response message or+ sub-message is filtered by the API to only contain those fields as+ specified in the mask. For example, if the mask in the previous+ example is applied to a response message as follows:- f {- a : 22- b {- d : 1- x : 2- }- y : 13+ f {+ a : 22+ b {+ d : 1+ x : 2}- z: 8+ y : 13+ }+ z: 8- The result will not contain specific values for fields x,y and z- (their value will be set to the default, and omitted in proto text- output):+ The result will not contain specific values for fields x,y and z+ (their value will be set to the default, and omitted in proto text+ output):- f {- a : 22- b {- d : 1- }+ f {+ a : 22+ b {+ d : 1}+ }++ A repeated field is not allowed except at the last position of a+ paths string.++ If a FieldMask object is not present in a get operation, the+ operation applies to all fields (as if a FieldMask of all fields+ had been specified).++ Note that a field mask does not necessarily apply to the+ top-level response message. In case of a REST get operation, the+ field mask applies directly to the response, but in case of a REST+ list operation, the mask instead applies to each individual message+ in the returned resource list. In case of a REST custom method,+ other definitions may be used. Where the mask applies will be+ clearly documented together with its declaration in the API. In+ any case, the effect on the returned resource/resources is required+ behavior for APIs.++ # Field Masks in Update Operations++ A field mask in update operations specifies which fields of the+ targeted resource are going to be updated. The API is required+ to only change the values of the fields as specified in the mask+ and leave the others untouched. If a resource is passed in to+ describe the updated values, the API ignores the values of all+ fields not covered by the mask.++ If a repeated field is specified for an update operation, new values will+ be appended to the existing repeated field in the target resource. Note that+ a repeated field is only allowed in the last position of a `paths` string.++ If a sub-message is specified in the last position of the field mask for an+ update operation, then new value will be merged into the existing sub-message+ in the target resource.- A repeated field is not allowed except at the last position of a- paths string.-- If a FieldMask object is not present in a get operation, the- operation applies to all fields (as if a FieldMask of all fields- had been specified).-- Note that a field mask does not necessarily apply to the- top-level response message. In case of a REST get operation, the- field mask applies directly to the response, but in case of a REST- list operation, the mask instead applies to each individual message- in the returned resource list. In case of a REST custom method,- other definitions may be used. Where the mask applies will be- clearly documented together with its declaration in the API. In- any case, the effect on the returned resource/resources is required- behavior for APIs.-- # Field Masks in Update Operations-- A field mask in update operations specifies which fields of the- targeted resource are going to be updated. The API is required- to only change the values of the fields as specified in the mask- and leave the others untouched. If a resource is passed in to- describe the updated values, the API ignores the values of all- fields not covered by the mask.-- If a repeated field is specified for an update operation, new values will- be appended to the existing repeated field in the target resource. Note that- a repeated field is only allowed in the last position of a `paths` string.-- If a sub-message is specified in the last position of the field mask for an- update operation, then new value will be merged into the existing sub-message- in the target resource.-- For example, given the target message:-- f {- b {- d: 1- x: 2- }- c: [1]+ For example, given the target message:++ f {+ b {+ d: 1+ x: 2}+ c: [1]+ }- And an update message:+ And an update message:- f {- b {- d: 10- }- c: [2]+ f {+ b {+ d: 10}+ c: [2]+ }- then if the field mask is:+ then if the field mask is:- paths: ["f.b", "f.c"]+ paths: ["f.b", "f.c"]- then the result will be:+ then the result will be:- f {- b {- d: 10- x: 2- }- c: [1, 2]+ f {+ b {+ d: 10+ x: 2}+ c: [1, 2]+ }- An implementation may provide options to override this default behavior for- repeated and message fields.+ An implementation may provide options to override this default behavior for+ repeated and message fields.- In order to reset a field's value to the default, the field must- be in the mask and set to the default value in the provided resource.- Hence, in order to reset all fields of a resource, provide a default- instance of the resource and set all fields in the mask, or do- not provide a mask as described below.+ In order to reset a field's value to the default, the field must+ be in the mask and set to the default value in the provided resource.+ Hence, in order to reset all fields of a resource, provide a default+ instance of the resource and set all fields in the mask, or do+ not provide a mask as described below.- If a field mask is not present on update, the operation applies to- all fields (as if a field mask of all fields has been specified).- Note that in the presence of schema evolution, this may mean that- fields the client does not know and has therefore not filled into- the request will be reset to their default. If this is unwanted- behavior, a specific service may require a client to always specify- a field mask, producing an error if not.+ If a field mask is not present on update, the operation applies to+ all fields (as if a field mask of all fields has been specified).+ Note that in the presence of schema evolution, this may mean that+ fields the client does not know and has therefore not filled into+ the request will be reset to their default. If this is unwanted+ behavior, a specific service may require a client to always specify+ a field mask, producing an error if not.- As with get operations, the location of the resource which- describes the updated values in the request message depends on the- operation kind. In any case, the effect of the field mask is- required to be honored by the API.+ As with get operations, the location of the resource which+ describes the updated values in the request message depends on the+ operation kind. In any case, the effect of the field mask is+ required to be honored by the API.- ## Considerations for HTTP REST+ ## Considerations for HTTP REST- The HTTP kind of an update operation which uses a field mask must- be set to PATCH instead of PUT in order to satisfy HTTP semantics- (PUT must only be used for full updates).+ The HTTP kind of an update operation which uses a field mask must+ be set to PATCH instead of PUT in order to satisfy HTTP semantics+ (PUT must only be used for full updates).- # JSON Encoding of Field Masks+ # JSON Encoding of Field Masks- In JSON, a field mask is encoded as a single string where paths are- separated by a comma. Fields name in each path are converted- to/from lower-camel naming conventions.+ In JSON, a field mask is encoded as a single string where paths are+ separated by a comma. Fields name in each path are converted+ to/from lower-camel naming conventions.- As an example, consider the following message declarations:+ As an example, consider the following message declarations:- message Profile {- User user = 1;- Photo photo = 2;- }- message User {- string display_name = 1;- string address = 2;- }+ message Profile {+ User user = 1;+ Photo photo = 2;+ }+ message User {+ string display_name = 1;+ string address = 2;+ }- In proto a field mask for `Profile` may look as such:+ In proto a field mask for `Profile` may look as such:- mask {- paths: "user.display_name"- paths: "photo"- }+ mask {+ paths: "user.display_name"+ paths: "photo"+ }- In JSON, the same mask is represented as below:+ In JSON, the same mask is represented as below:- {- mask: "user.displayName,photo"- }+ {+ mask: "user.displayName,photo"+ }- # Field Masks and Oneof Fields+ # Field Masks and Oneof Fields- Field masks treat fields in oneofs just as regular fields. Consider the- following message:+ Field masks treat fields in oneofs just as regular fields. Consider the+ following message:- message SampleMessage {- oneof test_oneof {- string name = 4;- SubMessage sub_message = 9;- }+ message SampleMessage {+ oneof test_oneof {+ string name = 4;+ SubMessage sub_message = 9;}+ }- The field mask can be:+ The field mask can be:- mask {- paths: "name"- }+ mask {+ paths: "name"+ }- Or:+ Or:- mask {- paths: "sub_message"- }+ mask {+ paths: "sub_message"+ }- Note that oneof type names ("test_oneof" in this case) cannot be used in- paths.+ Note that oneof type names ("test_oneof" in this case) cannot be used in+ paths.- ## Field Mask Verification+ ## Field Mask Verification- The implementation of any API method which has a FieldMask type field in the- request should verify the included field paths, and return an- `INVALID_ARGUMENT` error if any path is unmappable.+ The implementation of any API method which has a FieldMask type field in the+ request should verify the included field paths, and return an+ `INVALID_ARGUMENT` error if any path is unmappable.+ schema:+ type: string- name: allowMissingin: querydescription: |-@@ -1181,9 +1137,6 @@ paths:schema:type: booleantitle: allow_missing- description: |-- If set to true, and the group is not found, a new group will be created.- In this situation, `update_mask` is ignored.requestBody:description: |-The group to update.@@ -1229,9 +1182,6 @@ paths:items:type: stringtitle: names- description: |-- The group names to retrieve.- Format: groups/{email}responses:"200":description: Success@@ -1258,10 +1208,6 @@ paths:schema:type: stringtitle: parent- description: |-- The parent workspace whose identity providers should be listed.- Format: workspaces/{workspace}- When unset, the workspace is resolved from the request context.responses:"200":description: Success@@ -1289,19 +1235,12 @@ paths:schema:type: stringtitle: identity_provider_id- description: |-- The ID to use for the identity provider, which will become the final component of- the identity provider's resource name.-- This value should be 4-63 characters, and valid characters- are /[a-z][0-9]-/.- name: validateOnlyin: querydescription: If set to true, the request will be validated without actually creating the identity provider.schema:type: booleantitle: validate_only- description: If set to true, the request will be validated without actually creating the identity provider.requestBody:description: The identity provider to create.content:@@ -1402,209 +1341,208 @@ paths:type: string- name: updateMaskin: query- description: The list of fields to update.- schema:- type: string- description: |-- `FieldMask` represents a set of symbolic field paths, for example:+ description: |-+ `FieldMask` represents a set of symbolic field paths, for example:- paths: "f.a"- paths: "f.b.d"+ paths: "f.a"+ paths: "f.b.d"- Here `f` represents a field in some root message, `a` and `b`- fields in the message found in `f`, and `d` a field found in the- message in `f.b`.+ Here `f` represents a field in some root message, `a` and `b`+ fields in the message found in `f`, and `d` a field found in the+ message in `f.b`.- Field masks are used to specify a subset of fields that should be- returned by a get operation or modified by an update operation.- Field masks also have a custom JSON encoding (see below).+ Field masks are used to specify a subset of fields that should be+ returned by a get operation or modified by an update operation.+ Field masks also have a custom JSON encoding (see below).- # Field Masks in Projections+ # Field Masks in Projections- When used in the context of a projection, a response message or- sub-message is filtered by the API to only contain those fields as- specified in the mask. For example, if the mask in the previous- example is applied to a response message as follows:+ When used in the context of a projection, a response message or+ sub-message is filtered by the API to only contain those fields as+ specified in the mask. For example, if the mask in the previous+ example is applied to a response message as follows:- f {- a : 22- b {- d : 1- x : 2- }- y : 13+ f {+ a : 22+ b {+ d : 1+ x : 2}- z: 8+ y : 13+ }+ z: 8- The result will not contain specific values for fields x,y and z- (their value will be set to the default, and omitted in proto text- output):+ The result will not contain specific values for fields x,y and z+ (their value will be set to the default, and omitted in proto text+ output):- f {- a : 22- b {- d : 1- }+ f {+ a : 22+ b {+ d : 1}+ }++ A repeated field is not allowed except at the last position of a+ paths string.++ If a FieldMask object is not present in a get operation, the+ operation applies to all fields (as if a FieldMask of all fields+ had been specified).++ Note that a field mask does not necessarily apply to the+ top-level response message. In case of a REST get operation, the+ field mask applies directly to the response, but in case of a REST+ list operation, the mask instead applies to each individual message+ in the returned resource list. In case of a REST custom method,+ other definitions may be used. Where the mask applies will be+ clearly documented together with its declaration in the API. In+ any case, the effect on the returned resource/resources is required+ behavior for APIs.++ # Field Masks in Update Operations++ A field mask in update operations specifies which fields of the+ targeted resource are going to be updated. The API is required+ to only change the values of the fields as specified in the mask+ and leave the others untouched. If a resource is passed in to+ describe the updated values, the API ignores the values of all+ fields not covered by the mask.++ If a repeated field is specified for an update operation, new values will+ be appended to the existing repeated field in the target resource. Note that+ a repeated field is only allowed in the last position of a `paths` string.++ If a sub-message is specified in the last position of the field mask for an+ update operation, then new value will be merged into the existing sub-message+ in the target resource.- A repeated field is not allowed except at the last position of a- paths string.-- If a FieldMask object is not present in a get operation, the- operation applies to all fields (as if a FieldMask of all fields- had been specified).-- Note that a field mask does not necessarily apply to the- top-level response message. In case of a REST get operation, the- field mask applies directly to the response, but in case of a REST- list operation, the mask instead applies to each individual message- in the returned resource list. In case of a REST custom method,- other definitions may be used. Where the mask applies will be- clearly documented together with its declaration in the API. In- any case, the effect on the returned resource/resources is required- behavior for APIs.-- # Field Masks in Update Operations-- A field mask in update operations specifies which fields of the- targeted resource are going to be updated. The API is required- to only change the values of the fields as specified in the mask- and leave the others untouched. If a resource is passed in to- describe the updated values, the API ignores the values of all- fields not covered by the mask.-- If a repeated field is specified for an update operation, new values will- be appended to the existing repeated field in the target resource. Note that- a repeated field is only allowed in the last position of a `paths` string.-- If a sub-message is specified in the last position of the field mask for an- update operation, then new value will be merged into the existing sub-message- in the target resource.-- For example, given the target message:-- f {- b {- d: 1- x: 2- }- c: [1]+ For example, given the target message:++ f {+ b {+ d: 1+ x: 2}+ c: [1]+ }- And an update message:+ And an update message:- f {- b {- d: 10- }- c: [2]+ f {+ b {+ d: 10}+ c: [2]+ }- then if the field mask is:+ then if the field mask is:- paths: ["f.b", "f.c"]+ paths: ["f.b", "f.c"]- then the result will be:+ then the result will be:- f {- b {- d: 10- x: 2- }- c: [1, 2]+ f {+ b {+ d: 10+ x: 2}+ c: [1, 2]+ }- An implementation may provide options to override this default behavior for- repeated and message fields.+ An implementation may provide options to override this default behavior for+ repeated and message fields.- In order to reset a field's value to the default, the field must- be in the mask and set to the default value in the provided resource.- Hence, in order to reset all fields of a resource, provide a default- instance of the resource and set all fields in the mask, or do- not provide a mask as described below.+ In order to reset a field's value to the default, the field must+ be in the mask and set to the default value in the provided resource.+ Hence, in order to reset all fields of a resource, provide a default+ instance of the resource and set all fields in the mask, or do+ not provide a mask as described below.- If a field mask is not present on update, the operation applies to- all fields (as if a field mask of all fields has been specified).- Note that in the presence of schema evolution, this may mean that- fields the client does not know and has therefore not filled into- the request will be reset to their default. If this is unwanted- behavior, a specific service may require a client to always specify- a field mask, producing an error if not.+ If a field mask is not present on update, the operation applies to+ all fields (as if a field mask of all fields has been specified).+ Note that in the presence of schema evolution, this may mean that+ fields the client does not know and has therefore not filled into+ the request will be reset to their default. If this is unwanted+ behavior, a specific service may require a client to always specify+ a field mask, producing an error if not.- As with get operations, the location of the resource which- describes the updated values in the request message depends on the- operation kind. In any case, the effect of the field mask is- required to be honored by the API.+ As with get operations, the location of the resource which+ describes the updated values in the request message depends on the+ operation kind. In any case, the effect of the field mask is+ required to be honored by the API.- ## Considerations for HTTP REST+ ## Considerations for HTTP REST- The HTTP kind of an update operation which uses a field mask must- be set to PATCH instead of PUT in order to satisfy HTTP semantics- (PUT must only be used for full updates).+ The HTTP kind of an update operation which uses a field mask must+ be set to PATCH instead of PUT in order to satisfy HTTP semantics+ (PUT must only be used for full updates).- # JSON Encoding of Field Masks+ # JSON Encoding of Field Masks- In JSON, a field mask is encoded as a single string where paths are- separated by a comma. Fields name in each path are converted- to/from lower-camel naming conventions.+ In JSON, a field mask is encoded as a single string where paths are+ separated by a comma. Fields name in each path are converted+ to/from lower-camel naming conventions.- As an example, consider the following message declarations:+ As an example, consider the following message declarations:- message Profile {- User user = 1;- Photo photo = 2;- }- message User {- string display_name = 1;- string address = 2;- }+ message Profile {+ User user = 1;+ Photo photo = 2;+ }+ message User {+ string display_name = 1;+ string address = 2;+ }- In proto a field mask for `Profile` may look as such:+ In proto a field mask for `Profile` may look as such:- mask {- paths: "user.display_name"- paths: "photo"- }+ mask {+ paths: "user.display_name"+ paths: "photo"+ }- In JSON, the same mask is represented as below:+ In JSON, the same mask is represented as below:- {- mask: "user.displayName,photo"- }+ {+ mask: "user.displayName,photo"+ }- # Field Masks and Oneof Fields+ # Field Masks and Oneof Fields- Field masks treat fields in oneofs just as regular fields. Consider the- following message:+ Field masks treat fields in oneofs just as regular fields. Consider the+ following message:- message SampleMessage {- oneof test_oneof {- string name = 4;- SubMessage sub_message = 9;- }+ message SampleMessage {+ oneof test_oneof {+ string name = 4;+ SubMessage sub_message = 9;}+ }- The field mask can be:+ The field mask can be:- mask {- paths: "name"- }+ mask {+ paths: "name"+ }- Or:+ Or:- mask {- paths: "sub_message"- }+ mask {+ paths: "sub_message"+ }- Note that oneof type names ("test_oneof" in this case) cannot be used in- paths.+ Note that oneof type names ("test_oneof" in this case) cannot be used in+ paths.- ## Field Mask Verification+ ## Field Mask Verification- The implementation of any API method which has a FieldMask type field in the- request should verify the included field paths, and return an- `INVALID_ARGUMENT` error if any path is unmappable.+ The implementation of any API method which has a FieldMask type field in the+ request should verify the included field paths, and return an+ `INVALID_ARGUMENT` error if any path is unmappable.+ schema:+ type: string- name: allowMissingin: querydescription: |-@@ -1613,9 +1551,6 @@ paths:schema:type: booleantitle: allow_missing- description: |-- 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.requestBody:description: |-The identity provider to update.@@ -1660,11 +1595,6 @@ paths:type: integertitle: page_sizeformat: int32- description: |-- The maximum number of instances to return. The service may return fewer than- this value.- If unspecified, at most 10 instances will be returned.- The maximum value is 1000; values above 1000 will be coerced to 1000.- name: pageTokenin: querydescription: |-@@ -1676,19 +1606,12 @@ paths:schema:type: stringtitle: page_token- description: |-- A page token, received from a previous `ListInstances` call.- Provide this to retrieve the subsequent page.-- When paginating, all other parameters provided to `ListInstances` must match- the call that provided the page token.- name: showDeletedin: querydescription: Show deleted instances if specified.schema:type: booleantitle: show_deleted- description: Show deleted instances if specified.- name: filterin: querydescription: |-@@ -1730,42 +1653,6 @@ paths:schema:type: stringtitle: filter- description: |-- Filter the instance.- The syntax and semantics of CEL are documented at https://github.com/google/cel-spec-- Supported filters:- - name: the instance name, support "==" and ".contains()" operator.- - resource_id: the instance id, support "==" and ".contains()" operator.- - environment: the environment full name in "environments/{id}" format, support "==" operator.- - state: the instance state, check State enum for values, support "==" operator.- - engine: the instance engine, check Engine enum for values. Support "==", "in [xx]", "!(in [xx])" operator.- - host: the instance host, support "==" and ".contains()" operator.- - port: the instance port, support "==" and ".contains()" operator.- - project: the project full name in "projects/{id}" format, support "==" operator.- - labels.{key}: the instance label, support "==" and "in" operators.-- For example:- name == "sample instance"- name.contains("sample")- resource_id == "sample-instance"- resource_id.contains("sample")- state == "DELETED"- environment == "environments/test"- environment == "" (find instances which environment is not set)- engine == "MYSQL"- engine in ["MYSQL", "POSTGRES"]- !(engine in ["MYSQL", "POSTGRES"])- host == "127.0.0.1"- host.contains("127.0")- port == "54321"- port.contains("543")- labels.org_group == "infrastructure"- labels.environment in ["prod", "production"]- project == "projects/sample-project"- You can combine filter conditions like:- name.contains("sample") && environment == "environments/test"- host == "127.0.0.1" && port == "54321"- name: orderByin: querydescription: |-@@ -1778,13 +1665,6 @@ paths:schema:type: stringtitle: order_by- description: |-- The order by of instances.- Support title, environment. The default sorting order is ascending.- For example:- - order_by = "title"- - order_by = "title desc"- - order_by = "title desc, environment asc"responses:"200":description: Success@@ -1812,19 +1692,12 @@ paths:schema:type: stringtitle: instance_id- description: |-- The ID to use for the instance, which will become the final component of- the instance's resource name.-- This value should be 4-63 characters, and valid characters- are /[a-z][0-9]-/.- name: validateOnlyin: querydescription: Validate only also tests the data source connection.schema:type: booleantitle: validate_only- description: Validate only also tests the data source connection.requestBody:description: The instance to create.content:@@ -1884,7 +1757,6 @@ paths:schema:type: booleantitle: force- description: If set to true, any databases and sheets from this project will also be moved to default project, and all open issues will be closed.- name: purgein: querydescription: |-@@ -1895,11 +1767,6 @@ paths:schema:type: booleantitle: purge- description: |-- If set to true, permanently purge the soft-deleted instance and all related resources.- This operation is irreversible. Following AIP-165, this should only be used for- administrative cleanup of old soft-deleted instances.- The instance must already be soft-deleted for this to work.responses:"200":description: Success@@ -1924,209 +1791,208 @@ paths:type: string- name: updateMaskin: query- description: The list of fields to update.- schema:- type: string- description: |-- `FieldMask` represents a set of symbolic field paths, for example:+ description: |-+ `FieldMask` represents a set of symbolic field paths, for example:- paths: "f.a"- paths: "f.b.d"+ paths: "f.a"+ paths: "f.b.d"- Here `f` represents a field in some root message, `a` and `b`- fields in the message found in `f`, and `d` a field found in the- message in `f.b`.+ Here `f` represents a field in some root message, `a` and `b`+ fields in the message found in `f`, and `d` a field found in the+ message in `f.b`.- Field masks are used to specify a subset of fields that should be- returned by a get operation or modified by an update operation.- Field masks also have a custom JSON encoding (see below).+ Field masks are used to specify a subset of fields that should be+ returned by a get operation or modified by an update operation.+ Field masks also have a custom JSON encoding (see below).- # Field Masks in Projections+ # Field Masks in Projections- When used in the context of a projection, a response message or- sub-message is filtered by the API to only contain those fields as- specified in the mask. For example, if the mask in the previous- example is applied to a response message as follows:+ When used in the context of a projection, a response message or+ sub-message is filtered by the API to only contain those fields as+ specified in the mask. For example, if the mask in the previous+ example is applied to a response message as follows:- f {- a : 22- b {- d : 1- x : 2- }- y : 13+ f {+ a : 22+ b {+ d : 1+ x : 2}- z: 8+ y : 13+ }+ z: 8- The result will not contain specific values for fields x,y and z- (their value will be set to the default, and omitted in proto text- output):+ The result will not contain specific values for fields x,y and z+ (their value will be set to the default, and omitted in proto text+ output):- f {- a : 22- b {- d : 1- }+ f {+ a : 22+ b {+ d : 1}+ }++ A repeated field is not allowed except at the last position of a+ paths string.++ If a FieldMask object is not present in a get operation, the+ operation applies to all fields (as if a FieldMask of all fields+ had been specified).++ Note that a field mask does not necessarily apply to the+ top-level response message. In case of a REST get operation, the+ field mask applies directly to the response, but in case of a REST+ list operation, the mask instead applies to each individual message+ in the returned resource list. In case of a REST custom method,+ other definitions may be used. Where the mask applies will be+ clearly documented together with its declaration in the API. In+ any case, the effect on the returned resource/resources is required+ behavior for APIs.++ # Field Masks in Update Operations++ A field mask in update operations specifies which fields of the+ targeted resource are going to be updated. The API is required+ to only change the values of the fields as specified in the mask+ and leave the others untouched. If a resource is passed in to+ describe the updated values, the API ignores the values of all+ fields not covered by the mask.- A repeated field is not allowed except at the last position of a- paths string.-- If a FieldMask object is not present in a get operation, the- operation applies to all fields (as if a FieldMask of all fields- had been specified).-- Note that a field mask does not necessarily apply to the- top-level response message. In case of a REST get operation, the- field mask applies directly to the response, but in case of a REST- list operation, the mask instead applies to each individual message- in the returned resource list. In case of a REST custom method,- other definitions may be used. Where the mask applies will be- clearly documented together with its declaration in the API. In- any case, the effect on the returned resource/resources is required- behavior for APIs.-- # Field Masks in Update Operations-- A field mask in update operations specifies which fields of the- targeted resource are going to be updated. The API is required- to only change the values of the fields as specified in the mask- and leave the others untouched. If a resource is passed in to- describe the updated values, the API ignores the values of all- fields not covered by the mask.-- If a repeated field is specified for an update operation, new values will- be appended to the existing repeated field in the target resource. Note that- a repeated field is only allowed in the last position of a `paths` string.-- If a sub-message is specified in the last position of the field mask for an- update operation, then new value will be merged into the existing sub-message- in the target resource.-- For example, given the target message:-- f {- b {- d: 1- x: 2- }- c: [1]+ If a repeated field is specified for an update operation, new values will+ be appended to the existing repeated field in the target resource. Note that+ a repeated field is only allowed in the last position of a `paths` string.++ If a sub-message is specified in the last position of the field mask for an+ update operation, then new value will be merged into the existing sub-message+ in the target resource.++ For example, given the target message:++ f {+ b {+ d: 1+ x: 2}+ c: [1]+ }- And an update message:+ And an update message:- f {- b {- d: 10- }- c: [2]+ f {+ b {+ d: 10}+ c: [2]+ }- then if the field mask is:+ then if the field mask is:- paths: ["f.b", "f.c"]+ paths: ["f.b", "f.c"]- then the result will be:+ then the result will be:- f {- b {- d: 10- x: 2- }- c: [1, 2]+ f {+ b {+ d: 10+ x: 2}+ c: [1, 2]+ }- An implementation may provide options to override this default behavior for- repeated and message fields.+ An implementation may provide options to override this default behavior for+ repeated and message fields.- In order to reset a field's value to the default, the field must- be in the mask and set to the default value in the provided resource.- Hence, in order to reset all fields of a resource, provide a default- instance of the resource and set all fields in the mask, or do- not provide a mask as described below.+ In order to reset a field's value to the default, the field must+ be in the mask and set to the default value in the provided resource.+ Hence, in order to reset all fields of a resource, provide a default+ instance of the resource and set all fields in the mask, or do+ not provide a mask as described below.- If a field mask is not present on update, the operation applies to- all fields (as if a field mask of all fields has been specified).- Note that in the presence of schema evolution, this may mean that- fields the client does not know and has therefore not filled into- the request will be reset to their default. If this is unwanted- behavior, a specific service may require a client to always specify- a field mask, producing an error if not.+ If a field mask is not present on update, the operation applies to+ all fields (as if a field mask of all fields has been specified).+ Note that in the presence of schema evolution, this may mean that+ fields the client does not know and has therefore not filled into+ the request will be reset to their default. If this is unwanted+ behavior, a specific service may require a client to always specify+ a field mask, producing an error if not.- As with get operations, the location of the resource which- describes the updated values in the request message depends on the- operation kind. In any case, the effect of the field mask is- required to be honored by the API.+ As with get operations, the location of the resource which+ describes the updated values in the request message depends on the+ operation kind. In any case, the effect of the field mask is+ required to be honored by the API.- ## Considerations for HTTP REST+ ## Considerations for HTTP REST- The HTTP kind of an update operation which uses a field mask must- be set to PATCH instead of PUT in order to satisfy HTTP semantics- (PUT must only be used for full updates).+ The HTTP kind of an update operation which uses a field mask must+ be set to PATCH instead of PUT in order to satisfy HTTP semantics+ (PUT must only be used for full updates).- # JSON Encoding of Field Masks+ # JSON Encoding of Field Masks- In JSON, a field mask is encoded as a single string where paths are- separated by a comma. Fields name in each path are converted- to/from lower-camel naming conventions.+ In JSON, a field mask is encoded as a single string where paths are+ separated by a comma. Fields name in each path are converted+ to/from lower-camel naming conventions.- As an example, consider the following message declarations:+ As an example, consider the following message declarations:- message Profile {- User user = 1;- Photo photo = 2;- }- message User {- string display_name = 1;- string address = 2;- }+ message Profile {+ User user = 1;+ Photo photo = 2;+ }+ message User {+ string display_name = 1;+ string address = 2;+ }- In proto a field mask for `Profile` may look as such:+ In proto a field mask for `Profile` may look as such:- mask {- paths: "user.display_name"- paths: "photo"- }+ mask {+ paths: "user.display_name"+ paths: "photo"+ }- In JSON, the same mask is represented as below:+ In JSON, the same mask is represented as below:- {- mask: "user.displayName,photo"- }+ {+ mask: "user.displayName,photo"+ }- # Field Masks and Oneof Fields+ # Field Masks and Oneof Fields- Field masks treat fields in oneofs just as regular fields. Consider the- following message:+ Field masks treat fields in oneofs just as regular fields. Consider the+ following message:- message SampleMessage {- oneof test_oneof {- string name = 4;- SubMessage sub_message = 9;- }+ message SampleMessage {+ oneof test_oneof {+ string name = 4;+ SubMessage sub_message = 9;}+ }- The field mask can be:+ The field mask can be:- mask {- paths: "name"- }+ mask {+ paths: "name"+ }- Or:+ Or:- mask {- paths: "sub_message"- }+ mask {+ paths: "sub_message"+ }- Note that oneof type names ("test_oneof" in this case) cannot be used in- paths.+ Note that oneof type names ("test_oneof" in this case) cannot be used in+ paths.- ## Field Mask Verification+ ## Field Mask Verification- The implementation of any API method which has a FieldMask type field in the- request should verify the included field paths, and return an- `INVALID_ARGUMENT` error if any path is unmappable.+ The implementation of any API method which has a FieldMask type field in the+ request should verify the included field paths, and return an+ `INVALID_ARGUMENT` error if any path is unmappable.+ schema:+ type: string- name: allowMissingin: querydescription: |-@@ -2135,9 +2001,6 @@ paths:schema:type: booleantitle: allow_missing- description: |-- If set to true, and the instance is not found, a new instance will be created.- In this situation, `update_mask` is ignored.requestBody:description: |-The instance to update.@@ -2188,11 +2051,6 @@ paths:type: integertitle: page_sizeformat: int32- description: |-- The maximum number of databases to return. The service may return fewer- than this value.- If unspecified, at most 10 databases will be returned.- The maximum value is 1000; values above 1000 will be coerced to 1000.- name: pageTokenin: querydescription: |-@@ -2204,12 +2062,6 @@ paths:schema:type: stringtitle: page_token- description: |-- A page token, received from a previous `ListDatabases` call.- Provide this to retrieve the subsequent page.-- When paginating, all other parameters provided to `ListDatabases` must- match the call that provided the page token.- name: filterin: querydescription: |-@@ -2247,45 +2099,12 @@ paths:schema:type: stringtitle: filter- description: |-- Filter is used to filter databases returned in the list.- The syntax and semantics of CEL are documented at https://github.com/google/cel-spec-- Supported filter:- - environment: the environment full name in "environments/{id}" format, support "==" operator.- - name: the database name, support ".contains()" operator.- - project: the project full name in "projects/{id}" format, support "==" operator.- - instance: the instance full name in "instances/{id}" format, support "==" operator.- - engine: the database engine, check Engine enum for values. Support "==", "in [xx]", "!(in [xx])" operator.- - exclude_unassigned: should be "true" or "false", will not show unassigned databases if it's true, support "==" operator.- - table: filter by the database table, support "==" and ".contains()" operator.- - labels.{key}: the database label, support "==" and "in" operators.-- For example:- environment == "environments/{environment resource id}"- environment == "" (find databases which environment is not set)- project == "projects/{project resource id}"- instance == "instances/{instance resource id}"- name.contains("database name")- engine == "MYSQL"- engine in ["MYSQL", "POSTGRES"]- !(engine in ["MYSQL", "POSTGRES"])- exclude_unassigned == true- table == "sample"- table.contains("sam")- labels.environment == "production"- labels.region == "asia"- labels.region in ["asia", "europe"]-- You can combine filter conditions like:- environment == "environments/prod" && name.contains("employee")- name: showDeletedin: querydescription: Show deleted database if specified.schema:type: booleantitle: show_deleted- description: Show deleted database if specified.- name: orderByin: querydescription: |-@@ -2298,13 +2117,6 @@ paths:schema:type: stringtitle: order_by- description: |-- The order by of databases.- Support name, project, instance. The default sorting order is ascending.- For example:- - order_by = "name" - order by name ascending- - order_by = "name desc"- - order_by = "name desc, project asc"responses:"200":description: Success@@ -2364,209 +2176,208 @@ paths:type: string- name: updateMaskin: query- description: The list of fields to update.- schema:- type: string- description: |-- `FieldMask` represents a set of symbolic field paths, for example:+ description: |-+ `FieldMask` represents a set of symbolic field paths, for example:- paths: "f.a"- paths: "f.b.d"+ paths: "f.a"+ paths: "f.b.d"- Here `f` represents a field in some root message, `a` and `b`- fields in the message found in `f`, and `d` a field found in the- message in `f.b`.+ Here `f` represents a field in some root message, `a` and `b`+ fields in the message found in `f`, and `d` a field found in the+ message in `f.b`.- Field masks are used to specify a subset of fields that should be- returned by a get operation or modified by an update operation.- Field masks also have a custom JSON encoding (see below).+ Field masks are used to specify a subset of fields that should be+ returned by a get operation or modified by an update operation.+ Field masks also have a custom JSON encoding (see below).- # Field Masks in Projections+ # Field Masks in Projections- When used in the context of a projection, a response message or- sub-message is filtered by the API to only contain those fields as- specified in the mask. For example, if the mask in the previous- example is applied to a response message as follows:+ When used in the context of a projection, a response message or+ sub-message is filtered by the API to only contain those fields as+ specified in the mask. For example, if the mask in the previous+ example is applied to a response message as follows:- f {- a : 22- b {- d : 1- x : 2- }- y : 13+ f {+ a : 22+ b {+ d : 1+ x : 2}- z: 8+ y : 13+ }+ z: 8- The result will not contain specific values for fields x,y and z- (their value will be set to the default, and omitted in proto text- output):+ The result will not contain specific values for fields x,y and z+ (their value will be set to the default, and omitted in proto text+ output):- f {- a : 22- b {- d : 1- }+ f {+ a : 22+ b {+ d : 1}+ }++ A repeated field is not allowed except at the last position of a+ paths string.++ If a FieldMask object is not present in a get operation, the+ operation applies to all fields (as if a FieldMask of all fields+ had been specified).++ Note that a field mask does not necessarily apply to the+ top-level response message. In case of a REST get operation, the+ field mask applies directly to the response, but in case of a REST+ list operation, the mask instead applies to each individual message+ in the returned resource list. In case of a REST custom method,+ other definitions may be used. Where the mask applies will be+ clearly documented together with its declaration in the API. In+ any case, the effect on the returned resource/resources is required+ behavior for APIs.++ # Field Masks in Update Operations++ A field mask in update operations specifies which fields of the+ targeted resource are going to be updated. The API is required+ to only change the values of the fields as specified in the mask+ and leave the others untouched. If a resource is passed in to+ describe the updated values, the API ignores the values of all+ fields not covered by the mask.- A repeated field is not allowed except at the last position of a- paths string.-- If a FieldMask object is not present in a get operation, the- operation applies to all fields (as if a FieldMask of all fields- had been specified).-- Note that a field mask does not necessarily apply to the- top-level response message. In case of a REST get operation, the- field mask applies directly to the response, but in case of a REST- list operation, the mask instead applies to each individual message- in the returned resource list. In case of a REST custom method,- other definitions may be used. Where the mask applies will be- clearly documented together with its declaration in the API. In- any case, the effect on the returned resource/resources is required- behavior for APIs.-- # Field Masks in Update Operations-- A field mask in update operations specifies which fields of the- targeted resource are going to be updated. The API is required- to only change the values of the fields as specified in the mask- and leave the others untouched. If a resource is passed in to- describe the updated values, the API ignores the values of all- fields not covered by the mask.-- If a repeated field is specified for an update operation, new values will- be appended to the existing repeated field in the target resource. Note that- a repeated field is only allowed in the last position of a `paths` string.-- If a sub-message is specified in the last position of the field mask for an- update operation, then new value will be merged into the existing sub-message- in the target resource.-- For example, given the target message:-- f {- b {- d: 1- x: 2- }- c: [1]+ If a repeated field is specified for an update operation, new values will+ be appended to the existing repeated field in the target resource. Note that+ a repeated field is only allowed in the last position of a `paths` string.++ If a sub-message is specified in the last position of the field mask for an+ update operation, then new value will be merged into the existing sub-message+ in the target resource.++ For example, given the target message:++ f {+ b {+ d: 1+ x: 2}+ c: [1]+ }- And an update message:+ And an update message:- f {- b {- d: 10- }- c: [2]+ f {+ b {+ d: 10}+ c: [2]+ }- then if the field mask is:+ then if the field mask is:- paths: ["f.b", "f.c"]+ paths: ["f.b", "f.c"]- then the result will be:+ then the result will be:- f {- b {- d: 10- x: 2- }- c: [1, 2]+ f {+ b {+ d: 10+ x: 2}+ c: [1, 2]+ }- An implementation may provide options to override this default behavior for- repeated and message fields.+ An implementation may provide options to override this default behavior for+ repeated and message fields.- In order to reset a field's value to the default, the field must- be in the mask and set to the default value in the provided resource.- Hence, in order to reset all fields of a resource, provide a default- instance of the resource and set all fields in the mask, or do- not provide a mask as described below.+ In order to reset a field's value to the default, the field must+ be in the mask and set to the default value in the provided resource.+ Hence, in order to reset all fields of a resource, provide a default+ instance of the resource and set all fields in the mask, or do+ not provide a mask as described below.- If a field mask is not present on update, the operation applies to- all fields (as if a field mask of all fields has been specified).- Note that in the presence of schema evolution, this may mean that- fields the client does not know and has therefore not filled into- the request will be reset to their default. If this is unwanted- behavior, a specific service may require a client to always specify- a field mask, producing an error if not.+ If a field mask is not present on update, the operation applies to+ all fields (as if a field mask of all fields has been specified).+ Note that in the presence of schema evolution, this may mean that+ fields the client does not know and has therefore not filled into+ the request will be reset to their default. If this is unwanted+ behavior, a specific service may require a client to always specify+ a field mask, producing an error if not.- As with get operations, the location of the resource which- describes the updated values in the request message depends on the- operation kind. In any case, the effect of the field mask is- required to be honored by the API.+ As with get operations, the location of the resource which+ describes the updated values in the request message depends on the+ operation kind. In any case, the effect of the field mask is+ required to be honored by the API.- ## Considerations for HTTP REST+ ## Considerations for HTTP REST- The HTTP kind of an update operation which uses a field mask must- be set to PATCH instead of PUT in order to satisfy HTTP semantics- (PUT must only be used for full updates).+ The HTTP kind of an update operation which uses a field mask must+ be set to PATCH instead of PUT in order to satisfy HTTP semantics+ (PUT must only be used for full updates).- # JSON Encoding of Field Masks+ # JSON Encoding of Field Masks- In JSON, a field mask is encoded as a single string where paths are- separated by a comma. Fields name in each path are converted- to/from lower-camel naming conventions.+ In JSON, a field mask is encoded as a single string where paths are+ separated by a comma. Fields name in each path are converted+ to/from lower-camel naming conventions.- As an example, consider the following message declarations:+ As an example, consider the following message declarations:- message Profile {- User user = 1;- Photo photo = 2;- }- message User {- string display_name = 1;- string address = 2;- }+ message Profile {+ User user = 1;+ Photo photo = 2;+ }+ message User {+ string display_name = 1;+ string address = 2;+ }- In proto a field mask for `Profile` may look as such:+ In proto a field mask for `Profile` may look as such:- mask {- paths: "user.display_name"- paths: "photo"- }+ mask {+ paths: "user.display_name"+ paths: "photo"+ }- In JSON, the same mask is represented as below:+ In JSON, the same mask is represented as below:- {- mask: "user.displayName,photo"- }+ {+ mask: "user.displayName,photo"+ }- # Field Masks and Oneof Fields+ # Field Masks and Oneof Fields- Field masks treat fields in oneofs just as regular fields. Consider the- following message:+ Field masks treat fields in oneofs just as regular fields. Consider the+ following message:- message SampleMessage {- oneof test_oneof {- string name = 4;- SubMessage sub_message = 9;- }+ message SampleMessage {+ oneof test_oneof {+ string name = 4;+ SubMessage sub_message = 9;}+ }- The field mask can be:+ The field mask can be:- mask {- paths: "name"- }+ mask {+ paths: "name"+ }- Or:+ Or:- mask {- paths: "sub_message"- }+ mask {+ paths: "sub_message"+ }- Note that oneof type names ("test_oneof" in this case) cannot be used in- paths.+ Note that oneof type names ("test_oneof" in this case) cannot be used in+ paths.- ## Field Mask Verification+ ## Field Mask Verification- The implementation of any API method which has a FieldMask type field in the- request should verify the included field paths, and return an- `INVALID_ARGUMENT` error if any path is unmappable.+ The implementation of any API method which has a FieldMask type field in the+ request should verify the included field paths, and return an+ `INVALID_ARGUMENT` error if any path is unmappable.+ schema:+ type: string- name: allowMissingin: querydescription: |-@@ -2575,9 +2386,6 @@ paths:schema:type: booleantitle: allow_missing- description: |-- If set to true, and the database is not found, a new database will be created.- In this situation, `update_mask` is ignored.requestBody:description: |-The database to update.@@ -2659,9 +2467,6 @@ paths:schema:type: booleantitle: allow_missing- description: |-- If set to true, and the database catalog is not found, a new database catalog will be created.- In this situation, `update_mask` is ignored.requestBody:description: |-The database catalog to update.@@ -2717,10 +2522,6 @@ paths:type: integertitle: page_sizeformat: int32- description: |-- The maximum number of changelogs to return. The service may return fewer- than this value. If unspecified, at most 10 changelogs will be returned.- The maximum value is 1000; values above 1000 will be coerced to 1000.- name: pageTokenin: querydescription: |-@@ -2732,12 +2533,6 @@ paths:schema:type: stringtitle: page_token- description: |-- A page token, received from the previous call.- Provide this to retrieve the subsequent page.-- When paginating, all other parameters provided must match- the call that provided the page token.- name: viewin: queryschema:@@ -2760,18 +2555,6 @@ paths:schema:type: stringtitle: filter- description: |-- Filter is used to filter changelogs returned in the list.- The syntax and semantics of CEL are documented at https://github.com/google/cel-spec-- Supported filter:- - status: the changelog status, support "==" operation. check Changelog.Status for available values.- - create_time: the changelog create time in "2006-01-02T15:04:05Z07:00" format, support ">=" or "<=" operator.-- Example:- status == "DONE"- status == "FAILED" && type == "SDL"- create_time >= "2024-01-01T00:00:00Z" && create_time <= "2024-01-02T00:00:00Z"responses:"200":description: Success@@ -2928,21 +2711,6 @@ paths:schema:type: stringtitle: filter- description: |-- Filter is used to filter databases returned in the list.- The syntax and semantics of CEL are documented at https://github.com/google/cel-spec-- Supported filter:- - schema: the schema name, support "==" operator.- - table: the table name, support "==" and ".contains()" operator.-- For example:- schema == "schema-a"- table == "table-a"- table.contains("table-a")- schema == "schema-a" && table.contains("sample")- The filter is used to search for tables containing "sample" in the schema "schemas/schema-a".- The column masking level will only be returned when a table filter is used.- name: limitin: querydescription: |-@@ -2954,11 +2722,6 @@ paths:type: integertitle: limitformat: int32- description: |-- Limit the response size of returned table metadata per schema.- For example, if the database has 3 schemas, and each schema has 100 tables,- if limit is 20, then only 20 tables will be returned for each schema, total 60 tables.- Default 0, means no limit.responses:"200":description: Success@@ -2996,14 +2759,12 @@ paths:- $ref: '#/components/schemas/bytebase.v1.PolicyType'- type: "null"title: policy_type- description: Filter by specific policy type.- name: showDeletedin: querydescription: Show deleted policies if specified.schema:type: booleantitle: show_deleted- description: Show deleted policies if specified.responses:"200":description: Success@@ -3037,7 +2798,6 @@ paths:description: The type of policy to create.schema:title: type- description: The type of policy to create.$ref: '#/components/schemas/bytebase.v1.PolicyType'requestBody:description: The policy to create.@@ -3152,209 +2912,208 @@ paths:type: string- name: updateMaskin: query- description: The list of fields to update.- schema:- type: string- description: |-- `FieldMask` represents a set of symbolic field paths, for example:+ description: |-+ `FieldMask` represents a set of symbolic field paths, for example:- paths: "f.a"- paths: "f.b.d"+ paths: "f.a"+ paths: "f.b.d"- Here `f` represents a field in some root message, `a` and `b`- fields in the message found in `f`, and `d` a field found in the- message in `f.b`.+ Here `f` represents a field in some root message, `a` and `b`+ fields in the message found in `f`, and `d` a field found in the+ message in `f.b`.- Field masks are used to specify a subset of fields that should be- returned by a get operation or modified by an update operation.- Field masks also have a custom JSON encoding (see below).+ Field masks are used to specify a subset of fields that should be+ returned by a get operation or modified by an update operation.+ Field masks also have a custom JSON encoding (see below).- # Field Masks in Projections+ # Field Masks in Projections- When used in the context of a projection, a response message or- sub-message is filtered by the API to only contain those fields as- specified in the mask. For example, if the mask in the previous- example is applied to a response message as follows:+ When used in the context of a projection, a response message or+ sub-message is filtered by the API to only contain those fields as+ specified in the mask. For example, if the mask in the previous+ example is applied to a response message as follows:- f {- a : 22- b {- d : 1- x : 2- }- y : 13+ f {+ a : 22+ b {+ d : 1+ x : 2}- z: 8+ y : 13+ }+ z: 8- The result will not contain specific values for fields x,y and z- (their value will be set to the default, and omitted in proto text- output):+ The result will not contain specific values for fields x,y and z+ (their value will be set to the default, and omitted in proto text+ output):- f {- a : 22- b {- d : 1- }+ f {+ a : 22+ b {+ d : 1}+ }++ A repeated field is not allowed except at the last position of a+ paths string.++ If a FieldMask object is not present in a get operation, the+ operation applies to all fields (as if a FieldMask of all fields+ had been specified).++ Note that a field mask does not necessarily apply to the+ top-level response message. In case of a REST get operation, the+ field mask applies directly to the response, but in case of a REST+ list operation, the mask instead applies to each individual message+ in the returned resource list. In case of a REST custom method,+ other definitions may be used. Where the mask applies will be+ clearly documented together with its declaration in the API. In+ any case, the effect on the returned resource/resources is required+ behavior for APIs.++ # Field Masks in Update Operations- A repeated field is not allowed except at the last position of a- paths string.-- If a FieldMask object is not present in a get operation, the- operation applies to all fields (as if a FieldMask of all fields- had been specified).-- Note that a field mask does not necessarily apply to the- top-level response message. In case of a REST get operation, the- field mask applies directly to the response, but in case of a REST- list operation, the mask instead applies to each individual message- in the returned resource list. In case of a REST custom method,- other definitions may be used. Where the mask applies will be- clearly documented together with its declaration in the API. In- any case, the effect on the returned resource/resources is required- behavior for APIs.-- # Field Masks in Update Operations-- A field mask in update operations specifies which fields of the- targeted resource are going to be updated. The API is required- to only change the values of the fields as specified in the mask- and leave the others untouched. If a resource is passed in to- describe the updated values, the API ignores the values of all- fields not covered by the mask.-- If a repeated field is specified for an update operation, new values will- be appended to the existing repeated field in the target resource. Note that- a repeated field is only allowed in the last position of a `paths` string.-- If a sub-message is specified in the last position of the field mask for an- update operation, then new value will be merged into the existing sub-message- in the target resource.-- For example, given the target message:-- f {- b {- d: 1- x: 2- }- c: [1]+ A field mask in update operations specifies which fields of the+ targeted resource are going to be updated. The API is required+ to only change the values of the fields as specified in the mask+ and leave the others untouched. If a resource is passed in to+ describe the updated values, the API ignores the values of all+ fields not covered by the mask.++ If a repeated field is specified for an update operation, new values will+ be appended to the existing repeated field in the target resource. Note that+ a repeated field is only allowed in the last position of a `paths` string.++ If a sub-message is specified in the last position of the field mask for an+ update operation, then new value will be merged into the existing sub-message+ in the target resource.++ For example, given the target message:++ f {+ b {+ d: 1+ x: 2}+ c: [1]+ }- And an update message:+ And an update message:- f {- b {- d: 10- }- c: [2]+ f {+ b {+ d: 10}+ c: [2]+ }- then if the field mask is:+ then if the field mask is:- paths: ["f.b", "f.c"]+ paths: ["f.b", "f.c"]- then the result will be:+ then the result will be:- f {- b {- d: 10- x: 2- }- c: [1, 2]+ f {+ b {+ d: 10+ x: 2}+ c: [1, 2]+ }- An implementation may provide options to override this default behavior for- repeated and message fields.+ An implementation may provide options to override this default behavior for+ repeated and message fields.- In order to reset a field's value to the default, the field must- be in the mask and set to the default value in the provided resource.- Hence, in order to reset all fields of a resource, provide a default- instance of the resource and set all fields in the mask, or do- not provide a mask as described below.+ In order to reset a field's value to the default, the field must+ be in the mask and set to the default value in the provided resource.+ Hence, in order to reset all fields of a resource, provide a default+ instance of the resource and set all fields in the mask, or do+ not provide a mask as described below.- If a field mask is not present on update, the operation applies to- all fields (as if a field mask of all fields has been specified).- Note that in the presence of schema evolution, this may mean that- fields the client does not know and has therefore not filled into- the request will be reset to their default. If this is unwanted- behavior, a specific service may require a client to always specify- a field mask, producing an error if not.+ If a field mask is not present on update, the operation applies to+ all fields (as if a field mask of all fields has been specified).+ Note that in the presence of schema evolution, this may mean that+ fields the client does not know and has therefore not filled into+ the request will be reset to their default. If this is unwanted+ behavior, a specific service may require a client to always specify+ a field mask, producing an error if not.- As with get operations, the location of the resource which- describes the updated values in the request message depends on the- operation kind. In any case, the effect of the field mask is- required to be honored by the API.+ As with get operations, the location of the resource which+ describes the updated values in the request message depends on the+ operation kind. In any case, the effect of the field mask is+ required to be honored by the API.- ## Considerations for HTTP REST+ ## Considerations for HTTP REST- The HTTP kind of an update operation which uses a field mask must- be set to PATCH instead of PUT in order to satisfy HTTP semantics- (PUT must only be used for full updates).+ The HTTP kind of an update operation which uses a field mask must+ be set to PATCH instead of PUT in order to satisfy HTTP semantics+ (PUT must only be used for full updates).- # JSON Encoding of Field Masks+ # JSON Encoding of Field Masks- In JSON, a field mask is encoded as a single string where paths are- separated by a comma. Fields name in each path are converted- to/from lower-camel naming conventions.+ In JSON, a field mask is encoded as a single string where paths are+ separated by a comma. Fields name in each path are converted+ to/from lower-camel naming conventions.- As an example, consider the following message declarations:+ As an example, consider the following message declarations:- message Profile {- User user = 1;- Photo photo = 2;- }- message User {- string display_name = 1;- string address = 2;- }+ message Profile {+ User user = 1;+ Photo photo = 2;+ }+ message User {+ string display_name = 1;+ string address = 2;+ }- In proto a field mask for `Profile` may look as such:+ In proto a field mask for `Profile` may look as such:- mask {- paths: "user.display_name"- paths: "photo"- }+ mask {+ paths: "user.display_name"+ paths: "photo"+ }- In JSON, the same mask is represented as below:+ In JSON, the same mask is represented as below:- {- mask: "user.displayName,photo"- }+ {+ mask: "user.displayName,photo"+ }- # Field Masks and Oneof Fields+ # Field Masks and Oneof Fields- Field masks treat fields in oneofs just as regular fields. Consider the- following message:+ Field masks treat fields in oneofs just as regular fields. Consider the+ following message:- message SampleMessage {- oneof test_oneof {- string name = 4;- SubMessage sub_message = 9;- }+ message SampleMessage {+ oneof test_oneof {+ string name = 4;+ SubMessage sub_message = 9;}+ }- The field mask can be:+ The field mask can be:- mask {- paths: "name"- }+ mask {+ paths: "name"+ }- Or:+ Or:- mask {- paths: "sub_message"- }+ mask {+ paths: "sub_message"+ }- Note that oneof type names ("test_oneof" in this case) cannot be used in- paths.+ Note that oneof type names ("test_oneof" in this case) cannot be used in+ paths.- ## Field Mask Verification+ ## Field Mask Verification- The implementation of any API method which has a FieldMask type field in the- request should verify the included field paths, and return an- `INVALID_ARGUMENT` error if any path is unmappable.+ The implementation of any API method which has a FieldMask type field in the+ request should verify the included field paths, and return an+ `INVALID_ARGUMENT` error if any path is unmappable.+ schema:+ type: string- name: allowMissingin: querydescription: |-@@ -3363,9 +3122,6 @@ paths:schema:type: booleantitle: allow_missing- description: |-- If set to true, and the policy is not found, a new policy will be created.- In this situation, `update_mask` is ignored.requestBody:description: |-The policy to update.@@ -3429,10 +3185,6 @@ paths:type: integertitle: page_sizeformat: int32- description: |-- The maximum number of revisions to return. The service may return fewer- than this value. If unspecified, at most 10 revisions will be returned. The- maximum value is 1000; values above 1000 will be coerced to 1000.- name: pageTokenin: querydescription: |-@@ -3444,19 +3196,12 @@ paths:schema:type: stringtitle: page_token- description: |-- A page token, received from a previous `ListRevisions` call.- Provide this to retrieve the subsequent page.-- When paginating, all other parameters provided to `ListRevisions` must- match the call that provided the page token.- name: showDeletedin: querydescription: Whether to include deleted revisions in the results.schema:type: booleantitle: show_deleted- description: Whether to include deleted revisions in the results.responses:"200":description: Success@@ -3643,14 +3388,12 @@ paths:schema:type: stringtitle: schema- description: It's empty for DATABASE.- name: objectin: querydescription: It's empty for DATABASE and SCHEMA.schema:type: stringtitle: object- description: It's empty for DATABASE and SCHEMA.- name: metadata.namein: querydescription: |-@@ -3660,10 +3403,6 @@ paths:schema:type: stringtitle: name- description: |-- The database metadata name.-- Format: instances/{instance}/databases/{database}/metadata- name: metadata.schemas.namein: querydescription: |-@@ -3672,23 +3411,18 @@ paths:schema:type: stringtitle: name- description: |-- The name is the schema name.- It is an empty string for databases without such concept such as MySQL.- name: metadata.schemas.tables.namein: querydescription: The name is the name of a table.schema:type: stringtitle: name- description: The name is the name of a table.- name: metadata.schemas.tables.columns.namein: querydescription: The name is the name of a column.schema:type: stringtitle: name- description: The name is the name of a column.- name: metadata.schemas.tables.columns.positionin: querydescription: The position is the position in columns.@@ -3696,7 +3430,6 @@ paths:type: integertitle: positionformat: int32- description: The position is the position in columns.- name: metadata.schemas.tables.columns.hasDefaultin: queryschema:@@ -3708,7 +3441,6 @@ paths:schema:type: stringtitle: default- description: The default value of column.- name: metadata.schemas.tables.columns.defaultOnNullin: querydescription: |-@@ -3717,9 +3449,6 @@ paths:schema:type: booleantitle: default_on_null- description: |-- Oracle specific metadata.- The default_on_null is the default on null of a column.- name: metadata.schemas.tables.columns.onUpdatein: querydescription: |-@@ -3729,45 +3458,36 @@ paths:schema:type: stringtitle: on_update- description: |-- The on_update is the on update action of a column.- For MySQL like databases, it's only supported for TIMESTAMP columns with- CURRENT_TIMESTAMP as on update value.- name: metadata.schemas.tables.columns.nullablein: querydescription: The nullable is the nullable of a column.schema:type: booleantitle: nullable- description: The nullable is the nullable of a column.- name: metadata.schemas.tables.columns.typein: querydescription: The type is the type of a column.schema:type: stringtitle: type- description: The type is the type of a column.- name: metadata.schemas.tables.columns.characterSetin: querydescription: The character_set is the character_set of a column.schema:type: stringtitle: character_set- description: The character_set is the character_set of a column.- name: metadata.schemas.tables.columns.collationin: querydescription: The collation is the collation of a column.schema:type: stringtitle: collation- description: The collation is the collation of a column.- name: metadata.schemas.tables.columns.commentin: querydescription: The comment is the comment of a column.schema:type: stringtitle: comment- description: The comment is the comment of a column.- name: metadata.schemas.tables.columns.generation.typein: queryschema:@@ -3788,7 +3508,6 @@ paths:description: The identity_generation is for identity columns, PG only.schema:title: identity_generation- description: The identity_generation is for identity columns, PG only.$ref: '#/components/schemas/bytebase.v1.ColumnMetadata.IdentityGeneration'- name: metadata.schemas.tables.columns.identitySeedin: query@@ -3799,7 +3518,6 @@ paths:- stringtitle: identity_seedformat: int64- description: The identity_seed is for identity columns, MSSQL only.- name: metadata.schemas.tables.columns.identityIncrementin: querydescription: The identity_increment is for identity columns, MSSQL only.@@ -3809,7 +3527,6 @@ paths:- stringtitle: identity_incrementformat: int64- description: The identity_increment is for identity columns, MSSQL only.- name: metadata.schemas.tables.columns.defaultConstraintNamein: querydescription: |-@@ -3836,34 +3553,12 @@ paths:schema:type: stringtitle: default_constraint_name- description: |-- The default_constraint_name is the name of the default constraint, MSSQL only.- In MSSQL, default values are implemented as named constraints. When modifying or- dropping a column's default value, you must reference the constraint by name.- This field stores the actual constraint name from the database.-- Example: A column definition like:- CREATE TABLE employees (- status NVARCHAR(20) DEFAULT 'active'- )-- Will create a constraint with an auto-generated name like 'DF__employees__statu__3B75D760'- or a user-defined name if specified:- ALTER TABLE employees ADD CONSTRAINT DF_employees_status DEFAULT 'active' FOR status-- To modify the default, you must first drop the existing constraint by name:- ALTER TABLE employees DROP CONSTRAINT DF__employees__statu__3B75D760- ALTER TABLE employees ADD CONSTRAINT DF_employees_status DEFAULT 'inactive' FOR status-- This field is populated when syncing from the database. When empty (e.g., when parsing- from SQL files), the system cannot automatically drop the constraint.- name: metadata.schemas.tables.indexes.namein: querydescription: The name is the name of an index.schema:type: stringtitle: name- description: The name is the name of an index.- name: metadata.schemas.tables.indexes.expressionsin: querydescription: |-@@ -3874,9 +3569,6 @@ paths:items:type: stringtitle: expressions- description: |-- The expressions are the ordered columns or expressions of an index.- This could refer to a column or an expression.- name: metadata.schemas.tables.indexes.keyLengthin: querydescription: |-@@ -3890,9 +3582,6 @@ paths:- stringformat: int64title: key_length- description: |-- The key_lengths are the ordered key lengths of an index.- If the key length is not specified, it's -1.- name: metadata.schemas.tables.indexes.descendingin: querydescription: The descending is the ordered descending of an index.@@ -3901,63 +3590,54 @@ paths:items:type: booleantitle: descending- description: The descending is the ordered descending of an index.- name: metadata.schemas.tables.indexes.typein: querydescription: The type is the type of an index.schema:type: stringtitle: type- description: The type is the type of an index.- name: metadata.schemas.tables.indexes.uniquein: querydescription: The unique is whether the index is unique.schema:type: booleantitle: unique- description: The unique is whether the index is unique.- name: metadata.schemas.tables.indexes.primaryin: querydescription: The primary is whether the index is a primary key index.schema:type: booleantitle: primary- description: The primary is whether the index is a primary key index.- name: metadata.schemas.tables.indexes.visiblein: querydescription: The visible is whether the index is visible.schema:type: booleantitle: visible- description: The visible is whether the index is visible.- name: metadata.schemas.tables.indexes.commentin: querydescription: The comment is the comment of an index.schema:type: stringtitle: comment- description: The comment is the comment of an index.- name: metadata.schemas.tables.indexes.definitionin: querydescription: The definition of an index.schema:type: stringtitle: definition- description: The definition of an index.- name: metadata.schemas.tables.indexes.parentIndexSchemain: querydescription: The schema name of the parent index.schema:type: stringtitle: parent_index_schema- description: The schema name of the parent index.- name: metadata.schemas.tables.indexes.parentIndexNamein: querydescription: The index name of the parent index.schema:type: stringtitle: parent_index_name- description: The index name of the parent index.- name: metadata.schemas.tables.indexes.granularityin: querydescription: The number of granules in the block. It's a ClickHouse specific field.@@ -3967,7 +3647,6 @@ paths:- stringtitle: granularityformat: int64- description: The number of granules in the block. It's a ClickHouse specific field.- name: metadata.schemas.tables.indexes.isConstraintin: querydescription: |-@@ -3976,23 +3655,18 @@ paths:schema:type: booleantitle: is_constraint- description: |-- It's a PostgreSQL specific field.- The unique constraint and unique index are not the same thing in PostgreSQL.- name: metadata.schemas.tables.indexes.spatialConfig.methodin: querydescription: Spatial indexing method (e.g., "SPATIAL", "R-TREE", "GIST")schema:type: stringtitle: method- description: Spatial indexing method (e.g., "SPATIAL", "R-TREE", "GIST")- name: metadata.schemas.tables.indexes.spatialConfig.tessellation.schemein: querydescription: Tessellation scheme (e.g., "GEOMETRY_GRID", "GEOGRAPHY_GRID", "GEOMETRY_AUTO_GRID")schema:type: stringtitle: scheme- description: Tessellation scheme (e.g., "GEOMETRY_GRID", "GEOGRAPHY_GRID", "GEOMETRY_AUTO_GRID")- name: metadata.schemas.tables.indexes.spatialConfig.tessellation.gridLevels.levelin: querydescription: Grid level number (1-4 for SQL Server)@@ -4000,14 +3674,12 @@ paths:type: integertitle: levelformat: int32- description: Grid level number (1-4 for SQL Server)- name: metadata.schemas.tables.indexes.spatialConfig.tessellation.gridLevels.densityin: querydescription: Grid density (LOW, MEDIUM, HIGH)schema:type: stringtitle: density- description: Grid density (LOW, MEDIUM, HIGH)- name: metadata.schemas.tables.indexes.spatialConfig.tessellation.cellsPerObjectin: querydescription: Number of cells per object (1-8192 for SQL Server)@@ -4015,7 +3687,6 @@ paths:type: integertitle: cells_per_objectformat: int32- description: Number of cells per object (1-8192 for SQL Server)- name: metadata.schemas.tables.indexes.spatialConfig.tessellation.boundingBox.xminin: querydescription: Minimum X coordinate@@ -4023,7 +3694,6 @@ paths:type: numbertitle: xminformat: double- description: Minimum X coordinate- name: metadata.schemas.tables.indexes.spatialConfig.tessellation.boundingBox.yminin: querydescription: Minimum Y coordinate@@ -4031,7 +3701,6 @@ paths:type: numbertitle: yminformat: double- description: Minimum Y coordinate- name: metadata.schemas.tables.indexes.spatialConfig.tessellation.boundingBox.xmaxin: querydescription: Maximum X coordinate@@ -4039,7 +3708,6 @@ paths:type: numbertitle: xmaxformat: double- description: Maximum X coordinate- name: metadata.schemas.tables.indexes.spatialConfig.tessellation.boundingBox.ymaxin: querydescription: Maximum Y coordinate@@ -4047,7 +3715,6 @@ paths:type: numbertitle: ymaxformat: double- description: Maximum Y coordinate- name: metadata.schemas.tables.indexes.spatialConfig.storage.fillfactorin: querydescription: Fill factor percentage (1-100)@@ -4055,21 +3722,18 @@ paths:type: integertitle: fillfactorformat: int32- description: Fill factor percentage (1-100)- name: metadata.schemas.tables.indexes.spatialConfig.storage.bufferingin: querydescription: Buffering mode for PostgreSQL (auto, on, off)schema:type: stringtitle: buffering- description: Buffering mode for PostgreSQL (auto, on, off)- name: metadata.schemas.tables.indexes.spatialConfig.storage.tablespacein: querydescription: Tablespace configuration for Oracleschema:type: stringtitle: tablespace- description: Tablespace configuration for Oracle- name: metadata.schemas.tables.indexes.spatialConfig.storage.workTablespacein: queryschema:@@ -4093,14 +3757,12 @@ paths:schema:type: booleantitle: pad_index- description: SQL Server specific parameters- name: metadata.schemas.tables.indexes.spatialConfig.storage.sortInTempdbin: querydescription: ON, OFFschema:type: stringtitle: sort_in_tempdb- description: ON, OFF- name: metadata.schemas.tables.indexes.spatialConfig.storage.dropExistingin: queryschema:@@ -4133,7 +3795,6 @@ paths:schema:type: stringtitle: data_compression- description: NONE, ROW, PAGE- name: metadata.schemas.tables.indexes.spatialConfig.dimensional.dimensionsin: querydescription: Number of dimensions (2-4, default 2)@@ -4141,14 +3802,12 @@ paths:type: integertitle: dimensionsformat: int32- description: Number of dimensions (2-4, default 2)- name: metadata.schemas.tables.indexes.spatialConfig.dimensional.dataTypein: querydescription: Spatial data type (GEOMETRY, GEOGRAPHY, POINT, POLYGON, etc.)schema:type: stringtitle: data_type- description: Spatial data type (GEOMETRY, GEOGRAPHY, POINT, POLYGON, etc.)- name: metadata.schemas.tables.indexes.spatialConfig.dimensional.sridin: querydescription: Spatial reference system identifier (SRID)@@ -4156,14 +3815,12 @@ paths:type: integertitle: sridformat: int32- description: Spatial reference system identifier (SRID)- name: metadata.schemas.tables.indexes.spatialConfig.dimensional.constraints.dimensionin: querydescription: Dimension name/type (X, Y, Z, M, etc.)schema:type: stringtitle: dimension- description: Dimension name/type (X, Y, Z, M, etc.)- name: metadata.schemas.tables.indexes.spatialConfig.dimensional.constraints.minValuein: querydescription: Minimum value for this dimension@@ -4171,7 +3828,6 @@ paths:type: numbertitle: min_valueformat: double- description: Minimum value for this dimension- name: metadata.schemas.tables.indexes.spatialConfig.dimensional.constraints.maxValuein: querydescription: Maximum value for this dimension@@ -4179,7 +3835,6 @@ paths:type: numbertitle: max_valueformat: double- description: Maximum value for this dimension- name: metadata.schemas.tables.indexes.spatialConfig.dimensional.constraints.tolerancein: querydescription: Tolerance for this dimension@@ -4187,7 +3842,6 @@ paths:type: numbertitle: toleranceformat: double- description: Tolerance for this dimension- name: metadata.schemas.tables.indexes.opclassNamesin: querydescription: |-@@ -4198,9 +3852,6 @@ paths:items:type: stringtitle: opclass_names- description: |-- https://www.postgresql.org/docs/current/catalog-pg-opclass.html- Name of the operator class for each column. (PostgreSQL specific).- name: metadata.schemas.tables.indexes.opclassDefaultsin: querydescription: True if the operator class is the default. (PostgreSQL specific).@@ -4209,28 +3860,24 @@ paths:items:type: booleantitle: opclass_defaults- description: True if the operator class is the default. (PostgreSQL specific).- name: metadata.schemas.tables.enginein: querydescription: The engine is the engine of a table.schema:type: stringtitle: engine- description: The engine is the engine of a table.- name: metadata.schemas.tables.collationin: querydescription: The collation is the collation of a table.schema:type: stringtitle: collation- description: The collation is the collation of a table.- name: metadata.schemas.tables.charsetin: querydescription: The character set of table.schema:type: stringtitle: charset- description: The character set of table.- name: metadata.schemas.tables.rowCountin: querydescription: The row_count is the estimated number of rows of a table.@@ -4240,7 +3887,6 @@ paths:- stringtitle: row_countformat: int64- description: The row_count is the estimated number of rows of a table.- name: metadata.schemas.tables.dataSizein: querydescription: The data_size is the estimated data size of a table.@@ -4250,7 +3896,6 @@ paths:- stringtitle: data_sizeformat: int64- description: The data_size is the estimated data size of a table.- name: metadata.schemas.tables.indexSizein: querydescription: The index_size is the estimated index size of a table.@@ -4260,7 +3905,6 @@ paths:- stringtitle: index_sizeformat: int64- description: The index_size is the estimated index size of a table.- name: metadata.schemas.tables.dataFreein: querydescription: The data_free is the estimated free data size of a table.@@ -4270,28 +3914,24 @@ paths:- stringtitle: data_freeformat: int64- description: The data_free is the estimated free data size of a table.- name: metadata.schemas.tables.createOptionsin: querydescription: The create_options is the create option of a table.schema:type: stringtitle: create_options- description: The create_options is the create option of a table.- name: metadata.schemas.tables.commentin: querydescription: The comment is the comment of a table.schema:type: stringtitle: comment- description: The comment is the comment of a table.- name: metadata.schemas.tables.foreignKeys.namein: querydescription: The name is the name of a foreign key.schema:type: stringtitle: name- description: The name is the name of a foreign key.- name: metadata.schemas.tables.foreignKeys.columnsin: querydescription: The columns are the ordered referencing columns of a foreign key.@@ -4300,7 +3940,6 @@ paths:items:type: stringtitle: columns- description: The columns are the ordered referencing columns of a foreign key.- name: metadata.schemas.tables.foreignKeys.referencedSchemain: querydescription: |-@@ -4309,16 +3948,12 @@ paths:schema:type: stringtitle: referenced_schema- description: |-- The referenced_schema is the referenced schema name of a foreign key.- It is an empty string for databases without such concept such as MySQL.- name: metadata.schemas.tables.foreignKeys.referencedTablein: querydescription: The referenced_table is the referenced table name of a foreign key.schema:type: stringtitle: referenced_table- description: The referenced_table is the referenced table name of a foreign key.- name: metadata.schemas.tables.foreignKeys.referencedColumnsin: querydescription: The referenced_columns are the ordered referenced columns of a foreign key.@@ -4327,21 +3962,18 @@ paths:items:type: stringtitle: referenced_columns- description: The referenced_columns are the ordered referenced columns of a foreign key.- name: metadata.schemas.tables.foreignKeys.onDeletein: querydescription: The on_delete is the on delete action of a foreign key.schema:type: stringtitle: on_delete- description: The on_delete is the on delete action of a foreign key.- name: metadata.schemas.tables.foreignKeys.onUpdatein: querydescription: The on_update is the on update action of a foreign key.schema:type: stringtitle: on_update- description: The on_update is the on update action of a foreign key.- name: metadata.schemas.tables.foreignKeys.matchTypein: querydescription: |-@@ -4351,23 +3983,17 @@ paths:schema:type: stringtitle: match_type- description: |-- The match_type is the match type of a foreign key.- The match_type is the PostgreSQL specific field.- It's empty string for other databases.- name: metadata.schemas.tables.partitions.namein: querydescription: The name is the name of a table partition.schema:type: stringtitle: name- description: The name is the name of a table partition.- name: metadata.schemas.tables.partitions.typein: querydescription: The type of a table partition.schema:title: type- description: The type of a table partition.$ref: '#/components/schemas/bytebase.v1.TablePartitionMetadata.Type'- name: metadata.schemas.tables.partitions.expressionin: query@@ -4385,17 +4011,6 @@ paths:schema:type: stringtitle: expression- description: |-- The expression is the expression of a table partition.- For PostgreSQL, the expression is the text of {FOR VALUES- partition_bound_spec}, see- https://www.postgresql.org/docs/current/sql-createtable.html. For MySQL,- the expression is the `expr` or `column_list` of the following syntax.- PARTITION BY- { [LINEAR] HASH(expr)- | [LINEAR] KEY [ALGORITHM={1 | 2}] (column_list)- | RANGE{(expr) | COLUMNS(column_list)}- | LIST{(expr) | COLUMNS(column_list)} }.- name: metadata.schemas.tables.partitions.valuein: querydescription: |-@@ -4410,15 +4025,6 @@ paths:schema:type: stringtitle: value- description: |-- The value is the value of a table partition.- For MySQL, the value is for RANGE and LIST partition types,- - For a RANGE partition, it contains the value set in the partition's- VALUES LESS THAN clause, which can be either an integer or MAXVALUE.- - For a LIST partition, this column contains the values defined in the- partition's VALUES IN clause, which is a list of comma-separated integer- values.- - For others, it's an empty string.- name: metadata.schemas.tables.partitions.useDefaultin: querydescription: |-@@ -4429,32 +4035,24 @@ paths:schema:type: stringtitle: use_default- description: |-- The use_default is whether the users use the default partition, it stores- the different value for different database engines. For MySQL, it's [INT]- type, 0 means not use default partition, otherwise, it's equals to number- in syntax [SUB]PARTITION {number}.- name: metadata.schemas.tables.partitions.subpartitions.checkConstraints.namein: querydescription: The name is the name of a check constraint.schema:type: stringtitle: name- description: The name is the name of a check constraint.- name: metadata.schemas.tables.partitions.subpartitions.checkConstraints.expressionin: querydescription: The expression is the expression of a check constraint.schema:type: stringtitle: expression- description: The expression is the expression of a check constraint.- name: metadata.schemas.tables.ownerin: querydescription: The owner of the table.schema:type: stringtitle: owner- description: The owner of the table.- name: metadata.schemas.tables.sortingKeysin: querydescription: |-@@ -4465,16 +4063,12 @@ paths:items:type: stringtitle: sorting_keys- description: |-- The sorting_keys is a tuple of column names or arbitrary expressions. ClickHouse specific field.- Reference: https://clickhouse.com/docs/en/engines/table-engines/mergetree-family/mergetree#order_by- name: metadata.schemas.tables.triggers.namein: querydescription: The name is the name of the trigger.schema:type: stringtitle: name- description: The name is the name of the trigger.- name: metadata.schemas.tables.triggers.eventin: querydescription: |-@@ -4483,72 +4077,60 @@ paths:schema:type: stringtitle: event- description: |-- The event is the event of the trigger, such as INSERT, UPDATE, DELETE,- TRUNCATE.- name: metadata.schemas.tables.triggers.timingin: querydescription: The timing is the timing of the trigger, such as BEFORE, AFTER.schema:type: stringtitle: timing- description: The timing is the timing of the trigger, such as BEFORE, AFTER.- name: metadata.schemas.tables.triggers.bodyin: querydescription: The body is the body of the trigger.schema:type: stringtitle: body- description: The body is the body of the trigger.- name: metadata.schemas.tables.triggers.sqlModein: querydescription: The SQL mode setting for the trigger.schema:type: stringtitle: sql_mode- description: The SQL mode setting for the trigger.- name: metadata.schemas.tables.triggers.characterSetClientin: querydescription: The character set used by the client creating the trigger.schema:type: stringtitle: character_set_client- description: The character set used by the client creating the trigger.- name: metadata.schemas.tables.triggers.collationConnectionin: querydescription: The collation used for the connection when creating the trigger.schema:type: stringtitle: collation_connection- description: The collation used for the connection when creating the trigger.- name: metadata.schemas.tables.triggers.commentin: querydescription: The comment describing the trigger.schema:type: stringtitle: comment- description: The comment describing the trigger.- name: metadata.schemas.tables.triggers.skipDumpin: querydescription: Whether to skip this trigger during schema dump operations.schema:type: booleantitle: skip_dump- description: Whether to skip this trigger during schema dump operations.- name: metadata.schemas.tables.skipDumpin: querydescription: Whether to skip this table during schema dump operations.schema:type: booleantitle: skip_dump- description: Whether to skip this table during schema dump operations.- name: metadata.schemas.tables.shardingInfoin: querydescription: https://docs.pingcap.com/tidb/stable/information-schema-tables/schema:type: stringtitle: sharding_info- description: https://docs.pingcap.com/tidb/stable/information-schema-tables/- name: metadata.schemas.tables.primaryKeyTypein: querydescription: |-@@ -4557,72 +4139,60 @@ paths:schema:type: stringtitle: primary_key_type- description: |-- https://docs.pingcap.com/tidb/stable/clustered-indexes/#clustered-indexes- CLUSTERED or NONCLUSTERED.- name: metadata.schemas.externalTables.namein: querydescription: The name is the name of a external table.schema:type: stringtitle: name- description: The name is the name of a external table.- name: metadata.schemas.externalTables.externalServerNamein: querydescription: The external_server_name is the name of the external server.schema:type: stringtitle: external_server_name- description: The external_server_name is the name of the external server.- name: metadata.schemas.externalTables.externalDatabaseNamein: querydescription: The external_database_name is the name of the external database.schema:type: stringtitle: external_database_name- description: The external_database_name is the name of the external database.- name: metadata.schemas.views.namein: querydescription: The name is the name of a view.schema:type: stringtitle: name- description: The name is the name of a view.- name: metadata.schemas.views.definitionin: querydescription: The definition is the definition of a view.schema:type: stringtitle: definition- description: The definition is the definition of a view.- name: metadata.schemas.views.commentin: querydescription: The comment is the comment of a view.schema:type: stringtitle: comment- description: The comment is the comment of a view.- name: metadata.schemas.views.dependencyColumns.schemain: querydescription: The schema is the schema of a reference column.schema:type: stringtitle: schema- description: The schema is the schema of a reference column.- name: metadata.schemas.views.dependencyColumns.tablein: querydescription: The table is the table of a reference column.schema:type: stringtitle: table- description: The table is the table of a reference column.- name: metadata.schemas.views.dependencyColumns.columnin: querydescription: The column is the name of a reference column.schema:type: stringtitle: column- description: The column is the name of a reference column.- name: metadata.schemas.views.skipDumpin: queryschema:@@ -4634,14 +4204,12 @@ paths:schema:type: stringtitle: name- description: The name is the name of a function.- name: metadata.schemas.functions.definitionin: querydescription: The definition is the definition of a function.schema:type: stringtitle: definition- description: The definition is the definition of a function.- name: metadata.schemas.functions.signaturein: querydescription: |-@@ -4650,16 +4218,12 @@ paths:schema:type: stringtitle: signature- description: |-- The signature is the name with the number and type of input arguments the- function takes.- name: metadata.schemas.functions.characterSetClientin: querydescription: MySQL specific metadata.schema:type: stringtitle: character_set_client- description: MySQL specific metadata.- name: metadata.schemas.functions.collationConnectionin: queryschema:@@ -4686,14 +4250,12 @@ paths:schema:type: stringtitle: schema- description: The schema is the schema of a reference table.- name: metadata.schemas.functions.dependencyTables.tablein: querydescription: The table is the name of a reference table.schema:type: stringtitle: table- description: The table is the name of a reference table.- name: metadata.schemas.functions.skipDumpin: queryschema:@@ -4705,14 +4267,12 @@ paths:schema:type: stringtitle: name- description: The name is the name of a procedure.- name: metadata.schemas.procedures.definitionin: querydescription: The definition is the definition of a procedure.schema:type: stringtitle: definition- description: The definition is the definition of a procedure.- name: metadata.schemas.procedures.signaturein: querydescription: |-@@ -4721,16 +4281,12 @@ paths:schema:type: stringtitle: signature- description: |-- The signature is the name with the number and type of input arguments the- procedure takes.- name: metadata.schemas.procedures.characterSetClientin: querydescription: MySQL specific metadata.schema:type: stringtitle: character_set_client- description: MySQL specific metadata.- name: metadata.schemas.procedures.collationConnectionin: queryschema:@@ -4752,7 +4308,6 @@ paths:schema:type: stringtitle: comment- description: The comment is the comment of a procedure.- name: metadata.schemas.procedures.skipDumpin: queryschema:@@ -4764,34 +4319,29 @@ paths:schema:type: stringtitle: name- description: The name is the name of a stream.- name: metadata.schemas.streams.tableNamein: querydescription: The table_name is the name of the table/view that the stream is created on.schema:type: stringtitle: table_name- description: The table_name is the name of the table/view that the stream is created on.- name: metadata.schemas.streams.ownerin: querydescription: The owner of the stream.schema:type: stringtitle: owner- description: The owner of the stream.- name: metadata.schemas.streams.commentin: querydescription: The comment of the stream.schema:type: stringtitle: comment- description: The comment of the stream.- name: metadata.schemas.streams.typein: querydescription: The type of the stream.schema:title: type- description: The type of the stream.$ref: '#/components/schemas/bytebase.v1.StreamMetadata.Type'- name: metadata.schemas.streams.stalein: query@@ -4799,13 +4349,11 @@ paths:schema:type: booleantitle: stale- description: Indicates whether the stream was last read before the `stale_after` time.- name: metadata.schemas.streams.modein: querydescription: The mode of the stream.schema:title: mode- description: The mode of the stream.$ref: '#/components/schemas/bytebase.v1.StreamMetadata.Mode'- name: metadata.schemas.streams.definitionin: query@@ -4813,14 +4361,12 @@ paths:schema:type: stringtitle: definition- description: The definition of the stream.- name: metadata.schemas.tasks.namein: querydescription: The name is the name of a task.schema:type: stringtitle: name- description: The name is the name of a task.- name: metadata.schemas.tasks.idin: querydescription: |-@@ -4829,37 +4375,30 @@ paths:schema:type: stringtitle: id- description: |-- The id is the snowflake-generated id of a task.- Example: 01ad32a0-1bb6-5e93-0000-000000000001- name: metadata.schemas.tasks.ownerin: querydescription: The owner of the task.schema:type: stringtitle: owner- description: The owner of the task.- name: metadata.schemas.tasks.commentin: querydescription: The comment of the task.schema:type: stringtitle: comment- description: The comment of the task.- name: metadata.schemas.tasks.warehousein: querydescription: The warehouse of the task.schema:type: stringtitle: warehouse- description: The warehouse of the task.- name: metadata.schemas.tasks.schedulein: querydescription: The schedule interval of the task.schema:type: stringtitle: schedule- description: The schedule interval of the task.- name: metadata.schemas.tasks.predecessorsin: querydescription: The predecessor tasks of the task.@@ -4868,13 +4407,11 @@ paths:items:type: stringtitle: predecessors- description: The predecessor tasks of the task.- name: metadata.schemas.tasks.statein: querydescription: The state of the task.schema:title: state- description: The state of the task.$ref: '#/components/schemas/bytebase.v1.TaskMetadata.State'- name: metadata.schemas.tasks.conditionin: query@@ -4882,35 +4419,30 @@ paths:schema:type: stringtitle: condition- description: The condition of the task.- name: metadata.schemas.tasks.definitionin: querydescription: The definition of the task.schema:type: stringtitle: definition- description: The definition of the task.- name: metadata.schemas.materializedViews.namein: querydescription: The name is the name of a materialized view.schema:type: stringtitle: name- description: The name is the name of a materialized view.- name: metadata.schemas.materializedViews.definitionin: querydescription: The definition is the definition of a materialized view.schema:type: stringtitle: definition- description: The definition is the definition of a materialized view.- name: metadata.schemas.materializedViews.commentin: querydescription: The comment is the comment of a materialized view.schema:type: stringtitle: comment- description: The comment is the comment of a materialized view.- name: metadata.schemas.materializedViews.skipDumpin: queryschema:@@ -4922,168 +4454,144 @@ paths:schema:type: stringtitle: name- description: The name is the name of a package.- name: metadata.schemas.packages.definitionin: querydescription: The definition is the definition of a package.schema:type: stringtitle: definition- description: The definition is the definition of a package.- name: metadata.schemas.ownerin: querydescription: The owner of the schema.schema:type: stringtitle: owner- description: The owner of the schema.- name: metadata.schemas.sequences.namein: querydescription: The name of a sequence.schema:type: stringtitle: name- description: The name of a sequence.- name: metadata.schemas.sequences.dataTypein: querydescription: The data type of a sequence.schema:type: stringtitle: data_type- description: The data type of a sequence.- name: metadata.schemas.sequences.startin: querydescription: The start value of a sequence.schema:type: stringtitle: start- description: The start value of a sequence.- name: metadata.schemas.sequences.minValuein: querydescription: The minimum value of a sequence.schema:type: stringtitle: min_value- description: The minimum value of a sequence.- name: metadata.schemas.sequences.maxValuein: querydescription: The maximum value of a sequence.schema:type: stringtitle: max_value- description: The maximum value of a sequence.- name: metadata.schemas.sequences.incrementin: querydescription: Increment value of a sequence.schema:type: stringtitle: increment- description: Increment value of a sequence.- name: metadata.schemas.sequences.cyclein: querydescription: Cycle is whether the sequence cycles.schema:type: booleantitle: cycle- description: Cycle is whether the sequence cycles.- name: metadata.schemas.sequences.cacheSizein: querydescription: Cache size of a sequence.schema:type: stringtitle: cache_size- description: Cache size of a sequence.- name: metadata.schemas.sequences.lastValuein: querydescription: Last value of a sequence.schema:type: stringtitle: last_value- description: Last value of a sequence.- name: metadata.schemas.sequences.ownerTablein: querydescription: The owner table of the sequence.schema:type: stringtitle: owner_table- description: The owner table of the sequence.- name: metadata.schemas.sequences.ownerColumnin: querydescription: The owner column of the sequence.schema:type: stringtitle: owner_column- description: The owner column of the sequence.- name: metadata.schemas.sequences.commentin: querydescription: The comment describing the sequence.schema:type: stringtitle: comment- description: The comment describing the sequence.- name: metadata.schemas.sequences.skipDumpin: querydescription: Whether to skip this sequence during schema dump operations.schema:type: booleantitle: skip_dump- description: Whether to skip this sequence during schema dump operations.- name: metadata.schemas.events.namein: querydescription: The name of the event.schema:type: stringtitle: name- description: The name of the event.- name: metadata.schemas.events.definitionin: querydescription: The schedule of the event.schema:type: stringtitle: definition- description: The schedule of the event.- name: metadata.schemas.events.timeZonein: querydescription: The time zone of the event.schema:type: stringtitle: time_zone- description: The time zone of the event.- name: metadata.schemas.events.sqlModein: querydescription: The SQL mode setting for the event.schema:type: stringtitle: sql_mode- description: The SQL mode setting for the event.- name: metadata.schemas.events.characterSetClientin: querydescription: The character set used by the client creating the event.schema:type: stringtitle: character_set_client- description: The character set used by the client creating the event.- name: metadata.schemas.events.collationConnectionin: querydescription: The collation used for the connection when creating the event.schema:type: stringtitle: collation_connection- description: The collation used for the connection when creating the event.- name: metadata.schemas.events.commentin: querydescription: The comment is the comment of an event.schema:type: stringtitle: comment- description: The comment is the comment of an event.- name: metadata.schemas.enumTypes.namein: querydescription: The name of a type.schema:type: stringtitle: name- description: The name of a type.- name: metadata.schemas.enumTypes.valuesin: querydescription: The enum values of a type.@@ -5092,56 +4600,48 @@ paths:items:type: stringtitle: values- description: The enum values of a type.- name: metadata.schemas.enumTypes.commentin: querydescription: The comment describing the enum type.schema:type: stringtitle: comment- description: The comment describing the enum type.- name: metadata.schemas.enumTypes.skipDumpin: querydescription: Whether to skip this enum type during schema dump operations.schema:type: booleantitle: skip_dump- description: Whether to skip this enum type during schema dump operations.- name: metadata.schemas.skipDumpin: querydescription: Whether to skip this schema during schema dump operations.schema:type: booleantitle: skip_dump- description: Whether to skip this schema during schema dump operations.- name: metadata.schemas.commentin: querydescription: The comment is the comment of a schema.schema:type: stringtitle: comment- description: The comment is the comment of a schema.- name: metadata.characterSetin: querydescription: The character_set is the character set of a database.schema:type: stringtitle: character_set- description: The character_set is the character set of a database.- name: metadata.collationin: querydescription: The collation is the collation of a database.schema:type: stringtitle: collation- description: The collation is the collation of a database.- name: metadata.extensions.namein: querydescription: The name is the name of an extension.schema:type: stringtitle: name- description: The name is the name of an extension.- name: metadata.extensions.schemain: querydescription: |-@@ -5150,37 +4650,30 @@ paths:schema:type: stringtitle: schema- description: |-- The schema is the extension that is installed to. But the extension usage- is not limited to the schema.- name: metadata.extensions.versionin: querydescription: The version is the version of an extension.schema:type: stringtitle: version- description: The version is the version of an extension.- name: metadata.extensions.descriptionin: querydescription: The description is the description of an extension.schema:type: stringtitle: description- description: The description is the description of an extension.- name: metadata.ownerin: querydescription: The owner of the database.schema:type: stringtitle: owner- description: The owner of the database.- name: metadata.searchPathin: querydescription: The search_path is the search path of a PostgreSQL database.schema:type: stringtitle: search_path- description: The search_path is the search path of a PostgreSQL database.responses:"200":description: Success@@ -5215,7 +4708,6 @@ paths:description: The format of the SDL schema output.schema:title: format- description: The format of the SDL schema output.$ref: '#/components/schemas/bytebase.v1.GetDatabaseSDLSchemaRequest.SDLFormat'responses:"200":@@ -5496,7 +4988,6 @@ paths:items:type: stringtitle: names- description: The list of database names to retrieve.responses:"200":description: Success@@ -5610,14 +5101,12 @@ paths:- $ref: '#/components/schemas/bytebase.v1.PolicyType'- type: "null"title: policy_type- description: Filter by specific policy type.- name: showDeletedin: querydescription: Show deleted policies if specified.schema:type: booleantitle: show_deleted- description: Show deleted policies if specified.responses:"200":description: Success@@ -5645,7 +5134,6 @@ paths:description: The type of policy to create.schema:title: type- description: The type of policy to create.$ref: '#/components/schemas/bytebase.v1.PolicyType'requestBody:description: The policy to create.@@ -5742,209 +5230,208 @@ paths:type: string- name: updateMaskin: query- description: The list of fields to update.- schema:- type: string- description: |-- `FieldMask` represents a set of symbolic field paths, for example:+ description: |-+ `FieldMask` represents a set of symbolic field paths, for example:- paths: "f.a"- paths: "f.b.d"+ paths: "f.a"+ paths: "f.b.d"- Here `f` represents a field in some root message, `a` and `b`- fields in the message found in `f`, and `d` a field found in the- message in `f.b`.+ Here `f` represents a field in some root message, `a` and `b`+ fields in the message found in `f`, and `d` a field found in the+ message in `f.b`.- Field masks are used to specify a subset of fields that should be- returned by a get operation or modified by an update operation.- Field masks also have a custom JSON encoding (see below).+ Field masks are used to specify a subset of fields that should be+ returned by a get operation or modified by an update operation.+ Field masks also have a custom JSON encoding (see below).- # Field Masks in Projections+ # Field Masks in Projections- When used in the context of a projection, a response message or- sub-message is filtered by the API to only contain those fields as- specified in the mask. For example, if the mask in the previous- example is applied to a response message as follows:+ When used in the context of a projection, a response message or+ sub-message is filtered by the API to only contain those fields as+ specified in the mask. For example, if the mask in the previous+ example is applied to a response message as follows:- f {- a : 22- b {- d : 1- x : 2- }- y : 13+ f {+ a : 22+ b {+ d : 1+ x : 2}- z: 8+ y : 13+ }+ z: 8- The result will not contain specific values for fields x,y and z- (their value will be set to the default, and omitted in proto text- output):+ The result will not contain specific values for fields x,y and z+ (their value will be set to the default, and omitted in proto text+ output):- f {- a : 22- b {- d : 1- }+ f {+ a : 22+ b {+ d : 1}+ }++ A repeated field is not allowed except at the last position of a+ paths string.++ If a FieldMask object is not present in a get operation, the+ operation applies to all fields (as if a FieldMask of all fields+ had been specified).++ Note that a field mask does not necessarily apply to the+ top-level response message. In case of a REST get operation, the+ field mask applies directly to the response, but in case of a REST+ list operation, the mask instead applies to each individual message+ in the returned resource list. In case of a REST custom method,+ other definitions may be used. Where the mask applies will be+ clearly documented together with its declaration in the API. In+ any case, the effect on the returned resource/resources is required+ behavior for APIs.- A repeated field is not allowed except at the last position of a- paths string.-- If a FieldMask object is not present in a get operation, the- operation applies to all fields (as if a FieldMask of all fields- had been specified).-- Note that a field mask does not necessarily apply to the- top-level response message. In case of a REST get operation, the- field mask applies directly to the response, but in case of a REST- list operation, the mask instead applies to each individual message- in the returned resource list. In case of a REST custom method,- other definitions may be used. Where the mask applies will be- clearly documented together with its declaration in the API. In- any case, the effect on the returned resource/resources is required- behavior for APIs.-- # Field Masks in Update Operations-- A field mask in update operations specifies which fields of the- targeted resource are going to be updated. The API is required- to only change the values of the fields as specified in the mask- and leave the others untouched. If a resource is passed in to- describe the updated values, the API ignores the values of all- fields not covered by the mask.-- If a repeated field is specified for an update operation, new values will- be appended to the existing repeated field in the target resource. Note that- a repeated field is only allowed in the last position of a `paths` string.-- If a sub-message is specified in the last position of the field mask for an- update operation, then new value will be merged into the existing sub-message- in the target resource.-- For example, given the target message:-- f {- b {- d: 1- x: 2- }- c: [1]+ # Field Masks in Update Operations++ A field mask in update operations specifies which fields of the+ targeted resource are going to be updated. The API is required+ to only change the values of the fields as specified in the mask+ and leave the others untouched. If a resource is passed in to+ describe the updated values, the API ignores the values of all+ fields not covered by the mask.++ If a repeated field is specified for an update operation, new values will+ be appended to the existing repeated field in the target resource. Note that+ a repeated field is only allowed in the last position of a `paths` string.++ If a sub-message is specified in the last position of the field mask for an+ update operation, then new value will be merged into the existing sub-message+ in the target resource.++ For example, given the target message:++ f {+ b {+ d: 1+ x: 2}+ c: [1]+ }- And an update message:+ And an update message:- f {- b {- d: 10- }- c: [2]+ f {+ b {+ d: 10}+ c: [2]+ }- then if the field mask is:+ then if the field mask is:- paths: ["f.b", "f.c"]+ paths: ["f.b", "f.c"]- then the result will be:+ then the result will be:- f {- b {- d: 10- x: 2- }- c: [1, 2]+ f {+ b {+ d: 10+ x: 2}+ c: [1, 2]+ }- An implementation may provide options to override this default behavior for- repeated and message fields.+ An implementation may provide options to override this default behavior for+ repeated and message fields.- In order to reset a field's value to the default, the field must- be in the mask and set to the default value in the provided resource.- Hence, in order to reset all fields of a resource, provide a default- instance of the resource and set all fields in the mask, or do- not provide a mask as described below.+ In order to reset a field's value to the default, the field must+ be in the mask and set to the default value in the provided resource.+ Hence, in order to reset all fields of a resource, provide a default+ instance of the resource and set all fields in the mask, or do+ not provide a mask as described below.- If a field mask is not present on update, the operation applies to- all fields (as if a field mask of all fields has been specified).- Note that in the presence of schema evolution, this may mean that- fields the client does not know and has therefore not filled into- the request will be reset to their default. If this is unwanted- behavior, a specific service may require a client to always specify- a field mask, producing an error if not.+ If a field mask is not present on update, the operation applies to+ all fields (as if a field mask of all fields has been specified).+ Note that in the presence of schema evolution, this may mean that+ fields the client does not know and has therefore not filled into+ the request will be reset to their default. If this is unwanted+ behavior, a specific service may require a client to always specify+ a field mask, producing an error if not.- As with get operations, the location of the resource which- describes the updated values in the request message depends on the- operation kind. In any case, the effect of the field mask is- required to be honored by the API.+ As with get operations, the location of the resource which+ describes the updated values in the request message depends on the+ operation kind. In any case, the effect of the field mask is+ required to be honored by the API.- ## Considerations for HTTP REST+ ## Considerations for HTTP REST- The HTTP kind of an update operation which uses a field mask must- be set to PATCH instead of PUT in order to satisfy HTTP semantics- (PUT must only be used for full updates).+ The HTTP kind of an update operation which uses a field mask must+ be set to PATCH instead of PUT in order to satisfy HTTP semantics+ (PUT must only be used for full updates).- # JSON Encoding of Field Masks+ # JSON Encoding of Field Masks- In JSON, a field mask is encoded as a single string where paths are- separated by a comma. Fields name in each path are converted- to/from lower-camel naming conventions.+ In JSON, a field mask is encoded as a single string where paths are+ separated by a comma. Fields name in each path are converted+ to/from lower-camel naming conventions.- As an example, consider the following message declarations:+ As an example, consider the following message declarations:- message Profile {- User user = 1;- Photo photo = 2;- }- message User {- string display_name = 1;- string address = 2;- }+ message Profile {+ User user = 1;+ Photo photo = 2;+ }+ message User {+ string display_name = 1;+ string address = 2;+ }- In proto a field mask for `Profile` may look as such:+ In proto a field mask for `Profile` may look as such:- mask {- paths: "user.display_name"- paths: "photo"- }+ mask {+ paths: "user.display_name"+ paths: "photo"+ }- In JSON, the same mask is represented as below:+ In JSON, the same mask is represented as below:- {- mask: "user.displayName,photo"- }+ {+ mask: "user.displayName,photo"+ }- # Field Masks and Oneof Fields+ # Field Masks and Oneof Fields- Field masks treat fields in oneofs just as regular fields. Consider the- following message:+ Field masks treat fields in oneofs just as regular fields. Consider the+ following message:- message SampleMessage {- oneof test_oneof {- string name = 4;- SubMessage sub_message = 9;- }+ message SampleMessage {+ oneof test_oneof {+ string name = 4;+ SubMessage sub_message = 9;}+ }- The field mask can be:+ The field mask can be:- mask {- paths: "name"- }+ mask {+ paths: "name"+ }- Or:+ Or:- mask {- paths: "sub_message"- }+ mask {+ paths: "sub_message"+ }- Note that oneof type names ("test_oneof" in this case) cannot be used in- paths.+ Note that oneof type names ("test_oneof" in this case) cannot be used in+ paths.- ## Field Mask Verification+ ## Field Mask Verification- The implementation of any API method which has a FieldMask type field in the- request should verify the included field paths, and return an- `INVALID_ARGUMENT` error if any path is unmappable.+ The implementation of any API method which has a FieldMask type field in the+ request should verify the included field paths, and return an+ `INVALID_ARGUMENT` error if any path is unmappable.+ schema:+ type: string- name: allowMissingin: querydescription: |-@@ -5953,9 +5440,6 @@ paths:schema:type: booleantitle: allow_missing- description: |-- If set to true, and the policy is not found, a new policy will be created.- In this situation, `update_mask` is ignored.requestBody:description: |-The policy to update.@@ -6015,12 +5499,6 @@ paths:type: integertitle: page_sizeformat: int32- description: |-- Not used.- The maximum number of roles to return. The service may return fewer than- this value.- If unspecified, at most 10 roles will be returned.- The maximum value is 1000; values above 1000 will be coerced to 1000.- name: pageTokenin: querydescription: |-@@ -6033,20 +5511,12 @@ paths:schema:type: stringtitle: page_token- description: |-- Not used.- A page token, received from a previous `ListInstanceRoles` call.- Provide this to retrieve the subsequent page.-- When paginating, all other parameters provided to `ListInstanceRoles` must match- the call that provided the page token.- name: refreshin: querydescription: Refresh will refresh and return the latest data.schema:type: booleantitle: refresh- description: Refresh will refresh and return the latest data.responses:"200":description: Success@@ -6257,216 +5727,214 @@ paths:type: string- name: updateMaskin: query- description: The list of fields to update.- schema:- type: string- description: |-- `FieldMask` represents a set of symbolic field paths, for example:+ description: |-+ `FieldMask` represents a set of symbolic field paths, for example:- paths: "f.a"- paths: "f.b.d"+ paths: "f.a"+ paths: "f.b.d"- Here `f` represents a field in some root message, `a` and `b`- fields in the message found in `f`, and `d` a field found in the- message in `f.b`.+ Here `f` represents a field in some root message, `a` and `b`+ fields in the message found in `f`, and `d` a field found in the+ message in `f.b`.- Field masks are used to specify a subset of fields that should be- returned by a get operation or modified by an update operation.- Field masks also have a custom JSON encoding (see below).+ Field masks are used to specify a subset of fields that should be+ returned by a get operation or modified by an update operation.+ Field masks also have a custom JSON encoding (see below).- # Field Masks in Projections+ # Field Masks in Projections- When used in the context of a projection, a response message or- sub-message is filtered by the API to only contain those fields as- specified in the mask. For example, if the mask in the previous- example is applied to a response message as follows:+ When used in the context of a projection, a response message or+ sub-message is filtered by the API to only contain those fields as+ specified in the mask. For example, if the mask in the previous+ example is applied to a response message as follows:- f {- a : 22- b {- d : 1- x : 2- }- y : 13+ f {+ a : 22+ b {+ d : 1+ x : 2}- z: 8+ y : 13+ }+ z: 8- The result will not contain specific values for fields x,y and z- (their value will be set to the default, and omitted in proto text- output):+ The result will not contain specific values for fields x,y and z+ (their value will be set to the default, and omitted in proto text+ output):- f {- a : 22- b {- d : 1- }+ f {+ a : 22+ b {+ d : 1}+ }++ A repeated field is not allowed except at the last position of a+ paths string.++ If a FieldMask object is not present in a get operation, the+ operation applies to all fields (as if a FieldMask of all fields+ had been specified).- A repeated field is not allowed except at the last position of a- paths string.-- If a FieldMask object is not present in a get operation, the- operation applies to all fields (as if a FieldMask of all fields- had been specified).-- Note that a field mask does not necessarily apply to the- top-level response message. In case of a REST get operation, the- field mask applies directly to the response, but in case of a REST- list operation, the mask instead applies to each individual message- in the returned resource list. In case of a REST custom method,- other definitions may be used. Where the mask applies will be- clearly documented together with its declaration in the API. In- any case, the effect on the returned resource/resources is required- behavior for APIs.-- # Field Masks in Update Operations-- A field mask in update operations specifies which fields of the- targeted resource are going to be updated. The API is required- to only change the values of the fields as specified in the mask- and leave the others untouched. If a resource is passed in to- describe the updated values, the API ignores the values of all- fields not covered by the mask.-- If a repeated field is specified for an update operation, new values will- be appended to the existing repeated field in the target resource. Note that- a repeated field is only allowed in the last position of a `paths` string.-- If a sub-message is specified in the last position of the field mask for an- update operation, then new value will be merged into the existing sub-message- in the target resource.-- For example, given the target message:-- f {- b {- d: 1- x: 2- }- c: [1]+ Note that a field mask does not necessarily apply to the+ top-level response message. In case of a REST get operation, the+ field mask applies directly to the response, but in case of a REST+ list operation, the mask instead applies to each individual message+ in the returned resource list. In case of a REST custom method,+ other definitions may be used. Where the mask applies will be+ clearly documented together with its declaration in the API. In+ any case, the effect on the returned resource/resources is required+ behavior for APIs.++ # Field Masks in Update Operations++ A field mask in update operations specifies which fields of the+ targeted resource are going to be updated. The API is required+ to only change the values of the fields as specified in the mask+ and leave the others untouched. If a resource is passed in to+ describe the updated values, the API ignores the values of all+ fields not covered by the mask.++ If a repeated field is specified for an update operation, new values will+ be appended to the existing repeated field in the target resource. Note that+ a repeated field is only allowed in the last position of a `paths` string.++ If a sub-message is specified in the last position of the field mask for an+ update operation, then new value will be merged into the existing sub-message+ in the target resource.++ For example, given the target message:++ f {+ b {+ d: 1+ x: 2}+ c: [1]+ }- And an update message:+ And an update message:- f {- b {- d: 10- }- c: [2]+ f {+ b {+ d: 10}+ c: [2]+ }- then if the field mask is:+ then if the field mask is:- paths: ["f.b", "f.c"]+ paths: ["f.b", "f.c"]- then the result will be:+ then the result will be:- f {- b {- d: 10- x: 2- }- c: [1, 2]+ f {+ b {+ d: 10+ x: 2}+ c: [1, 2]+ }- An implementation may provide options to override this default behavior for- repeated and message fields.+ An implementation may provide options to override this default behavior for+ repeated and message fields.- In order to reset a field's value to the default, the field must- be in the mask and set to the default value in the provided resource.- Hence, in order to reset all fields of a resource, provide a default- instance of the resource and set all fields in the mask, or do- not provide a mask as described below.+ In order to reset a field's value to the default, the field must+ be in the mask and set to the default value in the provided resource.+ Hence, in order to reset all fields of a resource, provide a default+ instance of the resource and set all fields in the mask, or do+ not provide a mask as described below.- If a field mask is not present on update, the operation applies to- all fields (as if a field mask of all fields has been specified).- Note that in the presence of schema evolution, this may mean that- fields the client does not know and has therefore not filled into- the request will be reset to their default. If this is unwanted- behavior, a specific service may require a client to always specify- a field mask, producing an error if not.+ If a field mask is not present on update, the operation applies to+ all fields (as if a field mask of all fields has been specified).+ Note that in the presence of schema evolution, this may mean that+ fields the client does not know and has therefore not filled into+ the request will be reset to their default. If this is unwanted+ behavior, a specific service may require a client to always specify+ a field mask, producing an error if not.- As with get operations, the location of the resource which- describes the updated values in the request message depends on the- operation kind. In any case, the effect of the field mask is- required to be honored by the API.+ As with get operations, the location of the resource which+ describes the updated values in the request message depends on the+ operation kind. In any case, the effect of the field mask is+ required to be honored by the API.- ## Considerations for HTTP REST+ ## Considerations for HTTP REST- The HTTP kind of an update operation which uses a field mask must- be set to PATCH instead of PUT in order to satisfy HTTP semantics- (PUT must only be used for full updates).+ The HTTP kind of an update operation which uses a field mask must+ be set to PATCH instead of PUT in order to satisfy HTTP semantics+ (PUT must only be used for full updates).- # JSON Encoding of Field Masks+ # JSON Encoding of Field Masks- In JSON, a field mask is encoded as a single string where paths are- separated by a comma. Fields name in each path are converted- to/from lower-camel naming conventions.+ In JSON, a field mask is encoded as a single string where paths are+ separated by a comma. Fields name in each path are converted+ to/from lower-camel naming conventions.- As an example, consider the following message declarations:+ As an example, consider the following message declarations:- message Profile {- User user = 1;- Photo photo = 2;- }- message User {- string display_name = 1;- string address = 2;- }+ message Profile {+ User user = 1;+ Photo photo = 2;+ }+ message User {+ string display_name = 1;+ string address = 2;+ }- In proto a field mask for `Profile` may look as such:+ In proto a field mask for `Profile` may look as such:- mask {- paths: "user.display_name"- paths: "photo"- }+ mask {+ paths: "user.display_name"+ paths: "photo"+ }- In JSON, the same mask is represented as below:+ In JSON, the same mask is represented as below:- {- mask: "user.displayName,photo"- }+ {+ mask: "user.displayName,photo"+ }- # Field Masks and Oneof Fields+ # Field Masks and Oneof Fields- Field masks treat fields in oneofs just as regular fields. Consider the- following message:+ Field masks treat fields in oneofs just as regular fields. Consider the+ following message:- message SampleMessage {- oneof test_oneof {- string name = 4;- SubMessage sub_message = 9;- }+ message SampleMessage {+ oneof test_oneof {+ string name = 4;+ SubMessage sub_message = 9;}+ }- The field mask can be:+ The field mask can be:- mask {- paths: "name"- }+ mask {+ paths: "name"+ }- Or:+ Or:- mask {- paths: "sub_message"- }+ mask {+ paths: "sub_message"+ }- Note that oneof type names ("test_oneof" in this case) cannot be used in- paths.+ Note that oneof type names ("test_oneof" in this case) cannot be used in+ paths.- ## Field Mask Verification+ ## Field Mask Verification- The implementation of any API method which has a FieldMask type field in the- request should verify the included field paths, and return an- `INVALID_ARGUMENT` error if any path is unmappable.+ The implementation of any API method which has a FieldMask type field in the+ request should verify the included field paths, and return an+ `INVALID_ARGUMENT` error if any path is unmappable.+ schema:+ type: string- name: validateOnlyin: querydescription: Validate only also tests the data source connection.schema:type: booleantitle: validate_only- description: Validate only also tests the data source connection.- name: allowMissingin: querydescription: |-@@ -6475,9 +5943,6 @@ paths:schema:type: booleantitle: allow_missing- description: |-- If set to true, and the data source is not found, a new data source will be created.- In this situation, `update_mask` is ignored.requestBody:description: Identified by data source ID.content:@@ -6558,11 +6023,6 @@ paths:type: integertitle: page_sizeformat: int32- description: |-- 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.- name: pageTokenin: querydescription: |-@@ -6574,19 +6034,12 @@ paths:schema:type: stringtitle: page_token- description: |-- 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.- name: showDeletedin: querydescription: Show deleted projects if specified.schema:type: booleantitle: show_deleted- description: Show deleted projects if specified.- name: filterin: querydescription: |-@@ -6596,10 +6049,6 @@ paths:schema:type: stringtitle: filter- description: |-- Filter the project.- Check filter for SearchProjectsRequest for details.- Supports filtering by name, resource_id, state, and labels (e.g., labels.environment == "production").- name: orderByin: querydescription: |-@@ -6612,13 +6061,6 @@ paths:schema:type: stringtitle: order_by- description: |-- The order by of projects.- Support title. The default sorting order is ascending.- For example:- - order_by = "title"- - order_by = "title desc"- - order_by = "title asc"responses:"200":description: Success@@ -6646,12 +6088,6 @@ paths:schema:type: stringtitle: project_id- description: |-- The ID to use for the project, which will become the final component of- the project's resource name.-- This value should be 4-63 characters, and valid characters- are /[a-z][0-9]-/.requestBody:description: The project to create.content:@@ -6718,13 +6154,6 @@ paths:schema:type: booleantitle: purge- description: |-- 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.- When purge=true, all databases will be moved to the default project before deletion.- When purge=false (soft delete/archive), the project and its databases/issues remain unchanged.responses:"200":description: Success@@ -6749,209 +6178,208 @@ paths:type: string- name: updateMaskin: query- description: The list of fields to update.- schema:- type: string- description: |-- `FieldMask` represents a set of symbolic field paths, for example:+ description: |-+ `FieldMask` represents a set of symbolic field paths, for example:- paths: "f.a"- paths: "f.b.d"+ paths: "f.a"+ paths: "f.b.d"- Here `f` represents a field in some root message, `a` and `b`- fields in the message found in `f`, and `d` a field found in the- message in `f.b`.+ Here `f` represents a field in some root message, `a` and `b`+ fields in the message found in `f`, and `d` a field found in the+ message in `f.b`.- Field masks are used to specify a subset of fields that should be- returned by a get operation or modified by an update operation.- Field masks also have a custom JSON encoding (see below).+ Field masks are used to specify a subset of fields that should be+ returned by a get operation or modified by an update operation.+ Field masks also have a custom JSON encoding (see below).- # Field Masks in Projections+ # Field Masks in Projections- When used in the context of a projection, a response message or- sub-message is filtered by the API to only contain those fields as- specified in the mask. For example, if the mask in the previous- example is applied to a response message as follows:+ When used in the context of a projection, a response message or+ sub-message is filtered by the API to only contain those fields as+ specified in the mask. For example, if the mask in the previous+ example is applied to a response message as follows:- f {- a : 22- b {- d : 1- x : 2- }- y : 13+ f {+ a : 22+ b {+ d : 1+ x : 2}- z: 8+ y : 13+ }+ z: 8- The result will not contain specific values for fields x,y and z- (their value will be set to the default, and omitted in proto text- output):+ The result will not contain specific values for fields x,y and z+ (their value will be set to the default, and omitted in proto text+ output):- f {- a : 22- b {- d : 1- }+ f {+ a : 22+ b {+ d : 1}+ }++ A repeated field is not allowed except at the last position of a+ paths string.- A repeated field is not allowed except at the last position of a- paths string.-- If a FieldMask object is not present in a get operation, the- operation applies to all fields (as if a FieldMask of all fields- had been specified).-- Note that a field mask does not necessarily apply to the- top-level response message. In case of a REST get operation, the- field mask applies directly to the response, but in case of a REST- list operation, the mask instead applies to each individual message- in the returned resource list. In case of a REST custom method,- other definitions may be used. Where the mask applies will be- clearly documented together with its declaration in the API. In- any case, the effect on the returned resource/resources is required- behavior for APIs.-- # Field Masks in Update Operations-- A field mask in update operations specifies which fields of the- targeted resource are going to be updated. The API is required- to only change the values of the fields as specified in the mask- and leave the others untouched. If a resource is passed in to- describe the updated values, the API ignores the values of all- fields not covered by the mask.-- If a repeated field is specified for an update operation, new values will- be appended to the existing repeated field in the target resource. Note that- a repeated field is only allowed in the last position of a `paths` string.-- If a sub-message is specified in the last position of the field mask for an- update operation, then new value will be merged into the existing sub-message- in the target resource.-- For example, given the target message:-- f {- b {- d: 1- x: 2- }- c: [1]+ If a FieldMask object is not present in a get operation, the+ operation applies to all fields (as if a FieldMask of all fields+ had been specified).++ Note that a field mask does not necessarily apply to the+ top-level response message. In case of a REST get operation, the+ field mask applies directly to the response, but in case of a REST+ list operation, the mask instead applies to each individual message+ in the returned resource list. In case of a REST custom method,+ other definitions may be used. Where the mask applies will be+ clearly documented together with its declaration in the API. In+ any case, the effect on the returned resource/resources is required+ behavior for APIs.++ # Field Masks in Update Operations++ A field mask in update operations specifies which fields of the+ targeted resource are going to be updated. The API is required+ to only change the values of the fields as specified in the mask+ and leave the others untouched. If a resource is passed in to+ describe the updated values, the API ignores the values of all+ fields not covered by the mask.++ If a repeated field is specified for an update operation, new values will+ be appended to the existing repeated field in the target resource. Note that+ a repeated field is only allowed in the last position of a `paths` string.++ If a sub-message is specified in the last position of the field mask for an+ update operation, then new value will be merged into the existing sub-message+ in the target resource.++ For example, given the target message:++ f {+ b {+ d: 1+ x: 2}+ c: [1]+ }- And an update message:+ And an update message:- f {- b {- d: 10- }- c: [2]+ f {+ b {+ d: 10}+ c: [2]+ }- then if the field mask is:+ then if the field mask is:- paths: ["f.b", "f.c"]+ paths: ["f.b", "f.c"]- then the result will be:+ then the result will be:- f {- b {- d: 10- x: 2- }- c: [1, 2]+ f {+ b {+ d: 10+ x: 2}+ c: [1, 2]+ }- An implementation may provide options to override this default behavior for- repeated and message fields.+ An implementation may provide options to override this default behavior for+ repeated and message fields.- In order to reset a field's value to the default, the field must- be in the mask and set to the default value in the provided resource.- Hence, in order to reset all fields of a resource, provide a default- instance of the resource and set all fields in the mask, or do- not provide a mask as described below.+ In order to reset a field's value to the default, the field must+ be in the mask and set to the default value in the provided resource.+ Hence, in order to reset all fields of a resource, provide a default+ instance of the resource and set all fields in the mask, or do+ not provide a mask as described below.- If a field mask is not present on update, the operation applies to- all fields (as if a field mask of all fields has been specified).- Note that in the presence of schema evolution, this may mean that- fields the client does not know and has therefore not filled into- the request will be reset to their default. If this is unwanted- behavior, a specific service may require a client to always specify- a field mask, producing an error if not.+ If a field mask is not present on update, the operation applies to+ all fields (as if a field mask of all fields has been specified).+ Note that in the presence of schema evolution, this may mean that+ fields the client does not know and has therefore not filled into+ the request will be reset to their default. If this is unwanted+ behavior, a specific service may require a client to always specify+ a field mask, producing an error if not.- As with get operations, the location of the resource which- describes the updated values in the request message depends on the- operation kind. In any case, the effect of the field mask is- required to be honored by the API.+ As with get operations, the location of the resource which+ describes the updated values in the request message depends on the+ operation kind. In any case, the effect of the field mask is+ required to be honored by the API.- ## Considerations for HTTP REST+ ## Considerations for HTTP REST- The HTTP kind of an update operation which uses a field mask must- be set to PATCH instead of PUT in order to satisfy HTTP semantics- (PUT must only be used for full updates).+ The HTTP kind of an update operation which uses a field mask must+ be set to PATCH instead of PUT in order to satisfy HTTP semantics+ (PUT must only be used for full updates).- # JSON Encoding of Field Masks+ # JSON Encoding of Field Masks- In JSON, a field mask is encoded as a single string where paths are- separated by a comma. Fields name in each path are converted- to/from lower-camel naming conventions.+ In JSON, a field mask is encoded as a single string where paths are+ separated by a comma. Fields name in each path are converted+ to/from lower-camel naming conventions.- As an example, consider the following message declarations:+ As an example, consider the following message declarations:- message Profile {- User user = 1;- Photo photo = 2;- }- message User {- string display_name = 1;- string address = 2;- }+ message Profile {+ User user = 1;+ Photo photo = 2;+ }+ message User {+ string display_name = 1;+ string address = 2;+ }- In proto a field mask for `Profile` may look as such:+ In proto a field mask for `Profile` may look as such:- mask {- paths: "user.display_name"- paths: "photo"- }+ mask {+ paths: "user.display_name"+ paths: "photo"+ }- In JSON, the same mask is represented as below:+ In JSON, the same mask is represented as below:- {- mask: "user.displayName,photo"- }+ {+ mask: "user.displayName,photo"+ }- # Field Masks and Oneof Fields+ # Field Masks and Oneof Fields- Field masks treat fields in oneofs just as regular fields. Consider the- following message:+ Field masks treat fields in oneofs just as regular fields. Consider the+ following message:- message SampleMessage {- oneof test_oneof {- string name = 4;- SubMessage sub_message = 9;- }+ message SampleMessage {+ oneof test_oneof {+ string name = 4;+ SubMessage sub_message = 9;}+ }- The field mask can be:+ The field mask can be:- mask {- paths: "name"- }+ mask {+ paths: "name"+ }- Or:+ Or:- mask {- paths: "sub_message"- }+ mask {+ paths: "sub_message"+ }- Note that oneof type names ("test_oneof" in this case) cannot be used in- paths.+ Note that oneof type names ("test_oneof" in this case) cannot be used in+ paths.- ## Field Mask Verification+ ## Field Mask Verification- The implementation of any API method which has a FieldMask type field in the- request should verify the included field paths, and return an- `INVALID_ARGUMENT` error if any path is unmappable.+ The implementation of any API method which has a FieldMask type field in the+ request should verify the included field paths, and return an+ `INVALID_ARGUMENT` error if any path is unmappable.+ schema:+ type: string- name: allowMissingin: querydescription: |-@@ -6960,9 +6388,6 @@ paths:schema:type: booleantitle: allow_missing- description: |-- If set to true, and the project is not found, a new project will be created.- In this situation, `update_mask` is ignored.requestBody:description: |-The project to update.@@ -7007,14 +6432,12 @@ paths:type: integertitle: page_sizeformat: int32- description: The maximum number of access grants to return.- name: pageTokenin: querydescription: A page token from a previous ListAccessGrants call.schema:type: stringtitle: page_token- description: A page token from a previous ListAccessGrants call.- name: filterin: querydescription: |-@@ -7044,30 +6467,6 @@ paths:schema:type: stringtitle: filter- description: |-- Filter expression using AIP-160 syntax.- Supported fields:- - name: the fullname in "projects/{project}/accessGrants/{access_grant}" format, support "==" operator.- - creator: the creator name in "users/{email}" format, support "==" operator.- - status: the access status, support "==" and "in" operator.- - issue: the access issue fullname, support "==" operator.- - expire_time: the access expire time in "2006-01-02T15:04:05Z07:00" format, support ">=", ">", "<=" and "<" operator.- - create_time: the access creation time in "2006-01-02T15:04:05Z07:00" format, support ">=", ">", "<=" and "<" operator.- - query: the access query, support "==" and ".contains(xx)" operator- - target: the target database fullname, support "==" operator.- - unmask: whether the grant allows unmasking sensitive data, support "==" operator with a boolean literal.- - export: whether the grant allows exporting the query result, support "==" operator with a boolean literal.-- Examples:- - creator == "users/[email protected]"- - status == "ACTIVE"- - status in ["ACTIVE", "PENDING"]- - creator == "users/[email protected]" && status == "ACTIVE"- - issue == "projects/x/issues/123"- - status == "ACTIVE" && expire_time > "2024-02-01T00:00:00Z"- - target == "instances/sample/databases/employee"- - unmask == true- - export == true && status == "ACTIVE"- name: orderByin: querydescription: |-@@ -7080,13 +6479,6 @@ paths:schema:type: stringtitle: order_by- description: |-- The order by of access grants.- Support creator, expire_time, create_time. The default sorting order is ascending.- For example:- - order_by = "creator"- - order_by = "expire_time desc"- - order_by = "expire_time asc, create_time desc"responses:"200":description: Success@@ -7413,7 +6805,6 @@ paths:description: The view to return. Defaults to DATABASE_GROUP_VIEW_BASIC.schema:title: view- description: The view to return. Defaults to DATABASE_GROUP_VIEW_BASIC.$ref: '#/components/schemas/bytebase.v1.DatabaseGroupView'responses:"200":@@ -7448,19 +6839,12 @@ paths:schema:type: stringtitle: database_group_id- description: |-- The ID to use for the database group, which will become the final component of- the database group's resource name.-- This value should be 4-63 characters, and valid characters- are /[a-z][0-9]-/.- name: validateOnlyin: querydescription: If set, validate the create request and preview the full database group response, but do not actually create it.schema:type: booleantitle: validate_only- description: If set, validate the create request and preview the full database group response, but do not actually create it.requestBody:description: The database group to create.content:@@ -7503,7 +6887,6 @@ paths:description: The view to return. Defaults to DATABASE_GROUP_VIEW_BASIC.schema:title: view- description: The view to return. Defaults to DATABASE_GROUP_VIEW_BASIC.$ref: '#/components/schemas/bytebase.v1.DatabaseGroupView'responses:"200":@@ -7564,209 +6947,208 @@ paths:type: string- name: updateMaskin: query- description: The list of fields to update.- schema:- type: string- description: |-- `FieldMask` represents a set of symbolic field paths, for example:+ description: |-+ `FieldMask` represents a set of symbolic field paths, for example:- paths: "f.a"- paths: "f.b.d"+ paths: "f.a"+ paths: "f.b.d"- Here `f` represents a field in some root message, `a` and `b`- fields in the message found in `f`, and `d` a field found in the- message in `f.b`.+ Here `f` represents a field in some root message, `a` and `b`+ fields in the message found in `f`, and `d` a field found in the+ message in `f.b`.- Field masks are used to specify a subset of fields that should be- returned by a get operation or modified by an update operation.- Field masks also have a custom JSON encoding (see below).+ Field masks are used to specify a subset of fields that should be+ returned by a get operation or modified by an update operation.+ Field masks also have a custom JSON encoding (see below).- # Field Masks in Projections+ # Field Masks in Projections- When used in the context of a projection, a response message or- sub-message is filtered by the API to only contain those fields as- specified in the mask. For example, if the mask in the previous- example is applied to a response message as follows:+ When used in the context of a projection, a response message or+ sub-message is filtered by the API to only contain those fields as+ specified in the mask. For example, if the mask in the previous+ example is applied to a response message as follows:- f {- a : 22- b {- d : 1- x : 2- }- y : 13+ f {+ a : 22+ b {+ d : 1+ x : 2}- z: 8+ y : 13+ }+ z: 8- The result will not contain specific values for fields x,y and z- (their value will be set to the default, and omitted in proto text- output):+ The result will not contain specific values for fields x,y and z+ (their value will be set to the default, and omitted in proto text+ output):- f {- a : 22- b {- d : 1- }+ f {+ a : 22+ b {+ d : 1}+ }- A repeated field is not allowed except at the last position of a- paths string.-- If a FieldMask object is not present in a get operation, the- operation applies to all fields (as if a FieldMask of all fields- had been specified).-- Note that a field mask does not necessarily apply to the- top-level response message. In case of a REST get operation, the- field mask applies directly to the response, but in case of a REST- list operation, the mask instead applies to each individual message- in the returned resource list. In case of a REST custom method,- other definitions may be used. Where the mask applies will be- clearly documented together with its declaration in the API. In- any case, the effect on the returned resource/resources is required- behavior for APIs.-- # Field Masks in Update Operations-- A field mask in update operations specifies which fields of the- targeted resource are going to be updated. The API is required- to only change the values of the fields as specified in the mask- and leave the others untouched. If a resource is passed in to- describe the updated values, the API ignores the values of all- fields not covered by the mask.-- If a repeated field is specified for an update operation, new values will- be appended to the existing repeated field in the target resource. Note that- a repeated field is only allowed in the last position of a `paths` string.-- If a sub-message is specified in the last position of the field mask for an- update operation, then new value will be merged into the existing sub-message- in the target resource.-- For example, given the target message:-- f {- b {- d: 1- x: 2- }- c: [1]+ A repeated field is not allowed except at the last position of a+ paths string.++ If a FieldMask object is not present in a get operation, the+ operation applies to all fields (as if a FieldMask of all fields+ had been specified).++ Note that a field mask does not necessarily apply to the+ top-level response message. In case of a REST get operation, the+ field mask applies directly to the response, but in case of a REST+ list operation, the mask instead applies to each individual message+ in the returned resource list. In case of a REST custom method,+ other definitions may be used. Where the mask applies will be+ clearly documented together with its declaration in the API. In+ any case, the effect on the returned resource/resources is required+ behavior for APIs.++ # Field Masks in Update Operations++ A field mask in update operations specifies which fields of the+ targeted resource are going to be updated. The API is required+ to only change the values of the fields as specified in the mask+ and leave the others untouched. If a resource is passed in to+ describe the updated values, the API ignores the values of all+ fields not covered by the mask.++ If a repeated field is specified for an update operation, new values will+ be appended to the existing repeated field in the target resource. Note that+ a repeated field is only allowed in the last position of a `paths` string.++ If a sub-message is specified in the last position of the field mask for an+ update operation, then new value will be merged into the existing sub-message+ in the target resource.++ For example, given the target message:++ f {+ b {+ d: 1+ x: 2}+ c: [1]+ }- And an update message:+ And an update message:- f {- b {- d: 10- }- c: [2]+ f {+ b {+ d: 10}+ c: [2]+ }- then if the field mask is:+ then if the field mask is:- paths: ["f.b", "f.c"]+ paths: ["f.b", "f.c"]- then the result will be:+ then the result will be:- f {- b {- d: 10- x: 2- }- c: [1, 2]+ f {+ b {+ d: 10+ x: 2}+ c: [1, 2]+ }- An implementation may provide options to override this default behavior for- repeated and message fields.+ An implementation may provide options to override this default behavior for+ repeated and message fields.- In order to reset a field's value to the default, the field must- be in the mask and set to the default value in the provided resource.- Hence, in order to reset all fields of a resource, provide a default- instance of the resource and set all fields in the mask, or do- not provide a mask as described below.+ In order to reset a field's value to the default, the field must+ be in the mask and set to the default value in the provided resource.+ Hence, in order to reset all fields of a resource, provide a default+ instance of the resource and set all fields in the mask, or do+ not provide a mask as described below.- If a field mask is not present on update, the operation applies to- all fields (as if a field mask of all fields has been specified).- Note that in the presence of schema evolution, this may mean that- fields the client does not know and has therefore not filled into- the request will be reset to their default. If this is unwanted- behavior, a specific service may require a client to always specify- a field mask, producing an error if not.+ If a field mask is not present on update, the operation applies to+ all fields (as if a field mask of all fields has been specified).+ Note that in the presence of schema evolution, this may mean that+ fields the client does not know and has therefore not filled into+ the request will be reset to their default. If this is unwanted+ behavior, a specific service may require a client to always specify+ a field mask, producing an error if not.- As with get operations, the location of the resource which- describes the updated values in the request message depends on the- operation kind. In any case, the effect of the field mask is- required to be honored by the API.+ As with get operations, the location of the resource which+ describes the updated values in the request message depends on the+ operation kind. In any case, the effect of the field mask is+ required to be honored by the API.- ## Considerations for HTTP REST+ ## Considerations for HTTP REST- The HTTP kind of an update operation which uses a field mask must- be set to PATCH instead of PUT in order to satisfy HTTP semantics- (PUT must only be used for full updates).+ The HTTP kind of an update operation which uses a field mask must+ be set to PATCH instead of PUT in order to satisfy HTTP semantics+ (PUT must only be used for full updates).- # JSON Encoding of Field Masks+ # JSON Encoding of Field Masks- In JSON, a field mask is encoded as a single string where paths are- separated by a comma. Fields name in each path are converted- to/from lower-camel naming conventions.+ In JSON, a field mask is encoded as a single string where paths are+ separated by a comma. Fields name in each path are converted+ to/from lower-camel naming conventions.- As an example, consider the following message declarations:+ As an example, consider the following message declarations:- message Profile {- User user = 1;- Photo photo = 2;- }- message User {- string display_name = 1;- string address = 2;- }+ message Profile {+ User user = 1;+ Photo photo = 2;+ }+ message User {+ string display_name = 1;+ string address = 2;+ }- In proto a field mask for `Profile` may look as such:+ In proto a field mask for `Profile` may look as such:- mask {- paths: "user.display_name"- paths: "photo"- }+ mask {+ paths: "user.display_name"+ paths: "photo"+ }- In JSON, the same mask is represented as below:+ In JSON, the same mask is represented as below:- {- mask: "user.displayName,photo"- }+ {+ mask: "user.displayName,photo"+ }- # Field Masks and Oneof Fields+ # Field Masks and Oneof Fields- Field masks treat fields in oneofs just as regular fields. Consider the- following message:+ Field masks treat fields in oneofs just as regular fields. Consider the+ following message:- message SampleMessage {- oneof test_oneof {- string name = 4;- SubMessage sub_message = 9;- }+ message SampleMessage {+ oneof test_oneof {+ string name = 4;+ SubMessage sub_message = 9;}+ }- The field mask can be:+ The field mask can be:- mask {- paths: "name"- }+ mask {+ paths: "name"+ }- Or:+ Or:- mask {- paths: "sub_message"- }+ mask {+ paths: "sub_message"+ }- Note that oneof type names ("test_oneof" in this case) cannot be used in- paths.+ Note that oneof type names ("test_oneof" in this case) cannot be used in+ paths.- ## Field Mask Verification+ ## Field Mask Verification- The implementation of any API method which has a FieldMask type field in the- request should verify the included field paths, and return an- `INVALID_ARGUMENT` error if any path is unmappable.+ The implementation of any API method which has a FieldMask type field in the+ request should verify the included field paths, and return an+ `INVALID_ARGUMENT` error if any path is unmappable.+ schema:+ type: string- name: allowMissingin: querydescription: |-@@ -7775,9 +7157,6 @@ paths:schema:type: booleantitle: allow_missing- description: |-- 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.requestBody:description: |-The database group to update.@@ -7828,11 +7207,6 @@ paths:type: integertitle: page_sizeformat: int32- description: |-- The maximum number of databases to return. The service may return fewer- than this value.- If unspecified, at most 10 databases will be returned.- The maximum value is 1000; values above 1000 will be coerced to 1000.- name: pageTokenin: querydescription: |-@@ -7844,12 +7218,6 @@ paths:schema:type: stringtitle: page_token- description: |-- A page token, received from a previous `ListDatabases` call.- Provide this to retrieve the subsequent page.-- When paginating, all other parameters provided to `ListDatabases` must- match the call that provided the page token.- name: filterin: querydescription: |-@@ -7887,45 +7255,12 @@ paths:schema:type: stringtitle: filter- description: |-- Filter is used to filter databases returned in the list.- The syntax and semantics of CEL are documented at https://github.com/google/cel-spec-- Supported filter:- - environment: the environment full name in "environments/{id}" format, support "==" operator.- - name: the database name, support ".contains()" operator.- - project: the project full name in "projects/{id}" format, support "==" operator.- - instance: the instance full name in "instances/{id}" format, support "==" operator.- - engine: the database engine, check Engine enum for values. Support "==", "in [xx]", "!(in [xx])" operator.- - exclude_unassigned: should be "true" or "false", will not show unassigned databases if it's true, support "==" operator.- - table: filter by the database table, support "==" and ".contains()" operator.- - labels.{key}: the database label, support "==" and "in" operators.-- For example:- environment == "environments/{environment resource id}"- environment == "" (find databases which environment is not set)- project == "projects/{project resource id}"- instance == "instances/{instance resource id}"- name.contains("database name")- engine == "MYSQL"- engine in ["MYSQL", "POSTGRES"]- !(engine in ["MYSQL", "POSTGRES"])- exclude_unassigned == true- table == "sample"- table.contains("sam")- labels.environment == "production"- labels.region == "asia"- labels.region in ["asia", "europe"]-- You can combine filter conditions like:- environment == "environments/prod" && name.contains("employee")- name: showDeletedin: querydescription: Show deleted database if specified.schema:type: booleantitle: show_deleted- description: Show deleted database if specified.- name: orderByin: querydescription: |-@@ -7938,13 +7273,6 @@ paths:schema:type: stringtitle: order_by- description: |-- The order by of databases.- Support name, project, instance. The default sorting order is ascending.- For example:- - order_by = "name" - order by name ascending- - order_by = "name desc"- - order_by = "name desc, project asc"responses:"200":description: Success@@ -7977,7 +7305,6 @@ paths:items:type: stringtitle: names- description: The list of database names to retrieve.responses:"200":description: Success@@ -8012,11 +7339,6 @@ paths:type: integertitle: page_sizeformat: int32- description: |-- The maximum number of issues to return. The service may return fewer than- this value.- If unspecified, at most 10 issues will be returned.- The maximum value is 1000; values above 1000 will be coerced to 1000.- name: pageTokenin: querydescription: |-@@ -8028,12 +7350,6 @@ paths:schema:type: stringtitle: page_token- description: |-- A page token, received from a previous `ListIssues` call.- Provide this to retrieve the subsequent page.-- When paginating, all other parameters provided to `ListIssues` must match- the call that provided the page token.- name: filterin: querydescription: |-@@ -8059,33 +7375,12 @@ paths:schema:type: stringtitle: filter- description: |-- Filter is used to filter issues returned in the list.- The syntax and semantics of CEL are documented at https://github.com/google/cel-spec-- Supported filters:- - creator: issue creator full name in "users/{email or id}" format, support "==" operator.- - status: the issue status, support "==" and "in" operator, check the IssueStatus enum for the values.- - create_time: issue create time in "2006-01-02T15:04:05Z07:00" format, support ">=" or "<=" operator.- - type: the issue type, support "==" and "in" operator, check the Type enum in the Issue message for the values.- - labels: the issue labels, support "==" and "in" operator.- - risk_level: the issue risk level, support "in" operator, check the RiskLevel enum for the values.- - approval_status: issue approval status, support "==" operator.- - current_approver: the issue approver, should in "users/{email} format", support "==" operator.-- For example:- creator == "users/[email protected]" && status in ["OPEN", "DONE"]- status == "CANCELED" && type == "DATABASE_CHANGE"- labels in ["label1", "label2"]- risk_level in ["HIGH", "MODERATE"]- create_time >= "2025-01-02T15:04:05Z07:00"- name: queryin: querydescription: Query is the query statement.schema:type: stringtitle: query- description: Query is the query statement.- name: orderByin: querydescription: |-@@ -8100,15 +7395,6 @@ paths:schema:type: stringtitle: order_by- description: |-- The order by of issues.- Support:- - create_time- - update_time- The default sorting order is ascending.- For example:- - order_by = "create_time desc"- - order_by = "update_time asc"responses:"200":description: Success@@ -8174,7 +7460,6 @@ paths:schema:type: booleantitle: force- description: If set to true, bypass cache and fetch the latest data.responses:"200":description: Success@@ -8205,210 +7490,209 @@ paths:type: string- name: updateMaskin: query- description: The list of fields to update.- required: true- schema:- type: string- description: |-- `FieldMask` represents a set of symbolic field paths, for example:+ description: |-+ `FieldMask` represents a set of symbolic field paths, for example:- paths: "f.a"- paths: "f.b.d"+ paths: "f.a"+ paths: "f.b.d"- Here `f` represents a field in some root message, `a` and `b`- fields in the message found in `f`, and `d` a field found in the- message in `f.b`.+ Here `f` represents a field in some root message, `a` and `b`+ fields in the message found in `f`, and `d` a field found in the+ message in `f.b`.- Field masks are used to specify a subset of fields that should be- returned by a get operation or modified by an update operation.- Field masks also have a custom JSON encoding (see below).+ Field masks are used to specify a subset of fields that should be+ returned by a get operation or modified by an update operation.+ Field masks also have a custom JSON encoding (see below).- # Field Masks in Projections+ # Field Masks in Projections- When used in the context of a projection, a response message or- sub-message is filtered by the API to only contain those fields as- specified in the mask. For example, if the mask in the previous- example is applied to a response message as follows:+ When used in the context of a projection, a response message or+ sub-message is filtered by the API to only contain those fields as+ specified in the mask. For example, if the mask in the previous+ example is applied to a response message as follows:- f {- a : 22- b {- d : 1- x : 2- }- y : 13+ f {+ a : 22+ b {+ d : 1+ x : 2}- z: 8+ y : 13+ }+ z: 8- The result will not contain specific values for fields x,y and z- (their value will be set to the default, and omitted in proto text- output):+ The result will not contain specific values for fields x,y and z+ (their value will be set to the default, and omitted in proto text+ output):- f {- a : 22- b {- d : 1- }+ f {+ a : 22+ b {+ d : 1}+ }++ A repeated field is not allowed except at the last position of a+ paths string.++ If a FieldMask object is not present in a get operation, the+ operation applies to all fields (as if a FieldMask of all fields+ had been specified).++ Note that a field mask does not necessarily apply to the+ top-level response message. In case of a REST get operation, the+ field mask applies directly to the response, but in case of a REST+ list operation, the mask instead applies to each individual message+ in the returned resource list. In case of a REST custom method,+ other definitions may be used. Where the mask applies will be+ clearly documented together with its declaration in the API. In+ any case, the effect on the returned resource/resources is required+ behavior for APIs.++ # Field Masks in Update Operations++ A field mask in update operations specifies which fields of the+ targeted resource are going to be updated. The API is required+ to only change the values of the fields as specified in the mask+ and leave the others untouched. If a resource is passed in to+ describe the updated values, the API ignores the values of all+ fields not covered by the mask.++ If a repeated field is specified for an update operation, new values will+ be appended to the existing repeated field in the target resource. Note that+ a repeated field is only allowed in the last position of a `paths` string.++ If a sub-message is specified in the last position of the field mask for an+ update operation, then new value will be merged into the existing sub-message+ in the target resource.++ For example, given the target message:- A repeated field is not allowed except at the last position of a- paths string.-- If a FieldMask object is not present in a get operation, the- operation applies to all fields (as if a FieldMask of all fields- had been specified).-- Note that a field mask does not necessarily apply to the- top-level response message. In case of a REST get operation, the- field mask applies directly to the response, but in case of a REST- list operation, the mask instead applies to each individual message- in the returned resource list. In case of a REST custom method,- other definitions may be used. Where the mask applies will be- clearly documented together with its declaration in the API. In- any case, the effect on the returned resource/resources is required- behavior for APIs.-- # Field Masks in Update Operations-- A field mask in update operations specifies which fields of the- targeted resource are going to be updated. The API is required- to only change the values of the fields as specified in the mask- and leave the others untouched. If a resource is passed in to- describe the updated values, the API ignores the values of all- fields not covered by the mask.-- If a repeated field is specified for an update operation, new values will- be appended to the existing repeated field in the target resource. Note that- a repeated field is only allowed in the last position of a `paths` string.-- If a sub-message is specified in the last position of the field mask for an- update operation, then new value will be merged into the existing sub-message- in the target resource.-- For example, given the target message:-- f {- b {- d: 1- x: 2- }- c: [1]+ f {+ b {+ d: 1+ x: 2}+ c: [1]+ }- And an update message:+ And an update message:- f {- b {- d: 10- }- c: [2]+ f {+ b {+ d: 10}+ c: [2]+ }- then if the field mask is:+ then if the field mask is:- paths: ["f.b", "f.c"]+ paths: ["f.b", "f.c"]- then the result will be:+ then the result will be:- f {- b {- d: 10- x: 2- }- c: [1, 2]+ f {+ b {+ d: 10+ x: 2}+ c: [1, 2]+ }- An implementation may provide options to override this default behavior for- repeated and message fields.+ An implementation may provide options to override this default behavior for+ repeated and message fields.- In order to reset a field's value to the default, the field must- be in the mask and set to the default value in the provided resource.- Hence, in order to reset all fields of a resource, provide a default- instance of the resource and set all fields in the mask, or do- not provide a mask as described below.+ In order to reset a field's value to the default, the field must+ be in the mask and set to the default value in the provided resource.+ Hence, in order to reset all fields of a resource, provide a default+ instance of the resource and set all fields in the mask, or do+ not provide a mask as described below.- If a field mask is not present on update, the operation applies to- all fields (as if a field mask of all fields has been specified).- Note that in the presence of schema evolution, this may mean that- fields the client does not know and has therefore not filled into- the request will be reset to their default. If this is unwanted- behavior, a specific service may require a client to always specify- a field mask, producing an error if not.+ If a field mask is not present on update, the operation applies to+ all fields (as if a field mask of all fields has been specified).+ Note that in the presence of schema evolution, this may mean that+ fields the client does not know and has therefore not filled into+ the request will be reset to their default. If this is unwanted+ behavior, a specific service may require a client to always specify+ a field mask, producing an error if not.- As with get operations, the location of the resource which- describes the updated values in the request message depends on the- operation kind. In any case, the effect of the field mask is- required to be honored by the API.+ As with get operations, the location of the resource which+ describes the updated values in the request message depends on the+ operation kind. In any case, the effect of the field mask is+ required to be honored by the API.- ## Considerations for HTTP REST+ ## Considerations for HTTP REST- The HTTP kind of an update operation which uses a field mask must- be set to PATCH instead of PUT in order to satisfy HTTP semantics- (PUT must only be used for full updates).+ The HTTP kind of an update operation which uses a field mask must+ be set to PATCH instead of PUT in order to satisfy HTTP semantics+ (PUT must only be used for full updates).- # JSON Encoding of Field Masks+ # JSON Encoding of Field Masks- In JSON, a field mask is encoded as a single string where paths are- separated by a comma. Fields name in each path are converted- to/from lower-camel naming conventions.+ In JSON, a field mask is encoded as a single string where paths are+ separated by a comma. Fields name in each path are converted+ to/from lower-camel naming conventions.- As an example, consider the following message declarations:+ As an example, consider the following message declarations:- message Profile {- User user = 1;- Photo photo = 2;- }- message User {- string display_name = 1;- string address = 2;- }+ message Profile {+ User user = 1;+ Photo photo = 2;+ }+ message User {+ string display_name = 1;+ string address = 2;+ }- In proto a field mask for `Profile` may look as such:+ In proto a field mask for `Profile` may look as such:- mask {- paths: "user.display_name"- paths: "photo"- }+ mask {+ paths: "user.display_name"+ paths: "photo"+ }- In JSON, the same mask is represented as below:+ In JSON, the same mask is represented as below:- {- mask: "user.displayName,photo"- }+ {+ mask: "user.displayName,photo"+ }- # Field Masks and Oneof Fields+ # Field Masks and Oneof Fields- Field masks treat fields in oneofs just as regular fields. Consider the- following message:+ Field masks treat fields in oneofs just as regular fields. Consider the+ following message:- message SampleMessage {- oneof test_oneof {- string name = 4;- SubMessage sub_message = 9;- }+ message SampleMessage {+ oneof test_oneof {+ string name = 4;+ SubMessage sub_message = 9;}+ }- The field mask can be:+ The field mask can be:- mask {- paths: "name"- }+ mask {+ paths: "name"+ }- Or:+ Or:- mask {- paths: "sub_message"- }+ mask {+ paths: "sub_message"+ }- Note that oneof type names ("test_oneof" in this case) cannot be used in- paths.+ Note that oneof type names ("test_oneof" in this case) cannot be used in+ paths.- ## Field Mask Verification+ ## Field Mask Verification- The implementation of any API method which has a FieldMask type field in the- request should verify the included field paths, and return an- `INVALID_ARGUMENT` error if any path is unmappable.+ The implementation of any API method which has a FieldMask type field in the+ request should verify the included field paths, and return an+ `INVALID_ARGUMENT` error if any path is unmappable.+ required: true+ schema:+ type: string- name: allowMissingin: querydescription: |-@@ -8417,9 +7701,6 @@ paths:schema:type: booleantitle: allow_missing- description: |-- If set to true, and the issue is not found, a new issue will be created.- In this situation, `update_mask` is ignored.requestBody:description: |-The issue to update.@@ -8476,11 +7757,6 @@ paths:type: integertitle: page_sizeformat: int32- description: |-- The maximum number of issue comments to return. The service may return fewer than- this value.- If unspecified, at most 10 issue comments will be returned.- The maximum value is 1000; values above 1000 will be coerced to 1000.- name: pageTokenin: querydescription: |-@@ -8492,12 +7768,6 @@ paths:schema:type: stringtitle: page_token- description: |-- A page token, received from a previous `ListIssueComments` call.- Provide this to retrieve the subsequent page.-- When paginating, all other parameters provided to `ListIssueComments` must match- the call that provided the page token.responses:"200":description: Success@@ -8607,210 +7877,209 @@ paths:type: string- name: updateMaskin: query- description: The list of fields to update.- required: true- schema:- type: string- description: |-- `FieldMask` represents a set of symbolic field paths, for example:+ description: |-+ `FieldMask` represents a set of symbolic field paths, for example:- paths: "f.a"- paths: "f.b.d"+ paths: "f.a"+ paths: "f.b.d"- Here `f` represents a field in some root message, `a` and `b`- fields in the message found in `f`, and `d` a field found in the- message in `f.b`.+ Here `f` represents a field in some root message, `a` and `b`+ fields in the message found in `f`, and `d` a field found in the+ message in `f.b`.- Field masks are used to specify a subset of fields that should be- returned by a get operation or modified by an update operation.- Field masks also have a custom JSON encoding (see below).+ Field masks are used to specify a subset of fields that should be+ returned by a get operation or modified by an update operation.+ Field masks also have a custom JSON encoding (see below).- # Field Masks in Projections+ # Field Masks in Projections- When used in the context of a projection, a response message or- sub-message is filtered by the API to only contain those fields as- specified in the mask. For example, if the mask in the previous- example is applied to a response message as follows:+ When used in the context of a projection, a response message or+ sub-message is filtered by the API to only contain those fields as+ specified in the mask. For example, if the mask in the previous+ example is applied to a response message as follows:- f {- a : 22- b {- d : 1- x : 2- }- y : 13+ f {+ a : 22+ b {+ d : 1+ x : 2}- z: 8+ y : 13+ }+ z: 8- The result will not contain specific values for fields x,y and z- (their value will be set to the default, and omitted in proto text- output):+ The result will not contain specific values for fields x,y and z+ (their value will be set to the default, and omitted in proto text+ output):- f {- a : 22- b {- d : 1- }+ f {+ a : 22+ b {+ d : 1}+ }++ A repeated field is not allowed except at the last position of a+ paths string.++ If a FieldMask object is not present in a get operation, the+ operation applies to all fields (as if a FieldMask of all fields+ had been specified).++ Note that a field mask does not necessarily apply to the+ top-level response message. In case of a REST get operation, the+ field mask applies directly to the response, but in case of a REST+ list operation, the mask instead applies to each individual message+ in the returned resource list. In case of a REST custom method,+ other definitions may be used. Where the mask applies will be+ clearly documented together with its declaration in the API. In+ any case, the effect on the returned resource/resources is required+ behavior for APIs.++ # Field Masks in Update Operations++ A field mask in update operations specifies which fields of the+ targeted resource are going to be updated. The API is required+ to only change the values of the fields as specified in the mask+ and leave the others untouched. If a resource is passed in to+ describe the updated values, the API ignores the values of all+ fields not covered by the mask.- A repeated field is not allowed except at the last position of a- paths string.-- If a FieldMask object is not present in a get operation, the- operation applies to all fields (as if a FieldMask of all fields- had been specified).-- Note that a field mask does not necessarily apply to the- top-level response message. In case of a REST get operation, the- field mask applies directly to the response, but in case of a REST- list operation, the mask instead applies to each individual message- in the returned resource list. In case of a REST custom method,- other definitions may be used. Where the mask applies will be- clearly documented together with its declaration in the API. In- any case, the effect on the returned resource/resources is required- behavior for APIs.-- # Field Masks in Update Operations-- A field mask in update operations specifies which fields of the- targeted resource are going to be updated. The API is required- to only change the values of the fields as specified in the mask- and leave the others untouched. If a resource is passed in to- describe the updated values, the API ignores the values of all- fields not covered by the mask.-- If a repeated field is specified for an update operation, new values will- be appended to the existing repeated field in the target resource. Note that- a repeated field is only allowed in the last position of a `paths` string.-- If a sub-message is specified in the last position of the field mask for an- update operation, then new value will be merged into the existing sub-message- in the target resource.-- For example, given the target message:-- f {- b {- d: 1- x: 2- }- c: [1]+ If a repeated field is specified for an update operation, new values will+ be appended to the existing repeated field in the target resource. Note that+ a repeated field is only allowed in the last position of a `paths` string.++ If a sub-message is specified in the last position of the field mask for an+ update operation, then new value will be merged into the existing sub-message+ in the target resource.++ For example, given the target message:++ f {+ b {+ d: 1+ x: 2}+ c: [1]+ }- And an update message:+ And an update message:- f {- b {- d: 10- }- c: [2]+ f {+ b {+ d: 10}+ c: [2]+ }- then if the field mask is:+ then if the field mask is:- paths: ["f.b", "f.c"]+ paths: ["f.b", "f.c"]- then the result will be:+ then the result will be:- f {- b {- d: 10- x: 2- }- c: [1, 2]+ f {+ b {+ d: 10+ x: 2}+ c: [1, 2]+ }- An implementation may provide options to override this default behavior for- repeated and message fields.+ An implementation may provide options to override this default behavior for+ repeated and message fields.- In order to reset a field's value to the default, the field must- be in the mask and set to the default value in the provided resource.- Hence, in order to reset all fields of a resource, provide a default- instance of the resource and set all fields in the mask, or do- not provide a mask as described below.+ In order to reset a field's value to the default, the field must+ be in the mask and set to the default value in the provided resource.+ Hence, in order to reset all fields of a resource, provide a default+ instance of the resource and set all fields in the mask, or do+ not provide a mask as described below.- If a field mask is not present on update, the operation applies to- all fields (as if a field mask of all fields has been specified).- Note that in the presence of schema evolution, this may mean that- fields the client does not know and has therefore not filled into- the request will be reset to their default. If this is unwanted- behavior, a specific service may require a client to always specify- a field mask, producing an error if not.+ If a field mask is not present on update, the operation applies to+ all fields (as if a field mask of all fields has been specified).+ Note that in the presence of schema evolution, this may mean that+ fields the client does not know and has therefore not filled into+ the request will be reset to their default. If this is unwanted+ behavior, a specific service may require a client to always specify+ a field mask, producing an error if not.- As with get operations, the location of the resource which- describes the updated values in the request message depends on the- operation kind. In any case, the effect of the field mask is- required to be honored by the API.+ As with get operations, the location of the resource which+ describes the updated values in the request message depends on the+ operation kind. In any case, the effect of the field mask is+ required to be honored by the API.- ## Considerations for HTTP REST+ ## Considerations for HTTP REST- The HTTP kind of an update operation which uses a field mask must- be set to PATCH instead of PUT in order to satisfy HTTP semantics- (PUT must only be used for full updates).+ The HTTP kind of an update operation which uses a field mask must+ be set to PATCH instead of PUT in order to satisfy HTTP semantics+ (PUT must only be used for full updates).- # JSON Encoding of Field Masks+ # JSON Encoding of Field Masks- In JSON, a field mask is encoded as a single string where paths are- separated by a comma. Fields name in each path are converted- to/from lower-camel naming conventions.+ In JSON, a field mask is encoded as a single string where paths are+ separated by a comma. Fields name in each path are converted+ to/from lower-camel naming conventions.- As an example, consider the following message declarations:+ As an example, consider the following message declarations:- message Profile {- User user = 1;- Photo photo = 2;- }- message User {- string display_name = 1;- string address = 2;- }+ message Profile {+ User user = 1;+ Photo photo = 2;+ }+ message User {+ string display_name = 1;+ string address = 2;+ }- In proto a field mask for `Profile` may look as such:+ In proto a field mask for `Profile` may look as such:- mask {- paths: "user.display_name"- paths: "photo"- }+ mask {+ paths: "user.display_name"+ paths: "photo"+ }- In JSON, the same mask is represented as below:+ In JSON, the same mask is represented as below:- {- mask: "user.displayName,photo"- }+ {+ mask: "user.displayName,photo"+ }- # Field Masks and Oneof Fields+ # Field Masks and Oneof Fields- Field masks treat fields in oneofs just as regular fields. Consider the- following message:+ Field masks treat fields in oneofs just as regular fields. Consider the+ following message:- message SampleMessage {- oneof test_oneof {- string name = 4;- SubMessage sub_message = 9;- }+ message SampleMessage {+ oneof test_oneof {+ string name = 4;+ SubMessage sub_message = 9;}+ }- The field mask can be:+ The field mask can be:- mask {- paths: "name"- }+ mask {+ paths: "name"+ }- Or:+ Or:- mask {- paths: "sub_message"- }+ mask {+ paths: "sub_message"+ }- Note that oneof type names ("test_oneof" in this case) cannot be used in- paths.+ Note that oneof type names ("test_oneof" in this case) cannot be used in+ paths.- ## Field Mask Verification+ ## Field Mask Verification- The implementation of any API method which has a FieldMask type field in the- request should verify the included field paths, and return an- `INVALID_ARGUMENT` error if any path is unmappable.+ The implementation of any API method which has a FieldMask type field in the+ request should verify the included field paths, and return an+ `INVALID_ARGUMENT` error if any path is unmappable.+ required: true+ schema:+ type: string- name: allowMissingin: querydescription: |-@@ -8819,9 +8088,6 @@ paths:schema:type: booleantitle: allow_missing- description: |-- If set to true, and the issue comment is not found, a new issue comment will be created.- In this situation, `update_mask` is ignored.requestBody:description: The comment to update.content:@@ -9104,11 +8370,6 @@ paths:type: integertitle: page_sizeformat: int32- description: |-- 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.- name: pageTokenin: querydescription: |-@@ -9120,12 +8381,6 @@ paths:schema:type: stringtitle: page_token- description: |-- A page token, received from a previous `ListPlans` call.- Provide this to retrieve the subsequent page.-- When paginating, all other parameters provided to `ListPlans` must match- the call that provided the page token.- name: filterin: querydescription: |-@@ -9151,26 +8406,6 @@ paths:schema:type: stringtitle: filter- description: |-- Filter is used to filter plans returned in the list.- The syntax and semantics of CEL are documented at https://github.com/google/cel-spec-- Supported filters:- - creator: the plan creator full name in "users/{email or id}" format, support "==" operator.- - create_time: the plan create time in "2006-01-02T15:04:05Z07:00" format, support ">=" or "<=" operator.- - has_rollout: whether the plan has rollout, support "==" operator, the value should be "true" or "false".- - has_issue: the plan has issue or not, support "==" operator, the value should be "true" or "false".- - title: the plan title, support "==" operator for exact match and ".contains()" operator for case-insensitive substring match.- - spec_type: the plan spec config type, support "==" operator, the value should be "create_database_config", "change_database_config", or "export_data_config".- - state: the plan state, support "==" operator, the value should be "ACTIVE" or "DELETED".-- For example:- creator == "users/[email protected]" && create_time >= "2025-01-02T15:04:05Z07:00"- has_rollout == false && has_issue == true- title == "My Plan"- title.contains("database migration")- spec_type == "change_database_config"- state == "ACTIVE"responses:"200":description: Success@@ -9261,210 +8496,209 @@ paths:type: string- name: updateMaskin: query- description: The list of fields to update.- required: true- schema:- type: string- description: |-- `FieldMask` represents a set of symbolic field paths, for example:+ description: |-+ `FieldMask` represents a set of symbolic field paths, for example:- paths: "f.a"- paths: "f.b.d"+ paths: "f.a"+ paths: "f.b.d"- Here `f` represents a field in some root message, `a` and `b`- fields in the message found in `f`, and `d` a field found in the- message in `f.b`.+ Here `f` represents a field in some root message, `a` and `b`+ fields in the message found in `f`, and `d` a field found in the+ message in `f.b`.- Field masks are used to specify a subset of fields that should be- returned by a get operation or modified by an update operation.- Field masks also have a custom JSON encoding (see below).+ Field masks are used to specify a subset of fields that should be+ returned by a get operation or modified by an update operation.+ Field masks also have a custom JSON encoding (see below).- # Field Masks in Projections+ # Field Masks in Projections- When used in the context of a projection, a response message or- sub-message is filtered by the API to only contain those fields as- specified in the mask. For example, if the mask in the previous- example is applied to a response message as follows:+ When used in the context of a projection, a response message or+ sub-message is filtered by the API to only contain those fields as+ specified in the mask. For example, if the mask in the previous+ example is applied to a response message as follows:- f {- a : 22- b {- d : 1- x : 2- }- y : 13+ f {+ a : 22+ b {+ d : 1+ x : 2}- z: 8+ y : 13+ }+ z: 8- The result will not contain specific values for fields x,y and z- (their value will be set to the default, and omitted in proto text- output):+ The result will not contain specific values for fields x,y and z+ (their value will be set to the default, and omitted in proto text+ output):- f {- a : 22- b {- d : 1- }+ f {+ a : 22+ b {+ d : 1}+ }++ A repeated field is not allowed except at the last position of a+ paths string.++ If a FieldMask object is not present in a get operation, the+ operation applies to all fields (as if a FieldMask of all fields+ had been specified).++ Note that a field mask does not necessarily apply to the+ top-level response message. In case of a REST get operation, the+ field mask applies directly to the response, but in case of a REST+ list operation, the mask instead applies to each individual message+ in the returned resource list. In case of a REST custom method,+ other definitions may be used. Where the mask applies will be+ clearly documented together with its declaration in the API. In+ any case, the effect on the returned resource/resources is required+ behavior for APIs.- A repeated field is not allowed except at the last position of a- paths string.-- If a FieldMask object is not present in a get operation, the- operation applies to all fields (as if a FieldMask of all fields- had been specified).-- Note that a field mask does not necessarily apply to the- top-level response message. In case of a REST get operation, the- field mask applies directly to the response, but in case of a REST- list operation, the mask instead applies to each individual message- in the returned resource list. In case of a REST custom method,- other definitions may be used. Where the mask applies will be- clearly documented together with its declaration in the API. In- any case, the effect on the returned resource/resources is required- behavior for APIs.-- # Field Masks in Update Operations-- A field mask in update operations specifies which fields of the- targeted resource are going to be updated. The API is required- to only change the values of the fields as specified in the mask- and leave the others untouched. If a resource is passed in to- describe the updated values, the API ignores the values of all- fields not covered by the mask.-- If a repeated field is specified for an update operation, new values will- be appended to the existing repeated field in the target resource. Note that- a repeated field is only allowed in the last position of a `paths` string.-- If a sub-message is specified in the last position of the field mask for an- update operation, then new value will be merged into the existing sub-message- in the target resource.-- For example, given the target message:-- f {- b {- d: 1- x: 2- }- c: [1]+ # Field Masks in Update Operations++ A field mask in update operations specifies which fields of the+ targeted resource are going to be updated. The API is required+ to only change the values of the fields as specified in the mask+ and leave the others untouched. If a resource is passed in to+ describe the updated values, the API ignores the values of all+ fields not covered by the mask.++ If a repeated field is specified for an update operation, new values will+ be appended to the existing repeated field in the target resource. Note that+ a repeated field is only allowed in the last position of a `paths` string.++ If a sub-message is specified in the last position of the field mask for an+ update operation, then new value will be merged into the existing sub-message+ in the target resource.++ For example, given the target message:++ f {+ b {+ d: 1+ x: 2}+ c: [1]+ }- And an update message:+ And an update message:- f {- b {- d: 10- }- c: [2]+ f {+ b {+ d: 10}+ c: [2]+ }- then if the field mask is:+ then if the field mask is:- paths: ["f.b", "f.c"]+ paths: ["f.b", "f.c"]- then the result will be:+ then the result will be:- f {- b {- d: 10- x: 2- }- c: [1, 2]+ f {+ b {+ d: 10+ x: 2}+ c: [1, 2]+ }- An implementation may provide options to override this default behavior for- repeated and message fields.+ An implementation may provide options to override this default behavior for+ repeated and message fields.- In order to reset a field's value to the default, the field must- be in the mask and set to the default value in the provided resource.- Hence, in order to reset all fields of a resource, provide a default- instance of the resource and set all fields in the mask, or do- not provide a mask as described below.+ In order to reset a field's value to the default, the field must+ be in the mask and set to the default value in the provided resource.+ Hence, in order to reset all fields of a resource, provide a default+ instance of the resource and set all fields in the mask, or do+ not provide a mask as described below.- If a field mask is not present on update, the operation applies to- all fields (as if a field mask of all fields has been specified).- Note that in the presence of schema evolution, this may mean that- fields the client does not know and has therefore not filled into- the request will be reset to their default. If this is unwanted- behavior, a specific service may require a client to always specify- a field mask, producing an error if not.+ If a field mask is not present on update, the operation applies to+ all fields (as if a field mask of all fields has been specified).+ Note that in the presence of schema evolution, this may mean that+ fields the client does not know and has therefore not filled into+ the request will be reset to their default. If this is unwanted+ behavior, a specific service may require a client to always specify+ a field mask, producing an error if not.- As with get operations, the location of the resource which- describes the updated values in the request message depends on the- operation kind. In any case, the effect of the field mask is- required to be honored by the API.+ As with get operations, the location of the resource which+ describes the updated values in the request message depends on the+ operation kind. In any case, the effect of the field mask is+ required to be honored by the API.- ## Considerations for HTTP REST+ ## Considerations for HTTP REST- The HTTP kind of an update operation which uses a field mask must- be set to PATCH instead of PUT in order to satisfy HTTP semantics- (PUT must only be used for full updates).+ The HTTP kind of an update operation which uses a field mask must+ be set to PATCH instead of PUT in order to satisfy HTTP semantics+ (PUT must only be used for full updates).- # JSON Encoding of Field Masks+ # JSON Encoding of Field Masks- In JSON, a field mask is encoded as a single string where paths are- separated by a comma. Fields name in each path are converted- to/from lower-camel naming conventions.+ In JSON, a field mask is encoded as a single string where paths are+ separated by a comma. Fields name in each path are converted+ to/from lower-camel naming conventions.- As an example, consider the following message declarations:+ As an example, consider the following message declarations:- message Profile {- User user = 1;- Photo photo = 2;- }- message User {- string display_name = 1;- string address = 2;- }+ message Profile {+ User user = 1;+ Photo photo = 2;+ }+ message User {+ string display_name = 1;+ string address = 2;+ }- In proto a field mask for `Profile` may look as such:+ In proto a field mask for `Profile` may look as such:- mask {- paths: "user.display_name"- paths: "photo"- }+ mask {+ paths: "user.display_name"+ paths: "photo"+ }- In JSON, the same mask is represented as below:+ In JSON, the same mask is represented as below:- {- mask: "user.displayName,photo"- }+ {+ mask: "user.displayName,photo"+ }- # Field Masks and Oneof Fields+ # Field Masks and Oneof Fields- Field masks treat fields in oneofs just as regular fields. Consider the- following message:+ Field masks treat fields in oneofs just as regular fields. Consider the+ following message:- message SampleMessage {- oneof test_oneof {- string name = 4;- SubMessage sub_message = 9;- }+ message SampleMessage {+ oneof test_oneof {+ string name = 4;+ SubMessage sub_message = 9;}+ }- The field mask can be:+ The field mask can be:- mask {- paths: "name"- }+ mask {+ paths: "name"+ }- Or:+ Or:- mask {- paths: "sub_message"- }+ mask {+ paths: "sub_message"+ }- Note that oneof type names ("test_oneof" in this case) cannot be used in- paths.+ Note that oneof type names ("test_oneof" in this case) cannot be used in+ paths.- ## Field Mask Verification+ ## Field Mask Verification- The implementation of any API method which has a FieldMask type field in the- request should verify the included field paths, and return an- `INVALID_ARGUMENT` error if any path is unmappable.+ The implementation of any API method which has a FieldMask type field in the+ request should verify the included field paths, and return an+ `INVALID_ARGUMENT` error if any path is unmappable.+ required: true+ schema:+ type: string- name: allowMissingin: querydescription: |-@@ -9473,9 +8707,6 @@ paths:schema:type: booleantitle: allow_missing- description: |-- If set to true, and the plan is not found, a new plan will be created.- In this situation, `update_mask` is ignored.requestBody:description: |-The plan to update.@@ -10275,14 +9506,12 @@ paths:- $ref: '#/components/schemas/bytebase.v1.PolicyType'- type: "null"title: policy_type- description: Filter by specific policy type.- name: showDeletedin: querydescription: Show deleted policies if specified.schema:type: booleantitle: show_deleted- description: Show deleted policies if specified.responses:"200":description: Success@@ -10310,7 +9539,6 @@ paths:description: The type of policy to create.schema:title: type- description: The type of policy to create.$ref: '#/components/schemas/bytebase.v1.PolicyType'requestBody:description: The policy to create.@@ -10407,209 +9635,208 @@ paths:type: string- name: updateMaskin: query- description: The list of fields to update.- schema:- type: string- description: |-- `FieldMask` represents a set of symbolic field paths, for example:+ description: |-+ `FieldMask` represents a set of symbolic field paths, for example:- paths: "f.a"- paths: "f.b.d"+ paths: "f.a"+ paths: "f.b.d"- Here `f` represents a field in some root message, `a` and `b`- fields in the message found in `f`, and `d` a field found in the- message in `f.b`.+ Here `f` represents a field in some root message, `a` and `b`+ fields in the message found in `f`, and `d` a field found in the+ message in `f.b`.- Field masks are used to specify a subset of fields that should be- returned by a get operation or modified by an update operation.- Field masks also have a custom JSON encoding (see below).+ Field masks are used to specify a subset of fields that should be+ returned by a get operation or modified by an update operation.+ Field masks also have a custom JSON encoding (see below).- # Field Masks in Projections+ # Field Masks in Projections- When used in the context of a projection, a response message or- sub-message is filtered by the API to only contain those fields as- specified in the mask. For example, if the mask in the previous- example is applied to a response message as follows:+ When used in the context of a projection, a response message or+ sub-message is filtered by the API to only contain those fields as+ specified in the mask. For example, if the mask in the previous+ example is applied to a response message as follows:- f {- a : 22- b {- d : 1- x : 2- }- y : 13+ f {+ a : 22+ b {+ d : 1+ x : 2}- z: 8+ y : 13+ }+ z: 8- The result will not contain specific values for fields x,y and z- (their value will be set to the default, and omitted in proto text- output):+ The result will not contain specific values for fields x,y and z+ (their value will be set to the default, and omitted in proto text+ output):- f {- a : 22- b {- d : 1- }+ f {+ a : 22+ b {+ d : 1}+ }++ A repeated field is not allowed except at the last position of a+ paths string.++ If a FieldMask object is not present in a get operation, the+ operation applies to all fields (as if a FieldMask of all fields+ had been specified).- A repeated field is not allowed except at the last position of a- paths string.-- If a FieldMask object is not present in a get operation, the- operation applies to all fields (as if a FieldMask of all fields- had been specified).-- Note that a field mask does not necessarily apply to the- top-level response message. In case of a REST get operation, the- field mask applies directly to the response, but in case of a REST- list operation, the mask instead applies to each individual message- in the returned resource list. In case of a REST custom method,- other definitions may be used. Where the mask applies will be- clearly documented together with its declaration in the API. In- any case, the effect on the returned resource/resources is required- behavior for APIs.-- # Field Masks in Update Operations-- A field mask in update operations specifies which fields of the- targeted resource are going to be updated. The API is required- to only change the values of the fields as specified in the mask- and leave the others untouched. If a resource is passed in to- describe the updated values, the API ignores the values of all- fields not covered by the mask.-- If a repeated field is specified for an update operation, new values will- be appended to the existing repeated field in the target resource. Note that- a repeated field is only allowed in the last position of a `paths` string.-- If a sub-message is specified in the last position of the field mask for an- update operation, then new value will be merged into the existing sub-message- in the target resource.-- For example, given the target message:-- f {- b {- d: 1- x: 2- }- c: [1]+ Note that a field mask does not necessarily apply to the+ top-level response message. In case of a REST get operation, the+ field mask applies directly to the response, but in case of a REST+ list operation, the mask instead applies to each individual message+ in the returned resource list. In case of a REST custom method,+ other definitions may be used. Where the mask applies will be+ clearly documented together with its declaration in the API. In+ any case, the effect on the returned resource/resources is required+ behavior for APIs.++ # Field Masks in Update Operations++ A field mask in update operations specifies which fields of the+ targeted resource are going to be updated. The API is required+ to only change the values of the fields as specified in the mask+ and leave the others untouched. If a resource is passed in to+ describe the updated values, the API ignores the values of all+ fields not covered by the mask.++ If a repeated field is specified for an update operation, new values will+ be appended to the existing repeated field in the target resource. Note that+ a repeated field is only allowed in the last position of a `paths` string.++ If a sub-message is specified in the last position of the field mask for an+ update operation, then new value will be merged into the existing sub-message+ in the target resource.++ For example, given the target message:++ f {+ b {+ d: 1+ x: 2}+ c: [1]+ }- And an update message:+ And an update message:- f {- b {- d: 10- }- c: [2]+ f {+ b {+ d: 10}+ c: [2]+ }- then if the field mask is:+ then if the field mask is:- paths: ["f.b", "f.c"]+ paths: ["f.b", "f.c"]- then the result will be:+ then the result will be:- f {- b {- d: 10- x: 2- }- c: [1, 2]+ f {+ b {+ d: 10+ x: 2}+ c: [1, 2]+ }- An implementation may provide options to override this default behavior for- repeated and message fields.+ An implementation may provide options to override this default behavior for+ repeated and message fields.- In order to reset a field's value to the default, the field must- be in the mask and set to the default value in the provided resource.- Hence, in order to reset all fields of a resource, provide a default- instance of the resource and set all fields in the mask, or do- not provide a mask as described below.+ In order to reset a field's value to the default, the field must+ be in the mask and set to the default value in the provided resource.+ Hence, in order to reset all fields of a resource, provide a default+ instance of the resource and set all fields in the mask, or do+ not provide a mask as described below.- If a field mask is not present on update, the operation applies to- all fields (as if a field mask of all fields has been specified).- Note that in the presence of schema evolution, this may mean that- fields the client does not know and has therefore not filled into- the request will be reset to their default. If this is unwanted- behavior, a specific service may require a client to always specify- a field mask, producing an error if not.+ If a field mask is not present on update, the operation applies to+ all fields (as if a field mask of all fields has been specified).+ Note that in the presence of schema evolution, this may mean that+ fields the client does not know and has therefore not filled into+ the request will be reset to their default. If this is unwanted+ behavior, a specific service may require a client to always specify+ a field mask, producing an error if not.- As with get operations, the location of the resource which- describes the updated values in the request message depends on the- operation kind. In any case, the effect of the field mask is- required to be honored by the API.+ As with get operations, the location of the resource which+ describes the updated values in the request message depends on the+ operation kind. In any case, the effect of the field mask is+ required to be honored by the API.- ## Considerations for HTTP REST+ ## Considerations for HTTP REST- The HTTP kind of an update operation which uses a field mask must- be set to PATCH instead of PUT in order to satisfy HTTP semantics- (PUT must only be used for full updates).+ The HTTP kind of an update operation which uses a field mask must+ be set to PATCH instead of PUT in order to satisfy HTTP semantics+ (PUT must only be used for full updates).- # JSON Encoding of Field Masks+ # JSON Encoding of Field Masks- In JSON, a field mask is encoded as a single string where paths are- separated by a comma. Fields name in each path are converted- to/from lower-camel naming conventions.+ In JSON, a field mask is encoded as a single string where paths are+ separated by a comma. Fields name in each path are converted+ to/from lower-camel naming conventions.- As an example, consider the following message declarations:+ As an example, consider the following message declarations:- message Profile {- User user = 1;- Photo photo = 2;- }- message User {- string display_name = 1;- string address = 2;- }+ message Profile {+ User user = 1;+ Photo photo = 2;+ }+ message User {+ string display_name = 1;+ string address = 2;+ }- In proto a field mask for `Profile` may look as such:+ In proto a field mask for `Profile` may look as such:- mask {- paths: "user.display_name"- paths: "photo"- }+ mask {+ paths: "user.display_name"+ paths: "photo"+ }- In JSON, the same mask is represented as below:+ In JSON, the same mask is represented as below:- {- mask: "user.displayName,photo"- }+ {+ mask: "user.displayName,photo"+ }- # Field Masks and Oneof Fields+ # Field Masks and Oneof Fields- Field masks treat fields in oneofs just as regular fields. Consider the- following message:+ Field masks treat fields in oneofs just as regular fields. Consider the+ following message:- message SampleMessage {- oneof test_oneof {- string name = 4;- SubMessage sub_message = 9;- }+ message SampleMessage {+ oneof test_oneof {+ string name = 4;+ SubMessage sub_message = 9;}+ }- The field mask can be:+ The field mask can be:- mask {- paths: "name"- }+ mask {+ paths: "name"+ }- Or:+ Or:- mask {- paths: "sub_message"- }+ mask {+ paths: "sub_message"+ }- Note that oneof type names ("test_oneof" in this case) cannot be used in- paths.+ Note that oneof type names ("test_oneof" in this case) cannot be used in+ paths.- ## Field Mask Verification+ ## Field Mask Verification- The implementation of any API method which has a FieldMask type field in the- request should verify the included field paths, and return an- `INVALID_ARGUMENT` error if any path is unmappable.+ The implementation of any API method which has a FieldMask type field in the+ request should verify the included field paths, and return an+ `INVALID_ARGUMENT` error if any path is unmappable.+ schema:+ type: string- name: allowMissingin: querydescription: |-@@ -10618,9 +9845,6 @@ paths:schema:type: booleantitle: allow_missing- description: |-- If set to true, and the policy is not found, a new policy will be created.- In this situation, `update_mask` is ignored.requestBody:description: |-The policy to update.@@ -10707,10 +9931,6 @@ paths:type: integertitle: page_sizeformat: int32- description: |-- The maximum number of releases to return. The service may return fewer than this value.- If unspecified, at most 10 releases will be returned.- The maximum value is 1000; values above 1000 will be coerced to 1000.- name: pageTokenin: querydescription: |-@@ -10722,19 +9942,12 @@ paths:schema:type: stringtitle: page_token- description: |-- A page token, received from a previous `ListReleases` call.- Provide this to retrieve the subsequent page.-- When paginating, all other parameters provided to `ListReleases` must match- the call that provided the page token.- name: showDeletedin: querydescription: Show deleted releases if specified.schema:type: booleantitle: show_deleted- description: Show deleted releases if specified.- name: filterin: querydescription: |-@@ -10749,15 +9962,6 @@ paths:schema:type: stringtitle: filter- description: |-- Filter is used to filter releases returned in the list.- The syntax and semantics of CEL are documented at https://github.com/google/cel-spec-- Supported filters:- - category: release category, support "==" operator.-- For example:- category == "webapp"responses:"200":description: Success@@ -10790,11 +9994,6 @@ paths:schema:type: stringtitle: release_id_template- description: |-- Template for release ID generation.- Available variables: {date}, {time}, {timestamp}, {iteration}.- Example: "release_{date}-RC{iteration}" generates "release_20260119-RC00".- Default: "release_{date}-RC{iteration}".- name: releaseIdTimezonein: querydescription: |-@@ -10804,10 +10003,6 @@ paths:schema:type: stringtitle: release_id_timezone- description: |-- Timezone for {date} and {time} variables in the template.- Must be a valid IANA timezone (e.g., "UTC", "America/Los_Angeles").- Default: "UTC".requestBody:description: The release to create.content:@@ -10904,209 +10099,208 @@ paths:type: string- name: updateMaskin: query- description: The list of fields to be updated.- schema:- type: string- description: |-- `FieldMask` represents a set of symbolic field paths, for example:+ description: |-+ `FieldMask` represents a set of symbolic field paths, for example:- paths: "f.a"- paths: "f.b.d"+ paths: "f.a"+ paths: "f.b.d"- Here `f` represents a field in some root message, `a` and `b`- fields in the message found in `f`, and `d` a field found in the- message in `f.b`.+ Here `f` represents a field in some root message, `a` and `b`+ fields in the message found in `f`, and `d` a field found in the+ message in `f.b`.- Field masks are used to specify a subset of fields that should be- returned by a get operation or modified by an update operation.- Field masks also have a custom JSON encoding (see below).+ Field masks are used to specify a subset of fields that should be+ returned by a get operation or modified by an update operation.+ Field masks also have a custom JSON encoding (see below).- # Field Masks in Projections+ # Field Masks in Projections- When used in the context of a projection, a response message or- sub-message is filtered by the API to only contain those fields as- specified in the mask. For example, if the mask in the previous- example is applied to a response message as follows:+ When used in the context of a projection, a response message or+ sub-message is filtered by the API to only contain those fields as+ specified in the mask. For example, if the mask in the previous+ example is applied to a response message as follows:- f {- a : 22- b {- d : 1- x : 2- }- y : 13+ f {+ a : 22+ b {+ d : 1+ x : 2}- z: 8+ y : 13+ }+ z: 8- The result will not contain specific values for fields x,y and z- (their value will be set to the default, and omitted in proto text- output):+ The result will not contain specific values for fields x,y and z+ (their value will be set to the default, and omitted in proto text+ output):- f {- a : 22- b {- d : 1- }+ f {+ a : 22+ b {+ d : 1}+ }- A repeated field is not allowed except at the last position of a- paths string.-- If a FieldMask object is not present in a get operation, the- operation applies to all fields (as if a FieldMask of all fields- had been specified).-- Note that a field mask does not necessarily apply to the- top-level response message. In case of a REST get operation, the- field mask applies directly to the response, but in case of a REST- list operation, the mask instead applies to each individual message- in the returned resource list. In case of a REST custom method,- other definitions may be used. Where the mask applies will be- clearly documented together with its declaration in the API. In- any case, the effect on the returned resource/resources is required- behavior for APIs.-- # Field Masks in Update Operations-- A field mask in update operations specifies which fields of the- targeted resource are going to be updated. The API is required- to only change the values of the fields as specified in the mask- and leave the others untouched. If a resource is passed in to- describe the updated values, the API ignores the values of all- fields not covered by the mask.-- If a repeated field is specified for an update operation, new values will- be appended to the existing repeated field in the target resource. Note that- a repeated field is only allowed in the last position of a `paths` string.-- If a sub-message is specified in the last position of the field mask for an- update operation, then new value will be merged into the existing sub-message- in the target resource.-- For example, given the target message:-- f {- b {- d: 1- x: 2- }- c: [1]+ A repeated field is not allowed except at the last position of a+ paths string.++ If a FieldMask object is not present in a get operation, the+ operation applies to all fields (as if a FieldMask of all fields+ had been specified).++ Note that a field mask does not necessarily apply to the+ top-level response message. In case of a REST get operation, the+ field mask applies directly to the response, but in case of a REST+ list operation, the mask instead applies to each individual message+ in the returned resource list. In case of a REST custom method,+ other definitions may be used. Where the mask applies will be+ clearly documented together with its declaration in the API. In+ any case, the effect on the returned resource/resources is required+ behavior for APIs.++ # Field Masks in Update Operations++ A field mask in update operations specifies which fields of the+ targeted resource are going to be updated. The API is required+ to only change the values of the fields as specified in the mask+ and leave the others untouched. If a resource is passed in to+ describe the updated values, the API ignores the values of all+ fields not covered by the mask.++ If a repeated field is specified for an update operation, new values will+ be appended to the existing repeated field in the target resource. Note that+ a repeated field is only allowed in the last position of a `paths` string.++ If a sub-message is specified in the last position of the field mask for an+ update operation, then new value will be merged into the existing sub-message+ in the target resource.++ For example, given the target message:++ f {+ b {+ d: 1+ x: 2}+ c: [1]+ }- And an update message:+ And an update message:- f {- b {- d: 10- }- c: [2]+ f {+ b {+ d: 10}+ c: [2]+ }- then if the field mask is:+ then if the field mask is:- paths: ["f.b", "f.c"]+ paths: ["f.b", "f.c"]- then the result will be:+ then the result will be:- f {- b {- d: 10- x: 2- }- c: [1, 2]+ f {+ b {+ d: 10+ x: 2}+ c: [1, 2]+ }- An implementation may provide options to override this default behavior for- repeated and message fields.+ An implementation may provide options to override this default behavior for+ repeated and message fields.- In order to reset a field's value to the default, the field must- be in the mask and set to the default value in the provided resource.- Hence, in order to reset all fields of a resource, provide a default- instance of the resource and set all fields in the mask, or do- not provide a mask as described below.+ In order to reset a field's value to the default, the field must+ be in the mask and set to the default value in the provided resource.+ Hence, in order to reset all fields of a resource, provide a default+ instance of the resource and set all fields in the mask, or do+ not provide a mask as described below.- If a field mask is not present on update, the operation applies to- all fields (as if a field mask of all fields has been specified).- Note that in the presence of schema evolution, this may mean that- fields the client does not know and has therefore not filled into- the request will be reset to their default. If this is unwanted- behavior, a specific service may require a client to always specify- a field mask, producing an error if not.+ If a field mask is not present on update, the operation applies to+ all fields (as if a field mask of all fields has been specified).+ Note that in the presence of schema evolution, this may mean that+ fields the client does not know and has therefore not filled into+ the request will be reset to their default. If this is unwanted+ behavior, a specific service may require a client to always specify+ a field mask, producing an error if not.- As with get operations, the location of the resource which- describes the updated values in the request message depends on the- operation kind. In any case, the effect of the field mask is- required to be honored by the API.+ As with get operations, the location of the resource which+ describes the updated values in the request message depends on the+ operation kind. In any case, the effect of the field mask is+ required to be honored by the API.- ## Considerations for HTTP REST+ ## Considerations for HTTP REST- The HTTP kind of an update operation which uses a field mask must- be set to PATCH instead of PUT in order to satisfy HTTP semantics- (PUT must only be used for full updates).+ The HTTP kind of an update operation which uses a field mask must+ be set to PATCH instead of PUT in order to satisfy HTTP semantics+ (PUT must only be used for full updates).- # JSON Encoding of Field Masks+ # JSON Encoding of Field Masks- In JSON, a field mask is encoded as a single string where paths are- separated by a comma. Fields name in each path are converted- to/from lower-camel naming conventions.+ In JSON, a field mask is encoded as a single string where paths are+ separated by a comma. Fields name in each path are converted+ to/from lower-camel naming conventions.- As an example, consider the following message declarations:+ As an example, consider the following message declarations:- message Profile {- User user = 1;- Photo photo = 2;- }- message User {- string display_name = 1;- string address = 2;- }+ message Profile {+ User user = 1;+ Photo photo = 2;+ }+ message User {+ string display_name = 1;+ string address = 2;+ }- In proto a field mask for `Profile` may look as such:+ In proto a field mask for `Profile` may look as such:- mask {- paths: "user.display_name"- paths: "photo"- }+ mask {+ paths: "user.display_name"+ paths: "photo"+ }- In JSON, the same mask is represented as below:+ In JSON, the same mask is represented as below:- {- mask: "user.displayName,photo"- }+ {+ mask: "user.displayName,photo"+ }- # Field Masks and Oneof Fields+ # Field Masks and Oneof Fields- Field masks treat fields in oneofs just as regular fields. Consider the- following message:+ Field masks treat fields in oneofs just as regular fields. Consider the+ following message:- message SampleMessage {- oneof test_oneof {- string name = 4;- SubMessage sub_message = 9;- }+ message SampleMessage {+ oneof test_oneof {+ string name = 4;+ SubMessage sub_message = 9;}+ }- The field mask can be:+ The field mask can be:- mask {- paths: "name"- }+ mask {+ paths: "name"+ }- Or:+ Or:- mask {- paths: "sub_message"- }+ mask {+ paths: "sub_message"+ }- Note that oneof type names ("test_oneof" in this case) cannot be used in- paths.+ Note that oneof type names ("test_oneof" in this case) cannot be used in+ paths.- ## Field Mask Verification+ ## Field Mask Verification- The implementation of any API method which has a FieldMask type field in the- request should verify the included field paths, and return an- `INVALID_ARGUMENT` error if any path is unmappable.+ The implementation of any API method which has a FieldMask type field in the+ request should verify the included field paths, and return an+ `INVALID_ARGUMENT` error if any path is unmappable.+ schema:+ type: stringrequestBody:description: The release to update.content:@@ -11264,11 +10458,6 @@ paths:type: integertitle: page_sizeformat: int32- description: |-- The maximum number of rollouts to return. The service may return fewer than- this value.- If unspecified, at most 10 rollouts will be returned.- The maximum value is 1000; values above 1000 will be coerced to 1000.- name: pageTokenin: querydescription: |-@@ -11280,12 +10469,6 @@ paths:schema:type: stringtitle: page_token- description: |-- A page token, received from a previous `ListRollouts` call.- Provide this to retrieve the subsequent page.-- When paginating, all other parameters provided to `ListRollouts` must match- the call that provided the page token.- name: filterin: querydescription: |-@@ -11301,18 +10484,7 @@ paths:task_type in ["DATABASE_MIGRATE", "DATABASE_EXPORT"]schema:type: string- title: filter- description: |-- Filter is used to filter rollouts returned in the list.- The syntax and semantics of CEL are documented at https://github.com/google/cel-spec-- Supported filters:- - update_time: rollout update time in "2006-01-02T15:04:05Z07:00" format, support ">=" or "<=" operator.- - task_type: the task type, support "in" operator, check the Task.Type enum for the values.-- For example:- update_time >= "2025-01-02T15:04:05Z07:00"- task_type in ["DATABASE_MIGRATE", "DATABASE_EXPORT"]+ title: filterresponses:"200":description: Success@@ -11348,11 +10520,6 @@ paths:type: integertitle: page_sizeformat: int32- description: |-- The maximum number of service accounts to return. The service may return fewer than- this value.- If unspecified, at most 10 service accounts will be returned.- The maximum value is 1000; values above 1000 will be coerced to 1000.- name: pageTokenin: querydescription: |-@@ -11364,19 +10531,12 @@ paths:schema:type: stringtitle: page_token- description: |-- A page token, received from a previous `ListServiceAccounts` call.- Provide this to retrieve the subsequent page.-- When paginating, all other parameters provided to `ListServiceAccounts` must match- the call that provided the page token.- name: showDeletedin: querydescription: Show deleted service accounts if specified.schema:type: booleantitle: show_deleted- description: Show deleted service accounts if specified.- name: filterin: querydescription: |-@@ -11397,21 +10557,6 @@ paths:schema:type: stringtitle: filter- description: |-- Filter is used to filter service accounts returned in the list.- The syntax and semantics of CEL are documented at https://github.com/google/cel-spec-- Supported filter:- - name: the service account name, support "==" and ".contains()" operator.- - email: the service account email, support "==" and ".contains()" operator.- - state: check State enum for values, support "==" operator.-- For example:- name == "ed"- name.contains("ed")- state == "DELETED"- email == "[email protected]"- email.contains("ed")responses:"200":description: Success@@ -11445,10 +10590,6 @@ paths:schema:type: stringtitle: service_account_id- description: |-- The ID to use for the service account, which will become the final component- of the service account's email in the format: {service_account_id}@service.bytebase.com- or {service_account_id}@{project-id}.service.bytebase.comrequestBody:description: The service account to create.content:@@ -11523,7 +10664,6 @@ paths:schema:type: booleantitle: raw- description: By default, the content of the sheet is cut off, set the `raw` to true to retrieve the full content.responses:"200":description: Success@@ -11638,209 +10778,208 @@ paths:type: string- name: updateMaskin: query- description: The list of fields to update.- schema:- type: string- description: |-- `FieldMask` represents a set of symbolic field paths, for example:+ description: |-+ `FieldMask` represents a set of symbolic field paths, for example:- paths: "f.a"- paths: "f.b.d"+ paths: "f.a"+ paths: "f.b.d"- Here `f` represents a field in some root message, `a` and `b`- fields in the message found in `f`, and `d` a field found in the- message in `f.b`.+ Here `f` represents a field in some root message, `a` and `b`+ fields in the message found in `f`, and `d` a field found in the+ message in `f.b`.- Field masks are used to specify a subset of fields that should be- returned by a get operation or modified by an update operation.- Field masks also have a custom JSON encoding (see below).+ Field masks are used to specify a subset of fields that should be+ returned by a get operation or modified by an update operation.+ Field masks also have a custom JSON encoding (see below).- # Field Masks in Projections+ # Field Masks in Projections- When used in the context of a projection, a response message or- sub-message is filtered by the API to only contain those fields as- specified in the mask. For example, if the mask in the previous- example is applied to a response message as follows:+ When used in the context of a projection, a response message or+ sub-message is filtered by the API to only contain those fields as+ specified in the mask. For example, if the mask in the previous+ example is applied to a response message as follows:- f {- a : 22- b {- d : 1- x : 2- }- y : 13+ f {+ a : 22+ b {+ d : 1+ x : 2}- z: 8+ y : 13+ }+ z: 8- The result will not contain specific values for fields x,y and z- (their value will be set to the default, and omitted in proto text- output):+ The result will not contain specific values for fields x,y and z+ (their value will be set to the default, and omitted in proto text+ output):- f {- a : 22- b {- d : 1- }+ f {+ a : 22+ b {+ d : 1}+ }++ A repeated field is not allowed except at the last position of a+ paths string.++ If a FieldMask object is not present in a get operation, the+ operation applies to all fields (as if a FieldMask of all fields+ had been specified).- A repeated field is not allowed except at the last position of a- paths string.-- If a FieldMask object is not present in a get operation, the- operation applies to all fields (as if a FieldMask of all fields- had been specified).-- Note that a field mask does not necessarily apply to the- top-level response message. In case of a REST get operation, the- field mask applies directly to the response, but in case of a REST- list operation, the mask instead applies to each individual message- in the returned resource list. In case of a REST custom method,- other definitions may be used. Where the mask applies will be- clearly documented together with its declaration in the API. In- any case, the effect on the returned resource/resources is required- behavior for APIs.-- # Field Masks in Update Operations-- A field mask in update operations specifies which fields of the- targeted resource are going to be updated. The API is required- to only change the values of the fields as specified in the mask- and leave the others untouched. If a resource is passed in to- describe the updated values, the API ignores the values of all- fields not covered by the mask.-- If a repeated field is specified for an update operation, new values will- be appended to the existing repeated field in the target resource. Note that- a repeated field is only allowed in the last position of a `paths` string.-- If a sub-message is specified in the last position of the field mask for an- update operation, then new value will be merged into the existing sub-message- in the target resource.-- For example, given the target message:-- f {- b {- d: 1- x: 2- }- c: [1]+ Note that a field mask does not necessarily apply to the+ top-level response message. In case of a REST get operation, the+ field mask applies directly to the response, but in case of a REST+ list operation, the mask instead applies to each individual message+ in the returned resource list. In case of a REST custom method,+ other definitions may be used. Where the mask applies will be+ clearly documented together with its declaration in the API. In+ any case, the effect on the returned resource/resources is required+ behavior for APIs.++ # Field Masks in Update Operations++ A field mask in update operations specifies which fields of the+ targeted resource are going to be updated. The API is required+ to only change the values of the fields as specified in the mask+ and leave the others untouched. If a resource is passed in to+ describe the updated values, the API ignores the values of all+ fields not covered by the mask.++ If a repeated field is specified for an update operation, new values will+ be appended to the existing repeated field in the target resource. Note that+ a repeated field is only allowed in the last position of a `paths` string.++ If a sub-message is specified in the last position of the field mask for an+ update operation, then new value will be merged into the existing sub-message+ in the target resource.++ For example, given the target message:++ f {+ b {+ d: 1+ x: 2}+ c: [1]+ }- And an update message:+ And an update message:- f {- b {- d: 10- }- c: [2]+ f {+ b {+ d: 10}+ c: [2]+ }- then if the field mask is:+ then if the field mask is:- paths: ["f.b", "f.c"]+ paths: ["f.b", "f.c"]- then the result will be:+ then the result will be:- f {- b {- d: 10- x: 2- }- c: [1, 2]+ f {+ b {+ d: 10+ x: 2}+ c: [1, 2]+ }- An implementation may provide options to override this default behavior for- repeated and message fields.+ An implementation may provide options to override this default behavior for+ repeated and message fields.- In order to reset a field's value to the default, the field must- be in the mask and set to the default value in the provided resource.- Hence, in order to reset all fields of a resource, provide a default- instance of the resource and set all fields in the mask, or do- not provide a mask as described below.+ In order to reset a field's value to the default, the field must+ be in the mask and set to the default value in the provided resource.+ Hence, in order to reset all fields of a resource, provide a default+ instance of the resource and set all fields in the mask, or do+ not provide a mask as described below.- If a field mask is not present on update, the operation applies to- all fields (as if a field mask of all fields has been specified).- Note that in the presence of schema evolution, this may mean that- fields the client does not know and has therefore not filled into- the request will be reset to their default. If this is unwanted- behavior, a specific service may require a client to always specify- a field mask, producing an error if not.+ If a field mask is not present on update, the operation applies to+ all fields (as if a field mask of all fields has been specified).+ Note that in the presence of schema evolution, this may mean that+ fields the client does not know and has therefore not filled into+ the request will be reset to their default. If this is unwanted+ behavior, a specific service may require a client to always specify+ a field mask, producing an error if not.- As with get operations, the location of the resource which- describes the updated values in the request message depends on the- operation kind. In any case, the effect of the field mask is- required to be honored by the API.+ As with get operations, the location of the resource which+ describes the updated values in the request message depends on the+ operation kind. In any case, the effect of the field mask is+ required to be honored by the API.- ## Considerations for HTTP REST+ ## Considerations for HTTP REST- The HTTP kind of an update operation which uses a field mask must- be set to PATCH instead of PUT in order to satisfy HTTP semantics- (PUT must only be used for full updates).+ The HTTP kind of an update operation which uses a field mask must+ be set to PATCH instead of PUT in order to satisfy HTTP semantics+ (PUT must only be used for full updates).- # JSON Encoding of Field Masks+ # JSON Encoding of Field Masks- In JSON, a field mask is encoded as a single string where paths are- separated by a comma. Fields name in each path are converted- to/from lower-camel naming conventions.+ In JSON, a field mask is encoded as a single string where paths are+ separated by a comma. Fields name in each path are converted+ to/from lower-camel naming conventions.- As an example, consider the following message declarations:+ As an example, consider the following message declarations:- message Profile {- User user = 1;- Photo photo = 2;- }- message User {- string display_name = 1;- string address = 2;- }+ message Profile {+ User user = 1;+ Photo photo = 2;+ }+ message User {+ string display_name = 1;+ string address = 2;+ }- In proto a field mask for `Profile` may look as such:+ In proto a field mask for `Profile` may look as such:- mask {- paths: "user.display_name"- paths: "photo"- }+ mask {+ paths: "user.display_name"+ paths: "photo"+ }- In JSON, the same mask is represented as below:+ In JSON, the same mask is represented as below:- {- mask: "user.displayName,photo"- }+ {+ mask: "user.displayName,photo"+ }- # Field Masks and Oneof Fields+ # Field Masks and Oneof Fields- Field masks treat fields in oneofs just as regular fields. Consider the- following message:+ Field masks treat fields in oneofs just as regular fields. Consider the+ following message:- message SampleMessage {- oneof test_oneof {- string name = 4;- SubMessage sub_message = 9;- }+ message SampleMessage {+ oneof test_oneof {+ string name = 4;+ SubMessage sub_message = 9;}+ }- The field mask can be:+ The field mask can be:- mask {- paths: "name"- }+ mask {+ paths: "name"+ }- Or:+ Or:- mask {- paths: "sub_message"- }+ mask {+ paths: "sub_message"+ }- Note that oneof type names ("test_oneof" in this case) cannot be used in- paths.+ Note that oneof type names ("test_oneof" in this case) cannot be used in+ paths.- ## Field Mask Verification+ ## Field Mask Verification- The implementation of any API method which has a FieldMask type field in the- request should verify the included field paths, and return an- `INVALID_ARGUMENT` error if any path is unmappable.+ The implementation of any API method which has a FieldMask type field in the+ request should verify the included field paths, and return an+ `INVALID_ARGUMENT` error if any path is unmappable.+ schema:+ type: string- name: allowMissingin: querydescription: |-@@ -11849,9 +10988,6 @@ paths:schema:type: booleantitle: allow_missing- description: |-- If set to true, and the webhook is not found, a new webhook will be created.- In this situation, `update_mask` is ignored.requestBody:description: The webhook to modify.content:@@ -11895,11 +11031,6 @@ paths:type: integertitle: page_sizeformat: int32- description: |-- The maximum number of workload identities to return. The service may return fewer than- this value.- If unspecified, at most 10 workload identities will be returned.- The maximum value is 1000; values above 1000 will be coerced to 1000.- name: pageTokenin: querydescription: |-@@ -11911,19 +11042,12 @@ paths:schema:type: stringtitle: page_token- description: |-- A page token, received from a previous `ListWorkloadIdentities` call.- Provide this to retrieve the subsequent page.-- When paginating, all other parameters provided to `ListWorkloadIdentities` must match- the call that provided the page token.- name: showDeletedin: querydescription: Show deleted workload identities if specified.schema:type: booleantitle: show_deleted- description: Show deleted workload identities if specified.- name: filterin: querydescription: |-@@ -11944,21 +11068,6 @@ paths:schema:type: stringtitle: filter- description: |-- Filter is used to filter workload identities returned in the list.- The syntax and semantics of CEL are documented at https://github.com/google/cel-spec-- Supported filter:- - name: the workload identity name, support "==" and ".contains()" operator.- - email: the workload identity email, support "==" and ".contains()" operator.- - state: check State enum for values, support "==" operator.-- For example:- name == "ed"- name.contains("ed")- state == "DELETED"- email == "[email protected]"- email.contains("ed")responses:"200":description: Success@@ -11992,10 +11101,6 @@ paths:schema:type: stringtitle: workload_identity_id- description: |-- The ID to use for the workload identity, which will become the final component- of the workload identity's email in the format: {workload_identity_id}@workload.bytebase.com- or {workload_identity_id}@{project-id}.workload.bytebase.comrequestBody:description: The workload identity to create.content:@@ -12132,216 +11237,207 @@ paths:- name: updateMaskin: querydescription: |-- The list of fields to be updated.- Fields are specified relative to the worksheet.- (e.g., `title`, `statement`; *not* `worksheet.title` or `worksheet.statement`)- Only support update the following fields for now:- - `title`- - `statement`- - `starred`- - `visibility`- schema:- type: string- description: |-- `FieldMask` represents a set of symbolic field paths, for example:+ `FieldMask` represents a set of symbolic field paths, for example:- paths: "f.a"- paths: "f.b.d"+ paths: "f.a"+ paths: "f.b.d"- Here `f` represents a field in some root message, `a` and `b`- fields in the message found in `f`, and `d` a field found in the- message in `f.b`.+ Here `f` represents a field in some root message, `a` and `b`+ fields in the message found in `f`, and `d` a field found in the+ message in `f.b`.- Field masks are used to specify a subset of fields that should be- returned by a get operation or modified by an update operation.- Field masks also have a custom JSON encoding (see below).+ Field masks are used to specify a subset of fields that should be+ returned by a get operation or modified by an update operation.+ Field masks also have a custom JSON encoding (see below).- # Field Masks in Projections+ # Field Masks in Projections- When used in the context of a projection, a response message or- sub-message is filtered by the API to only contain those fields as- specified in the mask. For example, if the mask in the previous- example is applied to a response message as follows:+ When used in the context of a projection, a response message or+ sub-message is filtered by the API to only contain those fields as+ specified in the mask. For example, if the mask in the previous+ example is applied to a response message as follows:- f {- a : 22- b {- d : 1- x : 2- }- y : 13+ f {+ a : 22+ b {+ d : 1+ x : 2}- z: 8+ y : 13+ }+ z: 8- The result will not contain specific values for fields x,y and z- (their value will be set to the default, and omitted in proto text- output):+ The result will not contain specific values for fields x,y and z+ (their value will be set to the default, and omitted in proto text+ output):- f {- a : 22- b {- d : 1- }+ f {+ a : 22+ b {+ d : 1}+ }++ A repeated field is not allowed except at the last position of a+ paths string.++ If a FieldMask object is not present in a get operation, the+ operation applies to all fields (as if a FieldMask of all fields+ had been specified).++ Note that a field mask does not necessarily apply to the+ top-level response message. In case of a REST get operation, the+ field mask applies directly to the response, but in case of a REST+ list operation, the mask instead applies to each individual message+ in the returned resource list. In case of a REST custom method,+ other definitions may be used. Where the mask applies will be+ clearly documented together with its declaration in the API. In+ any case, the effect on the returned resource/resources is required+ behavior for APIs.++ # Field Masks in Update Operations++ A field mask in update operations specifies which fields of the+ targeted resource are going to be updated. The API is required+ to only change the values of the fields as specified in the mask+ and leave the others untouched. If a resource is passed in to+ describe the updated values, the API ignores the values of all+ fields not covered by the mask.++ If a repeated field is specified for an update operation, new values will+ be appended to the existing repeated field in the target resource. Note that+ a repeated field is only allowed in the last position of a `paths` string.++ If a sub-message is specified in the last position of the field mask for an+ update operation, then new value will be merged into the existing sub-message+ in the target resource.- A repeated field is not allowed except at the last position of a- paths string.-- If a FieldMask object is not present in a get operation, the- operation applies to all fields (as if a FieldMask of all fields- had been specified).-- Note that a field mask does not necessarily apply to the- top-level response message. In case of a REST get operation, the- field mask applies directly to the response, but in case of a REST- list operation, the mask instead applies to each individual message- in the returned resource list. In case of a REST custom method,- other definitions may be used. Where the mask applies will be- clearly documented together with its declaration in the API. In- any case, the effect on the returned resource/resources is required- behavior for APIs.-- # Field Masks in Update Operations-- A field mask in update operations specifies which fields of the- targeted resource are going to be updated. The API is required- to only change the values of the fields as specified in the mask- and leave the others untouched. If a resource is passed in to- describe the updated values, the API ignores the values of all- fields not covered by the mask.-- If a repeated field is specified for an update operation, new values will- be appended to the existing repeated field in the target resource. Note that- a repeated field is only allowed in the last position of a `paths` string.-- If a sub-message is specified in the last position of the field mask for an- update operation, then new value will be merged into the existing sub-message- in the target resource.-- For example, given the target message:-- f {- b {- d: 1- x: 2- }- c: [1]+ For example, given the target message:++ f {+ b {+ d: 1+ x: 2}+ c: [1]+ }- And an update message:+ And an update message:- f {- b {- d: 10- }- c: [2]+ f {+ b {+ d: 10}+ c: [2]+ }- then if the field mask is:+ then if the field mask is:- paths: ["f.b", "f.c"]+ paths: ["f.b", "f.c"]- then the result will be:+ then the result will be:- f {- b {- d: 10- x: 2- }- c: [1, 2]+ f {+ b {+ d: 10+ x: 2}+ c: [1, 2]+ }- An implementation may provide options to override this default behavior for- repeated and message fields.+ An implementation may provide options to override this default behavior for+ repeated and message fields.- In order to reset a field's value to the default, the field must- be in the mask and set to the default value in the provided resource.- Hence, in order to reset all fields of a resource, provide a default- instance of the resource and set all fields in the mask, or do- not provide a mask as described below.+ In order to reset a field's value to the default, the field must+ be in the mask and set to the default value in the provided resource.+ Hence, in order to reset all fields of a resource, provide a default+ instance of the resource and set all fields in the mask, or do+ not provide a mask as described below.- If a field mask is not present on update, the operation applies to- all fields (as if a field mask of all fields has been specified).- Note that in the presence of schema evolution, this may mean that- fields the client does not know and has therefore not filled into- the request will be reset to their default. If this is unwanted- behavior, a specific service may require a client to always specify- a field mask, producing an error if not.+ If a field mask is not present on update, the operation applies to+ all fields (as if a field mask of all fields has been specified).+ Note that in the presence of schema evolution, this may mean that+ fields the client does not know and has therefore not filled into+ the request will be reset to their default. If this is unwanted+ behavior, a specific service may require a client to always specify+ a field mask, producing an error if not.- As with get operations, the location of the resource which- describes the updated values in the request message depends on the- operation kind. In any case, the effect of the field mask is- required to be honored by the API.+ As with get operations, the location of the resource which+ describes the updated values in the request message depends on the+ operation kind. In any case, the effect of the field mask is+ required to be honored by the API.- ## Considerations for HTTP REST+ ## Considerations for HTTP REST- The HTTP kind of an update operation which uses a field mask must- be set to PATCH instead of PUT in order to satisfy HTTP semantics- (PUT must only be used for full updates).+ The HTTP kind of an update operation which uses a field mask must+ be set to PATCH instead of PUT in order to satisfy HTTP semantics+ (PUT must only be used for full updates).- # JSON Encoding of Field Masks+ # JSON Encoding of Field Masks- In JSON, a field mask is encoded as a single string where paths are- separated by a comma. Fields name in each path are converted- to/from lower-camel naming conventions.+ In JSON, a field mask is encoded as a single string where paths are+ separated by a comma. Fields name in each path are converted+ to/from lower-camel naming conventions.- As an example, consider the following message declarations:+ As an example, consider the following message declarations:- message Profile {- User user = 1;- Photo photo = 2;- }- message User {- string display_name = 1;- string address = 2;- }+ message Profile {+ User user = 1;+ Photo photo = 2;+ }+ message User {+ string display_name = 1;+ string address = 2;+ }- In proto a field mask for `Profile` may look as such:+ In proto a field mask for `Profile` may look as such:- mask {- paths: "user.display_name"- paths: "photo"- }+ mask {+ paths: "user.display_name"+ paths: "photo"+ }- In JSON, the same mask is represented as below:+ In JSON, the same mask is represented as below:- {- mask: "user.displayName,photo"- }+ {+ mask: "user.displayName,photo"+ }- # Field Masks and Oneof Fields+ # Field Masks and Oneof Fields- Field masks treat fields in oneofs just as regular fields. Consider the- following message:+ Field masks treat fields in oneofs just as regular fields. Consider the+ following message:- message SampleMessage {- oneof test_oneof {- string name = 4;- SubMessage sub_message = 9;- }+ message SampleMessage {+ oneof test_oneof {+ string name = 4;+ SubMessage sub_message = 9;}+ }- The field mask can be:+ The field mask can be:- mask {- paths: "name"- }+ mask {+ paths: "name"+ }- Or:+ Or:- mask {- paths: "sub_message"- }+ mask {+ paths: "sub_message"+ }- Note that oneof type names ("test_oneof" in this case) cannot be used in- paths.+ Note that oneof type names ("test_oneof" in this case) cannot be used in+ paths.- ## Field Mask Verification+ ## Field Mask Verification- The implementation of any API method which has a FieldMask type field in the- request should verify the included field paths, and return an- `INVALID_ARGUMENT` error if any path is unmappable.+ The implementation of any API method which has a FieldMask type field in the+ request should verify the included field paths, and return an+ `INVALID_ARGUMENT` error if any path is unmappable.+ schema:+ type: stringrequestBody:description: |-The worksheet to update.@@ -12391,212 +11487,207 @@ paths:- name: updateMaskin: querydescription: |-- The list of fields to be updated.- Fields are specified relative to the worksheet organizer.- Only support update the following fields for now:- - `starred`- schema:- type: string- description: |-- `FieldMask` represents a set of symbolic field paths, for example:+ `FieldMask` represents a set of symbolic field paths, for example:- paths: "f.a"- paths: "f.b.d"+ paths: "f.a"+ paths: "f.b.d"- Here `f` represents a field in some root message, `a` and `b`- fields in the message found in `f`, and `d` a field found in the- message in `f.b`.+ Here `f` represents a field in some root message, `a` and `b`+ fields in the message found in `f`, and `d` a field found in the+ message in `f.b`.- Field masks are used to specify a subset of fields that should be- returned by a get operation or modified by an update operation.- Field masks also have a custom JSON encoding (see below).+ Field masks are used to specify a subset of fields that should be+ returned by a get operation or modified by an update operation.+ Field masks also have a custom JSON encoding (see below).- # Field Masks in Projections+ # Field Masks in Projections- When used in the context of a projection, a response message or- sub-message is filtered by the API to only contain those fields as- specified in the mask. For example, if the mask in the previous- example is applied to a response message as follows:+ When used in the context of a projection, a response message or+ sub-message is filtered by the API to only contain those fields as+ specified in the mask. For example, if the mask in the previous+ example is applied to a response message as follows:- f {- a : 22- b {- d : 1- x : 2- }- y : 13+ f {+ a : 22+ b {+ d : 1+ x : 2}- z: 8+ y : 13+ }+ z: 8- The result will not contain specific values for fields x,y and z- (their value will be set to the default, and omitted in proto text- output):+ The result will not contain specific values for fields x,y and z+ (their value will be set to the default, and omitted in proto text+ output):- f {- a : 22- b {- d : 1- }+ f {+ a : 22+ b {+ d : 1}+ }++ A repeated field is not allowed except at the last position of a+ paths string.- A repeated field is not allowed except at the last position of a- paths string.-- If a FieldMask object is not present in a get operation, the- operation applies to all fields (as if a FieldMask of all fields- had been specified).-- Note that a field mask does not necessarily apply to the- top-level response message. In case of a REST get operation, the- field mask applies directly to the response, but in case of a REST- list operation, the mask instead applies to each individual message- in the returned resource list. In case of a REST custom method,- other definitions may be used. Where the mask applies will be- clearly documented together with its declaration in the API. In- any case, the effect on the returned resource/resources is required- behavior for APIs.-- # Field Masks in Update Operations-- A field mask in update operations specifies which fields of the- targeted resource are going to be updated. The API is required- to only change the values of the fields as specified in the mask- and leave the others untouched. If a resource is passed in to- describe the updated values, the API ignores the values of all- fields not covered by the mask.-- If a repeated field is specified for an update operation, new values will- be appended to the existing repeated field in the target resource. Note that- a repeated field is only allowed in the last position of a `paths` string.-- If a sub-message is specified in the last position of the field mask for an- update operation, then new value will be merged into the existing sub-message- in the target resource.-- For example, given the target message:-- f {- b {- d: 1- x: 2- }- c: [1]+ If a FieldMask object is not present in a get operation, the+ operation applies to all fields (as if a FieldMask of all fields+ had been specified).++ Note that a field mask does not necessarily apply to the+ top-level response message. In case of a REST get operation, the+ field mask applies directly to the response, but in case of a REST+ list operation, the mask instead applies to each individual message+ in the returned resource list. In case of a REST custom method,+ other definitions may be used. Where the mask applies will be+ clearly documented together with its declaration in the API. In+ any case, the effect on the returned resource/resources is required+ behavior for APIs.++ # Field Masks in Update Operations++ A field mask in update operations specifies which fields of the+ targeted resource are going to be updated. The API is required+ to only change the values of the fields as specified in the mask+ and leave the others untouched. If a resource is passed in to+ describe the updated values, the API ignores the values of all+ fields not covered by the mask.++ If a repeated field is specified for an update operation, new values will+ be appended to the existing repeated field in the target resource. Note that+ a repeated field is only allowed in the last position of a `paths` string.++ If a sub-message is specified in the last position of the field mask for an+ update operation, then new value will be merged into the existing sub-message+ in the target resource.++ For example, given the target message:++ f {+ b {+ d: 1+ x: 2}+ c: [1]+ }- And an update message:+ And an update message:- f {- b {- d: 10- }- c: [2]+ f {+ b {+ d: 10}+ c: [2]+ }- then if the field mask is:+ then if the field mask is:- paths: ["f.b", "f.c"]+ paths: ["f.b", "f.c"]- then the result will be:+ then the result will be:- f {- b {- d: 10- x: 2- }- c: [1, 2]+ f {+ b {+ d: 10+ x: 2}+ c: [1, 2]+ }- An implementation may provide options to override this default behavior for- repeated and message fields.+ An implementation may provide options to override this default behavior for+ repeated and message fields.- In order to reset a field's value to the default, the field must- be in the mask and set to the default value in the provided resource.- Hence, in order to reset all fields of a resource, provide a default- instance of the resource and set all fields in the mask, or do- not provide a mask as described below.+ In order to reset a field's value to the default, the field must+ be in the mask and set to the default value in the provided resource.+ Hence, in order to reset all fields of a resource, provide a default+ instance of the resource and set all fields in the mask, or do+ not provide a mask as described below.- If a field mask is not present on update, the operation applies to- all fields (as if a field mask of all fields has been specified).- Note that in the presence of schema evolution, this may mean that- fields the client does not know and has therefore not filled into- the request will be reset to their default. If this is unwanted- behavior, a specific service may require a client to always specify- a field mask, producing an error if not.+ If a field mask is not present on update, the operation applies to+ all fields (as if a field mask of all fields has been specified).+ Note that in the presence of schema evolution, this may mean that+ fields the client does not know and has therefore not filled into+ the request will be reset to their default. If this is unwanted+ behavior, a specific service may require a client to always specify+ a field mask, producing an error if not.- As with get operations, the location of the resource which- describes the updated values in the request message depends on the- operation kind. In any case, the effect of the field mask is- required to be honored by the API.+ As with get operations, the location of the resource which+ describes the updated values in the request message depends on the+ operation kind. In any case, the effect of the field mask is+ required to be honored by the API.- ## Considerations for HTTP REST+ ## Considerations for HTTP REST- The HTTP kind of an update operation which uses a field mask must- be set to PATCH instead of PUT in order to satisfy HTTP semantics- (PUT must only be used for full updates).+ The HTTP kind of an update operation which uses a field mask must+ be set to PATCH instead of PUT in order to satisfy HTTP semantics+ (PUT must only be used for full updates).- # JSON Encoding of Field Masks+ # JSON Encoding of Field Masks- In JSON, a field mask is encoded as a single string where paths are- separated by a comma. Fields name in each path are converted- to/from lower-camel naming conventions.+ In JSON, a field mask is encoded as a single string where paths are+ separated by a comma. Fields name in each path are converted+ to/from lower-camel naming conventions.- As an example, consider the following message declarations:+ As an example, consider the following message declarations:- message Profile {- User user = 1;- Photo photo = 2;- }- message User {- string display_name = 1;- string address = 2;- }+ message Profile {+ User user = 1;+ Photo photo = 2;+ }+ message User {+ string display_name = 1;+ string address = 2;+ }- In proto a field mask for `Profile` may look as such:+ In proto a field mask for `Profile` may look as such:- mask {- paths: "user.display_name"- paths: "photo"- }+ mask {+ paths: "user.display_name"+ paths: "photo"+ }- In JSON, the same mask is represented as below:+ In JSON, the same mask is represented as below:- {- mask: "user.displayName,photo"- }+ {+ mask: "user.displayName,photo"+ }- # Field Masks and Oneof Fields+ # Field Masks and Oneof Fields- Field masks treat fields in oneofs just as regular fields. Consider the- following message:+ Field masks treat fields in oneofs just as regular fields. Consider the+ following message:- message SampleMessage {- oneof test_oneof {- string name = 4;- SubMessage sub_message = 9;- }+ message SampleMessage {+ oneof test_oneof {+ string name = 4;+ SubMessage sub_message = 9;}+ }- The field mask can be:+ The field mask can be:- mask {- paths: "name"- }+ mask {+ paths: "name"+ }- Or:+ Or:- mask {- paths: "sub_message"- }+ mask {+ paths: "sub_message"+ }- Note that oneof type names ("test_oneof" in this case) cannot be used in- paths.+ Note that oneof type names ("test_oneof" in this case) cannot be used in+ paths.- ## Field Mask Verification+ ## Field Mask Verification- The implementation of any API method which has a FieldMask type field in the- request should verify the included field paths, and return an- `INVALID_ARGUMENT` error if any path is unmappable.+ The implementation of any API method which has a FieldMask type field in the+ request should verify the included field paths, and return an+ `INVALID_ARGUMENT` error if any path is unmappable.+ schema:+ type: string- name: allowMissingin: querydescription: |-@@ -12605,9 +11696,6 @@ paths:schema:type: booleantitle: allow_missing- description: |-- If set to true, and the worksheet organizer is not found, a new worksheet organizer will be created.- In this situation, `update_mask` is ignored.requestBody:description: |-The organizer to update.@@ -12891,9 +11979,6 @@ paths:items:type: stringtitle: names- description: |-- The names of projects to retrieve.- Format: projects/{project}responses:"200":description: Success@@ -13047,209 +12132,208 @@ paths:type: string- name: updateMaskin: query- description: The list of fields to update.- schema:- type: string- description: |-- `FieldMask` represents a set of symbolic field paths, for example:+ description: |-+ `FieldMask` represents a set of symbolic field paths, for example:- paths: "f.a"- paths: "f.b.d"+ paths: "f.a"+ paths: "f.b.d"- Here `f` represents a field in some root message, `a` and `b`- fields in the message found in `f`, and `d` a field found in the- message in `f.b`.+ Here `f` represents a field in some root message, `a` and `b`+ fields in the message found in `f`, and `d` a field found in the+ message in `f.b`.- Field masks are used to specify a subset of fields that should be- returned by a get operation or modified by an update operation.- Field masks also have a custom JSON encoding (see below).+ Field masks are used to specify a subset of fields that should be+ returned by a get operation or modified by an update operation.+ Field masks also have a custom JSON encoding (see below).- # Field Masks in Projections+ # Field Masks in Projections- When used in the context of a projection, a response message or- sub-message is filtered by the API to only contain those fields as- specified in the mask. For example, if the mask in the previous- example is applied to a response message as follows:+ When used in the context of a projection, a response message or+ sub-message is filtered by the API to only contain those fields as+ specified in the mask. For example, if the mask in the previous+ example is applied to a response message as follows:- f {- a : 22- b {- d : 1- x : 2- }- y : 13+ f {+ a : 22+ b {+ d : 1+ x : 2}- z: 8+ y : 13+ }+ z: 8- The result will not contain specific values for fields x,y and z- (their value will be set to the default, and omitted in proto text- output):+ The result will not contain specific values for fields x,y and z+ (their value will be set to the default, and omitted in proto text+ output):- f {- a : 22- b {- d : 1- }+ f {+ a : 22+ b {+ d : 1}+ }++ A repeated field is not allowed except at the last position of a+ paths string.++ If a FieldMask object is not present in a get operation, the+ operation applies to all fields (as if a FieldMask of all fields+ had been specified).++ Note that a field mask does not necessarily apply to the+ top-level response message. In case of a REST get operation, the+ field mask applies directly to the response, but in case of a REST+ list operation, the mask instead applies to each individual message+ in the returned resource list. In case of a REST custom method,+ other definitions may be used. Where the mask applies will be+ clearly documented together with its declaration in the API. In+ any case, the effect on the returned resource/resources is required+ behavior for APIs.++ # Field Masks in Update Operations++ A field mask in update operations specifies which fields of the+ targeted resource are going to be updated. The API is required+ to only change the values of the fields as specified in the mask+ and leave the others untouched. If a resource is passed in to+ describe the updated values, the API ignores the values of all+ fields not covered by the mask.- A repeated field is not allowed except at the last position of a- paths string.-- If a FieldMask object is not present in a get operation, the- operation applies to all fields (as if a FieldMask of all fields- had been specified).-- Note that a field mask does not necessarily apply to the- top-level response message. In case of a REST get operation, the- field mask applies directly to the response, but in case of a REST- list operation, the mask instead applies to each individual message- in the returned resource list. In case of a REST custom method,- other definitions may be used. Where the mask applies will be- clearly documented together with its declaration in the API. In- any case, the effect on the returned resource/resources is required- behavior for APIs.-- # Field Masks in Update Operations-- A field mask in update operations specifies which fields of the- targeted resource are going to be updated. The API is required- to only change the values of the fields as specified in the mask- and leave the others untouched. If a resource is passed in to- describe the updated values, the API ignores the values of all- fields not covered by the mask.-- If a repeated field is specified for an update operation, new values will- be appended to the existing repeated field in the target resource. Note that- a repeated field is only allowed in the last position of a `paths` string.-- If a sub-message is specified in the last position of the field mask for an- update operation, then new value will be merged into the existing sub-message- in the target resource.-- For example, given the target message:-- f {- b {- d: 1- x: 2- }- c: [1]+ If a repeated field is specified for an update operation, new values will+ be appended to the existing repeated field in the target resource. Note that+ a repeated field is only allowed in the last position of a `paths` string.++ If a sub-message is specified in the last position of the field mask for an+ update operation, then new value will be merged into the existing sub-message+ in the target resource.++ For example, given the target message:++ f {+ b {+ d: 1+ x: 2}+ c: [1]+ }- And an update message:+ And an update message:- f {- b {- d: 10- }- c: [2]+ f {+ b {+ d: 10}+ c: [2]+ }- then if the field mask is:+ then if the field mask is:- paths: ["f.b", "f.c"]+ paths: ["f.b", "f.c"]- then the result will be:+ then the result will be:- f {- b {- d: 10- x: 2- }- c: [1, 2]+ f {+ b {+ d: 10+ x: 2}+ c: [1, 2]+ }- An implementation may provide options to override this default behavior for- repeated and message fields.+ An implementation may provide options to override this default behavior for+ repeated and message fields.- In order to reset a field's value to the default, the field must- be in the mask and set to the default value in the provided resource.- Hence, in order to reset all fields of a resource, provide a default- instance of the resource and set all fields in the mask, or do- not provide a mask as described below.+ In order to reset a field's value to the default, the field must+ be in the mask and set to the default value in the provided resource.+ Hence, in order to reset all fields of a resource, provide a default+ instance of the resource and set all fields in the mask, or do+ not provide a mask as described below.- If a field mask is not present on update, the operation applies to- all fields (as if a field mask of all fields has been specified).- Note that in the presence of schema evolution, this may mean that- fields the client does not know and has therefore not filled into- the request will be reset to their default. If this is unwanted- behavior, a specific service may require a client to always specify- a field mask, producing an error if not.+ If a field mask is not present on update, the operation applies to+ all fields (as if a field mask of all fields has been specified).+ Note that in the presence of schema evolution, this may mean that+ fields the client does not know and has therefore not filled into+ the request will be reset to their default. If this is unwanted+ behavior, a specific service may require a client to always specify+ a field mask, producing an error if not.- As with get operations, the location of the resource which- describes the updated values in the request message depends on the- operation kind. In any case, the effect of the field mask is- required to be honored by the API.+ As with get operations, the location of the resource which+ describes the updated values in the request message depends on the+ operation kind. In any case, the effect of the field mask is+ required to be honored by the API.- ## Considerations for HTTP REST+ ## Considerations for HTTP REST- The HTTP kind of an update operation which uses a field mask must- be set to PATCH instead of PUT in order to satisfy HTTP semantics- (PUT must only be used for full updates).+ The HTTP kind of an update operation which uses a field mask must+ be set to PATCH instead of PUT in order to satisfy HTTP semantics+ (PUT must only be used for full updates).- # JSON Encoding of Field Masks+ # JSON Encoding of Field Masks- In JSON, a field mask is encoded as a single string where paths are- separated by a comma. Fields name in each path are converted- to/from lower-camel naming conventions.+ In JSON, a field mask is encoded as a single string where paths are+ separated by a comma. Fields name in each path are converted+ to/from lower-camel naming conventions.- As an example, consider the following message declarations:+ As an example, consider the following message declarations:- message Profile {- User user = 1;- Photo photo = 2;- }- message User {- string display_name = 1;- string address = 2;- }+ message Profile {+ User user = 1;+ Photo photo = 2;+ }+ message User {+ string display_name = 1;+ string address = 2;+ }- In proto a field mask for `Profile` may look as such:+ In proto a field mask for `Profile` may look as such:- mask {- paths: "user.display_name"- paths: "photo"- }+ mask {+ paths: "user.display_name"+ paths: "photo"+ }- In JSON, the same mask is represented as below:+ In JSON, the same mask is represented as below:- {- mask: "user.displayName,photo"- }+ {+ mask: "user.displayName,photo"+ }- # Field Masks and Oneof Fields+ # Field Masks and Oneof Fields- Field masks treat fields in oneofs just as regular fields. Consider the- following message:+ Field masks treat fields in oneofs just as regular fields. Consider the+ following message:- message SampleMessage {- oneof test_oneof {- string name = 4;- SubMessage sub_message = 9;- }+ message SampleMessage {+ oneof test_oneof {+ string name = 4;+ SubMessage sub_message = 9;}+ }- The field mask can be:+ The field mask can be:- mask {- paths: "name"- }+ mask {+ paths: "name"+ }- Or:+ Or:- mask {- paths: "sub_message"- }+ mask {+ paths: "sub_message"+ }- Note that oneof type names ("test_oneof" in this case) cannot be used in- paths.+ Note that oneof type names ("test_oneof" in this case) cannot be used in+ paths.- ## Field Mask Verification+ ## Field Mask Verification- The implementation of any API method which has a FieldMask type field in the- request should verify the included field paths, and return an- `INVALID_ARGUMENT` error if any path is unmappable.+ The implementation of any API method which has a FieldMask type field in the+ request should verify the included field paths, and return an+ `INVALID_ARGUMENT` error if any path is unmappable.+ schema:+ type: string- name: allowMissingin: querydescription: |-@@ -13258,9 +12342,6 @@ paths:schema:type: booleantitle: allow_missing- description: |-- If set to true, and the config is not found, a new config will be created.- In this situation, `update_mask` is ignored.requestBody:description: |-The SQL review config to update.@@ -13319,12 +12400,6 @@ paths:schema:type: stringtitle: role_id- description: |-- The ID to use for the role, which will become the final component- of the role's resource name.-- This value should be 4-63 characters, and valid characters- are /[a-z][A-Z][0-9]/.requestBody:description: The role to create.content:@@ -13403,209 +12478,208 @@ paths:type: string- name: updateMaskin: query- description: The list of fields to update.- schema:- type: string- description: |-- `FieldMask` represents a set of symbolic field paths, for example:+ description: |-+ `FieldMask` represents a set of symbolic field paths, for example:- paths: "f.a"- paths: "f.b.d"+ paths: "f.a"+ paths: "f.b.d"- Here `f` represents a field in some root message, `a` and `b`- fields in the message found in `f`, and `d` a field found in the- message in `f.b`.+ Here `f` represents a field in some root message, `a` and `b`+ fields in the message found in `f`, and `d` a field found in the+ message in `f.b`.- Field masks are used to specify a subset of fields that should be- returned by a get operation or modified by an update operation.- Field masks also have a custom JSON encoding (see below).+ Field masks are used to specify a subset of fields that should be+ returned by a get operation or modified by an update operation.+ Field masks also have a custom JSON encoding (see below).- # Field Masks in Projections+ # Field Masks in Projections- When used in the context of a projection, a response message or- sub-message is filtered by the API to only contain those fields as- specified in the mask. For example, if the mask in the previous- example is applied to a response message as follows:+ When used in the context of a projection, a response message or+ sub-message is filtered by the API to only contain those fields as+ specified in the mask. For example, if the mask in the previous+ example is applied to a response message as follows:- f {- a : 22- b {- d : 1- x : 2- }- y : 13+ f {+ a : 22+ b {+ d : 1+ x : 2}- z: 8+ y : 13+ }+ z: 8- The result will not contain specific values for fields x,y and z- (their value will be set to the default, and omitted in proto text- output):+ The result will not contain specific values for fields x,y and z+ (their value will be set to the default, and omitted in proto text+ output):- f {- a : 22- b {- d : 1- }+ f {+ a : 22+ b {+ d : 1}+ }- A repeated field is not allowed except at the last position of a- paths string.-- If a FieldMask object is not present in a get operation, the- operation applies to all fields (as if a FieldMask of all fields- had been specified).-- Note that a field mask does not necessarily apply to the- top-level response message. In case of a REST get operation, the- field mask applies directly to the response, but in case of a REST- list operation, the mask instead applies to each individual message- in the returned resource list. In case of a REST custom method,- other definitions may be used. Where the mask applies will be- clearly documented together with its declaration in the API. In- any case, the effect on the returned resource/resources is required- behavior for APIs.-- # Field Masks in Update Operations-- A field mask in update operations specifies which fields of the- targeted resource are going to be updated. The API is required- to only change the values of the fields as specified in the mask- and leave the others untouched. If a resource is passed in to- describe the updated values, the API ignores the values of all- fields not covered by the mask.-- If a repeated field is specified for an update operation, new values will- be appended to the existing repeated field in the target resource. Note that- a repeated field is only allowed in the last position of a `paths` string.-- If a sub-message is specified in the last position of the field mask for an- update operation, then new value will be merged into the existing sub-message- in the target resource.-- For example, given the target message:-- f {- b {- d: 1- x: 2- }- c: [1]+ A repeated field is not allowed except at the last position of a+ paths string.++ If a FieldMask object is not present in a get operation, the+ operation applies to all fields (as if a FieldMask of all fields+ had been specified).++ Note that a field mask does not necessarily apply to the+ top-level response message. In case of a REST get operation, the+ field mask applies directly to the response, but in case of a REST+ list operation, the mask instead applies to each individual message+ in the returned resource list. In case of a REST custom method,+ other definitions may be used. Where the mask applies will be+ clearly documented together with its declaration in the API. In+ any case, the effect on the returned resource/resources is required+ behavior for APIs.++ # Field Masks in Update Operations++ A field mask in update operations specifies which fields of the+ targeted resource are going to be updated. The API is required+ to only change the values of the fields as specified in the mask+ and leave the others untouched. If a resource is passed in to+ describe the updated values, the API ignores the values of all+ fields not covered by the mask.++ If a repeated field is specified for an update operation, new values will+ be appended to the existing repeated field in the target resource. Note that+ a repeated field is only allowed in the last position of a `paths` string.++ If a sub-message is specified in the last position of the field mask for an+ update operation, then new value will be merged into the existing sub-message+ in the target resource.++ For example, given the target message:++ f {+ b {+ d: 1+ x: 2}+ c: [1]+ }- And an update message:+ And an update message:- f {- b {- d: 10- }- c: [2]+ f {+ b {+ d: 10}+ c: [2]+ }- then if the field mask is:+ then if the field mask is:- paths: ["f.b", "f.c"]+ paths: ["f.b", "f.c"]- then the result will be:+ then the result will be:- f {- b {- d: 10- x: 2- }- c: [1, 2]+ f {+ b {+ d: 10+ x: 2}+ c: [1, 2]+ }- An implementation may provide options to override this default behavior for- repeated and message fields.+ An implementation may provide options to override this default behavior for+ repeated and message fields.- In order to reset a field's value to the default, the field must- be in the mask and set to the default value in the provided resource.- Hence, in order to reset all fields of a resource, provide a default- instance of the resource and set all fields in the mask, or do- not provide a mask as described below.+ In order to reset a field's value to the default, the field must+ be in the mask and set to the default value in the provided resource.+ Hence, in order to reset all fields of a resource, provide a default+ instance of the resource and set all fields in the mask, or do+ not provide a mask as described below.- If a field mask is not present on update, the operation applies to- all fields (as if a field mask of all fields has been specified).- Note that in the presence of schema evolution, this may mean that- fields the client does not know and has therefore not filled into- the request will be reset to their default. If this is unwanted- behavior, a specific service may require a client to always specify- a field mask, producing an error if not.+ If a field mask is not present on update, the operation applies to+ all fields (as if a field mask of all fields has been specified).+ Note that in the presence of schema evolution, this may mean that+ fields the client does not know and has therefore not filled into+ the request will be reset to their default. If this is unwanted+ behavior, a specific service may require a client to always specify+ a field mask, producing an error if not.- As with get operations, the location of the resource which- describes the updated values in the request message depends on the- operation kind. In any case, the effect of the field mask is- required to be honored by the API.+ As with get operations, the location of the resource which+ describes the updated values in the request message depends on the+ operation kind. In any case, the effect of the field mask is+ required to be honored by the API.- ## Considerations for HTTP REST+ ## Considerations for HTTP REST- The HTTP kind of an update operation which uses a field mask must- be set to PATCH instead of PUT in order to satisfy HTTP semantics- (PUT must only be used for full updates).+ The HTTP kind of an update operation which uses a field mask must+ be set to PATCH instead of PUT in order to satisfy HTTP semantics+ (PUT must only be used for full updates).- # JSON Encoding of Field Masks+ # JSON Encoding of Field Masks- In JSON, a field mask is encoded as a single string where paths are- separated by a comma. Fields name in each path are converted- to/from lower-camel naming conventions.+ In JSON, a field mask is encoded as a single string where paths are+ separated by a comma. Fields name in each path are converted+ to/from lower-camel naming conventions.- As an example, consider the following message declarations:+ As an example, consider the following message declarations:- message Profile {- User user = 1;- Photo photo = 2;- }- message User {- string display_name = 1;- string address = 2;- }+ message Profile {+ User user = 1;+ Photo photo = 2;+ }+ message User {+ string display_name = 1;+ string address = 2;+ }- In proto a field mask for `Profile` may look as such:+ In proto a field mask for `Profile` may look as such:- mask {- paths: "user.display_name"- paths: "photo"- }+ mask {+ paths: "user.display_name"+ paths: "photo"+ }- In JSON, the same mask is represented as below:+ In JSON, the same mask is represented as below:- {- mask: "user.displayName,photo"- }+ {+ mask: "user.displayName,photo"+ }- # Field Masks and Oneof Fields+ # Field Masks and Oneof Fields- Field masks treat fields in oneofs just as regular fields. Consider the- following message:+ Field masks treat fields in oneofs just as regular fields. Consider the+ following message:- message SampleMessage {- oneof test_oneof {- string name = 4;- SubMessage sub_message = 9;- }+ message SampleMessage {+ oneof test_oneof {+ string name = 4;+ SubMessage sub_message = 9;}+ }- The field mask can be:+ The field mask can be:- mask {- paths: "name"- }+ mask {+ paths: "name"+ }- Or:+ Or:- mask {- paths: "sub_message"- }+ mask {+ paths: "sub_message"+ }- Note that oneof type names ("test_oneof" in this case) cannot be used in- paths.+ Note that oneof type names ("test_oneof" in this case) cannot be used in+ paths.- ## Field Mask Verification+ ## Field Mask Verification- The implementation of any API method which has a FieldMask type field in the- request should verify the included field paths, and return an- `INVALID_ARGUMENT` error if any path is unmappable.+ The implementation of any API method which has a FieldMask type field in the+ request should verify the included field paths, and return an+ `INVALID_ARGUMENT` error if any path is unmappable.+ schema:+ type: string- name: allowMissingin: querydescription: |-@@ -13614,9 +12688,6 @@ paths:schema:type: booleantitle: allow_missing- description: |-- If set to true, and the role is not found, a new role will be created.- In this situation, `update_mask` is ignored.requestBody:description: The role to update.content:@@ -13717,210 +12788,207 @@ paths:- name: updateMaskin: querydescription: |-- The list of fields to update.- Supported fields: title, service_key (triggers key rotation)- schema:- type: string- description: |-- `FieldMask` represents a set of symbolic field paths, for example:+ `FieldMask` represents a set of symbolic field paths, for example:- paths: "f.a"- paths: "f.b.d"+ paths: "f.a"+ paths: "f.b.d"- Here `f` represents a field in some root message, `a` and `b`- fields in the message found in `f`, and `d` a field found in the- message in `f.b`.+ Here `f` represents a field in some root message, `a` and `b`+ fields in the message found in `f`, and `d` a field found in the+ message in `f.b`.- Field masks are used to specify a subset of fields that should be- returned by a get operation or modified by an update operation.- Field masks also have a custom JSON encoding (see below).+ Field masks are used to specify a subset of fields that should be+ returned by a get operation or modified by an update operation.+ Field masks also have a custom JSON encoding (see below).- # Field Masks in Projections+ # Field Masks in Projections- When used in the context of a projection, a response message or- sub-message is filtered by the API to only contain those fields as- specified in the mask. For example, if the mask in the previous- example is applied to a response message as follows:+ When used in the context of a projection, a response message or+ sub-message is filtered by the API to only contain those fields as+ specified in the mask. For example, if the mask in the previous+ example is applied to a response message as follows:- f {- a : 22- b {- d : 1- x : 2- }- y : 13+ f {+ a : 22+ b {+ d : 1+ x : 2}- z: 8+ y : 13+ }+ z: 8- The result will not contain specific values for fields x,y and z- (their value will be set to the default, and omitted in proto text- output):+ The result will not contain specific values for fields x,y and z+ (their value will be set to the default, and omitted in proto text+ output):- f {- a : 22- b {- d : 1- }+ f {+ a : 22+ b {+ d : 1}+ }++ A repeated field is not allowed except at the last position of a+ paths string.++ If a FieldMask object is not present in a get operation, the+ operation applies to all fields (as if a FieldMask of all fields+ had been specified).++ Note that a field mask does not necessarily apply to the+ top-level response message. In case of a REST get operation, the+ field mask applies directly to the response, but in case of a REST+ list operation, the mask instead applies to each individual message+ in the returned resource list. In case of a REST custom method,+ other definitions may be used. Where the mask applies will be+ clearly documented together with its declaration in the API. In+ any case, the effect on the returned resource/resources is required+ behavior for APIs.++ # Field Masks in Update Operations- A repeated field is not allowed except at the last position of a- paths string.-- If a FieldMask object is not present in a get operation, the- operation applies to all fields (as if a FieldMask of all fields- had been specified).-- Note that a field mask does not necessarily apply to the- top-level response message. In case of a REST get operation, the- field mask applies directly to the response, but in case of a REST- list operation, the mask instead applies to each individual message- in the returned resource list. In case of a REST custom method,- other definitions may be used. Where the mask applies will be- clearly documented together with its declaration in the API. In- any case, the effect on the returned resource/resources is required- behavior for APIs.-- # Field Masks in Update Operations-- A field mask in update operations specifies which fields of the- targeted resource are going to be updated. The API is required- to only change the values of the fields as specified in the mask- and leave the others untouched. If a resource is passed in to- describe the updated values, the API ignores the values of all- fields not covered by the mask.-- If a repeated field is specified for an update operation, new values will- be appended to the existing repeated field in the target resource. Note that- a repeated field is only allowed in the last position of a `paths` string.-- If a sub-message is specified in the last position of the field mask for an- update operation, then new value will be merged into the existing sub-message- in the target resource.-- For example, given the target message:-- f {- b {- d: 1- x: 2- }- c: [1]+ A field mask in update operations specifies which fields of the+ targeted resource are going to be updated. The API is required+ to only change the values of the fields as specified in the mask+ and leave the others untouched. If a resource is passed in to+ describe the updated values, the API ignores the values of all+ fields not covered by the mask.++ If a repeated field is specified for an update operation, new values will+ be appended to the existing repeated field in the target resource. Note that+ a repeated field is only allowed in the last position of a `paths` string.++ If a sub-message is specified in the last position of the field mask for an+ update operation, then new value will be merged into the existing sub-message+ in the target resource.++ For example, given the target message:++ f {+ b {+ d: 1+ x: 2}+ c: [1]+ }- And an update message:+ And an update message:- f {- b {- d: 10- }- c: [2]+ f {+ b {+ d: 10}+ c: [2]+ }- then if the field mask is:+ then if the field mask is:- paths: ["f.b", "f.c"]+ paths: ["f.b", "f.c"]- then the result will be:+ then the result will be:- f {- b {- d: 10- x: 2- }- c: [1, 2]+ f {+ b {+ d: 10+ x: 2}+ c: [1, 2]+ }- An implementation may provide options to override this default behavior for- repeated and message fields.+ An implementation may provide options to override this default behavior for+ repeated and message fields.- In order to reset a field's value to the default, the field must- be in the mask and set to the default value in the provided resource.- Hence, in order to reset all fields of a resource, provide a default- instance of the resource and set all fields in the mask, or do- not provide a mask as described below.+ In order to reset a field's value to the default, the field must+ be in the mask and set to the default value in the provided resource.+ Hence, in order to reset all fields of a resource, provide a default+ instance of the resource and set all fields in the mask, or do+ not provide a mask as described below.- If a field mask is not present on update, the operation applies to- all fields (as if a field mask of all fields has been specified).- Note that in the presence of schema evolution, this may mean that- fields the client does not know and has therefore not filled into- the request will be reset to their default. If this is unwanted- behavior, a specific service may require a client to always specify- a field mask, producing an error if not.+ If a field mask is not present on update, the operation applies to+ all fields (as if a field mask of all fields has been specified).+ Note that in the presence of schema evolution, this may mean that+ fields the client does not know and has therefore not filled into+ the request will be reset to their default. If this is unwanted+ behavior, a specific service may require a client to always specify+ a field mask, producing an error if not.- As with get operations, the location of the resource which- describes the updated values in the request message depends on the- operation kind. In any case, the effect of the field mask is- required to be honored by the API.+ As with get operations, the location of the resource which+ describes the updated values in the request message depends on the+ operation kind. In any case, the effect of the field mask is+ required to be honored by the API.- ## Considerations for HTTP REST+ ## Considerations for HTTP REST- The HTTP kind of an update operation which uses a field mask must- be set to PATCH instead of PUT in order to satisfy HTTP semantics- (PUT must only be used for full updates).+ The HTTP kind of an update operation which uses a field mask must+ be set to PATCH instead of PUT in order to satisfy HTTP semantics+ (PUT must only be used for full updates).- # JSON Encoding of Field Masks+ # JSON Encoding of Field Masks- In JSON, a field mask is encoded as a single string where paths are- separated by a comma. Fields name in each path are converted- to/from lower-camel naming conventions.+ In JSON, a field mask is encoded as a single string where paths are+ separated by a comma. Fields name in each path are converted+ to/from lower-camel naming conventions.- As an example, consider the following message declarations:+ As an example, consider the following message declarations:- message Profile {- User user = 1;- Photo photo = 2;- }- message User {- string display_name = 1;- string address = 2;- }+ message Profile {+ User user = 1;+ Photo photo = 2;+ }+ message User {+ string display_name = 1;+ string address = 2;+ }- In proto a field mask for `Profile` may look as such:+ In proto a field mask for `Profile` may look as such:- mask {- paths: "user.display_name"- paths: "photo"- }+ mask {+ paths: "user.display_name"+ paths: "photo"+ }- In JSON, the same mask is represented as below:+ In JSON, the same mask is represented as below:- {- mask: "user.displayName,photo"- }+ {+ mask: "user.displayName,photo"+ }- # Field Masks and Oneof Fields+ # Field Masks and Oneof Fields- Field masks treat fields in oneofs just as regular fields. Consider the- following message:+ Field masks treat fields in oneofs just as regular fields. Consider the+ following message:- message SampleMessage {- oneof test_oneof {- string name = 4;- SubMessage sub_message = 9;- }+ message SampleMessage {+ oneof test_oneof {+ string name = 4;+ SubMessage sub_message = 9;}+ }- The field mask can be:+ The field mask can be:- mask {- paths: "name"- }+ mask {+ paths: "name"+ }- Or:+ Or:- mask {- paths: "sub_message"- }+ mask {+ paths: "sub_message"+ }- Note that oneof type names ("test_oneof" in this case) cannot be used in- paths.+ Note that oneof type names ("test_oneof" in this case) cannot be used in+ paths.- ## Field Mask Verification+ ## Field Mask Verification- The implementation of any API method which has a FieldMask type field in the- request should verify the included field paths, and return an- `INVALID_ARGUMENT` error if any path is unmappable.+ The implementation of any API method which has a FieldMask type field in the+ request should verify the included field paths, and return an+ `INVALID_ARGUMENT` error if any path is unmappable.+ schema:+ type: stringrequestBody:description: |-The service account to update.@@ -14029,9 +13097,6 @@ paths:schema:type: booleantitle: validate_only- description: |-- validate_only is a flag to indicate whether to validate the setting value,- server would not persist the setting value if it is true.- name: allowMissingin: queryschema:@@ -14039,208 +13104,208 @@ paths:title: allow_missing- name: updateMaskin: query- schema:- type: string- description: |-- `FieldMask` represents a set of symbolic field paths, for example:+ description: |-+ `FieldMask` represents a set of symbolic field paths, for example:- paths: "f.a"- paths: "f.b.d"+ paths: "f.a"+ paths: "f.b.d"- Here `f` represents a field in some root message, `a` and `b`- fields in the message found in `f`, and `d` a field found in the- message in `f.b`.+ Here `f` represents a field in some root message, `a` and `b`+ fields in the message found in `f`, and `d` a field found in the+ message in `f.b`.- Field masks are used to specify a subset of fields that should be- returned by a get operation or modified by an update operation.- Field masks also have a custom JSON encoding (see below).+ Field masks are used to specify a subset of fields that should be+ returned by a get operation or modified by an update operation.+ Field masks also have a custom JSON encoding (see below).- # Field Masks in Projections+ # Field Masks in Projections- When used in the context of a projection, a response message or- sub-message is filtered by the API to only contain those fields as- specified in the mask. For example, if the mask in the previous- example is applied to a response message as follows:+ When used in the context of a projection, a response message or+ sub-message is filtered by the API to only contain those fields as+ specified in the mask. For example, if the mask in the previous+ example is applied to a response message as follows:- f {- a : 22- b {- d : 1- x : 2- }- y : 13+ f {+ a : 22+ b {+ d : 1+ x : 2}- z: 8+ y : 13+ }+ z: 8- The result will not contain specific values for fields x,y and z- (their value will be set to the default, and omitted in proto text- output):+ The result will not contain specific values for fields x,y and z+ (their value will be set to the default, and omitted in proto text+ output):- f {- a : 22- b {- d : 1- }+ f {+ a : 22+ b {+ d : 1}+ }++ A repeated field is not allowed except at the last position of a+ paths string.- A repeated field is not allowed except at the last position of a- paths string.-- If a FieldMask object is not present in a get operation, the- operation applies to all fields (as if a FieldMask of all fields- had been specified).-- Note that a field mask does not necessarily apply to the- top-level response message. In case of a REST get operation, the- field mask applies directly to the response, but in case of a REST- list operation, the mask instead applies to each individual message- in the returned resource list. In case of a REST custom method,- other definitions may be used. Where the mask applies will be- clearly documented together with its declaration in the API. In- any case, the effect on the returned resource/resources is required- behavior for APIs.-- # Field Masks in Update Operations-- A field mask in update operations specifies which fields of the- targeted resource are going to be updated. The API is required- to only change the values of the fields as specified in the mask- and leave the others untouched. If a resource is passed in to- describe the updated values, the API ignores the values of all- fields not covered by the mask.-- If a repeated field is specified for an update operation, new values will- be appended to the existing repeated field in the target resource. Note that- a repeated field is only allowed in the last position of a `paths` string.-- If a sub-message is specified in the last position of the field mask for an- update operation, then new value will be merged into the existing sub-message- in the target resource.-- For example, given the target message:-- f {- b {- d: 1- x: 2- }- c: [1]+ If a FieldMask object is not present in a get operation, the+ operation applies to all fields (as if a FieldMask of all fields+ had been specified).++ Note that a field mask does not necessarily apply to the+ top-level response message. In case of a REST get operation, the+ field mask applies directly to the response, but in case of a REST+ list operation, the mask instead applies to each individual message+ in the returned resource list. In case of a REST custom method,+ other definitions may be used. Where the mask applies will be+ clearly documented together with its declaration in the API. In+ any case, the effect on the returned resource/resources is required+ behavior for APIs.++ # Field Masks in Update Operations++ A field mask in update operations specifies which fields of the+ targeted resource are going to be updated. The API is required+ to only change the values of the fields as specified in the mask+ and leave the others untouched. If a resource is passed in to+ describe the updated values, the API ignores the values of all+ fields not covered by the mask.++ If a repeated field is specified for an update operation, new values will+ be appended to the existing repeated field in the target resource. Note that+ a repeated field is only allowed in the last position of a `paths` string.++ If a sub-message is specified in the last position of the field mask for an+ update operation, then new value will be merged into the existing sub-message+ in the target resource.++ For example, given the target message:++ f {+ b {+ d: 1+ x: 2}+ c: [1]+ }- And an update message:+ And an update message:- f {- b {- d: 10- }- c: [2]+ f {+ b {+ d: 10}+ c: [2]+ }- then if the field mask is:+ then if the field mask is:- paths: ["f.b", "f.c"]+ paths: ["f.b", "f.c"]- then the result will be:+ then the result will be:- f {- b {- d: 10- x: 2- }- c: [1, 2]+ f {+ b {+ d: 10+ x: 2}+ c: [1, 2]+ }- An implementation may provide options to override this default behavior for- repeated and message fields.+ An implementation may provide options to override this default behavior for+ repeated and message fields.- In order to reset a field's value to the default, the field must- be in the mask and set to the default value in the provided resource.- Hence, in order to reset all fields of a resource, provide a default- instance of the resource and set all fields in the mask, or do- not provide a mask as described below.+ In order to reset a field's value to the default, the field must+ be in the mask and set to the default value in the provided resource.+ Hence, in order to reset all fields of a resource, provide a default+ instance of the resource and set all fields in the mask, or do+ not provide a mask as described below.- If a field mask is not present on update, the operation applies to- all fields (as if a field mask of all fields has been specified).- Note that in the presence of schema evolution, this may mean that- fields the client does not know and has therefore not filled into- the request will be reset to their default. If this is unwanted- behavior, a specific service may require a client to always specify- a field mask, producing an error if not.+ If a field mask is not present on update, the operation applies to+ all fields (as if a field mask of all fields has been specified).+ Note that in the presence of schema evolution, this may mean that+ fields the client does not know and has therefore not filled into+ the request will be reset to their default. If this is unwanted+ behavior, a specific service may require a client to always specify+ a field mask, producing an error if not.- As with get operations, the location of the resource which- describes the updated values in the request message depends on the- operation kind. In any case, the effect of the field mask is- required to be honored by the API.+ As with get operations, the location of the resource which+ describes the updated values in the request message depends on the+ operation kind. In any case, the effect of the field mask is+ required to be honored by the API.- ## Considerations for HTTP REST+ ## Considerations for HTTP REST- The HTTP kind of an update operation which uses a field mask must- be set to PATCH instead of PUT in order to satisfy HTTP semantics- (PUT must only be used for full updates).+ The HTTP kind of an update operation which uses a field mask must+ be set to PATCH instead of PUT in order to satisfy HTTP semantics+ (PUT must only be used for full updates).- # JSON Encoding of Field Masks+ # JSON Encoding of Field Masks- In JSON, a field mask is encoded as a single string where paths are- separated by a comma. Fields name in each path are converted- to/from lower-camel naming conventions.+ In JSON, a field mask is encoded as a single string where paths are+ separated by a comma. Fields name in each path are converted+ to/from lower-camel naming conventions.- As an example, consider the following message declarations:+ As an example, consider the following message declarations:- message Profile {- User user = 1;- Photo photo = 2;- }- message User {- string display_name = 1;- string address = 2;- }+ message Profile {+ User user = 1;+ Photo photo = 2;+ }+ message User {+ string display_name = 1;+ string address = 2;+ }- In proto a field mask for `Profile` may look as such:+ In proto a field mask for `Profile` may look as such:- mask {- paths: "user.display_name"- paths: "photo"- }+ mask {+ paths: "user.display_name"+ paths: "photo"+ }- In JSON, the same mask is represented as below:+ In JSON, the same mask is represented as below:- {- mask: "user.displayName,photo"- }+ {+ mask: "user.displayName,photo"+ }- # Field Masks and Oneof Fields+ # Field Masks and Oneof Fields- Field masks treat fields in oneofs just as regular fields. Consider the- following message:+ Field masks treat fields in oneofs just as regular fields. Consider the+ following message:- message SampleMessage {- oneof test_oneof {- string name = 4;- SubMessage sub_message = 9;- }+ message SampleMessage {+ oneof test_oneof {+ string name = 4;+ SubMessage sub_message = 9;}+ }- The field mask can be:+ The field mask can be:- mask {- paths: "name"- }+ mask {+ paths: "name"+ }- Or:+ Or:- mask {- paths: "sub_message"- }+ mask {+ paths: "sub_message"+ }- Note that oneof type names ("test_oneof" in this case) cannot be used in- paths.+ Note that oneof type names ("test_oneof" in this case) cannot be used in+ paths.- ## Field Mask Verification+ ## Field Mask Verification- The implementation of any API method which has a FieldMask type field in the- request should verify the included field paths, and return an- `INVALID_ARGUMENT` error if any path is unmappable.+ The implementation of any API method which has a FieldMask type field in the+ request should verify the included field paths, and return an+ `INVALID_ARGUMENT` error if any path is unmappable.+ schema:+ type: stringrequestBody:description: The setting to update.content:@@ -14464,11 +13529,6 @@ paths:type: integertitle: page_sizeformat: int32- description: |-- 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.- name: pageTokenin: querydescription: |-@@ -14480,19 +13540,12 @@ paths:schema:type: stringtitle: page_token- description: |-- 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.- name: showDeletedin: querydescription: Show deleted users if specified.schema:type: booleantitle: show_deleted- description: Show deleted users if specified.- name: filterin: querydescription: |-@@ -14518,26 +13571,6 @@ paths:schema:type: stringtitle: filter- description: |-- Filter is used to filter users returned in the list.- The syntax and semantics of CEL are documented at https://github.com/google/cel-spec-- Supported filter:- - name: the user name, support "==" and ".contains()" operator.- - email: the user email, support "==" and ".contains()" operator.- - state: check State enum for values, support "==" operator.- - project: the project full name in "projects/{id}" format, support "==" operator.-- For example:- name == "ed"- name.contains("ed")- email == "[email protected]"- email.contains("ed")- state == "DELETED"- project == "projects/sample-project"- You can combine filter conditions like:- name.contains("ed") && project == "projects/sample-project"- (name == "ed" || email == "[email protected]") && project == "projects/sample-project"responses:"200":description: Success@@ -14649,216 +13682,214 @@ paths:type: string- name: updateMaskin: query- description: The list of fields to update.- schema:- type: string- description: |-- `FieldMask` represents a set of symbolic field paths, for example:+ description: |-+ `FieldMask` represents a set of symbolic field paths, for example:- paths: "f.a"- paths: "f.b.d"+ paths: "f.a"+ paths: "f.b.d"- Here `f` represents a field in some root message, `a` and `b`- fields in the message found in `f`, and `d` a field found in the- message in `f.b`.+ Here `f` represents a field in some root message, `a` and `b`+ fields in the message found in `f`, and `d` a field found in the+ message in `f.b`.- Field masks are used to specify a subset of fields that should be- returned by a get operation or modified by an update operation.- Field masks also have a custom JSON encoding (see below).+ Field masks are used to specify a subset of fields that should be+ returned by a get operation or modified by an update operation.+ Field masks also have a custom JSON encoding (see below).- # Field Masks in Projections+ # Field Masks in Projections- When used in the context of a projection, a response message or- sub-message is filtered by the API to only contain those fields as- specified in the mask. For example, if the mask in the previous- example is applied to a response message as follows:+ When used in the context of a projection, a response message or+ sub-message is filtered by the API to only contain those fields as+ specified in the mask. For example, if the mask in the previous+ example is applied to a response message as follows:- f {- a : 22- b {- d : 1- x : 2- }- y : 13+ f {+ a : 22+ b {+ d : 1+ x : 2}- z: 8+ y : 13+ }+ z: 8- The result will not contain specific values for fields x,y and z- (their value will be set to the default, and omitted in proto text- output):+ The result will not contain specific values for fields x,y and z+ (their value will be set to the default, and omitted in proto text+ output):- f {- a : 22- b {- d : 1- }+ f {+ a : 22+ b {+ d : 1}+ }++ A repeated field is not allowed except at the last position of a+ paths string.++ If a FieldMask object is not present in a get operation, the+ operation applies to all fields (as if a FieldMask of all fields+ had been specified).++ Note that a field mask does not necessarily apply to the+ top-level response message. In case of a REST get operation, the+ field mask applies directly to the response, but in case of a REST+ list operation, the mask instead applies to each individual message+ in the returned resource list. In case of a REST custom method,+ other definitions may be used. Where the mask applies will be+ clearly documented together with its declaration in the API. In+ any case, the effect on the returned resource/resources is required+ behavior for APIs.++ # Field Masks in Update Operations- A repeated field is not allowed except at the last position of a- paths string.-- If a FieldMask object is not present in a get operation, the- operation applies to all fields (as if a FieldMask of all fields- had been specified).-- Note that a field mask does not necessarily apply to the- top-level response message. In case of a REST get operation, the- field mask applies directly to the response, but in case of a REST- list operation, the mask instead applies to each individual message- in the returned resource list. In case of a REST custom method,- other definitions may be used. Where the mask applies will be- clearly documented together with its declaration in the API. In- any case, the effect on the returned resource/resources is required- behavior for APIs.-- # Field Masks in Update Operations-- A field mask in update operations specifies which fields of the- targeted resource are going to be updated. The API is required- to only change the values of the fields as specified in the mask- and leave the others untouched. If a resource is passed in to- describe the updated values, the API ignores the values of all- fields not covered by the mask.-- If a repeated field is specified for an update operation, new values will- be appended to the existing repeated field in the target resource. Note that- a repeated field is only allowed in the last position of a `paths` string.-- If a sub-message is specified in the last position of the field mask for an- update operation, then new value will be merged into the existing sub-message- in the target resource.-- For example, given the target message:-- f {- b {- d: 1- x: 2- }- c: [1]+ A field mask in update operations specifies which fields of the+ targeted resource are going to be updated. The API is required+ to only change the values of the fields as specified in the mask+ and leave the others untouched. If a resource is passed in to+ describe the updated values, the API ignores the values of all+ fields not covered by the mask.++ If a repeated field is specified for an update operation, new values will+ be appended to the existing repeated field in the target resource. Note that+ a repeated field is only allowed in the last position of a `paths` string.++ If a sub-message is specified in the last position of the field mask for an+ update operation, then new value will be merged into the existing sub-message+ in the target resource.++ For example, given the target message:++ f {+ b {+ d: 1+ x: 2}+ c: [1]+ }- And an update message:+ And an update message:- f {- b {- d: 10- }- c: [2]+ f {+ b {+ d: 10}+ c: [2]+ }- then if the field mask is:+ then if the field mask is:- paths: ["f.b", "f.c"]+ paths: ["f.b", "f.c"]- then the result will be:+ then the result will be:- f {- b {- d: 10- x: 2- }- c: [1, 2]+ f {+ b {+ d: 10+ x: 2}+ c: [1, 2]+ }- An implementation may provide options to override this default behavior for- repeated and message fields.+ An implementation may provide options to override this default behavior for+ repeated and message fields.- In order to reset a field's value to the default, the field must- be in the mask and set to the default value in the provided resource.- Hence, in order to reset all fields of a resource, provide a default- instance of the resource and set all fields in the mask, or do- not provide a mask as described below.+ In order to reset a field's value to the default, the field must+ be in the mask and set to the default value in the provided resource.+ Hence, in order to reset all fields of a resource, provide a default+ instance of the resource and set all fields in the mask, or do+ not provide a mask as described below.- If a field mask is not present on update, the operation applies to- all fields (as if a field mask of all fields has been specified).- Note that in the presence of schema evolution, this may mean that- fields the client does not know and has therefore not filled into- the request will be reset to their default. If this is unwanted- behavior, a specific service may require a client to always specify- a field mask, producing an error if not.+ If a field mask is not present on update, the operation applies to+ all fields (as if a field mask of all fields has been specified).+ Note that in the presence of schema evolution, this may mean that+ fields the client does not know and has therefore not filled into+ the request will be reset to their default. If this is unwanted+ behavior, a specific service may require a client to always specify+ a field mask, producing an error if not.- As with get operations, the location of the resource which- describes the updated values in the request message depends on the- operation kind. In any case, the effect of the field mask is- required to be honored by the API.+ As with get operations, the location of the resource which+ describes the updated values in the request message depends on the+ operation kind. In any case, the effect of the field mask is+ required to be honored by the API.- ## Considerations for HTTP REST+ ## Considerations for HTTP REST- The HTTP kind of an update operation which uses a field mask must- be set to PATCH instead of PUT in order to satisfy HTTP semantics- (PUT must only be used for full updates).+ The HTTP kind of an update operation which uses a field mask must+ be set to PATCH instead of PUT in order to satisfy HTTP semantics+ (PUT must only be used for full updates).- # JSON Encoding of Field Masks+ # JSON Encoding of Field Masks- In JSON, a field mask is encoded as a single string where paths are- separated by a comma. Fields name in each path are converted- to/from lower-camel naming conventions.+ In JSON, a field mask is encoded as a single string where paths are+ separated by a comma. Fields name in each path are converted+ to/from lower-camel naming conventions.- As an example, consider the following message declarations:+ As an example, consider the following message declarations:- message Profile {- User user = 1;- Photo photo = 2;- }- message User {- string display_name = 1;- string address = 2;- }+ message Profile {+ User user = 1;+ Photo photo = 2;+ }+ message User {+ string display_name = 1;+ string address = 2;+ }- In proto a field mask for `Profile` may look as such:+ In proto a field mask for `Profile` may look as such:- mask {- paths: "user.display_name"- paths: "photo"- }+ mask {+ paths: "user.display_name"+ paths: "photo"+ }- In JSON, the same mask is represented as below:+ In JSON, the same mask is represented as below:- {- mask: "user.displayName,photo"- }+ {+ mask: "user.displayName,photo"+ }- # Field Masks and Oneof Fields+ # Field Masks and Oneof Fields- Field masks treat fields in oneofs just as regular fields. Consider the- following message:+ Field masks treat fields in oneofs just as regular fields. Consider the+ following message:- message SampleMessage {- oneof test_oneof {- string name = 4;- SubMessage sub_message = 9;- }+ message SampleMessage {+ oneof test_oneof {+ string name = 4;+ SubMessage sub_message = 9;}+ }- The field mask can be:+ The field mask can be:- mask {- paths: "name"- }+ mask {+ paths: "name"+ }- Or:+ Or:- mask {- paths: "sub_message"- }+ mask {+ paths: "sub_message"+ }- Note that oneof type names ("test_oneof" in this case) cannot be used in- paths.+ Note that oneof type names ("test_oneof" in this case) cannot be used in+ paths.- ## Field Mask Verification+ ## Field Mask Verification- The implementation of any API method which has a FieldMask type field in the- request should verify the included field paths, and return an- `INVALID_ARGUMENT` error if any path is unmappable.+ The implementation of any API method which has a FieldMask type field in the+ request should verify the included field paths, and return an+ `INVALID_ARGUMENT` error if any path is unmappable.+ schema:+ type: string- name: otpCodein: querydescription: The otp_code is used to verify the user's identity by MFA.schema:type: stringtitle: otp_code- description: The otp_code is used to verify the user's identity by MFA.- name: regenerateTempMfaSecretin: querydescription: |-@@ -14867,16 +13898,12 @@ paths:schema:type: booleantitle: regenerate_temp_mfa_secret- description: |-- 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.- name: regenerateRecoveryCodesin: querydescription: The regenerate_recovery_codes flag means to regenerate recovery codes for user.schema:type: booleantitle: regenerate_recovery_codes- description: The regenerate_recovery_codes flag means to regenerate recovery codes for user.- name: allowMissingin: querydescription: |-@@ -14885,9 +13912,6 @@ paths:schema:type: booleantitle: allow_missing- description: |-- If set to true, and the user is not found, a new user will be created.- In this situation, `update_mask` is ignored.requestBody:description: |-The user to update.@@ -14994,9 +14018,6 @@ paths:items:type: stringtitle: names- description: |-- The user names to retrieve.- Format: users/{email}responses:"200":description: Success@@ -15067,210 +14088,207 @@ paths:- name: updateMaskin: querydescription: |-- The list of fields to update.- Supported fields: title, workload_identity_config- schema:- type: string- description: |-- `FieldMask` represents a set of symbolic field paths, for example:+ `FieldMask` represents a set of symbolic field paths, for example:- paths: "f.a"- paths: "f.b.d"+ paths: "f.a"+ paths: "f.b.d"- Here `f` represents a field in some root message, `a` and `b`- fields in the message found in `f`, and `d` a field found in the- message in `f.b`.+ Here `f` represents a field in some root message, `a` and `b`+ fields in the message found in `f`, and `d` a field found in the+ message in `f.b`.- Field masks are used to specify a subset of fields that should be- returned by a get operation or modified by an update operation.- Field masks also have a custom JSON encoding (see below).+ Field masks are used to specify a subset of fields that should be+ returned by a get operation or modified by an update operation.+ Field masks also have a custom JSON encoding (see below).- # Field Masks in Projections+ # Field Masks in Projections- When used in the context of a projection, a response message or- sub-message is filtered by the API to only contain those fields as- specified in the mask. For example, if the mask in the previous- example is applied to a response message as follows:+ When used in the context of a projection, a response message or+ sub-message is filtered by the API to only contain those fields as+ specified in the mask. For example, if the mask in the previous+ example is applied to a response message as follows:- f {- a : 22- b {- d : 1- x : 2- }- y : 13+ f {+ a : 22+ b {+ d : 1+ x : 2}- z: 8+ y : 13+ }+ z: 8- The result will not contain specific values for fields x,y and z- (their value will be set to the default, and omitted in proto text- output):+ The result will not contain specific values for fields x,y and z+ (their value will be set to the default, and omitted in proto text+ output):- f {- a : 22- b {- d : 1- }+ f {+ a : 22+ b {+ d : 1}+ }- A repeated field is not allowed except at the last position of a- paths string.-- If a FieldMask object is not present in a get operation, the- operation applies to all fields (as if a FieldMask of all fields- had been specified).-- Note that a field mask does not necessarily apply to the- top-level response message. In case of a REST get operation, the- field mask applies directly to the response, but in case of a REST- list operation, the mask instead applies to each individual message- in the returned resource list. In case of a REST custom method,- other definitions may be used. Where the mask applies will be- clearly documented together with its declaration in the API. In- any case, the effect on the returned resource/resources is required- behavior for APIs.-- # Field Masks in Update Operations-- A field mask in update operations specifies which fields of the- targeted resource are going to be updated. The API is required- to only change the values of the fields as specified in the mask- and leave the others untouched. If a resource is passed in to- describe the updated values, the API ignores the values of all- fields not covered by the mask.-- If a repeated field is specified for an update operation, new values will- be appended to the existing repeated field in the target resource. Note that- a repeated field is only allowed in the last position of a `paths` string.-- If a sub-message is specified in the last position of the field mask for an- update operation, then new value will be merged into the existing sub-message- in the target resource.-- For example, given the target message:-- f {- b {- d: 1- x: 2- }- c: [1]+ A repeated field is not allowed except at the last position of a+ paths string.++ If a FieldMask object is not present in a get operation, the+ operation applies to all fields (as if a FieldMask of all fields+ had been specified).++ Note that a field mask does not necessarily apply to the+ top-level response message. In case of a REST get operation, the+ field mask applies directly to the response, but in case of a REST+ list operation, the mask instead applies to each individual message+ in the returned resource list. In case of a REST custom method,+ other definitions may be used. Where the mask applies will be+ clearly documented together with its declaration in the API. In+ any case, the effect on the returned resource/resources is required+ behavior for APIs.++ # Field Masks in Update Operations++ A field mask in update operations specifies which fields of the+ targeted resource are going to be updated. The API is required+ to only change the values of the fields as specified in the mask+ and leave the others untouched. If a resource is passed in to+ describe the updated values, the API ignores the values of all+ fields not covered by the mask.++ If a repeated field is specified for an update operation, new values will+ be appended to the existing repeated field in the target resource. Note that+ a repeated field is only allowed in the last position of a `paths` string.++ If a sub-message is specified in the last position of the field mask for an+ update operation, then new value will be merged into the existing sub-message+ in the target resource.++ For example, given the target message:++ f {+ b {+ d: 1+ x: 2}+ c: [1]+ }- And an update message:+ And an update message:- f {- b {- d: 10- }- c: [2]+ f {+ b {+ d: 10}+ c: [2]+ }- then if the field mask is:+ then if the field mask is:- paths: ["f.b", "f.c"]+ paths: ["f.b", "f.c"]- then the result will be:+ then the result will be:- f {- b {- d: 10- x: 2- }- c: [1, 2]+ f {+ b {+ d: 10+ x: 2}+ c: [1, 2]+ }- An implementation may provide options to override this default behavior for- repeated and message fields.+ An implementation may provide options to override this default behavior for+ repeated and message fields.- In order to reset a field's value to the default, the field must- be in the mask and set to the default value in the provided resource.- Hence, in order to reset all fields of a resource, provide a default- instance of the resource and set all fields in the mask, or do- not provide a mask as described below.+ In order to reset a field's value to the default, the field must+ be in the mask and set to the default value in the provided resource.+ Hence, in order to reset all fields of a resource, provide a default+ instance of the resource and set all fields in the mask, or do+ not provide a mask as described below.- If a field mask is not present on update, the operation applies to- all fields (as if a field mask of all fields has been specified).- Note that in the presence of schema evolution, this may mean that- fields the client does not know and has therefore not filled into- the request will be reset to their default. If this is unwanted- behavior, a specific service may require a client to always specify- a field mask, producing an error if not.+ If a field mask is not present on update, the operation applies to+ all fields (as if a field mask of all fields has been specified).+ Note that in the presence of schema evolution, this may mean that+ fields the client does not know and has therefore not filled into+ the request will be reset to their default. If this is unwanted+ behavior, a specific service may require a client to always specify+ a field mask, producing an error if not.- As with get operations, the location of the resource which- describes the updated values in the request message depends on the- operation kind. In any case, the effect of the field mask is- required to be honored by the API.+ As with get operations, the location of the resource which+ describes the updated values in the request message depends on the+ operation kind. In any case, the effect of the field mask is+ required to be honored by the API.- ## Considerations for HTTP REST+ ## Considerations for HTTP REST- The HTTP kind of an update operation which uses a field mask must- be set to PATCH instead of PUT in order to satisfy HTTP semantics- (PUT must only be used for full updates).+ The HTTP kind of an update operation which uses a field mask must+ be set to PATCH instead of PUT in order to satisfy HTTP semantics+ (PUT must only be used for full updates).- # JSON Encoding of Field Masks+ # JSON Encoding of Field Masks- In JSON, a field mask is encoded as a single string where paths are- separated by a comma. Fields name in each path are converted- to/from lower-camel naming conventions.+ In JSON, a field mask is encoded as a single string where paths are+ separated by a comma. Fields name in each path are converted+ to/from lower-camel naming conventions.- As an example, consider the following message declarations:+ As an example, consider the following message declarations:- message Profile {- User user = 1;- Photo photo = 2;- }- message User {- string display_name = 1;- string address = 2;- }+ message Profile {+ User user = 1;+ Photo photo = 2;+ }+ message User {+ string display_name = 1;+ string address = 2;+ }- In proto a field mask for `Profile` may look as such:+ In proto a field mask for `Profile` may look as such:- mask {- paths: "user.display_name"- paths: "photo"- }+ mask {+ paths: "user.display_name"+ paths: "photo"+ }- In JSON, the same mask is represented as below:+ In JSON, the same mask is represented as below:- {- mask: "user.displayName,photo"- }+ {+ mask: "user.displayName,photo"+ }- # Field Masks and Oneof Fields+ # Field Masks and Oneof Fields- Field masks treat fields in oneofs just as regular fields. Consider the- following message:+ Field masks treat fields in oneofs just as regular fields. Consider the+ following message:- message SampleMessage {- oneof test_oneof {- string name = 4;- SubMessage sub_message = 9;- }+ message SampleMessage {+ oneof test_oneof {+ string name = 4;+ SubMessage sub_message = 9;}+ }- The field mask can be:+ The field mask can be:- mask {- paths: "name"- }+ mask {+ paths: "name"+ }- Or:+ Or:- mask {- paths: "sub_message"- }+ mask {+ paths: "sub_message"+ }- Note that oneof type names ("test_oneof" in this case) cannot be used in- paths.+ Note that oneof type names ("test_oneof" in this case) cannot be used in+ paths.- ## Field Mask Verification+ ## Field Mask Verification- The implementation of any API method which has a FieldMask type field in the- request should verify the included field paths, and return an- `INVALID_ARGUMENT` error if any path is unmappable.+ The implementation of any API method which has a FieldMask type field in the+ request should verify the included field paths, and return an+ `INVALID_ARGUMENT` error if any path is unmappable.+ schema:+ type: stringrequestBody:description: |-The workload identity to update.@@ -15492,11 +14510,6 @@ paths:type: integertitle: page_sizeformat: int32- description: |-- The maximum number of databases to return. The service may return fewer- than this value.- If unspecified, at most 10 databases will be returned.- The maximum value is 1000; values above 1000 will be coerced to 1000.- name: pageTokenin: querydescription: |-@@ -15508,12 +14521,6 @@ paths:schema:type: stringtitle: page_token- description: |-- A page token, received from a previous `ListDatabases` call.- Provide this to retrieve the subsequent page.-- When paginating, all other parameters provided to `ListDatabases` must- match the call that provided the page token.- name: filterin: querydescription: |-@@ -15551,45 +14558,12 @@ paths:schema:type: stringtitle: filter- description: |-- Filter is used to filter databases returned in the list.- The syntax and semantics of CEL are documented at https://github.com/google/cel-spec-- Supported filter:- - environment: the environment full name in "environments/{id}" format, support "==" operator.- - name: the database name, support ".contains()" operator.- - project: the project full name in "projects/{id}" format, support "==" operator.- - instance: the instance full name in "instances/{id}" format, support "==" operator.- - engine: the database engine, check Engine enum for values. Support "==", "in [xx]", "!(in [xx])" operator.- - exclude_unassigned: should be "true" or "false", will not show unassigned databases if it's true, support "==" operator.- - table: filter by the database table, support "==" and ".contains()" operator.- - labels.{key}: the database label, support "==" and "in" operators.-- For example:- environment == "environments/{environment resource id}"- environment == "" (find databases which environment is not set)- project == "projects/{project resource id}"- instance == "instances/{instance resource id}"- name.contains("database name")- engine == "MYSQL"- engine in ["MYSQL", "POSTGRES"]- !(engine in ["MYSQL", "POSTGRES"])- exclude_unassigned == true- table == "sample"- table.contains("sam")- labels.environment == "production"- labels.region == "asia"- labels.region in ["asia", "europe"]-- You can combine filter conditions like:- environment == "environments/prod" && name.contains("employee")- name: showDeletedin: querydescription: Show deleted database if specified.schema:type: booleantitle: show_deleted- description: Show deleted database if specified.- name: orderByin: querydescription: |-@@ -15602,13 +14576,6 @@ paths:schema:type: stringtitle: order_by- description: |-- The order by of databases.- Support name, project, instance. The default sorting order is ascending.- For example:- - order_by = "name" - order by name ascending- - order_by = "name desc"- - order_by = "name desc, project asc"responses:"200":description: Success@@ -15663,14 +14630,12 @@ paths:- $ref: '#/components/schemas/bytebase.v1.PolicyType'- type: "null"title: policy_type- description: Filter by specific policy type.- name: showDeletedin: querydescription: Show deleted policies if specified.schema:type: booleantitle: show_deleted- description: Show deleted policies if specified.responses:"200":description: Success@@ -15698,7 +14663,6 @@ paths:description: The type of policy to create.schema:title: type- description: The type of policy to create.$ref: '#/components/schemas/bytebase.v1.PolicyType'requestBody:description: The policy to create.@@ -15795,209 +14759,208 @@ paths:type: string- name: updateMaskin: query- description: The list of fields to update.- schema:- type: string- description: |-- `FieldMask` represents a set of symbolic field paths, for example:+ description: |-+ `FieldMask` represents a set of symbolic field paths, for example:- paths: "f.a"- paths: "f.b.d"+ paths: "f.a"+ paths: "f.b.d"- Here `f` represents a field in some root message, `a` and `b`- fields in the message found in `f`, and `d` a field found in the- message in `f.b`.+ Here `f` represents a field in some root message, `a` and `b`+ fields in the message found in `f`, and `d` a field found in the+ message in `f.b`.- Field masks are used to specify a subset of fields that should be- returned by a get operation or modified by an update operation.- Field masks also have a custom JSON encoding (see below).+ Field masks are used to specify a subset of fields that should be+ returned by a get operation or modified by an update operation.+ Field masks also have a custom JSON encoding (see below).- # Field Masks in Projections+ # Field Masks in Projections- When used in the context of a projection, a response message or- sub-message is filtered by the API to only contain those fields as- specified in the mask. For example, if the mask in the previous- example is applied to a response message as follows:+ When used in the context of a projection, a response message or+ sub-message is filtered by the API to only contain those fields as+ specified in the mask. For example, if the mask in the previous+ example is applied to a response message as follows:- f {- a : 22- b {- d : 1- x : 2- }- y : 13+ f {+ a : 22+ b {+ d : 1+ x : 2}- z: 8+ y : 13+ }+ z: 8- The result will not contain specific values for fields x,y and z- (their value will be set to the default, and omitted in proto text- output):+ The result will not contain specific values for fields x,y and z+ (their value will be set to the default, and omitted in proto text+ output):- f {- a : 22- b {- d : 1- }+ f {+ a : 22+ b {+ d : 1}+ }++ A repeated field is not allowed except at the last position of a+ paths string.++ If a FieldMask object is not present in a get operation, the+ operation applies to all fields (as if a FieldMask of all fields+ had been specified).++ Note that a field mask does not necessarily apply to the+ top-level response message. In case of a REST get operation, the+ field mask applies directly to the response, but in case of a REST+ list operation, the mask instead applies to each individual message+ in the returned resource list. In case of a REST custom method,+ other definitions may be used. Where the mask applies will be+ clearly documented together with its declaration in the API. In+ any case, the effect on the returned resource/resources is required+ behavior for APIs.- A repeated field is not allowed except at the last position of a- paths string.-- If a FieldMask object is not present in a get operation, the- operation applies to all fields (as if a FieldMask of all fields- had been specified).-- Note that a field mask does not necessarily apply to the- top-level response message. In case of a REST get operation, the- field mask applies directly to the response, but in case of a REST- list operation, the mask instead applies to each individual message- in the returned resource list. In case of a REST custom method,- other definitions may be used. Where the mask applies will be- clearly documented together with its declaration in the API. In- any case, the effect on the returned resource/resources is required- behavior for APIs.-- # Field Masks in Update Operations-- A field mask in update operations specifies which fields of the- targeted resource are going to be updated. The API is required- to only change the values of the fields as specified in the mask- and leave the others untouched. If a resource is passed in to- describe the updated values, the API ignores the values of all- fields not covered by the mask.-- If a repeated field is specified for an update operation, new values will- be appended to the existing repeated field in the target resource. Note that- a repeated field is only allowed in the last position of a `paths` string.-- If a sub-message is specified in the last position of the field mask for an- update operation, then new value will be merged into the existing sub-message- in the target resource.-- For example, given the target message:-- f {- b {- d: 1- x: 2- }- c: [1]+ # Field Masks in Update Operations++ A field mask in update operations specifies which fields of the+ targeted resource are going to be updated. The API is required+ to only change the values of the fields as specified in the mask+ and leave the others untouched. If a resource is passed in to+ describe the updated values, the API ignores the values of all+ fields not covered by the mask.++ If a repeated field is specified for an update operation, new values will+ be appended to the existing repeated field in the target resource. Note that+ a repeated field is only allowed in the last position of a `paths` string.++ If a sub-message is specified in the last position of the field mask for an+ update operation, then new value will be merged into the existing sub-message+ in the target resource.++ For example, given the target message:++ f {+ b {+ d: 1+ x: 2}+ c: [1]+ }- And an update message:+ And an update message:- f {- b {- d: 10- }- c: [2]+ f {+ b {+ d: 10}+ c: [2]+ }- then if the field mask is:+ then if the field mask is:- paths: ["f.b", "f.c"]+ paths: ["f.b", "f.c"]- then the result will be:+ then the result will be:- f {- b {- d: 10- x: 2- }- c: [1, 2]+ f {+ b {+ d: 10+ x: 2}+ c: [1, 2]+ }- An implementation may provide options to override this default behavior for- repeated and message fields.+ An implementation may provide options to override this default behavior for+ repeated and message fields.- In order to reset a field's value to the default, the field must- be in the mask and set to the default value in the provided resource.- Hence, in order to reset all fields of a resource, provide a default- instance of the resource and set all fields in the mask, or do- not provide a mask as described below.+ In order to reset a field's value to the default, the field must+ be in the mask and set to the default value in the provided resource.+ Hence, in order to reset all fields of a resource, provide a default+ instance of the resource and set all fields in the mask, or do+ not provide a mask as described below.- If a field mask is not present on update, the operation applies to- all fields (as if a field mask of all fields has been specified).- Note that in the presence of schema evolution, this may mean that- fields the client does not know and has therefore not filled into- the request will be reset to their default. If this is unwanted- behavior, a specific service may require a client to always specify- a field mask, producing an error if not.+ If a field mask is not present on update, the operation applies to+ all fields (as if a field mask of all fields has been specified).+ Note that in the presence of schema evolution, this may mean that+ fields the client does not know and has therefore not filled into+ the request will be reset to their default. If this is unwanted+ behavior, a specific service may require a client to always specify+ a field mask, producing an error if not.- As with get operations, the location of the resource which- describes the updated values in the request message depends on the- operation kind. In any case, the effect of the field mask is- required to be honored by the API.+ As with get operations, the location of the resource which+ describes the updated values in the request message depends on the+ operation kind. In any case, the effect of the field mask is+ required to be honored by the API.- ## Considerations for HTTP REST+ ## Considerations for HTTP REST- The HTTP kind of an update operation which uses a field mask must- be set to PATCH instead of PUT in order to satisfy HTTP semantics- (PUT must only be used for full updates).+ The HTTP kind of an update operation which uses a field mask must+ be set to PATCH instead of PUT in order to satisfy HTTP semantics+ (PUT must only be used for full updates).- # JSON Encoding of Field Masks+ # JSON Encoding of Field Masks- In JSON, a field mask is encoded as a single string where paths are- separated by a comma. Fields name in each path are converted- to/from lower-camel naming conventions.+ In JSON, a field mask is encoded as a single string where paths are+ separated by a comma. Fields name in each path are converted+ to/from lower-camel naming conventions.- As an example, consider the following message declarations:+ As an example, consider the following message declarations:- message Profile {- User user = 1;- Photo photo = 2;- }- message User {- string display_name = 1;- string address = 2;- }+ message Profile {+ User user = 1;+ Photo photo = 2;+ }+ message User {+ string display_name = 1;+ string address = 2;+ }- In proto a field mask for `Profile` may look as such:+ In proto a field mask for `Profile` may look as such:- mask {- paths: "user.display_name"- paths: "photo"- }+ mask {+ paths: "user.display_name"+ paths: "photo"+ }- In JSON, the same mask is represented as below:+ In JSON, the same mask is represented as below:- {- mask: "user.displayName,photo"- }+ {+ mask: "user.displayName,photo"+ }- # Field Masks and Oneof Fields+ # Field Masks and Oneof Fields- Field masks treat fields in oneofs just as regular fields. Consider the- following message:+ Field masks treat fields in oneofs just as regular fields. Consider the+ following message:- message SampleMessage {- oneof test_oneof {- string name = 4;- SubMessage sub_message = 9;- }+ message SampleMessage {+ oneof test_oneof {+ string name = 4;+ SubMessage sub_message = 9;}+ }- The field mask can be:+ The field mask can be:- mask {- paths: "name"- }+ mask {+ paths: "name"+ }- Or:+ Or:- mask {- paths: "sub_message"- }+ mask {+ paths: "sub_message"+ }- Note that oneof type names ("test_oneof" in this case) cannot be used in- paths.+ Note that oneof type names ("test_oneof" in this case) cannot be used in+ paths.- ## Field Mask Verification+ ## Field Mask Verification- The implementation of any API method which has a FieldMask type field in the- request should verify the included field paths, and return an- `INVALID_ARGUMENT` error if any path is unmappable.+ The implementation of any API method which has a FieldMask type field in the+ request should verify the included field paths, and return an+ `INVALID_ARGUMENT` error if any path is unmappable.+ schema:+ type: string- name: allowMissingin: querydescription: |-@@ -16006,9 +14969,6 @@ paths:schema:type: booleantitle: allow_missing- description: |-- If set to true, and the policy is not found, a new policy will be created.- In this situation, `update_mask` is ignored.requestBody:description: |-The policy to update.@@ -16068,11 +15028,6 @@ paths:type: integertitle: page_sizeformat: int32- description: |-- The maximum number of service accounts to return. The service may return fewer than- this value.- If unspecified, at most 10 service accounts will be returned.- The maximum value is 1000; values above 1000 will be coerced to 1000.- name: pageTokenin: querydescription: |-@@ -16084,19 +15039,12 @@ paths:schema:type: stringtitle: page_token- description: |-- A page token, received from a previous `ListServiceAccounts` call.- Provide this to retrieve the subsequent page.-- When paginating, all other parameters provided to `ListServiceAccounts` must match- the call that provided the page token.- name: showDeletedin: querydescription: Show deleted service accounts if specified.schema:type: booleantitle: show_deleted- description: Show deleted service accounts if specified.- name: filterin: querydescription: |-@@ -16117,21 +15065,6 @@ paths:schema:type: stringtitle: filter- description: |-- Filter is used to filter service accounts returned in the list.- The syntax and semantics of CEL are documented at https://github.com/google/cel-spec-- Supported filter:- - name: the service account name, support "==" and ".contains()" operator.- - email: the service account email, support "==" and ".contains()" operator.- - state: check State enum for values, support "==" operator.-- For example:- name == "ed"- name.contains("ed")- state == "DELETED"- email == "[email protected]"- email.contains("ed")responses:"200":description: Success@@ -16165,10 +15098,6 @@ paths:schema:type: stringtitle: service_account_id- description: |-- The ID to use for the service account, which will become the final component- of the service account's email in the format: {service_account_id}@service.bytebase.com- or {service_account_id}@{project-id}.service.bytebase.comrequestBody:description: The service account to create.content:@@ -16253,11 +15182,6 @@ paths:type: integertitle: page_sizeformat: int32- description: |-- The maximum number of workload identities to return. The service may return fewer than- this value.- If unspecified, at most 10 workload identities will be returned.- The maximum value is 1000; values above 1000 will be coerced to 1000.- name: pageTokenin: querydescription: |-@@ -16269,19 +15193,12 @@ paths:schema:type: stringtitle: page_token- description: |-- A page token, received from a previous `ListWorkloadIdentities` call.- Provide this to retrieve the subsequent page.-- When paginating, all other parameters provided to `ListWorkloadIdentities` must match- the call that provided the page token.- name: showDeletedin: querydescription: Show deleted workload identities if specified.schema:type: booleantitle: show_deleted- description: Show deleted workload identities if specified.- name: filterin: querydescription: |-@@ -16302,21 +15219,6 @@ paths:schema:type: stringtitle: filter- description: |-- Filter is used to filter workload identities returned in the list.- The syntax and semantics of CEL are documented at https://github.com/google/cel-spec-- Supported filter:- - name: the workload identity name, support "==" and ".contains()" operator.- - email: the workload identity email, support "==" and ".contains()" operator.- - state: check State enum for values, support "==" operator.-- For example:- name == "ed"- name.contains("ed")- state == "DELETED"- email == "[email protected]"- email.contains("ed")responses:"200":description: Success@@ -16350,10 +15252,6 @@ paths:schema:type: stringtitle: workload_identity_id- description: |-- The ID to use for the workload identity, which will become the final component- of the workload identity's email in the format: {workload_identity_id}@workload.bytebase.com- or {workload_identity_id}@{project-id}.workload.bytebase.comrequestBody:description: The workload identity to create.content:@@ -16477,16 +15375,12 @@ paths:schema:type: stringtitle: name- description: |-- The name is the instance name to execute the query against.- Format: instances/{instance}/databases/{databaseName}- name: statementin: querydescription: The SQL statement to execute.schema:type: stringtitle: statement- description: The SQL statement to execute.- name: limitin: querydescription: The maximum number of rows to return.@@ -16494,7 +15388,6 @@ paths:type: integertitle: limitformat: int32- description: The maximum number of rows to return.- name: schemain: querydescription: |-@@ -16503,9 +15396,6 @@ paths:schema:type: stringtitle: schema- description: |-- The default schema to execute the statement. Equals to the current schema- in Oracle and search path in Postgres.- name: containerin: querydescription: |-@@ -16514,9 +15404,6 @@ paths:schema:type: stringtitle: container- description: |-- Container is the container name to execute the query against, used for- CosmosDB only.responses:"200":description: Success@@ -17276,10 +16163,6 @@ components:bytebase.v1.Announcement:type: objectproperties:- level:- title: level- description: The alert level of announcement- $ref: '#/components/schemas/bytebase.v1.Announcement.AlertLevel'text:type: stringtitle: text@@ -17288,17 +16171,27 @@ components:type: stringtitle: linkdescription: The optional link, user can follow the link to check extra details+ theme:+ title: theme+ description: |-+ Banner colors. Built-in presets (info/warning/critical) are a+ frontend-only concept that seeds these colors; the store only holds them.+ $ref: '#/components/schemas/bytebase.v1.Announcement.AnnouncementTheme'title: AnnouncementadditionalProperties: false- bytebase.v1.Announcement.AlertLevel:- type: string- title: AlertLevel- enum:- - ALERT_LEVEL_UNSPECIFIED- - INFO- - WARNING- - CRITICAL- description: 'We support three levels of AlertLevel: INFO, WARNING, and ERROR.'+ bytebase.v1.Announcement.AnnouncementTheme:+ type: object+ properties:+ background:+ type: string+ title: background+ description: '"r g b"'+ text:+ type: string+ title: text+ description: '"r g b"'+ title: AnnouncementTheme+ additionalProperties: falsebytebase.v1.AppIMSetting:type: objectproperties:@@ -26165,6 +25058,37 @@ components:- krbConfigtitle: SASLConfigadditionalProperties: false+ bytebase.v1.SQLEditorThemeSetting:+ type: object+ properties:+ id:+ type: string+ title: id+ name:+ type: string+ title: name+ monacoBase:+ type: string+ title: monaco_base+ tokens:+ type: object+ title: tokens+ additionalProperties:+ type: string+ title: value+ title: SQLEditorThemeSetting+ additionalProperties: false+ bytebase.v1.SQLEditorThemeSetting.TokensEntry:+ type: object+ properties:+ key:+ type: string+ title: key+ value:+ type: string+ title: value+ title: TokensEntry+ additionalProperties: falsebytebase.v1.SQLReviewRule:type: objectallOf:@@ -30139,6 +29063,18 @@ components:description: |-Allow signin/signup using email + a 6-digit one-time verification code.Requires the EMAIL setting to be configured on the workspace.+ sqlEditorThemeId:+ type: string+ title: sql_editor_theme_id+ description: |-+ Enforced SQL Editor theme id: OPAQUE — a frontend-resolved built-in preset id+ OR a custom theme's uuid. Empty ⇒ default light.+ sqlEditorCustomTheme:+ title: sql_editor_custom_theme+ description: |-+ The enforced CUSTOM theme's full definition — present ONLY when+ sql_editor_theme_id is a custom uuid. tokens is always complete.+ $ref: '#/components/schemas/bytebase.v1.SQLEditorThemeSetting'title: WorkspaceProfileSettingadditionalProperties: falsebytebase.v1.WorkspaceProfileSetting.PasswordRestriction:diff --git a/proto/gen/grpc-doc/store/README.md b/proto/gen/grpc-doc/store/README.mdindex 81e5853579..33406f594c 100644--- a/proto/gen/grpc-doc/store/README.md+++ b/proto/gen/grpc-doc/store/README.md@@ -268,6 +268,8 @@- [EnvironmentSetting](#bytebase-store-EnvironmentSetting)- [EnvironmentSetting.Environment](#bytebase-store-EnvironmentSetting-Environment)- [EnvironmentSetting.Environment.TagsEntry](#bytebase-store-EnvironmentSetting-Environment-TagsEntry)+ - [SQLEditorThemeSetting](#bytebase-store-SQLEditorThemeSetting)+ - [SQLEditorThemeSetting.TokensEntry](#bytebase-store-SQLEditorThemeSetting-TokensEntry)- [SemanticTypeSetting](#bytebase-store-SemanticTypeSetting)- [SemanticTypeSetting.SemanticType](#bytebase-store-SemanticTypeSetting-SemanticType)- [SystemSetting](#bytebase-store-SystemSetting)@@ -275,6 +277,7 @@- [WorkspaceApprovalSetting.Rule](#bytebase-store-WorkspaceApprovalSetting-Rule)- [WorkspaceProfileSetting](#bytebase-store-WorkspaceProfileSetting)- [WorkspaceProfileSetting.Announcement](#bytebase-store-WorkspaceProfileSetting-Announcement)+ - [WorkspaceProfileSetting.Announcement.AnnouncementTheme](#bytebase-store-WorkspaceProfileSetting-Announcement-AnnouncementTheme)- [WorkspaceProfileSetting.PasswordRestriction](#bytebase-store-WorkspaceProfileSetting-PasswordRestriction)- [AISetting.Provider](#bytebase-store-AISetting-Provider)@@ -284,7 +287,6 @@- [EmailSetting.Type](#bytebase-store-EmailSetting-Type)- [SettingName](#bytebase-store-SettingName)- [WorkspaceApprovalSetting.Rule.Source](#bytebase-store-WorkspaceApprovalSetting-Rule-Source)- - [WorkspaceProfileSetting.Announcement.AlertLevel](#bytebase-store-WorkspaceProfileSetting-Announcement-AlertLevel)- [WorkspaceProfileSetting.DatabaseChangeMode](#bytebase-store-WorkspaceProfileSetting-DatabaseChangeMode)- [store/signal.proto](#store_signal-proto)@@ -4503,6 +4505,40 @@ All other settings live in per-workspace WORKSPACE_PROFILE.+<a name="bytebase-store-SQLEditorThemeSetting"></a>++### SQLEditorThemeSetting++++| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| id | [string](#string) | | |+| name | [string](#string) | | |+| monaco_base | [string](#string) | | |+| tokens | [SQLEditorThemeSetting.TokensEntry](#bytebase-store-SQLEditorThemeSetting-TokensEntry) | repeated | |+++++++<a name="bytebase-store-SQLEditorThemeSetting-TokensEntry"></a>++### SQLEditorThemeSetting.TokensEntry++++| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| key | [string](#string) | | |+| value | [string](#string) | | |++++++<a name="bytebase-store-SemanticTypeSetting"></a>### SemanticTypeSetting@@ -4613,6 +4649,8 @@ All other settings live in per-workspace WORKSPACE_PROFILE.| sql_result_size | [int64](#int64) | | The maximum result size limit in bytes for query and export, works for the SQL Editor and Export Center. The default value is 100MB, we will use the default value if the setting not exists, or the limit <= 0. || query_timeout | [google.protobuf.Duration](#google-protobuf-Duration) | | The query timeout duration for query and export, works for the SQL Editor and Export Center. || allow_email_code_signin | [bool](#bool) | | Allow signin/signup using email + a 6-digit one-time verification code. Requires the EMAIL setting to be configured on the workspace. |+| sql_editor_theme_id | [string](#string) | | Enforced SQL Editor theme id: OPAQUE — a frontend-resolved built-in preset id OR a custom theme's uuid. Empty ⇒ default light. |+| sql_editor_custom_theme | [SQLEditorThemeSetting](#bytebase-store-SQLEditorThemeSetting) | | The enforced CUSTOM theme's full definition — present ONLY when sql_editor_theme_id is a custom uuid. tokens is always complete. |@@ -4627,9 +4665,25 @@ All other settings live in per-workspace WORKSPACE_PROFILE.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| level | [WorkspaceProfileSetting.Announcement.AlertLevel](#bytebase-store-WorkspaceProfileSetting-Announcement-AlertLevel) | | The alert level of the announcement. || text | [string](#string) | | The text of the announcement. || link | [string](#string) | | The optional link, user can follow the link to check extra details |+| theme | [WorkspaceProfileSetting.Announcement.AnnouncementTheme](#bytebase-store-WorkspaceProfileSetting-Announcement-AnnouncementTheme) | | Banner colors. Built-in presets (info/warning/critical) are a frontend-only concept that seeds these colors; the store only holds them. |+++++++<a name="bytebase-store-WorkspaceProfileSetting-Announcement-AnnouncementTheme"></a>++### WorkspaceProfileSetting.Announcement.AnnouncementTheme++++| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| background | [string](#string) | | "r g b" |+| text | [string](#string) | | "r g b" |@@ -4764,20 +4818,6 @@ All other settings live in per-workspace WORKSPACE_PROFILE.-<a name="bytebase-store-WorkspaceProfileSetting-Announcement-AlertLevel"></a>--### WorkspaceProfileSetting.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-store-WorkspaceProfileSetting-DatabaseChangeMode"></a>### WorkspaceProfileSetting.DatabaseChangeModediff --git a/proto/gen/grpc-doc/store/index.html b/proto/gen/grpc-doc/store/index.htmlindex 05c508306c..04b5010dea 100644--- a/proto/gen/grpc-doc/store/index.html+++ b/proto/gen/grpc-doc/store/index.html@@ -1256,6 +1256,14 @@<a href="#bytebase.store.EnvironmentSetting.Environment.TagsEntry"><span class="badge">M</span>EnvironmentSetting.Environment.TagsEntry</a></li>+ <li>+ <a href="#bytebase.store.SQLEditorThemeSetting"><span class="badge">M</span>SQLEditorThemeSetting</a>+ </li>++ <li>+ <a href="#bytebase.store.SQLEditorThemeSetting.TokensEntry"><span class="badge">M</span>SQLEditorThemeSetting.TokensEntry</a>+ </li>+<li><a href="#bytebase.store.SemanticTypeSetting"><span class="badge">M</span>SemanticTypeSetting</a></li>@@ -1284,6 +1292,10 @@<a href="#bytebase.store.WorkspaceProfileSetting.Announcement"><span class="badge">M</span>WorkspaceProfileSetting.Announcement</a></li>+ <li>+ <a href="#bytebase.store.WorkspaceProfileSetting.Announcement.AnnouncementTheme"><span class="badge">M</span>WorkspaceProfileSetting.Announcement.AnnouncementTheme</a>+ </li>+<li><a href="#bytebase.store.WorkspaceProfileSetting.PasswordRestriction"><span class="badge">M</span>WorkspaceProfileSetting.PasswordRestriction</a></li>@@ -1317,10 +1329,6 @@<a href="#bytebase.store.WorkspaceApprovalSetting.Rule.Source"><span class="badge">E</span>WorkspaceApprovalSetting.Rule.Source</a></li>- <li>- <a href="#bytebase.store.WorkspaceProfileSetting.Announcement.AlertLevel"><span class="badge">E</span>WorkspaceProfileSetting.Announcement.AlertLevel</a>- </li>-<li><a href="#bytebase.store.WorkspaceProfileSetting.DatabaseChangeMode"><span class="badge">E</span>WorkspaceProfileSetting.DatabaseChangeMode</a></li>@@ -12371,6 +12379,82 @@ are /[a-z][0-9]-/. </p></td>+ <h3 id="bytebase.store.SQLEditorThemeSetting">SQLEditorThemeSetting</h3>+ <p></p>+++ <table class="field-table">+ <thead>+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>id</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>name</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>monaco_base</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>tokens</td>+ <td><a href="#bytebase.store.SQLEditorThemeSetting.TokensEntry">SQLEditorThemeSetting.TokensEntry</a></td>+ <td>repeated</td>+ <td><p> </p></td>+ </tr>++ </tbody>+ </table>++++++ <h3 id="bytebase.store.SQLEditorThemeSetting.TokensEntry">SQLEditorThemeSetting.TokensEntry</h3>+ <p></p>+++ <table class="field-table">+ <thead>+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>key</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>value</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ </tbody>+ </table>+++++<h3 id="bytebase.store.SemanticTypeSetting">SemanticTypeSetting</h3><p></p>@@ -12694,6 +12778,22 @@ The default value is 100MB, we will use the default value if the setting not exiRequires the EMAIL setting to be configured on the workspace. </p></td></tr>+ <tr>+ <td>sql_editor_theme_id</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>Enforced SQL Editor theme id: OPAQUE — a frontend-resolved built-in preset id+OR a custom theme's uuid. Empty ⇒ default light. </p></td>+ </tr>++ <tr>+ <td>sql_editor_custom_theme</td>+ <td><a href="#bytebase.store.SQLEditorThemeSetting">SQLEditorThemeSetting</a></td>+ <td></td>+ <td><p>The enforced CUSTOM theme's full definition — present ONLY when+sql_editor_theme_id is a custom uuid. tokens is always complete. </p></td>+ </tr>+</tbody></table>@@ -12711,13 +12811,6 @@ Requires the EMAIL setting to be configured on the workspace. </p></td></thead><tbody>- <tr>- <td>level</td>- <td><a href="#bytebase.store.WorkspaceProfileSetting.Announcement.AlertLevel">WorkspaceProfileSetting.Announcement.AlertLevel</a></td>- <td></td>- <td><p>The alert level of the announcement. </p></td>- </tr>-<tr><td>text</td><td><a href="#string">string</a></td>@@ -12732,6 +12825,45 @@ Requires the EMAIL setting to be configured on the workspace. </p></td><td><p>The optional link, user can follow the link to check extra details </p></td></tr>+ <tr>+ <td>theme</td>+ <td><a href="#bytebase.store.WorkspaceProfileSetting.Announcement.AnnouncementTheme">WorkspaceProfileSetting.Announcement.AnnouncementTheme</a></td>+ <td></td>+ <td><p>Banner colors. Built-in presets (info/warning/critical) are a+frontend-only concept that seeds these colors; the store only holds them. </p></td>+ </tr>++ </tbody>+ </table>++++++ <h3 id="bytebase.store.WorkspaceProfileSetting.Announcement.AnnouncementTheme">WorkspaceProfileSetting.Announcement.AnnouncementTheme</h3>+ <p></p>+++ <table class="field-table">+ <thead>+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>background</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>"r g b" </p></td>+ </tr>++ <tr>+ <td>text</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>"r g b" </p></td>+ </tr>+</tbody></table>@@ -13094,41 +13226,6 @@ Requires the EMAIL setting to be configured on the workspace. </p></td></tbody></table>- <h3 id="bytebase.store.WorkspaceProfileSetting.Announcement.AlertLevel">WorkspaceProfileSetting.Announcement.AlertLevel</h3>- <p>We support three levels of AlertLevel: INFO, WARNING, and ERROR.</p>- <table class="enum-table">- <thead>- <tr><td>Name</td><td>Number</td><td>Description</td></tr>- </thead>- <tbody>-- <tr>- <td>ALERT_LEVEL_UNSPECIFIED</td>- <td>0</td>- <td><p></p></td>- </tr>-- <tr>- <td>INFO</td>- <td>1</td>- <td><p></p></td>- </tr>-- <tr>- <td>WARNING</td>- <td>2</td>- <td><p></p></td>- </tr>-- <tr>- <td>CRITICAL</td>- <td>3</td>- <td><p></p></td>- </tr>-- </tbody>- </table>-<h3 id="bytebase.store.WorkspaceProfileSetting.DatabaseChangeMode">WorkspaceProfileSetting.DatabaseChangeMode</h3><p></p><table class="enum-table">diff --git a/proto/gen/grpc-doc/v1/README.md b/proto/gen/grpc-doc/v1/README.mdindex 3d4eef2f69..88f263deaa 100644--- a/proto/gen/grpc-doc/v1/README.md+++ b/proto/gen/grpc-doc/v1/README.md@@ -333,6 +333,7 @@- [Algorithm.RangeMask](#bytebase-v1-Algorithm-RangeMask)- [Algorithm.RangeMask.Slice](#bytebase-v1-Algorithm-RangeMask-Slice)- [Announcement](#bytebase-v1-Announcement)+ - [Announcement.AnnouncementTheme](#bytebase-v1-Announcement-AnnouncementTheme)- [AppIMSetting](#bytebase-v1-AppIMSetting)- [AppIMSetting.DingTalk](#bytebase-v1-AppIMSetting-DingTalk)- [AppIMSetting.Feishu](#bytebase-v1-AppIMSetting-Feishu)@@ -355,6 +356,8 @@- [GetSettingResponse](#bytebase-v1-GetSettingResponse)- [ListSettingsRequest](#bytebase-v1-ListSettingsRequest)- [ListSettingsResponse](#bytebase-v1-ListSettingsResponse)+ - [SQLEditorThemeSetting](#bytebase-v1-SQLEditorThemeSetting)+ - [SQLEditorThemeSetting.TokensEntry](#bytebase-v1-SQLEditorThemeSetting-TokensEntry)- [SemanticTypeSetting](#bytebase-v1-SemanticTypeSetting)- [SemanticTypeSetting.SemanticType](#bytebase-v1-SemanticTypeSetting-SemanticType)- [Setting](#bytebase-v1-Setting)@@ -369,7 +372,6 @@- [AISetting.Provider](#bytebase-v1-AISetting-Provider)- [Algorithm.InnerOuterMask.MaskType](#bytebase-v1-Algorithm-InnerOuterMask-MaskType)- - [Announcement.AlertLevel](#bytebase-v1-Announcement-AlertLevel)- [DatabaseChangeMode](#bytebase-v1-DatabaseChangeMode)- [EmailSetting.SMTPConfig.Authentication](#bytebase-v1-EmailSetting-SMTPConfig-Authentication)- [EmailSetting.SMTPConfig.Encryption](#bytebase-v1-EmailSetting-SMTPConfig-Encryption)@@ -6082,9 +6084,25 @@ IssueService manages issues for tracking database changes and tasks.| 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 |+| theme | [Announcement.AnnouncementTheme](#bytebase-v1-Announcement-AnnouncementTheme) | | Banner colors. Built-in presets (info/warning/critical) are a frontend-only concept that seeds these colors; the store only holds them. |+++++++<a name="bytebase-v1-Announcement-AnnouncementTheme"></a>++### Announcement.AnnouncementTheme++++| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| background | [string](#string) | | "r g b" |+| text | [string](#string) | | "r g b" |@@ -6450,6 +6468,40 @@ The response message for getting a setting.+<a name="bytebase-v1-SQLEditorThemeSetting"></a>++### SQLEditorThemeSetting++++| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| id | [string](#string) | | |+| name | [string](#string) | | |+| monaco_base | [string](#string) | | |+| tokens | [SQLEditorThemeSetting.TokensEntry](#bytebase-v1-SQLEditorThemeSetting-TokensEntry) | repeated | |+++++++<a name="bytebase-v1-SQLEditorThemeSetting-TokensEntry"></a>++### SQLEditorThemeSetting.TokensEntry++++| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| key | [string](#string) | | |+| value | [string](#string) | | |++++++<a name="bytebase-v1-SemanticTypeSetting"></a>### SemanticTypeSetting@@ -6642,6 +6694,8 @@ For examples: resource.environment_id == "prod" && statement.aff| sql_result_size | [int64](#int64) | | The maximum result size limit in bytes for query and export, works for the SQL Editor and Export Center. The default value is 100MB, we will use the default value if the setting not exists, or the limit <= 0. || query_timeout | [google.protobuf.Duration](#google-protobuf-Duration) | | The query timeout duration for query and export, works for the SQL Editor and Export Center. || allow_email_code_signin | [bool](#bool) | | Allow signin/signup using email + a 6-digit one-time verification code. Requires the EMAIL setting to be configured on the workspace. |+| sql_editor_theme_id | [string](#string) | | Enforced SQL Editor theme id: OPAQUE — a frontend-resolved built-in preset id OR a custom theme's uuid. Empty ⇒ default light. |+| sql_editor_custom_theme | [SQLEditorThemeSetting](#bytebase-v1-SQLEditorThemeSetting) | | The enforced CUSTOM theme's full definition — present ONLY when sql_editor_theme_id is a custom uuid. tokens is always complete. |@@ -6699,20 +6753,6 @@ For examples: resource.environment_id == "prod" && statement.aff-<a name="bytebase-v1-Announcement-AlertLevel"></a>--### Announcement.AlertLevel-We support three levels of AlertLevel: INFO, WARNING, and ERROR.--| Name | Number | Description |-| ---- | ------ | ----------- |-| ALERT_LEVEL_UNSPECIFIED | 0 | |-| INFO | 1 | |-| WARNING | 2 | |-| CRITICAL | 3 | |---<a name="bytebase-v1-DatabaseChangeMode"></a>### DatabaseChangeModediff --git a/proto/gen/grpc-doc/v1/index.html b/proto/gen/grpc-doc/v1/index.htmlindex 17735bb06c..92650860a4 100644--- a/proto/gen/grpc-doc/v1/index.html+++ b/proto/gen/grpc-doc/v1/index.html@@ -1456,6 +1456,10 @@<a href="#bytebase.v1.Announcement"><span class="badge">M</span>Announcement</a></li>+ <li>+ <a href="#bytebase.v1.Announcement.AnnouncementTheme"><span class="badge">M</span>Announcement.AnnouncementTheme</a>+ </li>+<li><a href="#bytebase.v1.AppIMSetting"><span class="badge">M</span>AppIMSetting</a></li>@@ -1544,6 +1548,14 @@<a href="#bytebase.v1.ListSettingsResponse"><span class="badge">M</span>ListSettingsResponse</a></li>+ <li>+ <a href="#bytebase.v1.SQLEditorThemeSetting"><span class="badge">M</span>SQLEditorThemeSetting</a>+ </li>++ <li>+ <a href="#bytebase.v1.SQLEditorThemeSetting.TokensEntry"><span class="badge">M</span>SQLEditorThemeSetting.TokensEntry</a>+ </li>+<li><a href="#bytebase.v1.SemanticTypeSetting"><span class="badge">M</span>SemanticTypeSetting</a></li>@@ -1597,10 +1609,6 @@<a href="#bytebase.v1.Algorithm.InnerOuterMask.MaskType"><span class="badge">E</span>Algorithm.InnerOuterMask.MaskType</a></li>- <li>- <a href="#bytebase.v1.Announcement.AlertLevel"><span class="badge">E</span>Announcement.AlertLevel</a>- </li>-<li><a href="#bytebase.v1.DatabaseChangeMode"><span class="badge">E</span>DatabaseChangeMode</a></li>@@ -18002,13 +18010,6 @@ Uses character indices (not byte offsets) for display-oriented masking. </p></td</thead><tbody>- <tr>- <td>level</td>- <td><a href="#bytebase.v1.Announcement.AlertLevel">Announcement.AlertLevel</a></td>- <td></td>- <td><p>The alert level of announcement </p></td>- </tr>-<tr><td>text</td><td><a href="#string">string</a></td>@@ -18023,6 +18024,45 @@ Uses character indices (not byte offsets) for display-oriented masking. </p></td<td><p>The optional link, user can follow the link to check extra details </p></td></tr>+ <tr>+ <td>theme</td>+ <td><a href="#bytebase.v1.Announcement.AnnouncementTheme">Announcement.AnnouncementTheme</a></td>+ <td></td>+ <td><p>Banner colors. Built-in presets (info/warning/critical) are a+frontend-only concept that seeds these colors; the store only holds them. </p></td>+ </tr>++ </tbody>+ </table>++++++ <h3 id="bytebase.v1.Announcement.AnnouncementTheme">Announcement.AnnouncementTheme</h3>+ <p></p>+++ <table class="field-table">+ <thead>+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>background</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>"r g b" </p></td>+ </tr>++ <tr>+ <td>text</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>"r g b" </p></td>+ </tr>+</tbody></table>@@ -18784,6 +18824,82 @@ are /[a-z][0-9]-/. </p></td>+ <h3 id="bytebase.v1.SQLEditorThemeSetting">SQLEditorThemeSetting</h3>+ <p></p>+++ <table class="field-table">+ <thead>+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>id</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>name</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>monaco_base</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>tokens</td>+ <td><a href="#bytebase.v1.SQLEditorThemeSetting.TokensEntry">SQLEditorThemeSetting.TokensEntry</a></td>+ <td>repeated</td>+ <td><p> </p></td>+ </tr>++ </tbody>+ </table>++++++ <h3 id="bytebase.v1.SQLEditorThemeSetting.TokensEntry">SQLEditorThemeSetting.TokensEntry</h3>+ <p></p>+++ <table class="field-table">+ <thead>+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>key</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>value</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ </tbody>+ </table>+++++<h3 id="bytebase.v1.SemanticTypeSetting">SemanticTypeSetting</h3><p></p>@@ -19331,6 +19447,22 @@ The default value is 100MB, we will use the default value if the setting not exiRequires the EMAIL setting to be configured on the workspace. </p></td></tr>+ <tr>+ <td>sql_editor_theme_id</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>Enforced SQL Editor theme id: OPAQUE — a frontend-resolved built-in preset id+OR a custom theme's uuid. Empty ⇒ default light. </p></td>+ </tr>++ <tr>+ <td>sql_editor_custom_theme</td>+ <td><a href="#bytebase.v1.SQLEditorThemeSetting">SQLEditorThemeSetting</a></td>+ <td></td>+ <td><p>The enforced CUSTOM theme's full definition — present ONLY when+sql_editor_theme_id is a custom uuid. tokens is always complete. </p></td>+ </tr>+</tbody></table>@@ -19476,41 +19608,6 @@ Requires the EMAIL setting to be configured on the workspace. </p></td></tbody></table>- <h3 id="bytebase.v1.Announcement.AlertLevel">Announcement.AlertLevel</h3>- <p>We support three levels of AlertLevel: INFO, WARNING, and ERROR.</p>- <table class="enum-table">- <thead>- <tr><td>Name</td><td>Number</td><td>Description</td></tr>- </thead>- <tbody>-- <tr>- <td>ALERT_LEVEL_UNSPECIFIED</td>- <td>0</td>- <td><p></p></td>- </tr>-- <tr>- <td>INFO</td>- <td>1</td>- <td><p></p></td>- </tr>-- <tr>- <td>WARNING</td>- <td>2</td>- <td><p></p></td>- </tr>-- <tr>- <td>CRITICAL</td>- <td>3</td>- <td><p></p></td>- </tr>-- </tbody>- </table>-<h3 id="bytebase.v1.DatabaseChangeMode">DatabaseChangeMode</h3><p></p><table class="enum-table">diff --git a/proto/store/store/setting.proto b/proto/store/store/setting.protoindex c9397072b5..51d231ed4c 100644--- a/proto/store/store/setting.proto+++ b/proto/store/store/setting.proto@@ -36,22 +36,23 @@ message SystemSetting {message WorkspaceProfileSetting {message Announcement {- // We support three levels of AlertLevel: INFO, WARNING, and ERROR.- enum AlertLevel {- ALERT_LEVEL_UNSPECIFIED = 0;- INFO = 1;- WARNING = 2;- CRITICAL = 3;- }+ reserved 1;+ reserved "level";- // The alert level of the announcement.- AlertLevel level = 1;+ message AnnouncementTheme {+ string background = 1; // "r g b"+ string text = 2; // "r g b"+ }// The text of the announcement.string text = 2;// The optional link, user can follow the link to check extra detailsstring link = 3;++ // Banner colors. Built-in presets (info/warning/critical) are a+ // frontend-only concept that seeds these colors; the store only holds them.+ AnnouncementTheme theme = 4;}enum DatabaseChangeMode {@@ -148,6 +149,20 @@ message WorkspaceProfileSetting {// Allow signin/signup using email + a 6-digit one-time verification code.// Requires the EMAIL setting to be configured on the workspace.bool allow_email_code_signin = 22;++ // Enforced SQL Editor theme id: OPAQUE — a frontend-resolved built-in preset id+ // OR a custom theme's uuid. Empty ⇒ default light.+ string sql_editor_theme_id = 23;+ // The enforced CUSTOM theme's full definition — present ONLY when+ // sql_editor_theme_id is a custom uuid. tokens is always complete.+ SQLEditorThemeSetting sql_editor_custom_theme = 24;+}++message SQLEditorThemeSetting {+ string id = 1;+ string name = 2;+ string monaco_base = 3;+ map<string, string> tokens = 4;}message WorkspaceApprovalSetting {diff --git a/proto/v1/v1/setting_service.proto b/proto/v1/v1/setting_service.protoindex 98cea10be4..518448015c 100644--- a/proto/v1/v1/setting_service.proto+++ b/proto/v1/v1/setting_service.proto@@ -268,25 +268,40 @@ message WorkspaceProfileSetting {// Allow signin/signup using email + a 6-digit one-time verification code.// Requires the EMAIL setting to be configured on the workspace.bool allow_email_code_signin = 22;++ // Enforced SQL Editor theme id: OPAQUE — a frontend-resolved built-in preset id+ // OR a custom theme's uuid. Empty ⇒ default light.+ string sql_editor_theme_id = 23;+ // The enforced CUSTOM theme's full definition — present ONLY when+ // sql_editor_theme_id is a custom uuid. tokens is always complete.+ SQLEditorThemeSetting sql_editor_custom_theme = 24;+}++message SQLEditorThemeSetting {+ string id = 1;+ string name = 2;+ string monaco_base = 3;+ map<string, string> tokens = 4;}message Announcement {- // We support three levels of AlertLevel: INFO, WARNING, and ERROR.- enum AlertLevel {- ALERT_LEVEL_UNSPECIFIED = 0;- INFO = 1;- WARNING = 2;- CRITICAL = 3;- }+ reserved 1;+ reserved "level";- // The alert level of announcement- AlertLevel level = 1;+ message AnnouncementTheme {+ string background = 1; // "r g b"+ string text = 2; // "r g b"+ }// The text of announcementstring text = 2;// The optional link, user can follow the link to check extra detailsstring link = 3;++ // Banner colors. Built-in presets (info/warning/critical) are a+ // frontend-only concept that seeds these colors; the store only holds them.+ AnnouncementTheme theme = 4;}message WorkspaceApprovalSetting {