Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
chore: cleanup sheet api (#10588)
Danny Xua9704a513c9c
diff --git a/backend/api/v1/sheet_service.go b/backend/api/v1/sheet_service.goindex 6537b8f303..aa49afac7b 100644--- a/backend/api/v1/sheet_service.go+++ b/backend/api/v1/sheet_service.go@@ -3,7 +3,6 @@ package v1import ("context""fmt"- "slices""google.golang.org/grpc/codes""google.golang.org/grpc/status"@@ -162,8 +161,8 @@ func (s *SheetService) GetSheet(ctx context.Context, request *v1pb.GetSheetRequereturn nil, err}- // For issue sheets, check the bb.issues.get permission.- if s.profile.DevelopmentIAM && sheet.Source == store.SheetFromBytebaseArtifact {+ // Check the bb.issues.get permission.+ if s.profile.DevelopmentIAM {user, ok := ctx.Value(common.UserContextKey).(*store.UserMessage)if !ok {return nil, status.Errorf(codes.Internal, "user not found")@@ -184,16 +183,7 @@ func (s *SheetService) GetSheet(ctx context.Context, request *v1pb.GetSheetRequeif !ok {return nil, status.Errorf(codes.PermissionDenied, "permission denied to get sheet")}- } else {- canAccess, err := s.canReadSheet(ctx, sheet)- if err != nil {- return nil, status.Errorf(codes.Internal, fmt.Sprintf("failed to check access with error: %v", err))- }- if !canAccess {- return nil, status.Errorf(codes.PermissionDenied, "cannot access sheet %s", sheet.Title)- }}-v1pbSheet, err := s.convertToAPISheetMessage(ctx, sheet)if err != nil {return nil, err@@ -268,13 +258,6 @@ func (s *SheetService) UpdateSheet(ctx context.Context, request *v1pb.UpdateSheecase "content":statement := string(request.Sheet.Content)sheetPatch.Statement = &statement- case "visibility":- visibility, err := convertToStoreSheetVisibility(request.Sheet.Visibility)- if err != nil {- return nil, status.Errorf(codes.InvalidArgument, fmt.Sprintf("invalid visibility %q", request.Sheet.Visibility))- }- stringVisibility := string(visibility)- sheetPatch.Visibility = &stringVisibilitydefault:return nil, status.Errorf(codes.InvalidArgument, fmt.Sprintf("invalid update mask path %q", path))}@@ -324,13 +307,6 @@ func (s *SheetService) DeleteSheet(ctx context.Context, request *v1pb.DeleteSheeif sheet == nil {return nil, status.Errorf(codes.NotFound, fmt.Sprintf("sheet with id %d not found", sheetUID))}- canAccess, err := s.canWriteSheet(ctx, sheet)- if err != nil {- return nil, status.Errorf(codes.Internal, fmt.Sprintf("failed to check access with error: %v", err))- }- if !canAccess {- return nil, status.Errorf(codes.PermissionDenied, "cannot write sheet %s", sheet.Title)- }if err := s.store.DeleteSheet(ctx, sheetUID); err != nil {return nil, status.Errorf(codes.Internal, fmt.Sprintf("failed to delete sheet: %v", err))@@ -383,35 +359,6 @@ func (s *SheetService) canWriteSheet(ctx context.Context, sheet *store.SheetMessreturn false, nil}-// canReadSheet check if the principal can read the sheet.-// sheet is readable when:-// PRIVATE: the creator only.-// PROJECT: the creator and members in the project.-// PUBLIC: everyone in the workspace.-func (s *SheetService) canReadSheet(ctx context.Context, sheet *store.SheetMessage) (bool, error) {- user, ok := ctx.Value(common.UserContextKey).(*store.UserMessage)- if !ok {- return false, status.Errorf(codes.Internal, "user not found")- }-- switch sheet.Visibility {- case store.PrivateSheet:- return sheet.CreatorID == user.ID, nil- case store.PublicSheet:- return true, nil- case store.ProjectSheet:- if slices.Contains(user.Roles, api.WorkspaceAdmin) || slices.Contains(user.Roles, api.WorkspaceDBA) {- return true, nil- }- projectRoles, err := s.findProjectRoles(ctx, sheet.ProjectUID, user)- if err != nil {- return false, err- }- return len(projectRoles) > 0, nil- }- return false, nil-}-func (s *SheetService) findProjectRoles(ctx context.Context, projectUID int, user *store.UserMessage) (map[api.Role]bool, error) {policy, err := s.store.GetProjectPolicy(ctx, &store.GetProjectPolicyMessage{UID: &projectUID})if err != nil {@@ -435,31 +382,6 @@ func (s *SheetService) convertToAPISheetMessage(ctx context.Context, sheet *stordatabaseParent = fmt.Sprintf("%s%s/%s%s", common.InstanceNamePrefix, database.InstanceID, common.DatabaseIDPrefix, database.DatabaseName)}- visibility := v1pb.Sheet_VISIBILITY_UNSPECIFIED- switch sheet.Visibility {- case store.PublicSheet:- visibility = v1pb.Sheet_VISIBILITY_PUBLIC- case store.ProjectSheet:- visibility = v1pb.Sheet_VISIBILITY_PROJECT- case store.PrivateSheet:- visibility = v1pb.Sheet_VISIBILITY_PRIVATE- }-- source := v1pb.Sheet_SOURCE_UNSPECIFIED- switch sheet.Source {- case store.SheetFromBytebase:- source = v1pb.Sheet_SOURCE_BYTEBASE- case store.SheetFromBytebaseArtifact:- source = v1pb.Sheet_SOURCE_BYTEBASE_ARTIFACT- }-- tp := v1pb.Sheet_TYPE_UNSPECIFIED- switch sheet.Type {- case store.SheetForSQL:- tp = v1pb.Sheet_TYPE_SQL- default:- }-creator, err := s.store.GetUserByID(ctx, sheet.CreatorID)if err != nil {return nil, status.Errorf(codes.Internal, fmt.Sprintf("failed to get creator: %v", err))@@ -498,50 +420,21 @@ func (s *SheetService) convertToAPISheetMessage(ctx context.Context, sheet *storUpdateTime: timestamppb.New(sheet.UpdatedTime),Content: []byte(sheet.Statement),ContentSize: sheet.Size,- Visibility: visibility,- Source: source,- Type: tp,- Starred: sheet.Starred,PushEvent: v1PushEvent,Payload: v1SheetPayload,}, nil}func convertToStoreSheetMessage(projectUID int, databaseUID *int, creatorID int, sheet *v1pb.Sheet) (*store.SheetMessage, error) {- visibility, err := convertToStoreSheetVisibility(sheet.Visibility)- if err != nil {- return nil, err- }- var source store.SheetSource- switch sheet.Source {- case v1pb.Sheet_SOURCE_UNSPECIFIED:- return nil, status.Errorf(codes.InvalidArgument, fmt.Sprintf("invalid source %q", sheet.Source))- case v1pb.Sheet_SOURCE_BYTEBASE:- source = store.SheetFromBytebase- case v1pb.Sheet_SOURCE_BYTEBASE_ARTIFACT:- source = store.SheetFromBytebaseArtifact- default:- source = store.SheetFromBytebaseArtifact- }- var tp store.SheetType- switch sheet.Type {- case v1pb.Sheet_TYPE_UNSPECIFIED:- return nil, status.Errorf(codes.InvalidArgument, fmt.Sprintf("invalid type %q", sheet.Type))- case v1pb.Sheet_TYPE_SQL:- tp = store.SheetForSQL- default:- return nil, status.Errorf(codes.InvalidArgument, fmt.Sprintf("invalid type %q", sheet.Type))- }-sheetMessage := &store.SheetMessage{ProjectUID: projectUID,DatabaseUID: databaseUID,CreatorID: creatorID,Title: sheet.Title,Statement: string(sheet.Content),- Visibility: visibility,- Source: source,- Type: tp,+ Visibility: store.ProjectSheet,+ Source: store.SheetFromBytebaseArtifact,+ Type: store.SheetForSQL,}if sheet.Payload != nil {sheetMessage.Payload = &storepb.SheetPayload{@@ -552,18 +445,3 @@ func convertToStoreSheetMessage(projectUID int, databaseUID *int, creatorID int,return sheetMessage, nil}--func convertToStoreSheetVisibility(visibility v1pb.Sheet_Visibility) (store.SheetVisibility, error) {- switch visibility {- case v1pb.Sheet_VISIBILITY_UNSPECIFIED:- return store.SheetVisibility(""), status.Errorf(codes.InvalidArgument, fmt.Sprintf("invalid visibility %q", visibility))- case v1pb.Sheet_VISIBILITY_PUBLIC:- return store.PublicSheet, nil- case v1pb.Sheet_VISIBILITY_PROJECT:- return store.ProjectSheet, nil- case v1pb.Sheet_VISIBILITY_PRIVATE:- return store.PrivateSheet, nil- default:- return store.SheetVisibility(""), status.Errorf(codes.InvalidArgument, fmt.Sprintf("invalid visibility %q", visibility))- }-}diff --git a/backend/tests/change_history_test.go b/backend/tests/change_history_test.goindex 060218f6fc..c4a22d2ebc 100644--- a/backend/tests/change_history_test.go+++ b/backend/tests/change_history_test.go@@ -114,11 +114,8 @@ func TestFilterChangeHistoryByResources(t *testing.T) {sheet, err := ctl.sheetServiceClient.CreateSheet(ctx, &v1pb.CreateSheetRequest{Parent: ctl.project.Name,Sheet: &v1pb.Sheet{- Title: fmt.Sprintf("migration statement sheet %d", i+1),- Content: []byte(stmt),- Visibility: v1pb.Sheet_VISIBILITY_PROJECT,- Source: v1pb.Sheet_SOURCE_BYTEBASE_ARTIFACT,- Type: v1pb.Sheet_TYPE_SQL,+ Title: fmt.Sprintf("migration statement sheet %d", i+1),+ Content: []byte(stmt),},})a.NoError(err)diff --git a/backend/tests/ghost_test.go b/backend/tests/ghost_test.goindex 6379ab5c64..27eea071b5 100644--- a/backend/tests/ghost_test.go+++ b/backend/tests/ghost_test.go@@ -124,11 +124,8 @@ func TestGhostSchemaUpdate(t *testing.T) {sheet1, err := ctl.sheetServiceClient.CreateSheet(ctx, &v1pb.CreateSheetRequest{Parent: ctl.project.Name,Sheet: &v1pb.Sheet{- Title: "migration statement sheet 1",- Content: []byte(mysqlMigrationStatement),- Visibility: v1pb.Sheet_VISIBILITY_PROJECT,- Source: v1pb.Sheet_SOURCE_BYTEBASE_ARTIFACT,- Type: v1pb.Sheet_TYPE_SQL,+ Title: "migration statement sheet 1",+ Content: []byte(mysqlMigrationStatement),},})a.NoError(err)@@ -143,11 +140,8 @@ func TestGhostSchemaUpdate(t *testing.T) {sheet2, err := ctl.sheetServiceClient.CreateSheet(ctx, &v1pb.CreateSheetRequest{Parent: ctl.project.Name,Sheet: &v1pb.Sheet{- Title: "migration statement sheet 2",- Content: []byte(mysqlGhostMigrationStatement),- Visibility: v1pb.Sheet_VISIBILITY_PROJECT,- Source: v1pb.Sheet_SOURCE_BYTEBASE_ARTIFACT,- Type: v1pb.Sheet_TYPE_SQL,+ Title: "migration statement sheet 2",+ Content: []byte(mysqlGhostMigrationStatement),},})a.NoError(err)@@ -272,11 +266,8 @@ func TestGhostTenant(t *testing.T) {sheet1, err := ctl.sheetServiceClient.CreateSheet(ctx, &v1pb.CreateSheetRequest{Parent: ctl.project.Name,Sheet: &v1pb.Sheet{- Title: "migration statement sheet 1",- Content: []byte(mysqlMigrationStatement),- Visibility: v1pb.Sheet_VISIBILITY_PROJECT,- Source: v1pb.Sheet_SOURCE_BYTEBASE_ARTIFACT,- Type: v1pb.Sheet_TYPE_SQL,+ Title: "migration statement sheet 1",+ Content: []byte(mysqlMigrationStatement),},})a.NoError(err)@@ -312,11 +303,8 @@ func TestGhostTenant(t *testing.T) {sheet2, err := ctl.sheetServiceClient.CreateSheet(ctx, &v1pb.CreateSheetRequest{Parent: ctl.project.Name,Sheet: &v1pb.Sheet{- Title: "migration statement sheet 2",- Content: []byte(mysqlGhostMigrationStatement),- Visibility: v1pb.Sheet_VISIBILITY_PROJECT,- Source: v1pb.Sheet_SOURCE_BYTEBASE_ARTIFACT,- Type: v1pb.Sheet_TYPE_SQL,+ Title: "migration statement sheet 2",+ Content: []byte(mysqlGhostMigrationStatement),},})a.NoError(err)diff --git a/backend/tests/grouping_change_test.go b/backend/tests/grouping_change_test.goindex f06ee1a6b3..284861a601 100644--- a/backend/tests/grouping_change_test.go+++ b/backend/tests/grouping_change_test.go@@ -792,11 +792,8 @@ ALTER TABLE singleton ADD COLUMN num INT;`,sheet, err := ctl.sheetServiceClient.CreateSheet(ctx, &v1pb.CreateSheetRequest{Parent: ctl.project.Name,Sheet: &v1pb.Sheet{- Title: "migration statement sheet",- Content: []byte(tc.statement),- Visibility: v1pb.Sheet_VISIBILITY_PROJECT,- Source: v1pb.Sheet_SOURCE_BYTEBASE_ARTIFACT,- Type: v1pb.Sheet_TYPE_SQL,+ Title: "migration statement sheet",+ Content: []byte(tc.statement),},})a.NoError(err)diff --git a/backend/tests/rollback_test.go b/backend/tests/rollback_test.goindex aeb4868bab..4a5ae34752 100644--- a/backend/tests/rollback_test.go+++ b/backend/tests/rollback_test.go@@ -79,9 +79,6 @@ func TestCreateRollbackIssueMySQL(t *testing.T) {DELETE FROM t WHERE id = 1;UPDATE t SET name = 'unknown\nunknown';`),- Visibility: v1pb.Sheet_VISIBILITY_PROJECT,- Source: v1pb.Sheet_SOURCE_BYTEBASE_ARTIFACT,- Type: v1pb.Sheet_TYPE_SQL,},})a.NoError(err)@@ -229,9 +226,6 @@ func TestCreateRollbackIssueMySQLByPatch(t *testing.T) {DELETE FROM t WHERE id = 1;UPDATE t SET name = 'unknown\nunknown';`),- Visibility: v1pb.Sheet_VISIBILITY_PROJECT,- Source: v1pb.Sheet_SOURCE_BYTEBASE_ARTIFACT,- Type: v1pb.Sheet_TYPE_SQL,},})a.NoError(err)@@ -390,9 +384,6 @@ func TestRollbackCanceled(t *testing.T) {DELETE FROM t WHERE id = 1;UPDATE t SET name = 'unknown\nunknown';`),- Visibility: v1pb.Sheet_VISIBILITY_PROJECT,- Source: v1pb.Sheet_SOURCE_BYTEBASE_ARTIFACT,- Type: v1pb.Sheet_TYPE_SQL,},})a.NoError(err)diff --git a/backend/tests/schema_update_test.go b/backend/tests/schema_update_test.goindex 9516ee7f6f..0ea9573d90 100644--- a/backend/tests/schema_update_test.go+++ b/backend/tests/schema_update_test.go@@ -104,11 +104,8 @@ func TestSchemaAndDataUpdate(t *testing.T) {sheet, err := ctl.sheetServiceClient.CreateSheet(ctx, &v1pb.CreateSheetRequest{Parent: ctl.project.Name,Sheet: &v1pb.Sheet{- Title: "migration statement sheet",- Content: []byte(migrationStatement),- Visibility: v1pb.Sheet_VISIBILITY_PROJECT,- Source: v1pb.Sheet_SOURCE_BYTEBASE_ARTIFACT,- Type: v1pb.Sheet_TYPE_SQL,+ Title: "migration statement sheet",+ Content: []byte(migrationStatement),},})a.NoError(err)@@ -125,11 +122,8 @@ func TestSchemaAndDataUpdate(t *testing.T) {sheet, err = ctl.sheetServiceClient.CreateSheet(ctx, &v1pb.CreateSheetRequest{Parent: ctl.project.Name,Sheet: &v1pb.Sheet{- Title: "dataUpdateStatement",- Content: []byte(dataUpdateStatement),- Visibility: v1pb.Sheet_VISIBILITY_PROJECT,- Source: v1pb.Sheet_SOURCE_BYTEBASE_ARTIFACT,- Type: v1pb.Sheet_TYPE_SQL,+ Title: "dataUpdateStatement",+ Content: []byte(dataUpdateStatement),},})a.NoError(err)@@ -554,11 +548,8 @@ func TestVCS(t *testing.T) {sheet, err := ctl.sheetServiceClient.CreateSheet(ctx, &v1pb.CreateSheetRequest{Parent: ctl.project.Name,Sheet: &v1pb.Sheet{- Title: "migration statement 4 sheet",- Content: []byte(migrationStatement4),- Visibility: v1pb.Sheet_VISIBILITY_PROJECT,- Source: v1pb.Sheet_SOURCE_BYTEBASE_ARTIFACT,- Type: v1pb.Sheet_TYPE_SQL,+ Title: "migration statement 4 sheet",+ Content: []byte(migrationStatement4),},})a.NoError(err)@@ -1966,11 +1957,8 @@ CREATE TABLE public.book (ddlSheet, err := ctl.sheetServiceClient.CreateSheet(ctx, &v1pb.CreateSheetRequest{Parent: ctl.project.Name,Sheet: &v1pb.Sheet{- Title: "test ddl",- Content: []byte(test.ddl),- Visibility: v1pb.Sheet_VISIBILITY_PROJECT,- Source: v1pb.Sheet_SOURCE_BYTEBASE_ARTIFACT,- Type: v1pb.Sheet_TYPE_SQL,+ Title: "test ddl",+ Content: []byte(test.ddl),},})a.NoError(err)@@ -2048,11 +2036,8 @@ func TestMarkTaskAsDone(t *testing.T) {sheet, err := ctl.sheetServiceClient.CreateSheet(ctx, &v1pb.CreateSheetRequest{Parent: ctl.project.Name,Sheet: &v1pb.Sheet{- Title: "migration statement sheet",- Content: []byte(migrationStatement),- Visibility: v1pb.Sheet_VISIBILITY_PROJECT,- Source: v1pb.Sheet_SOURCE_BYTEBASE_ARTIFACT,- Type: v1pb.Sheet_TYPE_SQL,+ Title: "migration statement sheet",+ Content: []byte(migrationStatement),},})a.NoError(err)diff --git a/backend/tests/sensitive_data_test.go b/backend/tests/sensitive_data_test.goindex 04068c40a8..ab206388cf 100644--- a/backend/tests/sensitive_data_test.go+++ b/backend/tests/sensitive_data_test.go@@ -165,11 +165,8 @@ func TestSensitiveData(t *testing.T) {sheet, err := ctl.sheetServiceClient.CreateSheet(ctx, &v1pb.CreateSheetRequest{Parent: ctl.project.Name,Sheet: &v1pb.Sheet{- Title: "createTable",- Content: []byte(createTable),- Visibility: v1pb.Sheet_VISIBILITY_PROJECT,- Source: v1pb.Sheet_SOURCE_BYTEBASE_ARTIFACT,- Type: v1pb.Sheet_TYPE_SQL,+ Title: "createTable",+ Content: []byte(createTable),},})a.NoError(err)@@ -206,11 +203,8 @@ func TestSensitiveData(t *testing.T) {insertDataSheet, err := ctl.sheetServiceClient.CreateSheet(ctx, &v1pb.CreateSheetRequest{Parent: ctl.project.Name,Sheet: &v1pb.Sheet{- Title: "insertData",- Content: []byte(insertData),- Visibility: v1pb.Sheet_VISIBILITY_PROJECT,- Source: v1pb.Sheet_SOURCE_BYTEBASE_ARTIFACT,- Type: v1pb.Sheet_TYPE_SQL,+ Title: "insertData",+ Content: []byte(insertData),},})a.NoError(err)diff --git a/backend/tests/sql_editor_test.go b/backend/tests/sql_editor_test.goindex b9d64b64e1..788d8dc2fb 100644--- a/backend/tests/sql_editor_test.go+++ b/backend/tests/sql_editor_test.go@@ -180,11 +180,8 @@ func TestAdminQueryAffectedRows(t *testing.T) {sheet, err := ctl.sheetServiceClient.CreateSheet(ctx, &v1pb.CreateSheetRequest{Parent: ctl.project.Name,Sheet: &v1pb.Sheet{- Title: "prepareStatements",- Content: []byte(tt.prepareStatements),- Visibility: v1pb.Sheet_VISIBILITY_PROJECT,- Source: v1pb.Sheet_SOURCE_BYTEBASE_ARTIFACT,- Type: v1pb.Sheet_TYPE_SQL,+ Title: "prepareStatements",+ Content: []byte(tt.prepareStatements),},})a.NoError(err)diff --git a/backend/tests/sql_export_test.go b/backend/tests/sql_export_test.goindex 647a1d27bd..5ae99d21d1 100644--- a/backend/tests/sql_export_test.go+++ b/backend/tests/sql_export_test.go@@ -149,11 +149,8 @@ func TestSQLExport(t *testing.T) {sheet, err := ctl.sheetServiceClient.CreateSheet(ctx, &v1pb.CreateSheetRequest{Parent: ctl.project.Name,Sheet: &v1pb.Sheet{- Title: "prepareStatements",- Content: []byte(tt.prepareStatements),- Visibility: v1pb.Sheet_VISIBILITY_PROJECT,- Source: v1pb.Sheet_SOURCE_BYTEBASE_ARTIFACT,- Type: v1pb.Sheet_TYPE_SQL,+ Title: "prepareStatements",+ Content: []byte(tt.prepareStatements),},})a.NoError(err)diff --git a/backend/tests/sql_review_test.go b/backend/tests/sql_review_test.goindex 474e61d0bd..35e937d3b2 100644--- a/backend/tests/sql_review_test.go+++ b/backend/tests/sql_review_test.go@@ -450,11 +450,8 @@ func createIssueAndReturnSQLReviewResult(ctx context.Context, a *require.Assertisheet, err := ctl.sheetServiceClient.CreateSheet(ctx, &v1pb.CreateSheetRequest{Parent: project.Name,Sheet: &v1pb.Sheet{- Title: "statement",- Content: []byte(statement),- Visibility: v1pb.Sheet_VISIBILITY_PROJECT,- Source: v1pb.Sheet_SOURCE_BYTEBASE_ARTIFACT,- Type: v1pb.Sheet_TYPE_SQL,+ Title: "statement",+ Content: []byte(statement),},})a.NoError(err)diff --git a/backend/tests/sync_schema_test.go b/backend/tests/sync_schema_test.goindex 6d69114cbe..c72676f2e8 100644--- a/backend/tests/sync_schema_test.go+++ b/backend/tests/sync_schema_test.go@@ -95,11 +95,8 @@ DROP SCHEMA "schema_a";sheet, err := ctl.sheetServiceClient.CreateSheet(ctx, &v1pb.CreateSheetRequest{Parent: ctl.project.Name,Sheet: &v1pb.Sheet{- Title: "create schema",- Content: []byte(createSchema),- Visibility: v1pb.Sheet_VISIBILITY_PROJECT,- Source: v1pb.Sheet_SOURCE_BYTEBASE_ARTIFACT,- Type: v1pb.Sheet_TYPE_SQL,+ Title: "create schema",+ Content: []byte(createSchema),},})a.NoError(err)diff --git a/backend/tests/syncer_test.go b/backend/tests/syncer_test.goindex c771058b59..02484196f7 100644--- a/backend/tests/syncer_test.go+++ b/backend/tests/syncer_test.go@@ -207,11 +207,8 @@ func TestSyncerForPostgreSQL(t *testing.T) {sheet, err := ctl.sheetServiceClient.CreateSheet(ctx, &v1pb.CreateSheetRequest{Parent: ctl.project.Name,Sheet: &v1pb.Sheet{- Title: "create schema",- Content: []byte(createSchema),- Visibility: v1pb.Sheet_VISIBILITY_PROJECT,- Source: v1pb.Sheet_SOURCE_BYTEBASE_ARTIFACT,- Type: v1pb.Sheet_TYPE_SQL,+ Title: "create schema",+ Content: []byte(createSchema),},})a.NoError(err)@@ -481,11 +478,8 @@ func TestSyncerForMySQL(t *testing.T) {sheet, err := ctl.sheetServiceClient.CreateSheet(ctx, &v1pb.CreateSheetRequest{Parent: ctl.project.Name,Sheet: &v1pb.Sheet{- Title: "create schema",- Content: []byte(createSchema),- Visibility: v1pb.Sheet_VISIBILITY_PROJECT,- Source: v1pb.Sheet_SOURCE_BYTEBASE_ARTIFACT,- Type: v1pb.Sheet_TYPE_SQL,+ Title: "create schema",+ Content: []byte(createSchema),},})a.NoError(err)diff --git a/backend/tests/tenant_test.go b/backend/tests/tenant_test.goindex e7867a68c4..74254283b9 100644--- a/backend/tests/tenant_test.go+++ b/backend/tests/tenant_test.go@@ -155,11 +155,8 @@ func TestTenant(t *testing.T) {sheet, err := ctl.sheetServiceClient.CreateSheet(ctx, &v1pb.CreateSheetRequest{Parent: project.Name,Sheet: &v1pb.Sheet{- Title: "migration statement sheet",- Content: []byte(migrationStatement),- Visibility: v1pb.Sheet_VISIBILITY_PROJECT,- Source: v1pb.Sheet_SOURCE_BYTEBASE_ARTIFACT,- Type: v1pb.Sheet_TYPE_SQL,+ Title: "migration statement sheet",+ Content: []byte(migrationStatement),},})a.NoError(err)diff --git a/frontend/src/components/Branch/BranchRolloutView/BranchRolloutView.vue b/frontend/src/components/Branch/BranchRolloutView/BranchRolloutView.vueindex a9132878f5..e0171f6f90 100644--- a/frontend/src/components/Branch/BranchRolloutView/BranchRolloutView.vue+++ b/frontend/src/components/Branch/BranchRolloutView/BranchRolloutView.vue@@ -143,13 +143,7 @@ import { ComposedDatabase, ComposedProject, UNKNOWN_ID } from "@/types";import { Branch } from "@/types/proto/v1/branch_service";import { DatabaseMetadata } from "@/types/proto/v1/database_service";import { Environment } from "@/types/proto/v1/environment_service";-import {- Sheet,- SheetPayload_Type,- Sheet_Source,- Sheet_Type,- Sheet_Visibility,-} from "@/types/proto/v1/sheet_service";+import { Sheet, SheetPayload_Type } from "@/types/proto/v1/sheet_service";import {defer,extractProjectResourceName,@@ -341,9 +335,6 @@ const handlePreviewIssue = async () => {}const sheet = Sheet.fromPartial({database: db.name,- visibility: Sheet_Visibility.VISIBILITY_PROJECT,- type: Sheet_Type.TYPE_SQL,- source: Sheet_Source.SOURCE_BYTEBASE_ARTIFACT,payload: {type: SheetPayload_Type.SCHEMA_DESIGN,baselineDatabaseConfig: {diff --git a/frontend/src/components/IssueV1/components/StatementSection/EditorView/EditorView.vue b/frontend/src/components/IssueV1/components/StatementSection/EditorView/EditorView.vueindex e572086f62..95e04ffd49 100644--- a/frontend/src/components/IssueV1/components/StatementSection/EditorView/EditorView.vue+++ b/frontend/src/components/IssueV1/components/StatementSection/EditorView/EditorView.vue@@ -200,9 +200,6 @@<div>sheetName: {{ sheetName }}</div><div>sheetReady: {{ sheetReady }}</div><div>sheetStatement.length: {{ sheetStatement.length }}</div>- <div>sheet.source: {{ sheet?.source }}</div>- <div>sheet.type: {{ sheet?.type }}</div>- <div>sheet.visibility: {{ sheet?.visibility }}</div><div>sheet.title: {{ sheet?.title }}</div><div>sheet.content.length: {{ sheet?.content?.length }}</div><div>isTaskSheetOversize: {{ isTaskSheetOversize }}</div>diff --git a/frontend/src/components/IssueV1/logic/sheet.ts b/frontend/src/components/IssueV1/logic/sheet.tsindex 3feca1996d..ad6a875b7b 100644--- a/frontend/src/components/IssueV1/logic/sheet.ts+++ b/frontend/src/components/IssueV1/logic/sheet.ts@@ -1,21 +1,10 @@import { reactive } from "vue";-import {- Sheet,- Sheet_Source,- Sheet_Type,- Sheet_Visibility,-} from "@/types/proto/v1/sheet_service";+import { Sheet } from "@/types/proto/v1/sheet_service";const sheetsByName = reactive(new Map<string, Sheet>());export const createEmptyLocalSheet = () => {- return reactive(- Sheet.fromJSON({- source: Sheet_Source.SOURCE_BYTEBASE_ARTIFACT,- visibility: Sheet_Visibility.VISIBILITY_PROJECT,- type: Sheet_Type.TYPE_SQL,- })- );+ return reactive(Sheet.fromJSON({}));};export const getLocalSheetByName = (name: string) => {diff --git a/frontend/src/components/SyncDatabaseSchema/RawSQLEditor.vue b/frontend/src/components/SyncDatabaseSchema/RawSQLEditor.vueindex 00712dcd00..cbd5c165ee 100644--- a/frontend/src/components/SyncDatabaseSchema/RawSQLEditor.vue+++ b/frontend/src/components/SyncDatabaseSchema/RawSQLEditor.vue@@ -88,11 +88,6 @@ import {dialectOfEngineV1,} from "@/types";import { Engine } from "@/types/proto/v1/common";-import {- Sheet_Source,- Sheet_Type,- Sheet_Visibility,-} from "@/types/proto/v1/sheet_service";import {engineNameV1,extractSheetUID,@@ -209,9 +204,6 @@ const handleUploadFile = (e: Event) => {const sheet = await sheetStore.createSheet(DEFAULT_PROJECT_V1_NAME, {title: file.name,content: new TextEncoder().encode(statement),- visibility: Sheet_Visibility.VISIBILITY_PROJECT,- source: Sheet_Source.SOURCE_BYTEBASE_ARTIFACT,- type: Sheet_Type.TYPE_SQL,});const sheetId = Number(extractSheetUID(sheet.name));await handleStatementChange(statement);diff --git a/frontend/src/store/modules/v1/localSheet.ts b/frontend/src/store/modules/v1/localSheet.tsindex df14179ae3..39198ba975 100644--- a/frontend/src/store/modules/v1/localSheet.ts+++ b/frontend/src/store/modules/v1/localSheet.ts@@ -1,12 +1,6 @@import { defineStore } from "pinia";import { reactive } from "vue";-import {- Sheet,- Sheet_Source,- Sheet_Type,- Sheet_Visibility,- DeepPartial,-} from "@/types/proto/v1/sheet_service";+import { Sheet, DeepPartial } from "@/types/proto/v1/sheet_service";import { extractProjectResourceName } from "@/utils";import { useSheetV1Store } from "./sheet";@@ -32,9 +26,6 @@ export const useLocalSheetStore = defineStore("local_sheet", () => {return reactive(Sheet.fromPartial({name,- source: Sheet_Source.SOURCE_BYTEBASE_ARTIFACT,- visibility: Sheet_Visibility.VISIBILITY_PROJECT,- type: Sheet_Type.TYPE_SQL,...defaults,}));diff --git a/frontend/src/store/modules/v1/sheet.ts b/frontend/src/store/modules/v1/sheet.tsindex 1592319075..0ac4250576 100644--- a/frontend/src/store/modules/v1/sheet.ts+++ b/frontend/src/store/modules/v1/sheet.ts@@ -170,12 +170,6 @@ const getUpdateMaskForSheet = () {updateMask.push("content");}- if (- !isUndefined(update.visibility) &&- !isEqual(origin.visibility, update.visibility)- ) {- updateMask.push("visibility");- }return updateMask;};diff --git a/frontend/src/types/proto/google/protobuf/descriptor.ts b/frontend/src/types/proto/google/protobuf/descriptor.tsindex e5804c3efe..824c1150fd 100644--- a/frontend/src/types/proto/google/protobuf/descriptor.ts+++ b/frontend/src/types/proto/google/protobuf/descriptor.ts@@ -4,6 +4,98 @@ import _m0 from "protobufjs/minimal";export const protobufPackage = "google.protobuf";+/** The full set of known editions. */+export enum Edition {+ /** EDITION_UNKNOWN - A placeholder for an unknown edition value. */+ EDITION_UNKNOWN = 0,+ /**+ * EDITION_PROTO2 - Legacy syntax "editions". These pre-date editions, but behave much like+ * distinct editions. These can't be used to specify the edition of proto+ * files, but feature definitions must supply proto2/proto3 defaults for+ * backwards compatibility.+ */+ EDITION_PROTO2 = 998,+ EDITION_PROTO3 = 999,+ /**+ * EDITION_2023 - Editions that have been released. The specific values are arbitrary and+ * should not be depended on, but they will always be time-ordered for easy+ * comparison.+ */+ EDITION_2023 = 1000,+ /**+ * EDITION_1_TEST_ONLY - Placeholder editions for testing feature resolution. These should not be+ * used or relyed on outside of tests.+ */+ EDITION_1_TEST_ONLY = 1,+ EDITION_2_TEST_ONLY = 2,+ EDITION_99997_TEST_ONLY = 99997,+ EDITION_99998_TEST_ONLY = 99998,+ EDITION_99999_TEST_ONLY = 99999,+ UNRECOGNIZED = -1,+}++export function editionFromJSON(object: any): Edition {+ switch (object) {+ case 0:+ case "EDITION_UNKNOWN":+ return Edition.EDITION_UNKNOWN;+ case 998:+ case "EDITION_PROTO2":+ return Edition.EDITION_PROTO2;+ case 999:+ case "EDITION_PROTO3":+ return Edition.EDITION_PROTO3;+ case 1000:+ case "EDITION_2023":+ return Edition.EDITION_2023;+ case 1:+ case "EDITION_1_TEST_ONLY":+ return Edition.EDITION_1_TEST_ONLY;+ case 2:+ case "EDITION_2_TEST_ONLY":+ return Edition.EDITION_2_TEST_ONLY;+ case 99997:+ case "EDITION_99997_TEST_ONLY":+ return Edition.EDITION_99997_TEST_ONLY;+ case 99998:+ case "EDITION_99998_TEST_ONLY":+ return Edition.EDITION_99998_TEST_ONLY;+ case 99999:+ case "EDITION_99999_TEST_ONLY":+ return Edition.EDITION_99999_TEST_ONLY;+ case -1:+ case "UNRECOGNIZED":+ default:+ return Edition.UNRECOGNIZED;+ }+}++export function editionToJSON(object: Edition): string {+ switch (object) {+ case Edition.EDITION_UNKNOWN:+ return "EDITION_UNKNOWN";+ case Edition.EDITION_PROTO2:+ return "EDITION_PROTO2";+ case Edition.EDITION_PROTO3:+ return "EDITION_PROTO3";+ case Edition.EDITION_2023:+ return "EDITION_2023";+ case Edition.EDITION_1_TEST_ONLY:+ return "EDITION_1_TEST_ONLY";+ case Edition.EDITION_2_TEST_ONLY:+ return "EDITION_2_TEST_ONLY";+ case Edition.EDITION_99997_TEST_ONLY:+ return "EDITION_99997_TEST_ONLY";+ case Edition.EDITION_99998_TEST_ONLY:+ return "EDITION_99998_TEST_ONLY";+ case Edition.EDITION_99999_TEST_ONLY:+ return "EDITION_99999_TEST_ONLY";+ case Edition.UNRECOGNIZED:+ default:+ return "UNRECOGNIZED";+ }+}+/*** The protocol compiler can output a FileDescriptorSet containing the .proto* files it parses.@@ -51,8 +143,8 @@ export interface FileDescriptorProto {* If `edition` is present, this value must be "editions".*/syntax: string;- /** The edition of the proto file, which is an opaque string. */- edition: string;+ /** The edition of the proto file. */+ edition: Edition;}/** Describes a message type. */@@ -96,6 +188,84 @@ export interface DescriptorProto_ReservedRange {export interface ExtensionRangeOptions {/** The parser stores options it doesn't recognize here. See above. */uninterpretedOption: UninterpretedOption[];+ /**+ * For external users: DO NOT USE. We are in the process of open sourcing+ * extension declaration and executing internal cleanups before it can be+ * used externally.+ */+ declaration: ExtensionRangeOptions_Declaration[];+ /** Any features defined in the specific edition. */+ features:+ | FeatureSet+ | undefined;+ /**+ * The verification state of the range.+ * TODO: flip the default to DECLARATION once all empty ranges+ * are marked as UNVERIFIED.+ */+ verification: ExtensionRangeOptions_VerificationState;+}++/** The verification state of the extension range. */+export enum ExtensionRangeOptions_VerificationState {+ /** DECLARATION - All the extensions of the range must be declared. */+ DECLARATION = 0,+ UNVERIFIED = 1,+ UNRECOGNIZED = -1,+}++export function extensionRangeOptions_VerificationStateFromJSON(object: any): ExtensionRangeOptions_VerificationState {+ switch (object) {+ case 0:+ case "DECLARATION":+ return ExtensionRangeOptions_VerificationState.DECLARATION;+ case 1:+ case "UNVERIFIED":+ return ExtensionRangeOptions_VerificationState.UNVERIFIED;+ case -1:+ case "UNRECOGNIZED":+ default:+ return ExtensionRangeOptions_VerificationState.UNRECOGNIZED;+ }+}++export function extensionRangeOptions_VerificationStateToJSON(object: ExtensionRangeOptions_VerificationState): string {+ switch (object) {+ case ExtensionRangeOptions_VerificationState.DECLARATION:+ return "DECLARATION";+ case ExtensionRangeOptions_VerificationState.UNVERIFIED:+ return "UNVERIFIED";+ case ExtensionRangeOptions_VerificationState.UNRECOGNIZED:+ default:+ return "UNRECOGNIZED";+ }+}++export interface ExtensionRangeOptions_Declaration {+ /** The extension number declared within the extension range. */+ number: number;+ /**+ * The fully-qualified name of the extension field. There must be a leading+ * dot in front of the full name.+ */+ fullName: string;+ /**+ * The fully-qualified type name of the extension field. Unlike+ * Metadata.type, Declaration.type must have a leading dot for messages+ * and enums.+ */+ type: string;+ /**+ * If true, indicates that the number is reserved in the extension range,+ * and any extension field with the number will fail to compile. Set this+ * when a declared extension field is deleted.+ */+ reserved: boolean;+ /**+ * If true, indicates that the extension must be defined as repeated.+ * Otherwise the extension must be defined as optional.+ */+ repeated: boolean;}/** Describes a field within a message. */@@ -193,9 +363,10 @@ export enum FieldDescriptorProto_Type {TYPE_STRING = 9,/*** TYPE_GROUP - Tag-delimited aggregate.- * Group type is deprecated and not supported in proto3. However, Proto3+ * Group type is deprecated and not supported after google.protobuf. However, Proto3* implementations should still be able to parse the group wire format and- * treat group fields as unknown fields.+ * treat group fields as unknown fields. In Editions, the group wire format+ * can be enabled via the `message_encoding` feature.*/TYPE_GROUP = 10,/** TYPE_MESSAGE - Length-delimited aggregate. */@@ -323,8 +494,13 @@ export function fieldDescriptorProto_TypeToJSON(object: FieldDescriptorProto_Typexport enum FieldDescriptorProto_Label {/** LABEL_OPTIONAL - 0 is reserved for errors */LABEL_OPTIONAL = 1,- LABEL_REQUIRED = 2,LABEL_REPEATED = 3,+ /**+ * LABEL_REQUIRED - The required label is only allowed in google.protobuf. In proto3 and Editions+ * it's explicitly prohibited. In Editions, the `field_presence` feature+ * can be used to get this behavior.+ */+ LABEL_REQUIRED = 2,UNRECOGNIZED = -1,}@@ -333,12 +509,12 @@ export function fieldDescriptorProto_LabelFromJSON(object: any): FieldDescriptorcase 1:case "LABEL_OPTIONAL":return FieldDescriptorProto_Label.LABEL_OPTIONAL;- case 2:- case "LABEL_REQUIRED":- return FieldDescriptorProto_Label.LABEL_REQUIRED;case 3:case "LABEL_REPEATED":return FieldDescriptorProto_Label.LABEL_REPEATED;+ case 2:+ case "LABEL_REQUIRED":+ return FieldDescriptorProto_Label.LABEL_REQUIRED;case -1:case "UNRECOGNIZED":default:@@ -350,10 +526,10 @@ export function fieldDescriptorProto_LabelToJSON(object: FieldDescriptorProto_Laswitch (object) {case FieldDescriptorProto_Label.LABEL_OPTIONAL:return "LABEL_OPTIONAL";- case FieldDescriptorProto_Label.LABEL_REQUIRED:- return "LABEL_REQUIRED";case FieldDescriptorProto_Label.LABEL_REPEATED:return "LABEL_REPEATED";+ case FieldDescriptorProto_Label.LABEL_REQUIRED:+ return "LABEL_REQUIRED";case FieldDescriptorProto_Label.UNRECOGNIZED:default:return "UNRECOGNIZED";@@ -547,6 +723,10 @@ export interface FileOptions {* determining the ruby package.*/rubyPackage: string;+ /** Any features defined in the specific edition. */+ features:+ | FeatureSet+ | undefined;/*** The parser stores options it doesn't recognize here.* See the documentation for the "Options" section above.@@ -665,12 +845,16 @@ export interface MessageOptions {* This should only be used as a temporary measure against broken builds due* to the change in behavior for JSON field name conflicts.*- * TODO(b/261750190) This is legacy behavior we plan to remove once downstream+ * TODO This is legacy behavior we plan to remove once downstream* teams have had time to migrate.** @deprecated*/deprecatedLegacyJsonFieldConflicts: boolean;+ /** Any features defined in the specific edition. */+ features:+ | FeatureSet+ | undefined;/** The parser stores options it doesn't recognize here. See above. */uninterpretedOption: UninterpretedOption[];}@@ -679,8 +863,10 @@ export interface FieldOptions {/*** The ctype option instructs the C++ code generator to use a different* representation of the field than it normally would. See the specific- * options below. This option is not yet implemented in the open source- * release -- sorry, we'll try to include it in a future version!+ * options below. This option is only implemented to support use of+ * [ctype=CORD] and [ctype=STRING] (the default) on non-repeated fields of+ * type "bytes" in the open source release -- sorry, we'll try to include+ * other types in a future version!*/ctype: FieldOptions_CType;/**@@ -688,7 +874,9 @@ export interface FieldOptions {* a more efficient representation on the wire. Rather than repeatedly* writing the tag and type for each element, the entire array is encoded as* a single length-delimited blob. In proto3, only explicit setting it to- * false will avoid using packed encoding.+ * false will avoid using packed encoding. This option is prohibited in+ * Editions, but the `repeated_field_encoding` feature can be used to control+ * the behavior.*/packed: boolean;/**@@ -759,7 +947,12 @@ export interface FieldOptions {*/debugRedact: boolean;retention: FieldOptions_OptionRetention;- target: FieldOptions_OptionTargetType;+ targets: FieldOptions_OptionTargetType[];+ editionDefaults: FieldOptions_EditionDefault[];+ /** Any features defined in the specific edition. */+ features:+ | FeatureSet+ | undefined;/** The parser stores options it doesn't recognize here. See above. */uninterpretedOption: UninterpretedOption[];}@@ -767,6 +960,14 @@ export interface FieldOptions {export enum FieldOptions_CType {/** STRING - Default mode. */STRING = 0,+ /**+ * CORD - The option [ctype=CORD] may be applied to a non-repeated field of type+ * "bytes". It indicates that in C++, the data should be stored in a Cord+ * instead of a string. For very large strings, this may reduce memory+ * fragmentation. It may also allow better performance when parsing from a+ * Cord, or when parsing with aliasing enabled, as the parsed Cord may then+ * alias the original buffer.+ */CORD = 1,STRING_PIECE = 2,UNRECOGNIZED = -1,@@ -977,7 +1178,17 @@ export function fieldOptions_OptionTargetTypeToJSON(object: FieldOptions_OptionT}}+export interface FieldOptions_EditionDefault {+ edition: Edition;+ /** Textproto value. */+ value: string;+}+export interface OneofOptions {+ /** Any features defined in the specific edition. */+ features:+ | FeatureSet+ | undefined;/** The parser stores options it doesn't recognize here. See above. */uninterpretedOption: UninterpretedOption[];}@@ -1000,12 +1211,16 @@ export interface EnumOptions {* and strips underscored from the fields before comparison in proto3 only.* The new behavior takes `json_name` into account and applies to proto2 as* well.- * TODO(b/261750190) Remove this legacy behavior once downstream teams have+ * TODO Remove this legacy behavior once downstream teams have* had time to migrate.** @deprecated*/deprecatedLegacyJsonFieldConflicts: boolean;+ /** Any features defined in the specific edition. */+ features:+ | FeatureSet+ | undefined;/** The parser stores options it doesn't recognize here. See above. */uninterpretedOption: UninterpretedOption[];}@@ -1018,11 +1233,25 @@ export interface EnumValueOptions {* this is a formalization for deprecating enum values.*/deprecated: boolean;+ /** Any features defined in the specific edition. */+ features:+ | FeatureSet+ | undefined;+ /**+ * Indicate that fields annotated with this enum value should not be printed+ * out when using debug formats, e.g. when the field contains sensitive+ * credentials.+ */+ debugRedact: boolean;/** The parser stores options it doesn't recognize here. See above. */uninterpretedOption: UninterpretedOption[];}export interface ServiceOptions {+ /** Any features defined in the specific edition. */+ features:+ | FeatureSet+ | undefined;/*** Is this service deprecated?* Depending on the target platform, this can emit Deprecated annotations@@ -1043,6 +1272,10 @@ export interface MethodOptions {*/deprecated: boolean;idempotencyLevel: MethodOptions_IdempotencyLevel;+ /** Any features defined in the specific edition. */+ features:+ | FeatureSet+ | undefined;/** The parser stores options it doesn't recognize here. See above. */uninterpretedOption: UninterpretedOption[];}@@ -1127,6 +1360,294 @@ export interface UninterpretedOption_NamePart {isExtension: boolean;}+/**+ * TODO Enums in C++ gencode (and potentially other languages) are+ * not well scoped. This means that each of the feature enums below can clash+ * with each other. The short names we've chosen maximize call-site+ * readability, but leave us very open to this scenario. A future feature will+ * be designed and implemented to handle this, hopefully before we ever hit a+ * conflict here.+ */+export interface FeatureSet {+ fieldPresence: FeatureSet_FieldPresence;+ enumType: FeatureSet_EnumType;+ repeatedFieldEncoding: FeatureSet_RepeatedFieldEncoding;+ utf8Validation: FeatureSet_Utf8Validation;+ messageEncoding: FeatureSet_MessageEncoding;+ jsonFormat: FeatureSet_JsonFormat;+}++export enum FeatureSet_FieldPresence {+ FIELD_PRESENCE_UNKNOWN = 0,+ EXPLICIT = 1,+ IMPLICIT = 2,+ LEGACY_REQUIRED = 3,+ UNRECOGNIZED = -1,+}++export function featureSet_FieldPresenceFromJSON(object: any): FeatureSet_FieldPresence {+ switch (object) {+ case 0:+ case "FIELD_PRESENCE_UNKNOWN":+ return FeatureSet_FieldPresence.FIELD_PRESENCE_UNKNOWN;+ case 1:+ case "EXPLICIT":+ return FeatureSet_FieldPresence.EXPLICIT;+ case 2:+ case "IMPLICIT":+ return FeatureSet_FieldPresence.IMPLICIT;+ case 3:+ case "LEGACY_REQUIRED":+ return FeatureSet_FieldPresence.LEGACY_REQUIRED;+ case -1:+ case "UNRECOGNIZED":+ default:+ return FeatureSet_FieldPresence.UNRECOGNIZED;+ }+}++export function featureSet_FieldPresenceToJSON(object: FeatureSet_FieldPresence): string {+ switch (object) {+ case FeatureSet_FieldPresence.FIELD_PRESENCE_UNKNOWN:+ return "FIELD_PRESENCE_UNKNOWN";+ case FeatureSet_FieldPresence.EXPLICIT:+ return "EXPLICIT";+ case FeatureSet_FieldPresence.IMPLICIT:+ return "IMPLICIT";+ case FeatureSet_FieldPresence.LEGACY_REQUIRED:+ return "LEGACY_REQUIRED";+ case FeatureSet_FieldPresence.UNRECOGNIZED:+ default:+ return "UNRECOGNIZED";+ }+}++export enum FeatureSet_EnumType {+ ENUM_TYPE_UNKNOWN = 0,+ OPEN = 1,+ CLOSED = 2,+ UNRECOGNIZED = -1,+}++export function featureSet_EnumTypeFromJSON(object: any): FeatureSet_EnumType {+ switch (object) {+ case 0:+ case "ENUM_TYPE_UNKNOWN":+ return FeatureSet_EnumType.ENUM_TYPE_UNKNOWN;+ case 1:+ case "OPEN":+ return FeatureSet_EnumType.OPEN;+ case 2:+ case "CLOSED":+ return FeatureSet_EnumType.CLOSED;+ case -1:+ case "UNRECOGNIZED":+ default:+ return FeatureSet_EnumType.UNRECOGNIZED;+ }+}++export function featureSet_EnumTypeToJSON(object: FeatureSet_EnumType): string {+ switch (object) {+ case FeatureSet_EnumType.ENUM_TYPE_UNKNOWN:+ return "ENUM_TYPE_UNKNOWN";+ case FeatureSet_EnumType.OPEN:+ return "OPEN";+ case FeatureSet_EnumType.CLOSED:+ return "CLOSED";+ case FeatureSet_EnumType.UNRECOGNIZED:+ default:+ return "UNRECOGNIZED";+ }+}++export enum FeatureSet_RepeatedFieldEncoding {+ REPEATED_FIELD_ENCODING_UNKNOWN = 0,+ PACKED = 1,+ EXPANDED = 2,+ UNRECOGNIZED = -1,+}++export function featureSet_RepeatedFieldEncodingFromJSON(object: any): FeatureSet_RepeatedFieldEncoding {+ switch (object) {+ case 0:+ case "REPEATED_FIELD_ENCODING_UNKNOWN":+ return FeatureSet_RepeatedFieldEncoding.REPEATED_FIELD_ENCODING_UNKNOWN;+ case 1:+ case "PACKED":+ return FeatureSet_RepeatedFieldEncoding.PACKED;+ case 2:+ case "EXPANDED":+ return FeatureSet_RepeatedFieldEncoding.EXPANDED;+ case -1:+ case "UNRECOGNIZED":+ default:+ return FeatureSet_RepeatedFieldEncoding.UNRECOGNIZED;+ }+}++export function featureSet_RepeatedFieldEncodingToJSON(object: FeatureSet_RepeatedFieldEncoding): string {+ switch (object) {+ case FeatureSet_RepeatedFieldEncoding.REPEATED_FIELD_ENCODING_UNKNOWN:+ return "REPEATED_FIELD_ENCODING_UNKNOWN";+ case FeatureSet_RepeatedFieldEncoding.PACKED:+ return "PACKED";+ case FeatureSet_RepeatedFieldEncoding.EXPANDED:+ return "EXPANDED";+ case FeatureSet_RepeatedFieldEncoding.UNRECOGNIZED:+ default:+ return "UNRECOGNIZED";+ }+}++export enum FeatureSet_Utf8Validation {+ UTF8_VALIDATION_UNKNOWN = 0,+ NONE = 1,+ VERIFY = 2,+ UNRECOGNIZED = -1,+}++export function featureSet_Utf8ValidationFromJSON(object: any): FeatureSet_Utf8Validation {+ switch (object) {+ case 0:+ case "UTF8_VALIDATION_UNKNOWN":+ return FeatureSet_Utf8Validation.UTF8_VALIDATION_UNKNOWN;+ case 1:+ case "NONE":+ return FeatureSet_Utf8Validation.NONE;+ case 2:+ case "VERIFY":+ return FeatureSet_Utf8Validation.VERIFY;+ case -1:+ case "UNRECOGNIZED":+ default:+ return FeatureSet_Utf8Validation.UNRECOGNIZED;+ }+}++export function featureSet_Utf8ValidationToJSON(object: FeatureSet_Utf8Validation): string {+ switch (object) {+ case FeatureSet_Utf8Validation.UTF8_VALIDATION_UNKNOWN:+ return "UTF8_VALIDATION_UNKNOWN";+ case FeatureSet_Utf8Validation.NONE:+ return "NONE";+ case FeatureSet_Utf8Validation.VERIFY:+ return "VERIFY";+ case FeatureSet_Utf8Validation.UNRECOGNIZED:+ default:+ return "UNRECOGNIZED";+ }+}++export enum FeatureSet_MessageEncoding {+ MESSAGE_ENCODING_UNKNOWN = 0,+ LENGTH_PREFIXED = 1,+ DELIMITED = 2,+ UNRECOGNIZED = -1,+}++export function featureSet_MessageEncodingFromJSON(object: any): FeatureSet_MessageEncoding {+ switch (object) {+ case 0:+ case "MESSAGE_ENCODING_UNKNOWN":+ return FeatureSet_MessageEncoding.MESSAGE_ENCODING_UNKNOWN;+ case 1:+ case "LENGTH_PREFIXED":+ return FeatureSet_MessageEncoding.LENGTH_PREFIXED;+ case 2:+ case "DELIMITED":+ return FeatureSet_MessageEncoding.DELIMITED;+ case -1:+ case "UNRECOGNIZED":+ default:+ return FeatureSet_MessageEncoding.UNRECOGNIZED;+ }+}++export function featureSet_MessageEncodingToJSON(object: FeatureSet_MessageEncoding): string {+ switch (object) {+ case FeatureSet_MessageEncoding.MESSAGE_ENCODING_UNKNOWN:+ return "MESSAGE_ENCODING_UNKNOWN";+ case FeatureSet_MessageEncoding.LENGTH_PREFIXED:+ return "LENGTH_PREFIXED";+ case FeatureSet_MessageEncoding.DELIMITED:+ return "DELIMITED";+ case FeatureSet_MessageEncoding.UNRECOGNIZED:+ default:+ return "UNRECOGNIZED";+ }+}++export enum FeatureSet_JsonFormat {+ JSON_FORMAT_UNKNOWN = 0,+ ALLOW = 1,+ LEGACY_BEST_EFFORT = 2,+ UNRECOGNIZED = -1,+}++export function featureSet_JsonFormatFromJSON(object: any): FeatureSet_JsonFormat {+ switch (object) {+ case 0:+ case "JSON_FORMAT_UNKNOWN":+ return FeatureSet_JsonFormat.JSON_FORMAT_UNKNOWN;+ case 1:+ case "ALLOW":+ return FeatureSet_JsonFormat.ALLOW;+ case 2:+ case "LEGACY_BEST_EFFORT":+ return FeatureSet_JsonFormat.LEGACY_BEST_EFFORT;+ case -1:+ case "UNRECOGNIZED":+ default:+ return FeatureSet_JsonFormat.UNRECOGNIZED;+ }+}++export function featureSet_JsonFormatToJSON(object: FeatureSet_JsonFormat): string {+ switch (object) {+ case FeatureSet_JsonFormat.JSON_FORMAT_UNKNOWN:+ return "JSON_FORMAT_UNKNOWN";+ case FeatureSet_JsonFormat.ALLOW:+ return "ALLOW";+ case FeatureSet_JsonFormat.LEGACY_BEST_EFFORT:+ return "LEGACY_BEST_EFFORT";+ case FeatureSet_JsonFormat.UNRECOGNIZED:+ default:+ return "UNRECOGNIZED";+ }+}++/**+ * A compiled specification for the defaults of a set of features. These+ * messages are generated from FeatureSet extensions and can be used to seed+ * feature resolution. The resolution with this object becomes a simple search+ * for the closest matching edition, followed by proto merges.+ */+export interface FeatureSetDefaults {+ defaults: FeatureSetDefaults_FeatureSetEditionDefault[];+ /**+ * The minimum supported edition (inclusive) when this was constructed.+ * Editions before this will not have defaults.+ */+ minimumEdition: Edition;+ /**+ * The maximum known edition (inclusive) when this was constructed. Editions+ * after this will not have reliable defaults.+ */+ maximumEdition: Edition;+}++/**+ * A map from every known edition with a unique set of defaults to its+ * defaults. Not all editions may be contained here. For a given edition,+ * the defaults at the closest matching edition ordered at or before it should+ * be used. This field must be in strict ascending order by edition.+ */+export interface FeatureSetDefaults_FeatureSetEditionDefault {+ edition: Edition;+ features: FeatureSet | undefined;+}+/*** Encapsulates information about the original source file from which a* FileDescriptorProto was generated.@@ -1423,7 +1944,7 @@ function createBaseFileDescriptorProto(): FileDescriptorProto {options: undefined,sourceCodeInfo: undefined,syntax: "",- edition: "",+ edition: 0,};}@@ -1469,8 +1990,8 @@ export const FileDescriptorProto = {if (message.syntax !== "") {writer.uint32(98).string(message.syntax);}- if (message.edition !== "") {- writer.uint32(106).string(message.edition);+ if (message.edition !== 0) {+ writer.uint32(112).int32(message.edition);}return writer;},@@ -1586,12 +2107,12 @@ export const FileDescriptorProto = {message.syntax = reader.string();continue;- case 13:- if (tag !== 106) {+ case 14:+ if (tag !== 112) {break;}- message.edition = reader.string();+ message.edition = reader.int32() as any;continue;}if ((tag & 7) === 4 || tag === 0) {@@ -1630,7 +2151,7 @@ export const FileDescriptorProto = {options: isSet(object.options) ? FileOptions.fromJSON(object.options) : undefined,sourceCodeInfo: isSet(object.sourceCodeInfo) ? SourceCodeInfo.fromJSON(object.sourceCodeInfo) : undefined,syntax: isSet(object.syntax) ? globalThis.String(object.syntax) : "",- edition: isSet(object.edition) ? globalThis.String(object.edition) : "",+ edition: isSet(object.edition) ? editionFromJSON(object.edition) : 0,};},@@ -1672,8 +2193,8 @@ export const FileDescriptorProto = {if (message.syntax !== "") {obj.syntax = message.syntax;}- if (message.edition !== "") {- obj.edition = message.edition;+ if (message.edition !== 0) {+ obj.edition = editionToJSON(message.edition);}return obj;},@@ -1699,7 +2220,7 @@ export const FileDescriptorProto = {? SourceCodeInfo.fromPartial(object.sourceCodeInfo): undefined;message.syntax = object.syntax ?? "";- message.edition = object.edition ?? "";+ message.edition = object.edition ?? 0;return message;},};@@ -2093,7 +2614,7 @@ export const DescriptorProto_ReservedRange = {};function createBaseExtensionRangeOptions(): ExtensionRangeOptions {- return { uninterpretedOption: [] };+ return { uninterpretedOption: [], declaration: [], features: undefined, verification: 0 };}export const ExtensionRangeOptions = {@@ -2101,6 +2622,15 @@ export const ExtensionRangeOptions = {for (const v of message.uninterpretedOption) {UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim();}+ for (const v of message.declaration) {+ ExtensionRangeOptions_Declaration.encode(v!, writer.uint32(18).fork()).ldelim();+ }+ if (message.features !== undefined) {+ FeatureSet.encode(message.features, writer.uint32(402).fork()).ldelim();+ }+ if (message.verification !== 0) {+ writer.uint32(24).int32(message.verification);+ }return writer;},@@ -2118,6 +2648,27 @@ export const ExtensionRangeOptions = {message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32()));continue;+ case 2:+ if (tag !== 18) {+ break;+ }++ message.declaration.push(ExtensionRangeOptions_Declaration.decode(reader, reader.uint32()));+ continue;+ case 50:+ if (tag !== 402) {+ break;+ }++ message.features = FeatureSet.decode(reader, reader.uint32());+ continue;+ case 3:+ if (tag !== 24) {+ break;+ }++ message.verification = reader.int32() as any;+ continue;}if ((tag & 7) === 4 || tag === 0) {break;@@ -2132,6 +2683,13 @@ export const ExtensionRangeOptions = {uninterpretedOption: globalThis.Array.isArray(object?.uninterpretedOption)? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e)): [],+ declaration: globalThis.Array.isArray(object?.declaration)+ ? object.declaration.map((e: any) => ExtensionRangeOptions_Declaration.fromJSON(e))+ : [],+ features: isSet(object.features) ? FeatureSet.fromJSON(object.features) : undefined,+ verification: isSet(object.verification)+ ? extensionRangeOptions_VerificationStateFromJSON(object.verification)+ : 0,};},@@ -2140,6 +2698,15 @@ export const ExtensionRangeOptions = {if (message.uninterpretedOption?.length) {obj.uninterpretedOption = message.uninterpretedOption.map((e) => UninterpretedOption.toJSON(e));}+ if (message.declaration?.length) {+ obj.declaration = message.declaration.map((e) => ExtensionRangeOptions_Declaration.toJSON(e));+ }+ if (message.features !== undefined) {+ obj.features = FeatureSet.toJSON(message.features);+ }+ if (message.verification !== 0) {+ obj.verification = extensionRangeOptions_VerificationStateToJSON(message.verification);+ }return obj;},@@ -2149,20 +2716,144 @@ export const ExtensionRangeOptions = {fromPartial(object: DeepPartial<ExtensionRangeOptions>): ExtensionRangeOptions {const message = createBaseExtensionRangeOptions();message.uninterpretedOption = object.uninterpretedOption?.map((e) => UninterpretedOption.fromPartial(e)) || [];+ message.declaration = object.declaration?.map((e) => ExtensionRangeOptions_Declaration.fromPartial(e)) || [];+ message.features = (object.features !== undefined && object.features !== null)+ ? FeatureSet.fromPartial(object.features)+ : undefined;+ message.verification = object.verification ?? 0;return message;},};-function createBaseFieldDescriptorProto(): FieldDescriptorProto {- return {- name: "",- number: 0,- label: 1,- type: 1,- typeName: "",- extendee: "",- defaultValue: "",- oneofIndex: 0,+function createBaseExtensionRangeOptions_Declaration(): ExtensionRangeOptions_Declaration {+ return { number: 0, fullName: "", type: "", reserved: false, repeated: false };+}++export const ExtensionRangeOptions_Declaration = {+ encode(message: ExtensionRangeOptions_Declaration, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {+ if (message.number !== 0) {+ writer.uint32(8).int32(message.number);+ }+ if (message.fullName !== "") {+ writer.uint32(18).string(message.fullName);+ }+ if (message.type !== "") {+ writer.uint32(26).string(message.type);+ }+ if (message.reserved === true) {+ writer.uint32(40).bool(message.reserved);+ }+ if (message.repeated === true) {+ writer.uint32(48).bool(message.repeated);+ }+ return writer;+ },++ decode(input: _m0.Reader | Uint8Array, length?: number): ExtensionRangeOptions_Declaration {+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);+ let end = length === undefined ? reader.len : reader.pos + length;+ const message = createBaseExtensionRangeOptions_Declaration();+ while (reader.pos < end) {+ const tag = reader.uint32();+ switch (tag >>> 3) {+ case 1:+ if (tag !== 8) {+ break;+ }++ message.number = reader.int32();+ continue;+ case 2:+ if (tag !== 18) {+ break;+ }++ message.fullName = reader.string();+ continue;+ case 3:+ if (tag !== 26) {+ break;+ }++ message.type = reader.string();+ continue;+ case 5:+ if (tag !== 40) {+ break;+ }++ message.reserved = reader.bool();+ continue;+ case 6:+ if (tag !== 48) {+ break;+ }++ message.repeated = reader.bool();+ continue;+ }+ if ((tag & 7) === 4 || tag === 0) {+ break;+ }+ reader.skipType(tag & 7);+ }+ return message;+ },++ fromJSON(object: any): ExtensionRangeOptions_Declaration {+ return {+ number: isSet(object.number) ? globalThis.Number(object.number) : 0,+ fullName: isSet(object.fullName) ? globalThis.String(object.fullName) : "",+ type: isSet(object.type) ? globalThis.String(object.type) : "",+ reserved: isSet(object.reserved) ? globalThis.Boolean(object.reserved) : false,+ repeated: isSet(object.repeated) ? globalThis.Boolean(object.repeated) : false,+ };+ },++ toJSON(message: ExtensionRangeOptions_Declaration): unknown {+ const obj: any = {};+ if (message.number !== 0) {+ obj.number = Math.round(message.number);+ }+ if (message.fullName !== "") {+ obj.fullName = message.fullName;+ }+ if (message.type !== "") {+ obj.type = message.type;+ }+ if (message.reserved === true) {+ obj.reserved = message.reserved;+ }+ if (message.repeated === true) {+ obj.repeated = message.repeated;+ }+ return obj;+ },++ create(base?: DeepPartial<ExtensionRangeOptions_Declaration>): ExtensionRangeOptions_Declaration {+ return ExtensionRangeOptions_Declaration.fromPartial(base ?? {});+ },+ fromPartial(object: DeepPartial<ExtensionRangeOptions_Declaration>): ExtensionRangeOptions_Declaration {+ const message = createBaseExtensionRangeOptions_Declaration();+ message.number = object.number ?? 0;+ message.fullName = object.fullName ?? "";+ message.type = object.type ?? "";+ message.reserved = object.reserved ?? false;+ message.repeated = object.repeated ?? false;+ return message;+ },+};++function createBaseFieldDescriptorProto(): FieldDescriptorProto {+ return {+ name: "",+ number: 0,+ label: 1,+ type: 1,+ typeName: "",+ extendee: "",+ defaultValue: "",+ oneofIndex: 0,jsonName: "",options: undefined,proto3Optional: false,@@ -3003,6 +3694,7 @@ function createBaseFileOptions(): FileOptions {phpNamespace: "",phpMetadataNamespace: "",rubyPackage: "",+ features: undefined,uninterpretedOption: [],};}@@ -3069,6 +3761,9 @@ export const FileOptions = {if (message.rubyPackage !== "") {writer.uint32(362).string(message.rubyPackage);}+ if (message.features !== undefined) {+ FeatureSet.encode(message.features, writer.uint32(402).fork()).ldelim();+ }for (const v of message.uninterpretedOption) {UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim();}@@ -3222,6 +3917,13 @@ export const FileOptions = {message.rubyPackage = reader.string();continue;+ case 50:+ if (tag !== 402) {+ break;+ }++ message.features = FeatureSet.decode(reader, reader.uint32());+ continue;case 999:if (tag !== 7994) {break;@@ -3262,6 +3964,7 @@ export const FileOptions = {phpNamespace: isSet(object.phpNamespace) ? globalThis.String(object.phpNamespace) : "",phpMetadataNamespace: isSet(object.phpMetadataNamespace) ? globalThis.String(object.phpMetadataNamespace) : "",rubyPackage: isSet(object.rubyPackage) ? globalThis.String(object.rubyPackage) : "",+ features: isSet(object.features) ? FeatureSet.fromJSON(object.features) : undefined,uninterpretedOption: globalThis.Array.isArray(object?.uninterpretedOption)? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e)): [],@@ -3330,6 +4033,9 @@ export const FileOptions = {if (message.rubyPackage !== "") {obj.rubyPackage = message.rubyPackage;}+ if (message.features !== undefined) {+ obj.features = FeatureSet.toJSON(message.features);+ }if (message.uninterpretedOption?.length) {obj.uninterpretedOption = message.uninterpretedOption.map((e) => UninterpretedOption.toJSON(e));}@@ -3361,6 +4067,9 @@ export const FileOptions = {message.phpNamespace = object.phpNamespace ?? "";message.phpMetadataNamespace = object.phpMetadataNamespace ?? "";message.rubyPackage = object.rubyPackage ?? "";+ message.features = (object.features !== undefined && object.features !== null)+ ? FeatureSet.fromPartial(object.features)+ : undefined;message.uninterpretedOption = object.uninterpretedOption?.map((e) => UninterpretedOption.fromPartial(e)) || [];return message;},@@ -3373,6 +4082,7 @@ function createBaseMessageOptions(): MessageOptions {deprecated: false,mapEntry: false,deprecatedLegacyJsonFieldConflicts: false,+ features: undefined,uninterpretedOption: [],};}@@ -3394,6 +4104,9 @@ export const MessageOptions = {if (message.deprecatedLegacyJsonFieldConflicts === true) {writer.uint32(88).bool(message.deprecatedLegacyJsonFieldConflicts);}+ if (message.features !== undefined) {+ FeatureSet.encode(message.features, writer.uint32(98).fork()).ldelim();+ }for (const v of message.uninterpretedOption) {UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim();}@@ -3442,6 +4155,13 @@ export const MessageOptions = {message.deprecatedLegacyJsonFieldConflicts = reader.bool();continue;+ case 12:+ if (tag !== 98) {+ break;+ }++ message.features = FeatureSet.decode(reader, reader.uint32());+ continue;case 999:if (tag !== 7994) {break;@@ -3471,6 +4191,7 @@ export const MessageOptions = {deprecatedLegacyJsonFieldConflicts: isSet(object.deprecatedLegacyJsonFieldConflicts)? globalThis.Boolean(object.deprecatedLegacyJsonFieldConflicts): false,+ features: isSet(object.features) ? FeatureSet.fromJSON(object.features) : undefined,uninterpretedOption: globalThis.Array.isArray(object?.uninterpretedOption)? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e)): [],@@ -3494,6 +4215,9 @@ export const MessageOptions = {if (message.deprecatedLegacyJsonFieldConflicts === true) {obj.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts;}+ if (message.features !== undefined) {+ obj.features = FeatureSet.toJSON(message.features);+ }if (message.uninterpretedOption?.length) {obj.uninterpretedOption = message.uninterpretedOption.map((e) => UninterpretedOption.toJSON(e));}@@ -3510,6 +4234,9 @@ export const MessageOptions = {message.deprecated = object.deprecated ?? false;message.mapEntry = object.mapEntry ?? false;message.deprecatedLegacyJsonFieldConflicts = object.deprecatedLegacyJsonFieldConflicts ?? false;+ message.features = (object.features !== undefined && object.features !== null)+ ? FeatureSet.fromPartial(object.features)+ : undefined;message.uninterpretedOption = object.uninterpretedOption?.map((e) => UninterpretedOption.fromPartial(e)) || [];return message;},@@ -3526,7 +4253,9 @@ function createBaseFieldOptions(): FieldOptions {weak: false,debugRedact: false,retention: 0,- target: 0,+ targets: [],+ editionDefaults: [],+ features: undefined,uninterpretedOption: [],};}@@ -3560,8 +4289,16 @@ export const FieldOptions = {if (message.retention !== 0) {writer.uint32(136).int32(message.retention);}- if (message.target !== 0) {- writer.uint32(144).int32(message.target);+ writer.uint32(154).fork();+ for (const v of message.targets) {+ writer.int32(v);+ }+ writer.ldelim();+ for (const v of message.editionDefaults) {+ FieldOptions_EditionDefault.encode(v!, writer.uint32(162).fork()).ldelim();+ }+ if (message.features !== undefined) {+ FeatureSet.encode(message.features, writer.uint32(170).fork()).ldelim();}for (const v of message.uninterpretedOption) {UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim();@@ -3639,12 +4376,36 @@ export const FieldOptions = {message.retention = reader.int32() as any;continue;- case 18:- if (tag !== 144) {+ case 19:+ if (tag === 152) {+ message.targets.push(reader.int32() as any);++ continue;+ }++ if (tag === 154) {+ const end2 = reader.uint32() + reader.pos;+ while (reader.pos < end2) {+ message.targets.push(reader.int32() as any);+ }++ continue;+ }++ break;+ case 20:+ if (tag !== 162) {break;}- message.target = reader.int32() as any;+ message.editionDefaults.push(FieldOptions_EditionDefault.decode(reader, reader.uint32()));+ continue;+ case 21:+ if (tag !== 170) {+ break;+ }++ message.features = FeatureSet.decode(reader, reader.uint32());continue;case 999:if (tag !== 7994) {@@ -3673,7 +4434,13 @@ export const FieldOptions = {weak: isSet(object.weak) ? globalThis.Boolean(object.weak) : false,debugRedact: isSet(object.debugRedact) ? globalThis.Boolean(object.debugRedact) : false,retention: isSet(object.retention) ? fieldOptions_OptionRetentionFromJSON(object.retention) : 0,- target: isSet(object.target) ? fieldOptions_OptionTargetTypeFromJSON(object.target) : 0,+ targets: globalThis.Array.isArray(object?.targets)+ ? object.targets.map((e: any) => fieldOptions_OptionTargetTypeFromJSON(e))+ : [],+ editionDefaults: globalThis.Array.isArray(object?.editionDefaults)+ ? object.editionDefaults.map((e: any) => FieldOptions_EditionDefault.fromJSON(e))+ : [],+ features: isSet(object.features) ? FeatureSet.fromJSON(object.features) : undefined,uninterpretedOption: globalThis.Array.isArray(object?.uninterpretedOption)? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e)): [],@@ -3709,8 +4476,14 @@ export const FieldOptions = {if (message.retention !== 0) {obj.retention = fieldOptions_OptionRetentionToJSON(message.retention);}- if (message.target !== 0) {- obj.target = fieldOptions_OptionTargetTypeToJSON(message.target);+ if (message.targets?.length) {+ obj.targets = message.targets.map((e) => fieldOptions_OptionTargetTypeToJSON(e));+ }+ if (message.editionDefaults?.length) {+ obj.editionDefaults = message.editionDefaults.map((e) => FieldOptions_EditionDefault.toJSON(e));+ }+ if (message.features !== undefined) {+ obj.features = FeatureSet.toJSON(message.features);}if (message.uninterpretedOption?.length) {obj.uninterpretedOption = message.uninterpretedOption.map((e) => UninterpretedOption.toJSON(e));@@ -3732,18 +4505,99 @@ export const FieldOptions = {message.weak = object.weak ?? false;message.debugRedact = object.debugRedact ?? false;message.retention = object.retention ?? 0;- message.target = object.target ?? 0;+ message.targets = object.targets?.map((e) => e) || [];+ message.editionDefaults = object.editionDefaults?.map((e) => FieldOptions_EditionDefault.fromPartial(e)) || [];+ message.features = (object.features !== undefined && object.features !== null)+ ? FeatureSet.fromPartial(object.features)+ : undefined;message.uninterpretedOption = object.uninterpretedOption?.map((e) => UninterpretedOption.fromPartial(e)) || [];return message;},};+function createBaseFieldOptions_EditionDefault(): FieldOptions_EditionDefault {+ return { edition: 0, value: "" };+}++export const FieldOptions_EditionDefault = {+ encode(message: FieldOptions_EditionDefault, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {+ if (message.edition !== 0) {+ writer.uint32(24).int32(message.edition);+ }+ if (message.value !== "") {+ writer.uint32(18).string(message.value);+ }+ return writer;+ },++ decode(input: _m0.Reader | Uint8Array, length?: number): FieldOptions_EditionDefault {+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);+ let end = length === undefined ? reader.len : reader.pos + length;+ const message = createBaseFieldOptions_EditionDefault();+ while (reader.pos < end) {+ const tag = reader.uint32();+ switch (tag >>> 3) {+ case 3:+ if (tag !== 24) {+ break;+ }++ message.edition = reader.int32() as any;+ continue;+ case 2:+ if (tag !== 18) {+ break;+ }++ message.value = reader.string();+ continue;+ }+ if ((tag & 7) === 4 || tag === 0) {+ break;+ }+ reader.skipType(tag & 7);+ }+ return message;+ },++ fromJSON(object: any): FieldOptions_EditionDefault {+ return {+ edition: isSet(object.edition) ? editionFromJSON(object.edition) : 0,+ value: isSet(object.value) ? globalThis.String(object.value) : "",+ };+ },++ toJSON(message: FieldOptions_EditionDefault): unknown {+ const obj: any = {};+ if (message.edition !== 0) {+ obj.edition = editionToJSON(message.edition);+ }+ if (message.value !== "") {+ obj.value = message.value;+ }+ return obj;+ },++ create(base?: DeepPartial<FieldOptions_EditionDefault>): FieldOptions_EditionDefault {+ return FieldOptions_EditionDefault.fromPartial(base ?? {});+ },+ fromPartial(object: DeepPartial<FieldOptions_EditionDefault>): FieldOptions_EditionDefault {+ const message = createBaseFieldOptions_EditionDefault();+ message.edition = object.edition ?? 0;+ message.value = object.value ?? "";+ return message;+ },+};+function createBaseOneofOptions(): OneofOptions {- return { uninterpretedOption: [] };+ return { features: undefined, uninterpretedOption: [] };}export const OneofOptions = {encode(message: OneofOptions, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {+ if (message.features !== undefined) {+ FeatureSet.encode(message.features, writer.uint32(10).fork()).ldelim();+ }for (const v of message.uninterpretedOption) {UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim();}@@ -3757,6 +4611,13 @@ export const OneofOptions = {while (reader.pos < end) {const tag = reader.uint32();switch (tag >>> 3) {+ case 1:+ if (tag !== 10) {+ break;+ }++ message.features = FeatureSet.decode(reader, reader.uint32());+ continue;case 999:if (tag !== 7994) {break;@@ -3775,6 +4636,7 @@ export const OneofOptions = {fromJSON(object: any): OneofOptions {return {+ features: isSet(object.features) ? FeatureSet.fromJSON(object.features) : undefined,uninterpretedOption: globalThis.Array.isArray(object?.uninterpretedOption)? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e)): [],@@ -3783,6 +4645,9 @@ export const OneofOptions = {toJSON(message: OneofOptions): unknown {const obj: any = {};+ if (message.features !== undefined) {+ obj.features = FeatureSet.toJSON(message.features);+ }if (message.uninterpretedOption?.length) {obj.uninterpretedOption = message.uninterpretedOption.map((e) => UninterpretedOption.toJSON(e));}@@ -3794,13 +4659,22 @@ export const OneofOptions = {},fromPartial(object: DeepPartial<OneofOptions>): OneofOptions {const message = createBaseOneofOptions();+ message.features = (object.features !== undefined && object.features !== null)+ ? FeatureSet.fromPartial(object.features)+ : undefined;message.uninterpretedOption = object.uninterpretedOption?.map((e) => UninterpretedOption.fromPartial(e)) || [];return message;},};function createBaseEnumOptions(): EnumOptions {- return { allowAlias: false, deprecated: false, deprecatedLegacyJsonFieldConflicts: false, uninterpretedOption: [] };+ return {+ allowAlias: false,+ deprecated: false,+ deprecatedLegacyJsonFieldConflicts: false,+ features: undefined,+ uninterpretedOption: [],+ };}export const EnumOptions = {@@ -3814,6 +4688,9 @@ export const EnumOptions = {if (message.deprecatedLegacyJsonFieldConflicts === true) {writer.uint32(48).bool(message.deprecatedLegacyJsonFieldConflicts);}+ if (message.features !== undefined) {+ FeatureSet.encode(message.features, writer.uint32(58).fork()).ldelim();+ }for (const v of message.uninterpretedOption) {UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim();}@@ -3848,6 +4725,13 @@ export const EnumOptions = {message.deprecatedLegacyJsonFieldConflicts = reader.bool();continue;+ case 7:+ if (tag !== 58) {+ break;+ }++ message.features = FeatureSet.decode(reader, reader.uint32());+ continue;case 999:if (tag !== 7994) {break;@@ -3871,6 +4755,7 @@ export const EnumOptions = {deprecatedLegacyJsonFieldConflicts: isSet(object.deprecatedLegacyJsonFieldConflicts)? globalThis.Boolean(object.deprecatedLegacyJsonFieldConflicts): false,+ features: isSet(object.features) ? FeatureSet.fromJSON(object.features) : undefined,uninterpretedOption: globalThis.Array.isArray(object?.uninterpretedOption)? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e)): [],@@ -3888,6 +4773,9 @@ export const EnumOptions = {if (message.deprecatedLegacyJsonFieldConflicts === true) {obj.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts;}+ if (message.features !== undefined) {+ obj.features = FeatureSet.toJSON(message.features);+ }if (message.uninterpretedOption?.length) {obj.uninterpretedOption = message.uninterpretedOption.map((e) => UninterpretedOption.toJSON(e));}@@ -3902,13 +4790,16 @@ export const EnumOptions = {message.allowAlias = object.allowAlias ?? false;message.deprecated = object.deprecated ?? false;message.deprecatedLegacyJsonFieldConflicts = object.deprecatedLegacyJsonFieldConflicts ?? false;+ message.features = (object.features !== undefined && object.features !== null)+ ? FeatureSet.fromPartial(object.features)+ : undefined;message.uninterpretedOption = object.uninterpretedOption?.map((e) => UninterpretedOption.fromPartial(e)) || [];return message;},};function createBaseEnumValueOptions(): EnumValueOptions {- return { deprecated: false, uninterpretedOption: [] };+ return { deprecated: false, features: undefined, debugRedact: false, uninterpretedOption: [] };}export const EnumValueOptions = {@@ -3916,6 +4807,12 @@ export const EnumValueOptions = {if (message.deprecated === true) {writer.uint32(8).bool(message.deprecated);}+ if (message.features !== undefined) {+ FeatureSet.encode(message.features, writer.uint32(18).fork()).ldelim();+ }+ if (message.debugRedact === true) {+ writer.uint32(24).bool(message.debugRedact);+ }for (const v of message.uninterpretedOption) {UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim();}@@ -3936,6 +4833,20 @@ export const EnumValueOptions = {message.deprecated = reader.bool();continue;+ case 2:+ if (tag !== 18) {+ break;+ }++ message.features = FeatureSet.decode(reader, reader.uint32());+ continue;+ case 3:+ if (tag !== 24) {+ break;+ }++ message.debugRedact = reader.bool();+ continue;case 999:if (tag !== 7994) {break;@@ -3955,6 +4866,8 @@ export const EnumValueOptions = {fromJSON(object: any): EnumValueOptions {return {deprecated: isSet(object.deprecated) ? globalThis.Boolean(object.deprecated) : false,+ features: isSet(object.features) ? FeatureSet.fromJSON(object.features) : undefined,+ debugRedact: isSet(object.debugRedact) ? globalThis.Boolean(object.debugRedact) : false,uninterpretedOption: globalThis.Array.isArray(object?.uninterpretedOption)? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e)): [],@@ -3966,6 +4879,12 @@ export const EnumValueOptions = {if (message.deprecated === true) {obj.deprecated = message.deprecated;}+ if (message.features !== undefined) {+ obj.features = FeatureSet.toJSON(message.features);+ }+ if (message.debugRedact === true) {+ obj.debugRedact = message.debugRedact;+ }if (message.uninterpretedOption?.length) {obj.uninterpretedOption = message.uninterpretedOption.map((e) => UninterpretedOption.toJSON(e));}@@ -3978,17 +4897,24 @@ export const EnumValueOptions = {fromPartial(object: DeepPartial<EnumValueOptions>): EnumValueOptions {const message = createBaseEnumValueOptions();message.deprecated = object.deprecated ?? false;+ message.features = (object.features !== undefined && object.features !== null)+ ? FeatureSet.fromPartial(object.features)+ : undefined;+ message.debugRedact = object.debugRedact ?? false;message.uninterpretedOption = object.uninterpretedOption?.map((e) => UninterpretedOption.fromPartial(e)) || [];return message;},};function createBaseServiceOptions(): ServiceOptions {- return { deprecated: false, uninterpretedOption: [] };+ return { features: undefined, deprecated: false, uninterpretedOption: [] };}export const ServiceOptions = {encode(message: ServiceOptions, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {+ if (message.features !== undefined) {+ FeatureSet.encode(message.features, writer.uint32(274).fork()).ldelim();+ }if (message.deprecated === true) {writer.uint32(264).bool(message.deprecated);}@@ -4005,6 +4931,13 @@ export const ServiceOptions = {while (reader.pos < end) {const tag = reader.uint32();switch (tag >>> 3) {+ case 34:+ if (tag !== 274) {+ break;+ }++ message.features = FeatureSet.decode(reader, reader.uint32());+ continue;case 33:if (tag !== 264) {break;@@ -4030,6 +4963,7 @@ export const ServiceOptions = {fromJSON(object: any): ServiceOptions {return {+ features: isSet(object.features) ? FeatureSet.fromJSON(object.features) : undefined,deprecated: isSet(object.deprecated) ? globalThis.Boolean(object.deprecated) : false,uninterpretedOption: globalThis.Array.isArray(object?.uninterpretedOption)? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e))@@ -4039,6 +4973,9 @@ export const ServiceOptions = {toJSON(message: ServiceOptions): unknown {const obj: any = {};+ if (message.features !== undefined) {+ obj.features = FeatureSet.toJSON(message.features);+ }if (message.deprecated === true) {obj.deprecated = message.deprecated;}@@ -4053,6 +4990,9 @@ export const ServiceOptions = {},fromPartial(object: DeepPartial<ServiceOptions>): ServiceOptions {const message = createBaseServiceOptions();+ message.features = (object.features !== undefined && object.features !== null)+ ? FeatureSet.fromPartial(object.features)+ : undefined;message.deprecated = object.deprecated ?? false;message.uninterpretedOption = object.uninterpretedOption?.map((e) => UninterpretedOption.fromPartial(e)) || [];return message;@@ -4060,7 +5000,7 @@ export const ServiceOptions = {};function createBaseMethodOptions(): MethodOptions {- return { deprecated: false, idempotencyLevel: 0, uninterpretedOption: [] };+ return { deprecated: false, idempotencyLevel: 0, features: undefined, uninterpretedOption: [] };}export const MethodOptions = {@@ -4071,6 +5011,9 @@ export const MethodOptions = {if (message.idempotencyLevel !== 0) {writer.uint32(272).int32(message.idempotencyLevel);}+ if (message.features !== undefined) {+ FeatureSet.encode(message.features, writer.uint32(282).fork()).ldelim();+ }for (const v of message.uninterpretedOption) {UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim();}@@ -4098,6 +5041,13 @@ export const MethodOptions = {message.idempotencyLevel = reader.int32() as any;continue;+ case 35:+ if (tag !== 282) {+ break;+ }++ message.features = FeatureSet.decode(reader, reader.uint32());+ continue;case 999:if (tag !== 7994) {break;@@ -4120,6 +5070,7 @@ export const MethodOptions = {idempotencyLevel: isSet(object.idempotencyLevel)? methodOptions_IdempotencyLevelFromJSON(object.idempotencyLevel): 0,+ features: isSet(object.features) ? FeatureSet.fromJSON(object.features) : undefined,uninterpretedOption: globalThis.Array.isArray(object?.uninterpretedOption)? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e)): [],@@ -4134,6 +5085,9 @@ export const MethodOptions = {if (message.idempotencyLevel !== 0) {obj.idempotencyLevel = methodOptions_IdempotencyLevelToJSON(message.idempotencyLevel);}+ if (message.features !== undefined) {+ obj.features = FeatureSet.toJSON(message.features);+ }if (message.uninterpretedOption?.length) {obj.uninterpretedOption = message.uninterpretedOption.map((e) => UninterpretedOption.toJSON(e));}@@ -4147,6 +5101,9 @@ export const MethodOptions = {const message = createBaseMethodOptions();message.deprecated = object.deprecated ?? false;message.idempotencyLevel = object.idempotencyLevel ?? 0;+ message.features = (object.features !== undefined && object.features !== null)+ ? FeatureSet.fromPartial(object.features)+ : undefined;message.uninterpretedOption = object.uninterpretedOption?.map((e) => UninterpretedOption.fromPartial(e)) || [];return message;},@@ -4389,6 +5346,318 @@ export const UninterpretedOption_NamePart = {},};+function createBaseFeatureSet(): FeatureSet {+ return {+ fieldPresence: 0,+ enumType: 0,+ repeatedFieldEncoding: 0,+ utf8Validation: 0,+ messageEncoding: 0,+ jsonFormat: 0,+ };+}++export const FeatureSet = {+ encode(message: FeatureSet, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {+ if (message.fieldPresence !== 0) {+ writer.uint32(8).int32(message.fieldPresence);+ }+ if (message.enumType !== 0) {+ writer.uint32(16).int32(message.enumType);+ }+ if (message.repeatedFieldEncoding !== 0) {+ writer.uint32(24).int32(message.repeatedFieldEncoding);+ }+ if (message.utf8Validation !== 0) {+ writer.uint32(32).int32(message.utf8Validation);+ }+ if (message.messageEncoding !== 0) {+ writer.uint32(40).int32(message.messageEncoding);+ }+ if (message.jsonFormat !== 0) {+ writer.uint32(48).int32(message.jsonFormat);+ }+ return writer;+ },++ decode(input: _m0.Reader | Uint8Array, length?: number): FeatureSet {+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);+ let end = length === undefined ? reader.len : reader.pos + length;+ const message = createBaseFeatureSet();+ while (reader.pos < end) {+ const tag = reader.uint32();+ switch (tag >>> 3) {+ case 1:+ if (tag !== 8) {+ break;+ }++ message.fieldPresence = reader.int32() as any;+ continue;+ case 2:+ if (tag !== 16) {+ break;+ }++ message.enumType = reader.int32() as any;+ continue;+ case 3:+ if (tag !== 24) {+ break;+ }++ message.repeatedFieldEncoding = reader.int32() as any;+ continue;+ case 4:+ if (tag !== 32) {+ break;+ }++ message.utf8Validation = reader.int32() as any;+ continue;+ case 5:+ if (tag !== 40) {+ break;+ }++ message.messageEncoding = reader.int32() as any;+ continue;+ case 6:+ if (tag !== 48) {+ break;+ }++ message.jsonFormat = reader.int32() as any;+ continue;+ }+ if ((tag & 7) === 4 || tag === 0) {+ break;+ }+ reader.skipType(tag & 7);+ }+ return message;+ },++ fromJSON(object: any): FeatureSet {+ return {+ fieldPresence: isSet(object.fieldPresence) ? featureSet_FieldPresenceFromJSON(object.fieldPresence) : 0,+ enumType: isSet(object.enumType) ? featureSet_EnumTypeFromJSON(object.enumType) : 0,+ repeatedFieldEncoding: isSet(object.repeatedFieldEncoding)+ ? featureSet_RepeatedFieldEncodingFromJSON(object.repeatedFieldEncoding)+ : 0,+ utf8Validation: isSet(object.utf8Validation) ? featureSet_Utf8ValidationFromJSON(object.utf8Validation) : 0,+ messageEncoding: isSet(object.messageEncoding) ? featureSet_MessageEncodingFromJSON(object.messageEncoding) : 0,+ jsonFormat: isSet(object.jsonFormat) ? featureSet_JsonFormatFromJSON(object.jsonFormat) : 0,+ };+ },++ toJSON(message: FeatureSet): unknown {+ const obj: any = {};+ if (message.fieldPresence !== 0) {+ obj.fieldPresence = featureSet_FieldPresenceToJSON(message.fieldPresence);+ }+ if (message.enumType !== 0) {+ obj.enumType = featureSet_EnumTypeToJSON(message.enumType);+ }+ if (message.repeatedFieldEncoding !== 0) {+ obj.repeatedFieldEncoding = featureSet_RepeatedFieldEncodingToJSON(message.repeatedFieldEncoding);+ }+ if (message.utf8Validation !== 0) {+ obj.utf8Validation = featureSet_Utf8ValidationToJSON(message.utf8Validation);+ }+ if (message.messageEncoding !== 0) {+ obj.messageEncoding = featureSet_MessageEncodingToJSON(message.messageEncoding);+ }+ if (message.jsonFormat !== 0) {+ obj.jsonFormat = featureSet_JsonFormatToJSON(message.jsonFormat);+ }+ return obj;+ },++ create(base?: DeepPartial<FeatureSet>): FeatureSet {+ return FeatureSet.fromPartial(base ?? {});+ },+ fromPartial(object: DeepPartial<FeatureSet>): FeatureSet {+ const message = createBaseFeatureSet();+ message.fieldPresence = object.fieldPresence ?? 0;+ message.enumType = object.enumType ?? 0;+ message.repeatedFieldEncoding = object.repeatedFieldEncoding ?? 0;+ message.utf8Validation = object.utf8Validation ?? 0;+ message.messageEncoding = object.messageEncoding ?? 0;+ message.jsonFormat = object.jsonFormat ?? 0;+ return message;+ },+};++function createBaseFeatureSetDefaults(): FeatureSetDefaults {+ return { defaults: [], minimumEdition: 0, maximumEdition: 0 };+}++export const FeatureSetDefaults = {+ encode(message: FeatureSetDefaults, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {+ for (const v of message.defaults) {+ FeatureSetDefaults_FeatureSetEditionDefault.encode(v!, writer.uint32(10).fork()).ldelim();+ }+ if (message.minimumEdition !== 0) {+ writer.uint32(32).int32(message.minimumEdition);+ }+ if (message.maximumEdition !== 0) {+ writer.uint32(40).int32(message.maximumEdition);+ }+ return writer;+ },++ decode(input: _m0.Reader | Uint8Array, length?: number): FeatureSetDefaults {+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);+ let end = length === undefined ? reader.len : reader.pos + length;+ const message = createBaseFeatureSetDefaults();+ while (reader.pos < end) {+ const tag = reader.uint32();+ switch (tag >>> 3) {+ case 1:+ if (tag !== 10) {+ break;+ }++ message.defaults.push(FeatureSetDefaults_FeatureSetEditionDefault.decode(reader, reader.uint32()));+ continue;+ case 4:+ if (tag !== 32) {+ break;+ }++ message.minimumEdition = reader.int32() as any;+ continue;+ case 5:+ if (tag !== 40) {+ break;+ }++ message.maximumEdition = reader.int32() as any;+ continue;+ }+ if ((tag & 7) === 4 || tag === 0) {+ break;+ }+ reader.skipType(tag & 7);+ }+ return message;+ },++ fromJSON(object: any): FeatureSetDefaults {+ return {+ defaults: globalThis.Array.isArray(object?.defaults)+ ? object.defaults.map((e: any) => FeatureSetDefaults_FeatureSetEditionDefault.fromJSON(e))+ : [],+ minimumEdition: isSet(object.minimumEdition) ? editionFromJSON(object.minimumEdition) : 0,+ maximumEdition: isSet(object.maximumEdition) ? editionFromJSON(object.maximumEdition) : 0,+ };+ },++ toJSON(message: FeatureSetDefaults): unknown {+ const obj: any = {};+ if (message.defaults?.length) {+ obj.defaults = message.defaults.map((e) => FeatureSetDefaults_FeatureSetEditionDefault.toJSON(e));+ }+ if (message.minimumEdition !== 0) {+ obj.minimumEdition = editionToJSON(message.minimumEdition);+ }+ if (message.maximumEdition !== 0) {+ obj.maximumEdition = editionToJSON(message.maximumEdition);+ }+ return obj;+ },++ create(base?: DeepPartial<FeatureSetDefaults>): FeatureSetDefaults {+ return FeatureSetDefaults.fromPartial(base ?? {});+ },+ fromPartial(object: DeepPartial<FeatureSetDefaults>): FeatureSetDefaults {+ const message = createBaseFeatureSetDefaults();+ message.defaults = object.defaults?.map((e) => FeatureSetDefaults_FeatureSetEditionDefault.fromPartial(e)) || [];+ message.minimumEdition = object.minimumEdition ?? 0;+ message.maximumEdition = object.maximumEdition ?? 0;+ return message;+ },+};++function createBaseFeatureSetDefaults_FeatureSetEditionDefault(): FeatureSetDefaults_FeatureSetEditionDefault {+ return { edition: 0, features: undefined };+}++export const FeatureSetDefaults_FeatureSetEditionDefault = {+ encode(message: FeatureSetDefaults_FeatureSetEditionDefault, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {+ if (message.edition !== 0) {+ writer.uint32(24).int32(message.edition);+ }+ if (message.features !== undefined) {+ FeatureSet.encode(message.features, writer.uint32(18).fork()).ldelim();+ }+ return writer;+ },++ decode(input: _m0.Reader | Uint8Array, length?: number): FeatureSetDefaults_FeatureSetEditionDefault {+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);+ let end = length === undefined ? reader.len : reader.pos + length;+ const message = createBaseFeatureSetDefaults_FeatureSetEditionDefault();+ while (reader.pos < end) {+ const tag = reader.uint32();+ switch (tag >>> 3) {+ case 3:+ if (tag !== 24) {+ break;+ }++ message.edition = reader.int32() as any;+ continue;+ case 2:+ if (tag !== 18) {+ break;+ }++ message.features = FeatureSet.decode(reader, reader.uint32());+ continue;+ }+ if ((tag & 7) === 4 || tag === 0) {+ break;+ }+ reader.skipType(tag & 7);+ }+ return message;+ },++ fromJSON(object: any): FeatureSetDefaults_FeatureSetEditionDefault {+ return {+ edition: isSet(object.edition) ? editionFromJSON(object.edition) : 0,+ features: isSet(object.features) ? FeatureSet.fromJSON(object.features) : undefined,+ };+ },++ toJSON(message: FeatureSetDefaults_FeatureSetEditionDefault): unknown {+ const obj: any = {};+ if (message.edition !== 0) {+ obj.edition = editionToJSON(message.edition);+ }+ if (message.features !== undefined) {+ obj.features = FeatureSet.toJSON(message.features);+ }+ return obj;+ },++ create(base?: DeepPartial<FeatureSetDefaults_FeatureSetEditionDefault>): FeatureSetDefaults_FeatureSetEditionDefault {+ return FeatureSetDefaults_FeatureSetEditionDefault.fromPartial(base ?? {});+ },+ fromPartial(+ object: DeepPartial<FeatureSetDefaults_FeatureSetEditionDefault>,+ ): FeatureSetDefaults_FeatureSetEditionDefault {+ const message = createBaseFeatureSetDefaults_FeatureSetEditionDefault();+ message.edition = object.edition ?? 0;+ message.features = (object.features !== undefined && object.features !== null)+ ? FeatureSet.fromPartial(object.features)+ : undefined;+ return message;+ },+};+function createBaseSourceCodeInfo(): SourceCodeInfo {return { location: [] };}diff --git a/frontend/src/types/proto/google/protobuf/struct.ts b/frontend/src/types/proto/google/protobuf/struct.tsindex dbdf7a289a..b87dbf5bac 100644--- a/frontend/src/types/proto/google/protobuf/struct.ts+++ b/frontend/src/types/proto/google/protobuf/struct.ts@@ -8,7 +8,7 @@ export const protobufPackage = "google.protobuf";* `NullValue` is a singleton enumeration to represent the null value for the* `Value` type union.*- * The JSON representation for `NullValue` is JSON `null`.+ * The JSON representation for `NullValue` is JSON `null`.*/export enum NullValue {/** NULL_VALUE - Null value. */diff --git a/frontend/src/types/proto/google/protobuf/timestamp.ts b/frontend/src/types/proto/google/protobuf/timestamp.tsindex 51695e08d0..5781891bc0 100644--- a/frontend/src/types/proto/google/protobuf/timestamp.ts+++ b/frontend/src/types/proto/google/protobuf/timestamp.ts@@ -92,7 +92,7 @@ export const protobufPackage = "google.protobuf";* [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with* the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use* the Joda Time's [`ISODateTimeFormat.dateTime()`](- * http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D+ * http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()* ) to obtain a formatter capable of generating timestamps in this format.*/export interface Timestamp {diff --git a/frontend/src/types/proto/v1/sheet_service.ts b/frontend/src/types/proto/v1/sheet_service.tsindex cca45a6e90..eb2b371e27 100644--- a/frontend/src/types/proto/v1/sheet_service.ts+++ b/frontend/src/types/proto/v1/sheet_service.ts@@ -96,139 +96,10 @@ export interface Sheet {content: Uint8Array;/** content_size is the full size of the content, may not match the size of the `content` field. */contentSize: Long;- visibility: Sheet_Visibility;- /** The source of the sheet. */- source: Sheet_Source;- /** The type of the sheet. */- type: Sheet_Type;- /** starred indicates whether the sheet is starred by the current authenticated user. */- starred: boolean;payload: SheetPayload | undefined;pushEvent: PushEvent | undefined;}-export enum Sheet_Visibility {- VISIBILITY_UNSPECIFIED = 0,- /** VISIBILITY_PUBLIC - Public, sheet OWNER can read/write, and all others can read. */- VISIBILITY_PUBLIC = 1,- /** VISIBILITY_PROJECT - Project, sheet OWNER and project OWNER can read/write, and project DEVELOPER can read. */- VISIBILITY_PROJECT = 2,- /** VISIBILITY_PRIVATE - Private, only sheet OWNER can read/write. */- VISIBILITY_PRIVATE = 3,- UNRECOGNIZED = -1,-}--export function sheet_VisibilityFromJSON(object: any): Sheet_Visibility {- switch (object) {- case 0:- case "VISIBILITY_UNSPECIFIED":- return Sheet_Visibility.VISIBILITY_UNSPECIFIED;- case 1:- case "VISIBILITY_PUBLIC":- return Sheet_Visibility.VISIBILITY_PUBLIC;- case 2:- case "VISIBILITY_PROJECT":- return Sheet_Visibility.VISIBILITY_PROJECT;- case 3:- case "VISIBILITY_PRIVATE":- return Sheet_Visibility.VISIBILITY_PRIVATE;- case -1:- case "UNRECOGNIZED":- default:- return Sheet_Visibility.UNRECOGNIZED;- }-}--export function sheet_VisibilityToJSON(object: Sheet_Visibility): string {- switch (object) {- case Sheet_Visibility.VISIBILITY_UNSPECIFIED:- return "VISIBILITY_UNSPECIFIED";- case Sheet_Visibility.VISIBILITY_PUBLIC:- return "VISIBILITY_PUBLIC";- case Sheet_Visibility.VISIBILITY_PROJECT:- return "VISIBILITY_PROJECT";- case Sheet_Visibility.VISIBILITY_PRIVATE:- return "VISIBILITY_PRIVATE";- case Sheet_Visibility.UNRECOGNIZED:- default:- return "UNRECOGNIZED";- }-}--export enum Sheet_Source {- SOURCE_UNSPECIFIED = 0,- /** SOURCE_BYTEBASE - BYTEBASE is the sheet created in SQL Editor. */- SOURCE_BYTEBASE = 1,- /** SOURCE_BYTEBASE_ARTIFACT - BYTEBASE_ARTIFACT is the artifact sheet such as DDL/DML. */- SOURCE_BYTEBASE_ARTIFACT = 2,- UNRECOGNIZED = -1,-}--export function sheet_SourceFromJSON(object: any): Sheet_Source {- switch (object) {- case 0:- case "SOURCE_UNSPECIFIED":- return Sheet_Source.SOURCE_UNSPECIFIED;- case 1:- case "SOURCE_BYTEBASE":- return Sheet_Source.SOURCE_BYTEBASE;- case 2:- case "SOURCE_BYTEBASE_ARTIFACT":- return Sheet_Source.SOURCE_BYTEBASE_ARTIFACT;- case -1:- case "UNRECOGNIZED":- default:- return Sheet_Source.UNRECOGNIZED;- }-}--export function sheet_SourceToJSON(object: Sheet_Source): string {- switch (object) {- case Sheet_Source.SOURCE_UNSPECIFIED:- return "SOURCE_UNSPECIFIED";- case Sheet_Source.SOURCE_BYTEBASE:- return "SOURCE_BYTEBASE";- case Sheet_Source.SOURCE_BYTEBASE_ARTIFACT:- return "SOURCE_BYTEBASE_ARTIFACT";- case Sheet_Source.UNRECOGNIZED:- default:- return "UNRECOGNIZED";- }-}--export enum Sheet_Type {- TYPE_UNSPECIFIED = 0,- TYPE_SQL = 1,- UNRECOGNIZED = -1,-}--export function sheet_TypeFromJSON(object: any): Sheet_Type {- switch (object) {- case 0:- case "TYPE_UNSPECIFIED":- return Sheet_Type.TYPE_UNSPECIFIED;- case 1:- case "TYPE_SQL":- return Sheet_Type.TYPE_SQL;- case -1:- case "UNRECOGNIZED":- default:- return Sheet_Type.UNRECOGNIZED;- }-}--export function sheet_TypeToJSON(object: Sheet_Type): string {- switch (object) {- case Sheet_Type.TYPE_UNSPECIFIED:- return "TYPE_UNSPECIFIED";- case Sheet_Type.TYPE_SQL:- return "TYPE_SQL";- case Sheet_Type.UNRECOGNIZED:- default:- return "UNRECOGNIZED";- }-}-export interface SheetPayload {type: SheetPayload_Type;/** The snapshot of the database config when creating the sheet, be used to compare with the baseline_database_config and apply the diff to the database. */@@ -562,10 +433,6 @@ function createBaseSheet(): Sheet {updateTime: undefined,content: new Uint8Array(0),contentSize: Long.ZERO,- visibility: 0,- source: 0,- type: 0,- starred: false,payload: undefined,pushEvent: undefined,};@@ -597,18 +464,6 @@ export const Sheet = {if (!message.contentSize.isZero()) {writer.uint32(64).int64(message.contentSize);}- if (message.visibility !== 0) {- writer.uint32(72).int32(message.visibility);- }- if (message.source !== 0) {- writer.uint32(80).int32(message.source);- }- if (message.type !== 0) {- writer.uint32(88).int32(message.type);- }- if (message.starred === true) {- writer.uint32(96).bool(message.starred);- }if (message.payload !== undefined) {SheetPayload.encode(message.payload, writer.uint32(106).fork()).ldelim();}@@ -681,34 +536,6 @@ export const Sheet = {message.contentSize = reader.int64() as Long;continue;- case 9:- if (tag !== 72) {- break;- }-- message.visibility = reader.int32() as any;- continue;- case 10:- if (tag !== 80) {- break;- }-- message.source = reader.int32() as any;- continue;- case 11:- if (tag !== 88) {- break;- }-- message.type = reader.int32() as any;- continue;- case 12:- if (tag !== 96) {- break;- }-- message.starred = reader.bool();- continue;case 13:if (tag !== 106) {break;@@ -742,10 +569,6 @@ export const Sheet = {updateTime: isSet(object.updateTime) ? fromJsonTimestamp(object.updateTime) : undefined,content: isSet(object.content) ? bytesFromBase64(object.content) : new Uint8Array(0),contentSize: isSet(object.contentSize) ? Long.fromValue(object.contentSize) : Long.ZERO,- visibility: isSet(object.visibility) ? sheet_VisibilityFromJSON(object.visibility) : 0,- source: isSet(object.source) ? sheet_SourceFromJSON(object.source) : 0,- type: isSet(object.type) ? sheet_TypeFromJSON(object.type) : 0,- starred: isSet(object.starred) ? globalThis.Boolean(object.starred) : false,payload: isSet(object.payload) ? SheetPayload.fromJSON(object.payload) : undefined,pushEvent: isSet(object.pushEvent) ? PushEvent.fromJSON(object.pushEvent) : undefined,};@@ -777,18 +600,6 @@ export const Sheet = {if (!message.contentSize.isZero()) {obj.contentSize = (message.contentSize || Long.ZERO).toString();}- if (message.visibility !== 0) {- obj.visibility = sheet_VisibilityToJSON(message.visibility);- }- if (message.source !== 0) {- obj.source = sheet_SourceToJSON(message.source);- }- if (message.type !== 0) {- obj.type = sheet_TypeToJSON(message.type);- }- if (message.starred === true) {- obj.starred = message.starred;- }if (message.payload !== undefined) {obj.payload = SheetPayload.toJSON(message.payload);}@@ -813,10 +624,6 @@ export const Sheet = {message.contentSize = (object.contentSize !== undefined && object.contentSize !== null)? Long.fromValue(object.contentSize): Long.ZERO;- message.visibility = object.visibility ?? 0;- message.source = object.source ?? 0;- message.type = object.type ?? 0;- message.starred = object.starred ?? false;message.payload = (object.payload !== undefined && object.payload !== null)? SheetPayload.fromPartial(object.payload): undefined;diff --git a/frontend/src/views/sql-editor/EditorCommon/SaveSheetModal.vue b/frontend/src/views/sql-editor/EditorCommon/SaveSheetModal.vueindex 26c42fab50..f56db2fcb2 100644--- a/frontend/src/views/sql-editor/EditorCommon/SaveSheetModal.vue+++ b/frontend/src/views/sql-editor/EditorCommon/SaveSheetModal.vue@@ -28,7 +28,7 @@ type LocalState = {const tabStore = useTabStore();const databaseStore = useDatabaseV1Store();-const sheetV1Store = useWorkSheetStore();+const worksheetV1Store = useWorkSheetStore();const { events: sheetEvents } = useSheetContext();const { events: editorEvents } = useSQLEditorContext();@@ -66,14 +66,14 @@ const doSaveSheet = async (title: string) => {let sheet: Worksheet | undefined;if (sheetId !== UNKNOWN_ID) {- sheet = await sheetV1Store.patchSheet({+ sheet = await worksheetV1Store.patchSheet({name: sheetName,database: database.name,title: title,content: new TextEncoder().encode(statement),});} else {- sheet = await sheetV1Store.createSheet(+ sheet = await worksheetV1Store.createSheet(Worksheet.fromPartial({title: title,project: database.project,diff --git a/frontend/src/views/sql-editor/EditorCommon/SharePopover.vue b/frontend/src/views/sql-editor/EditorCommon/SharePopover.vueindex 9e07de5958..c9c0692b18 100644--- a/frontend/src/views/sql-editor/EditorCommon/SharePopover.vue+++ b/frontend/src/views/sql-editor/EditorCommon/SharePopover.vue@@ -108,7 +108,7 @@ import { worksheetSlugV1 } from "@/utils";const { t } = useI18n();const tabStore = useTabStore();-const sheetV1Store = useWorkSheetStore();+const worksheetV1Store = useWorkSheetStore();const sheetAndTabStore = useWorkSheetAndTabStore();const accessOptions = computed<AccessOption[]>(() => {@@ -143,7 +143,7 @@ const isShowAccessPopover = ref(false);const updateSheet = () => {if (sheet.value) {- sheetV1Store.patchSheet({+ worksheetV1Store.patchSheet({name: sheet.value.name,visibility: currentAccess.value.value,});diff --git a/frontend/src/views/sql-editor/Sheet/SheetTable/Dropdown.vue b/frontend/src/views/sql-editor/Sheet/SheetTable/Dropdown.vueindex c3afa4ba89..b4399acfb0 100644--- a/frontend/src/views/sql-editor/Sheet/SheetTable/Dropdown.vue+++ b/frontend/src/views/sql-editor/Sheet/SheetTable/Dropdown.vue@@ -33,7 +33,7 @@ const emit = defineEmits<{}>();const { t } = useI18n();-const sheetV1Store = useWorkSheetStore();+const worksheetV1Store = useWorkSheetStore();const dialog = useDialog();const options = computed(() => {@@ -80,7 +80,7 @@ const handleAction = async (key: string) => {maskClosable: false,closeOnEsc: false,async onPositiveClick() {- await sheetV1Store.deleteSheetByName(sheet.name);+ await worksheetV1Store.deleteSheetByName(sheet.name);emit("refresh");dialogInstance.destroy();},@@ -92,7 +92,7 @@ const handleAction = async (key: string) => {showIcon: true,});} else if (key === "star" || key === "unstar") {- await sheetV1Store.upsertSheetOrganizer({+ await worksheetV1Store.upsertSheetOrganizer({worksheet: sheet.name,starred: key === "star",});@@ -106,7 +106,7 @@ const handleAction = async (key: string) => {maskClosable: false,closeOnEsc: false,async onPositiveClick() {- await sheetV1Store.createSheet(+ await worksheetV1Store.createSheet(Worksheet.fromPartial({title: sheet.title,project: sheet.project,diff --git a/frontend/src/views/sql-editor/Sheet/common/Dropdown.vue b/frontend/src/views/sql-editor/Sheet/common/Dropdown.vueindex 12592c3ef9..b19ecec107 100644--- a/frontend/src/views/sql-editor/Sheet/common/Dropdown.vue+++ b/frontend/src/views/sql-editor/Sheet/common/Dropdown.vue@@ -40,7 +40,7 @@ const props = defineProps<{}>();const { t } = useI18n();-const sheetV1Store = useWorkSheetStore();+const worksheetV1Store = useWorkSheetStore();const dialog = useDialog();const { events } = useSheetContext();@@ -90,7 +90,7 @@ const handleAction = async (key: string) => {async onPositiveClick() {try {dialogInstance.loading = true;- await sheetV1Store.deleteSheetByName(sheet.name);+ await worksheetV1Store.deleteSheetByName(sheet.name);events.emit("refresh", { views: ["my", "shared", "starred"] });turnSheetToUnsavedTab(sheet);} finally {@@ -106,7 +106,7 @@ const handleAction = async (key: string) => {showIcon: true,});} else if (key === "star" || key === "unstar") {- await sheetV1Store.upsertSheetOrganizer({+ await worksheetV1Store.upsertSheetOrganizer({worksheet: sheet.name,starred: key === "star",});@@ -120,7 +120,7 @@ const handleAction = async (key: string) => {maskClosable: false,closeOnEsc: false,async onPositiveClick() {- await sheetV1Store.createSheet(+ await worksheetV1Store.createSheet(Worksheet.fromPartial({title: sheet.title,project: sheet.project,diff --git a/frontend/src/views/sql-editor/TabList/TabItem/Label.vue b/frontend/src/views/sql-editor/TabList/TabItem/Label.vueindex aeedf382e4..a228056c2f 100644--- a/frontend/src/views/sql-editor/TabList/TabItem/Label.vue+++ b/frontend/src/views/sql-editor/TabList/TabItem/Label.vue@@ -54,7 +54,7 @@ const state = reactive<LocalState>({});const tabStore = useTabStore();-const sheetV1Store = useWorkSheetStore();+const worksheetV1Store = useWorkSheetStore();const inputRef = ref<HTMLInputElement>();const { events } = useTabListContext();@@ -85,7 +85,7 @@ const confirmEdit = () => {tab.name = name;if (tab.sheetName) {- sheetV1Store.patchSheet({+ worksheetV1Store.patchSheet({name: tab.sheetName,title: name,});diff --git a/proto/gen/grpc-doc/v1/README.md b/proto/gen/grpc-doc/v1/README.mdindex 4fffb0bf35..11f25d49b7 100644--- a/proto/gen/grpc-doc/v1/README.md+++ b/proto/gen/grpc-doc/v1/README.md@@ -583,9 +583,6 @@- [SheetPayload](#bytebase-v1-SheetPayload)- [UpdateSheetRequest](#bytebase-v1-UpdateSheetRequest)- - [Sheet.Source](#bytebase-v1-Sheet-Source)- - [Sheet.Type](#bytebase-v1-Sheet-Type)- - [Sheet.Visibility](#bytebase-v1-Sheet-Visibility)- [SheetPayload.Type](#bytebase-v1-SheetPayload-Type)- [SheetService](#bytebase-v1-SheetService)@@ -9412,10 +9409,6 @@ We support three types of SMTP encryption: NONE, STARTTLS, and SSL/TLS.| update_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | The last update time of the sheet. || content | [bytes](#bytes) | | The content of the sheet. By default, it will be cut off, if it doesn't match the `content_size`, you can set the `raw` to true in GetSheet request to retrieve the full content. || content_size | [int64](#int64) | | content_size is the full size of the content, may not match the size of the `content` field. |-| visibility | [Sheet.Visibility](#bytebase-v1-Sheet-Visibility) | | |-| source | [Sheet.Source](#bytebase-v1-Sheet-Source) | | The source of the sheet. |-| type | [Sheet.Type](#bytebase-v1-Sheet-Type) | | The type of the sheet. |-| starred | [bool](#bool) | | starred indicates whether the sheet is starred by the current authenticated user. || payload | [SheetPayload](#bytebase-v1-SheetPayload) | | || push_event | [PushEvent](#bytebase-v1-PushEvent) | | |@@ -9461,45 +9454,6 @@ The sheet's `name` field is used to identify the sheet to update. Format: pr-<a name="bytebase-v1-Sheet-Source"></a>--### Sheet.Source---| Name | Number | Description |-| ---- | ------ | ----------- |-| SOURCE_UNSPECIFIED | 0 | |-| SOURCE_BYTEBASE | 1 | BYTEBASE is the sheet created in SQL Editor. |-| SOURCE_BYTEBASE_ARTIFACT | 2 | BYTEBASE_ARTIFACT is the artifact sheet such as DDL/DML. |----<a name="bytebase-v1-Sheet-Type"></a>--### Sheet.Type---| Name | Number | Description |-| ---- | ------ | ----------- |-| TYPE_UNSPECIFIED | 0 | |-| TYPE_SQL | 1 | |----<a name="bytebase-v1-Sheet-Visibility"></a>--### Sheet.Visibility---| Name | Number | Description |-| ---- | ------ | ----------- |-| VISIBILITY_UNSPECIFIED | 0 | |-| VISIBILITY_PUBLIC | 1 | Public, sheet OWNER can read/write, and all others can read. |-| VISIBILITY_PROJECT | 2 | Project, sheet OWNER and project OWNER can read/write, and project DEVELOPER can read. |-| VISIBILITY_PRIVATE | 3 | Private, only sheet OWNER can read/write. |---<a name="bytebase-v1-SheetPayload-Type"></a>### SheetPayload.Typediff --git a/proto/generated-go/v1/sheet_service.pb.go b/proto/generated-go/v1/sheet_service.pb.goindex 79ac33ef17..b7efd2bf61 100644--- a/proto/generated-go/v1/sheet_service.pb.go+++ b/proto/generated-go/v1/sheet_service.pb.go@@ -24,158 +24,6 @@ const (_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20))-type Sheet_Visibility int32--const (- Sheet_VISIBILITY_UNSPECIFIED Sheet_Visibility = 0- // Public, sheet OWNER can read/write, and all others can read.- Sheet_VISIBILITY_PUBLIC Sheet_Visibility = 1- // Project, sheet OWNER and project OWNER can read/write, and project DEVELOPER can read.- Sheet_VISIBILITY_PROJECT Sheet_Visibility = 2- // Private, only sheet OWNER can read/write.- Sheet_VISIBILITY_PRIVATE Sheet_Visibility = 3-)--// Enum value maps for Sheet_Visibility.-var (- Sheet_Visibility_name = map[int32]string{- 0: "VISIBILITY_UNSPECIFIED",- 1: "VISIBILITY_PUBLIC",- 2: "VISIBILITY_PROJECT",- 3: "VISIBILITY_PRIVATE",- }- Sheet_Visibility_value = map[string]int32{- "VISIBILITY_UNSPECIFIED": 0,- "VISIBILITY_PUBLIC": 1,- "VISIBILITY_PROJECT": 2,- "VISIBILITY_PRIVATE": 3,- }-)--func (x Sheet_Visibility) Enum() *Sheet_Visibility {- p := new(Sheet_Visibility)- *p = x- return p-}--func (x Sheet_Visibility) String() string {- return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))-}--func (Sheet_Visibility) Descriptor() protoreflect.EnumDescriptor {- return file_v1_sheet_service_proto_enumTypes[0].Descriptor()-}--func (Sheet_Visibility) Type() protoreflect.EnumType {- return &file_v1_sheet_service_proto_enumTypes[0]-}--func (x Sheet_Visibility) Number() protoreflect.EnumNumber {- return protoreflect.EnumNumber(x)-}--// Deprecated: Use Sheet_Visibility.Descriptor instead.-func (Sheet_Visibility) EnumDescriptor() ([]byte, []int) {- return file_v1_sheet_service_proto_rawDescGZIP(), []int{4, 0}-}--type Sheet_Source int32--const (- Sheet_SOURCE_UNSPECIFIED Sheet_Source = 0- // BYTEBASE is the sheet created in SQL Editor.- Sheet_SOURCE_BYTEBASE Sheet_Source = 1- // BYTEBASE_ARTIFACT is the artifact sheet such as DDL/DML.- Sheet_SOURCE_BYTEBASE_ARTIFACT Sheet_Source = 2-)--// Enum value maps for Sheet_Source.-var (- Sheet_Source_name = map[int32]string{- 0: "SOURCE_UNSPECIFIED",- 1: "SOURCE_BYTEBASE",- 2: "SOURCE_BYTEBASE_ARTIFACT",- }- Sheet_Source_value = map[string]int32{- "SOURCE_UNSPECIFIED": 0,- "SOURCE_BYTEBASE": 1,- "SOURCE_BYTEBASE_ARTIFACT": 2,- }-)--func (x Sheet_Source) Enum() *Sheet_Source {- p := new(Sheet_Source)- *p = x- return p-}--func (x Sheet_Source) String() string {- return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))-}--func (Sheet_Source) Descriptor() protoreflect.EnumDescriptor {- return file_v1_sheet_service_proto_enumTypes[1].Descriptor()-}--func (Sheet_Source) Type() protoreflect.EnumType {- return &file_v1_sheet_service_proto_enumTypes[1]-}--func (x Sheet_Source) Number() protoreflect.EnumNumber {- return protoreflect.EnumNumber(x)-}--// Deprecated: Use Sheet_Source.Descriptor instead.-func (Sheet_Source) EnumDescriptor() ([]byte, []int) {- return file_v1_sheet_service_proto_rawDescGZIP(), []int{4, 1}-}--type Sheet_Type int32--const (- Sheet_TYPE_UNSPECIFIED Sheet_Type = 0- Sheet_TYPE_SQL Sheet_Type = 1-)--// Enum value maps for Sheet_Type.-var (- Sheet_Type_name = map[int32]string{- 0: "TYPE_UNSPECIFIED",- 1: "TYPE_SQL",- }- Sheet_Type_value = map[string]int32{- "TYPE_UNSPECIFIED": 0,- "TYPE_SQL": 1,- }-)--func (x Sheet_Type) Enum() *Sheet_Type {- p := new(Sheet_Type)- *p = x- return p-}--func (x Sheet_Type) String() string {- return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))-}--func (Sheet_Type) Descriptor() protoreflect.EnumDescriptor {- return file_v1_sheet_service_proto_enumTypes[2].Descriptor()-}--func (Sheet_Type) Type() protoreflect.EnumType {- return &file_v1_sheet_service_proto_enumTypes[2]-}--func (x Sheet_Type) Number() protoreflect.EnumNumber {- return protoreflect.EnumNumber(x)-}--// Deprecated: Use Sheet_Type.Descriptor instead.-func (Sheet_Type) EnumDescriptor() ([]byte, []int) {- return file_v1_sheet_service_proto_rawDescGZIP(), []int{4, 2}-}-// Type of the SheetPayload.type SheetPayload_Type int32@@ -207,11 +55,11 @@ func (x SheetPayload_Type) String() string {}func (SheetPayload_Type) Descriptor() protoreflect.EnumDescriptor {- return file_v1_sheet_service_proto_enumTypes[3].Descriptor()+ return file_v1_sheet_service_proto_enumTypes[0].Descriptor()}func (SheetPayload_Type) Type() protoreflect.EnumType {- return &file_v1_sheet_service_proto_enumTypes[3]+ return &file_v1_sheet_service_proto_enumTypes[0]}func (x SheetPayload_Type) Number() protoreflect.EnumNumber {@@ -482,16 +330,9 @@ type Sheet struct {// set the `raw` to true in GetSheet request to retrieve the full content.Content []byte `protobuf:"bytes,7,opt,name=content,proto3" json:"content,omitempty"`// content_size is the full size of the content, may not match the size of the `content` field.- ContentSize int64 `protobuf:"varint,8,opt,name=content_size,json=contentSize,proto3" json:"content_size,omitempty"`- Visibility Sheet_Visibility `protobuf:"varint,9,opt,name=visibility,proto3,enum=bytebase.v1.Sheet_Visibility" json:"visibility,omitempty"`- // The source of the sheet.- Source Sheet_Source `protobuf:"varint,10,opt,name=source,proto3,enum=bytebase.v1.Sheet_Source" json:"source,omitempty"`- // The type of the sheet.- Type Sheet_Type `protobuf:"varint,11,opt,name=type,proto3,enum=bytebase.v1.Sheet_Type" json:"type,omitempty"`- // starred indicates whether the sheet is starred by the current authenticated user.- Starred bool `protobuf:"varint,12,opt,name=starred,proto3" json:"starred,omitempty"`- Payload *SheetPayload `protobuf:"bytes,13,opt,name=payload,proto3" json:"payload,omitempty"`- PushEvent *PushEvent `protobuf:"bytes,14,opt,name=push_event,json=pushEvent,proto3" json:"push_event,omitempty"`+ ContentSize int64 `protobuf:"varint,8,opt,name=content_size,json=contentSize,proto3" json:"content_size,omitempty"`+ Payload *SheetPayload `protobuf:"bytes,13,opt,name=payload,proto3" json:"payload,omitempty"`+ PushEvent *PushEvent `protobuf:"bytes,14,opt,name=push_event,json=pushEvent,proto3" json:"push_event,omitempty"`}func (x *Sheet) Reset() {@@ -582,34 +423,6 @@ func (x *Sheet) GetContentSize() int64 {return 0}-func (x *Sheet) GetVisibility() Sheet_Visibility {- if x != nil {- return x.Visibility- }- return Sheet_VISIBILITY_UNSPECIFIED-}--func (x *Sheet) GetSource() Sheet_Source {- if x != nil {- return x.Source- }- return Sheet_SOURCE_UNSPECIFIED-}--func (x *Sheet) GetType() Sheet_Type {- if x != nil {- return x.Type- }- return Sheet_TYPE_UNSPECIFIED-}--func (x *Sheet) GetStarred() bool {- if x != nil {- return x.Starred- }- return false-}-func (x *Sheet) GetPayload() *SheetPayload {if x != nil {return x.Payload@@ -729,7 +542,7 @@ var file_v1_sheet_service_proto_rawDesc = []byte{0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x22, 0x2d, 0x0a, 0x12, 0x44, 0x65, 0x6c,0x65, 0x74, 0x65, 0x53, 0x68, 0x65, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0,- 0x41, 0x02, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xef, 0x06, 0x0a, 0x05, 0x53, 0x68, 0x65,+ 0x41, 0x02, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xb0, 0x03, 0x0a, 0x05, 0x53, 0x68, 0x65,0x65, 0x74, 0x12, 0x1a, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,0x42, 0x06, 0xe0, 0x41, 0x02, 0xe0, 0x41, 0x05, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a,0x0a, 0x08, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,@@ -750,92 +563,64 @@ var file_v1_sheet_service_proto_rawDesc = []byte{0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x26, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x65,0x6e, 0x74, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0,0x41, 0x03, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x53, 0x69, 0x7a, 0x65, 0x12,- 0x42, 0x0a, 0x0a, 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x18, 0x09, 0x20,- 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76,- 0x31, 0x2e, 0x53, 0x68, 0x65, 0x65, 0x74, 0x2e, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69,- 0x74, 0x79, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0a, 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c,- 0x69, 0x74, 0x79, 0x12, 0x36, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x0a, 0x20,- 0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76,- 0x31, 0x2e, 0x53, 0x68, 0x65, 0x65, 0x74, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x03,- 0xe0, 0x41, 0x03, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x30, 0x0a, 0x04, 0x74,- 0x79, 0x70, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x62, 0x79, 0x74, 0x65,- 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x68, 0x65, 0x65, 0x74, 0x2e, 0x54, 0x79,- 0x70, 0x65, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1d, 0x0a,- 0x07, 0x73, 0x74, 0x61, 0x72, 0x72, 0x65, 0x64, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x42, 0x03,- 0xe0, 0x41, 0x03, 0x52, 0x07, 0x73, 0x74, 0x61, 0x72, 0x72, 0x65, 0x64, 0x12, 0x33, 0x0a, 0x07,- 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e,- 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x68, 0x65, 0x65,- 0x74, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61,- 0x64, 0x12, 0x35, 0x0a, 0x0a, 0x70, 0x75, 0x73, 0x68, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18,- 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65,- 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x75, 0x73, 0x68, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x09, 0x70,- 0x75, 0x73, 0x68, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x22, 0x6f, 0x0a, 0x0a, 0x56, 0x69, 0x73, 0x69,- 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x1a, 0x0a, 0x16, 0x56, 0x49, 0x53, 0x49, 0x42, 0x49,- 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44,- 0x10, 0x00, 0x12, 0x15, 0x0a, 0x11, 0x56, 0x49, 0x53, 0x49, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59,- 0x5f, 0x50, 0x55, 0x42, 0x4c, 0x49, 0x43, 0x10, 0x01, 0x12, 0x16, 0x0a, 0x12, 0x56, 0x49, 0x53,- 0x49, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x50, 0x52, 0x4f, 0x4a, 0x45, 0x43, 0x54, 0x10,- 0x02, 0x12, 0x16, 0x0a, 0x12, 0x56, 0x49, 0x53, 0x49, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f,- 0x50, 0x52, 0x49, 0x56, 0x41, 0x54, 0x45, 0x10, 0x03, 0x22, 0x53, 0x0a, 0x06, 0x53, 0x6f, 0x75,- 0x72, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x12, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x55, 0x4e,- 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x53,- 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x42, 0x59, 0x54, 0x45, 0x42, 0x41, 0x53, 0x45, 0x10, 0x01,- 0x12, 0x1c, 0x0a, 0x18, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x42, 0x59, 0x54, 0x45, 0x42,- 0x41, 0x53, 0x45, 0x5f, 0x41, 0x52, 0x54, 0x49, 0x46, 0x41, 0x43, 0x54, 0x10, 0x02, 0x22, 0x2a,- 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55,- 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08,- 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x51, 0x4c, 0x10, 0x01, 0x22, 0x90, 0x02, 0x0a, 0x0c, 0x53,- 0x68, 0x65, 0x65, 0x74, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x32, 0x0a, 0x04, 0x74,- 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x62, 0x79, 0x74, 0x65,- 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x68, 0x65, 0x65, 0x74, 0x50, 0x61, 0x79,- 0x6c, 0x6f, 0x61, 0x64, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12,- 0x44, 0x0a, 0x0f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66,- 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62,+ 0x33, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b,+ 0x32, 0x19, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53,+ 0x68, 0x65, 0x65, 0x74, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x07, 0x70, 0x61, 0x79,+ 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x35, 0x0a, 0x0a, 0x70, 0x75, 0x73, 0x68, 0x5f, 0x65, 0x76, 0x65,+ 0x6e, 0x74, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62,+ 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x75, 0x73, 0x68, 0x45, 0x76, 0x65, 0x6e, 0x74,+ 0x52, 0x09, 0x70, 0x75, 0x73, 0x68, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x22, 0x90, 0x02, 0x0a, 0x0c,+ 0x53, 0x68, 0x65, 0x65, 0x74, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x32, 0x0a, 0x04,+ 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x62, 0x79, 0x74,+ 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x68, 0x65, 0x65, 0x74, 0x50, 0x61,+ 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65,+ 0x12, 0x44, 0x0a, 0x0f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x63, 0x6f, 0x6e,+ 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x62, 0x79, 0x74, 0x65,+ 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65,+ 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0e, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65,+ 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x55, 0x0a, 0x18, 0x62, 0x61, 0x73, 0x65, 0x6c, 0x69,+ 0x6e, 0x65, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66,+ 0x69, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62,0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x43,- 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0e, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x43,- 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x55, 0x0a, 0x18, 0x62, 0x61, 0x73, 0x65, 0x6c, 0x69, 0x6e,- 0x65, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69,- 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61,- 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x43, 0x6f,- 0x6e, 0x66, 0x69, 0x67, 0x52, 0x16, 0x62, 0x61, 0x73, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x44, 0x61,- 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x2f, 0x0a, 0x04,- 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53,- 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x53, 0x43,- 0x48, 0x45, 0x4d, 0x41, 0x5f, 0x44, 0x45, 0x53, 0x49, 0x47, 0x4e, 0x10, 0x01, 0x32, 0x83, 0x04,- 0x0a, 0x0c, 0x53, 0x68, 0x65, 0x65, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x80,- 0x01, 0x0a, 0x0b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x68, 0x65, 0x65, 0x74, 0x12, 0x1f,- 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65,- 0x61, 0x74, 0x65, 0x53, 0x68, 0x65, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,- 0x12, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x68,- 0x65, 0x65, 0x74, 0x22, 0x3c, 0xda, 0x41, 0x0c, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x2c, 0x73,- 0x68, 0x65, 0x65, 0x74, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x27, 0x3a, 0x05, 0x73, 0x68, 0x65, 0x65,- 0x74, 0x22, 0x1e, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70,- 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x73, 0x68, 0x65, 0x65, 0x74,- 0x73, 0x12, 0x6b, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x53, 0x68, 0x65, 0x65, 0x74, 0x12, 0x1c, 0x2e,- 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53,- 0x68, 0x65, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x62, 0x79,- 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x68, 0x65, 0x65, 0x74, 0x22,- 0x2d, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x12, 0x1e,- 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63,- 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x73, 0x68, 0x65, 0x65, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x8b,- 0x01, 0x0a, 0x0b, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x68, 0x65, 0x65, 0x74, 0x12, 0x1f,- 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64,- 0x61, 0x74, 0x65, 0x53, 0x68, 0x65, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,- 0x12, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x68,- 0x65, 0x65, 0x74, 0x22, 0x47, 0xda, 0x41, 0x11, 0x73, 0x68, 0x65, 0x65, 0x74, 0x2c, 0x75, 0x70,- 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2d, 0x3a,- 0x05, 0x73, 0x68, 0x65, 0x65, 0x74, 0x32, 0x24, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x73, 0x68, 0x65,- 0x65, 0x74, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73,- 0x2f, 0x2a, 0x2f, 0x73, 0x68, 0x65, 0x65, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x75, 0x0a, 0x0b,- 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x68, 0x65, 0x65, 0x74, 0x12, 0x1f, 0x2e, 0x62, 0x79,- 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65,- 0x53, 0x68, 0x65, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67,- 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45,- 0x6d, 0x70, 0x74, 0x79, 0x22, 0x2d, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4,- 0x93, 0x02, 0x20, 0x2a, 0x1e, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70,- 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x73, 0x68, 0x65, 0x65, 0x74, 0x73,- 0x2f, 0x2a, 0x7d, 0x42, 0x11, 0x5a, 0x0f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64,- 0x2d, 0x67, 0x6f, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,+ 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x16, 0x62, 0x61, 0x73, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x44,+ 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x2f, 0x0a,+ 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e,+ 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x53,+ 0x43, 0x48, 0x45, 0x4d, 0x41, 0x5f, 0x44, 0x45, 0x53, 0x49, 0x47, 0x4e, 0x10, 0x01, 0x32, 0x83,+ 0x04, 0x0a, 0x0c, 0x53, 0x68, 0x65, 0x65, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12,+ 0x80, 0x01, 0x0a, 0x0b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x68, 0x65, 0x65, 0x74, 0x12,+ 0x1f, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72,+ 0x65, 0x61, 0x74, 0x65, 0x53, 0x68, 0x65, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,+ 0x1a, 0x12, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53,+ 0x68, 0x65, 0x65, 0x74, 0x22, 0x3c, 0xda, 0x41, 0x0c, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x2c,+ 0x73, 0x68, 0x65, 0x65, 0x74, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x27, 0x3a, 0x05, 0x73, 0x68, 0x65,+ 0x65, 0x74, 0x22, 0x1e, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d,+ 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x73, 0x68, 0x65, 0x65,+ 0x74, 0x73, 0x12, 0x6b, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x53, 0x68, 0x65, 0x65, 0x74, 0x12, 0x1c,+ 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74,+ 0x53, 0x68, 0x65, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x62,+ 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x68, 0x65, 0x65, 0x74,+ 0x22, 0x2d, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x12,+ 0x1e, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65,+ 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x73, 0x68, 0x65, 0x65, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x12,+ 0x8b, 0x01, 0x0a, 0x0b, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x68, 0x65, 0x65, 0x74, 0x12,+ 0x1f, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70,+ 0x64, 0x61, 0x74, 0x65, 0x53, 0x68, 0x65, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,+ 0x1a, 0x12, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53,+ 0x68, 0x65, 0x65, 0x74, 0x22, 0x47, 0xda, 0x41, 0x11, 0x73, 0x68, 0x65, 0x65, 0x74, 0x2c, 0x75,+ 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2d,+ 0x3a, 0x05, 0x73, 0x68, 0x65, 0x65, 0x74, 0x32, 0x24, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x73, 0x68,+ 0x65, 0x65, 0x74, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74,+ 0x73, 0x2f, 0x2a, 0x2f, 0x73, 0x68, 0x65, 0x65, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x75, 0x0a,+ 0x0b, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x68, 0x65, 0x65, 0x74, 0x12, 0x1f, 0x2e, 0x62,+ 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74,+ 0x65, 0x53, 0x68, 0x65, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e,+ 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e,+ 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x2d, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3,+ 0xe4, 0x93, 0x02, 0x20, 0x2a, 0x1e, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d,+ 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x73, 0x68, 0x65, 0x65, 0x74,+ 0x73, 0x2f, 0x2a, 0x7d, 0x42, 0x11, 0x5a, 0x0f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65,+ 0x64, 0x2d, 0x67, 0x6f, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,}var (@@ -850,52 +635,46 @@ func file_v1_sheet_service_proto_rawDescGZIP() []byte {return file_v1_sheet_service_proto_rawDescData}-var file_v1_sheet_service_proto_enumTypes = make([]protoimpl.EnumInfo, 4)+var file_v1_sheet_service_proto_enumTypes = make([]protoimpl.EnumInfo, 1)var file_v1_sheet_service_proto_msgTypes = make([]protoimpl.MessageInfo, 6)var file_v1_sheet_service_proto_goTypes = []interface{}{- (Sheet_Visibility)(0), // 0: bytebase.v1.Sheet.Visibility- (Sheet_Source)(0), // 1: bytebase.v1.Sheet.Source- (Sheet_Type)(0), // 2: bytebase.v1.Sheet.Type- (SheetPayload_Type)(0), // 3: bytebase.v1.SheetPayload.Type- (*CreateSheetRequest)(nil), // 4: bytebase.v1.CreateSheetRequest- (*GetSheetRequest)(nil), // 5: bytebase.v1.GetSheetRequest- (*UpdateSheetRequest)(nil), // 6: bytebase.v1.UpdateSheetRequest- (*DeleteSheetRequest)(nil), // 7: bytebase.v1.DeleteSheetRequest- (*Sheet)(nil), // 8: bytebase.v1.Sheet- (*SheetPayload)(nil), // 9: bytebase.v1.SheetPayload- (*fieldmaskpb.FieldMask)(nil), // 10: google.protobuf.FieldMask- (*timestamppb.Timestamp)(nil), // 11: google.protobuf.Timestamp- (*PushEvent)(nil), // 12: bytebase.v1.PushEvent- (*DatabaseConfig)(nil), // 13: bytebase.v1.DatabaseConfig- (*emptypb.Empty)(nil), // 14: google.protobuf.Empty+ (SheetPayload_Type)(0), // 0: bytebase.v1.SheetPayload.Type+ (*CreateSheetRequest)(nil), // 1: bytebase.v1.CreateSheetRequest+ (*GetSheetRequest)(nil), // 2: bytebase.v1.GetSheetRequest+ (*UpdateSheetRequest)(nil), // 3: bytebase.v1.UpdateSheetRequest+ (*DeleteSheetRequest)(nil), // 4: bytebase.v1.DeleteSheetRequest+ (*Sheet)(nil), // 5: bytebase.v1.Sheet+ (*SheetPayload)(nil), // 6: bytebase.v1.SheetPayload+ (*fieldmaskpb.FieldMask)(nil), // 7: google.protobuf.FieldMask+ (*timestamppb.Timestamp)(nil), // 8: google.protobuf.Timestamp+ (*PushEvent)(nil), // 9: bytebase.v1.PushEvent+ (*DatabaseConfig)(nil), // 10: bytebase.v1.DatabaseConfig+ (*emptypb.Empty)(nil), // 11: google.protobuf.Empty}var file_v1_sheet_service_proto_depIdxs = []int32{- 8, // 0: bytebase.v1.CreateSheetRequest.sheet:type_name -> bytebase.v1.Sheet- 8, // 1: bytebase.v1.UpdateSheetRequest.sheet:type_name -> bytebase.v1.Sheet- 10, // 2: bytebase.v1.UpdateSheetRequest.update_mask:type_name -> google.protobuf.FieldMask- 11, // 3: bytebase.v1.Sheet.create_time:type_name -> google.protobuf.Timestamp- 11, // 4: bytebase.v1.Sheet.update_time:type_name -> google.protobuf.Timestamp- 0, // 5: bytebase.v1.Sheet.visibility:type_name -> bytebase.v1.Sheet.Visibility- 1, // 6: bytebase.v1.Sheet.source:type_name -> bytebase.v1.Sheet.Source- 2, // 7: bytebase.v1.Sheet.type:type_name -> bytebase.v1.Sheet.Type- 9, // 8: bytebase.v1.Sheet.payload:type_name -> bytebase.v1.SheetPayload- 12, // 9: bytebase.v1.Sheet.push_event:type_name -> bytebase.v1.PushEvent- 3, // 10: bytebase.v1.SheetPayload.type:type_name -> bytebase.v1.SheetPayload.Type- 13, // 11: bytebase.v1.SheetPayload.database_config:type_name -> bytebase.v1.DatabaseConfig- 13, // 12: bytebase.v1.SheetPayload.baseline_database_config:type_name -> bytebase.v1.DatabaseConfig- 4, // 13: bytebase.v1.SheetService.CreateSheet:input_type -> bytebase.v1.CreateSheetRequest- 5, // 14: bytebase.v1.SheetService.GetSheet:input_type -> bytebase.v1.GetSheetRequest- 6, // 15: bytebase.v1.SheetService.UpdateSheet:input_type -> bytebase.v1.UpdateSheetRequest- 7, // 16: bytebase.v1.SheetService.DeleteSheet:input_type -> bytebase.v1.DeleteSheetRequest- 8, // 17: bytebase.v1.SheetService.CreateSheet:output_type -> bytebase.v1.Sheet- 8, // 18: bytebase.v1.SheetService.GetSheet:output_type -> bytebase.v1.Sheet- 8, // 19: bytebase.v1.SheetService.UpdateSheet:output_type -> bytebase.v1.Sheet- 14, // 20: bytebase.v1.SheetService.DeleteSheet:output_type -> google.protobuf.Empty- 17, // [17:21] is the sub-list for method output_type- 13, // [13:17] is the sub-list for method input_type- 13, // [13:13] is the sub-list for extension type_name- 13, // [13:13] is the sub-list for extension extendee- 0, // [0:13] is the sub-list for field type_name+ 5, // 0: bytebase.v1.CreateSheetRequest.sheet:type_name -> bytebase.v1.Sheet+ 5, // 1: bytebase.v1.UpdateSheetRequest.sheet:type_name -> bytebase.v1.Sheet+ 7, // 2: bytebase.v1.UpdateSheetRequest.update_mask:type_name -> google.protobuf.FieldMask+ 8, // 3: bytebase.v1.Sheet.create_time:type_name -> google.protobuf.Timestamp+ 8, // 4: bytebase.v1.Sheet.update_time:type_name -> google.protobuf.Timestamp+ 6, // 5: bytebase.v1.Sheet.payload:type_name -> bytebase.v1.SheetPayload+ 9, // 6: bytebase.v1.Sheet.push_event:type_name -> bytebase.v1.PushEvent+ 0, // 7: bytebase.v1.SheetPayload.type:type_name -> bytebase.v1.SheetPayload.Type+ 10, // 8: bytebase.v1.SheetPayload.database_config:type_name -> bytebase.v1.DatabaseConfig+ 10, // 9: bytebase.v1.SheetPayload.baseline_database_config:type_name -> bytebase.v1.DatabaseConfig+ 1, // 10: bytebase.v1.SheetService.CreateSheet:input_type -> bytebase.v1.CreateSheetRequest+ 2, // 11: bytebase.v1.SheetService.GetSheet:input_type -> bytebase.v1.GetSheetRequest+ 3, // 12: bytebase.v1.SheetService.UpdateSheet:input_type -> bytebase.v1.UpdateSheetRequest+ 4, // 13: bytebase.v1.SheetService.DeleteSheet:input_type -> bytebase.v1.DeleteSheetRequest+ 5, // 14: bytebase.v1.SheetService.CreateSheet:output_type -> bytebase.v1.Sheet+ 5, // 15: bytebase.v1.SheetService.GetSheet:output_type -> bytebase.v1.Sheet+ 5, // 16: bytebase.v1.SheetService.UpdateSheet:output_type -> bytebase.v1.Sheet+ 11, // 17: bytebase.v1.SheetService.DeleteSheet:output_type -> google.protobuf.Empty+ 14, // [14:18] is the sub-list for method output_type+ 10, // [10:14] is the sub-list for method input_type+ 10, // [10:10] is the sub-list for extension type_name+ 10, // [10:10] is the sub-list for extension extendee+ 0, // [0:10] is the sub-list for field type_name}func init() { file_v1_sheet_service_proto_init() }@@ -984,7 +763,7 @@ func file_v1_sheet_service_proto_init() {File: protoimpl.DescBuilder{GoPackagePath: reflect.TypeOf(x{}).PkgPath(),RawDescriptor: file_v1_sheet_service_proto_rawDesc,- NumEnums: 4,+ NumEnums: 1,NumMessages: 6,NumExtensions: 0,NumServices: 1,diff --git a/proto/v1/sheet_service.proto b/proto/v1/sheet_service.protoindex c69fd403a5..178cb9ae0c 100644--- a/proto/v1/sheet_service.proto+++ b/proto/v1/sheet_service.proto@@ -118,37 +118,6 @@ message Sheet {// content_size is the full size of the content, may not match the size of the `content` field.int64 content_size = 8 [(google.api.field_behavior) = OUTPUT_ONLY];- enum Visibility {- VISIBILITY_UNSPECIFIED = 0;- // Public, sheet OWNER can read/write, and all others can read.- VISIBILITY_PUBLIC = 1;- // Project, sheet OWNER and project OWNER can read/write, and project DEVELOPER can read.- VISIBILITY_PROJECT = 2;- // Private, only sheet OWNER can read/write.- VISIBILITY_PRIVATE = 3;- }- Visibility visibility = 9 [(google.api.field_behavior) = REQUIRED];-- enum Source {- SOURCE_UNSPECIFIED = 0;- // BYTEBASE is the sheet created in SQL Editor.- SOURCE_BYTEBASE = 1;- // BYTEBASE_ARTIFACT is the artifact sheet such as DDL/DML.- SOURCE_BYTEBASE_ARTIFACT = 2;- }- // The source of the sheet.- Source source = 10 [(google.api.field_behavior) = OUTPUT_ONLY];-- enum Type {- TYPE_UNSPECIFIED = 0;- TYPE_SQL = 1;- }- // The type of the sheet.- Type type = 11 [(google.api.field_behavior) = REQUIRED];-- // starred indicates whether the sheet is starred by the current authenticated user.- bool starred = 12 [(google.api.field_behavior) = OUTPUT_ONLY];-SheetPayload payload = 13;PushEvent push_event = 14;