Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
refactor: migrate sheet in sql editor to worksheet api (#10585)
ecmadaoecc1aaebd5bc
diff --git a/backend/api/v1/acl_iam.go b/backend/api/v1/acl_iam.goindex 9aae33e856..df86d29683 100644--- a/backend/api/v1/acl_iam.go+++ b/backend/api/v1/acl_iam.go@@ -84,11 +84,20 @@ func isSkippedMethod(fullMethod string) bool {casev1pb.SheetService_CreateSheet_FullMethodName,v1pb.SheetService_GetSheet_FullMethodName,- v1pb.SheetService_SearchSheets_FullMethodName,v1pb.SheetService_UpdateSheet_FullMethodName,- v1pb.SheetService_UpdateSheetOrganizer_FullMethodName,v1pb.SheetService_DeleteSheet_FullMethodName:return true+ // skip checking for sheet service because we want to+ // discriminate bytebase artifact sheets and user sheets first.+ // TODO(p0ny): implement+ case+ v1pb.WorksheetService_CreateWorksheet_FullMethodName,+ v1pb.WorksheetService_GetWorksheet_FullMethodName,+ v1pb.WorksheetService_SearchWorksheets_FullMethodName,+ v1pb.WorksheetService_UpdateWorksheet_FullMethodName,+ v1pb.WorksheetService_UpdateWorksheetOrganizer_FullMethodName,+ v1pb.WorksheetService_DeleteWorksheet_FullMethodName:+ return true// handled in the method because we need to consider branch.Creator.casev1pb.BranchService_UpdateBranch_FullMethodName,diff --git a/backend/api/v1/sheet_service.go b/backend/api/v1/sheet_service.goindex 683f2e889f..f62a6808b7 100644--- a/backend/api/v1/sheet_service.go+++ b/backend/api/v1/sheet_service.go@@ -4,9 +4,6 @@ import ("context""fmt""slices"- "strings"-- "log/slog""google.golang.org/grpc/codes""google.golang.org/grpc/status"@@ -14,7 +11,6 @@ import ("google.golang.org/protobuf/types/known/timestamppb""github.com/bytebase/bytebase/backend/common"- "github.com/bytebase/bytebase/backend/common/log""github.com/bytebase/bytebase/backend/component/config""github.com/bytebase/bytebase/backend/component/iam"enterprise "github.com/bytebase/bytebase/backend/enterprise/api"@@ -204,128 +200,6 @@ func (s *SheetService) GetSheet(ctx context.Context, request *v1pb.GetSheetRequereturn v1pbSheet, nil}-// SearchSheets returns a list of sheets based on the search filters.-func (s *SheetService) SearchSheets(ctx context.Context, request *v1pb.SearchSheetsRequest) (*v1pb.SearchSheetsResponse, error) {- projectResourceID, err := common.GetProjectID(request.Parent)- if err != nil {- return nil, status.Errorf(codes.InvalidArgument, err.Error())- }- principalID, ok := ctx.Value(common.PrincipalIDContextKey).(int)- if !ok {- return nil, status.Errorf(codes.Internal, "principal ID not found")- }-- sheetFind := &store.FindSheetMessage{}- if projectResourceID != "-" {- project, err := s.store.GetProjectV2(ctx, &store.FindProjectMessage{- ResourceID: &projectResourceID,- })- if err != nil {- return nil, status.Errorf(codes.NotFound, fmt.Sprintf("project with resource id %s not found", projectResourceID))- }- if project.Deleted {- return nil, status.Errorf(codes.NotFound, fmt.Sprintf("project with resource id %q had deleted", projectResourceID))- }- sheetFind.ProjectUID = &project.UID- }-- // TODO(zp): It is difficult to find all the sheets visible to a principal atomically- // without adding a new store layer method, which has two parts:- // 1. creator = principal && visibility in (PROJECT, PUBLIC, PRIVATE)- // 2. creator ! = principal && visibility in (PROJECT, PUBLIC)- // So we don't allow empty filter for now.- if request.Filter == "" {- return nil, status.Errorf(codes.InvalidArgument, "filter should not be empty")- }-- specs, err := parseFilter(request.Filter)- if err != nil {- return nil, status.Errorf(codes.InvalidArgument, err.Error())- }- for _, spec := range specs {- switch spec.key {- case "creator":- creatorEmail := strings.TrimPrefix(spec.value, "users/")- if creatorEmail == "" {- return nil, status.Errorf(codes.InvalidArgument, "invalid empty creator identifier")- }- user, err := s.store.GetUser(ctx, &store.FindUserMessage{- Email: &creatorEmail,- })- if err != nil {- return nil, status.Errorf(codes.Internal, fmt.Sprintf("failed to get user: %s", err.Error()))- }- if user == nil {- return nil, status.Errorf(codes.NotFound, fmt.Sprintf("user with email %s not found", creatorEmail))- }- switch spec.operator {- case comparatorTypeEqual:- sheetFind.CreatorID = &user.ID- sheetFind.Visibilities = []store.SheetVisibility{store.ProjectSheet, store.PublicSheet, store.PrivateSheet}- case comparatorTypeNotEqual:- sheetFind.ExcludedCreatorID = &user.ID- sheetFind.Visibilities = []store.SheetVisibility{store.ProjectSheet, store.PublicSheet}- sheetFind.PrincipalID = &user.ID- default:- return nil, status.Errorf(codes.InvalidArgument, fmt.Sprintf("invalid operator %q for creator", spec.operator))- }- case "starred":- if spec.operator != comparatorTypeEqual {- return nil, status.Errorf(codes.InvalidArgument, fmt.Sprintf("invalid operator %q for starred", spec.operator))- }- switch spec.value {- case "true":- sheetFind.OrganizerPrincipalIDStarred = &principalID- case "false":- sheetFind.OrganizerPrincipalIDNotStarred = &principalID- default:- return nil, status.Errorf(codes.InvalidArgument, fmt.Sprintf("invalid value %q for starred", spec.value))- }- case "source":- switch spec.operator {- case comparatorTypeEqual:- source := store.SheetSource(spec.value)- sheetFind.Source = &source- case comparatorTypeNotEqual:- source := store.SheetSource(spec.value)- sheetFind.NotSource = &source- }-- default:- return nil, status.Errorf(codes.InvalidArgument, fmt.Sprintf("invalid filter key %q", spec.key))- }- }- sheetList, err := s.store.ListSheets(ctx, sheetFind, principalID)- if err != nil {- return nil, status.Errorf(codes.Internal, fmt.Sprintf("failed to list sheets: %v", err))- }-- var v1pbSheets []*v1pb.Sheet- for _, sheet := range sheetList {- 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 {- slog.Warn("cannot access sheet", slog.String("name", sheet.Title))- continue- }- v1pbSheet, err := s.convertToAPISheetMessage(ctx, sheet)- if err != nil {- st := status.Convert(err)- if st.Code() == codes.NotFound {- slog.Debug("failed to found resource for sheet", log.BBError(err), slog.Int("id", sheet.UID), slog.Int("project", sheet.ProjectUID))- continue- }- return nil, err- }- v1pbSheets = append(v1pbSheets, v1pbSheet)- }- return &v1pb.SearchSheetsResponse{- Sheets: v1pbSheets,- }, nil-}-// UpdateSheet updates a sheet.func (s *SheetService) UpdateSheet(ctx context.Context, request *v1pb.UpdateSheetRequest) (*v1pb.Sheet, error) {if request.Sheet == nil {@@ -464,61 +338,6 @@ func (s *SheetService) DeleteSheet(ctx context.Context, request *v1pb.DeleteSheereturn &emptypb.Empty{}, nil}-// UpdateSheetOrganizer upsert the sheet organizer.-func (s *SheetService) UpdateSheetOrganizer(ctx context.Context, request *v1pb.UpdateSheetOrganizerRequest) (*v1pb.SheetOrganizer, error) {- _, sheetUID, err := common.GetProjectResourceIDSheetUID(request.Organizer.Sheet)- if err != nil {- return nil, status.Errorf(codes.InvalidArgument, err.Error())- }- if sheetUID <= 0 {- return nil, status.Errorf(codes.InvalidArgument, fmt.Sprintf("invalid sheet id %d, must be positive integer", sheetUID))- }-- sheet, err := s.findSheet(ctx, &store.FindSheetMessage{- UID: &sheetUID,- })- if err != nil {- return nil, err- }-- 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)- }-- principalID, ok := ctx.Value(common.PrincipalIDContextKey).(int)- if !ok {- return nil, status.Errorf(codes.Internal, "principal ID not found")- }- sheetOrganizerUpsert := &store.SheetOrganizerMessage{- SheetUID: sheetUID,- PrincipalUID: principalID,- }-- for _, path := range request.UpdateMask.Paths {- switch path {- case "starred":- sheetOrganizerUpsert.Starred = request.Organizer.Starred- case "pinned":- sheetOrganizerUpsert.Pinned = request.Organizer.Pinned- }- }-- organizer, err := s.store.UpsertSheetOrganizerV2(ctx, sheetOrganizerUpsert)- if err != nil {- return nil, status.Errorf(codes.Internal, "failed to upsert organizer for sheet %s with error: %v", request.Organizer.Sheet, err)- }-- return &v1pb.SheetOrganizer{- Sheet: request.Organizer.Sheet,- Starred: organizer.Starred,- Pinned: organizer.Pinned,- }, nil-}-func (s *SheetService) findSheet(ctx context.Context, find *store.FindSheetMessage) (*store.SheetMessage, error) {principalID, ok := ctx.Value(common.PrincipalIDContextKey).(int)if !ok {diff --git a/backend/api/v1/worksheet_service.go b/backend/api/v1/worksheet_service.goindex a83f549bf3..fe33fd0060 100644--- a/backend/api/v1/worksheet_service.go+++ b/backend/api/v1/worksheet_service.go@@ -590,6 +590,8 @@ func convertToStoreWorksheetMessage(projectUID int, databaseUID *int, creatorIDTitle: worksheet.Title,Statement: string(worksheet.Content),Visibility: visibility,+ Source: store.SheetFromBytebase,+ Type: store.SheetForSQL,}return worksheetMessage, nildiff --git a/backend/common/resource_name.go b/backend/common/resource_name.goindex 649e492327..43087c25da 100644--- a/backend/common/resource_name.go+++ b/backend/common/resource_name.go@@ -487,7 +487,7 @@ func GetProjectResourceIDSheetUID(name string) (string, int, error) {// GetWorksheetUID returns the worksheet UID from a resource name.func GetWorksheetUID(name string) (int, error) {- tokens, err := GetNameParentTokens(name, SheetIDPrefix)+ tokens, err := GetNameParentTokens(name, WorksheetIDPrefix)if err != nil {return 0, err}diff --git a/backend/tests/schema_update_test.go b/backend/tests/schema_update_test.goindex 26dfd92c98..9516ee7f6f 100644--- a/backend/tests/schema_update_test.go+++ b/backend/tests/schema_update_test.go@@ -231,12 +231,6 @@ func TestSchemaAndDataUpdate(t *testing.T) {want := wantCloneHistories[i]a.True(proto.Equal(got, want))}-- _, err = ctl.sheetServiceClient.SearchSheets(ctx, &v1pb.SearchSheetsRequest{- Parent: "projects/-",- Filter: "creator = users/[email protected]",- })- a.NoError(err)}func TestVCS(t *testing.T) {diff --git a/frontend/src/components/FeatureGuard/FeatureModal.vue b/frontend/src/components/FeatureGuard/FeatureModal.vueindex 1e1f376a65..eb43e2f91f 100644--- a/frontend/src/components/FeatureGuard/FeatureModal.vue+++ b/frontend/src/components/FeatureGuard/FeatureModal.vue@@ -1,6 +1,6 @@<template><BBModal v-if="open && feature" :title="title" @close="$emit('cancel')">- <div class="min-w-0 md:min-w-[400px] max-w-4xl">+ <div class="min-w-0 md:min-w-[400px] max-w-4xl mb-2"><div class="flex items-start space-x-2 mt-3"><div class="flex items-center"><heroicons-solid:lock-closeddiff --git a/frontend/src/components/ProvideSQLEditorContext.vue b/frontend/src/components/ProvideSQLEditorContext.vueindex 370b7f9a4b..05f77c5570 100644--- a/frontend/src/components/ProvideSQLEditorContext.vue+++ b/frontend/src/components/ProvideSQLEditorContext.vue@@ -29,7 +29,7 @@ import {useTabStore,pushNotification,useCurrentUserV1,- useSheetV1Store,+ useWorkSheetStore,useDatabaseV1Store,} from "@/store";import { useSQLEditorTreeStore } from "@/store/modules/sqlEditorTree";@@ -50,14 +50,14 @@ import {import {emptyConnection,idFromSlug,- sheetNameFromSlug,- sheetSlugV1,+ worksheetNameFromSlug,+ projectNameFromSheetSlug,+ worksheetSlugV1,connectionV1Slug as makeConnectionV1Slug,- isSheetReadableV1,+ isWorksheetReadableV1,getSuggestedTabNameFromConnection,isSimilarTab,hasProjectPermissionV2,- extractProjectResourceName,} from "@/utils";const { t } = useI18n();@@ -73,7 +73,7 @@ const policyV1Store = usePolicyV1Store();const sqlEditorStore = useSQLEditorStore();const treeStore = useSQLEditorTreeStore();const tabStore = useTabStore();-const sheetV1Store = useSheetV1Store();+const worksheetStore = useWorkSheetStore();const prepareDatabases = async () => {// It will also be called when user logout@@ -133,22 +133,21 @@ const prepareSheet = async () => {return false;}- const sheetName = sheetNameFromSlug(sheetSlug);- const project = await projectStore.getOrFetchProjectByName(- `projects/${extractProjectResourceName(sheetName)}`- );+ const projectName = projectNameFromSheetSlug(sheetSlug);+ const project = await projectStore.getOrFetchProjectByName(projectName);if (!hasProjectPermissionV2(project, currentUserV1.value, "bb.databases.query")) {return false;}+ const sheetName = worksheetNameFromSlug(sheetSlug);const openingSheetTab = tabStore.tabList.find((tab) => tab.sheetName == sheetName);sqlEditorStore.isFetchingSheet = true;- const sheet = await sheetV1Store.getOrFetchSheetByName(sheetName);+ const sheet = await worksheetStore.getOrFetchSheetByName(sheetName);sqlEditorStore.isFetchingSheet = false;if (!sheet) {@@ -161,7 +160,7 @@ const prepareSheet = async () => {}return false;}- if (!isSheetReadableV1(sheet)) {+ if (!isWorksheetReadableV1(sheet)) {pushNotification({module: "bytebase",style: "CRITICAL",@@ -297,12 +296,12 @@ const syncURLWithConnection = () => {],([instanceId, databaseId, sheetName]) => {if (sheetName) {- const sheet = sheetV1Store.getSheetByName(sheetName);+ const sheet = worksheetStore.getSheetByName(sheetName);if (sheet) {router.replace({name: SQL_EDITOR_SHARE_MODULE,params: {- sheetSlug: sheetSlugV1(sheet),+ sheetSlug: worksheetSlugV1(sheet),},});} else {diff --git a/frontend/src/components/SyncDatabaseSchema/SelectTargetDatabasesView.vue b/frontend/src/components/SyncDatabaseSchema/SelectTargetDatabasesView.vueindex 5bcf3ec375..4b333872bb 100644--- a/frontend/src/components/SyncDatabaseSchema/SelectTargetDatabasesView.vue+++ b/frontend/src/components/SyncDatabaseSchema/SelectTargetDatabasesView.vue@@ -404,7 +404,7 @@ onMounted(async () => {// Prepare raw sql statement from sheet.if (props.rawSqlState?.sheetId) {- await sheetStore.fetchSheetByUID(String(props.rawSqlState.sheetId));+ await sheetStore.getOrFetchSheetByUID(String(props.rawSqlState.sheetId));}});diff --git a/frontend/src/grpcweb/index.ts b/frontend/src/grpcweb/index.tsindex b0ed1482f0..c91e20bb13 100644--- a/frontend/src/grpcweb/index.ts+++ b/frontend/src/grpcweb/index.ts@@ -28,6 +28,7 @@ import { SettingServiceDefinition } from "@/types/proto/v1/setting_service";import { SheetServiceDefinition } from "@/types/proto/v1/sheet_service";import { SQLServiceDefinition } from "@/types/proto/v1/sql_service";import { SubscriptionServiceDefinition } from "@/types/proto/v1/subscription_service";+import { WorksheetServiceDefinition } from "@/types/proto/v1/worksheet_service";import {authInterceptorMiddleware,errorNotificationMiddleware,@@ -122,6 +123,11 @@ export const sheetServiceClient = clientFactory.create(channel);+export const worksheetServiceClient = clientFactory.create(+ WorksheetServiceDefinition,+ channel+);+export const issueServiceClient = clientFactory.create(IssueServiceDefinition,channeldiff --git a/frontend/src/router/index.ts b/frontend/src/router/index.tsindex 2ed5cd09bc..dd8b177696 100644--- a/frontend/src/router/index.ts+++ b/frontend/src/router/index.ts@@ -3,7 +3,7 @@ import { nextTick, ref } from "vue";import { createRouter, createWebHistory } from "vue-router";import {hasFeature,- useSheetV1Store,+ useWorkSheetStore,useAuthStore,useActuatorV1Store,useRouterStore,@@ -12,7 +12,7 @@ import {useCurrentUserV1,usePageMode,} from "@/store";-import { sheetNameFromSlug } from "@/utils";+import { worksheetNameFromSlug } from "@/utils";import authRoutes, {AUTH_2FA_SETUP_MODULE,AUTH_MFA_MODULE,@@ -230,8 +230,8 @@ router.beforeEach((to, from, next) => {}if (sheetSlug) {- const sheetName = sheetNameFromSlug(sheetSlug);- useSheetV1Store()+ const sheetName = worksheetNameFromSlug(sheetSlug);+ useWorkSheetStore().fetchSheetByName(sheetName).then(() => next()).catch(() => next());diff --git a/frontend/src/store/modules/tab.ts b/frontend/src/store/modules/tab.tsindex 8f86085e4d..fbc1e8bd5c 100644--- a/frontend/src/store/modules/tab.ts+++ b/frontend/src/store/modules/tab.ts@@ -12,7 +12,7 @@ import {isDisconnectedTab,} from "@/utils";import { useWebTerminalV1Store } from "./v1";-import { useSheetV1Store } from "./v1/sheet";+import { useWorkSheetStore } from "./v1/worksheet";const LOCAL_STORAGE_KEY_PREFIX = "bb.sql-editor.tab-list";const KEYS = {@@ -211,7 +211,7 @@ export const useTabStore = defineStore("tab", () => {});// Fetch opening sheets if needed- const sheetV1Store = useSheetV1Store();+ const sheetV1Store = useWorkSheetStore();tabList.value.forEach((tab) => {if (tab.sheetName) {sheetV1Store.getOrFetchSheetByName(tab.sheetName);diff --git a/frontend/src/store/modules/v1/common.ts b/frontend/src/store/modules/v1/common.tsindex 542c5125e4..c4d2588145 100644--- a/frontend/src/store/modules/v1/common.ts+++ b/frontend/src/store/modules/v1/common.ts@@ -9,6 +9,7 @@ export const idpNamePrefix = "idps/";export const policyNamePrefix = "policies/";export const settingNamePrefix = "settings/";export const sheetNamePrefix = "sheets/";+export const worksheetNamePrefix = "worksheets/";export const databaseGroupNamePrefix = "databaseGroups/";export const schemaGroupNamePrefix = "schemaGroups/";export const externalVersionControlPrefix = "externalVersionControls/";@@ -66,17 +67,9 @@ export const getProjectName = (name: string): string => {return projectId;};-export const getProjectAndSheetId = (name: string): string[] => {- const tokens = getNameParentTokens(name, [- projectNamePrefix,- sheetNamePrefix,- ]);-- if (tokens.length != 2) {- return ["", ""];- }-- return tokens;+export const getWorksheetId = (name: string): string => {+ const tokens = getNameParentTokens(name, [worksheetNamePrefix]);+ return tokens[0];};export const getProjectAndBranchId = (name: string): string[] => {diff --git a/frontend/src/store/modules/v1/index.ts b/frontend/src/store/modules/v1/index.tsindex 6faa99f36e..662b1b23ae 100644--- a/frontend/src/store/modules/v1/index.ts+++ b/frontend/src/store/modules/v1/index.ts@@ -7,6 +7,7 @@ export * from "./projectWebhook";export * from "./deploymentConfig";export * from "./databaseSecret";export * from "./sheet";+export * from "./worksheet";export * from "./localSheet";export * from "./policy";export * from "./setting";diff --git a/frontend/src/store/modules/v1/sheet.ts b/frontend/src/store/modules/v1/sheet.tsindex 860003a87d..1592319075 100644--- a/frontend/src/store/modules/v1/sheet.ts+++ b/frontend/src/store/modules/v1/sheet.ts@@ -1,22 +1,10 @@import { isEqual, isUndefined } from "lodash-es";import { defineStore } from "pinia";-import { computed, ref, unref, watch, watchEffect } from "vue";+import { computed, ref, unref, watchEffect } from "vue";import { sheetServiceClient } from "@/grpcweb";import { UNKNOWN_ID, MaybeRef } from "@/types";-import {- Sheet,- SheetOrganizer,- Sheet_Source,-} from "@/types/proto/v1/sheet_service";-import {- extractSheetUID,- getSheetStatement,- isSheetReadableV1,- getStatementSize,-} from "@/utils";-import { useCurrentUserV1 } from "../auth";-import { useTabStore } from "../tab";-import { getUserEmailFromIdentifier } from "./common";+import { Sheet } from "@/types/proto/v1/sheet_service";+import { extractSheetUID, getSheetStatement } from "@/utils";const REQUEST_CACHE_BY_UID = new Map<string /* uid */,@@ -26,31 +14,6 @@ const REQUEST_CACHE_BY_UID = new Map<export const useSheetV1Store = defineStore("sheet_v1", () => {const sheetsByName = ref(new Map<string, Sheet>());- // Getters- const sheetListWithoutIssueArtifact = computed(() => {- // Hide those sheets from issue.- return Array.from(sheetsByName.value.values()).filter(- (sheet) => sheet.source !== Sheet_Source.SOURCE_BYTEBASE_ARTIFACT- );- });- const mySheetList = computed(() => {- const me = useCurrentUserV1();- return sheetListWithoutIssueArtifact.value.filter((sheet) => {- return sheet.creator === `users/${me.value.email}`;- });- });- const sharedSheetList = computed(() => {- const me = useCurrentUserV1();- return sheetListWithoutIssueArtifact.value.filter((sheet) => {- return sheet.creator !== `users/${me.value.email}`;- });- });- const starredSheetList = computed(() => {- return sheetListWithoutIssueArtifact.value.filter((sheet) => {- return sheet.starred;- });- });-// Utilitiesconst removeLocalSheet = (name: string) => {const uid = extractSheetUID(name);@@ -132,22 +95,6 @@ export const useSheetV1Store = defineStore("sheet_v1", () => {}}};- const fetchSheetByUID = async (uid: string, raw = false) => {- if (uid.startsWith("-") || !uid) {- return undefined;- }- try {- const name = `projects/-/sheets/${uid}`;- const sheet = await sheetServiceClient.getSheet({- name,- raw,- });- setSheetList([sheet]);- return sheet;- } catch {- return undefined;- }- };const getOrFetchSheetByUID = async (uid: string) => {if (uid.startsWith("-") || !uid) {return undefined;@@ -176,32 +123,6 @@ export const useSheetV1Store = defineStore("sheet_v1", () => {});return request;};- const fetchMySheetList = async () => {- const me = useCurrentUserV1();- const { sheets } = await sheetServiceClient.searchSheets({- parent: "projects/-",- filter: `creator = users/${me.value.email} && source != BYTEBASE_ARTIFACT`,- });- setSheetList(sheets);- return sheets;- };- const fetchSharedSheetList = async () => {- const me = useCurrentUserV1();- const { sheets } = await sheetServiceClient.searchSheets({- parent: "projects/-",- filter: `creator != users/${me.value.email} && source != BYTEBASE_ARTIFACT`,- });- setSheetList(sheets);- return sheets;- };- const fetchStarredSheetList = async () => {- const { sheets } = await sheetServiceClient.searchSheets({- parent: "projects/-",- filter: `starred = true && source != BYTEBASE_ARTIFACT`,- });- setSheetList(sheets);- return sheets;- };const patchSheet = async (sheet: Partial<Sheet>,@@ -224,87 +145,17 @@ export const useSheetV1Store = defineStore("sheet_v1", () => {return updated;};- const deleteSheetByName = async (name: string) => {- await sheetServiceClient.deleteSheet({ name });- sheetsByName.value.delete(name);- };-- const upsertSheetOrganizer = async (- organizer: Pick<SheetOrganizer, "sheet" | "starred">- ) => {- await sheetServiceClient.updateSheetOrganizer({- organizer,- // for now we only support change the `starred` field.- updateMask: ["starred"],- });-- // Update local sheet values- const sheet = getSheetByName(organizer.sheet);- if (sheet) {- sheet.starred = organizer.starred;- }- };-return {- mySheetList,- sharedSheetList,- starredSheetList,createSheet,getSheetByName,fetchSheetByName,getOrFetchSheetByName,getSheetByUID,- fetchSheetByUID,getOrFetchSheetByUID,- fetchMySheetList,- fetchSharedSheetList,- fetchStarredSheetList,patchSheet,- deleteSheetByName,- upsertSheetOrganizer,};});-export const useSheetAndTabStore = defineStore("sheet_and_tab", () => {- const tabStore = useTabStore();- const sheetStore = useSheetV1Store();- const me = useCurrentUserV1();-- const currentSheet = computed(() => {- const tab = tabStore.currentTab;- const name = tab.sheetName;- if (!name) {- return undefined;- }- return sheetStore.getSheetByName(name);- });-- const isCreator = computed(() => {- const sheet = currentSheet.value;- if (!sheet) return false;- return getUserEmailFromIdentifier(sheet.creator) === me.value.email;- });-- const isReadOnly = computed(() => {- const sheet = currentSheet.value;-- // We don't have a selected sheet, we've got nothing to edit.- if (!sheet) {- return false;- }-- // Incomplete sheets should be read-only. e.g. 100MB sheet from issue task.、- const statement = getSheetStatement(sheet);- if (getStatementSize(statement).ne(sheet.contentSize)) {- return true;- }-- return !isSheetReadableV1(sheet);- });-- return { currentSheet, isCreator, isReadOnly };-});-const getUpdateMaskForSheet = (origin: Sheet,update: Partial<Sheet>@@ -340,23 +191,3 @@ export const useSheetStatementByUID = (uid: MaybeRef<string>) => {return getSheetStatement(sheet);});};--export const useSheetByName = (name: MaybeRef<string>) => {- const store = useSheetV1Store();- const ready = ref(false);- const sheet = computed(() => store.getSheetByName(unref(name)));- watch(- () => unref(name),- (name) => {- if (!name) return;- if (extractSheetUID(name) === String(UNKNOWN_ID)) return;-- ready.value = false;- store.getOrFetchSheetByName(name).finally(() => {- ready.value = true;- });- },- { immediate: true }- );- return { ready, sheet };-};diff --git a/frontend/src/store/modules/v1/worksheet.ts b/frontend/src/store/modules/v1/worksheet.tsnew file mode 100644index 0000000000..9569827114--- /dev/null+++ b/frontend/src/store/modules/v1/worksheet.ts@@ -0,0 +1,269 @@+import { isEqual, isUndefined } from "lodash-es";+import { defineStore } from "pinia";+import { computed, ref } from "vue";+import { worksheetServiceClient } from "@/grpcweb";+import { UNKNOWN_ID } from "@/types";+import {+ Worksheet,+ WorksheetOrganizer,+} from "@/types/proto/v1/worksheet_service";+import {+ extractWorksheetUID,+ getSheetStatement,+ isWorksheetReadableV1,+ getStatementSize,+} from "@/utils";+import { useCurrentUserV1 } from "../auth";+import { useTabStore } from "../tab";+import { getUserEmailFromIdentifier } from "./common";++const REQUEST_CACHE_BY_UID = new Map<+ string /* uid */,+ Promise<Worksheet | undefined>+>();++export const useWorkSheetStore = defineStore("worksheet_v1", () => {+ const sheetsByName = ref(new Map<string, Worksheet>());++ // Getters+ const sheetList = computed(() => {+ // Hide those sheets from issue.+ return Array.from(sheetsByName.value.values());+ });+ const mySheetList = computed(() => {+ const me = useCurrentUserV1();+ return sheetList.value.filter((sheet) => {+ return sheet.creator === `users/${me.value.email}`;+ });+ });+ const sharedSheetList = computed(() => {+ const me = useCurrentUserV1();+ return sheetList.value.filter((sheet) => {+ return sheet.creator !== `users/${me.value.email}`;+ });+ });+ const starredSheetList = computed(() => {+ return sheetList.value.filter((sheet) => {+ return sheet.starred;+ });+ });++ // Utilities+ const removeLocalSheet = (name: string) => {+ const uid = extractWorksheetUID(name);+ if (uid.startsWith("-")) {+ sheetsByName.value.delete(name);+ }+ };+ const setSheetList = (sheets: Worksheet[]) => {+ for (const sheet of sheets) {+ sheetsByName.value.set(sheet.name, sheet);+ }+ };++ // CRUD+ const createSheet = async (worksheet: Partial<Worksheet>) => {+ const created = await worksheetServiceClient.createWorksheet({+ worksheet,+ });+ setSheetList([created]);+ if (worksheet.name) {+ removeLocalSheet(worksheet.name);+ }+ return created;+ };++ const getSheetByName = (name: string) => {+ return sheetsByName.value.get(name);+ };+ const fetchSheetByName = async (name: string, raw = false) => {+ const uid = extractWorksheetUID(name);+ if (uid.startsWith("-") || !uid) {+ return undefined;+ }+ try {+ const sheet = await worksheetServiceClient.getWorksheet({+ name,+ raw,+ });++ setSheetList([sheet]);+ return sheet;+ } catch {+ return undefined;+ }+ };+ const getOrFetchSheetByName = async (name: string) => {+ const uid = extractWorksheetUID(name);+ if (uid.startsWith("-") || !uid) {+ return undefined;+ }+ if (uid === String(UNKNOWN_ID)) {+ return undefined;+ }+ const existed = getSheetByName(name);+ if (existed) {+ return existed;+ }+ const cached = REQUEST_CACHE_BY_UID.get(uid);+ if (cached) {+ return cached;+ }++ const request = fetchSheetByName(name);+ REQUEST_CACHE_BY_UID.set(uid, request);+ request.then((sheet) => {+ if (!sheet) {+ // If the request failed+ // remove the request cache entry so we can retry when needed.+ REQUEST_CACHE_BY_UID.delete(uid);+ }+ });+ return request;+ };++ const fetchMySheetList = async () => {+ const me = useCurrentUserV1();+ const { worksheets } = await worksheetServiceClient.searchWorksheets({+ filter: `creator = users/${me.value.email}`,+ });+ setSheetList(worksheets);+ return worksheets;+ };+ const fetchSharedSheetList = async () => {+ const me = useCurrentUserV1();+ const { worksheets } = await worksheetServiceClient.searchWorksheets({+ filter: `creator != users/${me.value.email}`,+ });+ setSheetList(worksheets);+ return worksheets;+ };+ const fetchStarredSheetList = async () => {+ const { worksheets } = await worksheetServiceClient.searchWorksheets({+ filter: `starred = true`,+ });+ setSheetList(worksheets);+ return worksheets;+ };++ const patchSheet = async (+ worksheet: Partial<Worksheet>,+ updateMask: string[] | undefined = undefined+ ) => {+ if (!worksheet.name) return;+ const existed = sheetsByName.value.get(worksheet.name);+ if (!existed) return;+ if (!updateMask) {+ updateMask = getUpdateMaskForSheet(existed, worksheet);+ }+ if (updateMask.length === 0) {+ return existed;+ }+ const updated = await worksheetServiceClient.updateWorksheet({+ worksheet,+ updateMask,+ });+ setSheetList([updated]);+ return updated;+ };++ const deleteSheetByName = async (name: string) => {+ await worksheetServiceClient.deleteWorksheet({ name });+ sheetsByName.value.delete(name);+ };++ const upsertSheetOrganizer = async (+ organizer: Pick<WorksheetOrganizer, "worksheet" | "starred">+ ) => {+ await worksheetServiceClient.updateWorksheetOrganizer({+ organizer,+ // for now we only support change the `starred` field.+ updateMask: ["starred"],+ });++ // Update local sheet values+ const sheet = getSheetByName(organizer.worksheet);+ if (sheet) {+ sheet.starred = organizer.starred;+ }+ };++ return {+ mySheetList,+ sharedSheetList,+ starredSheetList,+ createSheet,+ getSheetByName,+ fetchSheetByName,+ getOrFetchSheetByName,+ fetchMySheetList,+ fetchSharedSheetList,+ fetchStarredSheetList,+ patchSheet,+ deleteSheetByName,+ upsertSheetOrganizer,+ };+});++export const useWorkSheetAndTabStore = defineStore("worksheet_and_tab", () => {+ const tabStore = useTabStore();+ const sheetStore = useWorkSheetStore();+ const me = useCurrentUserV1();++ const currentSheet = computed(() => {+ const tab = tabStore.currentTab;+ const name = tab.sheetName;+ if (!name) {+ return undefined;+ }+ return sheetStore.getSheetByName(name);+ });++ const isCreator = computed(() => {+ const sheet = currentSheet.value;+ if (!sheet) return false;+ return getUserEmailFromIdentifier(sheet.creator) === me.value.email;+ });++ const isReadOnly = computed(() => {+ const sheet = currentSheet.value;++ // We don't have a selected sheet, we've got nothing to edit.+ if (!sheet) {+ return false;+ }++ // Incomplete sheets should be read-only. e.g. 100MB sheet from issue task.、+ const statement = getSheetStatement(sheet);+ if (getStatementSize(statement).ne(sheet.contentSize)) {+ return true;+ }++ return !isWorksheetReadableV1(sheet);+ });++ return { currentSheet, isCreator, isReadOnly };+});++const getUpdateMaskForSheet = (+ origin: Worksheet,+ update: Partial<Worksheet>+): string[] => {+ const updateMask: string[] = [];+ if (!isUndefined(update.title) && !isEqual(origin.title, update.title)) {+ updateMask.push("title");+ }+ if (+ !isUndefined(update.content) &&+ !isEqual(origin.content, update.content)+ ) {+ 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 824c1150fd..e5804c3efe 100644--- a/frontend/src/types/proto/google/protobuf/descriptor.ts+++ b/frontend/src/types/proto/google/protobuf/descriptor.ts@@ -4,98 +4,6 @@ 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.@@ -143,8 +51,8 @@ export interface FileDescriptorProto {* If `edition` is present, this value must be "editions".*/syntax: string;- /** The edition of the proto file. */- edition: Edition;+ /** The edition of the proto file, which is an opaque string. */+ edition: string;}/** Describes a message type. */@@ -188,84 +96,6 @@ 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. */@@ -363,10 +193,9 @@ export enum FieldDescriptorProto_Type {TYPE_STRING = 9,/*** TYPE_GROUP - Tag-delimited aggregate.- * Group type is deprecated and not supported after google.protobuf. However, Proto3+ * Group type is deprecated and not supported in proto3. However, Proto3* implementations should still be able to parse the group wire format and- * treat group fields as unknown fields. In Editions, the group wire format- * can be enabled via the `message_encoding` feature.+ * treat group fields as unknown fields.*/TYPE_GROUP = 10,/** TYPE_MESSAGE - Length-delimited aggregate. */@@ -494,13 +323,8 @@ export function fieldDescriptorProto_TypeToJSON(object: FieldDescriptorProto_Typexport enum FieldDescriptorProto_Label {/** LABEL_OPTIONAL - 0 is reserved for errors */LABEL_OPTIONAL = 1,- 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,+ LABEL_REPEATED = 3,UNRECOGNIZED = -1,}@@ -509,12 +333,12 @@ export function fieldDescriptorProto_LabelFromJSON(object: any): FieldDescriptorcase 1:case "LABEL_OPTIONAL":return FieldDescriptorProto_Label.LABEL_OPTIONAL;- case 3:- case "LABEL_REPEATED":- return FieldDescriptorProto_Label.LABEL_REPEATED;case 2:case "LABEL_REQUIRED":return FieldDescriptorProto_Label.LABEL_REQUIRED;+ case 3:+ case "LABEL_REPEATED":+ return FieldDescriptorProto_Label.LABEL_REPEATED;case -1:case "UNRECOGNIZED":default:@@ -526,10 +350,10 @@ export function fieldDescriptorProto_LabelToJSON(object: FieldDescriptorProto_Laswitch (object) {case FieldDescriptorProto_Label.LABEL_OPTIONAL:return "LABEL_OPTIONAL";- case FieldDescriptorProto_Label.LABEL_REPEATED:- return "LABEL_REPEATED";case FieldDescriptorProto_Label.LABEL_REQUIRED:return "LABEL_REQUIRED";+ case FieldDescriptorProto_Label.LABEL_REPEATED:+ return "LABEL_REPEATED";case FieldDescriptorProto_Label.UNRECOGNIZED:default:return "UNRECOGNIZED";@@ -723,10 +547,6 @@ 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.@@ -845,16 +665,12 @@ 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 This is legacy behavior we plan to remove once downstream+ * TODO(b/261750190) 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[];}@@ -863,10 +679,8 @@ 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 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!+ * options below. This option is not yet implemented in the open source+ * release -- sorry, we'll try to include it in a future version!*/ctype: FieldOptions_CType;/**@@ -874,9 +688,7 @@ 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. This option is prohibited in- * Editions, but the `repeated_field_encoding` feature can be used to control- * the behavior.+ * false will avoid using packed encoding.*/packed: boolean;/**@@ -947,12 +759,7 @@ export interface FieldOptions {*/debugRedact: boolean;retention: FieldOptions_OptionRetention;- targets: FieldOptions_OptionTargetType[];- editionDefaults: FieldOptions_EditionDefault[];- /** Any features defined in the specific edition. */- features:- | FeatureSet- | undefined;+ target: FieldOptions_OptionTargetType;/** The parser stores options it doesn't recognize here. See above. */uninterpretedOption: UninterpretedOption[];}@@ -960,14 +767,6 @@ 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,@@ -1178,17 +977,7 @@ 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[];}@@ -1211,16 +1000,12 @@ 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 Remove this legacy behavior once downstream teams have+ * TODO(b/261750190) 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[];}@@ -1233,25 +1018,11 @@ 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@@ -1272,10 +1043,6 @@ 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[];}@@ -1360,294 +1127,6 @@ 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.@@ -1944,7 +1423,7 @@ function createBaseFileDescriptorProto(): FileDescriptorProto {options: undefined,sourceCodeInfo: undefined,syntax: "",- edition: 0,+ edition: "",};}@@ -1990,8 +1469,8 @@ export const FileDescriptorProto = {if (message.syntax !== "") {writer.uint32(98).string(message.syntax);}- if (message.edition !== 0) {- writer.uint32(112).int32(message.edition);+ if (message.edition !== "") {+ writer.uint32(106).string(message.edition);}return writer;},@@ -2107,12 +1586,12 @@ export const FileDescriptorProto = {message.syntax = reader.string();continue;- case 14:- if (tag !== 112) {+ case 13:+ if (tag !== 106) {break;}- message.edition = reader.int32() as any;+ message.edition = reader.string();continue;}if ((tag & 7) === 4 || tag === 0) {@@ -2151,7 +1630,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) ? editionFromJSON(object.edition) : 0,+ edition: isSet(object.edition) ? globalThis.String(object.edition) : "",};},@@ -2193,8 +1672,8 @@ export const FileDescriptorProto = {if (message.syntax !== "") {obj.syntax = message.syntax;}- if (message.edition !== 0) {- obj.edition = editionToJSON(message.edition);+ if (message.edition !== "") {+ obj.edition = message.edition;}return obj;},@@ -2220,7 +1699,7 @@ export const FileDescriptorProto = {? SourceCodeInfo.fromPartial(object.sourceCodeInfo): undefined;message.syntax = object.syntax ?? "";- message.edition = object.edition ?? 0;+ message.edition = object.edition ?? "";return message;},};@@ -2614,7 +2093,7 @@ export const DescriptorProto_ReservedRange = {};function createBaseExtensionRangeOptions(): ExtensionRangeOptions {- return { uninterpretedOption: [], declaration: [], features: undefined, verification: 0 };+ return { uninterpretedOption: [] };}export const ExtensionRangeOptions = {@@ -2622,15 +2101,6 @@ 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;},@@ -2648,27 +2118,6 @@ 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;@@ -2683,13 +2132,6 @@ 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,};},@@ -2698,15 +2140,6 @@ 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;},@@ -2716,130 +2149,6 @@ 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 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;},};@@ -3694,7 +3003,6 @@ function createBaseFileOptions(): FileOptions {phpNamespace: "",phpMetadataNamespace: "",rubyPackage: "",- features: undefined,uninterpretedOption: [],};}@@ -3761,9 +3069,6 @@ 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();}@@ -3917,13 +3222,6 @@ 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;@@ -3964,7 +3262,6 @@ 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)): [],@@ -4033,9 +3330,6 @@ 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));}@@ -4067,9 +3361,6 @@ 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;},@@ -4082,7 +3373,6 @@ function createBaseMessageOptions(): MessageOptions {deprecated: false,mapEntry: false,deprecatedLegacyJsonFieldConflicts: false,- features: undefined,uninterpretedOption: [],};}@@ -4104,9 +3394,6 @@ 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();}@@ -4155,13 +3442,6 @@ 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;@@ -4191,7 +3471,6 @@ 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)): [],@@ -4215,9 +3494,6 @@ 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));}@@ -4234,9 +3510,6 @@ 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;},@@ -4253,9 +3526,7 @@ function createBaseFieldOptions(): FieldOptions {weak: false,debugRedact: false,retention: 0,- targets: [],- editionDefaults: [],- features: undefined,+ target: 0,uninterpretedOption: [],};}@@ -4289,16 +3560,8 @@ export const FieldOptions = {if (message.retention !== 0) {writer.uint32(136).int32(message.retention);}- 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();+ if (message.target !== 0) {+ writer.uint32(144).int32(message.target);}for (const v of message.uninterpretedOption) {UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim();@@ -4376,36 +3639,12 @@ export const FieldOptions = {message.retention = reader.int32() as any;continue;- 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.editionDefaults.push(FieldOptions_EditionDefault.decode(reader, reader.uint32()));- continue;- case 21:- if (tag !== 170) {+ case 18:+ if (tag !== 144) {break;}- message.features = FeatureSet.decode(reader, reader.uint32());+ message.target = reader.int32() as any;continue;case 999:if (tag !== 7994) {@@ -4434,13 +3673,7 @@ 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,- 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,+ target: isSet(object.target) ? fieldOptions_OptionTargetTypeFromJSON(object.target) : 0,uninterpretedOption: globalThis.Array.isArray(object?.uninterpretedOption)? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e)): [],@@ -4476,14 +3709,8 @@ export const FieldOptions = {if (message.retention !== 0) {obj.retention = fieldOptions_OptionRetentionToJSON(message.retention);}- 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.target !== 0) {+ obj.target = fieldOptions_OptionTargetTypeToJSON(message.target);}if (message.uninterpretedOption?.length) {obj.uninterpretedOption = message.uninterpretedOption.map((e) => UninterpretedOption.toJSON(e));@@ -4505,99 +3732,18 @@ export const FieldOptions = {message.weak = object.weak ?? false;message.debugRedact = object.debugRedact ?? false;message.retention = object.retention ?? 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.target = object.target ?? 0;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 { features: undefined, uninterpretedOption: [] };+ return { 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();}@@ -4611,13 +3757,6 @@ 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;@@ -4636,7 +3775,6 @@ 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)): [],@@ -4645,9 +3783,6 @@ 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));}@@ -4659,22 +3794,13 @@ 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,- features: undefined,- uninterpretedOption: [],- };+ return { allowAlias: false, deprecated: false, deprecatedLegacyJsonFieldConflicts: false, uninterpretedOption: [] };}export const EnumOptions = {@@ -4688,9 +3814,6 @@ 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();}@@ -4725,13 +3848,6 @@ 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;@@ -4755,7 +3871,6 @@ 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)): [],@@ -4773,9 +3888,6 @@ 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));}@@ -4790,16 +3902,13 @@ 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, features: undefined, debugRedact: false, uninterpretedOption: [] };+ return { deprecated: false, uninterpretedOption: [] };}export const EnumValueOptions = {@@ -4807,12 +3916,6 @@ 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();}@@ -4833,20 +3936,6 @@ 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;@@ -4866,8 +3955,6 @@ 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)): [],@@ -4879,12 +3966,6 @@ 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));}@@ -4897,24 +3978,17 @@ 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 { features: undefined, deprecated: false, uninterpretedOption: [] };+ return { 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);}@@ -4931,13 +4005,6 @@ 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;@@ -4963,7 +4030,6 @@ 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))@@ -4973,9 +4039,6 @@ 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;}@@ -4990,9 +4053,6 @@ 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;@@ -5000,7 +4060,7 @@ export const ServiceOptions = {};function createBaseMethodOptions(): MethodOptions {- return { deprecated: false, idempotencyLevel: 0, features: undefined, uninterpretedOption: [] };+ return { deprecated: false, idempotencyLevel: 0, uninterpretedOption: [] };}export const MethodOptions = {@@ -5011,9 +4071,6 @@ 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();}@@ -5041,13 +4098,6 @@ 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;@@ -5070,7 +4120,6 @@ 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)): [],@@ -5085,9 +4134,6 @@ 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));}@@ -5101,9 +4147,6 @@ 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;},@@ -5346,318 +4389,6 @@ 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 b87dbf5bac..dbdf7a289a 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 5781891bc0..51695e08d0 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://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()+ * http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D* ) 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 50c64f7d2b..cca45a6e90 100644--- a/frontend/src/types/proto/v1/sheet_service.ts+++ b/frontend/src/types/proto/v1/sheet_service.ts@@ -52,38 +52,6 @@ export interface UpdateSheetRequest {updateMask: string[] | undefined;}-export interface UpdateSheetOrganizerRequest {- /**- * The organizer to update.- *- * The organizer's `sheet` field is used to identify the sheet.- * Format: projects/{project}/sheets/{sheet}- */- organizer:- | SheetOrganizer- | undefined;- /**- * The list of fields to be updated.- * Fields are specified relative to the sheet organizer.- * Only support update the following fields for now:- * - `starred`- * - `pinned`- */- updateMask: string[] | undefined;-}--export interface SheetOrganizer {- /**- * The name of the sheet.- * Format: projects/{project}/sheets/{sheet}- */- sheet: string;- /** starred means if the sheet is starred. */- starred: boolean;- /** pinned means if the sheet is pinned. */- pinned: boolean;-}-export interface DeleteSheetRequest {/*** The name of the sheet to delete.@@ -92,47 +60,6 @@ export interface DeleteSheetRequest {name: string;}-export interface SearchSheetsRequest {- /**- * The parent resource of the sheet.- * Format: projects/{project}- */- parent: string;- /**- * To filter the search result.- * Format: only support the following spec for now:- * - `creator = users/{email}`, `creator != users/{email}`- * - `starred = true`, `starred = false`.- * Not support empty filter for now.- */- filter: string;- /**- * Not used. The maximum number of sheets to return. The service may return fewer than- * this value.- * If unspecified, at most 50 sheets will be returned.- * The maximum value is 1000; values above 1000 will be coerced to 1000.- */- pageSize: number;- /**- * Not used. A page token, received from a previous `SearchSheets` call.- * Provide this to retrieve the subsequent page.- *- * When paginating, all other parameters provided to `SearchSheets` must match- * the call that provided the page token.- */- pageToken: string;-}--export interface SearchSheetsResponse {- /** The sheets that matched the search criteria. */- sheets: Sheet[];- /**- * Not used. A token, which can be sent as `page_token` to retrieve the next page.- * If this field is omitted, there are no subsequent pages.- */- nextPageToken: string;-}-export interface Sheet {/*** The name of the sheet resource, generated by the server.@@ -568,171 +495,6 @@ export const UpdateSheetRequest = {},};-function createBaseUpdateSheetOrganizerRequest(): UpdateSheetOrganizerRequest {- return { organizer: undefined, updateMask: undefined };-}--export const UpdateSheetOrganizerRequest = {- encode(message: UpdateSheetOrganizerRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {- if (message.organizer !== undefined) {- SheetOrganizer.encode(message.organizer, writer.uint32(10).fork()).ldelim();- }- if (message.updateMask !== undefined) {- FieldMask.encode(FieldMask.wrap(message.updateMask), writer.uint32(18).fork()).ldelim();- }- return writer;- },-- decode(input: _m0.Reader | Uint8Array, length?: number): UpdateSheetOrganizerRequest {- const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);- let end = length === undefined ? reader.len : reader.pos + length;- const message = createBaseUpdateSheetOrganizerRequest();- while (reader.pos < end) {- const tag = reader.uint32();- switch (tag >>> 3) {- case 1:- if (tag !== 10) {- break;- }-- message.organizer = SheetOrganizer.decode(reader, reader.uint32());- continue;- case 2:- if (tag !== 18) {- break;- }-- message.updateMask = FieldMask.unwrap(FieldMask.decode(reader, reader.uint32()));- continue;- }- if ((tag & 7) === 4 || tag === 0) {- break;- }- reader.skipType(tag & 7);- }- return message;- },-- fromJSON(object: any): UpdateSheetOrganizerRequest {- return {- organizer: isSet(object.organizer) ? SheetOrganizer.fromJSON(object.organizer) : undefined,- updateMask: isSet(object.updateMask) ? FieldMask.unwrap(FieldMask.fromJSON(object.updateMask)) : undefined,- };- },-- toJSON(message: UpdateSheetOrganizerRequest): unknown {- const obj: any = {};- if (message.organizer !== undefined) {- obj.organizer = SheetOrganizer.toJSON(message.organizer);- }- if (message.updateMask !== undefined) {- obj.updateMask = FieldMask.toJSON(FieldMask.wrap(message.updateMask));- }- return obj;- },-- create(base?: DeepPartial<UpdateSheetOrganizerRequest>): UpdateSheetOrganizerRequest {- return UpdateSheetOrganizerRequest.fromPartial(base ?? {});- },- fromPartial(object: DeepPartial<UpdateSheetOrganizerRequest>): UpdateSheetOrganizerRequest {- const message = createBaseUpdateSheetOrganizerRequest();- message.organizer = (object.organizer !== undefined && object.organizer !== null)- ? SheetOrganizer.fromPartial(object.organizer)- : undefined;- message.updateMask = object.updateMask ?? undefined;- return message;- },-};--function createBaseSheetOrganizer(): SheetOrganizer {- return { sheet: "", starred: false, pinned: false };-}--export const SheetOrganizer = {- encode(message: SheetOrganizer, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {- if (message.sheet !== "") {- writer.uint32(10).string(message.sheet);- }- if (message.starred === true) {- writer.uint32(16).bool(message.starred);- }- if (message.pinned === true) {- writer.uint32(24).bool(message.pinned);- }- return writer;- },-- decode(input: _m0.Reader | Uint8Array, length?: number): SheetOrganizer {- const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);- let end = length === undefined ? reader.len : reader.pos + length;- const message = createBaseSheetOrganizer();- while (reader.pos < end) {- const tag = reader.uint32();- switch (tag >>> 3) {- case 1:- if (tag !== 10) {- break;- }-- message.sheet = reader.string();- continue;- case 2:- if (tag !== 16) {- break;- }-- message.starred = reader.bool();- continue;- case 3:- if (tag !== 24) {- break;- }-- message.pinned = reader.bool();- continue;- }- if ((tag & 7) === 4 || tag === 0) {- break;- }- reader.skipType(tag & 7);- }- return message;- },-- fromJSON(object: any): SheetOrganizer {- return {- sheet: isSet(object.sheet) ? globalThis.String(object.sheet) : "",- starred: isSet(object.starred) ? globalThis.Boolean(object.starred) : false,- pinned: isSet(object.pinned) ? globalThis.Boolean(object.pinned) : false,- };- },-- toJSON(message: SheetOrganizer): unknown {- const obj: any = {};- if (message.sheet !== "") {- obj.sheet = message.sheet;- }- if (message.starred === true) {- obj.starred = message.starred;- }- if (message.pinned === true) {- obj.pinned = message.pinned;- }- return obj;- },-- create(base?: DeepPartial<SheetOrganizer>): SheetOrganizer {- return SheetOrganizer.fromPartial(base ?? {});- },- fromPartial(object: DeepPartial<SheetOrganizer>): SheetOrganizer {- const message = createBaseSheetOrganizer();- message.sheet = object.sheet ?? "";- message.starred = object.starred ?? false;- message.pinned = object.pinned ?? false;- return message;- },-};-function createBaseDeleteSheetRequest(): DeleteSheetRequest {return { name: "" };}@@ -790,184 +552,6 @@ export const DeleteSheetRequest = {},};-function createBaseSearchSheetsRequest(): SearchSheetsRequest {- return { parent: "", filter: "", pageSize: 0, pageToken: "" };-}--export const SearchSheetsRequest = {- encode(message: SearchSheetsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {- if (message.parent !== "") {- writer.uint32(10).string(message.parent);- }- if (message.filter !== "") {- writer.uint32(18).string(message.filter);- }- if (message.pageSize !== 0) {- writer.uint32(24).int32(message.pageSize);- }- if (message.pageToken !== "") {- writer.uint32(34).string(message.pageToken);- }- return writer;- },-- decode(input: _m0.Reader | Uint8Array, length?: number): SearchSheetsRequest {- const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);- let end = length === undefined ? reader.len : reader.pos + length;- const message = createBaseSearchSheetsRequest();- while (reader.pos < end) {- const tag = reader.uint32();- switch (tag >>> 3) {- case 1:- if (tag !== 10) {- break;- }-- message.parent = reader.string();- continue;- case 2:- if (tag !== 18) {- break;- }-- message.filter = reader.string();- continue;- case 3:- if (tag !== 24) {- break;- }-- message.pageSize = reader.int32();- continue;- case 4:- if (tag !== 34) {- break;- }-- message.pageToken = reader.string();- continue;- }- if ((tag & 7) === 4 || tag === 0) {- break;- }- reader.skipType(tag & 7);- }- return message;- },-- fromJSON(object: any): SearchSheetsRequest {- return {- parent: isSet(object.parent) ? globalThis.String(object.parent) : "",- filter: isSet(object.filter) ? globalThis.String(object.filter) : "",- pageSize: isSet(object.pageSize) ? globalThis.Number(object.pageSize) : 0,- pageToken: isSet(object.pageToken) ? globalThis.String(object.pageToken) : "",- };- },-- toJSON(message: SearchSheetsRequest): unknown {- const obj: any = {};- if (message.parent !== "") {- obj.parent = message.parent;- }- if (message.filter !== "") {- obj.filter = message.filter;- }- if (message.pageSize !== 0) {- obj.pageSize = Math.round(message.pageSize);- }- if (message.pageToken !== "") {- obj.pageToken = message.pageToken;- }- return obj;- },-- create(base?: DeepPartial<SearchSheetsRequest>): SearchSheetsRequest {- return SearchSheetsRequest.fromPartial(base ?? {});- },- fromPartial(object: DeepPartial<SearchSheetsRequest>): SearchSheetsRequest {- const message = createBaseSearchSheetsRequest();- message.parent = object.parent ?? "";- message.filter = object.filter ?? "";- message.pageSize = object.pageSize ?? 0;- message.pageToken = object.pageToken ?? "";- return message;- },-};--function createBaseSearchSheetsResponse(): SearchSheetsResponse {- return { sheets: [], nextPageToken: "" };-}--export const SearchSheetsResponse = {- encode(message: SearchSheetsResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {- for (const v of message.sheets) {- Sheet.encode(v!, writer.uint32(10).fork()).ldelim();- }- if (message.nextPageToken !== "") {- writer.uint32(18).string(message.nextPageToken);- }- return writer;- },-- decode(input: _m0.Reader | Uint8Array, length?: number): SearchSheetsResponse {- const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);- let end = length === undefined ? reader.len : reader.pos + length;- const message = createBaseSearchSheetsResponse();- while (reader.pos < end) {- const tag = reader.uint32();- switch (tag >>> 3) {- case 1:- if (tag !== 10) {- break;- }-- message.sheets.push(Sheet.decode(reader, reader.uint32()));- continue;- case 2:- if (tag !== 18) {- break;- }-- message.nextPageToken = reader.string();- continue;- }- if ((tag & 7) === 4 || tag === 0) {- break;- }- reader.skipType(tag & 7);- }- return message;- },-- fromJSON(object: any): SearchSheetsResponse {- return {- sheets: globalThis.Array.isArray(object?.sheets) ? object.sheets.map((e: any) => Sheet.fromJSON(e)) : [],- nextPageToken: isSet(object.nextPageToken) ? globalThis.String(object.nextPageToken) : "",- };- },-- toJSON(message: SearchSheetsResponse): unknown {- const obj: any = {};- if (message.sheets?.length) {- obj.sheets = message.sheets.map((e) => Sheet.toJSON(e));- }- if (message.nextPageToken !== "") {- obj.nextPageToken = message.nextPageToken;- }- return obj;- },-- create(base?: DeepPartial<SearchSheetsResponse>): SearchSheetsResponse {- return SearchSheetsResponse.fromPartial(base ?? {});- },- fromPartial(object: DeepPartial<SearchSheetsResponse>): SearchSheetsResponse {- const message = createBaseSearchSheetsResponse();- message.sheets = object.sheets?.map((e) => Sheet.fromPartial(e)) || [];- message.nextPageToken = object.nextPageToken ?? "";- return message;- },-};-function createBaseSheet(): Sheet {return {name: "",@@ -1449,61 +1033,6 @@ export const SheetServiceDefinition = {},},},- searchSheets: {- name: "SearchSheets",- requestType: SearchSheetsRequest,- requestStream: false,- responseType: SearchSheetsResponse,- responseStream: false,- options: {- _unknownFields: {- 578365826: [- new Uint8Array([- 39,- 18,- 37,- 47,- 118,- 49,- 47,- 123,- 112,- 97,- 114,- 101,- 110,- 116,- 61,- 112,- 114,- 111,- 106,- 101,- 99,- 116,- 115,- 47,- 42,- 125,- 47,- 115,- 104,- 101,- 101,- 116,- 115,- 58,- 115,- 101,- 97,- 114,- 99,- 104,- ]),- ],- },- },- },updateSheet: {name: "UpdateSheet",requestType: UpdateSheetRequest,@@ -1566,112 +1095,6 @@ export const SheetServiceDefinition = {},},},- updateSheetOrganizer: {- name: "UpdateSheetOrganizer",- requestType: UpdateSheetOrganizerRequest,- requestStream: false,- responseType: SheetOrganizer,- responseStream: false,- options: {- _unknownFields: {- 8410: [- new Uint8Array([- 21,- 111,- 114,- 103,- 97,- 110,- 105,- 122,- 101,- 114,- 44,- 117,- 112,- 100,- 97,- 116,- 101,- 95,- 109,- 97,- 115,- 107,- ]),- ],- 578365826: [- new Uint8Array([- 64,- 58,- 9,- 111,- 114,- 103,- 97,- 110,- 105,- 122,- 101,- 114,- 26,- 51,- 47,- 118,- 49,- 47,- 123,- 111,- 114,- 103,- 97,- 110,- 105,- 122,- 101,- 114,- 46,- 115,- 104,- 101,- 101,- 116,- 61,- 112,- 114,- 111,- 106,- 101,- 99,- 116,- 115,- 47,- 42,- 47,- 115,- 104,- 101,- 101,- 116,- 115,- 47,- 42,- 125,- 47,- 111,- 114,- 103,- 97,- 110,- 105,- 122,- 101,- 114,- ]),- ],- },- },- },deleteSheet: {name: "DeleteSheet",requestType: DeleteSheetRequest,diff --git a/frontend/src/types/sheet.ts b/frontend/src/types/sheet.tsindex de759a0b4c..1b82e6d514 100644--- a/frontend/src/types/sheet.ts+++ b/frontend/src/types/sheet.ts@@ -1,4 +1,4 @@-import { Sheet_Visibility } from "@/types/proto/v1/sheet_service";+import { Worksheet_Visibility } from "@/types/proto/v1/worksheet_service";interface SheetVCSPayload {fileName: string;@@ -17,5 +17,5 @@ export type SheetPayload = SheetVCSPayload | SheetEmptyPayload;export type AccessOption = {label: string;description: string;- value: Sheet_Visibility;+ value: Worksheet_Visibility;};diff --git a/frontend/src/utils/slug.ts b/frontend/src/utils/slug.tsindex 05a16ce840..41ad0e9881 100644--- a/frontend/src/utils/slug.ts+++ b/frontend/src/utils/slug.ts@@ -1,12 +1,13 @@import slug from "slug";import {- getProjectAndSheetId,- projectNamePrefix,- sheetNamePrefix,+ getProjectName,+ getWorksheetId,+ worksheetNamePrefix,getVCSUid,+ projectNamePrefix,} from "@/store/modules/v1/common";import { ExternalVersionControl as VCSV1 } from "@/types/proto/v1/externalvs_service";-import { Sheet as SheetV1 } from "@/types/proto/v1/sheet_service";+import { Worksheet } from "@/types/proto/v1/worksheet_service";import { IssueId, SQLReviewPolicy } from "../types";import { IdType } from "../types/id";import { extractEnvironmentResourceName } from "./v1";@@ -30,11 +31,15 @@ export const idFromSlug = (slug: string): string => {return parts[parts.length - 1];};-export function sheetNameFromSlug(slug: string): string {+export function projectNameFromSheetSlug(slug: string): string {+ const parts = slug.split("-");+ parts.pop();+ return `${projectNamePrefix}${parts.join("-")}`;+}++export function worksheetNameFromSlug(slug: string): string {const parts = slug.split("-");- return `${projectNamePrefix}${parts- .slice(0, -1)- .join("-")}/${sheetNamePrefix}${parts[parts.length - 1]}`;+ return `${worksheetNamePrefix}${parts[parts.length - 1]}`;}export function indexFromSlug(slug: string): number {@@ -65,7 +70,8 @@ export function sqlReviewPolicySlug(reviewPolicy: SQLReviewPolicy): string {].join("-");}-export function sheetSlugV1(sheet: SheetV1): string {- const [projectName, uid] = getProjectAndSheetId(sheet.name);+export function worksheetSlugV1(sheet: Worksheet): string {+ const uid = getWorksheetId(sheet.name);+ const projectName = getProjectName(sheet.project);return [projectName, uid].join("-");}diff --git a/frontend/src/utils/v1/index.ts b/frontend/src/utils/v1/index.tsindex bae3cbc9a4..40e2582059 100644--- a/frontend/src/utils/v1/index.ts+++ b/frontend/src/utils/v1/index.ts@@ -7,12 +7,12 @@ export * from "./backup";export * from "./project";export * from "./projectWebhook";export * from "./deploymentConfig";-export * from "./role";export * from "./user";export * from "./instance";export * from "./sqlEditor";export * from "./sql";export * from "./sheet";+export * from "./worksheet";export * from "./vcs";export * from "./issue";export * from "./changeHistory";diff --git a/frontend/src/utils/v1/sheet.ts b/frontend/src/utils/v1/sheet.tsindex fab82457a3..3db28ae452 100644--- a/frontend/src/utils/v1/sheet.ts+++ b/frontend/src/utils/v1/sheet.ts@@ -1,10 +1,6 @@-import { useCurrentUserV1, useProjectV1Store } from "@/store";-import {- getUserEmailFromIdentifier,- getProjectAndSheetId,-} from "@/store/modules/v1/common";-import { Sheet, Sheet_Visibility } from "@/types/proto/v1/sheet_service";-import { getStatementSize, hasProjectPermissionV2 } from "@/utils";+import { Sheet } from "@/types/proto/v1/sheet_service";+import { Worksheet } from "@/types/proto/v1/worksheet_service";+import { getStatementSize } from "@/utils";export const extractSheetUID = (name: string) => {const pattern = /(?:^|\/)sheets\/([^/]+)(?:$|\/)/;@@ -16,75 +12,14 @@ export const isLocalSheet = (name: string) => {return extractSheetUID(name).startsWith("-");};-export const isSheetReadableV1 = (sheet: Sheet) => {- const currentUserV1 = useCurrentUserV1();-- // readable to- // PRIVATE: the creator only- // PROJECT: the creator and members in the project, workspace Owner and DBA- // PUBLIC: everyone-- if (getUserEmailFromIdentifier(sheet.creator) === currentUserV1.value.email) {- // Always readable to the creator- return true;- }- const { visibility } = sheet;- if (visibility === Sheet_Visibility.VISIBILITY_PRIVATE) {- return false;- }- if (visibility === Sheet_Visibility.VISIBILITY_PROJECT) {- const [projectId, _] = getProjectAndSheetId(sheet.name);- const projectV1 = useProjectV1Store().getProjectByName(- `projects/${projectId}`- );-- return hasProjectPermissionV2(- projectV1,- currentUserV1.value,- "bb.projects.get"- );- }- // visibility === "PUBLIC"- return true;-};--export const isSheetWritableV1 = (sheet: Sheet) => {- const currentUserV1 = useCurrentUserV1();-- // writable to- // PRIVATE: the creator only- // PROJECT: the creator or project role can manage sheet, workspace Owner and DBA- // PUBLIC: the creator only-- if (getUserEmailFromIdentifier(sheet.creator) === currentUserV1.value.email) {- // Always writable to the creator- return true;- }- const { visibility } = sheet;- if (visibility === Sheet_Visibility.VISIBILITY_PRIVATE) {- return false;- }- if (visibility === Sheet_Visibility.VISIBILITY_PROJECT) {- const [projectId, _] = getProjectAndSheetId(sheet.name);- const projectV1 = useProjectV1Store().getProjectByName(- `projects/${projectId}`- );-- return hasProjectPermissionV2(- projectV1,- currentUserV1.value,- "bb.projects.get"- );- }- // visibility === "PUBLIC"- return false;-};--export const setSheetStatement = (sheet: Sheet, statement: string) => {+export const setSheetStatement = (+ sheet: Sheet | Worksheet,+ statement: string+) => {sheet.content = new TextEncoder().encode(statement);sheet.contentSize = getStatementSize(statement);};-export const getSheetStatement = (sheet: Sheet) => {+export const getSheetStatement = (sheet: Sheet | Worksheet) => {return new TextDecoder().decode(sheet.content);};diff --git a/frontend/src/utils/v1/worksheet.ts b/frontend/src/utils/v1/worksheet.tsnew file mode 100644index 0000000000..6b6fe5633f--- /dev/null+++ b/frontend/src/utils/v1/worksheet.ts@@ -0,0 +1,71 @@+import { useCurrentUserV1, useProjectV1Store } from "@/store";+import { getUserEmailFromIdentifier } from "@/store/modules/v1/common";+import {+ Worksheet,+ Worksheet_Visibility,+} from "@/types/proto/v1/worksheet_service";+import { hasProjectPermissionV2 } from "@/utils";++export const extractWorksheetUID = (name: string) => {+ const pattern = /(?:^|\/)worksheets\/([^/]+)(?:$|\/)/;+ const matches = name.match(pattern);+ return matches?.[1] ?? "-1";+};++export const isWorksheetReadableV1 = (sheet: Worksheet) => {+ const currentUserV1 = useCurrentUserV1();++ // readable to+ // PRIVATE: the creator only+ // PROJECT: the creator and members in the project, workspace Owner and DBA+ // PUBLIC: everyone++ if (getUserEmailFromIdentifier(sheet.creator) === currentUserV1.value.email) {+ // Always readable to the creator+ return true;+ }+ const { visibility } = sheet;+ if (visibility === Worksheet_Visibility.VISIBILITY_PRIVATE) {+ return false;+ }+ if (visibility === Worksheet_Visibility.VISIBILITY_PROJECT) {+ const projectV1 = useProjectV1Store().getProjectByName(sheet.project);++ return hasProjectPermissionV2(+ projectV1,+ currentUserV1.value,+ "bb.projects.get"+ );+ }+ // visibility === "PUBLIC"+ return true;+};++export const isWorksheetWritableV1 = (sheet: Worksheet) => {+ const currentUserV1 = useCurrentUserV1();++ // writable to+ // PRIVATE: the creator only+ // PROJECT: the creator or project role can manage sheet, workspace Owner and DBA+ // PUBLIC: the creator only++ if (getUserEmailFromIdentifier(sheet.creator) === currentUserV1.value.email) {+ // Always writable to the creator+ return true;+ }+ const { visibility } = sheet;+ if (visibility === Worksheet_Visibility.VISIBILITY_PRIVATE) {+ return false;+ }+ if (visibility === Worksheet_Visibility.VISIBILITY_PROJECT) {+ const projectV1 = useProjectV1Store().getProjectByName(sheet.project);++ return hasProjectPermissionV2(+ projectV1,+ currentUserV1.value,+ "bb.projects.get"+ );+ }+ // visibility === "PUBLIC"+ return false;+};diff --git a/frontend/src/views/sql-editor/EditorCommon/SaveSheetModal.vue b/frontend/src/views/sql-editor/EditorCommon/SaveSheetModal.vueindex c4e456ffd3..26c42fab50 100644--- a/frontend/src/views/sql-editor/EditorCommon/SaveSheetModal.vue+++ b/frontend/src/views/sql-editor/EditorCommon/SaveSheetModal.vue@@ -11,14 +11,12 @@<script lang="ts" setup>import { computed, reactive } from "vue";import { useEmitteryEventListener } from "@/composables/useEmitteryEventListener";-import { useDatabaseV1Store, useSheetV1Store, useTabStore } from "@/store";+import { useDatabaseV1Store, useWorkSheetStore, useTabStore } from "@/store";import { UNKNOWN_ID } from "@/types";import {- Sheet_Visibility,- Sheet_Source,- Sheet_Type,- Sheet,-} from "@/types/proto/v1/sheet_service";+ Worksheet,+ Worksheet_Visibility,+} from "@/types/proto/v1/worksheet_service";import { extractSheetUID } from "@/utils";import { useSheetContext } from "../Sheet";import { useSQLEditorContext } from "../context";@@ -30,7 +28,7 @@ type LocalState = {const tabStore = useTabStore();const databaseStore = useDatabaseV1Store();-const sheetV1Store = useSheetV1Store();+const sheetV1Store = useWorkSheetStore();const { events: sheetEvents } = useSheetContext();const { events: editorEvents } = useSQLEditorContext();@@ -66,7 +64,7 @@ const doSaveSheet = async (title: string) => {true /* silent */);- let sheet: Sheet | undefined;+ let sheet: Worksheet | undefined;if (sheetId !== UNKNOWN_ID) {sheet = await sheetV1Store.patchSheet({name: sheetName,@@ -76,14 +74,12 @@ const doSaveSheet = async (title: string) => {});} else {sheet = await sheetV1Store.createSheet(- database.project,- Sheet.fromPartial({+ Worksheet.fromPartial({title: title,+ project: database.project,content: new TextEncoder().encode(statement),database: database.name,- visibility: Sheet_Visibility.VISIBILITY_PRIVATE,- source: Sheet_Source.SOURCE_BYTEBASE,- type: Sheet_Type.TYPE_SQL,+ visibility: Worksheet_Visibility.VISIBILITY_PRIVATE,}));}diff --git a/frontend/src/views/sql-editor/EditorCommon/SharePopover.vue b/frontend/src/views/sql-editor/EditorCommon/SharePopover.vueindex f1e73b13fc..9e07de5958 100644--- a/frontend/src/views/sql-editor/EditorCommon/SharePopover.vue+++ b/frontend/src/views/sql-editor/EditorCommon/SharePopover.vue@@ -98,34 +98,34 @@ import { useI18n } from "vue-i18n";import {pushNotification,useTabStore,- useSheetV1Store,- useSheetAndTabStore,+ useWorkSheetStore,+ useWorkSheetAndTabStore,} from "@/store";import { AccessOption } from "@/types";-import { Sheet_Visibility } from "@/types/proto/v1/sheet_service";-import { sheetSlugV1 } from "@/utils";+import { Worksheet_Visibility } from "@/types/proto/v1/worksheet_service";+import { worksheetSlugV1 } from "@/utils";const { t } = useI18n();const tabStore = useTabStore();-const sheetV1Store = useSheetV1Store();-const sheetAndTabStore = useSheetAndTabStore();+const sheetV1Store = useWorkSheetStore();+const sheetAndTabStore = useWorkSheetAndTabStore();const accessOptions = computed<AccessOption[]>(() => {return [{label: t("sql-editor.private"),- value: Sheet_Visibility.VISIBILITY_PRIVATE,+ value: Worksheet_Visibility.VISIBILITY_PRIVATE,description: t("sql-editor.private-desc"),},{label: t("common.project"),- value: Sheet_Visibility.VISIBILITY_PROJECT,+ value: Worksheet_Visibility.VISIBILITY_PROJECT,description: t("sql-editor.project-desc"),},{label: t("sql-editor.public"),- value: Sheet_Visibility.VISIBILITY_PUBLIC,+ value: Worksheet_Visibility.VISIBILITY_PUBLIC,description: t("sql-editor.public-desc"),},];@@ -163,7 +163,7 @@ const sharedTabLink = computed(() => {if (!sheet.value) {return "";}- return `${window.location.origin}/sql-editor/sheet/${sheetSlugV1(+ return `${window.location.origin}/sql-editor/sheet/${worksheetSlugV1(sheet.value)}`;});diff --git a/frontend/src/views/sql-editor/EditorCommon/SheetConnectionIcon.vue b/frontend/src/views/sql-editor/EditorCommon/SheetConnectionIcon.vueindex 2e191ac405..e22cb1060a 100644--- a/frontend/src/views/sql-editor/EditorCommon/SheetConnectionIcon.vue+++ b/frontend/src/views/sql-editor/EditorCommon/SheetConnectionIcon.vue@@ -10,11 +10,11 @@ import { computed } from "vue";import { EngineIcon } from "@/components/Icon";import { useDatabaseV1Store } from "@/store";import { TabInfo } from "@/types";-import { Sheet } from "@/types/proto/v1/sheet_service";+import { Worksheet } from "@/types/proto/v1/worksheet_service";import { connectionForTab } from "@/utils";const props = defineProps<{- sheet?: Sheet;+ sheet?: Worksheet;tab?: TabInfo;}>();diff --git a/frontend/src/views/sql-editor/EditorPanel/SQLEditor.vue b/frontend/src/views/sql-editor/EditorPanel/SQLEditor.vueindex b0a83420b7..c0dd078531 100644--- a/frontend/src/views/sql-editor/EditorPanel/SQLEditor.vue+++ b/frontend/src/views/sql-editor/EditorPanel/SQLEditor.vue@@ -39,7 +39,7 @@ import {useSQLEditorStore,useUIStateStore,useInstanceV1ByUID,- useSheetAndTabStore,+ useWorkSheetAndTabStore,useDatabaseV1ByUID,} from "@/store";import {@@ -62,7 +62,7 @@ const emit = defineEmits<{const tabStore = useTabStore();const sqlEditorStore = useSQLEditorStore();-const sheetAndTabStore = useSheetAndTabStore();+const sheetAndTabStore = useWorkSheetAndTabStore();const uiStateStore = useUIStateStore();const { events: editorEvents } = useSQLEditorContext();diff --git a/frontend/src/views/sql-editor/EditorPanel/SheetForIssueTipsBar.vue b/frontend/src/views/sql-editor/EditorPanel/SheetForIssueTipsBar.vueindex 1377334166..dbbda77db8 100644--- a/frontend/src/views/sql-editor/EditorPanel/SheetForIssueTipsBar.vue+++ b/frontend/src/views/sql-editor/EditorPanel/SheetForIssueTipsBar.vue@@ -20,11 +20,11 @@<script lang="ts" setup>import { computed } from "vue";import DownloadSheetButton from "@/components/Sheet/DownloadSheetButton.vue";-import { useSheetV1Store, useTabStore } from "@/store";-import { getStatementSize } from "@/utils";+import { useWorkSheetStore, useTabStore } from "@/store";+import { getSheetStatement, getStatementSize } from "@/utils";const tabStore = useTabStore();-const sheetV1Store = useSheetV1Store();+const sheetV1Store = useWorkSheetStore();const tab = computed(() => tabStore.currentTab);const sheet = computed(() => {@@ -38,6 +38,8 @@ const isSheetOversize = computed(() => {return false;}- return getStatementSize(sheet.value.content).lt(sheet.value.contentSize);+ return getStatementSize(getSheetStatement(sheet.value)).lt(+ sheet.value.contentSize+ );});</script>diff --git a/frontend/src/views/sql-editor/SecondarySidebar/SheetTabPane/SheetList/SheetList.vue b/frontend/src/views/sql-editor/SecondarySidebar/SheetTabPane/SheetList/SheetList.vueindex 2dd1110bb9..73180c15f1 100644--- a/frontend/src/views/sql-editor/SecondarySidebar/SheetTabPane/SheetList/SheetList.vue+++ b/frontend/src/views/sql-editor/SecondarySidebar/SheetTabPane/SheetList/SheetList.vue@@ -78,14 +78,10 @@ import {} from "@/components/v2";import {useProjectV1Store,- useSheetAndTabStore,+ useWorkSheetAndTabStore,useDatabaseV1Store,useTabStore,} from "@/store";-import {- getProjectAndSheetId,- projectNamePrefix,-} from "@/store/modules/v1/common";import { ComposedProject, ComposedDatabase, UNKNOWN_ID } from "@/types";import { connectionForTab } from "@/utils";import {@@ -136,7 +132,7 @@ const { showPanel } = useSheetContext();const { isInitialized, isLoading, sheetList, fetchSheetList } =useSheetContextByView(props.view);const keyword = ref("");-const { currentSheet } = storeToRefs(useSheetAndTabStore());+const { currentSheet } = storeToRefs(useWorkSheetAndTabStore());const dropdown = ref<DropdownState>();const mergedItemList = computed(() => {@@ -190,10 +186,7 @@ const treeData = computed((): TreeNode[] => {project = database?.projectEntity;} else {database = databaseStore.getDatabaseByName(item.target.database);- const [projectId, _] = getProjectAndSheetId(item.target.name);- project = projectStore.getProjectByName(- `${projectNamePrefix}${projectId}`- );+ project = projectStore.getProjectByName(item.target.project);}project = project ?? projectStore.getProjectByUID(String(UNKNOWN_ID));diff --git a/frontend/src/views/sql-editor/SecondarySidebar/SheetTabPane/SheetList/common.ts b/frontend/src/views/sql-editor/SecondarySidebar/SheetTabPane/SheetList/common.tsindex f590b8e91b..ed8439624a 100644--- a/frontend/src/views/sql-editor/SecondarySidebar/SheetTabPane/SheetList/common.ts+++ b/frontend/src/views/sql-editor/SecondarySidebar/SheetTabPane/SheetList/common.ts@@ -1,6 +1,6 @@import { escape } from "lodash-es";import { TabInfo } from "@/types";-import { Sheet } from "@/types/proto/v1/sheet_service";+import { Worksheet } from "@/types/proto/v1/worksheet_service";import { extractSheetUID, getHighlightHTMLByRegExp } from "@/utils";export type TabItem = {@@ -9,7 +9,7 @@ export type TabItem = {};export type SheetItem = {type: "SHEET";- target: Sheet;+ target: Worksheet;};export type MergedItem = TabItem | SheetItem;export const isTabItem = (item: MergedItem): item is TabItem => {diff --git a/frontend/src/views/sql-editor/Sheet/SheetTable/Dropdown.vue b/frontend/src/views/sql-editor/Sheet/SheetTable/Dropdown.vueindex fda7415fa3..c3afa4ba89 100644--- a/frontend/src/views/sql-editor/Sheet/SheetTable/Dropdown.vue+++ b/frontend/src/views/sql-editor/Sheet/SheetTable/Dropdown.vue@@ -15,19 +15,17 @@import { type DropdownOption, NDropdown, useDialog } from "naive-ui";import { computed } from "vue";import { useI18n } from "vue-i18n";-import { useSheetV1Store, pushNotification } from "@/store";-import { Sheet } from "@/types/proto/v1/sheet_service";+import { useWorkSheetStore, pushNotification } from "@/store";import {- Sheet_Visibility,- Sheet_Source,- Sheet_Type,-} from "@/types/proto/v1/sheet_service";-import { extractProjectResourceName, isSheetWritableV1 } from "@/utils";+ Worksheet,+ Worksheet_Visibility,+} from "@/types/proto/v1/worksheet_service";+import { isWorksheetWritableV1 } from "@/utils";import type { SheetViewMode } from "../types";const props = defineProps<{view: SheetViewMode;- sheet: Sheet;+ sheet: Worksheet;}>();const emit = defineEmits<{@@ -35,7 +33,7 @@ const emit = defineEmits<{}>();const { t } = useI18n();-const sheetV1Store = useSheetV1Store();+const sheetV1Store = useWorkSheetStore();const dialog = useDialog();const options = computed(() => {@@ -54,7 +52,7 @@ const options = computed(() => {});}- const canWriteSheet = isSheetWritableV1(sheet);+ const canWriteSheet = isWorksheetWritableV1(sheet);if (canWriteSheet) {options.push({key: "delete",@@ -95,7 +93,7 @@ const handleAction = async (key: string) => {});} else if (key === "star" || key === "unstar") {await sheetV1Store.upsertSheetOrganizer({- sheet: sheet.name,+ worksheet: sheet.name,starred: key === "star",});emit("refresh");@@ -108,16 +106,13 @@ const handleAction = async (key: string) => {maskClosable: false,closeOnEsc: false,async onPositiveClick() {- const project = extractProjectResourceName(sheet.name);await sheetV1Store.createSheet(- `projects/${project}`,- Sheet.fromPartial({+ Worksheet.fromPartial({title: sheet.title,+ project: sheet.project,content: sheet.content,database: sheet.database,- visibility: Sheet_Visibility.VISIBILITY_PRIVATE,- source: Sheet_Source.SOURCE_BYTEBASE,- type: Sheet_Type.TYPE_SQL,+ visibility: Worksheet_Visibility.VISIBILITY_PRIVATE,}));pushNotification({diff --git a/frontend/src/views/sql-editor/Sheet/SheetTable/SheetTable.vue b/frontend/src/views/sql-editor/Sheet/SheetTable/SheetTable.vueindex dc7ac0df8d..79246bb6d4 100644--- a/frontend/src/views/sql-editor/Sheet/SheetTable/SheetTable.vue+++ b/frontend/src/views/sql-editor/Sheet/SheetTable/SheetTable.vue@@ -50,20 +50,18 @@ import { useI18n } from "vue-i18n";import { useRouter } from "vue-router";import { SQL_EDITOR_SHARE_MODULE } from "@/router/sqlEditor";import { useUserStore, useProjectV1Store } from "@/store";-import { Sheet } from "@/types/proto/v1/sheet_service";-import { Sheet_Visibility } from "@/types/proto/v1/sheet_service";import {- extractProjectResourceName,- projectV1Name,- sheetSlugV1,-} from "@/utils";+ Worksheet,+ Worksheet_Visibility,+} from "@/types/proto/v1/worksheet_service";+import { projectV1Name, worksheetSlugV1 } from "@/utils";import { SheetViewMode } from "../types";import Dropdown from "./Dropdown.vue";const props = withDefaults(defineProps<{view: SheetViewMode;- sheetList: Sheet[];+ sheetList: Worksheet[];loading?: boolean;}>(),{@@ -84,11 +82,11 @@ const showCreator = computed(() => {return props.view === "shared" || props.view === "starred";});-const handleSheetClick = (sheet: Sheet) => {+const handleSheetClick = (sheet: Worksheet) => {router.push({name: SQL_EDITOR_SHARE_MODULE,params: {- sheetSlug: sheetSlugV1(sheet),+ sheetSlug: worksheetSlugV1(sheet),},});};@@ -124,15 +122,14 @@ const headers = computed(() => {return labelList;});-const getValueList = (sheet: Sheet) => {- const projName = extractProjectResourceName(sheet.name);- const project = projectV1Store.getProjectByName(`projects/${projName}`);+const getValueList = (sheet: Worksheet) => {+ const project = projectV1Store.getProjectByName(sheet.project);let visibility = t("sql-editor.private");switch (sheet.visibility) {- case Sheet_Visibility.VISIBILITY_PROJECT:+ case Worksheet_Visibility.VISIBILITY_PROJECT:visibility = t("common.project");break;- case Sheet_Visibility.VISIBILITY_PUBLIC:+ case Worksheet_Visibility.VISIBILITY_PUBLIC:visibility = t("sql-editor.public");}const valueList = [diff --git a/frontend/src/views/sql-editor/Sheet/common/Dropdown.vue b/frontend/src/views/sql-editor/Sheet/common/Dropdown.vueindex 6bba2f9d84..12592c3ef9 100644--- a/frontend/src/views/sql-editor/Sheet/common/Dropdown.vue+++ b/frontend/src/views/sql-editor/Sheet/common/Dropdown.vue@@ -23,26 +23,24 @@ import {} from "naive-ui";import { computed } from "vue";import { useI18n } from "vue-i18n";-import { useSheetV1Store, pushNotification, useTabStore } from "@/store";-import { Sheet } from "@/types/proto/v1/sheet_service";+import { useWorkSheetStore, pushNotification, useTabStore } from "@/store";import {- Sheet_Visibility,- Sheet_Source,- Sheet_Type,-} from "@/types/proto/v1/sheet_service";-import { extractProjectResourceName, isSheetWritableV1 } from "@/utils";+ Worksheet,+ Worksheet_Visibility,+} from "@/types/proto/v1/worksheet_service";+import { isWorksheetWritableV1 } from "@/utils";import { useSheetContext, type SheetViewMode } from "../";const props = defineProps<{view: SheetViewMode;- sheet: Sheet;+ sheet: Worksheet;dropdownProps?: DropdownProps;secondary?: boolean;transparent?: boolean;}>();const { t } = useI18n();-const sheetV1Store = useSheetV1Store();+const sheetV1Store = useWorkSheetStore();const dialog = useDialog();const { events } = useSheetContext();@@ -62,7 +60,7 @@ const options = computed(() => {});}- const canWriteSheet = isSheetWritableV1(sheet);+ const canWriteSheet = isWorksheetWritableV1(sheet);if (canWriteSheet) {options.push({key: "delete",@@ -109,7 +107,7 @@ const handleAction = async (key: string) => {});} else if (key === "star" || key === "unstar") {await sheetV1Store.upsertSheetOrganizer({- sheet: sheet.name,+ worksheet: sheet.name,starred: key === "star",});events.emit("refresh", { views: ["starred"] });@@ -122,16 +120,13 @@ const handleAction = async (key: string) => {maskClosable: false,closeOnEsc: false,async onPositiveClick() {- const project = extractProjectResourceName(sheet.name);await sheetV1Store.createSheet(- `projects/${project}`,- Sheet.fromPartial({+ Worksheet.fromPartial({title: sheet.title,+ project: sheet.project,content: sheet.content,database: sheet.database,- visibility: Sheet_Visibility.VISIBILITY_PRIVATE,- source: Sheet_Source.SOURCE_BYTEBASE,- type: Sheet_Type.TYPE_SQL,+ visibility: Worksheet_Visibility.VISIBILITY_PRIVATE,}));pushNotification({@@ -151,7 +146,7 @@ const handleAction = async (key: string) => {}};-const turnSheetToUnsavedTab = (sheet: Sheet) => {+const turnSheetToUnsavedTab = (sheet: Worksheet) => {const tabStore = useTabStore();const tab = tabStore.tabList.find((tab) => tab.sheetName === sheet.name);if (tab) {diff --git a/frontend/src/views/sql-editor/Sheet/context.ts b/frontend/src/views/sql-editor/Sheet/context.tsindex 8fff6874a5..86373b1101 100644--- a/frontend/src/views/sql-editor/Sheet/context.ts+++ b/frontend/src/views/sql-editor/Sheet/context.ts@@ -4,16 +4,16 @@ import { t } from "@/plugins/i18n";import {pushNotification,useDatabaseV1Store,- useSheetV1Store,+ useWorkSheetStore,useTabStore,} from "@/store";import { AnyTabInfo, UNKNOWN_ID } from "@/types";-import { Sheet } from "@/types/proto/v1/sheet_service";+import { Worksheet } from "@/types/proto/v1/worksheet_service";import {emptyConnection,getSheetStatement,getSuggestedTabNameFromConnection,- isSheetReadableV1,+ isWorksheetReadableV1,} from "@/utils";import { SheetViewMode } from "./types";@@ -23,7 +23,7 @@ type SheetEvents = Emittery<{}>;const useSheetListByView = (viewMode: SheetViewMode) => {- const sheetStore = useSheetV1Store();+ const sheetStore = useWorkSheetStore();const isInitialized = ref(false);const isLoading = ref(false);@@ -108,13 +108,13 @@ export const provideSheetContext = () => {return context;};-export const openSheet = async (sheet: Sheet, forceNewTab = false) => {+export const openSheet = async (sheet: Worksheet, forceNewTab = false) => {const tabStore = useTabStore();const openingSheetTab = tabStore.tabList.find((tab) => tab.sheetName == sheet.name);- if (!isSheetReadableV1(sheet)) {+ if (!isWorksheetReadableV1(sheet)) {pushNotification({module: "bytebase",style: "CRITICAL",diff --git a/frontend/src/views/sql-editor/SheetPanel/SheetPanel.vue b/frontend/src/views/sql-editor/SheetPanel/SheetPanel.vueindex 5b54cade8a..66e989299e 100644--- a/frontend/src/views/sql-editor/SheetPanel/SheetPanel.vue+++ b/frontend/src/views/sql-editor/SheetPanel/SheetPanel.vue@@ -47,7 +47,7 @@ import { NButton, NTabs, NTabPane } from "naive-ui";import { computed, ref } from "vue";import { SearchBox } from "@/components/v2";import { usePageMode } from "@/store";-import { Sheet } from "@/types/proto/v1/sheet_service";+import { Worksheet } from "@/types/proto/v1/worksheet_service";import { useSheetContext, openSheet, addNewSheet } from "../Sheet";import SheetTable from "./SheetTable";@@ -61,7 +61,7 @@ const keyword = ref("");const isStandaloneMode = computed(() => pageMode.value === "STANDALONE");-const handleSelectSheet = async (sheet: Sheet) => {+const handleSelectSheet = async (sheet: Worksheet) => {if (await openSheet(sheet)) {emit("close");}diff --git a/frontend/src/views/sql-editor/SheetPanel/SheetTable/SheetConnection.vue b/frontend/src/views/sql-editor/SheetPanel/SheetTable/SheetConnection.vueindex 3131338143..513b39d4bb 100644--- a/frontend/src/views/sql-editor/SheetPanel/SheetTable/SheetConnection.vue+++ b/frontend/src/views/sql-editor/SheetPanel/SheetTable/SheetConnection.vue@@ -38,10 +38,10 @@ import {} from "@/components/v2";import { useDatabaseV1Store } from "@/store";import { UNKNOWN_ID } from "@/types";-import { Sheet } from "@/types/proto/v1/sheet_service";+import { Worksheet } from "@/types/proto/v1/worksheet_service";const props = defineProps<{- sheet: Sheet;+ sheet: Worksheet;}>();const databaseStore = useDatabaseV1Store();diff --git a/frontend/src/views/sql-editor/SheetPanel/SheetTable/SheetTable.vue b/frontend/src/views/sql-editor/SheetPanel/SheetTable/SheetTable.vueindex 23c5500ac4..e4699ae423 100644--- a/frontend/src/views/sql-editor/SheetPanel/SheetTable/SheetTable.vue+++ b/frontend/src/views/sql-editor/SheetPanel/SheetTable/SheetTable.vue@@ -7,7 +7,7 @@row-key="name"@click-row="handleSheetClick">- <template #item="{ item: sheet }: BBGridRow<Sheet>">+ <template #item="{ item: sheet }: BBGridRow<Worksheet>"><!-- eslint-disable-next-line vue/no-v-html --><div class="bb-grid-cell" v-html="titleHTML(sheet)"></div><div class="bb-grid-cell">@@ -40,9 +40,11 @@ import { BBGrid, BBGridRow, BBGridColumn } from "@/bbkit";import HumanizeDate from "@/components/misc/HumanizeDate.vue";import { ProjectV1Name } from "@/components/v2";import { useUserStore, useProjectV1Store } from "@/store";-import { Sheet } from "@/types/proto/v1/sheet_service";-import { Sheet_Visibility } from "@/types/proto/v1/sheet_service";-import { extractProjectResourceName, getHighlightHTMLByRegExp } from "@/utils";+import {+ Worksheet,+ Worksheet_Visibility,+} from "@/types/proto/v1/worksheet_service";+import { getHighlightHTMLByRegExp } from "@/utils";import { SheetViewMode, useSheetContextByView, Dropdown } from "../../Sheet";import SheetConnection from "./SheetConnection.vue";@@ -52,7 +54,7 @@ const props = defineProps<{}>();const emit = defineEmits<{- (event: "select-sheet", sheet: Sheet): void;+ (event: "select-sheet", sheet: Worksheet): void;}>();const { t } = useI18n();@@ -65,7 +67,7 @@ const showCreator = computed(() => {return props.view === "shared" || props.view === "starred";});-const handleSheetClick = (sheet: Sheet) => {+const handleSheetClick = (sheet: Worksheet) => {emit("select-sheet", sheet);};@@ -115,32 +117,35 @@ const filteredList = computed(() => {});const sortedSheetList = computed(() => {- return orderBy<Sheet>(filteredList.value, [(sheet) => sheet.title], ["asc"]);+ return orderBy<Worksheet>(+ filteredList.value,+ [(sheet) => sheet.title],+ ["asc"]+ );});-const projectForSheet = (sheet: Sheet) => {- const project = extractProjectResourceName(sheet.name);- return projectStore.getProjectByName(`projects/${project}`);+const projectForSheet = (sheet: Worksheet) => {+ return projectStore.getProjectByName(sheet.project);};-const creatorForSheet = (sheet: Sheet) => {+const creatorForSheet = (sheet: Worksheet) => {return userStore.getUserByIdentifier(sheet.creator)?.title ?? sheet.creator;};-const visibilityDisplayName = (visibility: Sheet_Visibility) => {+const visibilityDisplayName = (visibility: Worksheet_Visibility) => {switch (visibility) {- case Sheet_Visibility.VISIBILITY_PRIVATE:+ case Worksheet_Visibility.VISIBILITY_PRIVATE:return t("sql-editor.private");- case Sheet_Visibility.VISIBILITY_PROJECT:+ case Worksheet_Visibility.VISIBILITY_PROJECT:return t("common.project");- case Sheet_Visibility.VISIBILITY_PUBLIC:+ case Worksheet_Visibility.VISIBILITY_PUBLIC:return t("sql-editor.public");default:return "";}};-const titleHTML = (sheet: Sheet) => {+const titleHTML = (sheet: Worksheet) => {const kw = props.keyword?.toLowerCase().trim();const { title } = sheet;diff --git a/frontend/src/views/sql-editor/TabList/TabItem/Label.vue b/frontend/src/views/sql-editor/TabList/TabItem/Label.vueindex e906713f2a..aeedf382e4 100644--- a/frontend/src/views/sql-editor/TabList/TabItem/Label.vue+++ b/frontend/src/views/sql-editor/TabList/TabItem/Label.vue@@ -28,7 +28,7 @@import { NEllipsis } from "naive-ui";import { computed, nextTick, PropType, reactive, ref, watch } from "vue";import { useEmitteryEventListener } from "@/composables/useEmitteryEventListener";-import { useSheetV1Store, useTabStore } from "@/store";+import { useWorkSheetStore, useTabStore } from "@/store";import type { TabInfo } from "@/types";import { useTabListContext } from "../context";@@ -54,7 +54,7 @@ const state = reactive<LocalState>({});const tabStore = useTabStore();-const sheetV1Store = useSheetV1Store();+const sheetV1Store = useWorkSheetStore();const inputRef = ref<HTMLInputElement>();const { events } = useTabListContext();diff --git a/frontend/src/views/sql-editor/TabList/TabItem/Prefix.vue b/frontend/src/views/sql-editor/TabList/TabItem/Prefix.vueindex 000515ba28..1f31f6ed97 100644--- a/frontend/src/views/sql-editor/TabList/TabItem/Prefix.vue+++ b/frontend/src/views/sql-editor/TabList/TabItem/Prefix.vue@@ -3,11 +3,11 @@<template v-if="sheet"><heroicons-outline:user-group- v-if="sheet.visibility === Sheet_Visibility.VISIBILITY_PROJECT"+ v-if="sheet.visibility === Worksheet_Visibility.VISIBILITY_PROJECT"class="w-4 h-4"/><heroicons-outline:globe- v-if="sheet.visibility === Sheet_Visibility.VISIBILITY_PUBLIC"+ v-if="sheet.visibility === Worksheet_Visibility.VISIBILITY_PUBLIC"class="w-4 h-4"/></template>@@ -18,10 +18,10 @@<script lang="ts" setup>import { computed, PropType } from "vue";-import { useSheetV1Store } from "@/store";+import { useWorkSheetStore } from "@/store";import type { TabInfo } from "@/types";import { TabMode } from "@/types";-import { Sheet_Visibility } from "@/types/proto/v1/sheet_service";+import { Worksheet_Visibility } from "@/types/proto/v1/worksheet_service";import { SheetConnectionIcon } from "../../EditorCommon";const props = defineProps({@@ -35,7 +35,7 @@ const props = defineProps({},});-const sheetV1Store = useSheetV1Store();+const sheetV1Store = useWorkSheetStore();const sheet = computed(() => {const { sheetName } = props.tab;diff --git a/proto/gen/grpc-doc/v1/README.md b/proto/gen/grpc-doc/v1/README.mdindex f8b50b4577..4fffb0bf35 100644--- a/proto/gen/grpc-doc/v1/README.md+++ b/proto/gen/grpc-doc/v1/README.md@@ -579,12 +579,8 @@- [CreateSheetRequest](#bytebase-v1-CreateSheetRequest)- [DeleteSheetRequest](#bytebase-v1-DeleteSheetRequest)- [GetSheetRequest](#bytebase-v1-GetSheetRequest)- - [SearchSheetsRequest](#bytebase-v1-SearchSheetsRequest)- - [SearchSheetsResponse](#bytebase-v1-SearchSheetsResponse)- [Sheet](#bytebase-v1-Sheet)- - [SheetOrganizer](#bytebase-v1-SheetOrganizer)- [SheetPayload](#bytebase-v1-SheetPayload)- - [UpdateSheetOrganizerRequest](#bytebase-v1-UpdateSheetOrganizerRequest)- [UpdateSheetRequest](#bytebase-v1-UpdateSheetRequest)- [Sheet.Source](#bytebase-v1-Sheet-Source)@@ -9400,42 +9396,6 @@ We support three types of SMTP encryption: NONE, STARTTLS, and SSL/TLS.-<a name="bytebase-v1-SearchSheetsRequest"></a>--### SearchSheetsRequest----| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| parent | [string](#string) | | The parent resource of the sheet. Format: projects/{project} |-| filter | [string](#string) | | To filter the search result. Format: only support the following spec for now: - `creator = users/{email}`, `creator != users/{email}` - `starred = true`, `starred = false`. Not support empty filter for now. |-| page_size | [int32](#int32) | | Not used. The maximum number of sheets to return. The service may return fewer than this value. If unspecified, at most 50 sheets will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. |-| page_token | [string](#string) | | Not used. A page token, received from a previous `SearchSheets` call. Provide this to retrieve the subsequent page.--When paginating, all other parameters provided to `SearchSheets` must match the call that provided the page token. |-------<a name="bytebase-v1-SearchSheetsResponse"></a>--### SearchSheetsResponse----| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| sheets | [Sheet](#bytebase-v1-Sheet) | repeated | The sheets that matched the search criteria. |-| next_page_token | [string](#string) | | Not used. A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. |------<a name="bytebase-v1-Sheet"></a>### Sheet@@ -9464,23 +9424,6 @@ When paginating, all other parameters provided to `SearchSheets` must match the-<a name="bytebase-v1-SheetOrganizer"></a>--### SheetOrganizer----| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| sheet | [string](#string) | | The name of the sheet. Format: projects/{project}/sheets/{sheet} |-| starred | [bool](#bool) | | starred means if the sheet is starred. |-| pinned | [bool](#bool) | | pinned means if the sheet is pinned. |------<a name="bytebase-v1-SheetPayload"></a>### SheetPayload@@ -9498,24 +9441,6 @@ When paginating, all other parameters provided to `SearchSheets` must match the-<a name="bytebase-v1-UpdateSheetOrganizerRequest"></a>--### UpdateSheetOrganizerRequest----| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| organizer | [SheetOrganizer](#bytebase-v1-SheetOrganizer) | | The organizer to update.--The organizer's `sheet` field is used to identify the sheet. Format: projects/{project}/sheets/{sheet} |-| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | The list of fields to be updated. Fields are specified relative to the sheet organizer. Only support update the following fields for now: - `starred` - `pinned` |------<a name="bytebase-v1-UpdateSheetRequest"></a>### UpdateSheetRequest@@ -9600,9 +9525,7 @@ Type of the SheetPayload.| ----------- | ------------ | ------------- | ------------|| CreateSheet | [CreateSheetRequest](#bytebase-v1-CreateSheetRequest) | [Sheet](#bytebase-v1-Sheet) | || GetSheet | [GetSheetRequest](#bytebase-v1-GetSheetRequest) | [Sheet](#bytebase-v1-Sheet) | |-| SearchSheets | [SearchSheetsRequest](#bytebase-v1-SearchSheetsRequest) | [SearchSheetsResponse](#bytebase-v1-SearchSheetsResponse) | || UpdateSheet | [UpdateSheetRequest](#bytebase-v1-UpdateSheetRequest) | [Sheet](#bytebase-v1-Sheet) | |-| UpdateSheetOrganizer | [UpdateSheetOrganizerRequest](#bytebase-v1-UpdateSheetOrganizerRequest) | [SheetOrganizer](#bytebase-v1-SheetOrganizer) | || DeleteSheet | [DeleteSheetRequest](#bytebase-v1-DeleteSheetRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | |diff --git a/proto/generated-go/v1/sheet_service.pb.go b/proto/generated-go/v1/sheet_service.pb.goindex 73fbadb0da..79ac33ef17 100644--- a/proto/generated-go/v1/sheet_service.pb.go+++ b/proto/generated-go/v1/sheet_service.pb.go@@ -76,7 +76,7 @@ func (x Sheet_Visibility) Number() protoreflect.EnumNumber {// Deprecated: Use Sheet_Visibility.Descriptor instead.func (Sheet_Visibility) EnumDescriptor() ([]byte, []int) {- return file_v1_sheet_service_proto_rawDescGZIP(), []int{8, 0}+ return file_v1_sheet_service_proto_rawDescGZIP(), []int{4, 0}}type Sheet_Source int32@@ -127,7 +127,7 @@ func (x Sheet_Source) Number() protoreflect.EnumNumber {// Deprecated: Use Sheet_Source.Descriptor instead.func (Sheet_Source) EnumDescriptor() ([]byte, []int) {- return file_v1_sheet_service_proto_rawDescGZIP(), []int{8, 1}+ return file_v1_sheet_service_proto_rawDescGZIP(), []int{4, 1}}type Sheet_Type int32@@ -173,7 +173,7 @@ func (x Sheet_Type) Number() protoreflect.EnumNumber {// Deprecated: Use Sheet_Type.Descriptor instead.func (Sheet_Type) EnumDescriptor() ([]byte, []int) {- return file_v1_sheet_service_proto_rawDescGZIP(), []int{8, 2}+ return file_v1_sheet_service_proto_rawDescGZIP(), []int{4, 2}}// Type of the SheetPayload.@@ -220,7 +220,7 @@ func (x SheetPayload_Type) Number() protoreflect.EnumNumber {// Deprecated: Use SheetPayload_Type.Descriptor instead.func (SheetPayload_Type) EnumDescriptor() ([]byte, []int) {- return file_v1_sheet_service_proto_rawDescGZIP(), []int{9, 0}+ return file_v1_sheet_service_proto_rawDescGZIP(), []int{5, 0}}type CreateSheetRequest struct {@@ -406,137 +406,6 @@ func (x *UpdateSheetRequest) GetUpdateMask() *fieldmaskpb.FieldMask {return nil}-type UpdateSheetOrganizerRequest struct {- state protoimpl.MessageState- sizeCache protoimpl.SizeCache- unknownFields protoimpl.UnknownFields-- // The organizer to update.- //- // The organizer's `sheet` field is used to identify the sheet.- // Format: projects/{project}/sheets/{sheet}- Organizer *SheetOrganizer `protobuf:"bytes,1,opt,name=organizer,proto3" json:"organizer,omitempty"`- // The list of fields to be updated.- // Fields are specified relative to the sheet organizer.- // Only support update the following fields for now:- // - `starred`- // - `pinned`- UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"`-}--func (x *UpdateSheetOrganizerRequest) Reset() {- *x = UpdateSheetOrganizerRequest{}- if protoimpl.UnsafeEnabled {- mi := &file_v1_sheet_service_proto_msgTypes[3]- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))- ms.StoreMessageInfo(mi)- }-}--func (x *UpdateSheetOrganizerRequest) String() string {- return protoimpl.X.MessageStringOf(x)-}--func (*UpdateSheetOrganizerRequest) ProtoMessage() {}--func (x *UpdateSheetOrganizerRequest) ProtoReflect() protoreflect.Message {- mi := &file_v1_sheet_service_proto_msgTypes[3]- if protoimpl.UnsafeEnabled && x != nil {- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))- if ms.LoadMessageInfo() == nil {- ms.StoreMessageInfo(mi)- }- return ms- }- return mi.MessageOf(x)-}--// Deprecated: Use UpdateSheetOrganizerRequest.ProtoReflect.Descriptor instead.-func (*UpdateSheetOrganizerRequest) Descriptor() ([]byte, []int) {- return file_v1_sheet_service_proto_rawDescGZIP(), []int{3}-}--func (x *UpdateSheetOrganizerRequest) GetOrganizer() *SheetOrganizer {- if x != nil {- return x.Organizer- }- return nil-}--func (x *UpdateSheetOrganizerRequest) GetUpdateMask() *fieldmaskpb.FieldMask {- if x != nil {- return x.UpdateMask- }- return nil-}--type SheetOrganizer struct {- state protoimpl.MessageState- sizeCache protoimpl.SizeCache- unknownFields protoimpl.UnknownFields-- // The name of the sheet.- // Format: projects/{project}/sheets/{sheet}- Sheet string `protobuf:"bytes,1,opt,name=sheet,proto3" json:"sheet,omitempty"`- // starred means if the sheet is starred.- Starred bool `protobuf:"varint,2,opt,name=starred,proto3" json:"starred,omitempty"`- // pinned means if the sheet is pinned.- Pinned bool `protobuf:"varint,3,opt,name=pinned,proto3" json:"pinned,omitempty"`-}--func (x *SheetOrganizer) Reset() {- *x = SheetOrganizer{}- if protoimpl.UnsafeEnabled {- mi := &file_v1_sheet_service_proto_msgTypes[4]- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))- ms.StoreMessageInfo(mi)- }-}--func (x *SheetOrganizer) String() string {- return protoimpl.X.MessageStringOf(x)-}--func (*SheetOrganizer) ProtoMessage() {}--func (x *SheetOrganizer) ProtoReflect() protoreflect.Message {- mi := &file_v1_sheet_service_proto_msgTypes[4]- if protoimpl.UnsafeEnabled && x != nil {- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))- if ms.LoadMessageInfo() == nil {- ms.StoreMessageInfo(mi)- }- return ms- }- return mi.MessageOf(x)-}--// Deprecated: Use SheetOrganizer.ProtoReflect.Descriptor instead.-func (*SheetOrganizer) Descriptor() ([]byte, []int) {- return file_v1_sheet_service_proto_rawDescGZIP(), []int{4}-}--func (x *SheetOrganizer) GetSheet() string {- if x != nil {- return x.Sheet- }- return ""-}--func (x *SheetOrganizer) GetStarred() bool {- if x != nil {- return x.Starred- }- return false-}--func (x *SheetOrganizer) GetPinned() bool {- if x != nil {- return x.Pinned- }- return false-}-type DeleteSheetRequest struct {state protoimpl.MessageStatesizeCache protoimpl.SizeCache@@ -550,7 +419,7 @@ type DeleteSheetRequest struct {func (x *DeleteSheetRequest) Reset() {*x = DeleteSheetRequest{}if protoimpl.UnsafeEnabled {- mi := &file_v1_sheet_service_proto_msgTypes[5]+ mi := &file_v1_sheet_service_proto_msgTypes[3]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -563,7 +432,7 @@ func (x *DeleteSheetRequest) String() string {func (*DeleteSheetRequest) ProtoMessage() {}func (x *DeleteSheetRequest) ProtoReflect() protoreflect.Message {- mi := &file_v1_sheet_service_proto_msgTypes[5]+ mi := &file_v1_sheet_service_proto_msgTypes[3]if protoimpl.UnsafeEnabled && x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -576,7 +445,7 @@ func (x *DeleteSheetRequest) ProtoReflect() protoreflect.Message {// Deprecated: Use DeleteSheetRequest.ProtoReflect.Descriptor instead.func (*DeleteSheetRequest) Descriptor() ([]byte, []int) {- return file_v1_sheet_service_proto_rawDescGZIP(), []int{5}+ return file_v1_sheet_service_proto_rawDescGZIP(), []int{3}}func (x *DeleteSheetRequest) GetName() string {@@ -586,151 +455,6 @@ func (x *DeleteSheetRequest) GetName() string {return ""}-type SearchSheetsRequest struct {- state protoimpl.MessageState- sizeCache protoimpl.SizeCache- unknownFields protoimpl.UnknownFields-- // The parent resource of the sheet.- // Format: projects/{project}- Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`- // To filter the search result.- // Format: only support the following spec for now:- // - `creator = users/{email}`, `creator != users/{email}`- // - `starred = true`, `starred = false`.- // Not support empty filter for now.- Filter string `protobuf:"bytes,2,opt,name=filter,proto3" json:"filter,omitempty"`- // Not used. The maximum number of sheets to return. The service may return fewer than- // this value.- // If unspecified, at most 50 sheets will be returned.- // The maximum value is 1000; values above 1000 will be coerced to 1000.- PageSize int32 `protobuf:"varint,3,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`- // Not used. A page token, received from a previous `SearchSheets` call.- // Provide this to retrieve the subsequent page.- //- // When paginating, all other parameters provided to `SearchSheets` must match- // the call that provided the page token.- PageToken string `protobuf:"bytes,4,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`-}--func (x *SearchSheetsRequest) Reset() {- *x = SearchSheetsRequest{}- if protoimpl.UnsafeEnabled {- mi := &file_v1_sheet_service_proto_msgTypes[6]- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))- ms.StoreMessageInfo(mi)- }-}--func (x *SearchSheetsRequest) String() string {- return protoimpl.X.MessageStringOf(x)-}--func (*SearchSheetsRequest) ProtoMessage() {}--func (x *SearchSheetsRequest) ProtoReflect() protoreflect.Message {- mi := &file_v1_sheet_service_proto_msgTypes[6]- if protoimpl.UnsafeEnabled && x != nil {- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))- if ms.LoadMessageInfo() == nil {- ms.StoreMessageInfo(mi)- }- return ms- }- return mi.MessageOf(x)-}--// Deprecated: Use SearchSheetsRequest.ProtoReflect.Descriptor instead.-func (*SearchSheetsRequest) Descriptor() ([]byte, []int) {- return file_v1_sheet_service_proto_rawDescGZIP(), []int{6}-}--func (x *SearchSheetsRequest) GetParent() string {- if x != nil {- return x.Parent- }- return ""-}--func (x *SearchSheetsRequest) GetFilter() string {- if x != nil {- return x.Filter- }- return ""-}--func (x *SearchSheetsRequest) GetPageSize() int32 {- if x != nil {- return x.PageSize- }- return 0-}--func (x *SearchSheetsRequest) GetPageToken() string {- if x != nil {- return x.PageToken- }- return ""-}--type SearchSheetsResponse struct {- state protoimpl.MessageState- sizeCache protoimpl.SizeCache- unknownFields protoimpl.UnknownFields-- // The sheets that matched the search criteria.- Sheets []*Sheet `protobuf:"bytes,1,rep,name=sheets,proto3" json:"sheets,omitempty"`- // Not used. A token, which can be sent as `page_token` to retrieve the next page.- // If this field is omitted, there are no subsequent pages.- NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`-}--func (x *SearchSheetsResponse) Reset() {- *x = SearchSheetsResponse{}- if protoimpl.UnsafeEnabled {- mi := &file_v1_sheet_service_proto_msgTypes[7]- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))- ms.StoreMessageInfo(mi)- }-}--func (x *SearchSheetsResponse) String() string {- return protoimpl.X.MessageStringOf(x)-}--func (*SearchSheetsResponse) ProtoMessage() {}--func (x *SearchSheetsResponse) ProtoReflect() protoreflect.Message {- mi := &file_v1_sheet_service_proto_msgTypes[7]- if protoimpl.UnsafeEnabled && x != nil {- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))- if ms.LoadMessageInfo() == nil {- ms.StoreMessageInfo(mi)- }- return ms- }- return mi.MessageOf(x)-}--// Deprecated: Use SearchSheetsResponse.ProtoReflect.Descriptor instead.-func (*SearchSheetsResponse) Descriptor() ([]byte, []int) {- return file_v1_sheet_service_proto_rawDescGZIP(), []int{7}-}--func (x *SearchSheetsResponse) GetSheets() []*Sheet {- if x != nil {- return x.Sheets- }- return nil-}--func (x *SearchSheetsResponse) GetNextPageToken() string {- if x != nil {- return x.NextPageToken- }- return ""-}-type Sheet struct {state protoimpl.MessageStatesizeCache protoimpl.SizeCache@@ -773,7 +497,7 @@ type Sheet struct {func (x *Sheet) Reset() {*x = Sheet{}if protoimpl.UnsafeEnabled {- mi := &file_v1_sheet_service_proto_msgTypes[8]+ mi := &file_v1_sheet_service_proto_msgTypes[4]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -786,7 +510,7 @@ func (x *Sheet) String() string {func (*Sheet) ProtoMessage() {}func (x *Sheet) ProtoReflect() protoreflect.Message {- mi := &file_v1_sheet_service_proto_msgTypes[8]+ mi := &file_v1_sheet_service_proto_msgTypes[4]if protoimpl.UnsafeEnabled && x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -799,7 +523,7 @@ func (x *Sheet) ProtoReflect() protoreflect.Message {// Deprecated: Use Sheet.ProtoReflect.Descriptor instead.func (*Sheet) Descriptor() ([]byte, []int) {- return file_v1_sheet_service_proto_rawDescGZIP(), []int{8}+ return file_v1_sheet_service_proto_rawDescGZIP(), []int{4}}func (x *Sheet) GetName() string {@@ -915,7 +639,7 @@ type SheetPayload struct {func (x *SheetPayload) Reset() {*x = SheetPayload{}if protoimpl.UnsafeEnabled {- mi := &file_v1_sheet_service_proto_msgTypes[9]+ mi := &file_v1_sheet_service_proto_msgTypes[5]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -928,7 +652,7 @@ func (x *SheetPayload) String() string {func (*SheetPayload) ProtoMessage() {}func (x *SheetPayload) ProtoReflect() protoreflect.Message {- mi := &file_v1_sheet_service_proto_msgTypes[9]+ mi := &file_v1_sheet_service_proto_msgTypes[5]if protoimpl.UnsafeEnabled && x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -941,7 +665,7 @@ func (x *SheetPayload) ProtoReflect() protoreflect.Message {// Deprecated: Use SheetPayload.ProtoReflect.Descriptor instead.func (*SheetPayload) Descriptor() ([]byte, []int) {- return file_v1_sheet_service_proto_rawDescGZIP(), []int{9}+ return file_v1_sheet_service_proto_rawDescGZIP(), []int{5}}func (x *SheetPayload) GetType() SheetPayload_Type {@@ -1002,168 +726,116 @@ var file_v1_sheet_service_proto_rawDesc = []byte{0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28,0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x52, 0x0a, 0x75,- 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x22, 0x9a, 0x01, 0x0a, 0x1b, 0x55, 0x70,- 0x64, 0x61, 0x74, 0x65, 0x53, 0x68, 0x65, 0x65, 0x74, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a,- 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3e, 0x0a, 0x09, 0x6f, 0x72, 0x67,- 0x61, 0x6e, 0x69, 0x7a, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x62,- 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x68, 0x65, 0x65, 0x74,- 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x65, 0x72, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x09,- 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x65, 0x72, 0x12, 0x3b, 0x0a, 0x0b, 0x75, 0x70, 0x64,- 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a,- 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,- 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61,- 0x74, 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x22, 0x5d, 0x0a, 0x0e, 0x53, 0x68, 0x65, 0x65, 0x74, 0x4f,- 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x68, 0x65, 0x65,- 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x05, 0x73, 0x68,- 0x65, 0x65, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x74, 0x61, 0x72, 0x72, 0x65, 0x64, 0x18, 0x02,- 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x74, 0x61, 0x72, 0x72, 0x65, 0x64, 0x12, 0x16, 0x0a,- 0x06, 0x70, 0x69, 0x6e, 0x6e, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x70,- 0x69, 0x6e, 0x6e, 0x65, 0x64, 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, 0x86, 0x01, 0x0a, 0x13, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x53,- 0x68, 0x65, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x06,- 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41,- 0x02, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x6c,- 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65,- 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03,- 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d,- 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x04, 0x20, 0x01,- 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x6a, 0x0a,- 0x14, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x53, 0x68, 0x65, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73,- 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x06, 0x73, 0x68, 0x65, 0x65, 0x74, 0x73, 0x18,- 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65,- 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x68, 0x65, 0x65, 0x74, 0x52, 0x06, 0x73, 0x68, 0x65, 0x65, 0x74,- 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74,- 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74,- 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0xef, 0x06, 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, 0x52, 0x08, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x12, 0x19, 0x0a, 0x05, 0x74,- 0x69, 0x74, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52,- 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x1d, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f,- 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x07, 0x63, 0x72,- 0x65, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x40, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f,- 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f,- 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d,- 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0a, 0x63, 0x72, 0x65,- 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x40, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74,- 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67,- 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54,- 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0a, 0x75,- 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x07, 0x63, 0x6f, 0x6e,- 0x74, 0x65, 0x6e, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52,- 0x07, 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, 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,+ 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,+ 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,+ 0x52, 0x08, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x12, 0x19, 0x0a, 0x05, 0x74, 0x69,+ 0x74, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x05,+ 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x1d, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72,+ 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x07, 0x63, 0x72, 0x65,+ 0x61, 0x74, 0x6f, 0x72, 0x12, 0x40, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74,+ 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67,+ 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65,+ 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61,+ 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x40, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65,+ 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f,+ 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69,+ 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0a, 0x75, 0x70,+ 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74,+ 0x65, 0x6e, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x07,+ 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,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, 0xc8,- 0x06, 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,- 0x82, 0x01, 0x0a, 0x0c, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x53, 0x68, 0x65, 0x65, 0x74, 0x73,- 0x12, 0x20, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53,- 0x65, 0x61, 0x72, 0x63, 0x68, 0x53, 0x68, 0x65, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65,- 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31,- 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x53, 0x68, 0x65, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73,- 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x27, 0x12, 0x25, 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, 0x3a, 0x73, 0x65,- 0x61, 0x72, 0x63, 0x68, 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, 0xbd, 0x01, 0x0a, 0x14, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x68, 0x65,- 0x65, 0x74, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x65, 0x72, 0x12, 0x28, 0x2e, 0x62, 0x79,- 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,- 0x53, 0x68, 0x65, 0x65, 0x74, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x65, 0x72, 0x52, 0x65,- 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65,- 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x68, 0x65, 0x65, 0x74, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a,- 0x65, 0x72, 0x22, 0x5e, 0xda, 0x41, 0x15, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x65, 0x72,- 0x2c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x82, 0xd3, 0xe4, 0x93,- 0x02, 0x40, 0x3a, 0x09, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x65, 0x72, 0x1a, 0x33, 0x2f,- 0x76, 0x31, 0x2f, 0x7b, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x73, 0x68,- 0x65, 0x65, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x73,- 0x68, 0x65, 0x65, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a,- 0x65, 0x72, 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, 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,}var (@@ -1179,62 +851,51 @@ func file_v1_sheet_service_proto_rawDescGZIP() []byte {}var file_v1_sheet_service_proto_enumTypes = make([]protoimpl.EnumInfo, 4)-var file_v1_sheet_service_proto_msgTypes = make([]protoimpl.MessageInfo, 10)+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- (*UpdateSheetOrganizerRequest)(nil), // 7: bytebase.v1.UpdateSheetOrganizerRequest- (*SheetOrganizer)(nil), // 8: bytebase.v1.SheetOrganizer- (*DeleteSheetRequest)(nil), // 9: bytebase.v1.DeleteSheetRequest- (*SearchSheetsRequest)(nil), // 10: bytebase.v1.SearchSheetsRequest- (*SearchSheetsResponse)(nil), // 11: bytebase.v1.SearchSheetsResponse- (*Sheet)(nil), // 12: bytebase.v1.Sheet- (*SheetPayload)(nil), // 13: bytebase.v1.SheetPayload- (*fieldmaskpb.FieldMask)(nil), // 14: google.protobuf.FieldMask- (*timestamppb.Timestamp)(nil), // 15: google.protobuf.Timestamp- (*PushEvent)(nil), // 16: bytebase.v1.PushEvent- (*DatabaseConfig)(nil), // 17: bytebase.v1.DatabaseConfig- (*emptypb.Empty)(nil), // 18: google.protobuf.Empty+ (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}var file_v1_sheet_service_proto_depIdxs = []int32{- 12, // 0: bytebase.v1.CreateSheetRequest.sheet:type_name -> bytebase.v1.Sheet- 12, // 1: bytebase.v1.UpdateSheetRequest.sheet:type_name -> bytebase.v1.Sheet- 14, // 2: bytebase.v1.UpdateSheetRequest.update_mask:type_name -> google.protobuf.FieldMask- 8, // 3: bytebase.v1.UpdateSheetOrganizerRequest.organizer:type_name -> bytebase.v1.SheetOrganizer- 14, // 4: bytebase.v1.UpdateSheetOrganizerRequest.update_mask:type_name -> google.protobuf.FieldMask- 12, // 5: bytebase.v1.SearchSheetsResponse.sheets:type_name -> bytebase.v1.Sheet- 15, // 6: bytebase.v1.Sheet.create_time:type_name -> google.protobuf.Timestamp- 15, // 7: bytebase.v1.Sheet.update_time:type_name -> google.protobuf.Timestamp- 0, // 8: bytebase.v1.Sheet.visibility:type_name -> bytebase.v1.Sheet.Visibility- 1, // 9: bytebase.v1.Sheet.source:type_name -> bytebase.v1.Sheet.Source- 2, // 10: bytebase.v1.Sheet.type:type_name -> bytebase.v1.Sheet.Type- 13, // 11: bytebase.v1.Sheet.payload:type_name -> bytebase.v1.SheetPayload- 16, // 12: bytebase.v1.Sheet.push_event:type_name -> bytebase.v1.PushEvent- 3, // 13: bytebase.v1.SheetPayload.type:type_name -> bytebase.v1.SheetPayload.Type- 17, // 14: bytebase.v1.SheetPayload.database_config:type_name -> bytebase.v1.DatabaseConfig- 17, // 15: bytebase.v1.SheetPayload.baseline_database_config:type_name -> bytebase.v1.DatabaseConfig- 4, // 16: bytebase.v1.SheetService.CreateSheet:input_type -> bytebase.v1.CreateSheetRequest- 5, // 17: bytebase.v1.SheetService.GetSheet:input_type -> bytebase.v1.GetSheetRequest- 10, // 18: bytebase.v1.SheetService.SearchSheets:input_type -> bytebase.v1.SearchSheetsRequest- 6, // 19: bytebase.v1.SheetService.UpdateSheet:input_type -> bytebase.v1.UpdateSheetRequest- 7, // 20: bytebase.v1.SheetService.UpdateSheetOrganizer:input_type -> bytebase.v1.UpdateSheetOrganizerRequest- 9, // 21: bytebase.v1.SheetService.DeleteSheet:input_type -> bytebase.v1.DeleteSheetRequest- 12, // 22: bytebase.v1.SheetService.CreateSheet:output_type -> bytebase.v1.Sheet- 12, // 23: bytebase.v1.SheetService.GetSheet:output_type -> bytebase.v1.Sheet- 11, // 24: bytebase.v1.SheetService.SearchSheets:output_type -> bytebase.v1.SearchSheetsResponse- 12, // 25: bytebase.v1.SheetService.UpdateSheet:output_type -> bytebase.v1.Sheet- 8, // 26: bytebase.v1.SheetService.UpdateSheetOrganizer:output_type -> bytebase.v1.SheetOrganizer- 18, // 27: bytebase.v1.SheetService.DeleteSheet:output_type -> google.protobuf.Empty- 22, // [22:28] is the sub-list for method output_type- 16, // [16:22] is the sub-list for method input_type- 16, // [16:16] is the sub-list for extension type_name- 16, // [16:16] is the sub-list for extension extendee- 0, // [0:16] is the sub-list for field type_name+ 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}func init() { file_v1_sheet_service_proto_init() }@@ -1282,30 +943,6 @@ func file_v1_sheet_service_proto_init() {}}file_v1_sheet_service_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {- switch v := v.(*UpdateSheetOrganizerRequest); i {- case 0:- return &v.state- case 1:- return &v.sizeCache- case 2:- return &v.unknownFields- default:- return nil- }- }- file_v1_sheet_service_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {- switch v := v.(*SheetOrganizer); i {- case 0:- return &v.state- case 1:- return &v.sizeCache- case 2:- return &v.unknownFields- default:- return nil- }- }- file_v1_sheet_service_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {switch v := v.(*DeleteSheetRequest); i {case 0:return &v.state@@ -1317,31 +954,7 @@ func file_v1_sheet_service_proto_init() {return nil}}- file_v1_sheet_service_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {- switch v := v.(*SearchSheetsRequest); i {- case 0:- return &v.state- case 1:- return &v.sizeCache- case 2:- return &v.unknownFields- default:- return nil- }- }- file_v1_sheet_service_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {- switch v := v.(*SearchSheetsResponse); i {- case 0:- return &v.state- case 1:- return &v.sizeCache- case 2:- return &v.unknownFields- default:- return nil- }- }- file_v1_sheet_service_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {+ file_v1_sheet_service_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {switch v := v.(*Sheet); i {case 0:return &v.state@@ -1353,7 +966,7 @@ func file_v1_sheet_service_proto_init() {return nil}}- file_v1_sheet_service_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {+ file_v1_sheet_service_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {switch v := v.(*SheetPayload); i {case 0:return &v.state@@ -1372,7 +985,7 @@ func file_v1_sheet_service_proto_init() {GoPackagePath: reflect.TypeOf(x{}).PkgPath(),RawDescriptor: file_v1_sheet_service_proto_rawDesc,NumEnums: 4,- NumMessages: 10,+ NumMessages: 6,NumExtensions: 0,NumServices: 1,},diff --git a/proto/generated-go/v1/sheet_service.pb.gw.go b/proto/generated-go/v1/sheet_service.pb.gw.goindex 3cb94709ae..88420249f2 100644--- a/proto/generated-go/v1/sheet_service.pb.gw.go+++ b/proto/generated-go/v1/sheet_service.pb.gw.go@@ -161,76 +161,6 @@ func local_request_SheetService_GetSheet_0(ctx context.Context, marshaler runtim}-var (- filter_SheetService_SearchSheets_0 = &utilities.DoubleArray{Encoding: map[string]int{"parent": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}}-)--func request_SheetService_SearchSheets_0(ctx context.Context, marshaler runtime.Marshaler, client SheetServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {- var protoReq SearchSheetsRequest- var metadata runtime.ServerMetadata-- var (- val string- ok bool- err error- _ = err- )-- val, ok = pathParams["parent"]- if !ok {- return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "parent")- }-- protoReq.Parent, err = runtime.String(val)- if err != nil {- return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "parent", err)- }-- if err := req.ParseForm(); err != nil {- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)- }- if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_SheetService_SearchSheets_0); err != nil {- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)- }-- msg, err := client.SearchSheets(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))- return msg, metadata, err--}--func local_request_SheetService_SearchSheets_0(ctx context.Context, marshaler runtime.Marshaler, server SheetServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {- var protoReq SearchSheetsRequest- var metadata runtime.ServerMetadata-- var (- val string- ok bool- err error- _ = err- )-- val, ok = pathParams["parent"]- if !ok {- return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "parent")- }-- protoReq.Parent, err = runtime.String(val)- if err != nil {- return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "parent", err)- }-- if err := req.ParseForm(); err != nil {- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)- }- if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_SheetService_SearchSheets_0); err != nil {- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)- }-- msg, err := server.SearchSheets(ctx, &protoReq)- return msg, metadata, err--}-var (filter_SheetService_UpdateSheet_0 = &utilities.DoubleArray{Encoding: map[string]int{"sheet": 0, "name": 1}, Base: []int{1, 2, 1, 0, 0}, Check: []int{0, 1, 2, 3, 2}})@@ -331,84 +261,6 @@ func local_request_SheetService_UpdateSheet_0(ctx context.Context, marshaler run}-var (- filter_SheetService_UpdateSheetOrganizer_0 = &utilities.DoubleArray{Encoding: map[string]int{"organizer": 0, "sheet": 1}, Base: []int{1, 2, 1, 0, 0}, Check: []int{0, 1, 2, 3, 2}}-)--func request_SheetService_UpdateSheetOrganizer_0(ctx context.Context, marshaler runtime.Marshaler, client SheetServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {- var protoReq UpdateSheetOrganizerRequest- var metadata runtime.ServerMetadata-- if err := marshaler.NewDecoder(req.Body).Decode(&protoReq.Organizer); err != nil && err != io.EOF {- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)- }-- var (- val string- ok bool- err error- _ = err- )-- val, ok = pathParams["organizer.sheet"]- if !ok {- return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "organizer.sheet")- }-- err = runtime.PopulateFieldFromPath(&protoReq, "organizer.sheet", val)- if err != nil {- return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "organizer.sheet", err)- }-- if err := req.ParseForm(); err != nil {- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)- }- if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_SheetService_UpdateSheetOrganizer_0); err != nil {- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)- }-- msg, err := client.UpdateSheetOrganizer(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))- return msg, metadata, err--}--func local_request_SheetService_UpdateSheetOrganizer_0(ctx context.Context, marshaler runtime.Marshaler, server SheetServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {- var protoReq UpdateSheetOrganizerRequest- var metadata runtime.ServerMetadata-- if err := marshaler.NewDecoder(req.Body).Decode(&protoReq.Organizer); err != nil && err != io.EOF {- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)- }-- var (- val string- ok bool- err error- _ = err- )-- val, ok = pathParams["organizer.sheet"]- if !ok {- return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "organizer.sheet")- }-- err = runtime.PopulateFieldFromPath(&protoReq, "organizer.sheet", val)- if err != nil {- return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "organizer.sheet", err)- }-- if err := req.ParseForm(); err != nil {- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)- }- if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_SheetService_UpdateSheetOrganizer_0); err != nil {- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)- }-- msg, err := server.UpdateSheetOrganizer(ctx, &protoReq)- return msg, metadata, err--}-func request_SheetService_DeleteSheet_0(ctx context.Context, marshaler runtime.Marshaler, client SheetServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {var protoReq DeleteSheetRequestvar metadata runtime.ServerMetadata@@ -517,31 +369,6 @@ func RegisterSheetServiceHandlerServer(ctx context.Context, mux *runtime.ServeMu})- mux.Handle("GET", pattern_SheetService_SearchSheets_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {- ctx, cancel := context.WithCancel(req.Context())- defer cancel()- var stream runtime.ServerTransportStream- ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)- inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)- var err error- var annotatedContext context.Context- annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/bytebase.v1.SheetService/SearchSheets", runtime.WithHTTPPathPattern("/v1/{parent=projects/*}/sheets:search"))- if err != nil {- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)- return- }- resp, md, err := local_request_SheetService_SearchSheets_0(annotatedContext, inboundMarshaler, server, req, pathParams)- md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())- annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)- if err != nil {- runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)- return- }-- forward_SheetService_SearchSheets_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)-- })-mux.Handle("PATCH", pattern_SheetService_UpdateSheet_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {ctx, cancel := context.WithCancel(req.Context())defer cancel()@@ -567,31 +394,6 @@ func RegisterSheetServiceHandlerServer(ctx context.Context, mux *runtime.ServeMu})- mux.Handle("PUT", pattern_SheetService_UpdateSheetOrganizer_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {- ctx, cancel := context.WithCancel(req.Context())- defer cancel()- var stream runtime.ServerTransportStream- ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)- inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)- var err error- var annotatedContext context.Context- annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/bytebase.v1.SheetService/UpdateSheetOrganizer", runtime.WithHTTPPathPattern("/v1/{organizer.sheet=projects/*/sheets/*}/organizer"))- if err != nil {- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)- return- }- resp, md, err := local_request_SheetService_UpdateSheetOrganizer_0(annotatedContext, inboundMarshaler, server, req, pathParams)- md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())- annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)- if err != nil {- runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)- return- }-- forward_SheetService_UpdateSheetOrganizer_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)-- })-mux.Handle("DELETE", pattern_SheetService_DeleteSheet_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {ctx, cancel := context.WithCancel(req.Context())defer cancel()@@ -702,28 +504,6 @@ func RegisterSheetServiceHandlerClient(ctx context.Context, mux *runtime.ServeMu})- mux.Handle("GET", pattern_SheetService_SearchSheets_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {- ctx, cancel := context.WithCancel(req.Context())- defer cancel()- inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)- var err error- var annotatedContext context.Context- annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/bytebase.v1.SheetService/SearchSheets", runtime.WithHTTPPathPattern("/v1/{parent=projects/*}/sheets:search"))- if err != nil {- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)- return- }- resp, md, err := request_SheetService_SearchSheets_0(annotatedContext, inboundMarshaler, client, req, pathParams)- annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)- if err != nil {- runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)- return- }-- forward_SheetService_SearchSheets_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)-- })-mux.Handle("PATCH", pattern_SheetService_UpdateSheet_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {ctx, cancel := context.WithCancel(req.Context())defer cancel()@@ -746,28 +526,6 @@ func RegisterSheetServiceHandlerClient(ctx context.Context, mux *runtime.ServeMu})- mux.Handle("PUT", pattern_SheetService_UpdateSheetOrganizer_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {- ctx, cancel := context.WithCancel(req.Context())- defer cancel()- inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)- var err error- var annotatedContext context.Context- annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/bytebase.v1.SheetService/UpdateSheetOrganizer", runtime.WithHTTPPathPattern("/v1/{organizer.sheet=projects/*/sheets/*}/organizer"))- if err != nil {- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)- return- }- resp, md, err := request_SheetService_UpdateSheetOrganizer_0(annotatedContext, inboundMarshaler, client, req, pathParams)- annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)- if err != nil {- runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)- return- }-- forward_SheetService_UpdateSheetOrganizer_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)-- })-mux.Handle("DELETE", pattern_SheetService_DeleteSheet_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {ctx, cancel := context.WithCancel(req.Context())defer cancel()@@ -798,12 +556,8 @@ var (pattern_SheetService_GetSheet_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 2, 2, 1, 0, 4, 4, 5, 3}, []string{"v1", "projects", "sheets", "name"}, ""))- pattern_SheetService_SearchSheets_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 2, 5, 2, 2, 3}, []string{"v1", "projects", "parent", "sheets"}, "search"))-pattern_SheetService_UpdateSheet_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 2, 2, 1, 0, 4, 4, 5, 3}, []string{"v1", "projects", "sheets", "sheet.name"}, ""))- pattern_SheetService_UpdateSheetOrganizer_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 2, 2, 1, 0, 4, 4, 5, 3, 2, 4}, []string{"v1", "projects", "sheets", "organizer.sheet", "organizer"}, ""))-pattern_SheetService_DeleteSheet_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 2, 2, 1, 0, 4, 4, 5, 3}, []string{"v1", "projects", "sheets", "name"}, "")))@@ -812,11 +566,7 @@ var (forward_SheetService_GetSheet_0 = runtime.ForwardResponseMessage- forward_SheetService_SearchSheets_0 = runtime.ForwardResponseMessage-forward_SheetService_UpdateSheet_0 = runtime.ForwardResponseMessage- forward_SheetService_UpdateSheetOrganizer_0 = runtime.ForwardResponseMessage-forward_SheetService_DeleteSheet_0 = runtime.ForwardResponseMessage)diff --git a/proto/generated-go/v1/sheet_service_grpc.pb.go b/proto/generated-go/v1/sheet_service_grpc.pb.goindex fcd4ceb291..df50cfb9a2 100644--- a/proto/generated-go/v1/sheet_service_grpc.pb.go+++ b/proto/generated-go/v1/sheet_service_grpc.pb.go@@ -20,12 +20,10 @@ import (const _ = grpc.SupportPackageIsVersion7const (- SheetService_CreateSheet_FullMethodName = "/bytebase.v1.SheetService/CreateSheet"- SheetService_GetSheet_FullMethodName = "/bytebase.v1.SheetService/GetSheet"- SheetService_SearchSheets_FullMethodName = "/bytebase.v1.SheetService/SearchSheets"- SheetService_UpdateSheet_FullMethodName = "/bytebase.v1.SheetService/UpdateSheet"- SheetService_UpdateSheetOrganizer_FullMethodName = "/bytebase.v1.SheetService/UpdateSheetOrganizer"- SheetService_DeleteSheet_FullMethodName = "/bytebase.v1.SheetService/DeleteSheet"+ SheetService_CreateSheet_FullMethodName = "/bytebase.v1.SheetService/CreateSheet"+ SheetService_GetSheet_FullMethodName = "/bytebase.v1.SheetService/GetSheet"+ SheetService_UpdateSheet_FullMethodName = "/bytebase.v1.SheetService/UpdateSheet"+ SheetService_DeleteSheet_FullMethodName = "/bytebase.v1.SheetService/DeleteSheet")// SheetServiceClient is the client API for SheetService service.@@ -34,9 +32,7 @@ const (type SheetServiceClient interface {CreateSheet(ctx context.Context, in *CreateSheetRequest, opts ...grpc.CallOption) (*Sheet, error)GetSheet(ctx context.Context, in *GetSheetRequest, opts ...grpc.CallOption) (*Sheet, error)- SearchSheets(ctx context.Context, in *SearchSheetsRequest, opts ...grpc.CallOption) (*SearchSheetsResponse, error)UpdateSheet(ctx context.Context, in *UpdateSheetRequest, opts ...grpc.CallOption) (*Sheet, error)- UpdateSheetOrganizer(ctx context.Context, in *UpdateSheetOrganizerRequest, opts ...grpc.CallOption) (*SheetOrganizer, error)DeleteSheet(ctx context.Context, in *DeleteSheetRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)}@@ -66,15 +62,6 @@ func (c *sheetServiceClient) GetSheet(ctx context.Context, in *GetSheetRequest,return out, nil}-func (c *sheetServiceClient) SearchSheets(ctx context.Context, in *SearchSheetsRequest, opts ...grpc.CallOption) (*SearchSheetsResponse, error) {- out := new(SearchSheetsResponse)- err := c.cc.Invoke(ctx, SheetService_SearchSheets_FullMethodName, in, out, opts...)- if err != nil {- return nil, err- }- return out, nil-}-func (c *sheetServiceClient) UpdateSheet(ctx context.Context, in *UpdateSheetRequest, opts ...grpc.CallOption) (*Sheet, error) {out := new(Sheet)err := c.cc.Invoke(ctx, SheetService_UpdateSheet_FullMethodName, in, out, opts...)@@ -84,15 +71,6 @@ func (c *sheetServiceClient) UpdateSheet(ctx context.Context, in *UpdateSheetReqreturn out, nil}-func (c *sheetServiceClient) UpdateSheetOrganizer(ctx context.Context, in *UpdateSheetOrganizerRequest, opts ...grpc.CallOption) (*SheetOrganizer, error) {- out := new(SheetOrganizer)- err := c.cc.Invoke(ctx, SheetService_UpdateSheetOrganizer_FullMethodName, in, out, opts...)- if err != nil {- return nil, err- }- return out, nil-}-func (c *sheetServiceClient) DeleteSheet(ctx context.Context, in *DeleteSheetRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {out := new(emptypb.Empty)err := c.cc.Invoke(ctx, SheetService_DeleteSheet_FullMethodName, in, out, opts...)@@ -108,9 +86,7 @@ func (c *sheetServiceClient) DeleteSheet(ctx context.Context, in *DeleteSheetReqtype SheetServiceServer interface {CreateSheet(context.Context, *CreateSheetRequest) (*Sheet, error)GetSheet(context.Context, *GetSheetRequest) (*Sheet, error)- SearchSheets(context.Context, *SearchSheetsRequest) (*SearchSheetsResponse, error)UpdateSheet(context.Context, *UpdateSheetRequest) (*Sheet, error)- UpdateSheetOrganizer(context.Context, *UpdateSheetOrganizerRequest) (*SheetOrganizer, error)DeleteSheet(context.Context, *DeleteSheetRequest) (*emptypb.Empty, error)mustEmbedUnimplementedSheetServiceServer()}@@ -125,15 +101,9 @@ func (UnimplementedSheetServiceServer) CreateSheet(context.Context, *CreateSheetfunc (UnimplementedSheetServiceServer) GetSheet(context.Context, *GetSheetRequest) (*Sheet, error) {return nil, status.Errorf(codes.Unimplemented, "method GetSheet not implemented")}-func (UnimplementedSheetServiceServer) SearchSheets(context.Context, *SearchSheetsRequest) (*SearchSheetsResponse, error) {- return nil, status.Errorf(codes.Unimplemented, "method SearchSheets not implemented")-}func (UnimplementedSheetServiceServer) UpdateSheet(context.Context, *UpdateSheetRequest) (*Sheet, error) {return nil, status.Errorf(codes.Unimplemented, "method UpdateSheet not implemented")}-func (UnimplementedSheetServiceServer) UpdateSheetOrganizer(context.Context, *UpdateSheetOrganizerRequest) (*SheetOrganizer, error) {- return nil, status.Errorf(codes.Unimplemented, "method UpdateSheetOrganizer not implemented")-}func (UnimplementedSheetServiceServer) DeleteSheet(context.Context, *DeleteSheetRequest) (*emptypb.Empty, error) {return nil, status.Errorf(codes.Unimplemented, "method DeleteSheet not implemented")}@@ -186,24 +156,6 @@ func _SheetService_GetSheet_Handler(srv interface{}, ctx context.Context, dec fureturn interceptor(ctx, in, info, handler)}-func _SheetService_SearchSheets_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {- in := new(SearchSheetsRequest)- if err := dec(in); err != nil {- return nil, err- }- if interceptor == nil {- return srv.(SheetServiceServer).SearchSheets(ctx, in)- }- info := &grpc.UnaryServerInfo{- Server: srv,- FullMethod: SheetService_SearchSheets_FullMethodName,- }- handler := func(ctx context.Context, req interface{}) (interface{}, error) {- return srv.(SheetServiceServer).SearchSheets(ctx, req.(*SearchSheetsRequest))- }- return interceptor(ctx, in, info, handler)-}-func _SheetService_UpdateSheet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {in := new(UpdateSheetRequest)if err := dec(in); err != nil {@@ -222,24 +174,6 @@ func _SheetService_UpdateSheet_Handler(srv interface{}, ctx context.Context, decreturn interceptor(ctx, in, info, handler)}-func _SheetService_UpdateSheetOrganizer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {- in := new(UpdateSheetOrganizerRequest)- if err := dec(in); err != nil {- return nil, err- }- if interceptor == nil {- return srv.(SheetServiceServer).UpdateSheetOrganizer(ctx, in)- }- info := &grpc.UnaryServerInfo{- Server: srv,- FullMethod: SheetService_UpdateSheetOrganizer_FullMethodName,- }- handler := func(ctx context.Context, req interface{}) (interface{}, error) {- return srv.(SheetServiceServer).UpdateSheetOrganizer(ctx, req.(*UpdateSheetOrganizerRequest))- }- return interceptor(ctx, in, info, handler)-}-func _SheetService_DeleteSheet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {in := new(DeleteSheetRequest)if err := dec(in); err != nil {@@ -273,18 +207,10 @@ var SheetService_ServiceDesc = grpc.ServiceDesc{MethodName: "GetSheet",Handler: _SheetService_GetSheet_Handler,},- {- MethodName: "SearchSheets",- Handler: _SheetService_SearchSheets_Handler,- },{MethodName: "UpdateSheet",Handler: _SheetService_UpdateSheet_Handler,},- {- MethodName: "UpdateSheetOrganizer",- Handler: _SheetService_UpdateSheetOrganizer_Handler,- },{MethodName: "DeleteSheet",Handler: _SheetService_DeleteSheet_Handler,diff --git a/proto/v1/sheet_service.proto b/proto/v1/sheet_service.protoindex d894f709ab..c69fd403a5 100644--- a/proto/v1/sheet_service.proto+++ b/proto/v1/sheet_service.proto@@ -27,10 +27,6 @@ service SheetService {option (google.api.method_signature) = "name";}- rpc SearchSheets(SearchSheetsRequest) returns (SearchSheetsResponse) {- option (google.api.http) = {get: "/v1/{parent=projects/*}/sheets:search"};- }-rpc UpdateSheet(UpdateSheetRequest) returns (Sheet) {option (google.api.http) = {patch: "/v1/{sheet.name=projects/*/sheets/*}"@@ -39,14 +35,6 @@ service SheetService {option (google.api.method_signature) = "sheet,update_mask";}- rpc UpdateSheetOrganizer(UpdateSheetOrganizerRequest) returns (SheetOrganizer) {- option (google.api.http) = {- put: "/v1/{organizer.sheet=projects/*/sheets/*}/organizer"- body: "organizer"- };- option (google.api.method_signature) = "organizer,update_mask";- }-rpc DeleteSheet(DeleteSheetRequest) returns (google.protobuf.Empty) {option (google.api.http) = {delete: "/v1/{name=projects/*/sheets/*}"};option (google.api.method_signature) = "name";@@ -89,74 +77,12 @@ message UpdateSheetRequest {google.protobuf.FieldMask update_mask = 2;}-message UpdateSheetOrganizerRequest {- // The organizer to update.- //- // The organizer's `sheet` field is used to identify the sheet.- // Format: projects/{project}/sheets/{sheet}- SheetOrganizer organizer = 1 [(google.api.field_behavior) = REQUIRED];-- // The list of fields to be updated.- // Fields are specified relative to the sheet organizer.- // Only support update the following fields for now:- // - `starred`- // - `pinned`- google.protobuf.FieldMask update_mask = 2;-}--message SheetOrganizer {- // The name of the sheet.- // Format: projects/{project}/sheets/{sheet}- string sheet = 1 [(google.api.field_behavior) = REQUIRED];-- // starred means if the sheet is starred.- bool starred = 2;-- // pinned means if the sheet is pinned.- bool pinned = 3;-}-message DeleteSheetRequest {// The name of the sheet to delete.// Format: projects/{project}/sheets/{sheet}string name = 1 [(google.api.field_behavior) = REQUIRED];}-message SearchSheetsRequest {- // The parent resource of the sheet.- // Format: projects/{project}- string parent = 1 [(google.api.field_behavior) = REQUIRED];-- // To filter the search result.- // Format: only support the following spec for now:- // - `creator = users/{email}`, `creator != users/{email}`- // - `starred = true`, `starred = false`.- // Not support empty filter for now.- string filter = 2;-- // Not used. The maximum number of sheets to return. The service may return fewer than- // this value.- // If unspecified, at most 50 sheets will be returned.- // The maximum value is 1000; values above 1000 will be coerced to 1000.- int32 page_size = 3;-- // Not used. A page token, received from a previous `SearchSheets` call.- // Provide this to retrieve the subsequent page.- //- // When paginating, all other parameters provided to `SearchSheets` must match- // the call that provided the page token.- string page_token = 4;-}--message SearchSheetsResponse {- // The sheets that matched the search criteria.- repeated Sheet sheets = 1;-- // Not used. A token, which can be sent as `page_token` to retrieve the next page.- // If this field is omitted, there are no subsequent pages.- string next_page_token = 2;-}-message Sheet {// The name of the sheet resource, generated by the server.// Canonical parent is project.