Memos is an open-source, self-hosted note-taking app that brings your everyday thoughts together in a personal timeline. Your data stays yours, and you choose what to keep private or share.
Go dockerfossgomarkdownmemomicroblognote-takingnotesopen-sourceown-your-datareactself-hostedsqlitetimeline
chore: fix creator id format
johnnyjoydb63b1949a96
diff --git a/proto/api/v1/memo_service.proto b/proto/api/v1/memo_service.protoindex da23c37f2..802bdeca3 100644--- a/proto/api/v1/memo_service.proto+++ b/proto/api/v1/memo_service.proto@@ -289,15 +289,15 @@ message ListMemosRequest {// Optional. The order to sort results by.// Default to "display_time desc".// Example: "display_time desc" or "create_time asc"- string order_by = 5 [(google.api.field_behavior) = OPTIONAL];+ string order_by = 4 [(google.api.field_behavior) = OPTIONAL];// Optional. Filter to apply to the list results.// Filter is a CEL expression to filter memos.// Refer to `Shortcut.filter`.- string filter = 6 [(google.api.field_behavior) = OPTIONAL];+ string filter = 5 [(google.api.field_behavior) = OPTIONAL];// Optional. If true, show deleted memos in the response.- bool show_deleted = 7 [(google.api.field_behavior) = OPTIONAL];+ bool show_deleted = 6 [(google.api.field_behavior) = OPTIONAL];}message ListMemosResponse {diff --git a/proto/gen/api/v1/memo_service.pb.go b/proto/gen/api/v1/memo_service.pb.goindex f993ed8cd..0e4673622 100644--- a/proto/gen/api/v1/memo_service.pb.go+++ b/proto/gen/api/v1/memo_service.pb.go@@ -565,13 +565,13 @@ type ListMemosRequest struct {// Optional. The order to sort results by.// Default to "display_time desc".// Example: "display_time desc" or "create_time asc"- OrderBy string `protobuf:"bytes,5,opt,name=order_by,json=orderBy,proto3" json:"order_by,omitempty"`+ OrderBy string `protobuf:"bytes,4,opt,name=order_by,json=orderBy,proto3" json:"order_by,omitempty"`// Optional. Filter to apply to the list results.// Filter is a CEL expression to filter memos.// Refer to `Shortcut.filter`.- Filter string `protobuf:"bytes,6,opt,name=filter,proto3" json:"filter,omitempty"`+ Filter string `protobuf:"bytes,5,opt,name=filter,proto3" json:"filter,omitempty"`// Optional. If true, show deleted memos in the response.- ShowDeleted bool `protobuf:"varint,7,opt,name=show_deleted,json=showDeleted,proto3" json:"show_deleted,omitempty"`+ ShowDeleted bool `protobuf:"varint,6,opt,name=show_deleted,json=showDeleted,proto3" json:"show_deleted,omitempty"`unknownFields protoimpl.UnknownFieldssizeCache protoimpl.SizeCache}@@ -2059,9 +2059,9 @@ const file_api_v1_memo_service_proto_rawDesc = "" +"\n" +"page_token\x18\x02 \x01(\tB\x03\xe0A\x01R\tpageToken\x12.\n" +"\x05state\x18\x03 \x01(\x0e2\x13.memos.api.v1.StateB\x03\xe0A\x01R\x05state\x12\x1e\n" +- "\border_by\x18\x05 \x01(\tB\x03\xe0A\x01R\aorderBy\x12\x1b\n" +- "\x06filter\x18\x06 \x01(\tB\x03\xe0A\x01R\x06filter\x12&\n" +- "\fshow_deleted\x18\a \x01(\bB\x03\xe0A\x01R\vshowDeleted\"\x84\x01\n" ++ "\border_by\x18\x04 \x01(\tB\x03\xe0A\x01R\aorderBy\x12\x1b\n" ++ "\x06filter\x18\x05 \x01(\tB\x03\xe0A\x01R\x06filter\x12&\n" ++ "\fshow_deleted\x18\x06 \x01(\bB\x03\xe0A\x01R\vshowDeleted\"\x84\x01\n" +"\x11ListMemosResponse\x12(\n" +"\x05memos\x18\x01 \x03(\v2\x12.memos.api.v1.MemoR\x05memos\x12&\n" +"\x0fnext_page_token\x18\x02 \x01(\tR\rnextPageToken\x12\x1d\n" +diff --git a/proto/gen/openapi.yaml b/proto/gen/openapi.yamlindex 39650df2f..58113f888 100644--- a/proto/gen/openapi.yaml+++ b/proto/gen/openapi.yaml@@ -624,26 +624,18 @@ paths:parameters:- name: pageSizein: query- description: |-- Optional. The maximum number of memos to return.- The service may return fewer than this value.- If unspecified, at most 50 memos will be returned.- The maximum value is 1000; values above 1000 will be coerced to 1000.+ description: "Optional. The maximum number of memos to return.\r\n The service may return fewer than this value.\r\n If unspecified, at most 50 memos will be returned.\r\n The maximum value is 1000; values above 1000 will be coerced to 1000."schema:type: integerformat: int32- name: pageTokenin: query- description: |-- Optional. A page token, received from a previous `ListMemos` call.- Provide this to retrieve the subsequent page.+ description: "Optional. A page token, received from a previous `ListMemos` call.\r\n Provide this to retrieve the subsequent page."schema:type: string- name: statein: query- description: |-- Optional. The state of the memos to list.- Default to `NORMAL`. Set to `ARCHIVED` to list archived memos.+ description: "Optional. The state of the memos to list.\r\n Default to `NORMAL`. Set to `ARCHIVED` to list archived memos."schema:enum:- STATE_UNSPECIFIED@@ -653,18 +645,12 @@ paths:format: enum- name: orderByin: query- description: |-- Optional. The order to sort results by.- Default to "display_time desc".- Example: "display_time desc" or "create_time asc"+ description: "Optional. The order to sort results by.\r\n Default to \"display_time desc\".\r\n Example: \"display_time desc\" or \"create_time asc\""schema:type: string- name: filterin: query- description: |-- Optional. Filter to apply to the list results.- Filter is a CEL expression to filter memos.- Refer to `Shortcut.filter`.+ description: "Optional. Filter to apply to the list results.\r\n Filter is a CEL expression to filter memos.\r\n Refer to `Shortcut.filter`."schema:type: string- name: showDeleted@@ -693,9 +679,7 @@ paths:parameters:- name: memoIdin: query- description: |-- Optional. The memo ID to use for this memo.- If empty, a unique ID will be generated.+ description: "Optional. The memo ID to use for this memo.\r\n If empty, a unique ID will be generated."schema:type: string- name: validateOnly@@ -742,9 +726,7 @@ paths:type: string- name: readMaskin: query- description: |-- Optional. The fields to return in the response.- If not specified, all fields are returned.+ description: "Optional. The fields to return in the response.\r\n If not specified, all fields are returned."schema:type: stringformat: field-mask@@ -2795,9 +2777,7 @@ components:description: The list of memos.nextPageToken:type: string- description: |-- A token that can be sent as `page_token` to retrieve the next page.- If this field is omitted, there are no subsequent pages.+ description: "A token that can be sent as `page_token` to retrieve the next page.\r\n If this field is omitted, there are no subsequent pages."totalSize:type: integerdescription: The total count of memos (may be approximate).@@ -2909,9 +2889,7 @@ components:properties:name:type: string- description: |-- The resource name of the memo.- Format: memos/{memo}, memo is the user defined id or uuid.+ description: "The resource name of the memo.\r\n Format: memos/{memo}, memo is the user defined id or uuid."state:enum:- STATE_UNSPECIFIED@@ -2923,9 +2901,7 @@ components:creator:readOnly: truetype: string- description: |-- The name of the creator.- Format: users/{user}+ description: "The name of the creator.\r\n Format: users/{user}"createTime:readOnly: truetype: string@@ -2991,9 +2967,7 @@ components:parent:readOnly: truetype: string- description: |-- Output only. The name of the parent memo.- Format: memos/{memo}+ description: "Output only. The name of the parent memo.\r\n Format: memos/{memo}"snippet:readOnly: truetype: string@@ -3031,9 +3005,7 @@ components:properties:name:type: string- description: |-- The resource name of the memo.- Format: memos/{memo}+ description: "The resource name of the memo.\r\n Format: memos/{memo}"snippet:readOnly: truetype: string@@ -3219,21 +3191,14 @@ components:name:readOnly: truetype: string- description: |-- The resource name of the reaction.- Format: reactions/{reaction}+ description: "The resource name of the reaction.\r\n Format: reactions/{reaction}"creator:readOnly: truetype: string- description: |-- The resource name of the creator.- Format: users/{user}+ description: "The resource name of the creator.\r\n Format: users/{user}"contentId:type: string- description: |-- The resource name of the content.- For memo reactions, this should be the memo's resource name.- Format: memos/{memo}+ description: "The resource name of the content.\r\n For memo reactions, this should be the memo's resource name.\r\n Format: memos/{memo}"reactionType:type: stringdescription: "Required. The type of reaction (e.g., \"\U0001F44D\", \"❤️\", \"\U0001F604\")."@@ -3260,9 +3225,7 @@ components:properties:parent:type: string- description: |-- Required. The parent, who owns the tags.- Format: memos/{memo}. Use "memos/-" to rename all tags.+ description: "Required. The parent, who owns the tags.\r\n Format: memos/{memo}. Use \"memos/-\" to rename all tags."oldTag:type: stringdescription: Required. The old tag name to rename.@@ -3308,9 +3271,7 @@ components:properties:name:type: string- description: |-- Required. The resource name of the memo.- Format: memos/{memo}+ description: "Required. The resource name of the memo.\r\n Format: memos/{memo}"attachments:type: arrayitems:@@ -3324,9 +3285,7 @@ components:properties:name:type: string- description: |-- Required. The resource name of the memo.- Format: memos/{memo}+ description: "Required. The resource name of the memo.\r\n Format: memos/{memo}"relations:type: arrayitems:@@ -3466,9 +3425,7 @@ components:properties:name:type: string- description: |-- Required. The resource name of the memo.- Format: memos/{memo}+ description: "Required. The resource name of the memo.\r\n Format: memos/{memo}"reaction:allOf:- $ref: '#/components/schemas/Reaction'@@ -3712,9 +3669,7 @@ components:properties:theme:type: string- description: |-- theme is the name of the selected theme.- This references a CSS file in the web/public/themes/ directory.+ description: "theme is the name of the selected theme.\r\n This references a CSS file in the web/public/themes/ directory."disallowUserRegistration:type: booleandescription: disallow_user_registration disallows user registration.@@ -3733,10 +3688,7 @@ components:description: custom_profile is the custom profile.weekStartDayOffset:type: integer- description: |-- week_start_day_offset is the week start day offset from Sunday.- 0: Sunday, 1: Monday, 2: Tuesday, 3: Wednesday, 4: Thursday, 5: Friday, 6: Saturday- Default is Sunday.+ description: "week_start_day_offset is the week start day offset from Sunday.\r\n 0: Sunday, 1: Monday, 2: Tuesday, 3: Wednesday, 4: Thursday, 5: Friday, 6: Saturday\r\n Default is Sunday."format: int32disallowChangeUsername:type: boolean@@ -3787,9 +3739,7 @@ components:properties:owner:type: string- description: |-- The name of instance owner.- Format: users/{user}+ description: "The name of instance owner.\r\n Format: users/{user}"version:type: stringdescription: Version is the current version of instance.@@ -3805,9 +3755,7 @@ components:properties:name:type: string- description: |-- The name of the workspace setting.- Format: workspace/settings/{setting}+ description: "The name of the workspace setting.\r\n Format: workspace/settings/{setting}"generalSetting:$ref: '#/components/schemas/WorkspaceGeneralSetting'storageSetting:@@ -3829,9 +3777,7 @@ components:format: enumfilepathTemplate:type: string- description: |-- The template of file path.- e.g. assets/{timestamp}_{filename}+ description: "The template of file path.\r\n e.g. assets/{timestamp}_{filename}"uploadSizeLimitMb:type: stringdescription: The max upload size in megabytes.diff --git a/web/src/components/PagedMemoList/PagedMemoList.tsx b/web/src/components/PagedMemoList/PagedMemoList.tsxindex 4e3133267..c99023a66 100644--- a/web/src/components/PagedMemoList/PagedMemoList.tsx+++ b/web/src/components/PagedMemoList/PagedMemoList.tsx@@ -18,7 +18,6 @@ import MemoEditor from "../MemoEditor";interface Props {renderer: (memo: Memo) => JSX.Element;listSort?: (list: Memo[]) => Memo[];- owner?: string;state?: State;orderBy?: string;filter?: string;@@ -47,20 +46,10 @@ const PagedMemoList = observer((props: Props) => {setIsRequesting(true);try {- const filters = [];- if (props.owner) {- // Extract user ID from owner name (format: users/{user_id})- const userId = props.owner.replace("users/", "");- filters.push(`creator_id == ${userId}`);- }- if (props.filter) {- filters.push(props.filter);- }-const response = await memoStore.fetchMemos({state: props.state || State.NORMAL,orderBy: props.orderBy || "display_time desc",- filter: filters.length > 0 ? filters.join(" && ") : undefined,+ filter: props.filter,pageSize: props.pageSize || DEFAULT_LIST_MEMOS_PAGE_SIZE,pageToken,});@@ -110,7 +99,7 @@ const PagedMemoList = observer((props: Props) => {// Initial load and reload when props changeuseEffect(() => {refreshList();- }, [props.owner, props.state, props.orderBy, props.filter, props.pageSize]);+ }, [props.state, props.orderBy, props.filter, props.pageSize]);// Auto-fetch more content when list changes and page isn't fulluseEffect(() => {diff --git a/web/src/pages/Archived.tsx b/web/src/pages/Archived.tsxindex 7d8561a92..8a1515be2 100644--- a/web/src/pages/Archived.tsx+++ b/web/src/pages/Archived.tsx@@ -36,7 +36,6 @@ const Archived = observer(() => {: dayjs(b.displayTime).unix() - dayjs(a.displayTime).unix(),)}- owner={user.name}state={State.ARCHIVED}orderBy={viewStore.state.orderByTimeAsc ? "display_time asc" : "display_time desc"}filter={memoFitler}diff --git a/web/src/pages/Home.tsx b/web/src/pages/Home.tsxindex 89bb3724b..398255ae9 100644--- a/web/src/pages/Home.tsx+++ b/web/src/pages/Home.tsx@@ -23,7 +23,7 @@ const Home = observer(() => {const selectedShortcut = userStore.state.shortcuts.find((shortcut) => getShortcutId(shortcut.name) === memoFilterStore.shortcut);const memoFilter = useMemo(() => {- const conditions = [`creator_id == "${extractUserIdFromName(user.name)}"`];+ const conditions = [`creator_id == ${extractUserIdFromName(user.name)}`];if (selectedShortcut?.filter) {conditions.push(selectedShortcut.filter);}@@ -50,6 +50,7 @@ const Home = observer(() => {conditions.push(`${factor} >= ${timestampAfter} && ${factor} < ${timestampAfter + 60 * 60 * 24}`);}}+ console.log("conditions", conditions);return conditions.length > 0 ? conditions.join(" && ") : undefined;}, [memoFilterStore.filters, selectedShortcut?.filter]);@@ -66,7 +67,6 @@ const Home = observer(() => {: dayjs(b.displayTime).unix() - dayjs(a.displayTime).unix(),)}- owner={user.name}orderBy={viewStore.state.orderByTimeAsc ? "display_time asc" : "display_time desc"}filter={memoFilter}/>diff --git a/web/src/pages/UserProfile.tsx b/web/src/pages/UserProfile.tsxindex f7fd3d3f2..8e0528fe1 100644--- a/web/src/pages/UserProfile.tsx+++ b/web/src/pages/UserProfile.tsx@@ -47,7 +47,7 @@ const UserProfile = observer(() => {return undefined;}- const conditions = [`creator_id == "${extractUserIdFromName(user.name)}"`];+ const conditions = [`creator_id == ${extractUserIdFromName(user.name)}`];for (const filter of memoFilterStore.filters) {if (filter.factor === "contentSearch") {conditions.push(`content.contains("${filter.value}")`);@@ -101,7 +101,6 @@ const UserProfile = observer(() => {: dayjs(b.displayTime).unix() - dayjs(a.displayTime).unix(),)}- owner={user.name}orderBy={viewStore.state.orderByTimeAsc ? "display_time asc" : "display_time desc"}filter={memoFilter}/>diff --git a/web/src/types/proto/api/v1/memo_service.ts b/web/src/types/proto/api/v1/memo_service.tsindex d7ba52963..3579997b5 100644--- a/web/src/types/proto/api/v1/memo_service.ts+++ b/web/src/types/proto/api/v1/memo_service.ts@@ -1099,13 +1099,13 @@ export const ListMemosRequest: MessageFns<ListMemosRequest> = {writer.uint32(24).int32(stateToNumber(message.state));}if (message.orderBy !== "") {- writer.uint32(42).string(message.orderBy);+ writer.uint32(34).string(message.orderBy);}if (message.filter !== "") {- writer.uint32(50).string(message.filter);+ writer.uint32(42).string(message.filter);}if (message.showDeleted !== false) {- writer.uint32(56).bool(message.showDeleted);+ writer.uint32(48).bool(message.showDeleted);}return writer;},@@ -1141,24 +1141,24 @@ export const ListMemosRequest: MessageFns<ListMemosRequest> = {message.state = stateFromJSON(reader.int32());continue;}- case 5: {- if (tag !== 42) {+ case 4: {+ if (tag !== 34) {break;}message.orderBy = reader.string();continue;}- case 6: {- if (tag !== 50) {+ case 5: {+ if (tag !== 42) {break;}message.filter = reader.string();continue;}- case 7: {- if (tag !== 56) {+ case 6: {+ if (tag !== 48) {break;}diff --git a/web/src/types/proto/google/protobuf/descriptor.ts b/web/src/types/proto/google/protobuf/descriptor.tsindex db1d2d4a3..9f55f0344 100644--- a/web/src/types/proto/google/protobuf/descriptor.ts+++ b/web/src/types/proto/google/protobuf/descriptor.ts@@ -35,7 +35,7 @@ export enum Edition {EDITION_2024 = "EDITION_2024",/*** EDITION_1_TEST_ONLY - Placeholder editions for testing feature resolution. These should not be- * used or relied on outside of tests.+ * used or relyed on outside of tests.*/EDITION_1_TEST_ONLY = "EDITION_1_TEST_ONLY",EDITION_2_TEST_ONLY = "EDITION_2_TEST_ONLY",@@ -128,52 +128,6 @@ export function editionToNumber(object: Edition): number {}}-/**- * Describes the 'visibility' of a symbol with respect to the proto import- * system. Symbols can only be imported when the visibility rules do not prevent- * it (ex: local symbols cannot be imported). Visibility modifiers can only set- * on `message` and `enum` as they are the only types available to be referenced- * from other files.- */-export enum SymbolVisibility {- VISIBILITY_UNSET = "VISIBILITY_UNSET",- VISIBILITY_LOCAL = "VISIBILITY_LOCAL",- VISIBILITY_EXPORT = "VISIBILITY_EXPORT",- UNRECOGNIZED = "UNRECOGNIZED",-}--export function symbolVisibilityFromJSON(object: any): SymbolVisibility {- switch (object) {- case 0:- case "VISIBILITY_UNSET":- return SymbolVisibility.VISIBILITY_UNSET;- case 1:- case "VISIBILITY_LOCAL":- return SymbolVisibility.VISIBILITY_LOCAL;- case 2:- case "VISIBILITY_EXPORT":- return SymbolVisibility.VISIBILITY_EXPORT;- case -1:- case "UNRECOGNIZED":- default:- return SymbolVisibility.UNRECOGNIZED;- }-}--export function symbolVisibilityToNumber(object: SymbolVisibility): number {- switch (object) {- case SymbolVisibility.VISIBILITY_UNSET:- return 0;- case SymbolVisibility.VISIBILITY_LOCAL:- return 1;- case SymbolVisibility.VISIBILITY_EXPORT:- return 2;- case SymbolVisibility.UNRECOGNIZED:- default:- return -1;- }-}-/*** The protocol compiler can output a FileDescriptorSet containing the .proto* files it parses.@@ -201,11 +155,6 @@ export interface FileDescriptorProto {* For Google-internal migration only. Do not use.*/weakDependency: number[];- /**- * Names of files imported by this file purely for the purpose of providing- * option extensions. These are excluded from the dependency list above.- */- optionDependency: string[];/** All top-level definitions in this file. */messageType: DescriptorProto[];enumType: EnumDescriptorProto[];@@ -228,19 +177,11 @@ export interface FileDescriptorProto {* The supported values are "proto2", "proto3", and "editions".** If `edition` is present, this value must be "editions".- * WARNING: This field should only be used by protobuf plugins or special- * cases like the proto compiler. Other uses are discouraged and- * developers should rely on the protoreflect APIs for their client language.*/syntax?:| string| undefined;- /**- * The edition of the proto file.- * WARNING: This field should only be used by protobuf plugins or special- * cases like the proto compiler. Other uses are discouraged and- * developers should rely on the protoreflect APIs for their client language.- */+ /** The edition of the proto file. */edition?: Edition | undefined;}@@ -260,8 +201,6 @@ export interface DescriptorProto {* A given name may only be reserved once.*/reservedName: string[];- /** Support for `export` and `local` keywords on enums. */- visibility?: SymbolVisibility | undefined;}export interface DescriptorProto_ExtensionRange {@@ -685,8 +624,6 @@ export interface EnumDescriptorProto {* be reserved once.*/reservedName: string[];- /** Support for `export` and `local` keywords on enums. */- visibility?: SymbolVisibility | undefined;}/**@@ -891,12 +828,7 @@ export interface FileOptions {rubyPackage?:| string| undefined;- /**- * Any features defined in the specific edition.- * WARNING: This field should only be used by protobuf plugins or special- * cases like the proto compiler. Other uses are discouraged and- * developers should rely on the protoreflect APIs for their client language.- */+ /** Any features defined in the specific edition. */features?:| FeatureSet| undefined;@@ -1034,12 +966,7 @@ export interface MessageOptions {deprecatedLegacyJsonFieldConflicts?:| boolean| undefined;- /**- * Any features defined in the specific edition.- * WARNING: This field should only be used by protobuf plugins or special- * cases like the proto compiler. Other uses are discouraged and- * developers should rely on the protoreflect APIs for their client language.- */+ /** Any features defined in the specific edition. */features?:| FeatureSet| undefined;@@ -1049,13 +976,12 @@ export interface MessageOptions {export interface FieldOptions {/**- * NOTE: ctype is deprecated. Use `features.(pb.cpp).string_type` instead.* 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.- * TODO: make ctype actually deprecated.+ * type "bytes" in the open source release -- sorry, we'll try to include+ * other types in a future version!*/ctype?:| FieldOptions_CType@@ -1144,12 +1070,7 @@ export interface FieldOptions {retention?: FieldOptions_OptionRetention | undefined;targets: FieldOptions_OptionTargetType[];editionDefaults: FieldOptions_EditionDefault[];- /**- * Any features defined in the specific edition.- * WARNING: This field should only be used by protobuf plugins or special- * cases like the proto compiler. Other uses are discouraged and- * developers should rely on the protoreflect APIs for their client language.- */+ /** Any features defined in the specific edition. */features?: FeatureSet | undefined;featureSupport?:| FieldOptions_FeatureSupport@@ -1248,7 +1169,11 @@ export function fieldOptions_JSTypeToNumber(object: FieldOptions_JSType): number}}-/** If set to RETENTION_SOURCE, the option will be omitted from the binary. */+/**+ * If set to RETENTION_SOURCE, the option will be omitted from the binary.+ * Note: as of January 2023, support for this is in progress and does not yet+ * have an effect (b/264593489).+ */export enum FieldOptions_OptionRetention {RETENTION_UNKNOWN = "RETENTION_UNKNOWN",RETENTION_RUNTIME = "RETENTION_RUNTIME",@@ -1291,7 +1216,8 @@ export function fieldOptions_OptionRetentionToNumber(object: FieldOptions_Option/*** This indicates the types of entities that the field may apply to when used* as an option. If it is unset, then the field may be freely used as an- * option on any kind of entity.+ * option on any kind of entity. Note: as of January 2023, support for this is+ * in progress and does not yet have an effect (b/264593489).*/export enum FieldOptions_OptionTargetType {TARGET_TYPE_UNKNOWN = "TARGET_TYPE_UNKNOWN",@@ -1415,12 +1341,7 @@ export interface FieldOptions_FeatureSupport {}export interface OneofOptions {- /**- * Any features defined in the specific edition.- * WARNING: This field should only be used by protobuf plugins or special- * cases like the proto compiler. Other uses are discouraged and- * developers should rely on the protoreflect APIs for their client language.- */+ /** Any features defined in the specific edition. */features?:| FeatureSet| undefined;@@ -1458,12 +1379,7 @@ export interface EnumOptions {deprecatedLegacyJsonFieldConflicts?:| boolean| undefined;- /**- * Any features defined in the specific edition.- * WARNING: This field should only be used by protobuf plugins or special- * cases like the proto compiler. Other uses are discouraged and- * developers should rely on the protoreflect APIs for their client language.- */+ /** Any features defined in the specific edition. */features?:| FeatureSet| undefined;@@ -1481,12 +1397,7 @@ export interface EnumValueOptions {deprecated?:| boolean| undefined;- /**- * Any features defined in the specific edition.- * WARNING: This field should only be used by protobuf plugins or special- * cases like the proto compiler. Other uses are discouraged and- * developers should rely on the protoreflect APIs for their client language.- */+ /** Any features defined in the specific edition. */features?:| FeatureSet| undefined;@@ -1507,12 +1418,7 @@ export interface EnumValueOptions {}export interface ServiceOptions {- /**- * Any features defined in the specific edition.- * WARNING: This field should only be used by protobuf plugins or special- * cases like the proto compiler. Other uses are discouraged and- * developers should rely on the protoreflect APIs for their client language.- */+ /** Any features defined in the specific edition. */features?:| FeatureSet| undefined;@@ -1540,12 +1446,7 @@ export interface MethodOptions {idempotencyLevel?:| MethodOptions_IdempotencyLevel| undefined;- /**- * Any features defined in the specific edition.- * WARNING: This field should only be used by protobuf plugins or special- * cases like the proto compiler. Other uses are discouraged and- * developers should rely on the protoreflect APIs for their client language.- */+ /** Any features defined in the specific edition. */features?:| FeatureSet| undefined;@@ -1648,8 +1549,6 @@ export interface FeatureSet {utf8Validation?: FeatureSet_Utf8Validation | undefined;messageEncoding?: FeatureSet_MessageEncoding | undefined;jsonFormat?: FeatureSet_JsonFormat | undefined;- enforceNamingStyle?: FeatureSet_EnforceNamingStyle | undefined;- defaultSymbolVisibility?: FeatureSet_VisibilityFeature_DefaultSymbolVisibility | undefined;}export enum FeatureSet_FieldPresence {@@ -1892,111 +1791,6 @@ export function featureSet_JsonFormatToNumber(object: FeatureSet_JsonFormat): nu}}-export enum FeatureSet_EnforceNamingStyle {- ENFORCE_NAMING_STYLE_UNKNOWN = "ENFORCE_NAMING_STYLE_UNKNOWN",- STYLE2024 = "STYLE2024",- STYLE_LEGACY = "STYLE_LEGACY",- UNRECOGNIZED = "UNRECOGNIZED",-}--export function featureSet_EnforceNamingStyleFromJSON(object: any): FeatureSet_EnforceNamingStyle {- switch (object) {- case 0:- case "ENFORCE_NAMING_STYLE_UNKNOWN":- return FeatureSet_EnforceNamingStyle.ENFORCE_NAMING_STYLE_UNKNOWN;- case 1:- case "STYLE2024":- return FeatureSet_EnforceNamingStyle.STYLE2024;- case 2:- case "STYLE_LEGACY":- return FeatureSet_EnforceNamingStyle.STYLE_LEGACY;- case -1:- case "UNRECOGNIZED":- default:- return FeatureSet_EnforceNamingStyle.UNRECOGNIZED;- }-}--export function featureSet_EnforceNamingStyleToNumber(object: FeatureSet_EnforceNamingStyle): number {- switch (object) {- case FeatureSet_EnforceNamingStyle.ENFORCE_NAMING_STYLE_UNKNOWN:- return 0;- case FeatureSet_EnforceNamingStyle.STYLE2024:- return 1;- case FeatureSet_EnforceNamingStyle.STYLE_LEGACY:- return 2;- case FeatureSet_EnforceNamingStyle.UNRECOGNIZED:- default:- return -1;- }-}--export interface FeatureSet_VisibilityFeature {-}--export enum FeatureSet_VisibilityFeature_DefaultSymbolVisibility {- DEFAULT_SYMBOL_VISIBILITY_UNKNOWN = "DEFAULT_SYMBOL_VISIBILITY_UNKNOWN",- /** EXPORT_ALL - Default pre-EDITION_2024, all UNSET visibility are export. */- EXPORT_ALL = "EXPORT_ALL",- /** EXPORT_TOP_LEVEL - All top-level symbols default to export, nested default to local. */- EXPORT_TOP_LEVEL = "EXPORT_TOP_LEVEL",- /** LOCAL_ALL - All symbols default to local. */- LOCAL_ALL = "LOCAL_ALL",- /**- * STRICT - All symbols local by default. Nested types cannot be exported.- * With special case caveat for message { enum {} reserved 1 to max; }- * This is the recommended setting for new protos.- */- STRICT = "STRICT",- UNRECOGNIZED = "UNRECOGNIZED",-}--export function featureSet_VisibilityFeature_DefaultSymbolVisibilityFromJSON(- object: any,-): FeatureSet_VisibilityFeature_DefaultSymbolVisibility {- switch (object) {- case 0:- case "DEFAULT_SYMBOL_VISIBILITY_UNKNOWN":- return FeatureSet_VisibilityFeature_DefaultSymbolVisibility.DEFAULT_SYMBOL_VISIBILITY_UNKNOWN;- case 1:- case "EXPORT_ALL":- return FeatureSet_VisibilityFeature_DefaultSymbolVisibility.EXPORT_ALL;- case 2:- case "EXPORT_TOP_LEVEL":- return FeatureSet_VisibilityFeature_DefaultSymbolVisibility.EXPORT_TOP_LEVEL;- case 3:- case "LOCAL_ALL":- return FeatureSet_VisibilityFeature_DefaultSymbolVisibility.LOCAL_ALL;- case 4:- case "STRICT":- return FeatureSet_VisibilityFeature_DefaultSymbolVisibility.STRICT;- case -1:- case "UNRECOGNIZED":- default:- return FeatureSet_VisibilityFeature_DefaultSymbolVisibility.UNRECOGNIZED;- }-}--export function featureSet_VisibilityFeature_DefaultSymbolVisibilityToNumber(- object: FeatureSet_VisibilityFeature_DefaultSymbolVisibility,-): number {- switch (object) {- case FeatureSet_VisibilityFeature_DefaultSymbolVisibility.DEFAULT_SYMBOL_VISIBILITY_UNKNOWN:- return 0;- case FeatureSet_VisibilityFeature_DefaultSymbolVisibility.EXPORT_ALL:- return 1;- case FeatureSet_VisibilityFeature_DefaultSymbolVisibility.EXPORT_TOP_LEVEL:- return 2;- case FeatureSet_VisibilityFeature_DefaultSymbolVisibility.LOCAL_ALL:- return 3;- case FeatureSet_VisibilityFeature_DefaultSymbolVisibility.STRICT:- return 4;- case FeatureSet_VisibilityFeature_DefaultSymbolVisibility.UNRECOGNIZED:- default:- return -1;- }-}-/*** A compiled specification for the defaults of a set of features. These* messages are generated from FeatureSet extensions and can be used to seed@@ -2317,7 +2111,6 @@ function createBaseFileDescriptorProto(): FileDescriptorProto {dependency: [],publicDependency: [],weakDependency: [],- optionDependency: [],messageType: [],enumType: [],service: [],@@ -2350,9 +2143,6 @@ export const FileDescriptorProto: MessageFns<FileDescriptorProto> = {writer.int32(v);}writer.join();- for (const v of message.optionDependency) {- writer.uint32(122).string(v!);- }for (const v of message.messageType) {DescriptorProto.encode(v!, writer.uint32(34).fork()).join();}@@ -2447,14 +2237,6 @@ export const FileDescriptorProto: MessageFns<FileDescriptorProto> = {break;}- case 15: {- if (tag !== 122) {- break;- }-- message.optionDependency.push(reader.string());- continue;- }case 4: {if (tag !== 34) {break;@@ -2538,7 +2320,6 @@ export const FileDescriptorProto: MessageFns<FileDescriptorProto> = {message.dependency = object.dependency?.map((e) => e) || [];message.publicDependency = object.publicDependency?.map((e) => e) || [];message.weakDependency = object.weakDependency?.map((e) => e) || [];- message.optionDependency = object.optionDependency?.map((e) => e) || [];message.messageType = object.messageType?.map((e) => DescriptorProto.fromPartial(e)) || [];message.enumType = object.enumType?.map((e) => EnumDescriptorProto.fromPartial(e)) || [];message.service = object.service?.map((e) => ServiceDescriptorProto.fromPartial(e)) || [];@@ -2567,7 +2348,6 @@ function createBaseDescriptorProto(): DescriptorProto {options: undefined,reservedRange: [],reservedName: [],- visibility: SymbolVisibility.VISIBILITY_UNSET,};}@@ -2603,9 +2383,6 @@ export const DescriptorProto: MessageFns<DescriptorProto> = {for (const v of message.reservedName) {writer.uint32(82).string(v!);}- if (message.visibility !== undefined && message.visibility !== SymbolVisibility.VISIBILITY_UNSET) {- writer.uint32(88).int32(symbolVisibilityToNumber(message.visibility));- }return writer;},@@ -2696,14 +2473,6 @@ export const DescriptorProto: MessageFns<DescriptorProto> = {message.reservedName.push(reader.string());continue;}- case 11: {- if (tag !== 88) {- break;- }-- message.visibility = symbolVisibilityFromJSON(reader.int32());- continue;- }}if ((tag & 7) === 4 || tag === 0) {break;@@ -2730,7 +2499,6 @@ export const DescriptorProto: MessageFns<DescriptorProto> = {: undefined;message.reservedRange = object.reservedRange?.map((e) => DescriptorProto_ReservedRange.fromPartial(e)) || [];message.reservedName = object.reservedName?.map((e) => e) || [];- message.visibility = object.visibility ?? SymbolVisibility.VISIBILITY_UNSET;return message;},};@@ -3291,14 +3059,7 @@ export const OneofDescriptorProto: MessageFns<OneofDescriptorProto> = {};function createBaseEnumDescriptorProto(): EnumDescriptorProto {- return {- name: "",- value: [],- options: undefined,- reservedRange: [],- reservedName: [],- visibility: SymbolVisibility.VISIBILITY_UNSET,- };+ return { name: "", value: [], options: undefined, reservedRange: [], reservedName: [] };}export const EnumDescriptorProto: MessageFns<EnumDescriptorProto> = {@@ -3318,9 +3079,6 @@ export const EnumDescriptorProto: MessageFns<EnumDescriptorProto> = {for (const v of message.reservedName) {writer.uint32(42).string(v!);}- if (message.visibility !== undefined && message.visibility !== SymbolVisibility.VISIBILITY_UNSET) {- writer.uint32(48).int32(symbolVisibilityToNumber(message.visibility));- }return writer;},@@ -3371,14 +3129,6 @@ export const EnumDescriptorProto: MessageFns<EnumDescriptorProto> = {message.reservedName.push(reader.string());continue;}- case 6: {- if (tag !== 48) {- break;- }-- message.visibility = symbolVisibilityFromJSON(reader.int32());- continue;- }}if ((tag & 7) === 4 || tag === 0) {break;@@ -3401,7 +3151,6 @@ export const EnumDescriptorProto: MessageFns<EnumDescriptorProto> = {message.reservedRange = object.reservedRange?.map((e) => EnumDescriptorProto_EnumReservedRange.fromPartial(e)) ||[];message.reservedName = object.reservedName?.map((e) => e) || [];- message.visibility = object.visibility ?? SymbolVisibility.VISIBILITY_UNSET;return message;},};@@ -5165,8 +4914,6 @@ function createBaseFeatureSet(): FeatureSet {utf8Validation: FeatureSet_Utf8Validation.UTF8_VALIDATION_UNKNOWN,messageEncoding: FeatureSet_MessageEncoding.MESSAGE_ENCODING_UNKNOWN,jsonFormat: FeatureSet_JsonFormat.JSON_FORMAT_UNKNOWN,- enforceNamingStyle: FeatureSet_EnforceNamingStyle.ENFORCE_NAMING_STYLE_UNKNOWN,- defaultSymbolVisibility: FeatureSet_VisibilityFeature_DefaultSymbolVisibility.DEFAULT_SYMBOL_VISIBILITY_UNKNOWN,};}@@ -5201,21 +4948,6 @@ export const FeatureSet: MessageFns<FeatureSet> = {if (message.jsonFormat !== undefined && message.jsonFormat !== FeatureSet_JsonFormat.JSON_FORMAT_UNKNOWN) {writer.uint32(48).int32(featureSet_JsonFormatToNumber(message.jsonFormat));}- if (- message.enforceNamingStyle !== undefined &&- message.enforceNamingStyle !== FeatureSet_EnforceNamingStyle.ENFORCE_NAMING_STYLE_UNKNOWN- ) {- writer.uint32(56).int32(featureSet_EnforceNamingStyleToNumber(message.enforceNamingStyle));- }- if (- message.defaultSymbolVisibility !== undefined &&- message.defaultSymbolVisibility !==- FeatureSet_VisibilityFeature_DefaultSymbolVisibility.DEFAULT_SYMBOL_VISIBILITY_UNKNOWN- ) {- writer.uint32(64).int32(- featureSet_VisibilityFeature_DefaultSymbolVisibilityToNumber(message.defaultSymbolVisibility),- );- }return writer;},@@ -5274,24 +5006,6 @@ export const FeatureSet: MessageFns<FeatureSet> = {message.jsonFormat = featureSet_JsonFormatFromJSON(reader.int32());continue;}- case 7: {- if (tag !== 56) {- break;- }-- message.enforceNamingStyle = featureSet_EnforceNamingStyleFromJSON(reader.int32());- continue;- }- case 8: {- if (tag !== 64) {- break;- }-- message.defaultSymbolVisibility = featureSet_VisibilityFeature_DefaultSymbolVisibilityFromJSON(- reader.int32(),- );- continue;- }}if ((tag & 7) === 4 || tag === 0) {break;@@ -5313,44 +5027,6 @@ export const FeatureSet: MessageFns<FeatureSet> = {message.utf8Validation = object.utf8Validation ?? FeatureSet_Utf8Validation.UTF8_VALIDATION_UNKNOWN;message.messageEncoding = object.messageEncoding ?? FeatureSet_MessageEncoding.MESSAGE_ENCODING_UNKNOWN;message.jsonFormat = object.jsonFormat ?? FeatureSet_JsonFormat.JSON_FORMAT_UNKNOWN;- message.enforceNamingStyle = object.enforceNamingStyle ??- FeatureSet_EnforceNamingStyle.ENFORCE_NAMING_STYLE_UNKNOWN;- message.defaultSymbolVisibility = object.defaultSymbolVisibility ??- FeatureSet_VisibilityFeature_DefaultSymbolVisibility.DEFAULT_SYMBOL_VISIBILITY_UNKNOWN;- return message;- },-};--function createBaseFeatureSet_VisibilityFeature(): FeatureSet_VisibilityFeature {- return {};-}--export const FeatureSet_VisibilityFeature: MessageFns<FeatureSet_VisibilityFeature> = {- encode(_: FeatureSet_VisibilityFeature, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {- return writer;- },-- decode(input: BinaryReader | Uint8Array, length?: number): FeatureSet_VisibilityFeature {- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);- let end = length === undefined ? reader.len : reader.pos + length;- const message = createBaseFeatureSet_VisibilityFeature();- while (reader.pos < end) {- const tag = reader.uint32();- switch (tag >>> 3) {- }- if ((tag & 7) === 4 || tag === 0) {- break;- }- reader.skip(tag & 7);- }- return message;- },-- create(base?: DeepPartial<FeatureSet_VisibilityFeature>): FeatureSet_VisibilityFeature {- return FeatureSet_VisibilityFeature.fromPartial(base ?? {});- },- fromPartial(_: DeepPartial<FeatureSet_VisibilityFeature>): FeatureSet_VisibilityFeature {- const message = createBaseFeatureSet_VisibilityFeature();return message;},};