diff --git a/Makefile b/Makefile index 45ad9b5a1..654aa3301 100644 --- a/Makefile +++ b/Makefile @@ -159,6 +159,7 @@ perf: $(BUILD)/protobuf-test .PHONY: bootstrap bootstrap: $(BUILD)/upstream-protobuf $(BUILD)/protoc-gen-es node_modules ## Bootstrap well-known types and edition features-set defaults in @bufbuild/protobuf from upstream protobuf npm run -w packages/protobuf bootstrap:wkt + npm run -w packages/protobuf bootstrap:wktv2 npm run -w packages/protobuf bootstrap:featureset-defaults .PHONY: setversion diff --git a/package-lock.json b/package-lock.json index fbfe89288..0d5b2caf3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7639,7 +7639,8 @@ "@bufbuild/protoplugin": "1.7.2" }, "bin": { - "protoc-gen-es": "bin/protoc-gen-es" + "protoc-gen-es": "bin/protoc-gen-es", + "protoc-gen-es-next": "bin/protoc-gen-es-next" }, "engines": { "node": ">=14" diff --git a/packages/protobuf-test/extra/jstype.proto b/packages/protobuf-test/extra/jstype.proto index 5eae62f86..f1a4baff8 100644 --- a/packages/protobuf-test/extra/jstype.proto +++ b/packages/protobuf-test/extra/jstype.proto @@ -15,6 +15,9 @@ syntax = "proto3"; package spec; +// See proto2.proto and proto2.proto - extend them to all relevant scalar types if necessary +option deprecated = true; + message JSTypeOmittedMessage { fixed64 fixed64_field = 1; int64 int64_field = 3; diff --git a/packages/protobuf-test/extra/proto2.proto b/packages/protobuf-test/extra/proto2.proto index f6d4ac69a..5c1a43bd1 100644 --- a/packages/protobuf-test/extra/proto2.proto +++ b/packages/protobuf-test/extra/proto2.proto @@ -14,28 +14,185 @@ syntax = "proto2"; package spec; - option go_package = "github.com/bufbuild/protobuf-es"; +import "google/protobuf/wrappers.proto"; + +message Proto2Message { + required string required_string_field = 1; + required bytes required_bytes_field = 2; + required int32 required_int32_field = 3; + required int64 required_int64_field = 4; + required int64 required_int64_js_number_field = 103 [jstype=JS_NUMBER]; + required int64 required_int64_js_string_field = 102 [jstype=JS_STRING]; + required float required_float_field = 5; + required bool required_bool_field = 6; + required Proto2Enum required_enum_field = 7; + required Proto2Message required_message_field = 8; + required group RequiredGroup = 9 { + optional int32 int32_field = 1; + } + required google.protobuf.UInt32Value required_wrapped_uint32_field = 201; + + required string required_default_string_field = 10 [default = "hello \" */ "]; + required bytes required_default_bytes_field = 11 [default = "\0x\\x\"x\'A\101\x41\x41\u0041\U00000041\b\f\n\r\t\v"]; + required int32 required_default_int32_field = 12 [default = 128]; + required int64 required_default_int64_field = 13 [default = -256]; + required int64 required_default_int64_js_number_field = 110 [default = -256, jstype = JS_NUMBER]; + required int64 required_default_int64_js_string_field = 113 [default = -256, jstype = JS_STRING]; + required float required_default_float_field = 14 [default = -512.13]; + required bool required_default_bool_field = 15 [default = true]; + required Proto2Enum required_default_enum_field = 16 [default = PROTO2_ENUM_YES]; + required Proto2Message required_default_message_field = 17; + required group RequiredDefaultGroup = 18 { + optional int32 int32_field = 1; + } + required google.protobuf.UInt32Value required_default_wrapped_uint32_field = 202; + + optional string optional_string_field = 19; + optional bytes optional_bytes_field = 20; + optional int32 optional_int32_field = 21; + optional int64 optional_int64_field = 22; + optional int64 optional_int64_js_number_field = 106 [jstype=JS_NUMBER]; + optional int64 optional_int64_js_string_field = 105 [jstype=JS_STRING]; + optional float optional_float_field = 23; + optional bool optional_bool_field = 24; + optional Proto2Enum optional_enum_field = 25; + optional Proto2Message optional_message_field = 26; + optional group OptionalGroup = 27 { + optional int32 int32_field = 1; + } + required google.protobuf.UInt32Value optional_wrapped_uint32_field = 207; + + required string optional_default_string_field = 28 [default = "hello \" */ "]; + required bytes optional_default_bytes_field = 29 [default = "\0x\\x\"x\'A\101\x41\x41\u0041\U00000041\b\f\n\r\t\v"]; + required int32 optional_default_int32_field = 30 [default = 128]; + required int64 optional_default_int64_field = 31 [default = -256]; + optional int64 optional_default_int64_js_number_field = 120 [default = -256, jstype = JS_NUMBER]; + optional int64 optional_default_int64_js_string_field = 121 [default = -256, jstype = JS_STRING]; + required float optional_default_float_field = 32 [default = -512.13]; + required bool optional_default_bool_field = 33 [default = true]; + required Proto2Enum optional_default_enum_field = 34 [default = PROTO2_ENUM_YES]; + optional Proto2Message optional_default_message_field = 35; + optional group OptionalDefaultGroup = 36 { + optional int32 int32_field = 1; + } + required google.protobuf.UInt32Value optional_default_wrapped_uint32_field = 203; + + repeated string repeated_string_field = 37; + repeated bytes repeated_bytes_field = 38; + repeated int32 repeated_int32_field = 39; + repeated int64 repeated_int64_field = 40; + repeated int64 repeated_int64_js_number_field = 109 [jstype=JS_NUMBER]; + repeated int64 repeated_int64_js_string_field = 108 [jstype=JS_STRING]; + repeated float repeated_float_field = 41; + repeated bool repeated_bool_field = 42; + repeated Proto2Enum repeated_enum_field = 43; + repeated Proto2Message repeated_message_field = 44; + repeated group RepeatedGroup = 45 { + optional int32 int32_field = 1; + } + repeated google.protobuf.UInt32Value repeated_wrapped_uint32_field = 204; + + repeated double packed_double_field = 46 [packed = true]; + repeated uint32 packed_uint32_field = 47 [packed = true]; + repeated uint64 packed_uint64_field = 48 [packed = true]; + + repeated double unpacked_double_field = 49 [packed = false]; + repeated uint32 unpacked_uint32_field = 50 [packed = false]; + repeated uint64 unpacked_uint64_field = 51 [packed = false]; + + oneof either { + string oneof_string_field = 52; + bytes oneof_bytes_field = 53; + int32 oneof_int32_field = 54; + int64 oneof_int64_field = 55; + int64 oneof_int64_js_number_field = 112 [jstype=JS_NUMBER]; + int64 oneof_int64_js_string_field = 111 [jstype=JS_STRING]; + float oneof_float_field = 56; + bool oneof_bool_field = 57; + Proto2Enum oneof_enum_field = 58; + Proto2Message oneof_message_field = 59; + group OneofGroup = 60 { + optional int32 int32_field = 1; + } + google.protobuf.UInt32Value oneof_wrapped_uint32_field = 205; + } + map map_string_string_field = 70; + map map_int32_int32_field = 71; + map map_bool_bool_field = 72; + map map_int64_int64_field = 73; + map map_int32_enum_field = 74; + map map_int32_message_field = 75; + map map_int32_wrapped_uint32_field = 209; +} + +enum Proto2Enum { + PROTO2_ENUM_YES = 1; + PROTO2_ENUM_NO = 2; +} + +// First enum value must be 0 when used as map value type +enum Proto2EnumWithZero { + PROTO2_ENUM_WITH_ZERO_ZERO = 0; + PROTO2_ENUM_WITH_ZERO_ONE = 1; +} + + +message Proto2RepeatedMessage { + option deprecated = true; + repeated string string_field = 1; + repeated bytes bytes_field = 2; + repeated int32 int32_field = 3; + repeated int64 int64_field = 4; + repeated float float_field = 5; + repeated bool bool_field = 6; + repeated Proto2Enum enum_field = 7; + repeated Proto2ChildMessage message_field = 8; + repeated group RepeatedGroup = 9 { + optional int32 int32_field = 1; + } +} + +message Proto2OneofMessage { + option deprecated = true; + oneof some { + string string_field = 1; + bytes bytes_field = 2; + int32 int32_field = 3; + int64 int64_field = 4; + float float_field = 5; + bool bool_field = 6; + Proto2Enum enum_field = 7; + Proto2ChildMessage message_field = 8; + group RepeatedGroup = 9 { + optional int32 int32_field = 1; + } + } +} message Proto2PackedMessage { + option deprecated = true; repeated double packed_double_field = 101 [packed = true]; repeated uint32 packed_uint32_field = 102 [packed = true]; repeated uint64 packed_uint64_field = 103 [packed = true]; } message Proto2UnpackedMessage { + option deprecated = true; repeated double unpacked_double_field = 201 [packed = false]; repeated uint32 unpacked_uint32_field = 202 [packed = false]; repeated uint64 unpacked_uint64_field = 203 [packed = false]; } message Proto2UnspecifiedPackedMessage { + option deprecated = true; repeated double double_field = 1; repeated uint32 uint32_field = 2; repeated uint64 uint64_field = 3; } message Proto2OptionalMessage { + option deprecated = true; optional string string_field = 1; optional bytes bytes_field = 2; optional int32 int32_field = 3; @@ -47,6 +204,7 @@ message Proto2OptionalMessage { } message Proto2RequiredMessage { + option deprecated = true; required string string_field = 1; required bytes bytes_field = 2; required int32 int32_field = 3; @@ -58,6 +216,7 @@ message Proto2RequiredMessage { } message Proto2RequiredDefaultsMessage { + option deprecated = true; required string string_field = 1 [default = "hello \" */ "]; required bytes bytes_field = 2 [default = "\0x\\x\"x\'A\101\x41\x41\u0041\U00000041\b\f\n\r\t\v"]; required int32 int32_field = 3 [default = 128]; @@ -69,6 +228,7 @@ message Proto2RequiredDefaultsMessage { } message Proto2DefaultsMessage { + option deprecated = true; optional string string_field = 1 [default = "hello \" */ "]; optional bytes bytes_field = 2 [default = "\0x\\x\"x\'A\101\x41\x41\u0041\U00000041\b\f\n\r\t\v"]; optional int32 int32_field = 3 [default = 128]; @@ -79,16 +239,13 @@ message Proto2DefaultsMessage { optional Proto2ChildMessage message_field = 8; } -enum Proto2Enum { - PROTO2_ENUM_YES = 1; - PROTO2_ENUM_NO = 2; -} - message Proto2ChildMessage { + option deprecated = true; optional string string_field = 1; } message Proto2GroupsMessage { + option deprecated = true; optional group Group = 1 { optional int32 int32_field = 1; optional group NestedGroup = 2 { @@ -96,10 +253,12 @@ message Proto2GroupsMessage { } } repeated group RepeatedGroup = 2 { + option deprecated = true; optional int32 int32_field = 1; } oneof oneof_with_group { group OneofGroup = 3 { + option deprecated = true; optional bool bool_field = 1; } } diff --git a/packages/protobuf-test/extra/proto3.proto b/packages/protobuf-test/extra/proto3.proto index 81ba94107..8d8fa4dac 100644 --- a/packages/protobuf-test/extra/proto3.proto +++ b/packages/protobuf-test/extra/proto3.proto @@ -14,28 +14,117 @@ syntax = "proto3"; package spec; - option go_package = "github.com/bufbuild/protobuf-es"; +import "google/protobuf/wrappers.proto"; + +message Proto3Message { + string singular_string_field = 1; + bytes singular_bytes_field = 2; + int32 singular_int32_field = 3; + int64 singular_int64_field = 4; + int64 singular_int64_js_number_field = 103 [jstype=JS_NUMBER]; + int64 singular_int64_js_string_field = 102 [jstype=JS_STRING]; + float singular_float_field = 5; + bool singular_bool_field = 6; + Proto3Enum singular_enum_field = 7; + Proto3Message singular_message_field = 8; + google.protobuf.UInt32Value singular_wrapped_uint32_field = 211; + + optional string optional_string_field = 9; + optional bytes optional_bytes_field = 10; + optional int32 optional_int32_field = 11; + optional int64 optional_int64_field = 12; + optional int64 optional_int64_js_number_field = 106 [jstype=JS_NUMBER]; + optional int64 optional_int64_js_string_field = 105 [jstype=JS_STRING]; + optional float optional_float_field = 13; + optional bool optional_bool_field = 14; + optional Proto3Enum optional_enum_field = 15; + optional Proto3Message optional_message_field = 16; + optional google.protobuf.UInt32Value optional_wrapped_uint32_field = 212; + + repeated string repeated_string_field = 17; + repeated bytes repeated_bytes_field = 18; + repeated int32 repeated_int32_field = 19; + repeated int64 repeated_int64_field = 20; + repeated int64 repeated_int64_js_number_field = 109 [jstype=JS_NUMBER]; + repeated int64 repeated_int64_js_string_field = 108 [jstype=JS_STRING]; + repeated float repeated_float_field = 21; + repeated bool repeated_bool_field = 22; + repeated Proto3Enum repeated_enum_field = 23; + repeated Proto3Message repeated_message_field = 24; + repeated google.protobuf.UInt32Value repeated_wrapped_uint32_field = 213; + + repeated double packed_double_field = 25 [packed = true]; + repeated uint32 packed_uint32_field = 26 [packed = true]; + repeated uint64 packed_uint64_field = 27 [packed = true]; + + repeated double unpacked_double_field = 28 [packed = false]; + repeated uint32 unpacked_uint32_field = 29 [packed = false]; + repeated uint64 unpacked_uint64_field = 30 [packed = false]; + + oneof either { + string oneof_string_field = 31; + bytes oneof_bytes_field = 32; + int32 oneof_int32_field = 33; + int64 oneof_int64_field = 34; + int64 oneof_int64_js_number_field = 112 [jstype=JS_NUMBER]; + int64 oneof_int64_js_string_field = 111 [jstype=JS_STRING]; + float oneof_float_field = 35; + bool oneof_bool_field = 36; + Proto3Enum oneof_enum_field = 37; + Proto3Message oneof_message_field = 38; + google.protobuf.UInt32Value oneof_wrapped_uint32_field = 204; + } + map map_string_string_field = 39; + map map_int32_int32_field = 40; + map map_bool_bool_field = 41; + map map_int64_int64_field = 42; + map map_int32_enum_field = 43; + map map_int32_message_field = 44; + map map_int32_wrapped_uint32_field = 205; +} + +enum Proto3Enum { + PROTO3_ENUM_UNSPECIFIED = 0; + PROTO3_ENUM_YES = 1; + PROTO3_ENUM_NO = 2; +} + +message Proto3RepeatedMessage { + option deprecated = true; + repeated string string_field = 1; + repeated bytes bytes_field = 2; + repeated int32 int32_field = 3; + repeated int64 int64_field = 4; + repeated float float_field = 5; + repeated bool bool_field = 6; + repeated Proto3Enum enum_field = 7; + repeated Proto3OptionalMessage message_field = 8; +} message Proto3PackedMessage { + option deprecated = true; repeated double packed_double_field = 101 [packed = true]; repeated uint32 packed_uint32_field = 102 [packed = true]; repeated uint64 packed_uint64_field = 103 [packed = true]; } message Proto3UnpackedMessage { + option deprecated = true; repeated double unpacked_double_field = 201 [packed = false]; repeated uint32 unpacked_uint32_field = 202 [packed = false]; repeated uint64 unpacked_uint64_field = 203 [packed = false]; } message Proto3UnspecifiedPackedMessage { + option deprecated = true; repeated double double_field = 1; repeated uint32 uint32_field = 2; repeated uint64 uint64_field = 3; } message Proto3UnlabelledMessage { + option deprecated = true; string string_field = 1; bytes bytes_field = 2; int32 int32_field = 3; @@ -47,6 +136,7 @@ message Proto3UnlabelledMessage { } message Proto3OptionalMessage { + option deprecated = true; optional string string_field = 1; optional bytes bytes_field = 2; optional int32 int32_field = 3; @@ -56,9 +146,3 @@ message Proto3OptionalMessage { optional Proto3Enum enum_field = 7; optional Proto3OptionalMessage message_field = 8; } - -enum Proto3Enum { - PROTO3_ENUM_UNSPECIFIED = 0; - PROTO3_ENUM_YES = 1; - PROTO3_ENUM_NO = 2; -} diff --git a/packages/protobuf-test/extra/wkt-wrappers.proto b/packages/protobuf-test/extra/wkt-wrappers.proto index f39e26345..b5d58f41b 100644 --- a/packages/protobuf-test/extra/wkt-wrappers.proto +++ b/packages/protobuf-test/extra/wkt-wrappers.proto @@ -17,6 +17,9 @@ package spec; import "google/protobuf/wrappers.proto"; +// See proto2.proto and proto2.proto - extend them to all wrapper types if necessary +option deprecated = true; + message WrappersMessage { google.protobuf.DoubleValue double_value_field = 1; google.protobuf.BoolValue bool_value_field = 2; diff --git a/packages/protobuf-test/package.json b/packages/protobuf-test/package.json index 0d313e42f..467fdbed4 100644 --- a/packages/protobuf-test/package.json +++ b/packages/protobuf-test/package.json @@ -7,7 +7,11 @@ "build:esm+types": "../../node_modules/typescript/bin/tsc --project tsconfig.json --module ES2015 --verbatimModuleSyntax --outDir ./dist/esm --declaration --declarationDir ./dist/types", "build:copy-gen-js": "rsync -a --exclude '*.js' src/gen/js dist/types/gen && rsync -a --exclude '*.d.ts' src/gen/js dist/esm/gen", "pregenerate": "rm -rf src/gen/*/* descriptorset.*", - "generate": "npm run generate:ts && npm run generate:js && npm run generate:wkt:ts && npm run generate:wkt:js && npm run generate:desc", + "generatev2:ts": "protoc --es-next_out=src/gen/ts --es-next_opt=ts_nocheck=false,target=ts --proto_path=. $(buf ls-files extra) --proto_path=$(upstream-include test) $(upstream-files test) google/protobuf/type.proto", + "generatev2:js": "protoc --es-next_out=src/gen/js --es-next_opt=ts_nocheck=false,target=js+dts --proto_path=. $(buf ls-files extra) --proto_path=$(upstream-include test) $(upstream-files test) google/protobuf/type.proto", + "generatev2:wkt:ts": "protoc --es-next_out=src/gen/ts --es-next_opt=ts_nocheck=false,target=ts $(upstream-files wkt)", + "generatev2:wkt:js": "protoc --es-next_out=src/gen/js --es-next_opt=ts_nocheck=false,target=js+dts $(upstream-files wkt)", + "generate": "npm run generatev2:ts && npm run generatev2:js && npm run generatev2:wkt:ts && npm run generatev2:wkt:js && npm run generate:ts && npm run generate:js && npm run generate:wkt:ts && npm run generate:wkt:js && npm run generate:desc", "generate:ts": "protoc --es_out=src/gen/ts --es_opt=ts_nocheck=false,target=ts --proto_path=. $(buf ls-files extra) --proto_path=$(upstream-include test) $(upstream-files test) google/protobuf/type.proto", "generate:js": "protoc --es_out=src/gen/js --es_opt=ts_nocheck=false,target=js+dts --proto_path=. $(buf ls-files extra) --proto_path=$(upstream-include test) $(upstream-files test) google/protobuf/type.proto", "generate:wkt:ts": "protoc --es_out=src/gen/ts --es_opt=ts_nocheck=false,target=ts $(upstream-files wkt)", diff --git a/packages/protobuf-test/src/gen/js/extra/comments_pbv2.d.ts b/packages/protobuf-test/src/gen/js/extra/comments_pbv2.d.ts new file mode 100644 index 000000000..6b777cc8d --- /dev/null +++ b/packages/protobuf-test/src/gen/js/extra/comments_pbv2.d.ts @@ -0,0 +1,221 @@ +// Copyright 2021-2024 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// @formatter:off + +// Comment before syntax. + +// @generated by protoc-gen-es-next v1.7.2 with parameter "ts_nocheck=false,target=js+dts" +// @generated from file extra/comments.proto (package spec, syntax proto3) +/* eslint-disable */ + +// Comment after syntax. + +// Comment before package. + +import type { DescFile } from "@bufbuild/protobuf"; +import type { Message } from "@bufbuild/protobuf/next"; +import type { TypedDescEnum, TypedDescMessage } from "@bufbuild/protobuf/next/codegenv1"; + +export declare const fileDesc_extra_comments: DescFile; + +/** + * Comment before message. + * + * @generated from message spec.MessageWithComments + */ +export declare type MessageWithComments = Message<"spec.MessageWithComments"> & { + /** + * Comment before field with 5 lines: + * line 2, next is empty + * + * line 4, next is empty + * + * + * Comment next to field. + * + * @generated from field: string foo = 1; + */ + foo: string; + + /** + * Comment before oneof. + * + * Comment after start of oneof. + * + * @generated from oneof spec.MessageWithComments.result + */ + result: { + /** + * Comment before oneof member. + * + * Comment next to oneof member. + * + * @generated from field: int32 value = 2; + */ + value: number; + case: "value"; + } | { + /** + * @generated from field: string error = 3; + */ + value: string; + case: "error"; + } | { case: undefined; value?: undefined }; + + /** + * @generated from field: string this_field_has_an_empty_comment = 4; + */ + thisFieldHasAnEmptyComment: string; + + /** + * @generated from field: string this_field_is_deprecated = 5 [json_name = "sdf", deprecated = true]; + * @deprecated + */ + thisFieldIsDeprecated: string; +}; + +// Describes the message spec.MessageWithComments. Use `create(MessageWithCommentsDesc)` to create a new MessageWithComments. +export declare const MessageWithCommentsDesc: TypedDescMessage; + +/** + * Comment within empty message. + * + * @generated from message spec.EmptyMessageWithComment + */ +export declare type EmptyMessageWithComment = Message<"spec.EmptyMessageWithComment"> & { +}; + +// Describes the message spec.EmptyMessageWithComment. Use `create(EmptyMessageWithCommentDesc)` to create a new EmptyMessageWithComment. +export declare const EmptyMessageWithCommentDesc: TypedDescMessage; + +/** + * see https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/descriptor.proto + * + * @generated from message spec.GoogleCommentExample + */ +export declare type GoogleCommentExample = Message<"spec.GoogleCommentExample"> & { + /** + * Comment attached to foo. + * + * @generated from field: int32 foo = 1; + */ + foo: number; + + /** + * Comment attached to bar. + * + * @generated from field: int32 bar = 2; + */ + bar: number; + + /** + * Comment attached to baz. + * Another line attached to baz. + * + * @generated from field: string baz = 3; + */ + baz: string; + + /** + * Comment attached to qux. + * + * Another line attached to qux. + * + * @generated from field: double qux = 4; + */ + qux: number; + + /** + * Block comment attached + * to corge. Leading asterisks + * will be removed. + * + * @generated from field: string corge = 5; + */ + corge: string; + + /** + * Block comment attached to + * grault. + * + * @generated from field: int32 grault = 6; + */ + grault: number; +}; + +// Describes the message spec.GoogleCommentExample. Use `create(GoogleCommentExampleDesc)` to create a new GoogleCommentExample. +export declare const GoogleCommentExampleDesc: TypedDescMessage; + +/** + * Leading comment for enum. + * + * Comment between start of enum and first value. + * + * @generated from enum spec.EnumWithComments + */ +export enum EnumWithComments { + /** + * Comment before enum value. + * + * Comment next to enum value. + * + * @generated from enum value: VALUE = 0; + */ + VALUE = 0, +} + +// Describes the enum spec.EnumWithComments. +export declare const EnumWithCommentsDesc: TypedDescEnum; + +/** + * Leading comment for deprecated enum + * + * @generated from enum spec.DeprecatedEnumWithComment + * @deprecated + */ +export enum DeprecatedEnumWithComment { + /** + * @generated from enum value: DEPRECATED_ENUM_WITH_COMMENT_A = 0; + */ + A = 0, + + /** + * @generated from enum value: DEPRECATED_ENUM_WITH_COMMENT_B = 1; + */ + B = 1, +} + +// Describes the enum spec.DeprecatedEnumWithComment. +export declare const DeprecatedEnumWithCommentDesc: TypedDescEnum; + +/** + * @generated from enum spec.DeprecatedEnumNoComment + * @deprecated + */ +export enum DeprecatedEnumNoComment { + /** + * @generated from enum value: DEPRECATED_ENUM_NO_COMMENT_A = 0; + */ + A = 0, + + /** + * @generated from enum value: DEPRECATED_ENUM_NO_COMMENT_B = 1; + */ + B = 1, +} + +// Describes the enum spec.DeprecatedEnumNoComment. +export declare const DeprecatedEnumNoCommentDesc: TypedDescEnum; + diff --git a/packages/protobuf-test/src/gen/js/extra/comments_pbv2.js b/packages/protobuf-test/src/gen/js/extra/comments_pbv2.js new file mode 100644 index 000000000..fdbbc3de3 --- /dev/null +++ b/packages/protobuf-test/src/gen/js/extra/comments_pbv2.js @@ -0,0 +1,71 @@ +// Copyright 2021-2024 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// @formatter:off + +// Comment before syntax. + +// @generated by protoc-gen-es-next v1.7.2 with parameter "ts_nocheck=false,target=js+dts" +// @generated from file extra/comments.proto (package spec, syntax proto3) +/* eslint-disable */ + +// Comment after syntax. + +// Comment before package. + +import { enumDesc, fileDesc, messageDesc, tsEnum } from "@bufbuild/protobuf/next/codegenv1"; + +export const fileDesc_extra_comments = fileDesc("ChRleHRyYS9jb21tZW50cy5wcm90bxIEc3BlYyKiAQoTTWVzc2FnZVdpdGhDb21tZW50cxILCgNmb28YASABKAkSDwoFdmFsdWUYAiABKAVIABIPCgVlcnJvchgDIAEoCUgAEicKH3RoaXNfZmllbGRfaGFzX2FuX2VtcHR5X2NvbW1lbnQYBCABKAkSKQoYdGhpc19maWVsZF9pc19kZXByZWNhdGVkGAUgASgJQgIYAVIDc2RmQggKBnJlc3VsdCIZChdFbXB0eU1lc3NhZ2VXaXRoQ29tbWVudCJpChRHb29nbGVDb21tZW50RXhhbXBsZRILCgNmb28YASABKAUSCwoDYmFyGAIgASgFEgsKA2JhehgDIAEoCRILCgNxdXgYBCABKAESDQoFY29yZ2UYBSABKAkSDgoGZ3JhdWx0GAYgASgFKh0KEEVudW1XaXRoQ29tbWVudHMSCQoFVkFMVUUQACpnChlEZXByZWNhdGVkRW51bVdpdGhDb21tZW50EiIKHkRFUFJFQ0FURURfRU5VTV9XSVRIX0NPTU1FTlRfQRAAEiIKHkRFUFJFQ0FURURfRU5VTV9XSVRIX0NPTU1FTlRfQhABGgIYASphChdEZXByZWNhdGVkRW51bU5vQ29tbWVudBIgChxERVBSRUNBVEVEX0VOVU1fTk9fQ09NTUVOVF9BEAASIAocREVQUkVDQVRFRF9FTlVNX05PX0NPTU1FTlRfQhABGgIYAWIGcHJvdG8z"); + +// Describes the message spec.MessageWithComments. Use `create(MessageWithCommentsDesc)` to create a new MessageWithComments. +export const MessageWithCommentsDesc = messageDesc(fileDesc_extra_comments, 0); + +// Describes the message spec.EmptyMessageWithComment. Use `create(EmptyMessageWithCommentDesc)` to create a new EmptyMessageWithComment. +export const EmptyMessageWithCommentDesc = messageDesc(fileDesc_extra_comments, 1); + +// Describes the message spec.GoogleCommentExample. Use `create(GoogleCommentExampleDesc)` to create a new GoogleCommentExample. +export const GoogleCommentExampleDesc = messageDesc(fileDesc_extra_comments, 2); + +// Describes the enum spec.EnumWithComments. +export const EnumWithCommentsDesc = enumDesc(fileDesc_extra_comments, 0); + +/** + * Leading comment for enum. + * + * Comment between start of enum and first value. + * + * @generated from enum spec.EnumWithComments + */ +export const EnumWithComments = tsEnum(EnumWithCommentsDesc); + +// Describes the enum spec.DeprecatedEnumWithComment. +export const DeprecatedEnumWithCommentDesc = enumDesc(fileDesc_extra_comments, 1); + +/** + * Leading comment for deprecated enum + * + * @generated from enum spec.DeprecatedEnumWithComment + * @deprecated + */ +export const DeprecatedEnumWithComment = tsEnum(DeprecatedEnumWithCommentDesc); + +// Describes the enum spec.DeprecatedEnumNoComment. +export const DeprecatedEnumNoCommentDesc = enumDesc(fileDesc_extra_comments, 2); + +/** + * @generated from enum spec.DeprecatedEnumNoComment + * @deprecated + */ +export const DeprecatedEnumNoComment = tsEnum(DeprecatedEnumNoCommentDesc); + diff --git a/packages/protobuf-test/src/gen/js/extra/deprecation-explicit_pbv2.d.ts b/packages/protobuf-test/src/gen/js/extra/deprecation-explicit_pbv2.d.ts new file mode 100644 index 000000000..c240573a0 --- /dev/null +++ b/packages/protobuf-test/src/gen/js/extra/deprecation-explicit_pbv2.d.ts @@ -0,0 +1,107 @@ +// Copyright 2021-2024 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// @generated by protoc-gen-es-next v1.7.2 with parameter "ts_nocheck=false,target=js+dts" +// @generated from file extra/deprecation-explicit.proto (package spec, syntax proto3) +/* eslint-disable */ + +import type { DescFile } from "@bufbuild/protobuf"; +import type { Message } from "@bufbuild/protobuf/next"; +import type { TypedDescEnum, TypedDescMessage } from "@bufbuild/protobuf/next/codegenv1"; + +export declare const fileDesc_extra_deprecation_explicit: DescFile; + +/** + * The entire message is deprecated + * + * @generated from message spec.DeprecatedMessage + * @deprecated + */ +export declare type DeprecatedMessage = Message<"spec.DeprecatedMessage"> & { + /** + * @generated from field: string field = 1; + */ + field: string; +}; + +// Describes the message spec.DeprecatedMessage. Use `create(DeprecatedMessageDesc)` to create a new DeprecatedMessage. +export declare const DeprecatedMessageDesc: TypedDescMessage; + +/** + * A single field of this message is deprecated + * + * @generated from message spec.DeprecatedFieldMessage + */ +export declare type DeprecatedFieldMessage = Message<"spec.DeprecatedFieldMessage"> & { + /** + * This field is deprecated + * + * @generated from field: string deprecated_field = 1 [deprecated = true]; + * @deprecated + */ + deprecatedField: string; + + /** + * This field is not deprecated + * + * @generated from field: string current_field = 2; + */ + currentField: string; +}; + +// Describes the message spec.DeprecatedFieldMessage. Use `create(DeprecatedFieldMessageDesc)` to create a new DeprecatedFieldMessage. +export declare const DeprecatedFieldMessageDesc: TypedDescMessage; + +/** + * The entire enum is deprecated + * + * @generated from enum spec.DeprecatedEnum + * @deprecated + */ +export enum DeprecatedEnum { + /** + * @generated from enum value: DEPRECATED_ENUM_A = 0; + */ + A = 0, + + /** + * @generated from enum value: DEPRECATED_ENUM_B = 1; + */ + B = 1, +} + +// Describes the enum spec.DeprecatedEnum. +export declare const DeprecatedEnumDesc: TypedDescEnum; + +/** + * Only a single enum value is deprecated + * + * @generated from enum spec.DeprecatedValueEnum + */ +export enum DeprecatedValueEnum { + /** + * @generated from enum value: DEPRECATED_VALUE_ENUM_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * @generated from enum value: DEPRECATED_VALUE_ENUM_DEPRECATED_VALUE = 1 [deprecated = true]; + * @deprecated + */ + DEPRECATED_VALUE = 1, +} + +// Describes the enum spec.DeprecatedValueEnum. +export declare const DeprecatedValueEnumDesc: TypedDescEnum; + diff --git a/packages/protobuf-test/src/gen/js/extra/deprecation-explicit_pbv2.js b/packages/protobuf-test/src/gen/js/extra/deprecation-explicit_pbv2.js new file mode 100644 index 000000000..6c7face0c --- /dev/null +++ b/packages/protobuf-test/src/gen/js/extra/deprecation-explicit_pbv2.js @@ -0,0 +1,49 @@ +// Copyright 2021-2024 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// @generated by protoc-gen-es-next v1.7.2 with parameter "ts_nocheck=false,target=js+dts" +// @generated from file extra/deprecation-explicit.proto (package spec, syntax proto3) +/* eslint-disable */ + +import { enumDesc, fileDesc, messageDesc, tsEnum } from "@bufbuild/protobuf/next/codegenv1"; + +export const fileDesc_extra_deprecation_explicit = fileDesc("CiBleHRyYS9kZXByZWNhdGlvbi1leHBsaWNpdC5wcm90bxIEc3BlYyImChFEZXByZWNhdGVkTWVzc2FnZRINCgVmaWVsZBgBIAEoCToCGAEiTQoWRGVwcmVjYXRlZEZpZWxkTWVzc2FnZRIcChBkZXByZWNhdGVkX2ZpZWxkGAEgASgJQgIYARIVCg1jdXJyZW50X2ZpZWxkGAIgASgJKkIKDkRlcHJlY2F0ZWRFbnVtEhUKEURFUFJFQ0FURURfRU5VTV9BEAASFQoRREVQUkVDQVRFRF9FTlVNX0IQARoCGAEqbAoTRGVwcmVjYXRlZFZhbHVlRW51bRIlCiFERVBSRUNBVEVEX1ZBTFVFX0VOVU1fVU5TUEVDSUZJRUQQABIuCiZERVBSRUNBVEVEX1ZBTFVFX0VOVU1fREVQUkVDQVRFRF9WQUxVRRABGgIIAWIGcHJvdG8z"); + +// Describes the message spec.DeprecatedMessage. Use `create(DeprecatedMessageDesc)` to create a new DeprecatedMessage. +export const DeprecatedMessageDesc = messageDesc(fileDesc_extra_deprecation_explicit, 0); + +// Describes the message spec.DeprecatedFieldMessage. Use `create(DeprecatedFieldMessageDesc)` to create a new DeprecatedFieldMessage. +export const DeprecatedFieldMessageDesc = messageDesc(fileDesc_extra_deprecation_explicit, 1); + +// Describes the enum spec.DeprecatedEnum. +export const DeprecatedEnumDesc = enumDesc(fileDesc_extra_deprecation_explicit, 0); + +/** + * The entire enum is deprecated + * + * @generated from enum spec.DeprecatedEnum + * @deprecated + */ +export const DeprecatedEnum = tsEnum(DeprecatedEnumDesc); + +// Describes the enum spec.DeprecatedValueEnum. +export const DeprecatedValueEnumDesc = enumDesc(fileDesc_extra_deprecation_explicit, 1); + +/** + * Only a single enum value is deprecated + * + * @generated from enum spec.DeprecatedValueEnum + */ +export const DeprecatedValueEnum = tsEnum(DeprecatedValueEnumDesc); + diff --git a/packages/protobuf-test/src/gen/js/extra/deprecation-implicit_pbv2.d.ts b/packages/protobuf-test/src/gen/js/extra/deprecation-implicit_pbv2.d.ts new file mode 100644 index 000000000..91a7c7928 --- /dev/null +++ b/packages/protobuf-test/src/gen/js/extra/deprecation-implicit_pbv2.d.ts @@ -0,0 +1,34 @@ +// Copyright 2021-2024 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// @generated by protoc-gen-es-next v1.7.2 with parameter "ts_nocheck=false,target=js+dts" +// @generated from file extra/deprecation-implicit.proto (package spec, syntax proto3) +/* eslint-disable */ + +import type { DescFile } from "@bufbuild/protobuf"; +import type { Message } from "@bufbuild/protobuf/next"; +import type { TypedDescMessage } from "@bufbuild/protobuf/next/codegenv1"; + +export declare const fileDesc_extra_deprecation_implicit: DescFile; + +/** + * @generated from message spec.ImplicitlyDeprecatedMessage + * @deprecated + */ +export declare type ImplicitlyDeprecatedMessage = Message<"spec.ImplicitlyDeprecatedMessage"> & { +}; + +// Describes the message spec.ImplicitlyDeprecatedMessage. Use `create(ImplicitlyDeprecatedMessageDesc)` to create a new ImplicitlyDeprecatedMessage. +export declare const ImplicitlyDeprecatedMessageDesc: TypedDescMessage; + diff --git a/packages/protobuf-test/src/gen/js/extra/deprecation-implicit_pbv2.js b/packages/protobuf-test/src/gen/js/extra/deprecation-implicit_pbv2.js new file mode 100644 index 000000000..5446fd94c --- /dev/null +++ b/packages/protobuf-test/src/gen/js/extra/deprecation-implicit_pbv2.js @@ -0,0 +1,25 @@ +// Copyright 2021-2024 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// @generated by protoc-gen-es-next v1.7.2 with parameter "ts_nocheck=false,target=js+dts" +// @generated from file extra/deprecation-implicit.proto (package spec, syntax proto3) +/* eslint-disable */ + +import { fileDesc, messageDesc } from "@bufbuild/protobuf/next/codegenv1"; + +export const fileDesc_extra_deprecation_implicit = fileDesc("CiBleHRyYS9kZXByZWNhdGlvbi1pbXBsaWNpdC5wcm90bxIEc3BlYyIdChtJbXBsaWNpdGx5RGVwcmVjYXRlZE1lc3NhZ2VCA7gBAWIGcHJvdG8z"); + +// Describes the message spec.ImplicitlyDeprecatedMessage. Use `create(ImplicitlyDeprecatedMessageDesc)` to create a new ImplicitlyDeprecatedMessage. +export const ImplicitlyDeprecatedMessageDesc = messageDesc(fileDesc_extra_deprecation_implicit, 0); + diff --git a/packages/protobuf-test/src/gen/js/extra/empty-file_pbv2.d.ts b/packages/protobuf-test/src/gen/js/extra/empty-file_pbv2.d.ts new file mode 100644 index 000000000..d3f9e20df --- /dev/null +++ b/packages/protobuf-test/src/gen/js/extra/empty-file_pbv2.d.ts @@ -0,0 +1,22 @@ +// Copyright 2021-2024 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// @generated by protoc-gen-es-next v1.7.2 with parameter "ts_nocheck=false,target=js+dts" +// @generated from file extra/empty-file.proto (package spec, syntax proto3) +/* eslint-disable */ + +import type { DescFile } from "@bufbuild/protobuf"; + +export declare const fileDesc_extra_empty_file: DescFile; + diff --git a/packages/protobuf-test/src/gen/js/extra/empty-file_pbv2.js b/packages/protobuf-test/src/gen/js/extra/empty-file_pbv2.js new file mode 100644 index 000000000..d8c7c6a83 --- /dev/null +++ b/packages/protobuf-test/src/gen/js/extra/empty-file_pbv2.js @@ -0,0 +1,22 @@ +// Copyright 2021-2024 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// @generated by protoc-gen-es-next v1.7.2 with parameter "ts_nocheck=false,target=js+dts" +// @generated from file extra/empty-file.proto (package spec, syntax proto3) +/* eslint-disable */ + +import { fileDesc } from "@bufbuild/protobuf/next/codegenv1"; + +export const fileDesc_extra_empty_file = fileDesc("ChZleHRyYS9lbXB0eS1maWxlLnByb3RvEgRzcGVjYgZwcm90bzM"); + diff --git a/packages/protobuf-test/src/gen/js/extra/enum_pbv2.d.ts b/packages/protobuf-test/src/gen/js/extra/enum_pbv2.d.ts new file mode 100644 index 000000000..028b9e8ff --- /dev/null +++ b/packages/protobuf-test/src/gen/js/extra/enum_pbv2.d.ts @@ -0,0 +1,146 @@ +// Copyright 2021-2024 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// @generated by protoc-gen-es-next v1.7.2 with parameter "ts_nocheck=false,target=js+dts" +// @generated from file extra/enum.proto (package spec, syntax proto3) +/* eslint-disable */ + +import type { DescFile } from "@bufbuild/protobuf"; +import type { EnumOptions, EnumValueOptions, Message } from "@bufbuild/protobuf/next"; +import type { TypedDescEnum, TypedDescExtension, TypedDescMessage } from "@bufbuild/protobuf/next/codegenv1"; + +export declare const fileDesc_extra_enum: DescFile; + +/** + * @generated from message spec.EnumMessage + */ +export declare type EnumMessage = Message<"spec.EnumMessage"> & { + /** + * @generated from field: spec.EnumMessage.NestedEnum enum_field = 1; + */ + enumField: EnumMessage_NestedEnum; +}; + +// Describes the message spec.EnumMessage. Use `create(EnumMessageDesc)` to create a new EnumMessage. +export declare const EnumMessageDesc: TypedDescMessage; + +/** + * @generated from enum spec.EnumMessage.NestedEnum + */ +export enum EnumMessage_NestedEnum { + /** + * @generated from enum value: NESTED_ZERO = 0; + */ + NESTED_ZERO = 0, + + /** + * @generated from enum value: NESTED_ONE = 1; + */ + NESTED_ONE = 1, +} + +// Describes the enum spec.EnumMessage.NestedEnum. +export declare const EnumMessage_NestedEnumDesc: TypedDescEnum; + +/** + * @generated from enum spec.AnnotatedEnum + */ +export enum AnnotatedEnum { + /** + * @generated from enum value: UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * @generated from enum value: FOO = 1; + */ + FOO = 1, +} + +// Describes the enum spec.AnnotatedEnum. +export declare const AnnotatedEnumDesc: TypedDescEnum; + +/** + * @generated from enum spec.SimpleEnum + */ +export enum SimpleEnum { + /** + * @generated from enum value: SIMPLE_ZERO = 0; + */ + SIMPLE_ZERO = 0, + + /** + * @generated from enum value: SIMPLE_ONE = 1; + */ + SIMPLE_ONE = 1, +} + +// Describes the enum spec.SimpleEnum. +export declare const SimpleEnumDesc: TypedDescEnum; + +/** + * @generated from enum spec.AliasEnum + */ +export enum AliasEnum { + /** + * @generated from enum value: ALIAS_ZERO = 0; + */ + ALIAS_ZERO = 0, + + /** + * @generated from enum value: ALIAS_ONE = 1; + */ + ALIAS_ONE = 1, + + /** + * @generated from enum value: ALIAS_ONE_ALIASED = 1; + */ + ALIAS_ONE_ALIASED = 1, +} + +// Describes the enum spec.AliasEnum. +export declare const AliasEnumDesc: TypedDescEnum; + +/** + * The generated enum values should drop the "PREFIX_" + * part at the top if the target language allows + * (basically every language except C++). + * + * @generated from enum spec.PrefixEnum + */ +export enum PrefixEnum { + /** + * @generated from enum value: PREFIX_ENUM_ZERO = 0; + */ + ZERO = 0, + + /** + * @generated from enum value: PREFIX_ENUM_ONE = 1; + */ + ONE = 1, +} + +// Describes the enum spec.PrefixEnum. +export declare const PrefixEnumDesc: TypedDescEnum; + +/** + * @generated from extension: bool enum_opt_bool = 2001; + */ +export declare const enum_opt_bool: TypedDescExtension; + +/** + * @generated from extension: bool enum_value_opt_bool = 3001; + */ +export declare const enum_value_opt_bool: TypedDescExtension; + diff --git a/packages/protobuf-test/src/gen/js/extra/enum_pbv2.js b/packages/protobuf-test/src/gen/js/extra/enum_pbv2.js new file mode 100644 index 000000000..0cc5569e0 --- /dev/null +++ b/packages/protobuf-test/src/gen/js/extra/enum_pbv2.js @@ -0,0 +1,80 @@ +// Copyright 2021-2024 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// @generated by protoc-gen-es-next v1.7.2 with parameter "ts_nocheck=false,target=js+dts" +// @generated from file extra/enum.proto (package spec, syntax proto3) +/* eslint-disable */ + +import { enumDesc, extDesc, fileDesc, messageDesc, tsEnum } from "@bufbuild/protobuf/next/codegenv1"; +import { fileDesc_google_protobuf_descriptor } from "@bufbuild/protobuf/next"; + +export const fileDesc_extra_enum = fileDesc("ChBleHRyYS9lbnVtLnByb3RvEgRzcGVjIm4KC0VudW1NZXNzYWdlEjAKCmVudW1fZmllbGQYASABKA4yHC5zcGVjLkVudW1NZXNzYWdlLk5lc3RlZEVudW0iLQoKTmVzdGVkRW51bRIPCgtORVNURURfWkVSTxAAEg4KCk5FU1RFRF9PTkUQASo0Cg1Bbm5vdGF0ZWRFbnVtEg8KC1VOU1BFQ0lGSUVEEAASDQoDRk9PEAEaBMi7AQEaA4h9ASotCgpTaW1wbGVFbnVtEg8KC1NJTVBMRV9aRVJPEAASDgoKU0lNUExFX09ORRABKkUKCUFsaWFzRW51bRIOCgpBTElBU19aRVJPEAASDQoJQUxJQVNfT05FEAESFQoRQUxJQVNfT05FX0FMSUFTRUQQARoCEAEqNwoKUHJlZml4RW51bRIUChBQUkVGSVhfRU5VTV9aRVJPEAASEwoPUFJFRklYX0VOVU1fT05FEAE6QQoNZW51bV9vcHRfYm9vbBIcLmdvb2dsZS5wcm90b2J1Zi5FbnVtT3B0aW9ucxjRDyABKAhSC2VudW1PcHRCb29sOlEKE2VudW1fdmFsdWVfb3B0X2Jvb2wSIS5nb29nbGUucHJvdG9idWYuRW51bVZhbHVlT3B0aW9ucxi5FyABKAhSEGVudW1WYWx1ZU9wdEJvb2xiBnByb3RvMw", [fileDesc_google_protobuf_descriptor]); + +// Describes the message spec.EnumMessage. Use `create(EnumMessageDesc)` to create a new EnumMessage. +export const EnumMessageDesc = messageDesc(fileDesc_extra_enum, 0); + +// Describes the enum spec.EnumMessage.NestedEnum. +export const EnumMessage_NestedEnumDesc = enumDesc(fileDesc_extra_enum, 0, 0); + +/** + * @generated from enum spec.EnumMessage.NestedEnum + */ +export const EnumMessage_NestedEnum = tsEnum(EnumMessage_NestedEnumDesc); + +// Describes the enum spec.AnnotatedEnum. +export const AnnotatedEnumDesc = enumDesc(fileDesc_extra_enum, 0); + +/** + * @generated from enum spec.AnnotatedEnum + */ +export const AnnotatedEnum = tsEnum(AnnotatedEnumDesc); + +// Describes the enum spec.SimpleEnum. +export const SimpleEnumDesc = enumDesc(fileDesc_extra_enum, 1); + +/** + * @generated from enum spec.SimpleEnum + */ +export const SimpleEnum = tsEnum(SimpleEnumDesc); + +// Describes the enum spec.AliasEnum. +export const AliasEnumDesc = enumDesc(fileDesc_extra_enum, 2); + +/** + * @generated from enum spec.AliasEnum + */ +export const AliasEnum = tsEnum(AliasEnumDesc); + +// Describes the enum spec.PrefixEnum. +export const PrefixEnumDesc = enumDesc(fileDesc_extra_enum, 3); + +/** + * The generated enum values should drop the "PREFIX_" + * part at the top if the target language allows + * (basically every language except C++). + * + * @generated from enum spec.PrefixEnum + */ +export const PrefixEnum = tsEnum(PrefixEnumDesc); + +/** + * @generated from extension: bool enum_opt_bool = 2001; + */ +export const enum_opt_bool = extDesc(fileDesc_extra_enum, 0); + +/** + * @generated from extension: bool enum_value_opt_bool = 3001; + */ +export const enum_value_opt_bool = extDesc(fileDesc_extra_enum, 1); + diff --git a/packages/protobuf-test/src/gen/js/extra/example_pbv2.d.ts b/packages/protobuf-test/src/gen/js/extra/example_pbv2.d.ts new file mode 100644 index 000000000..4bb08befa --- /dev/null +++ b/packages/protobuf-test/src/gen/js/extra/example_pbv2.d.ts @@ -0,0 +1,62 @@ +// Copyright 2021-2024 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// @generated by protoc-gen-es-next v1.7.2 with parameter "ts_nocheck=false,target=js+dts" +// @generated from file extra/example.proto (package docs, syntax proto3) +/* eslint-disable */ + +import type { DescFile } from "@bufbuild/protobuf"; +import type { Message } from "@bufbuild/protobuf/next"; +import type { TypedDescMessage } from "@bufbuild/protobuf/next/codegenv1"; + +export declare const fileDesc_extra_example: DescFile; + +/** + * @generated from message docs.User + */ +export declare type User = Message<"docs.User"> & { + /** + * @generated from field: string first_name = 1; + */ + firstName: string; + + /** + * @generated from field: string last_name = 2; + */ + lastName: string; + + /** + * @generated from field: bool active = 3; + */ + active: boolean; + + /** + * @generated from field: docs.User manager = 4; + */ + manager?: User; + + /** + * @generated from field: repeated string locations = 5; + */ + locations: string[]; + + /** + * @generated from field: map projects = 6; + */ + projects: { [key: string]: string }; +}; + +// Describes the message docs.User. Use `create(UserDesc)` to create a new User. +export declare const UserDesc: TypedDescMessage; + diff --git a/packages/protobuf-test/src/gen/js/extra/example_pbv2.js b/packages/protobuf-test/src/gen/js/extra/example_pbv2.js new file mode 100644 index 000000000..1c19046d6 --- /dev/null +++ b/packages/protobuf-test/src/gen/js/extra/example_pbv2.js @@ -0,0 +1,25 @@ +// Copyright 2021-2024 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// @generated by protoc-gen-es-next v1.7.2 with parameter "ts_nocheck=false,target=js+dts" +// @generated from file extra/example.proto (package docs, syntax proto3) +/* eslint-disable */ + +import { fileDesc, messageDesc } from "@bufbuild/protobuf/next/codegenv1"; + +export const fileDesc_extra_example = fileDesc("ChNleHRyYS9leGFtcGxlLnByb3RvEgRkb2NzIsoBCgRVc2VyEhIKCmZpcnN0X25hbWUYASABKAkSEQoJbGFzdF9uYW1lGAIgASgJEg4KBmFjdGl2ZRgDIAEoCBIbCgdtYW5hZ2VyGAQgASgLMgouZG9jcy5Vc2VyEhEKCWxvY2F0aW9ucxgFIAMoCRIqCghwcm9qZWN0cxgGIAMoCzIYLmRvY3MuVXNlci5Qcm9qZWN0c0VudHJ5Gi8KDVByb2plY3RzRW50cnkSCwoDa2V5GAEgASgJEg0KBXZhbHVlGAIgASgJOgI4AWIGcHJvdG8z"); + +// Describes the message docs.User. Use `create(UserDesc)` to create a new User. +export const UserDesc = messageDesc(fileDesc_extra_example, 0); + diff --git a/packages/protobuf-test/src/gen/js/extra/extensions-proto2_pbv2.d.ts b/packages/protobuf-test/src/gen/js/extra/extensions-proto2_pbv2.d.ts new file mode 100644 index 000000000..45a5a38dc --- /dev/null +++ b/packages/protobuf-test/src/gen/js/extra/extensions-proto2_pbv2.d.ts @@ -0,0 +1,243 @@ +// Copyright 2021-2024 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// @generated by protoc-gen-es-next v1.7.2 with parameter "ts_nocheck=false,target=js+dts" +// @generated from file extra/extensions-proto2.proto (package proto2ext, syntax proto2) +/* eslint-disable */ + +import type { DescFile } from "@bufbuild/protobuf"; +import type { Message } from "@bufbuild/protobuf/next"; +import type { TypedDescEnum, TypedDescExtension, TypedDescMessage } from "@bufbuild/protobuf/next/codegenv1"; +import type { User } from "./example_pbv2.js"; + +export declare const fileDesc_extra_extensions_proto2: DescFile; + +/** + * The message we're going to extend + * + * @generated from message proto2ext.Proto2Extendee + */ +export declare type Proto2Extendee = Message<"proto2ext.Proto2Extendee"> & { + /** + * @generated from field: optional int32 own_field = 1; + */ + ownField: number; +}; + +// Describes the message proto2ext.Proto2Extendee. Use `create(Proto2ExtendeeDesc)` to create a new Proto2Extendee. +export declare const Proto2ExtendeeDesc: TypedDescMessage; + +/** + * A message used in extensions + * + * @generated from message proto2ext.Proto2ExtMessage + */ +export declare type Proto2ExtMessage = Message<"proto2ext.Proto2ExtMessage"> & { + /** + * @generated from field: optional string string_field = 1; + */ + stringField: string; +}; + +// Describes the message proto2ext.Proto2ExtMessage. Use `create(Proto2ExtMessageDesc)` to create a new Proto2ExtMessage. +export declare const Proto2ExtMessageDesc: TypedDescMessage; + +/** + * @generated from message proto2ext.GroupExt + */ +export declare type GroupExt = Message<"proto2ext.GroupExt"> & { + /** + * @generated from field: optional int32 a = 1; + */ + a: number; + + /** + * @generated from field: optional int32 b = 2; + */ + b: number; +}; + +// Describes the message proto2ext.GroupExt. Use `create(GroupExtDesc)` to create a new GroupExt. +export declare const GroupExtDesc: TypedDescMessage; + +/** + * @generated from message proto2ext.RepeatedGroupExt + */ +export declare type RepeatedGroupExt = Message<"proto2ext.RepeatedGroupExt"> & { + /** + * @generated from field: optional int32 a = 1; + */ + a: number; + + /** + * @generated from field: optional int32 b = 2; + */ + b: number; +}; + +// Describes the message proto2ext.RepeatedGroupExt. Use `create(RepeatedGroupExtDesc)` to create a new RepeatedGroupExt. +export declare const RepeatedGroupExtDesc: TypedDescMessage; + +/** + * A container for nested extensions + * + * @generated from message proto2ext.Proto2ExtContainer + */ +export declare type Proto2ExtContainer = Message<"proto2ext.Proto2ExtContainer"> & { +}; + +// Describes the message proto2ext.Proto2ExtContainer. Use `create(Proto2ExtContainerDesc)` to create a new Proto2ExtContainer. +export declare const Proto2ExtContainerDesc: TypedDescMessage; + +/** + * @generated from message proto2ext.Proto2ExtContainer.Child + */ +export declare type Proto2ExtContainer_Child = Message<"proto2ext.Proto2ExtContainer.Child"> & { +}; + +// Describes the message proto2ext.Proto2ExtContainer.Child. Use `create(Proto2ExtContainer_ChildDesc)` to create a new Proto2ExtContainer_Child. +export declare const Proto2ExtContainer_ChildDesc: TypedDescMessage; + +/** + * @generated from extension: optional uint32 uint32_ext = 9010; + */ +export declare const Proto2ExtContainer_Child_uint32_ext: TypedDescExtension; + +/** + * @generated from extension: optional uint32 uint32_ext = 9001; + */ +export declare const Proto2ExtContainer_uint32_ext: TypedDescExtension; + +/** + * An enumeration used in extensions + * + * @generated from enum proto2ext.Proto2ExtEnum + */ +export enum Proto2ExtEnum { + /** + * @generated from enum value: PROTO2_EXT_ENUM_YES = 1; + */ + YES = 1, + + /** + * @generated from enum value: PROTO2_EXT_ENUM_NO = 2; + */ + NO = 2, +} + +// Describes the enum proto2ext.Proto2ExtEnum. +export declare const Proto2ExtEnumDesc: TypedDescEnum; + +/** + * @generated from extension: optional uint32 uint32_ext = 1001; + */ +export declare const uint32_ext: TypedDescExtension; + +/** + * @generated from extension: optional uint32 uint32_ext_with_default = 1002 [default = 999]; + */ +export declare const uint32_ext_with_default: TypedDescExtension; + +/** + * @generated from extension: optional string string_ext = 2001; + */ +export declare const string_ext: TypedDescExtension; + +/** + * @generated from extension: optional string string_ext_with_default = 2002 [default = "hello \" *\/ "]; + */ +export declare const string_ext_with_default: TypedDescExtension; + +/** + * @generated from extension: optional uint64 uint64_ext = 3001; + */ +export declare const uint64_ext: TypedDescExtension; + +/** + * @generated from extension: optional uint64 uint64_ext_js_string = 3002 [jstype = JS_STRING]; + */ +export declare const uint64_ext_js_string: TypedDescExtension; + +/** + * @generated from extension: optional bytes bytes_ext = 4001; + */ +export declare const bytes_ext: TypedDescExtension; + +/** + * @generated from extension: optional bytes bytes_ext_with_default = 4002 [default = "\000x\\x\\"x\'AAAAAA\010\014\n\r\t\013"]; + */ +export declare const bytes_ext_with_default: TypedDescExtension; + +/** + * @generated from extension: optional proto2ext.Proto2ExtEnum enum_ext = 5001; + */ +export declare const enum_ext: TypedDescExtension; + +/** + * @generated from extension: optional proto2ext.Proto2ExtEnum enum_ext_with_default = 5002 [default = PROTO2_EXT_ENUM_NO]; + */ +export declare const enum_ext_with_default: TypedDescExtension; + +/** + * @generated from extension: optional proto2ext.Proto2ExtMessage message_ext = 6001; + */ +export declare const message_ext: TypedDescExtension; + +/** + * @generated from extension: optional docs.User message_ext_proto3 = 6002; + */ +export declare const message_ext_proto3: TypedDescExtension; + +/** + * @generated from extension: repeated proto2ext.Proto2ExtMessage repeated_message_ext = 7001; + */ +export declare const repeated_message_ext: TypedDescExtension; + +/** + * @generated from extension: repeated proto2ext.Proto2ExtEnum repeated_enum_ext = 7005; + */ +export declare const repeated_enum_ext: TypedDescExtension; + +/** + * @generated from extension: repeated string repeated_string_ext = 7002; + */ +export declare const repeated_string_ext: TypedDescExtension; + +/** + * @generated from extension: repeated uint32 packed_uint32_ext = 7003 [packed = true]; + */ +export declare const packed_uint32_ext: TypedDescExtension; + +/** + * unpacked by default in proto2 + * + * @generated from extension: repeated uint32 unpacked_uint32_ext = 7004; + */ +export declare const unpacked_uint32_ext: TypedDescExtension; + +/** + * @generated from extension: optional google.protobuf.UInt32Value wrapper_ext = 8001; + */ +export declare const wrapper_ext: TypedDescExtension; + +/** + * @generated from extension: optional proto2ext.GroupExt groupext = 8100; + */ +export declare const groupext: TypedDescExtension; + +/** + * @generated from extension: repeated proto2ext.RepeatedGroupExt repeatedgroupext = 8101; + */ +export declare const repeatedgroupext: TypedDescExtension; + diff --git a/packages/protobuf-test/src/gen/js/extra/extensions-proto2_pbv2.js b/packages/protobuf-test/src/gen/js/extra/extensions-proto2_pbv2.js new file mode 100644 index 000000000..317a69304 --- /dev/null +++ b/packages/protobuf-test/src/gen/js/extra/extensions-proto2_pbv2.js @@ -0,0 +1,164 @@ +// Copyright 2021-2024 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// @generated by protoc-gen-es-next v1.7.2 with parameter "ts_nocheck=false,target=js+dts" +// @generated from file extra/extensions-proto2.proto (package proto2ext, syntax proto2) +/* eslint-disable */ + +import { enumDesc, extDesc, fileDesc, messageDesc, tsEnum } from "@bufbuild/protobuf/next/codegenv1"; +import { fileDesc_extra_example } from "./example_pbv2.js"; +import { fileDesc_google_protobuf_wrappers } from "@bufbuild/protobuf/next"; + +export const fileDesc_extra_extensions_proto2 = fileDesc("Ch1leHRyYS9leHRlbnNpb25zLXByb3RvMi5wcm90bxIJcHJvdG8yZXh0IisKDlByb3RvMkV4dGVuZGVlEhEKCW93bl9maWVsZBgBIAEoBSoGCOgHEJBOIigKEFByb3RvMkV4dE1lc3NhZ2USFAoMc3RyaW5nX2ZpZWxkGAEgASgJIiAKCEdyb3VwRXh0EgkKAWEYASABKAUSCQoBYhgCIAEoBSIoChBSZXBlYXRlZEdyb3VwRXh0EgkKAWEYASABKAUSCQoBYhgCIAEoBSKTAQoSUHJvdG8yRXh0Q29udGFpbmVyGkIKBUNoaWxkMjkKCnVpbnQzMl9leHQSGS5wcm90bzJleHQuUHJvdG8yRXh0ZW5kZWUYskYgASgNUgl1aW50MzJFeHQyOQoKdWludDMyX2V4dBIZLnByb3RvMmV4dC5Qcm90bzJFeHRlbmRlZRipRiABKA1SCXVpbnQzMkV4dCpACg1Qcm90bzJFeHRFbnVtEhcKE1BST1RPMl9FWFRfRU5VTV9ZRVMQARIWChJQUk9UTzJfRVhUX0VOVU1fTk8QAjo5Cgp1aW50MzJfZXh0EhkucHJvdG8yZXh0LlByb3RvMkV4dGVuZGVlGOkHIAEoDVIJdWludDMyRXh0OlYKF3VpbnQzMl9leHRfd2l0aF9kZWZhdWx0EhkucHJvdG8yZXh0LlByb3RvMkV4dGVuZGVlGOoHIAEoDToDOTk5UhR1aW50MzJF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+ +// Describes the message proto2ext.Proto2Extendee. Use `create(Proto2ExtendeeDesc)` to create a new Proto2Extendee. +export const Proto2ExtendeeDesc = messageDesc(fileDesc_extra_extensions_proto2, 0); + +// Describes the message proto2ext.Proto2ExtMessage. Use `create(Proto2ExtMessageDesc)` to create a new Proto2ExtMessage. +export const Proto2ExtMessageDesc = messageDesc(fileDesc_extra_extensions_proto2, 1); + +// Describes the message proto2ext.GroupExt. Use `create(GroupExtDesc)` to create a new GroupExt. +export const GroupExtDesc = messageDesc(fileDesc_extra_extensions_proto2, 2); + +// Describes the message proto2ext.RepeatedGroupExt. Use `create(RepeatedGroupExtDesc)` to create a new RepeatedGroupExt. +export const RepeatedGroupExtDesc = messageDesc(fileDesc_extra_extensions_proto2, 3); + +// Describes the message proto2ext.Proto2ExtContainer. Use `create(Proto2ExtContainerDesc)` to create a new Proto2ExtContainer. +export const Proto2ExtContainerDesc = messageDesc(fileDesc_extra_extensions_proto2, 4); + +// Describes the message proto2ext.Proto2ExtContainer.Child. Use `create(Proto2ExtContainer_ChildDesc)` to create a new Proto2ExtContainer_Child. +export const Proto2ExtContainer_ChildDesc = messageDesc(fileDesc_extra_extensions_proto2, 4, 0); + +/** + * @generated from extension: optional uint32 uint32_ext = 9010; + */ +export const Proto2ExtContainer_Child_uint32_ext = extDesc(fileDesc_extra_extensions_proto2, 4, 0, 0); + +/** + * @generated from extension: optional uint32 uint32_ext = 9001; + */ +export const Proto2ExtContainer_uint32_ext = extDesc(fileDesc_extra_extensions_proto2, 4, 0); + +// Describes the enum proto2ext.Proto2ExtEnum. +export const Proto2ExtEnumDesc = enumDesc(fileDesc_extra_extensions_proto2, 0); + +/** + * An enumeration used in extensions + * + * @generated from enum proto2ext.Proto2ExtEnum + */ +export const Proto2ExtEnum = tsEnum(Proto2ExtEnumDesc); + +/** + * @generated from extension: optional uint32 uint32_ext = 1001; + */ +export const uint32_ext = extDesc(fileDesc_extra_extensions_proto2, 0); + +/** + * @generated from extension: optional uint32 uint32_ext_with_default = 1002 [default = 999]; + */ +export const uint32_ext_with_default = extDesc(fileDesc_extra_extensions_proto2, 1); + +/** + * @generated from extension: optional string string_ext = 2001; + */ +export const string_ext = extDesc(fileDesc_extra_extensions_proto2, 2); + +/** + * @generated from extension: optional string string_ext_with_default = 2002 [default = "hello \" *\/ "]; + */ +export const string_ext_with_default = extDesc(fileDesc_extra_extensions_proto2, 3); + +/** + * @generated from extension: optional uint64 uint64_ext = 3001; + */ +export const uint64_ext = extDesc(fileDesc_extra_extensions_proto2, 4); + +/** + * @generated from extension: optional uint64 uint64_ext_js_string = 3002 [jstype = JS_STRING]; + */ +export const uint64_ext_js_string = extDesc(fileDesc_extra_extensions_proto2, 5); + +/** + * @generated from extension: optional bytes bytes_ext = 4001; + */ +export const bytes_ext = extDesc(fileDesc_extra_extensions_proto2, 6); + +/** + * @generated from extension: optional bytes bytes_ext_with_default = 4002 [default = "\000x\\x\\"x\'AAAAAA\010\014\n\r\t\013"]; + */ +export const bytes_ext_with_default = extDesc(fileDesc_extra_extensions_proto2, 7); + +/** + * @generated from extension: optional proto2ext.Proto2ExtEnum enum_ext = 5001; + */ +export const enum_ext = extDesc(fileDesc_extra_extensions_proto2, 8); + +/** + * @generated from extension: optional proto2ext.Proto2ExtEnum enum_ext_with_default = 5002 [default = PROTO2_EXT_ENUM_NO]; + */ +export const enum_ext_with_default = extDesc(fileDesc_extra_extensions_proto2, 9); + +/** + * @generated from extension: optional proto2ext.Proto2ExtMessage message_ext = 6001; + */ +export const message_ext = extDesc(fileDesc_extra_extensions_proto2, 10); + +/** + * @generated from extension: optional docs.User message_ext_proto3 = 6002; + */ +export const message_ext_proto3 = extDesc(fileDesc_extra_extensions_proto2, 11); + +/** + * @generated from extension: repeated proto2ext.Proto2ExtMessage repeated_message_ext = 7001; + */ +export const repeated_message_ext = extDesc(fileDesc_extra_extensions_proto2, 12); + +/** + * @generated from extension: repeated proto2ext.Proto2ExtEnum repeated_enum_ext = 7005; + */ +export const repeated_enum_ext = extDesc(fileDesc_extra_extensions_proto2, 13); + +/** + * @generated from extension: repeated string repeated_string_ext = 7002; + */ +export const repeated_string_ext = extDesc(fileDesc_extra_extensions_proto2, 14); + +/** + * @generated from extension: repeated uint32 packed_uint32_ext = 7003 [packed = true]; + */ +export const packed_uint32_ext = extDesc(fileDesc_extra_extensions_proto2, 15); + +/** + * unpacked by default in proto2 + * + * @generated from extension: repeated uint32 unpacked_uint32_ext = 7004; + */ +export const unpacked_uint32_ext = extDesc(fileDesc_extra_extensions_proto2, 16); + +/** + * @generated from extension: optional google.protobuf.UInt32Value wrapper_ext = 8001; + */ +export const wrapper_ext = extDesc(fileDesc_extra_extensions_proto2, 17); + +/** + * @generated from extension: optional proto2ext.GroupExt groupext = 8100; + */ +export const groupext = extDesc(fileDesc_extra_extensions_proto2, 18); + +/** + * @generated from extension: repeated proto2ext.RepeatedGroupExt repeatedgroupext = 8101; + */ +export const repeatedgroupext = extDesc(fileDesc_extra_extensions_proto2, 19); + diff --git a/packages/protobuf-test/src/gen/js/extra/extensions-proto3_pbv2.d.ts b/packages/protobuf-test/src/gen/js/extra/extensions-proto3_pbv2.d.ts new file mode 100644 index 000000000..0cdd2204b --- /dev/null +++ b/packages/protobuf-test/src/gen/js/extra/extensions-proto3_pbv2.d.ts @@ -0,0 +1,44 @@ +// Copyright 2021-2024 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// @generated by protoc-gen-es-next v1.7.2 with parameter "ts_nocheck=false,target=js+dts" +// @generated from file extra/extensions-proto3.proto (package proto3ext, syntax proto3) +/* eslint-disable */ + +import type { DescFile } from "@bufbuild/protobuf"; +import type { TypedDescExtension } from "@bufbuild/protobuf/next/codegenv1"; +import type { FileOptions } from "@bufbuild/protobuf/next"; + +export declare const fileDesc_extra_extensions_proto3: DescFile; + +/** + * @generated from extension: uint32 uint32_ext = 1001; + */ +export declare const uint32_ext: TypedDescExtension; + +/** + * @generated from extension: optional uint32 optional_uint32_ext = 1002; + */ +export declare const optional_uint32_ext: TypedDescExtension; + +/** + * @generated from extension: repeated uint32 packed_uint32_ext = 7003; + */ +export declare const packed_uint32_ext: TypedDescExtension; + +/** + * @generated from extension: repeated uint32 unpacked_uint32_ext = 7004 [packed = false]; + */ +export declare const unpacked_uint32_ext: TypedDescExtension; + diff --git a/packages/protobuf-test/src/gen/js/extra/extensions-proto3_pbv2.js b/packages/protobuf-test/src/gen/js/extra/extensions-proto3_pbv2.js new file mode 100644 index 000000000..d411ab10f --- /dev/null +++ b/packages/protobuf-test/src/gen/js/extra/extensions-proto3_pbv2.js @@ -0,0 +1,43 @@ +// Copyright 2021-2024 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// @generated by protoc-gen-es-next v1.7.2 with parameter "ts_nocheck=false,target=js+dts" +// @generated from file extra/extensions-proto3.proto (package proto3ext, syntax proto3) +/* eslint-disable */ + +import { extDesc, fileDesc } from "@bufbuild/protobuf/next/codegenv1"; +import { fileDesc_google_protobuf_descriptor } from "@bufbuild/protobuf/next"; + +export const fileDesc_extra_extensions_proto3 = fileDesc("Ch1leHRyYS9leHRlbnNpb25zLXByb3RvMy5wcm90bxIJcHJvdG8zZXh0OjwKCnVpbnQzMl9leHQSHC5nb29nbGUucHJvdG9idWYuRmlsZU9wdGlvbnMY6QcgASgNUgl1aW50MzJFeHQ6UAoTb3B0aW9uYWxfdWludDMyX2V4dBIcLmdvb2dsZS5wcm90b2J1Zi5GaWxlT3B0aW9ucxjqByABKA1SEW9wdGlvbmFsVWludDMyRXh0iAEBOkkKEXBhY2tlZF91aW50MzJfZXh0EhwuZ29vZ2xlLnByb3RvYnVmLkZpbGVPcHRpb25zGNs2IAMoDVIPcGFja2VkVWludDMyRXh0OlEKE3VucGFja2VkX3VpbnQzMl9leHQSHC5nb29nbGUucHJvdG9idWYuRmlsZU9wdGlvbnMY3DYgAygNQgIQAFIRdW5wYWNrZWRVaW50MzJFeHRiBnByb3RvMw", [fileDesc_google_protobuf_descriptor]); + +/** + * @generated from extension: uint32 uint32_ext = 1001; + */ +export const uint32_ext = extDesc(fileDesc_extra_extensions_proto3, 0); + +/** + * @generated from extension: optional uint32 optional_uint32_ext = 1002; + */ +export const optional_uint32_ext = extDesc(fileDesc_extra_extensions_proto3, 1); + +/** + * @generated from extension: repeated uint32 packed_uint32_ext = 7003; + */ +export const packed_uint32_ext = extDesc(fileDesc_extra_extensions_proto3, 2); + +/** + * @generated from extension: repeated uint32 unpacked_uint32_ext = 7004 [packed = false]; + */ +export const unpacked_uint32_ext = extDesc(fileDesc_extra_extensions_proto3, 3); + diff --git a/packages/protobuf-test/src/gen/js/extra/jstype-proto2_pbv2.d.ts b/packages/protobuf-test/src/gen/js/extra/jstype-proto2_pbv2.d.ts new file mode 100644 index 000000000..418b28e12 --- /dev/null +++ b/packages/protobuf-test/src/gen/js/extra/jstype-proto2_pbv2.d.ts @@ -0,0 +1,256 @@ +// Copyright 2021-2024 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// @generated by protoc-gen-es-next v1.7.2 with parameter "ts_nocheck=false,target=js+dts" +// @generated from file extra/jstype-proto2.proto (package spec, syntax proto2) +/* eslint-disable */ + +import type { DescFile } from "@bufbuild/protobuf"; +import type { Message } from "@bufbuild/protobuf/next"; +import type { TypedDescMessage } from "@bufbuild/protobuf/next/codegenv1"; + +export declare const fileDesc_extra_jstype_proto2: DescFile; + +/** + * @generated from message spec.JSTypeProto2OmittedMessage + */ +export declare type JSTypeProto2OmittedMessage = Message<"spec.JSTypeProto2OmittedMessage"> & { + /** + * @generated from field: optional fixed64 fixed64_field = 1; + */ + fixed64Field: bigint; + + /** + * @generated from field: optional int64 int64_field = 3; + */ + int64Field: bigint; + + /** + * @generated from field: optional sfixed64 sfixed64_field = 4; + */ + sfixed64Field: bigint; + + /** + * @generated from field: optional sint64 sint64_field = 5; + */ + sint64Field: bigint; + + /** + * @generated from field: optional uint64 uint64_field = 6; + */ + uint64Field: bigint; + + /** + * @generated from field: repeated fixed64 repeated_fixed64_field = 11; + */ + repeatedFixed64Field: bigint[]; + + /** + * @generated from field: repeated int64 repeated_int64_field = 12; + */ + repeatedInt64Field: bigint[]; + + /** + * @generated from field: repeated sfixed64 repeated_sfixed64_field = 13; + */ + repeatedSfixed64Field: bigint[]; + + /** + * @generated from field: repeated sint64 repeated_sint64_field = 14; + */ + repeatedSint64Field: bigint[]; + + /** + * @generated from field: repeated uint64 repeated_uint64_field = 15; + */ + repeatedUint64Field: bigint[]; +}; + +// Describes the message spec.JSTypeProto2OmittedMessage. Use `create(JSTypeProto2OmittedMessageDesc)` to create a new JSTypeProto2OmittedMessage. +export declare const JSTypeProto2OmittedMessageDesc: TypedDescMessage; + +/** + * @generated from message spec.JSTypeProto2NormalMessage + */ +export declare type JSTypeProto2NormalMessage = Message<"spec.JSTypeProto2NormalMessage"> & { + /** + * @generated from field: optional fixed64 fixed64_field = 1 [jstype = JS_NORMAL]; + */ + fixed64Field: bigint; + + /** + * @generated from field: optional int64 int64_field = 3 [jstype = JS_NORMAL]; + */ + int64Field: bigint; + + /** + * @generated from field: optional sfixed64 sfixed64_field = 4 [jstype = JS_NORMAL]; + */ + sfixed64Field: bigint; + + /** + * @generated from field: optional sint64 sint64_field = 5 [jstype = JS_NORMAL]; + */ + sint64Field: bigint; + + /** + * @generated from field: optional uint64 uint64_field = 6 [jstype = JS_NORMAL]; + */ + uint64Field: bigint; + + /** + * @generated from field: repeated fixed64 repeated_fixed64_field = 11 [jstype = JS_NORMAL]; + */ + repeatedFixed64Field: bigint[]; + + /** + * @generated from field: repeated int64 repeated_int64_field = 12 [jstype = JS_NORMAL]; + */ + repeatedInt64Field: bigint[]; + + /** + * @generated from field: repeated sfixed64 repeated_sfixed64_field = 13 [jstype = JS_NORMAL]; + */ + repeatedSfixed64Field: bigint[]; + + /** + * @generated from field: repeated sint64 repeated_sint64_field = 14 [jstype = JS_NORMAL]; + */ + repeatedSint64Field: bigint[]; + + /** + * @generated from field: repeated uint64 repeated_uint64_field = 15 [jstype = JS_NORMAL]; + */ + repeatedUint64Field: bigint[]; +}; + +// Describes the message spec.JSTypeProto2NormalMessage. Use `create(JSTypeProto2NormalMessageDesc)` to create a new JSTypeProto2NormalMessage. +export declare const JSTypeProto2NormalMessageDesc: TypedDescMessage; + +/** + * @generated from message spec.JSTypeProto2StringMessage + */ +export declare type JSTypeProto2StringMessage = Message<"spec.JSTypeProto2StringMessage"> & { + /** + * @generated from field: optional fixed64 fixed64_field = 1 [jstype = JS_STRING]; + */ + fixed64Field: string; + + /** + * @generated from field: optional int64 int64_field = 3 [jstype = JS_STRING]; + */ + int64Field: string; + + /** + * @generated from field: optional sfixed64 sfixed64_field = 4 [jstype = JS_STRING]; + */ + sfixed64Field: string; + + /** + * @generated from field: optional sint64 sint64_field = 5 [jstype = JS_STRING]; + */ + sint64Field: string; + + /** + * @generated from field: optional uint64 uint64_field = 6 [jstype = JS_STRING]; + */ + uint64Field: string; + + /** + * @generated from field: repeated fixed64 repeated_fixed64_field = 11 [jstype = JS_STRING]; + */ + repeatedFixed64Field: string[]; + + /** + * @generated from field: repeated int64 repeated_int64_field = 12 [jstype = JS_STRING]; + */ + repeatedInt64Field: string[]; + + /** + * @generated from field: repeated sfixed64 repeated_sfixed64_field = 13 [jstype = JS_STRING]; + */ + repeatedSfixed64Field: string[]; + + /** + * @generated from field: repeated sint64 repeated_sint64_field = 14 [jstype = JS_STRING]; + */ + repeatedSint64Field: string[]; + + /** + * @generated from field: repeated uint64 repeated_uint64_field = 15 [jstype = JS_STRING]; + */ + repeatedUint64Field: string[]; +}; + +// Describes the message spec.JSTypeProto2StringMessage. Use `create(JSTypeProto2StringMessageDesc)` to create a new JSTypeProto2StringMessage. +export declare const JSTypeProto2StringMessageDesc: TypedDescMessage; + +/** + * @generated from message spec.JSTypeProto2NumberMessage + */ +export declare type JSTypeProto2NumberMessage = Message<"spec.JSTypeProto2NumberMessage"> & { + /** + * @generated from field: optional fixed64 fixed64_field = 1 [jstype = JS_NUMBER]; + */ + fixed64Field: bigint; + + /** + * @generated from field: optional int64 int64_field = 3 [jstype = JS_NUMBER]; + */ + int64Field: bigint; + + /** + * @generated from field: optional sfixed64 sfixed64_field = 4 [jstype = JS_NUMBER]; + */ + sfixed64Field: bigint; + + /** + * @generated from field: optional sint64 sint64_field = 5 [jstype = JS_NUMBER]; + */ + sint64Field: bigint; + + /** + * @generated from field: optional uint64 uint64_field = 6 [jstype = JS_NUMBER]; + */ + uint64Field: bigint; + + /** + * @generated from field: repeated fixed64 repeated_fixed64_field = 11 [jstype = JS_NUMBER]; + */ + repeatedFixed64Field: bigint[]; + + /** + * @generated from field: repeated int64 repeated_int64_field = 12 [jstype = JS_NUMBER]; + */ + repeatedInt64Field: bigint[]; + + /** + * @generated from field: repeated sfixed64 repeated_sfixed64_field = 13 [jstype = JS_NUMBER]; + */ + repeatedSfixed64Field: bigint[]; + + /** + * @generated from field: repeated sint64 repeated_sint64_field = 14 [jstype = JS_NUMBER]; + */ + repeatedSint64Field: bigint[]; + + /** + * @generated from field: repeated uint64 repeated_uint64_field = 15 [jstype = JS_NUMBER]; + */ + repeatedUint64Field: bigint[]; +}; + +// Describes the message spec.JSTypeProto2NumberMessage. Use `create(JSTypeProto2NumberMessageDesc)` to create a new JSTypeProto2NumberMessage. +export declare const JSTypeProto2NumberMessageDesc: TypedDescMessage; + diff --git a/packages/protobuf-test/src/gen/js/extra/jstype-proto2_pbv2.js b/packages/protobuf-test/src/gen/js/extra/jstype-proto2_pbv2.js new file mode 100644 index 000000000..f1f46c54a --- /dev/null +++ b/packages/protobuf-test/src/gen/js/extra/jstype-proto2_pbv2.js @@ -0,0 +1,34 @@ +// Copyright 2021-2024 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// @generated by protoc-gen-es-next v1.7.2 with parameter "ts_nocheck=false,target=js+dts" +// @generated from file extra/jstype-proto2.proto (package spec, syntax proto2) +/* eslint-disable */ + +import { fileDesc, messageDesc } from "@bufbuild/protobuf/next/codegenv1"; + +export const fileDesc_extra_jstype_proto2 = fileDesc("ChlleHRyYS9qc3R5cGUtcHJvdG8yLnByb3RvEgRzcGVjIqkCChpKU1R5cGVQcm90bzJPbWl0dGVkTWVzc2FnZRIVCg1maXhlZDY0X2ZpZWxkGAEgASgGEhMKC2ludDY0X2ZpZWxkGAMgASgDEhYKDnNmaXhlZDY0X2ZpZWxkGAQgASgQEhQKDHNpbnQ2NF9maWVsZBgFIAEoEhIUCgx1aW50NjRfZmllbGQYBiABKAQSHgoWcmVwZWF0ZWRfZml4ZWQ2NF9maWVsZBgLIAMoBhIcChRyZXBlYXRlZF9pbnQ2NF9maWVsZBgMIAMoAxIfChd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hcKC2ludDY0X2ZpZWxkGAMgASgDQgIwAhIaCg5zZml4ZWQ2NF9maWVsZBgEIAEoEEICMAISGAoMc2ludDY0X2ZpZWxkGAUgASgSQgIwAhIYCgx1aW50NjRfZmllbGQYBiABKARCAjACEiIKFnJlcGVhdGVkX2ZpeGVkNjRfZmllbGQYCyADKAZCAjACEiAKFHJlcGVhdGVkX2ludDY0X2ZpZWxkGAwgAygDQgIwAhIjChdyZXBlYXRlZF9zZml4ZWQ2NF9maWVsZBgNIAMoEEICMAISIQoVcmVwZWF0ZWRfc2ludDY0X2ZpZWxkGA4gAygSQgIwAhIhChVyZXBlYXRlZF91aW50NjRfZmllbGQYDyADKARCAjAC"); + +// Describes the message spec.JSTypeProto2OmittedMessage. Use `create(JSTypeProto2OmittedMessageDesc)` to create a new JSTypeProto2OmittedMessage. +export const JSTypeProto2OmittedMessageDesc = messageDesc(fileDesc_extra_jstype_proto2, 0); + +// Describes the message spec.JSTypeProto2NormalMessage. Use `create(JSTypeProto2NormalMessageDesc)` to create a new JSTypeProto2NormalMessage. +export const JSTypeProto2NormalMessageDesc = messageDesc(fileDesc_extra_jstype_proto2, 1); + +// Describes the message spec.JSTypeProto2StringMessage. Use `create(JSTypeProto2StringMessageDesc)` to create a new JSTypeProto2StringMessage. +export const JSTypeProto2StringMessageDesc = messageDesc(fileDesc_extra_jstype_proto2, 2); + +// Describes the message spec.JSTypeProto2NumberMessage. Use `create(JSTypeProto2NumberMessageDesc)` to create a new JSTypeProto2NumberMessage. +export const JSTypeProto2NumberMessageDesc = messageDesc(fileDesc_extra_jstype_proto2, 3); + diff --git a/packages/protobuf-test/src/gen/js/extra/jstype_pb.d.ts b/packages/protobuf-test/src/gen/js/extra/jstype_pb.d.ts index 23a807a33..01fc622ac 100644 --- a/packages/protobuf-test/src/gen/js/extra/jstype_pb.d.ts +++ b/packages/protobuf-test/src/gen/js/extra/jstype_pb.d.ts @@ -21,6 +21,7 @@ import { Message, proto3 } from "@bufbuild/protobuf"; /** * @generated from message spec.JSTypeOmittedMessage + * @deprecated */ export declare class JSTypeOmittedMessage extends Message { /** @@ -90,6 +91,7 @@ export declare class JSTypeOmittedMessage extends Message /** * @generated from message spec.JSTypeNormalMessage + * @deprecated */ export declare class JSTypeNormalMessage extends Message { /** @@ -159,6 +161,7 @@ export declare class JSTypeNormalMessage extends Message { /** * @generated from message spec.JSTypeStringMessage + * @deprecated */ export declare class JSTypeStringMessage extends Message { /** @@ -228,6 +231,7 @@ export declare class JSTypeStringMessage extends Message { /** * @generated from message spec.JSTypeNumberMessage + * @deprecated */ export declare class JSTypeNumberMessage extends Message { /** diff --git a/packages/protobuf-test/src/gen/js/extra/jstype_pb.js b/packages/protobuf-test/src/gen/js/extra/jstype_pb.js index 40dea3eaa..811e6fd54 100644 --- a/packages/protobuf-test/src/gen/js/extra/jstype_pb.js +++ b/packages/protobuf-test/src/gen/js/extra/jstype_pb.js @@ -20,6 +20,7 @@ import { proto3 } from "@bufbuild/protobuf"; /** * @generated from message spec.JSTypeOmittedMessage + * @deprecated */ export const JSTypeOmittedMessage = proto3.makeMessageType( "spec.JSTypeOmittedMessage", @@ -39,6 +40,7 @@ export const JSTypeOmittedMessage = proto3.makeMessageType( /** * @generated from message spec.JSTypeNormalMessage + * @deprecated */ export const JSTypeNormalMessage = proto3.makeMessageType( "spec.JSTypeNormalMessage", @@ -58,6 +60,7 @@ export const JSTypeNormalMessage = proto3.makeMessageType( /** * @generated from message spec.JSTypeStringMessage + * @deprecated */ export const JSTypeStringMessage = proto3.makeMessageType( "spec.JSTypeStringMessage", @@ -77,6 +80,7 @@ export const JSTypeStringMessage = proto3.makeMessageType( /** * @generated from message spec.JSTypeNumberMessage + * @deprecated */ export const JSTypeNumberMessage = proto3.makeMessageType( "spec.JSTypeNumberMessage", diff --git a/packages/protobuf-test/src/gen/js/extra/jstype_pbv2.d.ts b/packages/protobuf-test/src/gen/js/extra/jstype_pbv2.d.ts new file mode 100644 index 000000000..40b7d36ad --- /dev/null +++ b/packages/protobuf-test/src/gen/js/extra/jstype_pbv2.d.ts @@ -0,0 +1,260 @@ +// Copyright 2021-2024 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// @generated by protoc-gen-es-next v1.7.2 with parameter "ts_nocheck=false,target=js+dts" +// @generated from file extra/jstype.proto (package spec, syntax proto3) +/* eslint-disable */ + +import type { DescFile } from "@bufbuild/protobuf"; +import type { Message } from "@bufbuild/protobuf/next"; +import type { TypedDescMessage } from "@bufbuild/protobuf/next/codegenv1"; + +export declare const fileDesc_extra_jstype: DescFile; + +/** + * @generated from message spec.JSTypeOmittedMessage + * @deprecated + */ +export declare type JSTypeOmittedMessage = Message<"spec.JSTypeOmittedMessage"> & { + /** + * @generated from field: fixed64 fixed64_field = 1; + */ + fixed64Field: bigint; + + /** + * @generated from field: int64 int64_field = 3; + */ + int64Field: bigint; + + /** + * @generated from field: sfixed64 sfixed64_field = 4; + */ + sfixed64Field: bigint; + + /** + * @generated from field: sint64 sint64_field = 5; + */ + sint64Field: bigint; + + /** + * @generated from field: uint64 uint64_field = 6; + */ + uint64Field: bigint; + + /** + * @generated from field: repeated fixed64 repeated_fixed64_field = 11; + */ + repeatedFixed64Field: bigint[]; + + /** + * @generated from field: repeated int64 repeated_int64_field = 12; + */ + repeatedInt64Field: bigint[]; + + /** + * @generated from field: repeated sfixed64 repeated_sfixed64_field = 13; + */ + repeatedSfixed64Field: bigint[]; + + /** + * @generated from field: repeated sint64 repeated_sint64_field = 14; + */ + repeatedSint64Field: bigint[]; + + /** + * @generated from field: repeated uint64 repeated_uint64_field = 15; + */ + repeatedUint64Field: bigint[]; +}; + +// Describes the message spec.JSTypeOmittedMessage. Use `create(JSTypeOmittedMessageDesc)` to create a new JSTypeOmittedMessage. +export declare const JSTypeOmittedMessageDesc: TypedDescMessage; + +/** + * @generated from message spec.JSTypeNormalMessage + * @deprecated + */ +export declare type JSTypeNormalMessage = Message<"spec.JSTypeNormalMessage"> & { + /** + * @generated from field: fixed64 fixed64_field = 1 [jstype = JS_NORMAL]; + */ + fixed64Field: bigint; + + /** + * @generated from field: int64 int64_field = 3 [jstype = JS_NORMAL]; + */ + int64Field: bigint; + + /** + * @generated from field: sfixed64 sfixed64_field = 4 [jstype = JS_NORMAL]; + */ + sfixed64Field: bigint; + + /** + * @generated from field: sint64 sint64_field = 5 [jstype = JS_NORMAL]; + */ + sint64Field: bigint; + + /** + * @generated from field: uint64 uint64_field = 6 [jstype = JS_NORMAL]; + */ + uint64Field: bigint; + + /** + * @generated from field: repeated fixed64 repeated_fixed64_field = 11 [jstype = JS_NORMAL]; + */ + repeatedFixed64Field: bigint[]; + + /** + * @generated from field: repeated int64 repeated_int64_field = 12 [jstype = JS_NORMAL]; + */ + repeatedInt64Field: bigint[]; + + /** + * @generated from field: repeated sfixed64 repeated_sfixed64_field = 13 [jstype = JS_NORMAL]; + */ + repeatedSfixed64Field: bigint[]; + + /** + * @generated from field: repeated sint64 repeated_sint64_field = 14 [jstype = JS_NORMAL]; + */ + repeatedSint64Field: bigint[]; + + /** + * @generated from field: repeated uint64 repeated_uint64_field = 15 [jstype = JS_NORMAL]; + */ + repeatedUint64Field: bigint[]; +}; + +// Describes the message spec.JSTypeNormalMessage. Use `create(JSTypeNormalMessageDesc)` to create a new JSTypeNormalMessage. +export declare const JSTypeNormalMessageDesc: TypedDescMessage; + +/** + * @generated from message spec.JSTypeStringMessage + * @deprecated + */ +export declare type JSTypeStringMessage = Message<"spec.JSTypeStringMessage"> & { + /** + * @generated from field: fixed64 fixed64_field = 1 [jstype = JS_STRING]; + */ + fixed64Field: string; + + /** + * @generated from field: int64 int64_field = 3 [jstype = JS_STRING]; + */ + int64Field: string; + + /** + * @generated from field: sfixed64 sfixed64_field = 4 [jstype = JS_STRING]; + */ + sfixed64Field: string; + + /** + * @generated from field: sint64 sint64_field = 5 [jstype = JS_STRING]; + */ + sint64Field: string; + + /** + * @generated from field: uint64 uint64_field = 6 [jstype = JS_STRING]; + */ + uint64Field: string; + + /** + * @generated from field: repeated fixed64 repeated_fixed64_field = 11 [jstype = JS_STRING]; + */ + repeatedFixed64Field: string[]; + + /** + * @generated from field: repeated int64 repeated_int64_field = 12 [jstype = JS_STRING]; + */ + repeatedInt64Field: string[]; + + /** + * @generated from field: repeated sfixed64 repeated_sfixed64_field = 13 [jstype = JS_STRING]; + */ + repeatedSfixed64Field: string[]; + + /** + * @generated from field: repeated sint64 repeated_sint64_field = 14 [jstype = JS_STRING]; + */ + repeatedSint64Field: string[]; + + /** + * @generated from field: repeated uint64 repeated_uint64_field = 15 [jstype = JS_STRING]; + */ + repeatedUint64Field: string[]; +}; + +// Describes the message spec.JSTypeStringMessage. Use `create(JSTypeStringMessageDesc)` to create a new JSTypeStringMessage. +export declare const JSTypeStringMessageDesc: TypedDescMessage; + +/** + * @generated from message spec.JSTypeNumberMessage + * @deprecated + */ +export declare type JSTypeNumberMessage = Message<"spec.JSTypeNumberMessage"> & { + /** + * @generated from field: fixed64 fixed64_field = 1 [jstype = JS_NUMBER]; + */ + fixed64Field: bigint; + + /** + * @generated from field: int64 int64_field = 3 [jstype = JS_NUMBER]; + */ + int64Field: bigint; + + /** + * @generated from field: sfixed64 sfixed64_field = 4 [jstype = JS_NUMBER]; + */ + sfixed64Field: bigint; + + /** + * @generated from field: sint64 sint64_field = 5 [jstype = JS_NUMBER]; + */ + sint64Field: bigint; + + /** + * @generated from field: uint64 uint64_field = 6 [jstype = JS_NUMBER]; + */ + uint64Field: bigint; + + /** + * @generated from field: repeated fixed64 repeated_fixed64_field = 11 [jstype = JS_NUMBER]; + */ + repeatedFixed64Field: bigint[]; + + /** + * @generated from field: repeated int64 repeated_int64_field = 12 [jstype = JS_NUMBER]; + */ + repeatedInt64Field: bigint[]; + + /** + * @generated from field: repeated sfixed64 repeated_sfixed64_field = 13 [jstype = JS_NUMBER]; + */ + repeatedSfixed64Field: bigint[]; + + /** + * @generated from field: repeated sint64 repeated_sint64_field = 14 [jstype = JS_NUMBER]; + */ + repeatedSint64Field: bigint[]; + + /** + * @generated from field: repeated uint64 repeated_uint64_field = 15 [jstype = JS_NUMBER]; + */ + repeatedUint64Field: bigint[]; +}; + +// Describes the message spec.JSTypeNumberMessage. Use `create(JSTypeNumberMessageDesc)` to create a new JSTypeNumberMessage. +export declare const JSTypeNumberMessageDesc: TypedDescMessage; + diff --git a/packages/protobuf-test/src/gen/js/extra/jstype_pbv2.js b/packages/protobuf-test/src/gen/js/extra/jstype_pbv2.js new file mode 100644 index 000000000..637f18ebe --- /dev/null +++ b/packages/protobuf-test/src/gen/js/extra/jstype_pbv2.js @@ -0,0 +1,34 @@ +// Copyright 2021-2024 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// @generated by protoc-gen-es-next v1.7.2 with parameter "ts_nocheck=false,target=js+dts" +// @generated from file extra/jstype.proto (package spec, syntax proto3) +/* eslint-disable */ + +import { fileDesc, messageDesc } from "@bufbuild/protobuf/next/codegenv1"; + +export const fileDesc_extra_jstype = fileDesc("ChJleHRyYS9qc3R5cGUucHJvdG8SBHNwZWMiowIKFEpTVHlwZU9taXR0ZWRNZXNzYWdlEhUKDWZpeGVkNjRfZmllbGQYASABKAYSEwoLaW50NjRfZmllbGQYAyABKAMSFgoOc2ZpeGVkNjRfZmllbGQYBCABKBASFAoMc2ludDY0X2ZpZWxkGAUgAS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EiEKFXJlcGVhdGVkX3VpbnQ2NF9maWVsZBgPIAMoBEICMAEiygIKE0pTVHlwZU51bWJlck1lc3NhZ2USGQoNZml4ZWQ2NF9maWVsZBgBIAEoBkICMAISFwoLaW50NjRfZmllbGQYAyABKANCAjACEhoKDnNmaXhlZDY0X2ZpZWxkGAQgASgQQgIwAhIYCgxzaW50NjRfZmllbGQYBSABKBJCAjACEhgKDHVpbnQ2NF9maWVsZBgGIAEoBEICMAISIgoWcmVwZWF0ZWRfZml4ZWQ2NF9maWVsZBgLIAMoBkICMAISIAoUcmVwZWF0ZWRfaW50NjRfZmllbGQYDCADKANCAjACEiMKF3JlcGVhdGVkX3NmaXhlZDY0X2ZpZWxkGA0gAygQQgIwAhIhChVyZXBlYXRlZF9zaW50NjRfZmllbGQYDiADKBJCAjACEiEKFXJlcGVhdGVkX3VpbnQ2NF9maWVsZBgPIAMoBEICMAJCA7gBAWIGcHJvdG8z"); + +// Describes the message spec.JSTypeOmittedMessage. Use `create(JSTypeOmittedMessageDesc)` to create a new JSTypeOmittedMessage. +export const JSTypeOmittedMessageDesc = messageDesc(fileDesc_extra_jstype, 0); + +// Describes the message spec.JSTypeNormalMessage. Use `create(JSTypeNormalMessageDesc)` to create a new JSTypeNormalMessage. +export const JSTypeNormalMessageDesc = messageDesc(fileDesc_extra_jstype, 1); + +// Describes the message spec.JSTypeStringMessage. Use `create(JSTypeStringMessageDesc)` to create a new JSTypeStringMessage. +export const JSTypeStringMessageDesc = messageDesc(fileDesc_extra_jstype, 2); + +// Describes the message spec.JSTypeNumberMessage. Use `create(JSTypeNumberMessageDesc)` to create a new JSTypeNumberMessage. +export const JSTypeNumberMessageDesc = messageDesc(fileDesc_extra_jstype, 3); + diff --git a/packages/protobuf-test/src/gen/js/extra/msg-json-names_pbv2.d.ts b/packages/protobuf-test/src/gen/js/extra/msg-json-names_pbv2.d.ts new file mode 100644 index 000000000..2ead016b2 --- /dev/null +++ b/packages/protobuf-test/src/gen/js/extra/msg-json-names_pbv2.d.ts @@ -0,0 +1,57 @@ +// Copyright 2021-2024 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// @generated by protoc-gen-es-next v1.7.2 with parameter "ts_nocheck=false,target=js+dts" +// @generated from file extra/msg-json-names.proto (package spec, syntax proto3) +/* eslint-disable */ + +import type { DescFile } from "@bufbuild/protobuf"; +import type { Message } from "@bufbuild/protobuf/next"; +import type { TypedDescMessage } from "@bufbuild/protobuf/next/codegenv1"; + +export declare const fileDesc_extra_msg_json_names: DescFile; + +/** + * @generated from message spec.JsonNamesMessage + */ +export declare type JsonNamesMessage = Message<"spec.JsonNamesMessage"> & { + /** + * @generated from field: string scalar_field = 1 [json_name = "scalarFieldJsonName"]; + */ + scalarField: string; + + /** + * @generated from field: repeated string repeated_scalar_field = 2 [json_name = "repeatedScalarFieldJsonName"]; + */ + repeatedScalarField: string[]; + + /** + * @generated from field: string a = 3; + */ + a: string; + + /** + * @generated from field: string b = 4 [json_name = ""]; + */ + b: string; + + /** + * @generated from field: string c = 5 [json_name = "@type"]; + */ + c: string; +}; + +// Describes the message spec.JsonNamesMessage. Use `create(JsonNamesMessageDesc)` to create a new JsonNamesMessage. +export declare const JsonNamesMessageDesc: TypedDescMessage; + diff --git a/packages/protobuf-test/src/gen/js/extra/msg-json-names_pbv2.js b/packages/protobuf-test/src/gen/js/extra/msg-json-names_pbv2.js new file mode 100644 index 000000000..83f2afc16 --- /dev/null +++ b/packages/protobuf-test/src/gen/js/extra/msg-json-names_pbv2.js @@ -0,0 +1,25 @@ +// Copyright 2021-2024 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// @generated by protoc-gen-es-next v1.7.2 with parameter "ts_nocheck=false,target=js+dts" +// @generated from file extra/msg-json-names.proto (package spec, syntax proto3) +/* eslint-disable */ + +import { fileDesc, messageDesc } from "@bufbuild/protobuf/next/codegenv1"; + +export const fileDesc_extra_msg_json_names = fileDesc("ChpleHRyYS9tc2ctanNvbi1uYW1lcy5wcm90bxIEc3BlYyKjAQoQSnNvbk5hbWVzTWVzc2FnZRIpCgxzY2FsYXJfZmllbGQYASABKAlSE3NjYWxhckZpZWxkSnNvbk5hbWUSOgoVcmVwZWF0ZWRfc2NhbGFyX2ZpZWxkGAIgAygJUhtyZXBlYXRlZFNjYWxhckZpZWxkSnNvbk5hbWUSCQoBYRgDIAEoCRILCgFiGAQgASgJUgASEAoBYxgFIAEoCVIFQHR5cGViBnByb3RvMw"); + +// Describes the message spec.JsonNamesMessage. Use `create(JsonNamesMessageDesc)` to create a new JsonNamesMessage. +export const JsonNamesMessageDesc = messageDesc(fileDesc_extra_msg_json_names, 0); + diff --git a/packages/protobuf-test/src/gen/js/extra/msg-maps_pbv2.d.ts b/packages/protobuf-test/src/gen/js/extra/msg-maps_pbv2.d.ts new file mode 100644 index 000000000..a2c931e49 --- /dev/null +++ b/packages/protobuf-test/src/gen/js/extra/msg-maps_pbv2.d.ts @@ -0,0 +1,125 @@ +// Copyright 2021-2024 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// @generated by protoc-gen-es-next v1.7.2 with parameter "ts_nocheck=false,target=js+dts" +// @generated from file extra/msg-maps.proto (package spec, syntax proto3) +/* eslint-disable */ + +import type { DescFile } from "@bufbuild/protobuf"; +import type { Message } from "@bufbuild/protobuf/next"; +import type { TypedDescEnum, TypedDescMessage } from "@bufbuild/protobuf/next/codegenv1"; + +export declare const fileDesc_extra_msg_maps: DescFile; + +/** + * @generated from message spec.MapsMessage + */ +export declare type MapsMessage = Message<"spec.MapsMessage"> & { + /** + * @generated from field: map str_str_field = 1; + */ + strStrField: { [key: string]: string }; + + /** + * @generated from field: map str_int32_field = 2; + */ + strInt32Field: { [key: string]: number }; + + /** + * @generated from field: map str_int64_field = 3; + */ + strInt64Field: { [key: string]: bigint }; + + /** + * @generated from field: map str_bool_field = 4; + */ + strBoolField: { [key: string]: boolean }; + + /** + * @generated from field: map str_bytes_field = 5; + */ + strBytesField: { [key: string]: Uint8Array }; + + /** + * @generated from field: map int32_str_field = 6; + */ + int32StrField: { [key: number]: string }; + + /** + * @generated from field: map int64_str_field = 7; + */ + int64StrField: { [key: string]: string }; + + /** + * @generated from field: map bool_str_field = 8; + */ + boolStrField: { [key: string]: string }; + + /** + * @generated from field: map str_msg_field = 9; + */ + strMsgField: { [key: string]: MapsMessage }; + + /** + * @generated from field: map int32_msg_field = 10; + */ + int32MsgField: { [key: number]: MapsMessage }; + + /** + * @generated from field: map int64_msg_field = 11; + */ + int64MsgField: { [key: string]: MapsMessage }; + + /** + * @generated from field: map str_enu_field = 12; + */ + strEnuField: { [key: string]: MapsEnum }; + + /** + * @generated from field: map int32_enu_field = 13; + */ + int32EnuField: { [key: number]: MapsEnum }; + + /** + * @generated from field: map int64_enu_field = 14; + */ + int64EnuField: { [key: string]: MapsEnum }; +}; + +// Describes the message spec.MapsMessage. Use `create(MapsMessageDesc)` to create a new MapsMessage. +export declare const MapsMessageDesc: TypedDescMessage; + +/** + * @generated from enum spec.MapsEnum + */ +export enum MapsEnum { + /** + * @generated from enum value: MAPS_ENUM_ANY = 0; + */ + ANY = 0, + + /** + * @generated from enum value: MAPS_ENUM_YES = 1; + */ + YES = 1, + + /** + * @generated from enum value: MAPS_ENUM_NO = 2; + */ + NO = 2, +} + +// Describes the enum spec.MapsEnum. +export declare const MapsEnumDesc: TypedDescEnum; + diff --git a/packages/protobuf-test/src/gen/js/extra/msg-maps_pbv2.js b/packages/protobuf-test/src/gen/js/extra/msg-maps_pbv2.js new file mode 100644 index 000000000..f1d1a66e5 --- /dev/null +++ b/packages/protobuf-test/src/gen/js/extra/msg-maps_pbv2.js @@ -0,0 +1,33 @@ +// Copyright 2021-2024 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// @generated by protoc-gen-es-next v1.7.2 with parameter "ts_nocheck=false,target=js+dts" +// @generated from file extra/msg-maps.proto (package spec, syntax proto3) +/* eslint-disable */ + +import { enumDesc, fileDesc, messageDesc, tsEnum } from "@bufbuild/protobuf/next/codegenv1"; + +export const fileDesc_extra_msg_maps = fileDesc("ChRleHRyYS9tc2ctbWFwcy5wcm90bxIEc3BlYyLEDQoLTWFwc01lc3NhZ2USOQoNc3RyX3N0cl9maWVsZBgBIAMoCzIiLnNwZWMuTWFwc01lc3NhZ2UuU3RyU3RyRmllbGRFbnRyeRI9Cg9zdHJfaW50MzJfZmllbGQYAiADKAsyJC5zcGVjLk1hcHNNZXNzYWdlLlN0ckludDMyRmllbGRFbnRyeRI9Cg9zdHJfaW50NjRfZmllbGQYAyADKAsyJC5zcGVjLk1hcHNNZXNzYWdlLlN0ckludDY0Rmll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NQVBTX0VOVU1fTk8QAmIGcHJvdG8z"); + +// Describes the message spec.MapsMessage. Use `create(MapsMessageDesc)` to create a new MapsMessage. +export const MapsMessageDesc = messageDesc(fileDesc_extra_msg_maps, 0); + +// Describes the enum spec.MapsEnum. +export const MapsEnumDesc = enumDesc(fileDesc_extra_msg_maps, 0); + +/** + * @generated from enum spec.MapsEnum + */ +export const MapsEnum = tsEnum(MapsEnumDesc); + diff --git a/packages/protobuf-test/src/gen/js/extra/msg-message_pbv2.d.ts b/packages/protobuf-test/src/gen/js/extra/msg-message_pbv2.d.ts new file mode 100644 index 000000000..b6c6d3a61 --- /dev/null +++ b/packages/protobuf-test/src/gen/js/extra/msg-message_pbv2.d.ts @@ -0,0 +1,55 @@ +// Copyright 2021-2024 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// @generated by protoc-gen-es-next v1.7.2 with parameter "ts_nocheck=false,target=js+dts" +// @generated from file extra/msg-message.proto (package spec, syntax proto3) +/* eslint-disable */ + +import type { DescFile } from "@bufbuild/protobuf"; +import type { Message } from "@bufbuild/protobuf/next"; +import type { TypedDescMessage } from "@bufbuild/protobuf/next/codegenv1"; + +export declare const fileDesc_extra_msg_message: DescFile; + +/** + * @generated from message spec.MessageFieldMessage + */ +export declare type MessageFieldMessage = Message<"spec.MessageFieldMessage"> & { + /** + * @generated from field: spec.MessageFieldMessage.TestMessage message_field = 1; + */ + messageField?: MessageFieldMessage_TestMessage; + + /** + * @generated from field: repeated spec.MessageFieldMessage.TestMessage repeated_message_field = 2; + */ + repeatedMessageField: MessageFieldMessage_TestMessage[]; +}; + +// Describes the message spec.MessageFieldMessage. Use `create(MessageFieldMessageDesc)` to create a new MessageFieldMessage. +export declare const MessageFieldMessageDesc: TypedDescMessage; + +/** + * @generated from message spec.MessageFieldMessage.TestMessage + */ +export declare type MessageFieldMessage_TestMessage = Message<"spec.MessageFieldMessage.TestMessage"> & { + /** + * @generated from field: string name = 1; + */ + name: string; +}; + +// Describes the message spec.MessageFieldMessage.TestMessage. Use `create(MessageFieldMessage_TestMessageDesc)` to create a new MessageFieldMessage_TestMessage. +export declare const MessageFieldMessage_TestMessageDesc: TypedDescMessage; + diff --git a/packages/protobuf-test/src/gen/js/extra/msg-message_pbv2.js b/packages/protobuf-test/src/gen/js/extra/msg-message_pbv2.js new file mode 100644 index 000000000..84a148684 --- /dev/null +++ b/packages/protobuf-test/src/gen/js/extra/msg-message_pbv2.js @@ -0,0 +1,28 @@ +// Copyright 2021-2024 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// @generated by protoc-gen-es-next v1.7.2 with parameter "ts_nocheck=false,target=js+dts" +// @generated from file extra/msg-message.proto (package spec, syntax proto3) +/* eslint-disable */ + +import { fileDesc, messageDesc } from "@bufbuild/protobuf/next/codegenv1"; + +export const fileDesc_extra_msg_message = fileDesc("ChdleHRyYS9tc2ctbWVzc2FnZS5wcm90bxIEc3BlYyK3AQoTTWVzc2FnZUZpZWxkTWVzc2FnZRI8Cg1tZXNzYWdlX2ZpZWxkGAEgASgLMiUuc3BlYy5NZXNzYWdlRmllbGRNZXNzYWdlLlRlc3RNZXNzYWdlEkUKFnJlcGVhdGVkX21lc3NhZ2VfZmllbGQYAiADKAsyJS5zcGVjLk1lc3NhZ2VGaWVsZE1lc3NhZ2UuVGVzdE1lc3NhZ2UaGwoLVGVzdE1lc3NhZ2USDAoEbmFtZRgBIAEoCWIGcHJvdG8z"); + +// Describes the message spec.MessageFieldMessage. Use `create(MessageFieldMessageDesc)` to create a new MessageFieldMessage. +export const MessageFieldMessageDesc = messageDesc(fileDesc_extra_msg_message, 0); + +// Describes the message spec.MessageFieldMessage.TestMessage. Use `create(MessageFieldMessage_TestMessageDesc)` to create a new MessageFieldMessage_TestMessage. +export const MessageFieldMessage_TestMessageDesc = messageDesc(fileDesc_extra_msg_message, 0, 0); + diff --git a/packages/protobuf-test/src/gen/js/extra/msg-oneof_pbv2.d.ts b/packages/protobuf-test/src/gen/js/extra/msg-oneof_pbv2.d.ts new file mode 100644 index 000000000..8a5d95c2e --- /dev/null +++ b/packages/protobuf-test/src/gen/js/extra/msg-oneof_pbv2.d.ts @@ -0,0 +1,148 @@ +// Copyright 2021-2024 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// @generated by protoc-gen-es-next v1.7.2 with parameter "ts_nocheck=false,target=js+dts" +// @generated from file extra/msg-oneof.proto (package spec, syntax proto3) +/* eslint-disable */ + +import type { DescFile } from "@bufbuild/protobuf"; +import type { Message } from "@bufbuild/protobuf/next"; +import type { TypedDescEnum, TypedDescMessage } from "@bufbuild/protobuf/next/codegenv1"; + +export declare const fileDesc_extra_msg_oneof: DescFile; + +/** + * @generated from message spec.OneofMessage + */ +export declare type OneofMessage = Message<"spec.OneofMessage"> & { + /** + * @generated from oneof spec.OneofMessage.scalar + */ + scalar: { + /** + * @generated from field: int32 value = 1; + */ + value: number; + case: "value"; + } | { + /** + * @generated from field: string error = 2; + */ + value: string; + case: "error"; + } | { + /** + * @generated from field: bytes bytes = 3; + */ + value: Uint8Array; + case: "bytes"; + } | { case: undefined; value?: undefined }; + + /** + * @generated from oneof spec.OneofMessage.message + */ + message: { + /** + * @generated from field: spec.OneofMessageFoo foo = 11; + */ + value: OneofMessageFoo; + case: "foo"; + } | { + /** + * @generated from field: spec.OneofMessageBar bar = 12; + */ + value: OneofMessageBar; + case: "bar"; + } | { + /** + * @generated from field: spec.OneofMessageBar baz = 13; + */ + value: OneofMessageBar; + case: "baz"; + } | { case: undefined; value?: undefined }; + + /** + * @generated from oneof spec.OneofMessage.enum + */ + enum: { + /** + * @generated from field: spec.OneofEnum e = 21; + */ + value: OneofEnum; + case: "e"; + } | { case: undefined; value?: undefined }; +}; + +// Describes the message spec.OneofMessage. Use `create(OneofMessageDesc)` to create a new OneofMessage. +export declare const OneofMessageDesc: TypedDescMessage; + +/** + * @generated from message spec.OneofMessageFoo + */ +export declare type OneofMessageFoo = Message<"spec.OneofMessageFoo"> & { + /** + * @generated from field: string name = 1; + */ + name: string; + + /** + * @generated from field: bool toggle = 2; + */ + toggle: boolean; +}; + +// Describes the message spec.OneofMessageFoo. Use `create(OneofMessageFooDesc)` to create a new OneofMessageFoo. +export declare const OneofMessageFooDesc: TypedDescMessage; + +/** + * @generated from message spec.OneofMessageBar + */ +export declare type OneofMessageBar = Message<"spec.OneofMessageBar"> & { + /** + * @generated from field: int32 a = 1; + */ + a: number; + + /** + * @generated from field: int32 b = 2; + */ + b: number; +}; + +// Describes the message spec.OneofMessageBar. Use `create(OneofMessageBarDesc)` to create a new OneofMessageBar. +export declare const OneofMessageBarDesc: TypedDescMessage; + +/** + * @generated from enum spec.OneofEnum + */ +export enum OneofEnum { + /** + * @generated from enum value: ONEOF_ENUM_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * @generated from enum value: ONEOF_ENUM_A = 1; + */ + A = 1, + + /** + * @generated from enum value: ONEOF_ENUM_B = 2; + */ + B = 2, +} + +// Describes the enum spec.OneofEnum. +export declare const OneofEnumDesc: TypedDescEnum; + diff --git a/packages/protobuf-test/src/gen/js/extra/msg-oneof_pbv2.js b/packages/protobuf-test/src/gen/js/extra/msg-oneof_pbv2.js new file mode 100644 index 000000000..24d6ac0f3 --- /dev/null +++ b/packages/protobuf-test/src/gen/js/extra/msg-oneof_pbv2.js @@ -0,0 +1,39 @@ +// Copyright 2021-2024 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// @generated by protoc-gen-es-next v1.7.2 with parameter "ts_nocheck=false,target=js+dts" +// @generated from file extra/msg-oneof.proto (package spec, syntax proto3) +/* eslint-disable */ + +import { enumDesc, fileDesc, messageDesc, tsEnum } from "@bufbuild/protobuf/next/codegenv1"; + +export const fileDesc_extra_msg_oneof = fileDesc("ChVleHRyYS9tc2ctb25lb2YucHJvdG8SBHNwZWMi7gEKDE9uZW9mTWVzc2FnZRIPCgV2YWx1ZRgBIAEoBUgAEg8KBWVycm9yGAIgASgJSAASDwoFYnl0ZXMYAyABKAxIABIkCgNmb28YCyABKAsyFS5zcGVjLk9uZW9mTWVzc2FnZUZvb0gBEiQKA2JhchgMIAEoCzIVLnNwZWMuT25lb2ZNZXNzYWdlQmFySAESJAoDYmF6GA0gASgLMhUuc3BlYy5PbmVvZk1lc3NhZ2VCYXJIARIcCgFlGBUgASgOMg8uc3BlYy5PbmVvZkVudW1IAkIICgZzY2FsYXJCCQoHbWVzc2FnZUIGCgRlbnVtIi8KD09uZW9mTWVzc2FnZUZvbxIMCgRuYW1lGAEgASgJEg4KBnRvZ2dsZRgCIAEoCCInCg9PbmVvZk1lc3NhZ2VCYXISCQoBYRgBIAEoBRIJCgFiGAIgASgFKksKCU9uZW9mRW51bRIaChZPTkVPRl9FTlVNX1VOU1BFQ0lGSUVEEAASEAoMT05FT0ZfRU5VTV9BEAESEAoMT05FT0ZfRU5VTV9CEAJiBnByb3RvMw"); + +// Describes the message spec.OneofMessage. Use `create(OneofMessageDesc)` to create a new OneofMessage. +export const OneofMessageDesc = messageDesc(fileDesc_extra_msg_oneof, 0); + +// Describes the message spec.OneofMessageFoo. Use `create(OneofMessageFooDesc)` to create a new OneofMessageFoo. +export const OneofMessageFooDesc = messageDesc(fileDesc_extra_msg_oneof, 1); + +// Describes the message spec.OneofMessageBar. Use `create(OneofMessageBarDesc)` to create a new OneofMessageBar. +export const OneofMessageBarDesc = messageDesc(fileDesc_extra_msg_oneof, 2); + +// Describes the enum spec.OneofEnum. +export const OneofEnumDesc = enumDesc(fileDesc_extra_msg_oneof, 0); + +/** + * @generated from enum spec.OneofEnum + */ +export const OneofEnum = tsEnum(OneofEnumDesc); + diff --git a/packages/protobuf-test/src/gen/js/extra/msg-scalar_pbv2.d.ts b/packages/protobuf-test/src/gen/js/extra/msg-scalar_pbv2.d.ts new file mode 100644 index 000000000..e74302ffc --- /dev/null +++ b/packages/protobuf-test/src/gen/js/extra/msg-scalar_pbv2.d.ts @@ -0,0 +1,190 @@ +// Copyright 2021-2024 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// @generated by protoc-gen-es-next v1.7.2 with parameter "ts_nocheck=false,target=js+dts" +// @generated from file extra/msg-scalar.proto (package spec, syntax proto3) +/* eslint-disable */ + +import type { DescFile } from "@bufbuild/protobuf"; +import type { Message } from "@bufbuild/protobuf/next"; +import type { TypedDescMessage } from "@bufbuild/protobuf/next/codegenv1"; + +export declare const fileDesc_extra_msg_scalar: DescFile; + +/** + * @generated from message spec.ScalarValuesMessage + */ +export declare type ScalarValuesMessage = Message<"spec.ScalarValuesMessage"> & { + /** + * @generated from field: double double_field = 1; + */ + doubleField: number; + + /** + * @generated from field: float float_field = 2; + */ + floatField: number; + + /** + * @generated from field: int64 int64_field = 3; + */ + int64Field: bigint; + + /** + * @generated from field: uint64 uint64_field = 4; + */ + uint64Field: bigint; + + /** + * @generated from field: int32 int32_field = 5; + */ + int32Field: number; + + /** + * @generated from field: fixed64 fixed64_field = 6; + */ + fixed64Field: bigint; + + /** + * @generated from field: fixed32 fixed32_field = 7; + */ + fixed32Field: number; + + /** + * @generated from field: bool bool_field = 8; + */ + boolField: boolean; + + /** + * @generated from field: string string_field = 9; + */ + stringField: string; + + /** + * @generated from field: bytes bytes_field = 11; + */ + bytesField: Uint8Array; + + /** + * @generated from field: uint32 uint32_field = 12; + */ + uint32Field: number; + + /** + * @generated from field: sfixed32 sfixed32_field = 14; + */ + sfixed32Field: number; + + /** + * @generated from field: sfixed64 sfixed64_field = 15; + */ + sfixed64Field: bigint; + + /** + * @generated from field: sint32 sint32_field = 16; + */ + sint32Field: number; + + /** + * @generated from field: sint64 sint64_field = 17; + */ + sint64Field: bigint; +}; + +// Describes the message spec.ScalarValuesMessage. Use `create(ScalarValuesMessageDesc)` to create a new ScalarValuesMessage. +export declare const ScalarValuesMessageDesc: TypedDescMessage; + +/** + * @generated from message spec.RepeatedScalarValuesMessage + */ +export declare type RepeatedScalarValuesMessage = Message<"spec.RepeatedScalarValuesMessage"> & { + /** + * @generated from field: repeated double double_field = 1; + */ + doubleField: number[]; + + /** + * @generated from field: repeated float float_field = 2; + */ + floatField: number[]; + + /** + * @generated from field: repeated int64 int64_field = 3; + */ + int64Field: bigint[]; + + /** + * @generated from field: repeated uint64 uint64_field = 4; + */ + uint64Field: bigint[]; + + /** + * @generated from field: repeated int32 int32_field = 5; + */ + int32Field: number[]; + + /** + * @generated from field: repeated fixed64 fixed64_field = 6; + */ + fixed64Field: bigint[]; + + /** + * @generated from field: repeated fixed32 fixed32_field = 7; + */ + fixed32Field: number[]; + + /** + * @generated from field: repeated bool bool_field = 8; + */ + boolField: boolean[]; + + /** + * @generated from field: repeated string string_field = 9; + */ + stringField: string[]; + + /** + * @generated from field: repeated bytes bytes_field = 11; + */ + bytesField: Uint8Array[]; + + /** + * @generated from field: repeated uint32 uint32_field = 12; + */ + uint32Field: number[]; + + /** + * @generated from field: repeated sfixed32 sfixed32_field = 14; + */ + sfixed32Field: number[]; + + /** + * @generated from field: repeated sfixed64 sfixed64_field = 15; + */ + sfixed64Field: bigint[]; + + /** + * @generated from field: repeated sint32 sint32_field = 16; + */ + sint32Field: number[]; + + /** + * @generated from field: repeated sint64 sint64_field = 17; + */ + sint64Field: bigint[]; +}; + +// Describes the message spec.RepeatedScalarValuesMessage. Use `create(RepeatedScalarValuesMessageDesc)` to create a new RepeatedScalarValuesMessage. +export declare const RepeatedScalarValuesMessageDesc: TypedDescMessage; + diff --git a/packages/protobuf-test/src/gen/js/extra/msg-scalar_pbv2.js b/packages/protobuf-test/src/gen/js/extra/msg-scalar_pbv2.js new file mode 100644 index 000000000..a00d814f7 --- /dev/null +++ b/packages/protobuf-test/src/gen/js/extra/msg-scalar_pbv2.js @@ -0,0 +1,28 @@ +// Copyright 2021-2024 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// @generated by protoc-gen-es-next v1.7.2 with parameter "ts_nocheck=false,target=js+dts" +// @generated from file extra/msg-scalar.proto (package spec, syntax proto3) +/* eslint-disable */ + +import { fileDesc, messageDesc } from "@bufbuild/protobuf/next/codegenv1"; + +export const fileDesc_extra_msg_scalar = fileDesc("ChZleHRyYS9tc2ctc2NhbGFyLnByb3RvEgRzcGVjIt8CChNTY2FsYXJWYWx1ZXNNZXNzYWdlEhQKDGRvdWJsZV9maWVsZBgBIAEoARITCgtmbG9hdF9maWVsZBgCIAEoAhITCgtpbnQ2NF9maWVsZBgDIAEoAxIUCgx1aW50NjRfZmllbGQYBCABKAQSEwoLaW50MzJfZmllbGQYBSABKAUSFQoNZml4ZWQ2NF9maWVsZBgGIAEoBhIVCg1maXhlZDMyX2ZpZWxkGAcgASgHEhIKCmJvb2xfZmllbGQYCCABKAgSFAoMc3RyaW5nX2ZpZWxkGAkgASgJEhMKC2J5dGVzX2ZpZWxkGAsgASgMEhQKDHVpbnQzMl9maWVsZBgMIAEoDRIWCg5zZml4ZWQzMl9maWVsZBgOIAEoDxIWCg5zZml4ZWQ2NF9maWVsZBgPIAEoEBIUCgxzaW50MzJfZmllbGQYECABKBESFAoMc2ludDY0X2ZpZWxkGBEgASgSIucCChtSZXBlYXRlZFNjYWxhclZhbHVlc01lc3NhZ2USFAoMZG91YmxlX2ZpZWxkGAEgAygBEhMKC2Zsb2F0X2ZpZWxkGAIgAygCEhMKC2ludDY0X2ZpZWxkGAMgAygDEhQKDHVpbnQ2NF9maWVsZBgEIAMoBBITCgtpbnQzMl9maWVsZBgFIAMoBRIVCg1maXhlZDY0X2ZpZWxkGAYgAygGEhUKDWZpeGVkMzJfZmllbGQYByADKAcSEgoKYm9vbF9maWVsZBgIIAMoCBIUCgxzdHJpbmdfZmllbGQYCSADKAkSEwoLYnl0ZXNfZmllbGQYCyADKAwSFAoMdWludDMyX2ZpZWxkGAwgAygNEhYKDnNmaXhlZDMyX2ZpZWxkGA4gAygPEhYKDnNmaXhlZDY0X2ZpZWxkGA8gAygQEhQKDHNpbnQzMl9maWVsZBgQIAMoERIUCgxzaW50NjRfZmllbGQYESADKBJiBnByb3RvMw"); + +// Describes the message spec.ScalarValuesMessage. Use `create(ScalarValuesMessageDesc)` to create a new ScalarValuesMessage. +export const ScalarValuesMessageDesc = messageDesc(fileDesc_extra_msg_scalar, 0); + +// Describes the message spec.RepeatedScalarValuesMessage. Use `create(RepeatedScalarValuesMessageDesc)` to create a new RepeatedScalarValuesMessage. +export const RepeatedScalarValuesMessageDesc = messageDesc(fileDesc_extra_msg_scalar, 1); + diff --git a/packages/protobuf-test/src/gen/js/extra/msg-self-reference_pbv2.d.ts b/packages/protobuf-test/src/gen/js/extra/msg-self-reference_pbv2.d.ts new file mode 100644 index 000000000..52ec59724 --- /dev/null +++ b/packages/protobuf-test/src/gen/js/extra/msg-self-reference_pbv2.d.ts @@ -0,0 +1,47 @@ +// Copyright 2021-2024 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// @generated by protoc-gen-es-next v1.7.2 with parameter "ts_nocheck=false,target=js+dts" +// @generated from file extra/msg-self-reference.proto (package spec, syntax proto3) +/* eslint-disable */ + +import type { DescFile } from "@bufbuild/protobuf"; +import type { Message } from "@bufbuild/protobuf/next"; +import type { TypedDescMessage } from "@bufbuild/protobuf/next/codegenv1"; + +export declare const fileDesc_extra_msg_self_reference: DescFile; + +/** + * @generated from message spec.SelfReferencingMessage + */ +export declare type SelfReferencingMessage = Message<"spec.SelfReferencingMessage"> & { + /** + * @generated from field: spec.SelfReferencingMessage self = 1; + */ + self?: SelfReferencingMessage; + + /** + * @generated from field: repeated spec.SelfReferencingMessage self_list = 2; + */ + selfList: SelfReferencingMessage[]; + + /** + * @generated from field: map self_map = 3; + */ + selfMap: { [key: string]: SelfReferencingMessage }; +}; + +// Describes the message spec.SelfReferencingMessage. Use `create(SelfReferencingMessageDesc)` to create a new SelfReferencingMessage. +export declare const SelfReferencingMessageDesc: TypedDescMessage; + diff --git a/packages/protobuf-test/src/gen/js/extra/msg-self-reference_pbv2.js b/packages/protobuf-test/src/gen/js/extra/msg-self-reference_pbv2.js new file mode 100644 index 000000000..2071984af --- /dev/null +++ b/packages/protobuf-test/src/gen/js/extra/msg-self-reference_pbv2.js @@ -0,0 +1,25 @@ +// Copyright 2021-2024 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// @generated by protoc-gen-es-next v1.7.2 with parameter "ts_nocheck=false,target=js+dts" +// @generated from file extra/msg-self-reference.proto (package spec, syntax proto3) +/* eslint-disable */ + +import { fileDesc, messageDesc } from "@bufbuild/protobuf/next/codegenv1"; + +export const fileDesc_extra_msg_self_reference = fileDesc("Ch5leHRyYS9tc2ctc2VsZi1yZWZlcmVuY2UucHJvdG8SBHNwZWMigAIKFlNlbGZSZWZlcmVuY2luZ01lc3NhZ2USKgoEc2VsZhgBIAEoCzIcLnNwZWMuU2VsZlJlZmVyZW5jaW5nTWVzc2FnZRIvCglzZWxmX2xpc3QYAiADKAsyHC5zcGVjLlNlbGZSZWZlcmVuY2luZ01lc3NhZ2USOwoIc2VsZl9tYXAYAyADKAsyKS5zcGVjLlNlbGZSZWZlcmVuY2luZ01lc3NhZ2UuU2VsZk1hcEVudHJ5GkwKDFNlbGZNYXBFbnRyeRILCgNrZXkYASABKAkSKwoFdmFsdWUYAiABKAsyHC5zcGVjLlNlbGZSZWZlcmVuY2luZ01lc3NhZ2U6AjgBYgZwcm90bzM"); + +// Describes the message spec.SelfReferencingMessage. Use `create(SelfReferencingMessageDesc)` to create a new SelfReferencingMessage. +export const SelfReferencingMessageDesc = messageDesc(fileDesc_extra_msg_self_reference, 0); + diff --git a/packages/protobuf-test/src/gen/js/extra/name-clash_pbv2.d.ts b/packages/protobuf-test/src/gen/js/extra/name-clash_pbv2.d.ts new file mode 100644 index 000000000..94ae3ba48 --- /dev/null +++ b/packages/protobuf-test/src/gen/js/extra/name-clash_pbv2.d.ts @@ -0,0 +1,905 @@ +// Copyright 2021-2024 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// @generated by protoc-gen-es-next v1.7.2 with parameter "ts_nocheck=false,target=js+dts" +// @generated from file extra/name-clash.proto (package spec, syntax proto3) +/* eslint-disable */ + +import type { DescFile, MethodKind } from "@bufbuild/protobuf"; +import type { Message as Message$1 } from "@bufbuild/protobuf/next"; +import type { User as User$1 } from "./example_pbv2.js"; +import type { TypedDescEnum, TypedDescMessage, TypedDescService } from "@bufbuild/protobuf/next/codegenv1"; + +export declare const fileDesc_extra_name_clash: DescFile; + +/** + * This message class will clash with the imported message class + * + * @generated from message spec.User + */ +export declare type User = Message$1<"spec.User"> & { + /** + * Reference the import with the same name to trigger a clash + * + * @generated from field: docs.User u = 1; + */ + u?: User$1; +}; + +// Describes the message spec.User. Use `create(UserDesc)` to create a new User. +export declare const UserDesc: TypedDescMessage; + +/** + * @generated from message spec.ReservedPropertyNames + */ +export declare type ReservedPropertyNames = Message$1<"spec.ReservedPropertyNames"> & { +}; + +// Describes the message spec.ReservedPropertyNames. Use `create(ReservedPropertyNamesDesc)` to create a new ReservedPropertyNames. +export declare const ReservedPropertyNamesDesc: TypedDescMessage; + +/** + * @generated from message spec.ReservedPropertyNames.BuiltIn + */ +export declare type ReservedPropertyNames_BuiltIn = Message$1<"spec.ReservedPropertyNames.BuiltIn"> & { + /** + * built-in constructor() + * + * @generated from field: string constructor = 2; + */ + constructor$: string; + + /** + * built-in toString() + * + * @generated from field: string to_string = 3; + */ + toString$: string; + + /** + * built-in toJSON() + * + * @generated from field: string to_JSON = 4; + */ + toJSON$: string; + + /** + * built-in valueOf() + * + * @generated from field: string value_of = 5; + */ + valueOf$: string; +}; + +// Describes the message spec.ReservedPropertyNames.BuiltIn. Use `create(ReservedPropertyNames_BuiltInDesc)` to create a new ReservedPropertyNames_BuiltIn. +export declare const ReservedPropertyNames_BuiltInDesc: TypedDescMessage; + +/** + * @generated from message spec.ReservedPropertyNames.Runtime + */ +export declare type ReservedPropertyNames_Runtime = Message$1<"spec.ReservedPropertyNames.Runtime"> & { + /** + * runtime toJson() + * + * @generated from field: string to_json = 4; + */ + toJson: string; + + /** + * runtime type() + * + * @generated from field: string type = 6; + */ + type: string; + + /** + * runtime clone() + * + * @generated from field: string clone = 7; + */ + clone: string; + + /** + * runtime equals() + * + * @generated from field: string equals = 8; + */ + equals: string; + + /** + * runtime fromBinary() + * + * @generated from field: string from_binary = 9; + */ + fromBinary: string; + + /** + * runtime fromJson() + * + * @generated from field: string from_json = 10; + */ + fromJson: string; + + /** + * runtime fromJsonString() + * + * @generated from field: string from_json_string = 11; + */ + fromJsonString: string; + + /** + * runtime toBinary() + * + * @generated from field: string to_binary = 12; + */ + toBinary: string; + + /** + * runtime toJsonString() + * + * @generated from field: string to_json_string = 14; + */ + toJsonString: string; +}; + +// Describes the message spec.ReservedPropertyNames.Runtime. Use `create(ReservedPropertyNames_RuntimeDesc)` to create a new ReservedPropertyNames_Runtime. +export declare const ReservedPropertyNames_RuntimeDesc: TypedDescMessage; + +/** + * @generated from message spec.ReservedPropertyNames.OneofBultIn + */ +export declare type ReservedPropertyNames_OneofBultIn = Message$1<"spec.ReservedPropertyNames.OneofBultIn"> & { + /** + * @generated from oneof spec.ReservedPropertyNames.OneofBultIn.built_in + */ + builtIn: { + /** + * @generated from field: string constructor = 1; + */ + value: string; + case: "constructor"; + } | { + /** + * @generated from field: string to_string = 2; + */ + value: string; + case: "toString"; + } | { + /** + * @generated from field: string to_JSON = 3; + */ + value: string; + case: "toJSON"; + } | { + /** + * @generated from field: string value_of = 4; + */ + value: string; + case: "valueOf"; + } | { case: undefined; value?: undefined }; +}; + +// Describes the message spec.ReservedPropertyNames.OneofBultIn. Use `create(ReservedPropertyNames_OneofBultInDesc)` to create a new ReservedPropertyNames_OneofBultIn. +export declare const ReservedPropertyNames_OneofBultInDesc: TypedDescMessage; + +/** + * @generated from message spec.ReservedPropertyNames.OneofRuntime + */ +export declare type ReservedPropertyNames_OneofRuntime = Message$1<"spec.ReservedPropertyNames.OneofRuntime"> & { + /** + * @generated from oneof spec.ReservedPropertyNames.OneofRuntime.runtime + */ + runtime: { + /** + * @generated from field: string to_json = 5; + */ + value: string; + case: "toJson"; + } | { + /** + * @generated from field: string type = 6; + */ + value: string; + case: "type"; + } | { + /** + * @generated from field: string clone = 7; + */ + value: string; + case: "clone"; + } | { + /** + * @generated from field: string equals = 8; + */ + value: string; + case: "equals"; + } | { + /** + * @generated from field: string from_binary = 9; + */ + value: string; + case: "fromBinary"; + } | { + /** + * @generated from field: string from_json = 10; + */ + value: string; + case: "fromJson"; + } | { + /** + * @generated from field: string from_json_string = 11; + */ + value: string; + case: "fromJsonString"; + } | { + /** + * @generated from field: string to_binary = 12; + */ + value: string; + case: "toBinary"; + } | { + /** + * @generated from field: string to_json_string = 14; + */ + value: string; + case: "toJsonString"; + } | { case: undefined; value?: undefined }; +}; + +// Describes the message spec.ReservedPropertyNames.OneofRuntime. Use `create(ReservedPropertyNames_OneofRuntimeDesc)` to create a new ReservedPropertyNames_OneofRuntime. +export declare const ReservedPropertyNames_OneofRuntimeDesc: TypedDescMessage; + +/** + * @generated from enum spec.ReservedPropertyNames.EnumBuiltIn + */ +export enum ReservedPropertyNames_EnumBuiltIn { + /** + * @generated from enum value: constructor = 0; + */ + constructor$ = 0, + + /** + * @generated from enum value: toString = 1; + */ + toString$ = 1, + + /** + * @generated from enum value: to_JSON = 2; + */ + to_JSON = 2, + + /** + * @generated from enum value: value_of = 3; + */ + value_of = 3, +} + +// Describes the enum spec.ReservedPropertyNames.EnumBuiltIn. +export declare const ReservedPropertyNames_EnumBuiltInDesc: TypedDescEnum; + +/** + * @generated from enum spec.ReservedPropertyNames.EnumRuntime + */ +export enum ReservedPropertyNames_EnumRuntime { + /** + * @generated from enum value: to_json = 0; + */ + to_json = 0, + + /** + * @generated from enum value: type = 6; + */ + type = 6, + + /** + * @generated from enum value: clone = 7; + */ + clone = 7, + + /** + * @generated from enum value: equals = 8; + */ + equals = 8, + + /** + * @generated from enum value: from_binary = 9; + */ + from_binary = 9, + + /** + * @generated from enum value: from_json = 10; + */ + from_json = 10, + + /** + * @generated from enum value: from_json_string = 11; + */ + from_json_string = 11, + + /** + * @generated from enum value: to_binary = 12; + */ + to_binary = 12, + + /** + * @generated from enum value: to_json_string = 14; + */ + to_json_string = 14, +} + +// Describes the enum spec.ReservedPropertyNames.EnumRuntime. +export declare const ReservedPropertyNames_EnumRuntimeDesc: TypedDescEnum; + +/** + * reserved identifier + * + * @generated from message spec.interface + */ +export declare type interface$ = Message$1<"spec.interface"> & { +}; + +// Describes the message spec.interface. Use `create(interface$Desc)` to create a new interface$. +export declare const interface$Desc: TypedDescMessage; + +/** + * reserved identifier + * + * @generated from message spec.function + */ +export declare type function$ = Message$1<"spec.function"> & { +}; + +// Describes the message spec.function. Use `create(function$Desc)` to create a new function$. +export declare const function$Desc: TypedDescMessage; + +/** + * reserved identifier + * + * @generated from message spec.instanceof + */ +export declare type instanceof$ = Message$1<"spec.instanceof"> & { +}; + +// Describes the message spec.instanceof. Use `create(instanceof$Desc)` to create a new instanceof$. +export declare const instanceof$Desc: TypedDescMessage; + +/** + * reserved identifier + * + * @generated from message spec.switch + */ +export declare type switch$ = Message$1<"spec.switch"> & { +}; + +// Describes the message spec.switch. Use `create(switch$Desc)` to create a new switch$. +export declare const switch$Desc: TypedDescMessage; + +/** + * reserved identifier + * + * @generated from message spec.case + */ +export declare type case$ = Message$1<"spec.case"> & { +}; + +// Describes the message spec.case. Use `create(case$Desc)` to create a new case$. +export declare const case$Desc: TypedDescMessage; + +/** + * reserved identifier + * + * @generated from message spec.return + */ +export declare type return$ = Message$1<"spec.return"> & { +}; + +// Describes the message spec.return. Use `create(return$Desc)` to create a new return$. +export declare const return$Desc: TypedDescMessage; + +/** + * reserved object property + * + * @generated from message spec.constructor + */ +export declare type constructor = Message$1<"spec.constructor"> & { +}; + +// Describes the message spec.constructor. Use `create(constructorDesc)` to create a new constructor. +export declare const constructorDesc: TypedDescMessage; + +/** + * @generated from message spec.toString + */ +export declare type toString = Message$1<"spec.toString"> & { +}; + +// Describes the message spec.toString. Use `create(toStringDesc)` to create a new toString. +export declare const toStringDesc: TypedDescMessage; + +/** + * @generated from message spec.toJSON + */ +export declare type toJSON = Message$1<"spec.toJSON"> & { +}; + +// Describes the message spec.toJSON. Use `create(toJSONDesc)` to create a new toJSON. +export declare const toJSONDesc: TypedDescMessage; + +/** + * @generated from message spec.valueOf + */ +export declare type valueOf = Message$1<"spec.valueOf"> & { +}; + +// Describes the message spec.valueOf. Use `create(valueOfDesc)` to create a new valueOf. +export declare const valueOfDesc: TypedDescMessage; + +/** + * used by runtime + * + * @generated from message spec.Message + */ +export declare type Message = Message$1<"spec.Message"> & { +}; + +// Describes the message spec.Message. Use `create(MessageDesc)` to create a new Message. +export declare const MessageDesc: TypedDescMessage; + +/** + * used by runtime + * + * @generated from message spec.PartialMessage + */ +export declare type PartialMessage = Message$1<"spec.PartialMessage"> & { +}; + +// Describes the message spec.PartialMessage. Use `create(PartialMessageDesc)` to create a new PartialMessage. +export declare const PartialMessageDesc: TypedDescMessage; + +/** + * used by runtime + * + * @generated from message spec.PlainMessage + */ +export declare type PlainMessage = Message$1<"spec.PlainMessage"> & { +}; + +// Describes the message spec.PlainMessage. Use `create(PlainMessageDesc)` to create a new PlainMessage. +export declare const PlainMessageDesc: TypedDescMessage; + +/** + * clash with global type "Error" + * either this message name is escaped in generated code, or the generated + * code must escape its calls to the global error object (i.e. `new Error`) + * + * @generated from message spec.Error + */ +export declare type Error = Message$1<"spec.Error"> & { + /** + * @generated from field: string field_name = 1; + */ + fieldName: string; + + /** + * @generated from field: string message = 2; + */ + message: string; +}; + +// Describes the message spec.Error. Use `create(ErrorDesc)` to create a new Error. +export declare const ErrorDesc: TypedDescMessage; + +/** + * clash with global type + * + * @generated from message spec.Object + */ +export declare type Object$ = Message$1<"spec.Object"> & { +}; + +// Describes the message spec.Object. Use `create(Object$Desc)` to create a new Object$. +export declare const Object$Desc: TypedDescMessage; + +/** + * @generated from message spec.object + */ +export declare type object$ = Message$1<"spec.object"> & { +}; + +// Describes the message spec.object. Use `create(object$Desc)` to create a new object$. +export declare const object$Desc: TypedDescMessage; + +/** + * clash with global type + * + * @generated from message spec.array + */ +export declare type array = Message$1<"spec.array"> & { +}; + +// Describes the message spec.array. Use `create(arrayDesc)` to create a new array. +export declare const arrayDesc: TypedDescMessage; + +/** + * clash with global type + * + * @generated from message spec.string + */ +export declare type string$ = Message$1<"spec.string"> & { +}; + +// Describes the message spec.string. Use `create(string$Desc)` to create a new string$. +export declare const string$Desc: TypedDescMessage; + +/** + * clash with global type + * + * @generated from message spec.number + */ +export declare type number$ = Message$1<"spec.number"> & { +}; + +// Describes the message spec.number. Use `create(number$Desc)` to create a new number$. +export declare const number$Desc: TypedDescMessage; + +/** + * clash with global type + * + * @generated from message spec.boolean + */ +export declare type boolean$ = Message$1<"spec.boolean"> & { +}; + +// Describes the message spec.boolean. Use `create(boolean$Desc)` to create a new boolean$. +export declare const boolean$Desc: TypedDescMessage; + +/** + * clash with global type + * + * @generated from message spec.bigint + */ +export declare type bigint$ = Message$1<"spec.bigint"> & { +}; + +// Describes the message spec.bigint. Use `create(bigint$Desc)` to create a new bigint$. +export declare const bigint$Desc: TypedDescMessage; + +/** + * clash with global type + * + * @generated from message spec.Uint8Array + */ +export declare type Uint8Array$ = Message$1<"spec.Uint8Array"> & { +}; + +// Describes the message spec.Uint8Array. Use `create(Uint8Array$Desc)` to create a new Uint8Array$. +export declare const Uint8Array$Desc: TypedDescMessage; + +/** + * clash with global type + * + * @generated from message spec.Array + */ +export declare type Array = Message$1<"spec.Array"> & { +}; + +// Describes the message spec.Array. Use `create(ArrayDesc)` to create a new Array. +export declare const ArrayDesc: TypedDescMessage; + +/** + * clash with global type + * + * @generated from message spec.String + */ +export declare type String = Message$1<"spec.String"> & { +}; + +// Describes the message spec.String. Use `create(StringDesc)` to create a new String. +export declare const StringDesc: TypedDescMessage; + +/** + * clash with global type + * + * @generated from message spec.Number + */ +export declare type Number = Message$1<"spec.Number"> & { +}; + +// Describes the message spec.Number. Use `create(NumberDesc)` to create a new Number. +export declare const NumberDesc: TypedDescMessage; + +/** + * clash with global type + * + * @generated from message spec.Boolean + */ +export declare type Boolean = Message$1<"spec.Boolean"> & { +}; + +// Describes the message spec.Boolean. Use `create(BooleanDesc)` to create a new Boolean. +export declare const BooleanDesc: TypedDescMessage; + +/** + * clash with global type + * + * @generated from message spec.BigInt + */ +export declare type BigInt = Message$1<"spec.BigInt"> & { +}; + +// Describes the message spec.BigInt. Use `create(BigIntDesc)` to create a new BigInt. +export declare const BigIntDesc: TypedDescMessage; + +/** + * @generated from message spec.ClashParent + */ +export declare type ClashParent = Message$1<"spec.ClashParent"> & { +}; + +// Describes the message spec.ClashParent. Use `create(ClashParentDesc)` to create a new ClashParent. +export declare const ClashParentDesc: TypedDescMessage; + +/** + * should clash with message ClashParent_ClashChild + * + * @generated from message spec.ClashParent.ClashChild + */ +export declare type ClashParent_ClashChild = Message$1<"spec.ClashParent.ClashChild"> & { +}; + +// Describes the message spec.ClashParent.ClashChild. Use `create(ClashParent_ClashChildDesc)` to create a new ClashParent_ClashChild. +export declare const ClashParent_ClashChildDesc: TypedDescMessage; + +/** + * @generated from message spec.NoClashFields + */ +export declare type NoClashFields = Message$1<"spec.NoClashFields"> & { + /** + * ok as object property + * + * @generated from field: string const = 1; + */ + const: string; + + /** + * ok as object property + * + * @generated from field: string switch = 2; + */ + switch: string; + + /** + * ok as object property + * + * @generated from field: string case = 3; + */ + case: string; + + /** + * ok as object property + * + * @generated from field: string function = 4; + */ + function: string; + + /** + * ok as object property + * + * @generated from field: string interface = 5; + */ + interface: string; + + /** + * ok as object property + * + * @generated from field: string return = 6; + */ + return: string; +}; + +// Describes the message spec.NoClashFields. Use `create(NoClashFieldsDesc)` to create a new NoClashFields. +export declare const NoClashFieldsDesc: TypedDescMessage; + +/** + * @generated from message spec.NoClashOneof + */ +export declare type NoClashOneof = Message$1<"spec.NoClashOneof"> & { + /** + * @generated from oneof spec.NoClashOneof.kind + */ + kind: { + /** + * ok as object property + * + * @generated from field: string const = 1; + */ + value: string; + case: "const"; + } | { + /** + * ok as object property + * + * @generated from field: string switch = 2; + */ + value: string; + case: "switch"; + } | { + /** + * ok as object property + * + * @generated from field: string case = 3; + */ + value: string; + case: "case"; + } | { + /** + * ok as object property + * + * @generated from field: string function = 4; + */ + value: string; + case: "function"; + } | { + /** + * ok as object property + * + * @generated from field: string interface = 5; + */ + value: string; + case: "interface"; + } | { + /** + * ok as object property + * + * @generated from field: string return = 6; + */ + value: string; + case: "return"; + } | { case: undefined; value?: undefined }; +}; + +// Describes the message spec.NoClashOneof. Use `create(NoClashOneofDesc)` to create a new NoClashOneof. +export declare const NoClashOneofDesc: TypedDescMessage; + +/** + * @generated from message spec.NoClashOneofADT + */ +export declare type NoClashOneofADT = Message$1<"spec.NoClashOneofADT"> & { + /** + * @generated from field: spec.NoClashOneofADT.M m = 1; + */ + m?: NoClashOneofADT_M; +}; + +// Describes the message spec.NoClashOneofADT. Use `create(NoClashOneofADTDesc)` to create a new NoClashOneofADT. +export declare const NoClashOneofADTDesc: TypedDescMessage; + +/** + * @generated from message spec.NoClashOneofADT.M + */ +export declare type NoClashOneofADT_M = Message$1<"spec.NoClashOneofADT.M"> & { + /** + * @generated from field: string case = 1; + */ + case: string; + + /** + * @generated from field: optional string value = 2; + */ + value?: string; +}; + +// Describes the message spec.NoClashOneofADT.M. Use `create(NoClashOneofADT_MDesc)` to create a new NoClashOneofADT_M. +export declare const NoClashOneofADT_MDesc: TypedDescMessage; + +/** + * just here as a "namespace" for the enum + * + * @generated from message spec.NoClashEnumWrap + */ +export declare type NoClashEnumWrap = Message$1<"spec.NoClashEnumWrap"> & { +}; + +// Describes the message spec.NoClashEnumWrap. Use `create(NoClashEnumWrapDesc)` to create a new NoClashEnumWrap. +export declare const NoClashEnumWrapDesc: TypedDescMessage; + +/** + * @generated from enum spec.NoClashEnumWrap.X + */ +export enum NoClashEnumWrap_X { + /** + * ok as object property + * + * @generated from enum value: instanceof = 0; + */ + instanceof = 0, + + /** + * ok as object property + * + * @generated from enum value: switch = 1; + */ + switch = 1, + + /** + * ok as object property + * + * @generated from enum value: case = 3; + */ + case = 3, + + /** + * ok as object property + * + * @generated from enum value: function = 4; + */ + function = 4, + + /** + * ok as object property + * + * @generated from enum value: interface = 5; + */ + interface = 5, + + /** + * ok as object property + * + * @generated from enum value: return = 6; + */ + return = 6, +} + +// Describes the enum spec.NoClashEnumWrap.X. +export declare const NoClashEnumWrap_XDesc: TypedDescEnum; + +/** + * @generated from service spec.ReservedPropertyNamesService + */ +export declare const ReservedPropertyNamesService: TypedDescService<{ + /** + * @generated from rpc spec.ReservedPropertyNamesService.constructor + */ + constructor$: { + kind: MethodKind.Unary; + I: Error; + O: Error; + }, + /** + * @generated from rpc spec.ReservedPropertyNamesService.toString + */ + toString$: { + kind: MethodKind.Unary; + I: Error; + O: Error; + }, + /** + * @generated from rpc spec.ReservedPropertyNamesService.to_JSON + */ + to_JSON: { + kind: MethodKind.Unary; + I: Error; + O: Error; + }, + /** + * @generated from rpc spec.ReservedPropertyNamesService.value_of + */ + value_of: { + kind: MethodKind.Unary; + I: Error; + O: Error; + }, +} +>; + diff --git a/packages/protobuf-test/src/gen/js/extra/name-clash_pbv2.js b/packages/protobuf-test/src/gen/js/extra/name-clash_pbv2.js new file mode 100644 index 000000000..97177cf46 --- /dev/null +++ b/packages/protobuf-test/src/gen/js/extra/name-clash_pbv2.js @@ -0,0 +1,172 @@ +// Copyright 2021-2024 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// @generated by protoc-gen-es-next v1.7.2 with parameter "ts_nocheck=false,target=js+dts" +// @generated from file extra/name-clash.proto (package spec, syntax proto3) +/* eslint-disable */ + +import { enumDesc, fileDesc, messageDesc, serviceDesc, tsEnum } from "@bufbuild/protobuf/next/codegenv1"; +import { fileDesc_extra_example } from "./example_pbv2.js"; + +export const fileDesc_extra_name_clash = fileDesc("ChZleHRyYS9uYW1lLWNsYXNoLnByb3RvEgRzcGVjIh0KBFVzZXISFQoBdRgBIAEoCzIKLmRvY3MuVXNlciLLBgoVUmVzZXJ2ZWRQcm9wZXJ0eU5hbWVzGlQKB0J1aWx0SW4SEwoLY29uc3RydWN0b3IYAiABKAkSEQoJdG9fc3RyaW5nGAMgASgJEg8KB3RvX0pTT04YBCABKAkSEAoIdmFsdWVfb2YYBSABKAkatAEKB1J1bnRpbWUSDwoHdG9fanNvbhgEIAEoCRIMCgR0eXBlGAYgASgJEg0KBWNsb25lGAcgASgJEg4KBmVxdWFscxgIIAEoCRITCgtmcm9tX2JpbmFyeRgJIAEoCRIRCglmcm9tX2pzb24YCiABKAkSGAoQZnJvbV9qc29uX3N0cmluZxgLIA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+ +// Describes the message spec.User. Use `create(UserDesc)` to create a new User. +export const UserDesc = messageDesc(fileDesc_extra_name_clash, 0); + +// Describes the message spec.ReservedPropertyNames. Use `create(ReservedPropertyNamesDesc)` to create a new ReservedPropertyNames. +export const ReservedPropertyNamesDesc = messageDesc(fileDesc_extra_name_clash, 1); + +// Describes the message spec.ReservedPropertyNames.BuiltIn. Use `create(ReservedPropertyNames_BuiltInDesc)` to create a new ReservedPropertyNames_BuiltIn. +export const ReservedPropertyNames_BuiltInDesc = messageDesc(fileDesc_extra_name_clash, 1, 0); + +// Describes the message spec.ReservedPropertyNames.Runtime. Use `create(ReservedPropertyNames_RuntimeDesc)` to create a new ReservedPropertyNames_Runtime. +export const ReservedPropertyNames_RuntimeDesc = messageDesc(fileDesc_extra_name_clash, 1, 1); + +// Describes the message spec.ReservedPropertyNames.OneofBultIn. Use `create(ReservedPropertyNames_OneofBultInDesc)` to create a new ReservedPropertyNames_OneofBultIn. +export const ReservedPropertyNames_OneofBultInDesc = messageDesc(fileDesc_extra_name_clash, 1, 2); + +// Describes the message spec.ReservedPropertyNames.OneofRuntime. Use `create(ReservedPropertyNames_OneofRuntimeDesc)` to create a new ReservedPropertyNames_OneofRuntime. +export const ReservedPropertyNames_OneofRuntimeDesc = messageDesc(fileDesc_extra_name_clash, 1, 3); + +// Describes the enum spec.ReservedPropertyNames.EnumBuiltIn. +export const ReservedPropertyNames_EnumBuiltInDesc = enumDesc(fileDesc_extra_name_clash, 1, 0); + +/** + * @generated from enum spec.ReservedPropertyNames.EnumBuiltIn + */ +export const ReservedPropertyNames_EnumBuiltIn = tsEnum(ReservedPropertyNames_EnumBuiltInDesc); + +// Describes the enum spec.ReservedPropertyNames.EnumRuntime. +export const ReservedPropertyNames_EnumRuntimeDesc = enumDesc(fileDesc_extra_name_clash, 1, 1); + +/** + * @generated from enum spec.ReservedPropertyNames.EnumRuntime + */ +export const ReservedPropertyNames_EnumRuntime = tsEnum(ReservedPropertyNames_EnumRuntimeDesc); + +// Describes the message spec.interface. Use `create(interface$Desc)` to create a new interface$. +export const interface$Desc = messageDesc(fileDesc_extra_name_clash, 2); + +// Describes the message spec.function. Use `create(function$Desc)` to create a new function$. +export const function$Desc = messageDesc(fileDesc_extra_name_clash, 3); + +// Describes the message spec.instanceof. Use `create(instanceof$Desc)` to create a new instanceof$. +export const instanceof$Desc = messageDesc(fileDesc_extra_name_clash, 4); + +// Describes the message spec.switch. Use `create(switch$Desc)` to create a new switch$. +export const switch$Desc = messageDesc(fileDesc_extra_name_clash, 5); + +// Describes the message spec.case. Use `create(case$Desc)` to create a new case$. +export const case$Desc = messageDesc(fileDesc_extra_name_clash, 6); + +// Describes the message spec.return. Use `create(return$Desc)` to create a new return$. +export const return$Desc = messageDesc(fileDesc_extra_name_clash, 7); + +// Describes the message spec.constructor. Use `create(constructorDesc)` to create a new constructor. +export const constructorDesc = messageDesc(fileDesc_extra_name_clash, 8); + +// Describes the message spec.toString. Use `create(toStringDesc)` to create a new toString. +export const toStringDesc = messageDesc(fileDesc_extra_name_clash, 9); + +// Describes the message spec.toJSON. Use `create(toJSONDesc)` to create a new toJSON. +export const toJSONDesc = messageDesc(fileDesc_extra_name_clash, 10); + +// Describes the message spec.valueOf. Use `create(valueOfDesc)` to create a new valueOf. +export const valueOfDesc = messageDesc(fileDesc_extra_name_clash, 11); + +// Describes the message spec.Message. Use `create(MessageDesc)` to create a new Message. +export const MessageDesc = messageDesc(fileDesc_extra_name_clash, 12); + +// Describes the message spec.PartialMessage. Use `create(PartialMessageDesc)` to create a new PartialMessage. +export const PartialMessageDesc = messageDesc(fileDesc_extra_name_clash, 13); + +// Describes the message spec.PlainMessage. Use `create(PlainMessageDesc)` to create a new PlainMessage. +export const PlainMessageDesc = messageDesc(fileDesc_extra_name_clash, 14); + +// Describes the message spec.Error. Use `create(ErrorDesc)` to create a new Error. +export const ErrorDesc = messageDesc(fileDesc_extra_name_clash, 15); + +// Describes the message spec.Object. Use `create(Object$Desc)` to create a new Object$. +export const Object$Desc = messageDesc(fileDesc_extra_name_clash, 16); + +// Describes the message spec.object. Use `create(object$Desc)` to create a new object$. +export const object$Desc = messageDesc(fileDesc_extra_name_clash, 17); + +// Describes the message spec.array. Use `create(arrayDesc)` to create a new array. +export const arrayDesc = messageDesc(fileDesc_extra_name_clash, 18); + +// Describes the message spec.string. Use `create(string$Desc)` to create a new string$. +export const string$Desc = messageDesc(fileDesc_extra_name_clash, 19); + +// Describes the message spec.number. Use `create(number$Desc)` to create a new number$. +export const number$Desc = messageDesc(fileDesc_extra_name_clash, 20); + +// Describes the message spec.boolean. Use `create(boolean$Desc)` to create a new boolean$. +export const boolean$Desc = messageDesc(fileDesc_extra_name_clash, 21); + +// Describes the message spec.bigint. Use `create(bigint$Desc)` to create a new bigint$. +export const bigint$Desc = messageDesc(fileDesc_extra_name_clash, 22); + +// Describes the message spec.Uint8Array. Use `create(Uint8Array$Desc)` to create a new Uint8Array$. +export const Uint8Array$Desc = messageDesc(fileDesc_extra_name_clash, 23); + +// Describes the message spec.Array. Use `create(ArrayDesc)` to create a new Array. +export const ArrayDesc = messageDesc(fileDesc_extra_name_clash, 24); + +// Describes the message spec.String. Use `create(StringDesc)` to create a new String. +export const StringDesc = messageDesc(fileDesc_extra_name_clash, 25); + +// Describes the message spec.Number. Use `create(NumberDesc)` to create a new Number. +export const NumberDesc = messageDesc(fileDesc_extra_name_clash, 26); + +// Describes the message spec.Boolean. Use `create(BooleanDesc)` to create a new Boolean. +export const BooleanDesc = messageDesc(fileDesc_extra_name_clash, 27); + +// Describes the message spec.BigInt. Use `create(BigIntDesc)` to create a new BigInt. +export const BigIntDesc = messageDesc(fileDesc_extra_name_clash, 28); + +// Describes the message spec.ClashParent. Use `create(ClashParentDesc)` to create a new ClashParent. +export const ClashParentDesc = messageDesc(fileDesc_extra_name_clash, 29); + +// Describes the message spec.ClashParent.ClashChild. Use `create(ClashParent_ClashChildDesc)` to create a new ClashParent_ClashChild. +export const ClashParent_ClashChildDesc = messageDesc(fileDesc_extra_name_clash, 29, 0); + +// Describes the message spec.NoClashFields. Use `create(NoClashFieldsDesc)` to create a new NoClashFields. +export const NoClashFieldsDesc = messageDesc(fileDesc_extra_name_clash, 30); + +// Describes the message spec.NoClashOneof. Use `create(NoClashOneofDesc)` to create a new NoClashOneof. +export const NoClashOneofDesc = messageDesc(fileDesc_extra_name_clash, 31); + +// Describes the message spec.NoClashOneofADT. Use `create(NoClashOneofADTDesc)` to create a new NoClashOneofADT. +export const NoClashOneofADTDesc = messageDesc(fileDesc_extra_name_clash, 32); + +// Describes the message spec.NoClashOneofADT.M. Use `create(NoClashOneofADT_MDesc)` to create a new NoClashOneofADT_M. +export const NoClashOneofADT_MDesc = messageDesc(fileDesc_extra_name_clash, 32, 0); + +// Describes the message spec.NoClashEnumWrap. Use `create(NoClashEnumWrapDesc)` to create a new NoClashEnumWrap. +export const NoClashEnumWrapDesc = messageDesc(fileDesc_extra_name_clash, 33); + +// Describes the enum spec.NoClashEnumWrap.X. +export const NoClashEnumWrap_XDesc = enumDesc(fileDesc_extra_name_clash, 33, 0); + +/** + * @generated from enum spec.NoClashEnumWrap.X + */ +export const NoClashEnumWrap_X = tsEnum(NoClashEnumWrap_XDesc); + +/** + * @generated from service spec.ReservedPropertyNamesService + */ +export const ReservedPropertyNamesService = serviceDesc(fileDesc_extra_name_clash, 0); + diff --git a/packages/protobuf-test/src/gen/js/extra/proto2_pb.d.ts b/packages/protobuf-test/src/gen/js/extra/proto2_pb.d.ts index 54f07a6df..7132205e2 100644 --- a/packages/protobuf-test/src/gen/js/extra/proto2_pb.d.ts +++ b/packages/protobuf-test/src/gen/js/extra/proto2_pb.d.ts @@ -16,7 +16,7 @@ // @generated from file extra/proto2.proto (package spec, syntax proto2) /* eslint-disable */ -import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; +import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage, UInt32Value } from "@bufbuild/protobuf"; import { Message, proto2 } from "@bufbuild/protobuf"; /** @@ -34,8 +34,823 @@ export declare enum Proto2Enum { NO = 2, } +/** + * First enum value must be 0 when used as map value type + * + * @generated from enum spec.Proto2EnumWithZero + */ +export declare enum Proto2EnumWithZero { + /** + * @generated from enum value: PROTO2_ENUM_WITH_ZERO_ZERO = 0; + */ + ZERO = 0, + + /** + * @generated from enum value: PROTO2_ENUM_WITH_ZERO_ONE = 1; + */ + ONE = 1, +} + +/** + * @generated from message spec.Proto2Message + */ +export declare class Proto2Message extends Message { + /** + * @generated from field: required string required_string_field = 1; + */ + requiredStringField: string; + + /** + * @generated from field: required bytes required_bytes_field = 2; + */ + requiredBytesField: Uint8Array; + + /** + * @generated from field: required int32 required_int32_field = 3; + */ + requiredInt32Field: number; + + /** + * @generated from field: required int64 required_int64_field = 4; + */ + requiredInt64Field: bigint; + + /** + * @generated from field: required int64 required_int64_js_number_field = 103 [jstype = JS_NUMBER]; + */ + requiredInt64JsNumberField: bigint; + + /** + * @generated from field: required int64 required_int64_js_string_field = 102 [jstype = JS_STRING]; + */ + requiredInt64JsStringField: string; + + /** + * @generated from field: required float required_float_field = 5; + */ + requiredFloatField: number; + + /** + * @generated from field: required bool required_bool_field = 6; + */ + requiredBoolField: boolean; + + /** + * @generated from field: required spec.Proto2Enum required_enum_field = 7; + */ + requiredEnumField: Proto2Enum; + + /** + * @generated from field: required spec.Proto2Message required_message_field = 8; + */ + requiredMessageField?: Proto2Message; + + /** + * @generated from field: required spec.Proto2Message.RequiredGroup requiredgroup = 9; + */ + requiredgroup?: Proto2Message_RequiredGroup; + + /** + * @generated from field: required google.protobuf.UInt32Value required_wrapped_uint32_field = 201; + */ + requiredWrappedUint32Field?: number; + + /** + * @generated from field: required string required_default_string_field = 10 [default = "hello \" *\/ "]; + */ + requiredDefaultStringField: string; + + /** + * @generated from field: required bytes required_default_bytes_field = 11 [default = "\000x\\x\\"x\'AAAAAA\010\014\n\r\t\013"]; + */ + requiredDefaultBytesField: Uint8Array; + + /** + * @generated from field: required int32 required_default_int32_field = 12 [default = 128]; + */ + requiredDefaultInt32Field: number; + + /** + * @generated from field: required int64 required_default_int64_field = 13 [default = -256]; + */ + requiredDefaultInt64Field: bigint; + + /** + * @generated from field: required int64 required_default_int64_js_number_field = 110 [default = -256, jstype = JS_NUMBER]; + */ + requiredDefaultInt64JsNumberField: bigint; + + /** + * @generated from field: required int64 required_default_int64_js_string_field = 113 [default = -256, jstype = JS_STRING]; + */ + requiredDefaultInt64JsStringField: string; + + /** + * @generated from field: required float required_default_float_field = 14 [default = -512.13]; + */ + requiredDefaultFloatField: number; + + /** + * @generated from field: required bool required_default_bool_field = 15 [default = true]; + */ + requiredDefaultBoolField: boolean; + + /** + * @generated from field: required spec.Proto2Enum required_default_enum_field = 16 [default = PROTO2_ENUM_YES]; + */ + requiredDefaultEnumField: Proto2Enum; + + /** + * @generated from field: required spec.Proto2Message required_default_message_field = 17; + */ + requiredDefaultMessageField?: Proto2Message; + + /** + * @generated from field: required spec.Proto2Message.RequiredDefaultGroup requireddefaultgroup = 18; + */ + requireddefaultgroup?: Proto2Message_RequiredDefaultGroup; + + /** + * @generated from field: required google.protobuf.UInt32Value required_default_wrapped_uint32_field = 202; + */ + requiredDefaultWrappedUint32Field?: number; + + /** + * @generated from field: optional string optional_string_field = 19; + */ + optionalStringField: string; + + /** + * @generated from field: optional bytes optional_bytes_field = 20; + */ + optionalBytesField: Uint8Array; + + /** + * @generated from field: optional int32 optional_int32_field = 21; + */ + optionalInt32Field: number; + + /** + * @generated from field: optional int64 optional_int64_field = 22; + */ + optionalInt64Field: bigint; + + /** + * @generated from field: optional int64 optional_int64_js_number_field = 106 [jstype = JS_NUMBER]; + */ + optionalInt64JsNumberField: bigint; + + /** + * @generated from field: optional int64 optional_int64_js_string_field = 105 [jstype = JS_STRING]; + */ + optionalInt64JsStringField: string; + + /** + * @generated from field: optional float optional_float_field = 23; + */ + optionalFloatField: number; + + /** + * @generated from field: optional bool optional_bool_field = 24; + */ + optionalBoolField: boolean; + + /** + * @generated from field: optional spec.Proto2Enum optional_enum_field = 25; + */ + optionalEnumField: Proto2Enum; + + /** + * @generated from field: optional spec.Proto2Message optional_message_field = 26; + */ + optionalMessageField?: Proto2Message; + + /** + * @generated from field: optional spec.Proto2Message.OptionalGroup optionalgroup = 27; + */ + optionalgroup?: Proto2Message_OptionalGroup; + + /** + * @generated from field: required google.protobuf.UInt32Value optional_wrapped_uint32_field = 207; + */ + optionalWrappedUint32Field?: number; + + /** + * @generated from field: required string optional_default_string_field = 28 [default = "hello \" *\/ "]; + */ + optionalDefaultStringField: string; + + /** + * @generated from field: required bytes optional_default_bytes_field = 29 [default = "\000x\\x\\"x\'AAAAAA\010\014\n\r\t\013"]; + */ + optionalDefaultBytesField: Uint8Array; + + /** + * @generated from field: required int32 optional_default_int32_field = 30 [default = 128]; + */ + optionalDefaultInt32Field: number; + + /** + * @generated from field: required int64 optional_default_int64_field = 31 [default = -256]; + */ + optionalDefaultInt64Field: bigint; + + /** + * @generated from field: optional int64 optional_default_int64_js_number_field = 120 [default = -256, jstype = JS_NUMBER]; + */ + optionalDefaultInt64JsNumberField: bigint; + + /** + * @generated from field: optional int64 optional_default_int64_js_string_field = 121 [default = -256, jstype = JS_STRING]; + */ + optionalDefaultInt64JsStringField: string; + + /** + * @generated from field: required float optional_default_float_field = 32 [default = -512.13]; + */ + optionalDefaultFloatField: number; + + /** + * @generated from field: required bool optional_default_bool_field = 33 [default = true]; + */ + optionalDefaultBoolField: boolean; + + /** + * @generated from field: required spec.Proto2Enum optional_default_enum_field = 34 [default = PROTO2_ENUM_YES]; + */ + optionalDefaultEnumField: Proto2Enum; + + /** + * @generated from field: optional spec.Proto2Message optional_default_message_field = 35; + */ + optionalDefaultMessageField?: Proto2Message; + + /** + * @generated from field: optional spec.Proto2Message.OptionalDefaultGroup optionaldefaultgroup = 36; + */ + optionaldefaultgroup?: Proto2Message_OptionalDefaultGroup; + + /** + * @generated from field: required google.protobuf.UInt32Value optional_default_wrapped_uint32_field = 203; + */ + optionalDefaultWrappedUint32Field?: number; + + /** + * @generated from field: repeated string repeated_string_field = 37; + */ + repeatedStringField: string[]; + + /** + * @generated from field: repeated bytes repeated_bytes_field = 38; + */ + repeatedBytesField: Uint8Array[]; + + /** + * @generated from field: repeated int32 repeated_int32_field = 39; + */ + repeatedInt32Field: number[]; + + /** + * @generated from field: repeated int64 repeated_int64_field = 40; + */ + repeatedInt64Field: bigint[]; + + /** + * @generated from field: repeated int64 repeated_int64_js_number_field = 109 [jstype = JS_NUMBER]; + */ + repeatedInt64JsNumberField: bigint[]; + + /** + * @generated from field: repeated int64 repeated_int64_js_string_field = 108 [jstype = JS_STRING]; + */ + repeatedInt64JsStringField: string[]; + + /** + * @generated from field: repeated float repeated_float_field = 41; + */ + repeatedFloatField: number[]; + + /** + * @generated from field: repeated bool repeated_bool_field = 42; + */ + repeatedBoolField: boolean[]; + + /** + * @generated from field: repeated spec.Proto2Enum repeated_enum_field = 43; + */ + repeatedEnumField: Proto2Enum[]; + + /** + * @generated from field: repeated spec.Proto2Message repeated_message_field = 44; + */ + repeatedMessageField: Proto2Message[]; + + /** + * @generated from field: repeated spec.Proto2Message.RepeatedGroup repeatedgroup = 45; + */ + repeatedgroup: Proto2Message_RepeatedGroup[]; + + /** + * @generated from field: repeated google.protobuf.UInt32Value repeated_wrapped_uint32_field = 204; + */ + repeatedWrappedUint32Field: UInt32Value[]; + + /** + * @generated from field: repeated double packed_double_field = 46 [packed = true]; + */ + packedDoubleField: number[]; + + /** + * @generated from field: repeated uint32 packed_uint32_field = 47 [packed = true]; + */ + packedUint32Field: number[]; + + /** + * @generated from field: repeated uint64 packed_uint64_field = 48 [packed = true]; + */ + packedUint64Field: bigint[]; + + /** + * @generated from field: repeated double unpacked_double_field = 49 [packed = false]; + */ + unpackedDoubleField: number[]; + + /** + * @generated from field: repeated uint32 unpacked_uint32_field = 50 [packed = false]; + */ + unpackedUint32Field: number[]; + + /** + * @generated from field: repeated uint64 unpacked_uint64_field = 51 [packed = false]; + */ + unpackedUint64Field: bigint[]; + + /** + * @generated from oneof spec.Proto2Message.either + */ + either: { + /** + * @generated from field: string oneof_string_field = 52; + */ + value: string; + case: "oneofStringField"; + } | { + /** + * @generated from field: bytes oneof_bytes_field = 53; + */ + value: Uint8Array; + case: "oneofBytesField"; + } | { + /** + * @generated from field: int32 oneof_int32_field = 54; + */ + value: number; + case: "oneofInt32Field"; + } | { + /** + * @generated from field: int64 oneof_int64_field = 55; + */ + value: bigint; + case: "oneofInt64Field"; + } | { + /** + * @generated from field: int64 oneof_int64_js_number_field = 112 [jstype = JS_NUMBER]; + */ + value: bigint; + case: "oneofInt64JsNumberField"; + } | { + /** + * @generated from field: int64 oneof_int64_js_string_field = 111 [jstype = JS_STRING]; + */ + value: string; + case: "oneofInt64JsStringField"; + } | { + /** + * @generated from field: float oneof_float_field = 56; + */ + value: number; + case: "oneofFloatField"; + } | { + /** + * @generated from field: bool oneof_bool_field = 57; + */ + value: boolean; + case: "oneofBoolField"; + } | { + /** + * @generated from field: spec.Proto2Enum oneof_enum_field = 58; + */ + value: Proto2Enum; + case: "oneofEnumField"; + } | { + /** + * @generated from field: spec.Proto2Message oneof_message_field = 59; + */ + value: Proto2Message; + case: "oneofMessageField"; + } | { + /** + * @generated from field: spec.Proto2Message.OneofGroup oneofgroup = 60; + */ + value: Proto2Message_OneofGroup; + case: "oneofgroup"; + } | { + /** + * @generated from field: google.protobuf.UInt32Value oneof_wrapped_uint32_field = 205; + */ + value: UInt32Value; + case: "oneofWrappedUint32Field"; + } | { case: undefined; value?: undefined }; + + /** + * @generated from field: map map_string_string_field = 70; + */ + mapStringStringField: { [key: string]: string }; + + /** + * @generated from field: map map_int32_int32_field = 71; + */ + mapInt32Int32Field: { [key: number]: number }; + + /** + * @generated from field: map map_bool_bool_field = 72; + */ + mapBoolBoolField: { [key: string]: boolean }; + + /** + * @generated from field: map map_int64_int64_field = 73; + */ + mapInt64Int64Field: { [key: string]: bigint }; + + /** + * @generated from field: map map_int32_enum_field = 74; + */ + mapInt32EnumField: { [key: number]: Proto2EnumWithZero }; + + /** + * @generated from field: map map_int32_message_field = 75; + */ + mapInt32MessageField: { [key: number]: Proto2Message }; + + /** + * @generated from field: map map_int32_wrapped_uint32_field = 209; + */ + mapInt32WrappedUint32Field: { [key: number]: UInt32Value }; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "spec.Proto2Message"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): Proto2Message; + + static fromJson(jsonValue: JsonValue, options?: Partial): Proto2Message; + + static fromJsonString(jsonString: string, options?: Partial): Proto2Message; + + static equals(a: Proto2Message | PlainMessage | undefined, b: Proto2Message | PlainMessage | undefined): boolean; +} + +/** + * @generated from message spec.Proto2Message.RequiredGroup + */ +export declare class Proto2Message_RequiredGroup extends Message { + /** + * @generated from field: optional int32 int32_field = 1; + */ + int32Field: number; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "spec.Proto2Message.RequiredGroup"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): Proto2Message_RequiredGroup; + + static fromJson(jsonValue: JsonValue, options?: Partial): Proto2Message_RequiredGroup; + + static fromJsonString(jsonString: string, options?: Partial): Proto2Message_RequiredGroup; + + static equals(a: Proto2Message_RequiredGroup | PlainMessage | undefined, b: Proto2Message_RequiredGroup | PlainMessage | undefined): boolean; +} + +/** + * @generated from message spec.Proto2Message.RequiredDefaultGroup + */ +export declare class Proto2Message_RequiredDefaultGroup extends Message { + /** + * @generated from field: optional int32 int32_field = 1; + */ + int32Field: number; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "spec.Proto2Message.RequiredDefaultGroup"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): Proto2Message_RequiredDefaultGroup; + + static fromJson(jsonValue: JsonValue, options?: Partial): Proto2Message_RequiredDefaultGroup; + + static fromJsonString(jsonString: string, options?: Partial): Proto2Message_RequiredDefaultGroup; + + static equals(a: Proto2Message_RequiredDefaultGroup | PlainMessage | undefined, b: Proto2Message_RequiredDefaultGroup | PlainMessage | undefined): boolean; +} + +/** + * @generated from message spec.Proto2Message.OptionalGroup + */ +export declare class Proto2Message_OptionalGroup extends Message { + /** + * @generated from field: optional int32 int32_field = 1; + */ + int32Field: number; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "spec.Proto2Message.OptionalGroup"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): Proto2Message_OptionalGroup; + + static fromJson(jsonValue: JsonValue, options?: Partial): Proto2Message_OptionalGroup; + + static fromJsonString(jsonString: string, options?: Partial): Proto2Message_OptionalGroup; + + static equals(a: Proto2Message_OptionalGroup | PlainMessage | undefined, b: Proto2Message_OptionalGroup | PlainMessage | undefined): boolean; +} + +/** + * @generated from message spec.Proto2Message.OptionalDefaultGroup + */ +export declare class Proto2Message_OptionalDefaultGroup extends Message { + /** + * @generated from field: optional int32 int32_field = 1; + */ + int32Field: number; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "spec.Proto2Message.OptionalDefaultGroup"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): Proto2Message_OptionalDefaultGroup; + + static fromJson(jsonValue: JsonValue, options?: Partial): Proto2Message_OptionalDefaultGroup; + + static fromJsonString(jsonString: string, options?: Partial): Proto2Message_OptionalDefaultGroup; + + static equals(a: Proto2Message_OptionalDefaultGroup | PlainMessage | undefined, b: Proto2Message_OptionalDefaultGroup | PlainMessage | undefined): boolean; +} + +/** + * @generated from message spec.Proto2Message.RepeatedGroup + */ +export declare class Proto2Message_RepeatedGroup extends Message { + /** + * @generated from field: optional int32 int32_field = 1; + */ + int32Field: number; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "spec.Proto2Message.RepeatedGroup"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): Proto2Message_RepeatedGroup; + + static fromJson(jsonValue: JsonValue, options?: Partial): Proto2Message_RepeatedGroup; + + static fromJsonString(jsonString: string, options?: Partial): Proto2Message_RepeatedGroup; + + static equals(a: Proto2Message_RepeatedGroup | PlainMessage | undefined, b: Proto2Message_RepeatedGroup | PlainMessage | undefined): boolean; +} + +/** + * @generated from message spec.Proto2Message.OneofGroup + */ +export declare class Proto2Message_OneofGroup extends Message { + /** + * @generated from field: optional int32 int32_field = 1; + */ + int32Field: number; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "spec.Proto2Message.OneofGroup"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): Proto2Message_OneofGroup; + + static fromJson(jsonValue: JsonValue, options?: Partial): Proto2Message_OneofGroup; + + static fromJsonString(jsonString: string, options?: Partial): Proto2Message_OneofGroup; + + static equals(a: Proto2Message_OneofGroup | PlainMessage | undefined, b: Proto2Message_OneofGroup | PlainMessage | undefined): boolean; +} + +/** + * @generated from message spec.Proto2RepeatedMessage + * @deprecated + */ +export declare class Proto2RepeatedMessage extends Message { + /** + * @generated from field: repeated string string_field = 1; + */ + stringField: string[]; + + /** + * @generated from field: repeated bytes bytes_field = 2; + */ + bytesField: Uint8Array[]; + + /** + * @generated from field: repeated int32 int32_field = 3; + */ + int32Field: number[]; + + /** + * @generated from field: repeated int64 int64_field = 4; + */ + int64Field: bigint[]; + + /** + * @generated from field: repeated float float_field = 5; + */ + floatField: number[]; + + /** + * @generated from field: repeated bool bool_field = 6; + */ + boolField: boolean[]; + + /** + * @generated from field: repeated spec.Proto2Enum enum_field = 7; + */ + enumField: Proto2Enum[]; + + /** + * @generated from field: repeated spec.Proto2ChildMessage message_field = 8; + */ + messageField: Proto2ChildMessage[]; + + /** + * @generated from field: repeated spec.Proto2RepeatedMessage.RepeatedGroup repeatedgroup = 9; + */ + repeatedgroup: Proto2RepeatedMessage_RepeatedGroup[]; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "spec.Proto2RepeatedMessage"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): Proto2RepeatedMessage; + + static fromJson(jsonValue: JsonValue, options?: Partial): Proto2RepeatedMessage; + + static fromJsonString(jsonString: string, options?: Partial): Proto2RepeatedMessage; + + static equals(a: Proto2RepeatedMessage | PlainMessage | undefined, b: Proto2RepeatedMessage | PlainMessage | undefined): boolean; +} + +/** + * @generated from message spec.Proto2RepeatedMessage.RepeatedGroup + */ +export declare class Proto2RepeatedMessage_RepeatedGroup extends Message { + /** + * @generated from field: optional int32 int32_field = 1; + */ + int32Field: number; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "spec.Proto2RepeatedMessage.RepeatedGroup"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): Proto2RepeatedMessage_RepeatedGroup; + + static fromJson(jsonValue: JsonValue, options?: Partial): Proto2RepeatedMessage_RepeatedGroup; + + static fromJsonString(jsonString: string, options?: Partial): Proto2RepeatedMessage_RepeatedGroup; + + static equals(a: Proto2RepeatedMessage_RepeatedGroup | PlainMessage | undefined, b: Proto2RepeatedMessage_RepeatedGroup | PlainMessage | undefined): boolean; +} + +/** + * @generated from message spec.Proto2OneofMessage + * @deprecated + */ +export declare class Proto2OneofMessage extends Message { + /** + * @generated from oneof spec.Proto2OneofMessage.some + */ + some: { + /** + * @generated from field: string string_field = 1; + */ + value: string; + case: "stringField"; + } | { + /** + * @generated from field: bytes bytes_field = 2; + */ + value: Uint8Array; + case: "bytesField"; + } | { + /** + * @generated from field: int32 int32_field = 3; + */ + value: number; + case: "int32Field"; + } | { + /** + * @generated from field: int64 int64_field = 4; + */ + value: bigint; + case: "int64Field"; + } | { + /** + * @generated from field: float float_field = 5; + */ + value: number; + case: "floatField"; + } | { + /** + * @generated from field: bool bool_field = 6; + */ + value: boolean; + case: "boolField"; + } | { + /** + * @generated from field: spec.Proto2Enum enum_field = 7; + */ + value: Proto2Enum; + case: "enumField"; + } | { + /** + * @generated from field: spec.Proto2ChildMessage message_field = 8; + */ + value: Proto2ChildMessage; + case: "messageField"; + } | { + /** + * @generated from field: spec.Proto2OneofMessage.RepeatedGroup repeatedgroup = 9; + */ + value: Proto2OneofMessage_RepeatedGroup; + case: "repeatedgroup"; + } | { case: undefined; value?: undefined }; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "spec.Proto2OneofMessage"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): Proto2OneofMessage; + + static fromJson(jsonValue: JsonValue, options?: Partial): Proto2OneofMessage; + + static fromJsonString(jsonString: string, options?: Partial): Proto2OneofMessage; + + static equals(a: Proto2OneofMessage | PlainMessage | undefined, b: Proto2OneofMessage | PlainMessage | undefined): boolean; +} + +/** + * @generated from message spec.Proto2OneofMessage.RepeatedGroup + */ +export declare class Proto2OneofMessage_RepeatedGroup extends Message { + /** + * @generated from field: optional int32 int32_field = 1; + */ + int32Field: number; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto2; + static readonly typeName = "spec.Proto2OneofMessage.RepeatedGroup"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): Proto2OneofMessage_RepeatedGroup; + + static fromJson(jsonValue: JsonValue, options?: Partial): Proto2OneofMessage_RepeatedGroup; + + static fromJsonString(jsonString: string, options?: Partial): Proto2OneofMessage_RepeatedGroup; + + static equals(a: Proto2OneofMessage_RepeatedGroup | PlainMessage | undefined, b: Proto2OneofMessage_RepeatedGroup | PlainMessage | undefined): boolean; +} + /** * @generated from message spec.Proto2PackedMessage + * @deprecated */ export declare class Proto2PackedMessage extends Message { /** @@ -70,6 +885,7 @@ export declare class Proto2PackedMessage extends Message { /** * @generated from message spec.Proto2UnpackedMessage + * @deprecated */ export declare class Proto2UnpackedMessage extends Message { /** @@ -104,6 +920,7 @@ export declare class Proto2UnpackedMessage extends Message { /** @@ -138,6 +955,7 @@ export declare class Proto2UnspecifiedPackedMessage extends Message { /** @@ -197,6 +1015,7 @@ export declare class Proto2OptionalMessage extends Message { /** @@ -256,6 +1075,7 @@ export declare class Proto2RequiredMessage extends Message { /** @@ -315,6 +1135,7 @@ export declare class Proto2RequiredDefaultsMessage extends Message { /** @@ -374,6 +1195,7 @@ export declare class Proto2DefaultsMessage extends Message { /** @@ -398,6 +1220,7 @@ export declare class Proto2ChildMessage extends Message { /** * @generated from message spec.Proto2GroupsMessage + * @deprecated */ export declare class Proto2GroupsMessage extends Message { /** @@ -501,6 +1324,7 @@ export declare class Proto2GroupsMessage_Group_NestedGroup extends Message { /** @@ -525,6 +1349,7 @@ export declare class Proto2GroupsMessage_RepeatedGroup extends Message { /** diff --git a/packages/protobuf-test/src/gen/js/extra/proto2_pb.js b/packages/protobuf-test/src/gen/js/extra/proto2_pb.js index 1d6f1f21f..3c664313b 100644 --- a/packages/protobuf-test/src/gen/js/extra/proto2_pb.js +++ b/packages/protobuf-test/src/gen/js/extra/proto2_pb.js @@ -16,7 +16,7 @@ // @generated from file extra/proto2.proto (package spec, syntax proto2) /* eslint-disable */ -import { proto2, protoInt64 } from "@bufbuild/protobuf"; +import { proto2, protoInt64, UInt32Value } from "@bufbuild/protobuf"; /** * @generated from enum spec.Proto2Enum @@ -29,8 +29,242 @@ export const Proto2Enum = proto2.makeEnum( ], ); +/** + * First enum value must be 0 when used as map value type + * + * @generated from enum spec.Proto2EnumWithZero + */ +export const Proto2EnumWithZero = proto2.makeEnum( + "spec.Proto2EnumWithZero", + [ + {no: 0, name: "PROTO2_ENUM_WITH_ZERO_ZERO", localName: "ZERO"}, + {no: 1, name: "PROTO2_ENUM_WITH_ZERO_ONE", localName: "ONE"}, + ], +); + +/** + * @generated from message spec.Proto2Message + */ +export const Proto2Message = proto2.makeMessageType( + "spec.Proto2Message", + () => [ + { no: 1, name: "required_string_field", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true }, + { no: 2, name: "required_bytes_field", kind: "scalar", T: 12 /* ScalarType.BYTES */, req: true }, + { no: 3, name: "required_int32_field", kind: "scalar", T: 5 /* ScalarType.INT32 */, req: true }, + { no: 4, name: "required_int64_field", kind: "scalar", T: 3 /* ScalarType.INT64 */, req: true }, + { no: 103, name: "required_int64_js_number_field", kind: "scalar", T: 3 /* ScalarType.INT64 */, req: true }, + { no: 102, name: "required_int64_js_string_field", kind: "scalar", T: 3 /* ScalarType.INT64 */, L: 1 /* LongType.STRING */, req: true }, + { no: 5, name: "required_float_field", kind: "scalar", T: 2 /* ScalarType.FLOAT */, req: true }, + { no: 6, name: "required_bool_field", kind: "scalar", T: 8 /* ScalarType.BOOL */, req: true }, + { no: 7, name: "required_enum_field", kind: "enum", T: proto2.getEnumType(Proto2Enum), req: true }, + { no: 8, name: "required_message_field", kind: "message", T: Proto2Message, req: true }, + { no: 9, name: "requiredgroup", kind: "message", T: Proto2Message_RequiredGroup, delimited: true, req: true }, + { no: 201, name: "required_wrapped_uint32_field", kind: "message", T: UInt32Value, req: true }, + { no: 10, name: "required_default_string_field", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true, default: "hello \" */ " }, + { no: 11, name: "required_default_bytes_field", kind: "scalar", T: 12 /* ScalarType.BYTES */, req: true, default: new Uint8Array([0x00, 0x78, 0x5C, 0x78, 0x78, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x08, 0x0C, 0x0A, 0x0D, 0x09, 0x0B]) }, + { no: 12, name: "required_default_int32_field", kind: "scalar", T: 5 /* ScalarType.INT32 */, req: true, default: 128 }, + { no: 13, name: "required_default_int64_field", kind: "scalar", T: 3 /* ScalarType.INT64 */, req: true, default: protoInt64.parse("-256") }, + { no: 110, name: "required_default_int64_js_number_field", kind: "scalar", T: 3 /* ScalarType.INT64 */, req: true, default: protoInt64.parse("-256") }, + { no: 113, name: "required_default_int64_js_string_field", kind: "scalar", T: 3 /* ScalarType.INT64 */, L: 1 /* LongType.STRING */, req: true, default: "-256" }, + { no: 14, name: "required_default_float_field", kind: "scalar", T: 2 /* ScalarType.FLOAT */, req: true, default: -512.13 }, + { no: 15, name: "required_default_bool_field", kind: "scalar", T: 8 /* ScalarType.BOOL */, req: true, default: true }, + { no: 16, name: "required_default_enum_field", kind: "enum", T: proto2.getEnumType(Proto2Enum), req: true, default: Proto2Enum.YES }, + { no: 17, name: "required_default_message_field", kind: "message", T: Proto2Message, req: true }, + { no: 18, name: "requireddefaultgroup", kind: "message", T: Proto2Message_RequiredDefaultGroup, delimited: true, req: true }, + { no: 202, name: "required_default_wrapped_uint32_field", kind: "message", T: UInt32Value, req: true }, + { no: 19, name: "optional_string_field", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 20, name: "optional_bytes_field", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, + { no: 21, name: "optional_int32_field", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 22, name: "optional_int64_field", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, + { no: 106, name: "optional_int64_js_number_field", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, + { no: 105, name: "optional_int64_js_string_field", kind: "scalar", T: 3 /* ScalarType.INT64 */, L: 1 /* LongType.STRING */, opt: true }, + { no: 23, name: "optional_float_field", kind: "scalar", T: 2 /* ScalarType.FLOAT */, opt: true }, + { no: 24, name: "optional_bool_field", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true }, + { no: 25, name: "optional_enum_field", kind: "enum", T: proto2.getEnumType(Proto2Enum), opt: true }, + { no: 26, name: "optional_message_field", kind: "message", T: Proto2Message, opt: true }, + { no: 27, name: "optionalgroup", kind: "message", T: Proto2Message_OptionalGroup, delimited: true, opt: true }, + { no: 207, name: "optional_wrapped_uint32_field", kind: "message", T: UInt32Value, req: true }, + { no: 28, name: "optional_default_string_field", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true, default: "hello \" */ " }, + { no: 29, name: "optional_default_bytes_field", kind: "scalar", T: 12 /* ScalarType.BYTES */, req: true, default: new Uint8Array([0x00, 0x78, 0x5C, 0x78, 0x78, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x08, 0x0C, 0x0A, 0x0D, 0x09, 0x0B]) }, + { no: 30, name: "optional_default_int32_field", kind: "scalar", T: 5 /* ScalarType.INT32 */, req: true, default: 128 }, + { no: 31, name: "optional_default_int64_field", kind: "scalar", T: 3 /* ScalarType.INT64 */, req: true, default: protoInt64.parse("-256") }, + { no: 120, name: "optional_default_int64_js_number_field", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true, default: protoInt64.parse("-256") }, + { no: 121, name: "optional_default_int64_js_string_field", kind: "scalar", T: 3 /* ScalarType.INT64 */, L: 1 /* LongType.STRING */, opt: true, default: "-256" }, + { no: 32, name: "optional_default_float_field", kind: "scalar", T: 2 /* ScalarType.FLOAT */, req: true, default: -512.13 }, + { no: 33, name: "optional_default_bool_field", kind: "scalar", T: 8 /* ScalarType.BOOL */, req: true, default: true }, + { no: 34, name: "optional_default_enum_field", kind: "enum", T: proto2.getEnumType(Proto2Enum), req: true, default: Proto2Enum.YES }, + { no: 35, name: "optional_default_message_field", kind: "message", T: Proto2Message, opt: true }, + { no: 36, name: "optionaldefaultgroup", kind: "message", T: Proto2Message_OptionalDefaultGroup, delimited: true, opt: true }, + { no: 203, name: "optional_default_wrapped_uint32_field", kind: "message", T: UInt32Value, req: true }, + { no: 37, name: "repeated_string_field", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, + { no: 38, name: "repeated_bytes_field", kind: "scalar", T: 12 /* ScalarType.BYTES */, repeated: true }, + { no: 39, name: "repeated_int32_field", kind: "scalar", T: 5 /* ScalarType.INT32 */, repeated: true }, + { no: 40, name: "repeated_int64_field", kind: "scalar", T: 3 /* ScalarType.INT64 */, repeated: true }, + { no: 109, name: "repeated_int64_js_number_field", kind: "scalar", T: 3 /* ScalarType.INT64 */, repeated: true }, + { no: 108, name: "repeated_int64_js_string_field", kind: "scalar", T: 3 /* ScalarType.INT64 */, L: 1 /* LongType.STRING */, repeated: true }, + { no: 41, name: "repeated_float_field", kind: "scalar", T: 2 /* ScalarType.FLOAT */, repeated: true }, + { no: 42, name: "repeated_bool_field", kind: "scalar", T: 8 /* ScalarType.BOOL */, repeated: true }, + { no: 43, name: "repeated_enum_field", kind: "enum", T: proto2.getEnumType(Proto2Enum), repeated: true }, + { no: 44, name: "repeated_message_field", kind: "message", T: Proto2Message, repeated: true }, + { no: 45, name: "repeatedgroup", kind: "message", T: Proto2Message_RepeatedGroup, delimited: true, repeated: true }, + { no: 204, name: "repeated_wrapped_uint32_field", kind: "message", T: UInt32Value, repeated: true }, + { no: 46, name: "packed_double_field", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, repeated: true, packed: true }, + { no: 47, name: "packed_uint32_field", kind: "scalar", T: 13 /* ScalarType.UINT32 */, repeated: true, packed: true }, + { no: 48, name: "packed_uint64_field", kind: "scalar", T: 4 /* ScalarType.UINT64 */, repeated: true, packed: true }, + { no: 49, name: "unpacked_double_field", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, repeated: true }, + { no: 50, name: "unpacked_uint32_field", kind: "scalar", T: 13 /* ScalarType.UINT32 */, repeated: true }, + { no: 51, name: "unpacked_uint64_field", kind: "scalar", T: 4 /* ScalarType.UINT64 */, repeated: true }, + { no: 52, name: "oneof_string_field", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "either" }, + { no: 53, name: "oneof_bytes_field", kind: "scalar", T: 12 /* ScalarType.BYTES */, oneof: "either" }, + { no: 54, name: "oneof_int32_field", kind: "scalar", T: 5 /* ScalarType.INT32 */, oneof: "either" }, + { no: 55, name: "oneof_int64_field", kind: "scalar", T: 3 /* ScalarType.INT64 */, oneof: "either" }, + { no: 112, name: "oneof_int64_js_number_field", kind: "scalar", T: 3 /* ScalarType.INT64 */, oneof: "either" }, + { no: 111, name: "oneof_int64_js_string_field", kind: "scalar", T: 3 /* ScalarType.INT64 */, L: 1 /* LongType.STRING */, oneof: "either" }, + { no: 56, name: "oneof_float_field", kind: "scalar", T: 2 /* ScalarType.FLOAT */, oneof: "either" }, + { no: 57, name: "oneof_bool_field", kind: "scalar", T: 8 /* ScalarType.BOOL */, oneof: "either" }, + { no: 58, name: "oneof_enum_field", kind: "enum", T: proto2.getEnumType(Proto2Enum), oneof: "either" }, + { no: 59, name: "oneof_message_field", kind: "message", T: Proto2Message, oneof: "either" }, + { no: 60, name: "oneofgroup", kind: "message", T: Proto2Message_OneofGroup, delimited: true, oneof: "either" }, + { no: 205, name: "oneof_wrapped_uint32_field", kind: "message", T: UInt32Value, oneof: "either" }, + { no: 70, name: "map_string_string_field", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "scalar", T: 9 /* ScalarType.STRING */} }, + { no: 71, name: "map_int32_int32_field", kind: "map", K: 5 /* ScalarType.INT32 */, V: {kind: "scalar", T: 5 /* ScalarType.INT32 */} }, + { no: 72, name: "map_bool_bool_field", kind: "map", K: 8 /* ScalarType.BOOL */, V: {kind: "scalar", T: 8 /* ScalarType.BOOL */} }, + { no: 73, name: "map_int64_int64_field", kind: "map", K: 3 /* ScalarType.INT64 */, V: {kind: "scalar", T: 3 /* ScalarType.INT64 */} }, + { no: 74, name: "map_int32_enum_field", kind: "map", K: 5 /* ScalarType.INT32 */, V: {kind: "enum", T: proto2.getEnumType(Proto2EnumWithZero)} }, + { no: 75, name: "map_int32_message_field", kind: "map", K: 5 /* ScalarType.INT32 */, V: {kind: "message", T: Proto2Message} }, + { no: 209, name: "map_int32_wrapped_uint32_field", kind: "map", K: 5 /* ScalarType.INT32 */, V: {kind: "message", T: UInt32Value} }, + ], +); + +/** + * @generated from message spec.Proto2Message.RequiredGroup + */ +export const Proto2Message_RequiredGroup = proto2.makeMessageType( + "spec.Proto2Message.RequiredGroup", + () => [ + { no: 1, name: "int32_field", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + ], + {localName: "Proto2Message_RequiredGroup"}, +); + +/** + * @generated from message spec.Proto2Message.RequiredDefaultGroup + */ +export const Proto2Message_RequiredDefaultGroup = proto2.makeMessageType( + "spec.Proto2Message.RequiredDefaultGroup", + () => [ + { no: 1, name: "int32_field", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + ], + {localName: "Proto2Message_RequiredDefaultGroup"}, +); + +/** + * @generated from message spec.Proto2Message.OptionalGroup + */ +export const Proto2Message_OptionalGroup = proto2.makeMessageType( + "spec.Proto2Message.OptionalGroup", + () => [ + { no: 1, name: "int32_field", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + ], + {localName: "Proto2Message_OptionalGroup"}, +); + +/** + * @generated from message spec.Proto2Message.OptionalDefaultGroup + */ +export const Proto2Message_OptionalDefaultGroup = proto2.makeMessageType( + "spec.Proto2Message.OptionalDefaultGroup", + () => [ + { no: 1, name: "int32_field", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + ], + {localName: "Proto2Message_OptionalDefaultGroup"}, +); + +/** + * @generated from message spec.Proto2Message.RepeatedGroup + */ +export const Proto2Message_RepeatedGroup = proto2.makeMessageType( + "spec.Proto2Message.RepeatedGroup", + () => [ + { no: 1, name: "int32_field", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + ], + {localName: "Proto2Message_RepeatedGroup"}, +); + +/** + * @generated from message spec.Proto2Message.OneofGroup + */ +export const Proto2Message_OneofGroup = proto2.makeMessageType( + "spec.Proto2Message.OneofGroup", + () => [ + { no: 1, name: "int32_field", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + ], + {localName: "Proto2Message_OneofGroup"}, +); + +/** + * @generated from message spec.Proto2RepeatedMessage + * @deprecated + */ +export const Proto2RepeatedMessage = proto2.makeMessageType( + "spec.Proto2RepeatedMessage", + () => [ + { no: 1, name: "string_field", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, + { no: 2, name: "bytes_field", kind: "scalar", T: 12 /* ScalarType.BYTES */, repeated: true }, + { no: 3, name: "int32_field", kind: "scalar", T: 5 /* ScalarType.INT32 */, repeated: true }, + { no: 4, name: "int64_field", kind: "scalar", T: 3 /* ScalarType.INT64 */, repeated: true }, + { no: 5, name: "float_field", kind: "scalar", T: 2 /* ScalarType.FLOAT */, repeated: true }, + { no: 6, name: "bool_field", kind: "scalar", T: 8 /* ScalarType.BOOL */, repeated: true }, + { no: 7, name: "enum_field", kind: "enum", T: proto2.getEnumType(Proto2Enum), repeated: true }, + { no: 8, name: "message_field", kind: "message", T: Proto2ChildMessage, repeated: true }, + { no: 9, name: "repeatedgroup", kind: "message", T: Proto2RepeatedMessage_RepeatedGroup, delimited: true, repeated: true }, + ], +); + +/** + * @generated from message spec.Proto2RepeatedMessage.RepeatedGroup + */ +export const Proto2RepeatedMessage_RepeatedGroup = proto2.makeMessageType( + "spec.Proto2RepeatedMessage.RepeatedGroup", + () => [ + { no: 1, name: "int32_field", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + ], + {localName: "Proto2RepeatedMessage_RepeatedGroup"}, +); + +/** + * @generated from message spec.Proto2OneofMessage + * @deprecated + */ +export const Proto2OneofMessage = proto2.makeMessageType( + "spec.Proto2OneofMessage", + () => [ + { no: 1, name: "string_field", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "some" }, + { no: 2, name: "bytes_field", kind: "scalar", T: 12 /* ScalarType.BYTES */, oneof: "some" }, + { no: 3, name: "int32_field", kind: "scalar", T: 5 /* ScalarType.INT32 */, oneof: "some" }, + { no: 4, name: "int64_field", kind: "scalar", T: 3 /* ScalarType.INT64 */, oneof: "some" }, + { no: 5, name: "float_field", kind: "scalar", T: 2 /* ScalarType.FLOAT */, oneof: "some" }, + { no: 6, name: "bool_field", kind: "scalar", T: 8 /* ScalarType.BOOL */, oneof: "some" }, + { no: 7, name: "enum_field", kind: "enum", T: proto2.getEnumType(Proto2Enum), oneof: "some" }, + { no: 8, name: "message_field", kind: "message", T: Proto2ChildMessage, oneof: "some" }, + { no: 9, name: "repeatedgroup", kind: "message", T: Proto2OneofMessage_RepeatedGroup, delimited: true, oneof: "some" }, + ], +); + +/** + * @generated from message spec.Proto2OneofMessage.RepeatedGroup + */ +export const Proto2OneofMessage_RepeatedGroup = proto2.makeMessageType( + "spec.Proto2OneofMessage.RepeatedGroup", + () => [ + { no: 1, name: "int32_field", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + ], + {localName: "Proto2OneofMessage_RepeatedGroup"}, +); + /** * @generated from message spec.Proto2PackedMessage + * @deprecated */ export const Proto2PackedMessage = proto2.makeMessageType( "spec.Proto2PackedMessage", @@ -43,6 +277,7 @@ export const Proto2PackedMessage = proto2.makeMessageType( /** * @generated from message spec.Proto2UnpackedMessage + * @deprecated */ export const Proto2UnpackedMessage = proto2.makeMessageType( "spec.Proto2UnpackedMessage", @@ -55,6 +290,7 @@ export const Proto2UnpackedMessage = proto2.makeMessageType( /** * @generated from message spec.Proto2UnspecifiedPackedMessage + * @deprecated */ export const Proto2UnspecifiedPackedMessage = proto2.makeMessageType( "spec.Proto2UnspecifiedPackedMessage", @@ -67,6 +303,7 @@ export const Proto2UnspecifiedPackedMessage = proto2.makeMessageType( /** * @generated from message spec.Proto2OptionalMessage + * @deprecated */ export const Proto2OptionalMessage = proto2.makeMessageType( "spec.Proto2OptionalMessage", @@ -84,6 +321,7 @@ export const Proto2OptionalMessage = proto2.makeMessageType( /** * @generated from message spec.Proto2RequiredMessage + * @deprecated */ export const Proto2RequiredMessage = proto2.makeMessageType( "spec.Proto2RequiredMessage", @@ -101,6 +339,7 @@ export const Proto2RequiredMessage = proto2.makeMessageType( /** * @generated from message spec.Proto2RequiredDefaultsMessage + * @deprecated */ export const Proto2RequiredDefaultsMessage = proto2.makeMessageType( "spec.Proto2RequiredDefaultsMessage", @@ -118,6 +357,7 @@ export const Proto2RequiredDefaultsMessage = proto2.makeMessageType( /** * @generated from message spec.Proto2DefaultsMessage + * @deprecated */ export const Proto2DefaultsMessage = proto2.makeMessageType( "spec.Proto2DefaultsMessage", @@ -135,6 +375,7 @@ export const Proto2DefaultsMessage = proto2.makeMessageType( /** * @generated from message spec.Proto2ChildMessage + * @deprecated */ export const Proto2ChildMessage = proto2.makeMessageType( "spec.Proto2ChildMessage", @@ -145,6 +386,7 @@ export const Proto2ChildMessage = proto2.makeMessageType( /** * @generated from message spec.Proto2GroupsMessage + * @deprecated */ export const Proto2GroupsMessage = proto2.makeMessageType( "spec.Proto2GroupsMessage", @@ -182,6 +424,7 @@ export const Proto2GroupsMessage_Group_NestedGroup = proto2.makeMessageType( /** * @generated from message spec.Proto2GroupsMessage.RepeatedGroup + * @deprecated */ export const Proto2GroupsMessage_RepeatedGroup = proto2.makeMessageType( "spec.Proto2GroupsMessage.RepeatedGroup", @@ -193,6 +436,7 @@ export const Proto2GroupsMessage_RepeatedGroup = proto2.makeMessageType( /** * @generated from message spec.Proto2GroupsMessage.OneofGroup + * @deprecated */ export const Proto2GroupsMessage_OneofGroup = proto2.makeMessageType( "spec.Proto2GroupsMessage.OneofGroup", diff --git a/packages/protobuf-test/src/gen/js/extra/proto2_pbv2.d.ts b/packages/protobuf-test/src/gen/js/extra/proto2_pbv2.d.ts new file mode 100644 index 000000000..746411e93 --- /dev/null +++ b/packages/protobuf-test/src/gen/js/extra/proto2_pbv2.d.ts @@ -0,0 +1,1119 @@ +// Copyright 2021-2024 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// @generated by protoc-gen-es-next v1.7.2 with parameter "ts_nocheck=false,target=js+dts" +// @generated from file extra/proto2.proto (package spec, syntax proto2) +/* eslint-disable */ + +import type { DescFile } from "@bufbuild/protobuf"; +import type { Message, UInt32Value } from "@bufbuild/protobuf/next"; +import type { TypedDescEnum, TypedDescMessage } from "@bufbuild/protobuf/next/codegenv1"; + +export declare const fileDesc_extra_proto2: DescFile; + +/** + * @generated from message spec.Proto2Message + */ +export declare type Proto2Message = Message<"spec.Proto2Message"> & { + /** + * @generated from field: required string required_string_field = 1; + */ + requiredStringField: string; + + /** + * @generated from field: required bytes required_bytes_field = 2; + */ + requiredBytesField: Uint8Array; + + /** + * @generated from field: required int32 required_int32_field = 3; + */ + requiredInt32Field: number; + + /** + * @generated from field: required int64 required_int64_field = 4; + */ + requiredInt64Field: bigint; + + /** + * @generated from field: required int64 required_int64_js_number_field = 103 [jstype = JS_NUMBER]; + */ + requiredInt64JsNumberField: bigint; + + /** + * @generated from field: required int64 required_int64_js_string_field = 102 [jstype = JS_STRING]; + */ + requiredInt64JsStringField: string; + + /** + * @generated from field: required float required_float_field = 5; + */ + requiredFloatField: number; + + /** + * @generated from field: required bool required_bool_field = 6; + */ + requiredBoolField: boolean; + + /** + * @generated from field: required spec.Proto2Enum required_enum_field = 7; + */ + requiredEnumField: Proto2Enum; + + /** + * @generated from field: required spec.Proto2Message required_message_field = 8; + */ + requiredMessageField?: Proto2Message; + + /** + * @generated from field: required spec.Proto2Message.RequiredGroup requiredgroup = 9; + */ + requiredgroup?: Proto2Message_RequiredGroup; + + /** + * @generated from field: required google.protobuf.UInt32Value required_wrapped_uint32_field = 201; + */ + requiredWrappedUint32Field?: number; + + /** + * @generated from field: required string required_default_string_field = 10 [default = "hello \" *\/ "]; + */ + requiredDefaultStringField: string; + + /** + * @generated from field: required bytes required_default_bytes_field = 11 [default = "\000x\\x\\"x\'AAAAAA\010\014\n\r\t\013"]; + */ + requiredDefaultBytesField: Uint8Array; + + /** + * @generated from field: required int32 required_default_int32_field = 12 [default = 128]; + */ + requiredDefaultInt32Field: number; + + /** + * @generated from field: required int64 required_default_int64_field = 13 [default = -256]; + */ + requiredDefaultInt64Field: bigint; + + /** + * @generated from field: required int64 required_default_int64_js_number_field = 110 [default = -256, jstype = JS_NUMBER]; + */ + requiredDefaultInt64JsNumberField: bigint; + + /** + * @generated from field: required int64 required_default_int64_js_string_field = 113 [default = -256, jstype = JS_STRING]; + */ + requiredDefaultInt64JsStringField: string; + + /** + * @generated from field: required float required_default_float_field = 14 [default = -512.13]; + */ + requiredDefaultFloatField: number; + + /** + * @generated from field: required bool required_default_bool_field = 15 [default = true]; + */ + requiredDefaultBoolField: boolean; + + /** + * @generated from field: required spec.Proto2Enum required_default_enum_field = 16 [default = PROTO2_ENUM_YES]; + */ + requiredDefaultEnumField: Proto2Enum; + + /** + * @generated from field: required spec.Proto2Message required_default_message_field = 17; + */ + requiredDefaultMessageField?: Proto2Message; + + /** + * @generated from field: required spec.Proto2Message.RequiredDefaultGroup requireddefaultgroup = 18; + */ + requireddefaultgroup?: Proto2Message_RequiredDefaultGroup; + + /** + * @generated from field: required google.protobuf.UInt32Value required_default_wrapped_uint32_field = 202; + */ + requiredDefaultWrappedUint32Field?: number; + + /** + * @generated from field: optional string optional_string_field = 19; + */ + optionalStringField: string; + + /** + * @generated from field: optional bytes optional_bytes_field = 20; + */ + optionalBytesField: Uint8Array; + + /** + * @generated from field: optional int32 optional_int32_field = 21; + */ + optionalInt32Field: number; + + /** + * @generated from field: optional int64 optional_int64_field = 22; + */ + optionalInt64Field: bigint; + + /** + * @generated from field: optional int64 optional_int64_js_number_field = 106 [jstype = JS_NUMBER]; + */ + optionalInt64JsNumberField: bigint; + + /** + * @generated from field: optional int64 optional_int64_js_string_field = 105 [jstype = JS_STRING]; + */ + optionalInt64JsStringField: string; + + /** + * @generated from field: optional float optional_float_field = 23; + */ + optionalFloatField: number; + + /** + * @generated from field: optional bool optional_bool_field = 24; + */ + optionalBoolField: boolean; + + /** + * @generated from field: optional spec.Proto2Enum optional_enum_field = 25; + */ + optionalEnumField: Proto2Enum; + + /** + * @generated from field: optional spec.Proto2Message optional_message_field = 26; + */ + optionalMessageField?: Proto2Message; + + /** + * @generated from field: optional spec.Proto2Message.OptionalGroup optionalgroup = 27; + */ + optionalgroup?: Proto2Message_OptionalGroup; + + /** + * @generated from field: required google.protobuf.UInt32Value optional_wrapped_uint32_field = 207; + */ + optionalWrappedUint32Field?: number; + + /** + * @generated from field: required string optional_default_string_field = 28 [default = "hello \" *\/ "]; + */ + optionalDefaultStringField: string; + + /** + * @generated from field: required bytes optional_default_bytes_field = 29 [default = "\000x\\x\\"x\'AAAAAA\010\014\n\r\t\013"]; + */ + optionalDefaultBytesField: Uint8Array; + + /** + * @generated from field: required int32 optional_default_int32_field = 30 [default = 128]; + */ + optionalDefaultInt32Field: number; + + /** + * @generated from field: required int64 optional_default_int64_field = 31 [default = -256]; + */ + optionalDefaultInt64Field: bigint; + + /** + * @generated from field: optional int64 optional_default_int64_js_number_field = 120 [default = -256, jstype = JS_NUMBER]; + */ + optionalDefaultInt64JsNumberField: bigint; + + /** + * @generated from field: optional int64 optional_default_int64_js_string_field = 121 [default = -256, jstype = JS_STRING]; + */ + optionalDefaultInt64JsStringField: string; + + /** + * @generated from field: required float optional_default_float_field = 32 [default = -512.13]; + */ + optionalDefaultFloatField: number; + + /** + * @generated from field: required bool optional_default_bool_field = 33 [default = true]; + */ + optionalDefaultBoolField: boolean; + + /** + * @generated from field: required spec.Proto2Enum optional_default_enum_field = 34 [default = PROTO2_ENUM_YES]; + */ + optionalDefaultEnumField: Proto2Enum; + + /** + * @generated from field: optional spec.Proto2Message optional_default_message_field = 35; + */ + optionalDefaultMessageField?: Proto2Message; + + /** + * @generated from field: optional spec.Proto2Message.OptionalDefaultGroup optionaldefaultgroup = 36; + */ + optionaldefaultgroup?: Proto2Message_OptionalDefaultGroup; + + /** + * @generated from field: required google.protobuf.UInt32Value optional_default_wrapped_uint32_field = 203; + */ + optionalDefaultWrappedUint32Field?: number; + + /** + * @generated from field: repeated string repeated_string_field = 37; + */ + repeatedStringField: string[]; + + /** + * @generated from field: repeated bytes repeated_bytes_field = 38; + */ + repeatedBytesField: Uint8Array[]; + + /** + * @generated from field: repeated int32 repeated_int32_field = 39; + */ + repeatedInt32Field: number[]; + + /** + * @generated from field: repeated int64 repeated_int64_field = 40; + */ + repeatedInt64Field: bigint[]; + + /** + * @generated from field: repeated int64 repeated_int64_js_number_field = 109 [jstype = JS_NUMBER]; + */ + repeatedInt64JsNumberField: bigint[]; + + /** + * @generated from field: repeated int64 repeated_int64_js_string_field = 108 [jstype = JS_STRING]; + */ + repeatedInt64JsStringField: string[]; + + /** + * @generated from field: repeated float repeated_float_field = 41; + */ + repeatedFloatField: number[]; + + /** + * @generated from field: repeated bool repeated_bool_field = 42; + */ + repeatedBoolField: boolean[]; + + /** + * @generated from field: repeated spec.Proto2Enum repeated_enum_field = 43; + */ + repeatedEnumField: Proto2Enum[]; + + /** + * @generated from field: repeated spec.Proto2Message repeated_message_field = 44; + */ + repeatedMessageField: Proto2Message[]; + + /** + * @generated from field: repeated spec.Proto2Message.RepeatedGroup repeatedgroup = 45; + */ + repeatedgroup: Proto2Message_RepeatedGroup[]; + + /** + * @generated from field: repeated google.protobuf.UInt32Value repeated_wrapped_uint32_field = 204; + */ + repeatedWrappedUint32Field: UInt32Value[]; + + /** + * @generated from field: repeated double packed_double_field = 46 [packed = true]; + */ + packedDoubleField: number[]; + + /** + * @generated from field: repeated uint32 packed_uint32_field = 47 [packed = true]; + */ + packedUint32Field: number[]; + + /** + * @generated from field: repeated uint64 packed_uint64_field = 48 [packed = true]; + */ + packedUint64Field: bigint[]; + + /** + * @generated from field: repeated double unpacked_double_field = 49 [packed = false]; + */ + unpackedDoubleField: number[]; + + /** + * @generated from field: repeated uint32 unpacked_uint32_field = 50 [packed = false]; + */ + unpackedUint32Field: number[]; + + /** + * @generated from field: repeated uint64 unpacked_uint64_field = 51 [packed = false]; + */ + unpackedUint64Field: bigint[]; + + /** + * @generated from oneof spec.Proto2Message.either + */ + either: { + /** + * @generated from field: string oneof_string_field = 52; + */ + value: string; + case: "oneofStringField"; + } | { + /** + * @generated from field: bytes oneof_bytes_field = 53; + */ + value: Uint8Array; + case: "oneofBytesField"; + } | { + /** + * @generated from field: int32 oneof_int32_field = 54; + */ + value: number; + case: "oneofInt32Field"; + } | { + /** + * @generated from field: int64 oneof_int64_field = 55; + */ + value: bigint; + case: "oneofInt64Field"; + } | { + /** + * @generated from field: int64 oneof_int64_js_number_field = 112 [jstype = JS_NUMBER]; + */ + value: bigint; + case: "oneofInt64JsNumberField"; + } | { + /** + * @generated from field: int64 oneof_int64_js_string_field = 111 [jstype = JS_STRING]; + */ + value: string; + case: "oneofInt64JsStringField"; + } | { + /** + * @generated from field: float oneof_float_field = 56; + */ + value: number; + case: "oneofFloatField"; + } | { + /** + * @generated from field: bool oneof_bool_field = 57; + */ + value: boolean; + case: "oneofBoolField"; + } | { + /** + * @generated from field: spec.Proto2Enum oneof_enum_field = 58; + */ + value: Proto2Enum; + case: "oneofEnumField"; + } | { + /** + * @generated from field: spec.Proto2Message oneof_message_field = 59; + */ + value: Proto2Message; + case: "oneofMessageField"; + } | { + /** + * @generated from field: spec.Proto2Message.OneofGroup oneofgroup = 60; + */ + value: Proto2Message_OneofGroup; + case: "oneofgroup"; + } | { + /** + * @generated from field: google.protobuf.UInt32Value oneof_wrapped_uint32_field = 205; + */ + value: UInt32Value; + case: "oneofWrappedUint32Field"; + } | { case: undefined; value?: undefined }; + + /** + * @generated from field: map map_string_string_field = 70; + */ + mapStringStringField: { [key: string]: string }; + + /** + * @generated from field: map map_int32_int32_field = 71; + */ + mapInt32Int32Field: { [key: number]: number }; + + /** + * @generated from field: map map_bool_bool_field = 72; + */ + mapBoolBoolField: { [key: string]: boolean }; + + /** + * @generated from field: map map_int64_int64_field = 73; + */ + mapInt64Int64Field: { [key: string]: bigint }; + + /** + * @generated from field: map map_int32_enum_field = 74; + */ + mapInt32EnumField: { [key: number]: Proto2EnumWithZero }; + + /** + * @generated from field: map map_int32_message_field = 75; + */ + mapInt32MessageField: { [key: number]: Proto2Message }; + + /** + * @generated from field: map map_int32_wrapped_uint32_field = 209; + */ + mapInt32WrappedUint32Field: { [key: number]: UInt32Value }; +}; + +// Describes the message spec.Proto2Message. Use `create(Proto2MessageDesc)` to create a new Proto2Message. +export declare const Proto2MessageDesc: TypedDescMessage; + +/** + * @generated from message spec.Proto2Message.RequiredGroup + */ +export declare type Proto2Message_RequiredGroup = Message<"spec.Proto2Message.RequiredGroup"> & { + /** + * @generated from field: optional int32 int32_field = 1; + */ + int32Field: number; +}; + +// Describes the message spec.Proto2Message.RequiredGroup. Use `create(Proto2Message_RequiredGroupDesc)` to create a new Proto2Message_RequiredGroup. +export declare const Proto2Message_RequiredGroupDesc: TypedDescMessage; + +/** + * @generated from message spec.Proto2Message.RequiredDefaultGroup + */ +export declare type Proto2Message_RequiredDefaultGroup = Message<"spec.Proto2Message.RequiredDefaultGroup"> & { + /** + * @generated from field: optional int32 int32_field = 1; + */ + int32Field: number; +}; + +// Describes the message spec.Proto2Message.RequiredDefaultGroup. Use `create(Proto2Message_RequiredDefaultGroupDesc)` to create a new Proto2Message_RequiredDefaultGroup. +export declare const Proto2Message_RequiredDefaultGroupDesc: TypedDescMessage; + +/** + * @generated from message spec.Proto2Message.OptionalGroup + */ +export declare type Proto2Message_OptionalGroup = Message<"spec.Proto2Message.OptionalGroup"> & { + /** + * @generated from field: optional int32 int32_field = 1; + */ + int32Field: number; +}; + +// Describes the message spec.Proto2Message.OptionalGroup. Use `create(Proto2Message_OptionalGroupDesc)` to create a new Proto2Message_OptionalGroup. +export declare const Proto2Message_OptionalGroupDesc: TypedDescMessage; + +/** + * @generated from message spec.Proto2Message.OptionalDefaultGroup + */ +export declare type Proto2Message_OptionalDefaultGroup = Message<"spec.Proto2Message.OptionalDefaultGroup"> & { + /** + * @generated from field: optional int32 int32_field = 1; + */ + int32Field: number; +}; + +// Describes the message spec.Proto2Message.OptionalDefaultGroup. Use `create(Proto2Message_OptionalDefaultGroupDesc)` to create a new Proto2Message_OptionalDefaultGroup. +export declare const Proto2Message_OptionalDefaultGroupDesc: TypedDescMessage; + +/** + * @generated from message spec.Proto2Message.RepeatedGroup + */ +export declare type Proto2Message_RepeatedGroup = Message<"spec.Proto2Message.RepeatedGroup"> & { + /** + * @generated from field: optional int32 int32_field = 1; + */ + int32Field: number; +}; + +// Describes the message spec.Proto2Message.RepeatedGroup. Use `create(Proto2Message_RepeatedGroupDesc)` to create a new Proto2Message_RepeatedGroup. +export declare const Proto2Message_RepeatedGroupDesc: TypedDescMessage; + +/** + * @generated from message spec.Proto2Message.OneofGroup + */ +export declare type Proto2Message_OneofGroup = Message<"spec.Proto2Message.OneofGroup"> & { + /** + * @generated from field: optional int32 int32_field = 1; + */ + int32Field: number; +}; + +// Describes the message spec.Proto2Message.OneofGroup. Use `create(Proto2Message_OneofGroupDesc)` to create a new Proto2Message_OneofGroup. +export declare const Proto2Message_OneofGroupDesc: TypedDescMessage; + +/** + * @generated from message spec.Proto2RepeatedMessage + * @deprecated + */ +export declare type Proto2RepeatedMessage = Message<"spec.Proto2RepeatedMessage"> & { + /** + * @generated from field: repeated string string_field = 1; + */ + stringField: string[]; + + /** + * @generated from field: repeated bytes bytes_field = 2; + */ + bytesField: Uint8Array[]; + + /** + * @generated from field: repeated int32 int32_field = 3; + */ + int32Field: number[]; + + /** + * @generated from field: repeated int64 int64_field = 4; + */ + int64Field: bigint[]; + + /** + * @generated from field: repeated float float_field = 5; + */ + floatField: number[]; + + /** + * @generated from field: repeated bool bool_field = 6; + */ + boolField: boolean[]; + + /** + * @generated from field: repeated spec.Proto2Enum enum_field = 7; + */ + enumField: Proto2Enum[]; + + /** + * @generated from field: repeated spec.Proto2ChildMessage message_field = 8; + */ + messageField: Proto2ChildMessage[]; + + /** + * @generated from field: repeated spec.Proto2RepeatedMessage.RepeatedGroup repeatedgroup = 9; + */ + repeatedgroup: Proto2RepeatedMessage_RepeatedGroup[]; +}; + +// Describes the message spec.Proto2RepeatedMessage. Use `create(Proto2RepeatedMessageDesc)` to create a new Proto2RepeatedMessage. +export declare const Proto2RepeatedMessageDesc: TypedDescMessage; + +/** + * @generated from message spec.Proto2RepeatedMessage.RepeatedGroup + */ +export declare type Proto2RepeatedMessage_RepeatedGroup = Message<"spec.Proto2RepeatedMessage.RepeatedGroup"> & { + /** + * @generated from field: optional int32 int32_field = 1; + */ + int32Field: number; +}; + +// Describes the message spec.Proto2RepeatedMessage.RepeatedGroup. Use `create(Proto2RepeatedMessage_RepeatedGroupDesc)` to create a new Proto2RepeatedMessage_RepeatedGroup. +export declare const Proto2RepeatedMessage_RepeatedGroupDesc: TypedDescMessage; + +/** + * @generated from message spec.Proto2OneofMessage + * @deprecated + */ +export declare type Proto2OneofMessage = Message<"spec.Proto2OneofMessage"> & { + /** + * @generated from oneof spec.Proto2OneofMessage.some + */ + some: { + /** + * @generated from field: string string_field = 1; + */ + value: string; + case: "stringField"; + } | { + /** + * @generated from field: bytes bytes_field = 2; + */ + value: Uint8Array; + case: "bytesField"; + } | { + /** + * @generated from field: int32 int32_field = 3; + */ + value: number; + case: "int32Field"; + } | { + /** + * @generated from field: int64 int64_field = 4; + */ + value: bigint; + case: "int64Field"; + } | { + /** + * @generated from field: float float_field = 5; + */ + value: number; + case: "floatField"; + } | { + /** + * @generated from field: bool bool_field = 6; + */ + value: boolean; + case: "boolField"; + } | { + /** + * @generated from field: spec.Proto2Enum enum_field = 7; + */ + value: Proto2Enum; + case: "enumField"; + } | { + /** + * @generated from field: spec.Proto2ChildMessage message_field = 8; + */ + value: Proto2ChildMessage; + case: "messageField"; + } | { + /** + * @generated from field: spec.Proto2OneofMessage.RepeatedGroup repeatedgroup = 9; + */ + value: Proto2OneofMessage_RepeatedGroup; + case: "repeatedgroup"; + } | { case: undefined; value?: undefined }; +}; + +// Describes the message spec.Proto2OneofMessage. Use `create(Proto2OneofMessageDesc)` to create a new Proto2OneofMessage. +export declare const Proto2OneofMessageDesc: TypedDescMessage; + +/** + * @generated from message spec.Proto2OneofMessage.RepeatedGroup + */ +export declare type Proto2OneofMessage_RepeatedGroup = Message<"spec.Proto2OneofMessage.RepeatedGroup"> & { + /** + * @generated from field: optional int32 int32_field = 1; + */ + int32Field: number; +}; + +// Describes the message spec.Proto2OneofMessage.RepeatedGroup. Use `create(Proto2OneofMessage_RepeatedGroupDesc)` to create a new Proto2OneofMessage_RepeatedGroup. +export declare const Proto2OneofMessage_RepeatedGroupDesc: TypedDescMessage; + +/** + * @generated from message spec.Proto2PackedMessage + * @deprecated + */ +export declare type Proto2PackedMessage = Message<"spec.Proto2PackedMessage"> & { + /** + * @generated from field: repeated double packed_double_field = 101 [packed = true]; + */ + packedDoubleField: number[]; + + /** + * @generated from field: repeated uint32 packed_uint32_field = 102 [packed = true]; + */ + packedUint32Field: number[]; + + /** + * @generated from field: repeated uint64 packed_uint64_field = 103 [packed = true]; + */ + packedUint64Field: bigint[]; +}; + +// Describes the message spec.Proto2PackedMessage. Use `create(Proto2PackedMessageDesc)` to create a new Proto2PackedMessage. +export declare const Proto2PackedMessageDesc: TypedDescMessage; + +/** + * @generated from message spec.Proto2UnpackedMessage + * @deprecated + */ +export declare type Proto2UnpackedMessage = Message<"spec.Proto2UnpackedMessage"> & { + /** + * @generated from field: repeated double unpacked_double_field = 201 [packed = false]; + */ + unpackedDoubleField: number[]; + + /** + * @generated from field: repeated uint32 unpacked_uint32_field = 202 [packed = false]; + */ + unpackedUint32Field: number[]; + + /** + * @generated from field: repeated uint64 unpacked_uint64_field = 203 [packed = false]; + */ + unpackedUint64Field: bigint[]; +}; + +// Describes the message spec.Proto2UnpackedMessage. Use `create(Proto2UnpackedMessageDesc)` to create a new Proto2UnpackedMessage. +export declare const Proto2UnpackedMessageDesc: TypedDescMessage; + +/** + * @generated from message spec.Proto2UnspecifiedPackedMessage + * @deprecated + */ +export declare type Proto2UnspecifiedPackedMessage = Message<"spec.Proto2UnspecifiedPackedMessage"> & { + /** + * @generated from field: repeated double double_field = 1; + */ + doubleField: number[]; + + /** + * @generated from field: repeated uint32 uint32_field = 2; + */ + uint32Field: number[]; + + /** + * @generated from field: repeated uint64 uint64_field = 3; + */ + uint64Field: bigint[]; +}; + +// Describes the message spec.Proto2UnspecifiedPackedMessage. Use `create(Proto2UnspecifiedPackedMessageDesc)` to create a new Proto2UnspecifiedPackedMessage. +export declare const Proto2UnspecifiedPackedMessageDesc: TypedDescMessage; + +/** + * @generated from message spec.Proto2OptionalMessage + * @deprecated + */ +export declare type Proto2OptionalMessage = Message<"spec.Proto2OptionalMessage"> & { + /** + * @generated from field: optional string string_field = 1; + */ + stringField: string; + + /** + * @generated from field: optional bytes bytes_field = 2; + */ + bytesField: Uint8Array; + + /** + * @generated from field: optional int32 int32_field = 3; + */ + int32Field: number; + + /** + * @generated from field: optional int64 int64_field = 4; + */ + int64Field: bigint; + + /** + * @generated from field: optional float float_field = 5; + */ + floatField: number; + + /** + * @generated from field: optional bool bool_field = 6; + */ + boolField: boolean; + + /** + * @generated from field: optional spec.Proto2Enum enum_field = 7; + */ + enumField: Proto2Enum; + + /** + * @generated from field: optional spec.Proto2ChildMessage message_field = 8; + */ + messageField?: Proto2ChildMessage; +}; + +// Describes the message spec.Proto2OptionalMessage. Use `create(Proto2OptionalMessageDesc)` to create a new Proto2OptionalMessage. +export declare const Proto2OptionalMessageDesc: TypedDescMessage; + +/** + * @generated from message spec.Proto2RequiredMessage + * @deprecated + */ +export declare type Proto2RequiredMessage = Message<"spec.Proto2RequiredMessage"> & { + /** + * @generated from field: required string string_field = 1; + */ + stringField: string; + + /** + * @generated from field: required bytes bytes_field = 2; + */ + bytesField: Uint8Array; + + /** + * @generated from field: required int32 int32_field = 3; + */ + int32Field: number; + + /** + * @generated from field: required int64 int64_field = 4; + */ + int64Field: bigint; + + /** + * @generated from field: required float float_field = 5; + */ + floatField: number; + + /** + * @generated from field: required bool bool_field = 6; + */ + boolField: boolean; + + /** + * @generated from field: required spec.Proto2Enum enum_field = 7; + */ + enumField: Proto2Enum; + + /** + * @generated from field: required spec.Proto2ChildMessage message_field = 8; + */ + messageField?: Proto2ChildMessage; +}; + +// Describes the message spec.Proto2RequiredMessage. Use `create(Proto2RequiredMessageDesc)` to create a new Proto2RequiredMessage. +export declare const Proto2RequiredMessageDesc: TypedDescMessage; + +/** + * @generated from message spec.Proto2RequiredDefaultsMessage + * @deprecated + */ +export declare type Proto2RequiredDefaultsMessage = Message<"spec.Proto2RequiredDefaultsMessage"> & { + /** + * @generated from field: required string string_field = 1 [default = "hello \" *\/ "]; + */ + stringField: string; + + /** + * @generated from field: required bytes bytes_field = 2 [default = "\000x\\x\\"x\'AAAAAA\010\014\n\r\t\013"]; + */ + bytesField: Uint8Array; + + /** + * @generated from field: required int32 int32_field = 3 [default = 128]; + */ + int32Field: number; + + /** + * @generated from field: required int64 int64_field = 4 [default = -256]; + */ + int64Field: bigint; + + /** + * @generated from field: required float float_field = 5 [default = -512.13]; + */ + floatField: number; + + /** + * @generated from field: required bool bool_field = 6 [default = true]; + */ + boolField: boolean; + + /** + * @generated from field: required spec.Proto2Enum enum_field = 7 [default = PROTO2_ENUM_YES]; + */ + enumField: Proto2Enum; + + /** + * @generated from field: required spec.Proto2ChildMessage message_field = 8; + */ + messageField?: Proto2ChildMessage; +}; + +// Describes the message spec.Proto2RequiredDefaultsMessage. Use `create(Proto2RequiredDefaultsMessageDesc)` to create a new Proto2RequiredDefaultsMessage. +export declare const Proto2RequiredDefaultsMessageDesc: TypedDescMessage; + +/** + * @generated from message spec.Proto2DefaultsMessage + * @deprecated + */ +export declare type Proto2DefaultsMessage = Message<"spec.Proto2DefaultsMessage"> & { + /** + * @generated from field: optional string string_field = 1 [default = "hello \" *\/ "]; + */ + stringField: string; + + /** + * @generated from field: optional bytes bytes_field = 2 [default = "\000x\\x\\"x\'AAAAAA\010\014\n\r\t\013"]; + */ + bytesField: Uint8Array; + + /** + * @generated from field: optional int32 int32_field = 3 [default = 128]; + */ + int32Field: number; + + /** + * @generated from field: optional int64 int64_field = 4 [default = -256]; + */ + int64Field: bigint; + + /** + * @generated from field: optional float float_field = 5 [default = -512.13]; + */ + floatField: number; + + /** + * @generated from field: optional bool bool_field = 6 [default = true]; + */ + boolField: boolean; + + /** + * @generated from field: optional spec.Proto2Enum enum_field = 7 [default = PROTO2_ENUM_YES]; + */ + enumField: Proto2Enum; + + /** + * @generated from field: optional spec.Proto2ChildMessage message_field = 8; + */ + messageField?: Proto2ChildMessage; +}; + +// Describes the message spec.Proto2DefaultsMessage. Use `create(Proto2DefaultsMessageDesc)` to create a new Proto2DefaultsMessage. +export declare const Proto2DefaultsMessageDesc: TypedDescMessage; + +/** + * @generated from message spec.Proto2ChildMessage + * @deprecated + */ +export declare type Proto2ChildMessage = Message<"spec.Proto2ChildMessage"> & { + /** + * @generated from field: optional string string_field = 1; + */ + stringField: string; +}; + +// Describes the message spec.Proto2ChildMessage. Use `create(Proto2ChildMessageDesc)` to create a new Proto2ChildMessage. +export declare const Proto2ChildMessageDesc: TypedDescMessage; + +/** + * @generated from message spec.Proto2GroupsMessage + * @deprecated + */ +export declare type Proto2GroupsMessage = Message<"spec.Proto2GroupsMessage"> & { + /** + * @generated from field: optional spec.Proto2GroupsMessage.Group group = 1; + */ + group?: Proto2GroupsMessage_Group; + + /** + * @generated from field: repeated spec.Proto2GroupsMessage.RepeatedGroup repeatedgroup = 2; + */ + repeatedgroup: Proto2GroupsMessage_RepeatedGroup[]; + + /** + * @generated from oneof spec.Proto2GroupsMessage.oneof_with_group + */ + oneofWithGroup: { + /** + * @generated from field: spec.Proto2GroupsMessage.OneofGroup oneofgroup = 3; + */ + value: Proto2GroupsMessage_OneofGroup; + case: "oneofgroup"; + } | { case: undefined; value?: undefined }; + + /** + * @generated from field: optional spec.Proto2GroupsMessage.Group message_field_using_group = 4; + */ + messageFieldUsingGroup?: Proto2GroupsMessage_Group; + + /** + * @generated from field: optional spec.Proto2GroupsMessage.Group.NestedGroup message_field_using_nested_group = 5; + */ + messageFieldUsingNestedGroup?: Proto2GroupsMessage_Group_NestedGroup; +}; + +// Describes the message spec.Proto2GroupsMessage. Use `create(Proto2GroupsMessageDesc)` to create a new Proto2GroupsMessage. +export declare const Proto2GroupsMessageDesc: TypedDescMessage; + +/** + * @generated from message spec.Proto2GroupsMessage.Group + */ +export declare type Proto2GroupsMessage_Group = Message<"spec.Proto2GroupsMessage.Group"> & { + /** + * @generated from field: optional int32 int32_field = 1; + */ + int32Field: number; + + /** + * @generated from field: optional spec.Proto2GroupsMessage.Group.NestedGroup nestedgroup = 2; + */ + nestedgroup?: Proto2GroupsMessage_Group_NestedGroup; +}; + +// Describes the message spec.Proto2GroupsMessage.Group. Use `create(Proto2GroupsMessage_GroupDesc)` to create a new Proto2GroupsMessage_Group. +export declare const Proto2GroupsMessage_GroupDesc: TypedDescMessage; + +/** + * @generated from message spec.Proto2GroupsMessage.Group.NestedGroup + */ +export declare type Proto2GroupsMessage_Group_NestedGroup = Message<"spec.Proto2GroupsMessage.Group.NestedGroup"> & { + /** + * @generated from field: optional string string_field = 1; + */ + stringField: string; +}; + +// Describes the message spec.Proto2GroupsMessage.Group.NestedGroup. Use `create(Proto2GroupsMessage_Group_NestedGroupDesc)` to create a new Proto2GroupsMessage_Group_NestedGroup. +export declare const Proto2GroupsMessage_Group_NestedGroupDesc: TypedDescMessage; + +/** + * @generated from message spec.Proto2GroupsMessage.RepeatedGroup + * @deprecated + */ +export declare type Proto2GroupsMessage_RepeatedGroup = Message<"spec.Proto2GroupsMessage.RepeatedGroup"> & { + /** + * @generated from field: optional int32 int32_field = 1; + */ + int32Field: number; +}; + +// Describes the message spec.Proto2GroupsMessage.RepeatedGroup. Use `create(Proto2GroupsMessage_RepeatedGroupDesc)` to create a new Proto2GroupsMessage_RepeatedGroup. +export declare const Proto2GroupsMessage_RepeatedGroupDesc: TypedDescMessage; + +/** + * @generated from message spec.Proto2GroupsMessage.OneofGroup + * @deprecated + */ +export declare type Proto2GroupsMessage_OneofGroup = Message<"spec.Proto2GroupsMessage.OneofGroup"> & { + /** + * @generated from field: optional bool bool_field = 1; + */ + boolField: boolean; +}; + +// Describes the message spec.Proto2GroupsMessage.OneofGroup. Use `create(Proto2GroupsMessage_OneofGroupDesc)` to create a new Proto2GroupsMessage_OneofGroup. +export declare const Proto2GroupsMessage_OneofGroupDesc: TypedDescMessage; + +/** + * @generated from enum spec.Proto2Enum + */ +export enum Proto2Enum { + /** + * @generated from enum value: PROTO2_ENUM_YES = 1; + */ + YES = 1, + + /** + * @generated from enum value: PROTO2_ENUM_NO = 2; + */ + NO = 2, +} + +// Describes the enum spec.Proto2Enum. +export declare const Proto2EnumDesc: TypedDescEnum; + +/** + * First enum value must be 0 when used as map value type + * + * @generated from enum spec.Proto2EnumWithZero + */ +export enum Proto2EnumWithZero { + /** + * @generated from enum value: PROTO2_ENUM_WITH_ZERO_ZERO = 0; + */ + ZERO = 0, + + /** + * @generated from enum value: PROTO2_ENUM_WITH_ZERO_ONE = 1; + */ + ONE = 1, +} + +// Describes the enum spec.Proto2EnumWithZero. +export declare const Proto2EnumWithZeroDesc: TypedDescEnum; + diff --git a/packages/protobuf-test/src/gen/js/extra/proto2_pbv2.js b/packages/protobuf-test/src/gen/js/extra/proto2_pbv2.js new file mode 100644 index 000000000..ae0b843d8 --- /dev/null +++ b/packages/protobuf-test/src/gen/js/extra/proto2_pbv2.js @@ -0,0 +1,113 @@ +// Copyright 2021-2024 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// @generated by protoc-gen-es-next v1.7.2 with parameter "ts_nocheck=false,target=js+dts" +// @generated from file extra/proto2.proto (package spec, syntax proto2) +/* eslint-disable */ + +import { enumDesc, fileDesc, messageDesc, tsEnum } from "@bufbuild/protobuf/next/codegenv1"; +import { fileDesc_google_protobuf_wrappers } from "@bufbuild/protobuf/next"; + +export const fileDesc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VwGAEgASgKMh8uc3BlYy5Qcm90bzJHcm91cHNNZXNzYWdlLkdyb3VwEj4KDXJlcGVhdGVkZ3JvdXAYAiADKAoyJy5zcGVjLlByb3RvMkdyb3Vwc01lc3NhZ2UuUmVwZWF0ZWRHcm91cBI6CgpvbmVvZmdyb3VwGAMgASgKMiQuc3BlYy5Qcm90bzJHcm91cHNNZXNzYWdlLk9uZW9mR3JvdXBIABJCChltZXNzYWdlX2ZpZWxkX3VzaW5nX2dyb3VwGAQgASgLMh8uc3BlYy5Qcm90bzJHcm91cHNNZXNzYWdlLkdyb3VwElUKIG1lc3NhZ2VfZmllbGRfdXNpbmdfbmVzdGVkX2dyb3VwGAUgASgLMisuc3BlYy5Qcm90bzJHcm91cHNNZXNzYWdlLkdyb3VwLk5lc3RlZEdyb3VwGoMBCgVHcm91cBITCgtpbnQzMl9maWVsZBgBIAEoBRJACgtuZXN0ZWRncm91cBgCIAEoCjIrLnNwZWMuUHJvdG8yR3JvdXBzTWVzc2FnZS5Hcm91cC5OZXN0ZWRHcm91cBojCgtOZXN0ZWRHcm91cBIUCgxzdHJpbmdfZmllbGQYASABKAkaKAoNUmVwZWF0ZWRHcm91cBITCgtpbnQzMl9maWVsZBgBIAEoBToCGAEaJAoKT25lb2ZHcm91cBISCgpib29sX2ZpZWxkGAEgASgIOgIYAToCGAFCEgoQb25lb2Zfd2l0aF9ncm91cCo1CgpQcm90bzJFbnVtEhMKD1BST1RPMl9FTlVNX1lFUxABEhIKDlBST1RPMl9FTlVNX05PEAIqUwoSUHJvdG8yRW51bVdpdGhaZXJvEh4KGlBST1RPMl9FTlVNX1dJVEhfWkVST19aRVJPEAASHQoZUFJPVE8yX0VOVU1fV0lUSF9aRVJPX09ORRABQiFaH2dpdGh1Yi5jb20vYnVmYnVpbGQvcHJvdG9idWYtZXM", [fileDesc_google_protobuf_wrappers]); + +// Describes the message spec.Proto2Message. Use `create(Proto2MessageDesc)` to create a new Proto2Message. +export const Proto2MessageDesc = messageDesc(fileDesc_extra_proto2, 0); + +// Describes the message spec.Proto2Message.RequiredGroup. Use `create(Proto2Message_RequiredGroupDesc)` to create a new Proto2Message_RequiredGroup. +export const Proto2Message_RequiredGroupDesc = messageDesc(fileDesc_extra_proto2, 0, 0); + +// Describes the message spec.Proto2Message.RequiredDefaultGroup. Use `create(Proto2Message_RequiredDefaultGroupDesc)` to create a new Proto2Message_RequiredDefaultGroup. +export const Proto2Message_RequiredDefaultGroupDesc = messageDesc(fileDesc_extra_proto2, 0, 1); + +// Describes the message spec.Proto2Message.OptionalGroup. Use `create(Proto2Message_OptionalGroupDesc)` to create a new Proto2Message_OptionalGroup. +export const Proto2Message_OptionalGroupDesc = messageDesc(fileDesc_extra_proto2, 0, 2); + +// Describes the message spec.Proto2Message.OptionalDefaultGroup. Use `create(Proto2Message_OptionalDefaultGroupDesc)` to create a new Proto2Message_OptionalDefaultGroup. +export const Proto2Message_OptionalDefaultGroupDesc = messageDesc(fileDesc_extra_proto2, 0, 3); + +// Describes the message spec.Proto2Message.RepeatedGroup. Use `create(Proto2Message_RepeatedGroupDesc)` to create a new Proto2Message_RepeatedGroup. +export const Proto2Message_RepeatedGroupDesc = messageDesc(fileDesc_extra_proto2, 0, 4); + +// Describes the message spec.Proto2Message.OneofGroup. Use `create(Proto2Message_OneofGroupDesc)` to create a new Proto2Message_OneofGroup. +export const Proto2Message_OneofGroupDesc = messageDesc(fileDesc_extra_proto2, 0, 5); + +// Describes the message spec.Proto2RepeatedMessage. Use `create(Proto2RepeatedMessageDesc)` to create a new Proto2RepeatedMessage. +export const Proto2RepeatedMessageDesc = messageDesc(fileDesc_extra_proto2, 1); + +// Describes the message spec.Proto2RepeatedMessage.RepeatedGroup. Use `create(Proto2RepeatedMessage_RepeatedGroupDesc)` to create a new Proto2RepeatedMessage_RepeatedGroup. +export const Proto2RepeatedMessage_RepeatedGroupDesc = messageDesc(fileDesc_extra_proto2, 1, 0); + +// Describes the message spec.Proto2OneofMessage. Use `create(Proto2OneofMessageDesc)` to create a new Proto2OneofMessage. +export const Proto2OneofMessageDesc = messageDesc(fileDesc_extra_proto2, 2); + +// Describes the message spec.Proto2OneofMessage.RepeatedGroup. Use `create(Proto2OneofMessage_RepeatedGroupDesc)` to create a new Proto2OneofMessage_RepeatedGroup. +export const Proto2OneofMessage_RepeatedGroupDesc = messageDesc(fileDesc_extra_proto2, 2, 0); + +// Describes the message spec.Proto2PackedMessage. Use `create(Proto2PackedMessageDesc)` to create a new Proto2PackedMessage. +export const Proto2PackedMessageDesc = messageDesc(fileDesc_extra_proto2, 3); + +// Describes the message spec.Proto2UnpackedMessage. Use `create(Proto2UnpackedMessageDesc)` to create a new Proto2UnpackedMessage. +export const Proto2UnpackedMessageDesc = messageDesc(fileDesc_extra_proto2, 4); + +// Describes the message spec.Proto2UnspecifiedPackedMessage. Use `create(Proto2UnspecifiedPackedMessageDesc)` to create a new Proto2UnspecifiedPackedMessage. +export const Proto2UnspecifiedPackedMessageDesc = messageDesc(fileDesc_extra_proto2, 5); + +// Describes the message spec.Proto2OptionalMessage. Use `create(Proto2OptionalMessageDesc)` to create a new Proto2OptionalMessage. +export const Proto2OptionalMessageDesc = messageDesc(fileDesc_extra_proto2, 6); + +// Describes the message spec.Proto2RequiredMessage. Use `create(Proto2RequiredMessageDesc)` to create a new Proto2RequiredMessage. +export const Proto2RequiredMessageDesc = messageDesc(fileDesc_extra_proto2, 7); + +// Describes the message spec.Proto2RequiredDefaultsMessage. Use `create(Proto2RequiredDefaultsMessageDesc)` to create a new Proto2RequiredDefaultsMessage. +export const Proto2RequiredDefaultsMessageDesc = messageDesc(fileDesc_extra_proto2, 8); + +// Describes the message spec.Proto2DefaultsMessage. Use `create(Proto2DefaultsMessageDesc)` to create a new Proto2DefaultsMessage. +export const Proto2DefaultsMessageDesc = messageDesc(fileDesc_extra_proto2, 9); + +// Describes the message spec.Proto2ChildMessage. Use `create(Proto2ChildMessageDesc)` to create a new Proto2ChildMessage. +export const Proto2ChildMessageDesc = messageDesc(fileDesc_extra_proto2, 10); + +// Describes the message spec.Proto2GroupsMessage. Use `create(Proto2GroupsMessageDesc)` to create a new Proto2GroupsMessage. +export const Proto2GroupsMessageDesc = messageDesc(fileDesc_extra_proto2, 11); + +// Describes the message spec.Proto2GroupsMessage.Group. Use `create(Proto2GroupsMessage_GroupDesc)` to create a new Proto2GroupsMessage_Group. +export const Proto2GroupsMessage_GroupDesc = messageDesc(fileDesc_extra_proto2, 11, 0); + +// Describes the message spec.Proto2GroupsMessage.Group.NestedGroup. Use `create(Proto2GroupsMessage_Group_NestedGroupDesc)` to create a new Proto2GroupsMessage_Group_NestedGroup. +export const Proto2GroupsMessage_Group_NestedGroupDesc = messageDesc(fileDesc_extra_proto2, 11, 0, 0); + +// Describes the message spec.Proto2GroupsMessage.RepeatedGroup. Use `create(Proto2GroupsMessage_RepeatedGroupDesc)` to create a new Proto2GroupsMessage_RepeatedGroup. +export const Proto2GroupsMessage_RepeatedGroupDesc = messageDesc(fileDesc_extra_proto2, 11, 1); + +// Describes the message spec.Proto2GroupsMessage.OneofGroup. Use `create(Proto2GroupsMessage_OneofGroupDesc)` to create a new Proto2GroupsMessage_OneofGroup. +export const Proto2GroupsMessage_OneofGroupDesc = messageDesc(fileDesc_extra_proto2, 11, 2); + +// Describes the enum spec.Proto2Enum. +export const Proto2EnumDesc = enumDesc(fileDesc_extra_proto2, 0); + +/** + * @generated from enum spec.Proto2Enum + */ +export const Proto2Enum = tsEnum(Proto2EnumDesc); + +// Describes the enum spec.Proto2EnumWithZero. +export const Proto2EnumWithZeroDesc = enumDesc(fileDesc_extra_proto2, 1); + +/** + * First enum value must be 0 when used as map value type + * + * @generated from enum spec.Proto2EnumWithZero + */ +export const Proto2EnumWithZero = tsEnum(Proto2EnumWithZeroDesc); + diff --git a/packages/protobuf-test/src/gen/js/extra/proto3_pb.d.ts b/packages/protobuf-test/src/gen/js/extra/proto3_pb.d.ts index 6277817ad..dee5ddb8a 100644 --- a/packages/protobuf-test/src/gen/js/extra/proto3_pb.d.ts +++ b/packages/protobuf-test/src/gen/js/extra/proto3_pb.d.ts @@ -16,7 +16,7 @@ // @generated from file extra/proto3.proto (package spec, syntax proto3) /* eslint-disable */ -import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; +import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage, UInt32Value } from "@bufbuild/protobuf"; import { Message, proto3 } from "@bufbuild/protobuf"; /** @@ -39,8 +39,389 @@ export declare enum Proto3Enum { NO = 2, } +/** + * @generated from message spec.Proto3Message + */ +export declare class Proto3Message extends Message { + /** + * @generated from field: string singular_string_field = 1; + */ + singularStringField: string; + + /** + * @generated from field: bytes singular_bytes_field = 2; + */ + singularBytesField: Uint8Array; + + /** + * @generated from field: int32 singular_int32_field = 3; + */ + singularInt32Field: number; + + /** + * @generated from field: int64 singular_int64_field = 4; + */ + singularInt64Field: bigint; + + /** + * @generated from field: int64 singular_int64_js_number_field = 103 [jstype = JS_NUMBER]; + */ + singularInt64JsNumberField: bigint; + + /** + * @generated from field: int64 singular_int64_js_string_field = 102 [jstype = JS_STRING]; + */ + singularInt64JsStringField: string; + + /** + * @generated from field: float singular_float_field = 5; + */ + singularFloatField: number; + + /** + * @generated from field: bool singular_bool_field = 6; + */ + singularBoolField: boolean; + + /** + * @generated from field: spec.Proto3Enum singular_enum_field = 7; + */ + singularEnumField: Proto3Enum; + + /** + * @generated from field: spec.Proto3Message singular_message_field = 8; + */ + singularMessageField?: Proto3Message; + + /** + * @generated from field: google.protobuf.UInt32Value singular_wrapped_uint32_field = 211; + */ + singularWrappedUint32Field?: number; + + /** + * @generated from field: optional string optional_string_field = 9; + */ + optionalStringField?: string; + + /** + * @generated from field: optional bytes optional_bytes_field = 10; + */ + optionalBytesField?: Uint8Array; + + /** + * @generated from field: optional int32 optional_int32_field = 11; + */ + optionalInt32Field?: number; + + /** + * @generated from field: optional int64 optional_int64_field = 12; + */ + optionalInt64Field?: bigint; + + /** + * @generated from field: optional int64 optional_int64_js_number_field = 106 [jstype = JS_NUMBER]; + */ + optionalInt64JsNumberField?: bigint; + + /** + * @generated from field: optional int64 optional_int64_js_string_field = 105 [jstype = JS_STRING]; + */ + optionalInt64JsStringField?: string; + + /** + * @generated from field: optional float optional_float_field = 13; + */ + optionalFloatField?: number; + + /** + * @generated from field: optional bool optional_bool_field = 14; + */ + optionalBoolField?: boolean; + + /** + * @generated from field: optional spec.Proto3Enum optional_enum_field = 15; + */ + optionalEnumField?: Proto3Enum; + + /** + * @generated from field: optional spec.Proto3Message optional_message_field = 16; + */ + optionalMessageField?: Proto3Message; + + /** + * @generated from field: optional google.protobuf.UInt32Value optional_wrapped_uint32_field = 212; + */ + optionalWrappedUint32Field?: number; + + /** + * @generated from field: repeated string repeated_string_field = 17; + */ + repeatedStringField: string[]; + + /** + * @generated from field: repeated bytes repeated_bytes_field = 18; + */ + repeatedBytesField: Uint8Array[]; + + /** + * @generated from field: repeated int32 repeated_int32_field = 19; + */ + repeatedInt32Field: number[]; + + /** + * @generated from field: repeated int64 repeated_int64_field = 20; + */ + repeatedInt64Field: bigint[]; + + /** + * @generated from field: repeated int64 repeated_int64_js_number_field = 109 [jstype = JS_NUMBER]; + */ + repeatedInt64JsNumberField: bigint[]; + + /** + * @generated from field: repeated int64 repeated_int64_js_string_field = 108 [jstype = JS_STRING]; + */ + repeatedInt64JsStringField: string[]; + + /** + * @generated from field: repeated float repeated_float_field = 21; + */ + repeatedFloatField: number[]; + + /** + * @generated from field: repeated bool repeated_bool_field = 22; + */ + repeatedBoolField: boolean[]; + + /** + * @generated from field: repeated spec.Proto3Enum repeated_enum_field = 23; + */ + repeatedEnumField: Proto3Enum[]; + + /** + * @generated from field: repeated spec.Proto3Message repeated_message_field = 24; + */ + repeatedMessageField: Proto3Message[]; + + /** + * @generated from field: repeated google.protobuf.UInt32Value repeated_wrapped_uint32_field = 213; + */ + repeatedWrappedUint32Field: UInt32Value[]; + + /** + * @generated from field: repeated double packed_double_field = 25 [packed = true]; + */ + packedDoubleField: number[]; + + /** + * @generated from field: repeated uint32 packed_uint32_field = 26 [packed = true]; + */ + packedUint32Field: number[]; + + /** + * @generated from field: repeated uint64 packed_uint64_field = 27 [packed = true]; + */ + packedUint64Field: bigint[]; + + /** + * @generated from field: repeated double unpacked_double_field = 28 [packed = false]; + */ + unpackedDoubleField: number[]; + + /** + * @generated from field: repeated uint32 unpacked_uint32_field = 29 [packed = false]; + */ + unpackedUint32Field: number[]; + + /** + * @generated from field: repeated uint64 unpacked_uint64_field = 30 [packed = false]; + */ + unpackedUint64Field: bigint[]; + + /** + * @generated from oneof spec.Proto3Message.either + */ + either: { + /** + * @generated from field: string oneof_string_field = 31; + */ + value: string; + case: "oneofStringField"; + } | { + /** + * @generated from field: bytes oneof_bytes_field = 32; + */ + value: Uint8Array; + case: "oneofBytesField"; + } | { + /** + * @generated from field: int32 oneof_int32_field = 33; + */ + value: number; + case: "oneofInt32Field"; + } | { + /** + * @generated from field: int64 oneof_int64_field = 34; + */ + value: bigint; + case: "oneofInt64Field"; + } | { + /** + * @generated from field: int64 oneof_int64_js_number_field = 112 [jstype = JS_NUMBER]; + */ + value: bigint; + case: "oneofInt64JsNumberField"; + } | { + /** + * @generated from field: int64 oneof_int64_js_string_field = 111 [jstype = JS_STRING]; + */ + value: string; + case: "oneofInt64JsStringField"; + } | { + /** + * @generated from field: float oneof_float_field = 35; + */ + value: number; + case: "oneofFloatField"; + } | { + /** + * @generated from field: bool oneof_bool_field = 36; + */ + value: boolean; + case: "oneofBoolField"; + } | { + /** + * @generated from field: spec.Proto3Enum oneof_enum_field = 37; + */ + value: Proto3Enum; + case: "oneofEnumField"; + } | { + /** + * @generated from field: spec.Proto3Message oneof_message_field = 38; + */ + value: Proto3Message; + case: "oneofMessageField"; + } | { + /** + * @generated from field: google.protobuf.UInt32Value oneof_wrapped_uint32_field = 204; + */ + value: UInt32Value; + case: "oneofWrappedUint32Field"; + } | { case: undefined; value?: undefined }; + + /** + * @generated from field: map map_string_string_field = 39; + */ + mapStringStringField: { [key: string]: string }; + + /** + * @generated from field: map map_int32_int32_field = 40; + */ + mapInt32Int32Field: { [key: number]: number }; + + /** + * @generated from field: map map_bool_bool_field = 41; + */ + mapBoolBoolField: { [key: string]: boolean }; + + /** + * @generated from field: map map_int64_int64_field = 42; + */ + mapInt64Int64Field: { [key: string]: bigint }; + + /** + * @generated from field: map map_int32_enum_field = 43; + */ + mapInt32EnumField: { [key: number]: Proto3Enum }; + + /** + * @generated from field: map map_int32_message_field = 44; + */ + mapInt32MessageField: { [key: number]: Proto3Message }; + + /** + * @generated from field: map map_int32_wrapped_uint32_field = 205; + */ + mapInt32WrappedUint32Field: { [key: number]: UInt32Value }; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "spec.Proto3Message"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): Proto3Message; + + static fromJson(jsonValue: JsonValue, options?: Partial): Proto3Message; + + static fromJsonString(jsonString: string, options?: Partial): Proto3Message; + + static equals(a: Proto3Message | PlainMessage | undefined, b: Proto3Message | PlainMessage | undefined): boolean; +} + +/** + * @generated from message spec.Proto3RepeatedMessage + * @deprecated + */ +export declare class Proto3RepeatedMessage extends Message { + /** + * @generated from field: repeated string string_field = 1; + */ + stringField: string[]; + + /** + * @generated from field: repeated bytes bytes_field = 2; + */ + bytesField: Uint8Array[]; + + /** + * @generated from field: repeated int32 int32_field = 3; + */ + int32Field: number[]; + + /** + * @generated from field: repeated int64 int64_field = 4; + */ + int64Field: bigint[]; + + /** + * @generated from field: repeated float float_field = 5; + */ + floatField: number[]; + + /** + * @generated from field: repeated bool bool_field = 6; + */ + boolField: boolean[]; + + /** + * @generated from field: repeated spec.Proto3Enum enum_field = 7; + */ + enumField: Proto3Enum[]; + + /** + * @generated from field: repeated spec.Proto3OptionalMessage message_field = 8; + */ + messageField: Proto3OptionalMessage[]; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "spec.Proto3RepeatedMessage"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): Proto3RepeatedMessage; + + static fromJson(jsonValue: JsonValue, options?: Partial): Proto3RepeatedMessage; + + static fromJsonString(jsonString: string, options?: Partial): Proto3RepeatedMessage; + + static equals(a: Proto3RepeatedMessage | PlainMessage | undefined, b: Proto3RepeatedMessage | PlainMessage | undefined): boolean; +} + /** * @generated from message spec.Proto3PackedMessage + * @deprecated */ export declare class Proto3PackedMessage extends Message { /** @@ -75,6 +456,7 @@ export declare class Proto3PackedMessage extends Message { /** * @generated from message spec.Proto3UnpackedMessage + * @deprecated */ export declare class Proto3UnpackedMessage extends Message { /** @@ -109,6 +491,7 @@ export declare class Proto3UnpackedMessage extends Message { /** @@ -143,6 +526,7 @@ export declare class Proto3UnspecifiedPackedMessage extends Message { /** @@ -202,6 +586,7 @@ export declare class Proto3UnlabelledMessage extends Message { /** diff --git a/packages/protobuf-test/src/gen/js/extra/proto3_pb.js b/packages/protobuf-test/src/gen/js/extra/proto3_pb.js index 13414613b..8ba95fc82 100644 --- a/packages/protobuf-test/src/gen/js/extra/proto3_pb.js +++ b/packages/protobuf-test/src/gen/js/extra/proto3_pb.js @@ -16,7 +16,7 @@ // @generated from file extra/proto3.proto (package spec, syntax proto3) /* eslint-disable */ -import { proto3 } from "@bufbuild/protobuf"; +import { proto3, UInt32Value } from "@bufbuild/protobuf"; /** * @generated from enum spec.Proto3Enum @@ -30,8 +30,93 @@ export const Proto3Enum = proto3.makeEnum( ], ); +/** + * @generated from message spec.Proto3Message + */ +export const Proto3Message = proto3.makeMessageType( + "spec.Proto3Message", + () => [ + { no: 1, name: "singular_string_field", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "singular_bytes_field", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, + { no: 3, name: "singular_int32_field", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, + { no: 4, name: "singular_int64_field", kind: "scalar", T: 3 /* ScalarType.INT64 */ }, + { no: 103, name: "singular_int64_js_number_field", kind: "scalar", T: 3 /* ScalarType.INT64 */ }, + { no: 102, name: "singular_int64_js_string_field", kind: "scalar", T: 3 /* ScalarType.INT64 */, L: 1 /* LongType.STRING */ }, + { no: 5, name: "singular_float_field", kind: "scalar", T: 2 /* ScalarType.FLOAT */ }, + { no: 6, name: "singular_bool_field", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + { no: 7, name: "singular_enum_field", kind: "enum", T: proto3.getEnumType(Proto3Enum) }, + { no: 8, name: "singular_message_field", kind: "message", T: Proto3Message }, + { no: 211, name: "singular_wrapped_uint32_field", kind: "message", T: UInt32Value }, + { no: 9, name: "optional_string_field", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 10, name: "optional_bytes_field", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, + { no: 11, name: "optional_int32_field", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 12, name: "optional_int64_field", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, + { no: 106, name: "optional_int64_js_number_field", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, + { no: 105, name: "optional_int64_js_string_field", kind: "scalar", T: 3 /* ScalarType.INT64 */, L: 1 /* LongType.STRING */, opt: true }, + { no: 13, name: "optional_float_field", kind: "scalar", T: 2 /* ScalarType.FLOAT */, opt: true }, + { no: 14, name: "optional_bool_field", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true }, + { no: 15, name: "optional_enum_field", kind: "enum", T: proto3.getEnumType(Proto3Enum), opt: true }, + { no: 16, name: "optional_message_field", kind: "message", T: Proto3Message, opt: true }, + { no: 212, name: "optional_wrapped_uint32_field", kind: "message", T: UInt32Value, opt: true }, + { no: 17, name: "repeated_string_field", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, + { no: 18, name: "repeated_bytes_field", kind: "scalar", T: 12 /* ScalarType.BYTES */, repeated: true }, + { no: 19, name: "repeated_int32_field", kind: "scalar", T: 5 /* ScalarType.INT32 */, repeated: true }, + { no: 20, name: "repeated_int64_field", kind: "scalar", T: 3 /* ScalarType.INT64 */, repeated: true }, + { no: 109, name: "repeated_int64_js_number_field", kind: "scalar", T: 3 /* ScalarType.INT64 */, repeated: true }, + { no: 108, name: "repeated_int64_js_string_field", kind: "scalar", T: 3 /* ScalarType.INT64 */, L: 1 /* LongType.STRING */, repeated: true }, + { no: 21, name: "repeated_float_field", kind: "scalar", T: 2 /* ScalarType.FLOAT */, repeated: true }, + { no: 22, name: "repeated_bool_field", kind: "scalar", T: 8 /* ScalarType.BOOL */, repeated: true }, + { no: 23, name: "repeated_enum_field", kind: "enum", T: proto3.getEnumType(Proto3Enum), repeated: true }, + { no: 24, name: "repeated_message_field", kind: "message", T: Proto3Message, repeated: true }, + { no: 213, name: "repeated_wrapped_uint32_field", kind: "message", T: UInt32Value, repeated: true }, + { no: 25, name: "packed_double_field", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, repeated: true }, + { no: 26, name: "packed_uint32_field", kind: "scalar", T: 13 /* ScalarType.UINT32 */, repeated: true }, + { no: 27, name: "packed_uint64_field", kind: "scalar", T: 4 /* ScalarType.UINT64 */, repeated: true }, + { no: 28, name: "unpacked_double_field", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, repeated: true, packed: false }, + { no: 29, name: "unpacked_uint32_field", kind: "scalar", T: 13 /* ScalarType.UINT32 */, repeated: true, packed: false }, + { no: 30, name: "unpacked_uint64_field", kind: "scalar", T: 4 /* ScalarType.UINT64 */, repeated: true, packed: false }, + { no: 31, name: "oneof_string_field", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "either" }, + { no: 32, name: "oneof_bytes_field", kind: "scalar", T: 12 /* ScalarType.BYTES */, oneof: "either" }, + { no: 33, name: "oneof_int32_field", kind: "scalar", T: 5 /* ScalarType.INT32 */, oneof: "either" }, + { no: 34, name: "oneof_int64_field", kind: "scalar", T: 3 /* ScalarType.INT64 */, oneof: "either" }, + { no: 112, name: "oneof_int64_js_number_field", kind: "scalar", T: 3 /* ScalarType.INT64 */, oneof: "either" }, + { no: 111, name: "oneof_int64_js_string_field", kind: "scalar", T: 3 /* ScalarType.INT64 */, L: 1 /* LongType.STRING */, oneof: "either" }, + { no: 35, name: "oneof_float_field", kind: "scalar", T: 2 /* ScalarType.FLOAT */, oneof: "either" }, + { no: 36, name: "oneof_bool_field", kind: "scalar", T: 8 /* ScalarType.BOOL */, oneof: "either" }, + { no: 37, name: "oneof_enum_field", kind: "enum", T: proto3.getEnumType(Proto3Enum), oneof: "either" }, + { no: 38, name: "oneof_message_field", kind: "message", T: Proto3Message, oneof: "either" }, + { no: 204, name: "oneof_wrapped_uint32_field", kind: "message", T: UInt32Value, oneof: "either" }, + { no: 39, name: "map_string_string_field", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "scalar", T: 9 /* ScalarType.STRING */} }, + { no: 40, name: "map_int32_int32_field", kind: "map", K: 5 /* ScalarType.INT32 */, V: {kind: "scalar", T: 5 /* ScalarType.INT32 */} }, + { no: 41, name: "map_bool_bool_field", kind: "map", K: 8 /* ScalarType.BOOL */, V: {kind: "scalar", T: 8 /* ScalarType.BOOL */} }, + { no: 42, name: "map_int64_int64_field", kind: "map", K: 3 /* ScalarType.INT64 */, V: {kind: "scalar", T: 3 /* ScalarType.INT64 */} }, + { no: 43, name: "map_int32_enum_field", kind: "map", K: 5 /* ScalarType.INT32 */, V: {kind: "enum", T: proto3.getEnumType(Proto3Enum)} }, + { no: 44, name: "map_int32_message_field", kind: "map", K: 5 /* ScalarType.INT32 */, V: {kind: "message", T: Proto3Message} }, + { no: 205, name: "map_int32_wrapped_uint32_field", kind: "map", K: 5 /* ScalarType.INT32 */, V: {kind: "message", T: UInt32Value} }, + ], +); + +/** + * @generated from message spec.Proto3RepeatedMessage + * @deprecated + */ +export const Proto3RepeatedMessage = proto3.makeMessageType( + "spec.Proto3RepeatedMessage", + () => [ + { no: 1, name: "string_field", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, + { no: 2, name: "bytes_field", kind: "scalar", T: 12 /* ScalarType.BYTES */, repeated: true }, + { no: 3, name: "int32_field", kind: "scalar", T: 5 /* ScalarType.INT32 */, repeated: true }, + { no: 4, name: "int64_field", kind: "scalar", T: 3 /* ScalarType.INT64 */, repeated: true }, + { no: 5, name: "float_field", kind: "scalar", T: 2 /* ScalarType.FLOAT */, repeated: true }, + { no: 6, name: "bool_field", kind: "scalar", T: 8 /* ScalarType.BOOL */, repeated: true }, + { no: 7, name: "enum_field", kind: "enum", T: proto3.getEnumType(Proto3Enum), repeated: true }, + { no: 8, name: "message_field", kind: "message", T: Proto3OptionalMessage, repeated: true }, + ], +); + /** * @generated from message spec.Proto3PackedMessage + * @deprecated */ export const Proto3PackedMessage = proto3.makeMessageType( "spec.Proto3PackedMessage", @@ -44,6 +129,7 @@ export const Proto3PackedMessage = proto3.makeMessageType( /** * @generated from message spec.Proto3UnpackedMessage + * @deprecated */ export const Proto3UnpackedMessage = proto3.makeMessageType( "spec.Proto3UnpackedMessage", @@ -56,6 +142,7 @@ export const Proto3UnpackedMessage = proto3.makeMessageType( /** * @generated from message spec.Proto3UnspecifiedPackedMessage + * @deprecated */ export const Proto3UnspecifiedPackedMessage = proto3.makeMessageType( "spec.Proto3UnspecifiedPackedMessage", @@ -68,6 +155,7 @@ export const Proto3UnspecifiedPackedMessage = proto3.makeMessageType( /** * @generated from message spec.Proto3UnlabelledMessage + * @deprecated */ export const Proto3UnlabelledMessage = proto3.makeMessageType( "spec.Proto3UnlabelledMessage", @@ -85,6 +173,7 @@ export const Proto3UnlabelledMessage = proto3.makeMessageType( /** * @generated from message spec.Proto3OptionalMessage + * @deprecated */ export const Proto3OptionalMessage = proto3.makeMessageType( "spec.Proto3OptionalMessage", diff --git a/packages/protobuf-test/src/gen/js/extra/proto3_pbv2.d.ts b/packages/protobuf-test/src/gen/js/extra/proto3_pbv2.d.ts new file mode 100644 index 000000000..23c56a691 --- /dev/null +++ b/packages/protobuf-test/src/gen/js/extra/proto3_pbv2.d.ts @@ -0,0 +1,575 @@ +// Copyright 2021-2024 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// @generated by protoc-gen-es-next v1.7.2 with parameter "ts_nocheck=false,target=js+dts" +// @generated from file extra/proto3.proto (package spec, syntax proto3) +/* eslint-disable */ + +import type { DescFile } from "@bufbuild/protobuf"; +import type { Message, UInt32Value } from "@bufbuild/protobuf/next"; +import type { TypedDescEnum, TypedDescMessage } from "@bufbuild/protobuf/next/codegenv1"; + +export declare const fileDesc_extra_proto3: DescFile; + +/** + * @generated from message spec.Proto3Message + */ +export declare type Proto3Message = Message<"spec.Proto3Message"> & { + /** + * @generated from field: string singular_string_field = 1; + */ + singularStringField: string; + + /** + * @generated from field: bytes singular_bytes_field = 2; + */ + singularBytesField: Uint8Array; + + /** + * @generated from field: int32 singular_int32_field = 3; + */ + singularInt32Field: number; + + /** + * @generated from field: int64 singular_int64_field = 4; + */ + singularInt64Field: bigint; + + /** + * @generated from field: int64 singular_int64_js_number_field = 103 [jstype = JS_NUMBER]; + */ + singularInt64JsNumberField: bigint; + + /** + * @generated from field: int64 singular_int64_js_string_field = 102 [jstype = JS_STRING]; + */ + singularInt64JsStringField: string; + + /** + * @generated from field: float singular_float_field = 5; + */ + singularFloatField: number; + + /** + * @generated from field: bool singular_bool_field = 6; + */ + singularBoolField: boolean; + + /** + * @generated from field: spec.Proto3Enum singular_enum_field = 7; + */ + singularEnumField: Proto3Enum; + + /** + * @generated from field: spec.Proto3Message singular_message_field = 8; + */ + singularMessageField?: Proto3Message; + + /** + * @generated from field: google.protobuf.UInt32Value singular_wrapped_uint32_field = 211; + */ + singularWrappedUint32Field?: number; + + /** + * @generated from field: optional string optional_string_field = 9; + */ + optionalStringField?: string; + + /** + * @generated from field: optional bytes optional_bytes_field = 10; + */ + optionalBytesField?: Uint8Array; + + /** + * @generated from field: optional int32 optional_int32_field = 11; + */ + optionalInt32Field?: number; + + /** + * @generated from field: optional int64 optional_int64_field = 12; + */ + optionalInt64Field?: bigint; + + /** + * @generated from field: optional int64 optional_int64_js_number_field = 106 [jstype = JS_NUMBER]; + */ + optionalInt64JsNumberField?: bigint; + + /** + * @generated from field: optional int64 optional_int64_js_string_field = 105 [jstype = JS_STRING]; + */ + optionalInt64JsStringField?: string; + + /** + * @generated from field: optional float optional_float_field = 13; + */ + optionalFloatField?: number; + + /** + * @generated from field: optional bool optional_bool_field = 14; + */ + optionalBoolField?: boolean; + + /** + * @generated from field: optional spec.Proto3Enum optional_enum_field = 15; + */ + optionalEnumField?: Proto3Enum; + + /** + * @generated from field: optional spec.Proto3Message optional_message_field = 16; + */ + optionalMessageField?: Proto3Message; + + /** + * @generated from field: optional google.protobuf.UInt32Value optional_wrapped_uint32_field = 212; + */ + optionalWrappedUint32Field?: number; + + /** + * @generated from field: repeated string repeated_string_field = 17; + */ + repeatedStringField: string[]; + + /** + * @generated from field: repeated bytes repeated_bytes_field = 18; + */ + repeatedBytesField: Uint8Array[]; + + /** + * @generated from field: repeated int32 repeated_int32_field = 19; + */ + repeatedInt32Field: number[]; + + /** + * @generated from field: repeated int64 repeated_int64_field = 20; + */ + repeatedInt64Field: bigint[]; + + /** + * @generated from field: repeated int64 repeated_int64_js_number_field = 109 [jstype = JS_NUMBER]; + */ + repeatedInt64JsNumberField: bigint[]; + + /** + * @generated from field: repeated int64 repeated_int64_js_string_field = 108 [jstype = JS_STRING]; + */ + repeatedInt64JsStringField: string[]; + + /** + * @generated from field: repeated float repeated_float_field = 21; + */ + repeatedFloatField: number[]; + + /** + * @generated from field: repeated bool repeated_bool_field = 22; + */ + repeatedBoolField: boolean[]; + + /** + * @generated from field: repeated spec.Proto3Enum repeated_enum_field = 23; + */ + repeatedEnumField: Proto3Enum[]; + + /** + * @generated from field: repeated spec.Proto3Message repeated_message_field = 24; + */ + repeatedMessageField: Proto3Message[]; + + /** + * @generated from field: repeated google.protobuf.UInt32Value repeated_wrapped_uint32_field = 213; + */ + repeatedWrappedUint32Field: UInt32Value[]; + + /** + * @generated from field: repeated double packed_double_field = 25 [packed = true]; + */ + packedDoubleField: number[]; + + /** + * @generated from field: repeated uint32 packed_uint32_field = 26 [packed = true]; + */ + packedUint32Field: number[]; + + /** + * @generated from field: repeated uint64 packed_uint64_field = 27 [packed = true]; + */ + packedUint64Field: bigint[]; + + /** + * @generated from field: repeated double unpacked_double_field = 28 [packed = false]; + */ + unpackedDoubleField: number[]; + + /** + * @generated from field: repeated uint32 unpacked_uint32_field = 29 [packed = false]; + */ + unpackedUint32Field: number[]; + + /** + * @generated from field: repeated uint64 unpacked_uint64_field = 30 [packed = false]; + */ + unpackedUint64Field: bigint[]; + + /** + * @generated from oneof spec.Proto3Message.either + */ + either: { + /** + * @generated from field: string oneof_string_field = 31; + */ + value: string; + case: "oneofStringField"; + } | { + /** + * @generated from field: bytes oneof_bytes_field = 32; + */ + value: Uint8Array; + case: "oneofBytesField"; + } | { + /** + * @generated from field: int32 oneof_int32_field = 33; + */ + value: number; + case: "oneofInt32Field"; + } | { + /** + * @generated from field: int64 oneof_int64_field = 34; + */ + value: bigint; + case: "oneofInt64Field"; + } | { + /** + * @generated from field: int64 oneof_int64_js_number_field = 112 [jstype = JS_NUMBER]; + */ + value: bigint; + case: "oneofInt64JsNumberField"; + } | { + /** + * @generated from field: int64 oneof_int64_js_string_field = 111 [jstype = JS_STRING]; + */ + value: string; + case: "oneofInt64JsStringField"; + } | { + /** + * @generated from field: float oneof_float_field = 35; + */ + value: number; + case: "oneofFloatField"; + } | { + /** + * @generated from field: bool oneof_bool_field = 36; + */ + value: boolean; + case: "oneofBoolField"; + } | { + /** + * @generated from field: spec.Proto3Enum oneof_enum_field = 37; + */ + value: Proto3Enum; + case: "oneofEnumField"; + } | { + /** + * @generated from field: spec.Proto3Message oneof_message_field = 38; + */ + value: Proto3Message; + case: "oneofMessageField"; + } | { + /** + * @generated from field: google.protobuf.UInt32Value oneof_wrapped_uint32_field = 204; + */ + value: UInt32Value; + case: "oneofWrappedUint32Field"; + } | { case: undefined; value?: undefined }; + + /** + * @generated from field: map map_string_string_field = 39; + */ + mapStringStringField: { [key: string]: string }; + + /** + * @generated from field: map map_int32_int32_field = 40; + */ + mapInt32Int32Field: { [key: number]: number }; + + /** + * @generated from field: map map_bool_bool_field = 41; + */ + mapBoolBoolField: { [key: string]: boolean }; + + /** + * @generated from field: map map_int64_int64_field = 42; + */ + mapInt64Int64Field: { [key: string]: bigint }; + + /** + * @generated from field: map map_int32_enum_field = 43; + */ + mapInt32EnumField: { [key: number]: Proto3Enum }; + + /** + * @generated from field: map map_int32_message_field = 44; + */ + mapInt32MessageField: { [key: number]: Proto3Message }; + + /** + * @generated from field: map map_int32_wrapped_uint32_field = 205; + */ + mapInt32WrappedUint32Field: { [key: number]: UInt32Value }; +}; + +// Describes the message spec.Proto3Message. Use `create(Proto3MessageDesc)` to create a new Proto3Message. +export declare const Proto3MessageDesc: TypedDescMessage; + +/** + * @generated from message spec.Proto3RepeatedMessage + * @deprecated + */ +export declare type Proto3RepeatedMessage = Message<"spec.Proto3RepeatedMessage"> & { + /** + * @generated from field: repeated string string_field = 1; + */ + stringField: string[]; + + /** + * @generated from field: repeated bytes bytes_field = 2; + */ + bytesField: Uint8Array[]; + + /** + * @generated from field: repeated int32 int32_field = 3; + */ + int32Field: number[]; + + /** + * @generated from field: repeated int64 int64_field = 4; + */ + int64Field: bigint[]; + + /** + * @generated from field: repeated float float_field = 5; + */ + floatField: number[]; + + /** + * @generated from field: repeated bool bool_field = 6; + */ + boolField: boolean[]; + + /** + * @generated from field: repeated spec.Proto3Enum enum_field = 7; + */ + enumField: Proto3Enum[]; + + /** + * @generated from field: repeated spec.Proto3OptionalMessage message_field = 8; + */ + messageField: Proto3OptionalMessage[]; +}; + +// Describes the message spec.Proto3RepeatedMessage. Use `create(Proto3RepeatedMessageDesc)` to create a new Proto3RepeatedMessage. +export declare const Proto3RepeatedMessageDesc: TypedDescMessage; + +/** + * @generated from message spec.Proto3PackedMessage + * @deprecated + */ +export declare type Proto3PackedMessage = Message<"spec.Proto3PackedMessage"> & { + /** + * @generated from field: repeated double packed_double_field = 101 [packed = true]; + */ + packedDoubleField: number[]; + + /** + * @generated from field: repeated uint32 packed_uint32_field = 102 [packed = true]; + */ + packedUint32Field: number[]; + + /** + * @generated from field: repeated uint64 packed_uint64_field = 103 [packed = true]; + */ + packedUint64Field: bigint[]; +}; + +// Describes the message spec.Proto3PackedMessage. Use `create(Proto3PackedMessageDesc)` to create a new Proto3PackedMessage. +export declare const Proto3PackedMessageDesc: TypedDescMessage; + +/** + * @generated from message spec.Proto3UnpackedMessage + * @deprecated + */ +export declare type Proto3UnpackedMessage = Message<"spec.Proto3UnpackedMessage"> & { + /** + * @generated from field: repeated double unpacked_double_field = 201 [packed = false]; + */ + unpackedDoubleField: number[]; + + /** + * @generated from field: repeated uint32 unpacked_uint32_field = 202 [packed = false]; + */ + unpackedUint32Field: number[]; + + /** + * @generated from field: repeated uint64 unpacked_uint64_field = 203 [packed = false]; + */ + unpackedUint64Field: bigint[]; +}; + +// Describes the message spec.Proto3UnpackedMessage. Use `create(Proto3UnpackedMessageDesc)` to create a new Proto3UnpackedMessage. +export declare const Proto3UnpackedMessageDesc: TypedDescMessage; + +/** + * @generated from message spec.Proto3UnspecifiedPackedMessage + * @deprecated + */ +export declare type Proto3UnspecifiedPackedMessage = Message<"spec.Proto3UnspecifiedPackedMessage"> & { + /** + * @generated from field: repeated double double_field = 1; + */ + doubleField: number[]; + + /** + * @generated from field: repeated uint32 uint32_field = 2; + */ + uint32Field: number[]; + + /** + * @generated from field: repeated uint64 uint64_field = 3; + */ + uint64Field: bigint[]; +}; + +// Describes the message spec.Proto3UnspecifiedPackedMessage. Use `create(Proto3UnspecifiedPackedMessageDesc)` to create a new Proto3UnspecifiedPackedMessage. +export declare const Proto3UnspecifiedPackedMessageDesc: TypedDescMessage; + +/** + * @generated from message spec.Proto3UnlabelledMessage + * @deprecated + */ +export declare type Proto3UnlabelledMessage = Message<"spec.Proto3UnlabelledMessage"> & { + /** + * @generated from field: string string_field = 1; + */ + stringField: string; + + /** + * @generated from field: bytes bytes_field = 2; + */ + bytesField: Uint8Array; + + /** + * @generated from field: int32 int32_field = 3; + */ + int32Field: number; + + /** + * @generated from field: int64 int64_field = 4; + */ + int64Field: bigint; + + /** + * @generated from field: float float_field = 5; + */ + floatField: number; + + /** + * @generated from field: bool bool_field = 6; + */ + boolField: boolean; + + /** + * @generated from field: spec.Proto3Enum enum_field = 7; + */ + enumField: Proto3Enum; + + /** + * @generated from field: spec.Proto3OptionalMessage message_field = 8; + */ + messageField?: Proto3OptionalMessage; +}; + +// Describes the message spec.Proto3UnlabelledMessage. Use `create(Proto3UnlabelledMessageDesc)` to create a new Proto3UnlabelledMessage. +export declare const Proto3UnlabelledMessageDesc: TypedDescMessage; + +/** + * @generated from message spec.Proto3OptionalMessage + * @deprecated + */ +export declare type Proto3OptionalMessage = Message<"spec.Proto3OptionalMessage"> & { + /** + * @generated from field: optional string string_field = 1; + */ + stringField?: string; + + /** + * @generated from field: optional bytes bytes_field = 2; + */ + bytesField?: Uint8Array; + + /** + * @generated from field: optional int32 int32_field = 3; + */ + int32Field?: number; + + /** + * @generated from field: optional int64 int64_field = 4; + */ + int64Field?: bigint; + + /** + * @generated from field: optional float float_field = 5; + */ + floatField?: number; + + /** + * @generated from field: optional bool bool_field = 6; + */ + boolField?: boolean; + + /** + * @generated from field: optional spec.Proto3Enum enum_field = 7; + */ + enumField?: Proto3Enum; + + /** + * @generated from field: optional spec.Proto3OptionalMessage message_field = 8; + */ + messageField?: Proto3OptionalMessage; +}; + +// Describes the message spec.Proto3OptionalMessage. Use `create(Proto3OptionalMessageDesc)` to create a new Proto3OptionalMessage. +export declare const Proto3OptionalMessageDesc: TypedDescMessage; + +/** + * @generated from enum spec.Proto3Enum + */ +export enum Proto3Enum { + /** + * @generated from enum value: PROTO3_ENUM_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * @generated from enum value: PROTO3_ENUM_YES = 1; + */ + YES = 1, + + /** + * @generated from enum value: PROTO3_ENUM_NO = 2; + */ + NO = 2, +} + +// Describes the enum spec.Proto3Enum. +export declare const Proto3EnumDesc: TypedDescEnum; + diff --git a/packages/protobuf-test/src/gen/js/extra/proto3_pbv2.js b/packages/protobuf-test/src/gen/js/extra/proto3_pbv2.js new file mode 100644 index 000000000..cd3d8857d --- /dev/null +++ b/packages/protobuf-test/src/gen/js/extra/proto3_pbv2.js @@ -0,0 +1,52 @@ +// Copyright 2021-2024 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// @generated by protoc-gen-es-next v1.7.2 with parameter "ts_nocheck=false,target=js+dts" +// @generated from file extra/proto3.proto (package spec, syntax proto3) +/* eslint-disable */ + +import { enumDesc, fileDesc, messageDesc, tsEnum } from "@bufbuild/protobuf/next/codegenv1"; +import { fileDesc_google_protobuf_wrappers } from "@bufbuild/protobuf/next"; + +export const fileDesc_extra_proto3 = fileDesc("ChJleHRyYS9wcm90bzMucHJvdG8SBHNwZWMirRoKDVByb3RvM01lc3NhZ2USHQoVc2luZ3VsYXJfc3RyaW5nX2ZpZWxkGAEgASgJEhwKFHNpbmd1bGFyX2J5dGVzX2ZpZWxkGAIgASgMEhwKFHNpbm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udW0SMgoNbWVzc2FnZV9maWVsZBgIIAEoCzIbLnNwZWMuUHJvdG8zT3B0aW9uYWxNZXNzYWdlOgIYASKcAwoVUHJvdG8zT3B0aW9uYWxNZXNzYWdlEhkKDHN0cmluZ19maWVsZBgBIAEoCUgAiAEBEhgKC2J5dGVzX2ZpZWxkGAIgASgMSAGIAQESGAoLaW50MzJfZmllbGQYAyABKAVIAogBARIYCgtpbnQ2NF9maWVsZBgEIAEoA0gDiAEBEhgKC2Zsb2F0X2ZpZWxkGAUgASgCSASIAQESFwoKYm9vbF9maWVsZBgGIAEoCEgFiAEBEikKCmVudW1fZmllbGQYByABKA4yEC5zcGVjLlByb3RvM0VudW1IBogBARI3Cg1tZXNzYWdlX2ZpZWxkGAggASgLMhsuc3BlYy5Qcm90bzNPcHRpb25hbE1lc3NhZ2VIB4gBAToCGAFCDwoNX3N0cmluZ19maWVsZEIOCgxfYnl0ZXNfZmllbGRCDgoMX2ludDMyX2ZpZWxkQg4KDF9pbnQ2NF9maWVsZEIOCgxfZmxvYXRfZmllbGRCDQoLX2Jvb2xfZmllbGRCDQoLX2VudW1fZmllbGRCEAoOX21lc3NhZ2VfZmllbGQqUgoKUHJvdG8zRW51bRIbChdQUk9UTzNfRU5VTV9VTlNQRUNJRklFRBAAEhMKD1BST1RPM19FTlVNX1lFUxABEhIKDlBST1RPM19FTlVNX05PEAJCIVofZ2l0aHViLmNvbS9idWZidWlsZC9wcm90b2J1Zi1lc2IGcHJvdG8z", [fileDesc_google_protobuf_wrappers]); + +// Describes the message spec.Proto3Message. Use `create(Proto3MessageDesc)` to create a new Proto3Message. +export const Proto3MessageDesc = messageDesc(fileDesc_extra_proto3, 0); + +// Describes the message spec.Proto3RepeatedMessage. Use `create(Proto3RepeatedMessageDesc)` to create a new Proto3RepeatedMessage. +export const Proto3RepeatedMessageDesc = messageDesc(fileDesc_extra_proto3, 1); + +// Describes the message spec.Proto3PackedMessage. Use `create(Proto3PackedMessageDesc)` to create a new Proto3PackedMessage. +export const Proto3PackedMessageDesc = messageDesc(fileDesc_extra_proto3, 2); + +// Describes the message spec.Proto3UnpackedMessage. Use `create(Proto3UnpackedMessageDesc)` to create a new Proto3UnpackedMessage. +export const Proto3UnpackedMessageDesc = messageDesc(fileDesc_extra_proto3, 3); + +// Describes the message spec.Proto3UnspecifiedPackedMessage. Use `create(Proto3UnspecifiedPackedMessageDesc)` to create a new Proto3UnspecifiedPackedMessage. +export const Proto3UnspecifiedPackedMessageDesc = messageDesc(fileDesc_extra_proto3, 4); + +// Describes the message spec.Proto3UnlabelledMessage. Use `create(Proto3UnlabelledMessageDesc)` to create a new Proto3UnlabelledMessage. +export const Proto3UnlabelledMessageDesc = messageDesc(fileDesc_extra_proto3, 5); + +// Describes the message spec.Proto3OptionalMessage. Use `create(Proto3OptionalMessageDesc)` to create a new Proto3OptionalMessage. +export const Proto3OptionalMessageDesc = messageDesc(fileDesc_extra_proto3, 6); + +// Describes the enum spec.Proto3Enum. +export const Proto3EnumDesc = enumDesc(fileDesc_extra_proto3, 0); + +/** + * @generated from enum spec.Proto3Enum + */ +export const Proto3Enum = tsEnum(Proto3EnumDesc); + diff --git a/packages/protobuf-test/src/gen/js/extra/service-all_pbv2.d.ts b/packages/protobuf-test/src/gen/js/extra/service-all_pbv2.d.ts new file mode 100644 index 000000000..51d07459d --- /dev/null +++ b/packages/protobuf-test/src/gen/js/extra/service-all_pbv2.d.ts @@ -0,0 +1,64 @@ +// Copyright 2021-2024 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// @generated by protoc-gen-es-next v1.7.2 with parameter "ts_nocheck=false,target=js+dts" +// @generated from file extra/service-all.proto (package spec, syntax proto3) +/* eslint-disable */ + +import type { DescFile, MethodKind } from "@bufbuild/protobuf"; +import type { TypedDescService } from "@bufbuild/protobuf/next/codegenv1"; +import type { Int32Value, StringValue } from "@bufbuild/protobuf/next"; + +export declare const fileDesc_extra_service_all: DescFile; + +/** + * @generated from service spec.ServiceAll + */ +export declare const ServiceAll: TypedDescService<{ + /** + * @generated from rpc spec.ServiceAll.Unary + */ + unary: { + kind: MethodKind.Unary; + I: StringValue; + O: Int32Value; + }, + /** + * @generated from rpc spec.ServiceAll.ServerStream + */ + serverStream: { + kind: MethodKind.ServerStreaming; + I: StringValue; + O: Int32Value; + }, + /** + * @generated from rpc spec.ServiceAll.ClientStream + */ + clientStream: { + kind: MethodKind.ClientStreaming; + I: StringValue; + O: Int32Value; + }, + /** + * @generated from rpc spec.ServiceAll.Bidi + * @deprecated + */ + bidi: { + kind: MethodKind.BiDiStreaming; + I: StringValue; + O: Int32Value; + }, +} +>; + diff --git a/packages/protobuf-test/src/gen/js/extra/service-all_pbv2.js b/packages/protobuf-test/src/gen/js/extra/service-all_pbv2.js new file mode 100644 index 000000000..c2579bc24 --- /dev/null +++ b/packages/protobuf-test/src/gen/js/extra/service-all_pbv2.js @@ -0,0 +1,28 @@ +// Copyright 2021-2024 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// @generated by protoc-gen-es-next v1.7.2 with parameter "ts_nocheck=false,target=js+dts" +// @generated from file extra/service-all.proto (package spec, syntax proto3) +/* eslint-disable */ + +import { fileDesc, serviceDesc } from "@bufbuild/protobuf/next/codegenv1"; +import { fileDesc_google_protobuf_wrappers } from "@bufbuild/protobuf/next"; + +export const fileDesc_extra_service_all = fileDesc("ChdleHRyYS9zZXJ2aWNlLWFsbC5wcm90bxIEc3BlYzLAAgoKU2VydmljZUFsbBJHCgVVbmFyeRIcLmdvb2dsZS5wcm90b2J1Zi5TdHJpbmdWYWx1ZRobLmdvb2dsZS5wcm90b2J1Zi5JbnQzMlZhbHVlIgOQAgISUAoMU2VydmVyU3RyZWFtEhwuZ29vZ2xlLnByb3RvYnVmLlN0cmluZ1ZhbHVlGhsuZ29vZ2xlLnByb3RvYnVmLkludDMyVmFsdWUiA5ACATABEksKDENsaWVudFN0cmVhbRIcLmdvb2dsZS5wcm90b2J1Zi5TdHJpbmdWYWx1ZRobLmdvb2dsZS5wcm90b2J1Zi5JbnQzMlZhbHVlKAESSgoEQmlkaRIcLmdvb2dsZS5wcm90b2J1Zi5TdHJpbmdWYWx1ZRobLmdvb2dsZS5wcm90b2J1Zi5JbnQzMlZhbHVlIgOIAgEoATABYgZwcm90bzM", [fileDesc_google_protobuf_wrappers]); + +/** + * @generated from service spec.ServiceAll + */ +export const ServiceAll = serviceDesc(fileDesc_extra_service_all, 0); + diff --git a/packages/protobuf-test/src/gen/js/extra/service-example_pbv2.d.ts b/packages/protobuf-test/src/gen/js/extra/service-example_pbv2.d.ts new file mode 100644 index 000000000..0610d3876 --- /dev/null +++ b/packages/protobuf-test/src/gen/js/extra/service-example_pbv2.d.ts @@ -0,0 +1,164 @@ +// Copyright 2021-2024 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// @generated by protoc-gen-es-next v1.7.2 with parameter "ts_nocheck=false,target=js+dts" +// @generated from file extra/service-example.proto (package spec, syntax proto3) +/* eslint-disable */ + +import type { DescFile, MethodKind } from "@bufbuild/protobuf"; +import type { Message } from "@bufbuild/protobuf/next"; +import type { TypedDescEnum, TypedDescMessage, TypedDescService } from "@bufbuild/protobuf/next/codegenv1"; + +export declare const fileDesc_extra_service_example: DescFile; + +/** + * @generated from message spec.ExampleRequest + */ +export declare type ExampleRequest = Message<"spec.ExampleRequest"> & { + /** + * any text + * + * @generated from field: string question = 1; + */ + question: string; + + /** + * the server should simulate an error in the requested way + * + * @generated from field: spec.FailRequest please_fail = 2; + */ + pleaseFail: FailRequest; + + /** + * the server should delay it's response for this amount of milliseconds + * + * @generated from field: int32 please_delay_response_ms = 3; + */ + pleaseDelayResponseMs: number; + + /** + * by default, the server always writes some custom response headers + * + * @generated from field: bool disable_sending_example_response_headers = 4; + */ + disableSendingExampleResponseHeaders: boolean; +}; + +// Describes the message spec.ExampleRequest. Use `create(ExampleRequestDesc)` to create a new ExampleRequest. +export declare const ExampleRequestDesc: TypedDescMessage; + +/** + * @generated from message spec.ExampleResponse + */ +export declare type ExampleResponse = Message<"spec.ExampleResponse"> & { + /** + * any text + * + * @generated from field: string answer = 1; + */ + answer: string; + + /** + * contains the request headers that the server received + * + * @generated from field: map your_request_headers = 2; + */ + yourRequestHeaders: { [key: string]: string }; + + /** + * contains the deadline that the server received + * + * @generated from field: string your_deadline = 3; + */ + yourDeadline: string; + + /** + * the failure requested + * + * @generated from field: spec.FailRequest your_fail_request = 4; + */ + yourFailRequest: FailRequest; +}; + +// Describes the message spec.ExampleResponse. Use `create(ExampleResponseDesc)` to create a new ExampleResponse. +export declare const ExampleResponseDesc: TypedDescMessage; + +/** + * @generated from enum spec.FailRequest + */ +export enum FailRequest { + /** + * don't fail + * + * @generated from enum value: FAIL_REQUEST_NONE = 0; + */ + FAIL_REQUEST_NONE = 0, + + /** + * send an error status trailer after sending a message + * + * @generated from enum value: MESSAGE_THEN_ERROR_STATUS = 1; + */ + MESSAGE_THEN_ERROR_STATUS = 1, + + /** + * send an error status, don't send any message + * + * @generated from enum value: ERROR_STATUS_ONLY = 2; + */ + ERROR_STATUS_ONLY = 2, +} + +// Describes the enum spec.FailRequest. +export declare const FailRequestDesc: TypedDescEnum; + +/** + * @generated from service spec.ExampleService + */ +export declare const ExampleService: TypedDescService<{ + /** + * @generated from rpc spec.ExampleService.Unary + */ + unary: { + kind: MethodKind.Unary; + I: ExampleRequest; + O: ExampleResponse; + }, + /** + * @generated from rpc spec.ExampleService.ServerStream + */ + serverStream: { + kind: MethodKind.ServerStreaming; + I: ExampleRequest; + O: ExampleResponse; + }, + /** + * @generated from rpc spec.ExampleService.ClientStream + */ + clientStream: { + kind: MethodKind.ClientStreaming; + I: ExampleRequest; + O: ExampleResponse; + }, + /** + * @generated from rpc spec.ExampleService.Bidi + */ + bidi: { + kind: MethodKind.BiDiStreaming; + I: ExampleRequest; + O: ExampleResponse; + }, +} +>; + diff --git a/packages/protobuf-test/src/gen/js/extra/service-example_pbv2.js b/packages/protobuf-test/src/gen/js/extra/service-example_pbv2.js new file mode 100644 index 000000000..5b77c9bf6 --- /dev/null +++ b/packages/protobuf-test/src/gen/js/extra/service-example_pbv2.js @@ -0,0 +1,41 @@ +// Copyright 2021-2024 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// @generated by protoc-gen-es-next v1.7.2 with parameter "ts_nocheck=false,target=js+dts" +// @generated from file extra/service-example.proto (package spec, syntax proto3) +/* eslint-disable */ + +import { enumDesc, fileDesc, messageDesc, serviceDesc, tsEnum } from "@bufbuild/protobuf/next/codegenv1"; + +export const fileDesc_extra_service_example = fileDesc("ChtleHRyYS9zZXJ2aWNlLWV4YW1wbGUuc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leRequestDesc)` to create a new ExampleRequest. +export const ExampleRequestDesc = messageDesc(fileDesc_extra_service_example, 0); + +// Describes the message spec.ExampleResponse. Use `create(ExampleResponseDesc)` to create a new ExampleResponse. +export const ExampleResponseDesc = messageDesc(fileDesc_extra_service_example, 1); + +// Describes the enum spec.FailRequest. +export const FailRequestDesc = enumDesc(fileDesc_extra_service_example, 0); + +/** + * @generated from enum spec.FailRequest + */ +export const FailRequest = tsEnum(FailRequestDesc); + +/** + * @generated from service spec.ExampleService + */ +export const ExampleService = serviceDesc(fileDesc_extra_service_example, 0); + diff --git a/packages/protobuf-test/src/gen/js/extra/wkt-wrappers_pb.d.ts b/packages/protobuf-test/src/gen/js/extra/wkt-wrappers_pb.d.ts index aa5803411..287768527 100644 --- a/packages/protobuf-test/src/gen/js/extra/wkt-wrappers_pb.d.ts +++ b/packages/protobuf-test/src/gen/js/extra/wkt-wrappers_pb.d.ts @@ -21,6 +21,7 @@ import { Message, proto3 } from "@bufbuild/protobuf"; /** * @generated from message spec.WrappersMessage + * @deprecated */ export declare class WrappersMessage extends Message { /** diff --git a/packages/protobuf-test/src/gen/js/extra/wkt-wrappers_pb.js b/packages/protobuf-test/src/gen/js/extra/wkt-wrappers_pb.js index c9c871c29..7dd0ab26e 100644 --- a/packages/protobuf-test/src/gen/js/extra/wkt-wrappers_pb.js +++ b/packages/protobuf-test/src/gen/js/extra/wkt-wrappers_pb.js @@ -20,6 +20,7 @@ import { BoolValue, BytesValue, DoubleValue, FloatValue, Int32Value, Int64Value, /** * @generated from message spec.WrappersMessage + * @deprecated */ export const WrappersMessage = proto3.makeMessageType( "spec.WrappersMessage", diff --git a/packages/protobuf-test/src/gen/js/extra/wkt-wrappers_pbv2.d.ts b/packages/protobuf-test/src/gen/js/extra/wkt-wrappers_pbv2.d.ts new file mode 100644 index 000000000..dd99ff31d --- /dev/null +++ b/packages/protobuf-test/src/gen/js/extra/wkt-wrappers_pbv2.d.ts @@ -0,0 +1,227 @@ +// Copyright 2021-2024 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// @generated by protoc-gen-es-next v1.7.2 with parameter "ts_nocheck=false,target=js+dts" +// @generated from file extra/wkt-wrappers.proto (package spec, syntax proto3) +/* eslint-disable */ + +import type { DescFile } from "@bufbuild/protobuf"; +import type { BoolValue, BytesValue, DoubleValue, FloatValue, Int32Value, Int64Value, Message, StringValue, UInt32Value, UInt64Value } from "@bufbuild/protobuf/next"; +import type { TypedDescMessage } from "@bufbuild/protobuf/next/codegenv1"; + +export declare const fileDesc_extra_wkt_wrappers: DescFile; + +/** + * @generated from message spec.WrappersMessage + * @deprecated + */ +export declare type WrappersMessage = Message<"spec.WrappersMessage"> & { + /** + * @generated from field: google.protobuf.DoubleValue double_value_field = 1; + */ + doubleValueField?: number; + + /** + * @generated from field: google.protobuf.BoolValue bool_value_field = 2; + */ + boolValueField?: boolean; + + /** + * @generated from field: google.protobuf.FloatValue float_value_field = 3; + */ + floatValueField?: number; + + /** + * @generated from field: google.protobuf.Int64Value int64_value_field = 4; + */ + int64ValueField?: bigint; + + /** + * @generated from field: google.protobuf.UInt64Value uint64_value_field = 5; + */ + uint64ValueField?: bigint; + + /** + * @generated from field: google.protobuf.Int32Value int32_value_field = 6; + */ + int32ValueField?: number; + + /** + * @generated from field: google.protobuf.UInt32Value uint32_value_field = 7; + */ + uint32ValueField?: number; + + /** + * @generated from field: google.protobuf.StringValue string_value_field = 8; + */ + stringValueField?: string; + + /** + * @generated from field: google.protobuf.BytesValue bytes_value_field = 9; + */ + bytesValueField?: Uint8Array; + + /** + * @generated from oneof spec.WrappersMessage.oneof_fields + */ + oneofFields: { + /** + * @generated from field: google.protobuf.DoubleValue oneof_double_value_field = 11; + */ + value: DoubleValue; + case: "oneofDoubleValueField"; + } | { + /** + * @generated from field: google.protobuf.BoolValue oneof_bool_value_field = 12; + */ + value: BoolValue; + case: "oneofBoolValueField"; + } | { + /** + * @generated from field: google.protobuf.FloatValue oneof_float_value_field = 13; + */ + value: FloatValue; + case: "oneofFloatValueField"; + } | { + /** + * @generated from field: google.protobuf.Int64Value oneof_int64_value_field = 14; + */ + value: Int64Value; + case: "oneofInt64ValueField"; + } | { + /** + * @generated from field: google.protobuf.UInt64Value oneof_uint64_value_field = 15; + */ + value: UInt64Value; + case: "oneofUint64ValueField"; + } | { + /** + * @generated from field: google.protobuf.Int32Value oneof_int32_value_field = 16; + */ + value: Int32Value; + case: "oneofInt32ValueField"; + } | { + /** + * @generated from field: google.protobuf.UInt32Value oneof_uint32_value_field = 17; + */ + value: UInt32Value; + case: "oneofUint32ValueField"; + } | { + /** + * @generated from field: google.protobuf.StringValue oneof_string_value_field = 18; + */ + value: StringValue; + case: "oneofStringValueField"; + } | { + /** + * @generated from field: google.protobuf.BytesValue oneof_bytes_value_field = 19; + */ + value: BytesValue; + case: "oneofBytesValueField"; + } | { case: undefined; value?: undefined }; + + /** + * @generated from field: repeated google.protobuf.DoubleValue repeated_double_value_field = 21; + */ + repeatedDoubleValueField: DoubleValue[]; + + /** + * @generated from field: repeated google.protobuf.BoolValue repeated_bool_value_field = 22; + */ + repeatedBoolValueField: BoolValue[]; + + /** + * @generated from field: repeated google.protobuf.FloatValue repeated_float_value_field = 23; + */ + repeatedFloatValueField: FloatValue[]; + + /** + * @generated from field: repeated google.protobuf.Int64Value repeated_int64_value_field = 24; + */ + repeatedInt64ValueField: Int64Value[]; + + /** + * @generated from field: repeated google.protobuf.UInt64Value repeated_uint64_value_field = 25; + */ + repeatedUint64ValueField: UInt64Value[]; + + /** + * @generated from field: repeated google.protobuf.Int32Value repeated_int32_value_field = 26; + */ + repeatedInt32ValueField: Int32Value[]; + + /** + * @generated from field: repeated google.protobuf.UInt32Value repeated_uint32_value_field = 27; + */ + repeatedUint32ValueField: UInt32Value[]; + + /** + * @generated from field: repeated google.protobuf.StringValue repeated_string_value_field = 28; + */ + repeatedStringValueField: StringValue[]; + + /** + * @generated from field: repeated google.protobuf.BytesValue repeated_bytes_value_field = 29; + */ + repeatedBytesValueField: BytesValue[]; + + /** + * @generated from field: map map_double_value_field = 31; + */ + mapDoubleValueField: { [key: string]: DoubleValue }; + + /** + * @generated from field: map map_bool_value_field = 32; + */ + mapBoolValueField: { [key: string]: BoolValue }; + + /** + * @generated from field: map map_float_value_field = 33; + */ + mapFloatValueField: { [key: string]: FloatValue }; + + /** + * @generated from field: map map_int64_value_field = 34; + */ + mapInt64ValueField: { [key: string]: Int64Value }; + + /** + * @generated from field: map map_uint64_value_field = 35; + */ + mapUint64ValueField: { [key: string]: UInt64Value }; + + /** + * @generated from field: map map_int32_value_field = 36; + */ + mapInt32ValueField: { [key: string]: Int32Value }; + + /** + * @generated from field: map map_uint32_value_field = 37; + */ + mapUint32ValueField: { [key: string]: UInt32Value }; + + /** + * @generated from field: map map_string_value_field = 38; + */ + mapStringValueField: { [key: string]: StringValue }; + + /** + * @generated from field: map map_bytes_value_field = 39; + */ + mapBytesValueField: { [key: string]: BytesValue }; +}; + +// Describes the message spec.WrappersMessage. Use `create(WrappersMessageDesc)` to create a new WrappersMessage. +export declare const WrappersMessageDesc: TypedDescMessage; + diff --git a/packages/protobuf-test/src/gen/js/extra/wkt-wrappers_pbv2.js b/packages/protobuf-test/src/gen/js/extra/wkt-wrappers_pbv2.js new file mode 100644 index 000000000..d687220f7 --- /dev/null +++ b/packages/protobuf-test/src/gen/js/extra/wkt-wrappers_pbv2.js @@ -0,0 +1,26 @@ +// Copyright 2021-2024 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// @generated by protoc-gen-es-next v1.7.2 with parameter "ts_nocheck=false,target=js+dts" +// @generated from file extra/wkt-wrappers.proto (package spec, syntax proto3) +/* eslint-disable */ + +import { fileDesc, messageDesc } from "@bufbuild/protobuf/next/codegenv1"; +import { fileDesc_google_protobuf_wrappers } from "@bufbuild/protobuf/next"; + +export const fileDesc_extra_wkt_wrappers = fileDesc("ChhleHRyYS93a3Qtd3JhcHBlcnMucHJvdG8SBHNwZWMilhkKD1dyYXBwZXJzTWVzc2FnZRI4ChJkb3VibGVfdmFsdWVfZmllbGQYASABKAsyHC5nb29nbGUucHJvdG9idWYuRG91YmxlVmFsdWUSNAoQYm9vbF92YWx1ZV9maWVsZBgCIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5Cb29sVmFsdWUSNgoRZmxvYXRfdmFsdWVfZmllbGQYAyABKAsyGy5nb29nbGUucHJvdG9idWYuRmxvYXRWYWx1ZRI2ChFpbnQ2NF92YWx1ZV9maWVsZBgEIAEoCzIbLmdvb2dsZS5wcm90b2J1Zi5JbnQ2NFZhbHVlEjgKEnVpbnQ2NF92YWx1ZV9maWVsZBgFIAEoCzIcLmdvb2dsZS5wcm90b2J1Zi5VSW50NjRWYWx1ZRI2ChFpbnQzMl92YWx1ZV9maWVsZBgGIAEoCzIbLmdvb2dsZS5wcm90b2J1Zi5JbnQzMlZhbHVlEjgKEnVpbnQzMl92YWx1ZV9maWVsZBgHIAEoCzIcLmdvb2dsZS5wcm90b2J1Zi5VSW50MzJWYWx1ZRI4ChJzdHJpbmdfdmFsdWVfZmllbGQYCCABKAsyHC5nb29nbGUucHJvdG9idWYuU3RyaW5nVmFsdWUSNgoRYnl0ZXNfdmFsdWVfZmllbGQYCSABKAsyGy5nb29nbGUucHJvdG9idWYuQnl0ZXNWYWx1ZRJAChhvb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Z29vZ2xlLnByb3RvYnVmLkludDMyVmFsdWU6AjgBGlgKGE1hcFVpbnQzMlZhbHVlRmllbGRFbnRyeRILCgNrZXkYASABKAkSKwoFdmFsdWUYAiABKAsyHC5nb29nbGUucHJvdG9idWYuVUludDMyVmFsdWU6AjgBGlgKGE1hcFN0cmluZ1ZhbHVlRmllbGRFbnRyeRILCgNrZXkYASABKAkSKwoFdmFsdWUYAiABKAsyHC5nb29nbGUucHJvdG9idWYuU3RyaW5nVmFsdWU6AjgBGlYKF01hcEJ5dGVzVmFsdWVGaWVsZEVudHJ5EgsKA2tleRgBIAEoCRIqCgV2YWx1ZRgCIAEoCzIbLmdvb2dsZS5wcm90b2J1Zi5CeXRlc1ZhbHVlOgI4AUIOCgxvbmVvZl9maWVsZHNCA7gBAWIGcHJvdG8z", [fileDesc_google_protobuf_wrappers]); + +// Describes the message spec.WrappersMessage. Use `create(WrappersMessageDesc)` to create a new WrappersMessage. +export const WrappersMessageDesc = messageDesc(fileDesc_extra_wkt_wrappers, 0); + diff --git a/packages/protobuf-test/src/gen/js/google/protobuf/any_pbv2.d.ts b/packages/protobuf-test/src/gen/js/google/protobuf/any_pbv2.d.ts new file mode 100644 index 000000000..c2a5829d3 --- /dev/null +++ b/packages/protobuf-test/src/gen/js/google/protobuf/any_pbv2.d.ts @@ -0,0 +1,161 @@ +// Copyright 2021-2024 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// @generated by protoc-gen-es-next v1.7.2 with parameter "ts_nocheck=false,target=js+dts" +// @generated from file google/protobuf/any.proto (package google.protobuf, syntax proto3) +/* eslint-disable */ + +import type { DescFile } from "@bufbuild/protobuf"; +import type { Message } from "@bufbuild/protobuf/next"; +import type { TypedDescMessage } from "@bufbuild/protobuf/next/codegenv1"; + +export declare const fileDesc_google_protobuf_any: DescFile; + +/** + * `Any` contains an arbitrary serialized protocol buffer message along with a + * URL that describes the type of the serialized message. + * + * Protobuf library provides support to pack/unpack Any values in the form + * of utility functions or additional generated methods of the Any type. + * + * Example 1: Pack and unpack a message in C++. + * + * Foo foo = ...; + * Any any; + * any.PackFrom(foo); + * ... + * if (any.UnpackTo(&foo)) { + * ... + * } + * + * Example 2: Pack and unpack a message in Java. + * + * Foo foo = ...; + * Any any = Any.pack(foo); + * ... + * if (any.is(Foo.class)) { + * foo = any.unpack(Foo.class); + * } + * // or ... + * if (any.isSameTypeAs(Foo.getDefaultInstance())) { + * foo = any.unpack(Foo.getDefaultInstance()); + * } + * + * Example 3: Pack and unpack a message in Python. + * + * foo = Foo(...) + * any = Any() + * any.Pack(foo) + * ... + * if any.Is(Foo.DESCRIPTOR): + * any.Unpack(foo) + * ... + * + * Example 4: Pack and unpack a message in Go + * + * foo := &pb.Foo{...} + * any, err := anypb.New(foo) + * if err != nil { + * ... + * } + * ... + * foo := &pb.Foo{} + * if err := any.UnmarshalTo(foo); err != nil { + * ... + * } + * + * The pack methods provided by protobuf library will by default use + * 'type.googleapis.com/full.type.name' as the type URL and the unpack + * methods only use the fully qualified type name after the last '/' + * in the type URL, for example "foo.bar.com/x/y.z" will yield type + * name "y.z". + * + * JSON + * ==== + * The JSON representation of an `Any` value uses the regular + * representation of the deserialized, embedded message, with an + * additional field `@type` which contains the type URL. Example: + * + * package google.profile; + * message Person { + * string first_name = 1; + * string last_name = 2; + * } + * + * { + * "@type": "type.googleapis.com/google.profile.Person", + * "firstName": , + * "lastName": + * } + * + * If the embedded message type is well-known and has a custom JSON + * representation, that representation will be embedded adding a field + * `value` which holds the custom JSON in addition to the `@type` + * field. Example (for message [google.protobuf.Duration][]): + * + * { + * "@type": "type.googleapis.com/google.protobuf.Duration", + * "value": "1.212s" + * } + * + * + * @generated from message google.protobuf.Any + */ +export declare type Any = Message<"google.protobuf.Any"> & { + /** + * A URL/resource name that uniquely identifies the type of the serialized + * protocol buffer message. This string must contain at least + * one "/" character. The last segment of the URL's path must represent + * the fully qualified name of the type (as in + * `path/google.protobuf.Duration`). The name should be in a canonical form + * (e.g., leading "." is not accepted). + * + * In practice, teams usually precompile into the binary all types that they + * expect it to use in the context of Any. However, for URLs which use the + * scheme `http`, `https`, or no scheme, one can optionally set up a type + * server that maps type URLs to message definitions as follows: + * + * * If no scheme is provided, `https` is assumed. + * * An HTTP GET on the URL must yield a [google.protobuf.Type][] + * value in binary format, or produce an error. + * * Applications are allowed to cache lookup results based on the + * URL, or have them precompiled into a binary to avoid any + * lookup. Therefore, binary compatibility needs to be preserved + * on changes to types. (Use versioned type names to manage + * breaking changes.) + * + * Note: this functionality is not currently available in the official + * protobuf release, and it is not used for type URLs beginning with + * type.googleapis.com. As of May 2023, there are no widely used type server + * implementations and no plans to implement one. + * + * Schemes other than `http`, `https` (or the empty scheme) might be + * used with implementation specific semantics. + * + * + * @generated from field: string type_url = 1; + */ + typeUrl: string; + + /** + * Must be a valid serialized protocol buffer of the above specified type. + * + * @generated from field: bytes value = 2; + */ + value: Uint8Array; +}; + +// Describes the message google.protobuf.Any. Use `create(AnyDesc)` to create a new Any. +export declare const AnyDesc: TypedDescMessage; + diff --git a/packages/protobuf-test/src/gen/js/google/protobuf/any_pbv2.js b/packages/protobuf-test/src/gen/js/google/protobuf/any_pbv2.js new file mode 100644 index 000000000..7d86e52fe --- /dev/null +++ b/packages/protobuf-test/src/gen/js/google/protobuf/any_pbv2.js @@ -0,0 +1,25 @@ +// Copyright 2021-2024 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// @generated by protoc-gen-es-next v1.7.2 with parameter "ts_nocheck=false,target=js+dts" +// @generated from file google/protobuf/any.proto (package google.protobuf, syntax proto3) +/* eslint-disable */ + +import { fileDesc, messageDesc } from "@bufbuild/protobuf/next/codegenv1"; + +export const fileDesc_google_protobuf_any = fileDesc("Chlnb29nbGUvcHJvdG9idWYvYW55LnByb3RvEg9nb29nbGUucHJvdG9idWYiJgoDQW55EhAKCHR5cGVfdXJsGAEgASgJEg0KBXZhbHVlGAIgASgMQnYKE2NvbS5nb29nbGUucHJvdG9idWZCCEFueVByb3RvUAFaLGdvb2dsZS5nb2xhbmcub3JnL3Byb3RvYnVmL3R5cGVzL2tub3duL2FueXBiogIDR1BCqgIeR29vZ2xlLlByb3RvYnVmLldlbGxLbm93blR5cGVzYgZwcm90bzM"); + +// Describes the message google.protobuf.Any. Use `create(AnyDesc)` to create a new Any. +export const AnyDesc = messageDesc(fileDesc_google_protobuf_any, 0); + diff --git a/packages/protobuf-test/src/gen/js/google/protobuf/api_pbv2.d.ts b/packages/protobuf-test/src/gen/js/google/protobuf/api_pbv2.d.ts new file mode 100644 index 000000000..6dd242347 --- /dev/null +++ b/packages/protobuf-test/src/gen/js/google/protobuf/api_pbv2.d.ts @@ -0,0 +1,275 @@ +// Copyright 2021-2024 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// @generated by protoc-gen-es-next v1.7.2 with parameter "ts_nocheck=false,target=js+dts" +// @generated from file google/protobuf/api.proto (package google.protobuf, syntax proto3) +/* eslint-disable */ + +import type { DescFile } from "@bufbuild/protobuf"; +import type { Message } from "@bufbuild/protobuf/next"; +import type { Option, Syntax } from "./type_pbv2.js"; +import type { SourceContext } from "./source_context_pbv2.js"; +import type { TypedDescMessage } from "@bufbuild/protobuf/next/codegenv1"; + +export declare const fileDesc_google_protobuf_api: DescFile; + +/** + * Api is a light-weight descriptor for an API Interface. + * + * Interfaces are also described as "protocol buffer services" in some contexts, + * such as by the "service" keyword in a .proto file, but they are different + * from API Services, which represent a concrete implementation of an interface + * as opposed to simply a description of methods and bindings. They are also + * sometimes simply referred to as "APIs" in other contexts, such as the name of + * this message itself. See https://cloud.google.com/apis/design/glossary for + * detailed terminology. + * + * @generated from message google.protobuf.Api + */ +export declare type Api = Message<"google.protobuf.Api"> & { + /** + * The fully qualified name of this interface, including package name + * followed by the interface's simple name. + * + * @generated from field: string name = 1; + */ + name: string; + + /** + * The methods of this interface, in unspecified order. + * + * @generated from field: repeated google.protobuf.Method methods = 2; + */ + methods: Method[]; + + /** + * Any metadata attached to the interface. + * + * @generated from field: repeated google.protobuf.Option options = 3; + */ + options: Option[]; + + /** + * A version string for this interface. If specified, must have the form + * `major-version.minor-version`, as in `1.10`. If the minor version is + * omitted, it defaults to zero. If the entire version field is empty, the + * major version is derived from the package name, as outlined below. If the + * field is not empty, the version in the package name will be verified to be + * consistent with what is provided here. + * + * The versioning schema uses [semantic + * versioning](http://semver.org) where the major version number + * indicates a breaking change and the minor version an additive, + * non-breaking change. Both version numbers are signals to users + * what to expect from different versions, and should be carefully + * chosen based on the product plan. + * + * The major version is also reflected in the package name of the + * interface, which must end in `v`, as in + * `google.feature.v1`. For major versions 0 and 1, the suffix can + * be omitted. Zero major versions must only be used for + * experimental, non-GA interfaces. + * + * + * @generated from field: string version = 4; + */ + version: string; + + /** + * Source context for the protocol buffer service represented by this + * message. + * + * @generated from field: google.protobuf.SourceContext source_context = 5; + */ + sourceContext?: SourceContext; + + /** + * Included interfaces. See [Mixin][]. + * + * @generated from field: repeated google.protobuf.Mixin mixins = 6; + */ + mixins: Mixin[]; + + /** + * The source syntax of the service. + * + * @generated from field: google.protobuf.Syntax syntax = 7; + */ + syntax: Syntax; +}; + +// Describes the message google.protobuf.Api. Use `create(ApiDesc)` to create a new Api. +export declare const ApiDesc: TypedDescMessage; + +/** + * Method represents a method of an API interface. + * + * @generated from message google.protobuf.Method + */ +export declare type Method = Message<"google.protobuf.Method"> & { + /** + * The simple name of this method. + * + * @generated from field: string name = 1; + */ + name: string; + + /** + * A URL of the input message type. + * + * @generated from field: string request_type_url = 2; + */ + requestTypeUrl: string; + + /** + * If true, the request is streamed. + * + * @generated from field: bool request_streaming = 3; + */ + requestStreaming: boolean; + + /** + * The URL of the output message type. + * + * @generated from field: string response_type_url = 4; + */ + responseTypeUrl: string; + + /** + * If true, the response is streamed. + * + * @generated from field: bool response_streaming = 5; + */ + responseStreaming: boolean; + + /** + * Any metadata attached to the method. + * + * @generated from field: repeated google.protobuf.Option options = 6; + */ + options: Option[]; + + /** + * The source syntax of this method. + * + * @generated from field: google.protobuf.Syntax syntax = 7; + */ + syntax: Syntax; +}; + +// Describes the message google.protobuf.Method. Use `create(MethodDesc)` to create a new Method. +export declare const MethodDesc: TypedDescMessage; + +/** + * Declares an API Interface to be included in this interface. The including + * interface must redeclare all the methods from the included interface, but + * documentation and options are inherited as follows: + * + * - If after comment and whitespace stripping, the documentation + * string of the redeclared method is empty, it will be inherited + * from the original method. + * + * - Each annotation belonging to the service config (http, + * visibility) which is not set in the redeclared method will be + * inherited. + * + * - If an http annotation is inherited, the path pattern will be + * modified as follows. Any version prefix will be replaced by the + * version of the including interface plus the [root][] path if + * specified. + * + * Example of a simple mixin: + * + * package google.acl.v1; + * service AccessControl { + * // Get the underlying ACL object. + * rpc GetAcl(GetAclRequest) returns (Acl) { + * option (google.api.http).get = "/v1/{resource=**}:getAcl"; + * } + * } + * + * package google.storage.v2; + * service Storage { + * rpc GetAcl(GetAclRequest) returns (Acl); + * + * // Get a data record. + * rpc GetData(GetDataRequest) returns (Data) { + * option (google.api.http).get = "/v2/{resource=**}"; + * } + * } + * + * Example of a mixin configuration: + * + * apis: + * - name: google.storage.v2.Storage + * mixins: + * - name: google.acl.v1.AccessControl + * + * The mixin construct implies that all methods in `AccessControl` are + * also declared with same name and request/response types in + * `Storage`. A documentation generator or annotation processor will + * see the effective `Storage.GetAcl` method after inherting + * documentation and annotations as follows: + * + * service Storage { + * // Get the underlying ACL object. + * rpc GetAcl(GetAclRequest) returns (Acl) { + * option (google.api.http).get = "/v2/{resource=**}:getAcl"; + * } + * ... + * } + * + * Note how the version in the path pattern changed from `v1` to `v2`. + * + * If the `root` field in the mixin is specified, it should be a + * relative path under which inherited HTTP paths are placed. Example: + * + * apis: + * - name: google.storage.v2.Storage + * mixins: + * - name: google.acl.v1.AccessControl + * root: acls + * + * This implies the following inherited HTTP annotation: + * + * service Storage { + * // Get the underlying ACL object. + * rpc GetAcl(GetAclRequest) returns (Acl) { + * option (google.api.http).get = "/v2/acls/{resource=**}:getAcl"; + * } + * ... + * } + * + * @generated from message google.protobuf.Mixin + */ +export declare type Mixin = Message<"google.protobuf.Mixin"> & { + /** + * The fully qualified name of the interface which is included. + * + * @generated from field: string name = 1; + */ + name: string; + + /** + * If non-empty specifies a path under which inherited HTTP paths + * are rooted. + * + * @generated from field: string root = 2; + */ + root: string; +}; + +// Describes the message google.protobuf.Mixin. Use `create(MixinDesc)` to create a new Mixin. +export declare const MixinDesc: TypedDescMessage; + diff --git a/packages/protobuf-test/src/gen/js/google/protobuf/api_pbv2.js b/packages/protobuf-test/src/gen/js/google/protobuf/api_pbv2.js new file mode 100644 index 000000000..c61d928d4 --- /dev/null +++ b/packages/protobuf-test/src/gen/js/google/protobuf/api_pbv2.js @@ -0,0 +1,33 @@ +// Copyright 2021-2024 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// @generated by protoc-gen-es-next v1.7.2 with parameter "ts_nocheck=false,target=js+dts" +// @generated from file google/protobuf/api.proto (package google.protobuf, syntax proto3) +/* eslint-disable */ + +import { fileDesc, messageDesc } from "@bufbuild/protobuf/next/codegenv1"; +import { fileDesc_google_protobuf_source_context } from "./source_context_pbv2.js"; +import { fileDesc_google_protobuf_type } from "./type_pbv2.js"; + +export const fileDesc_google_protobuf_api = fileDesc("Chlnb29nbGUvcHJvdG9idWYvYXBpLnByb3RvEg9nb29nbGUucHJvdG9idWYigQIKA0FwaRIMCgRuYW1lGAEgASgJEigKB21ldGhvZHMYAiADKAsyFy5nb29nbGUucHJvdG9idWYuTWV0aG9kEigKB29wdGlvbnMYAyADKAsyFy5nb29nbGUucHJvdG9idWYuT3B0aW9uEg8KB3ZlcnNpb24YBCABKAkSNgoOc291cmNlX2NvbnRleHQYBSABKAsyHi5nb29nbGUucHJvdG9idWYuU291cmNlQ29udGV4dBImCgZtaXhpbnMYBiADKAsyFi5nb29nbGUucHJvdG9idWYuTWl4aW4SJwoGc3ludGF4GAcgASgOMhcuZ29vZ2xlLnByb3RvYnVmLlN5bnRheCLVAQoGTWV0aG9kEgwKBG5hbWUYASABKAkSGAoQcmVxdWVzdF90eXBlX3VybBgCIAEoCRIZChFyZXF1ZXN0X3N0cmVhbWluZxgDIAEoCBIZChFyZXNwb25zZV90eXBlX3VybBgEIAEoCRIaChJyZXNwb25zZV9zdHJlYW1pbmcYBSABKAgSKAoHb3B0aW9ucxgGIAMoCzIXLmdvb2dsZS5wcm90b2J1Zi5PcHRpb24SJwoGc3ludGF4GAcgASgOMhcuZ29vZ2xlLnByb3RvYnVmLlN5bnRheCIjCgVNaXhpbhIMCgRuYW1lGAEgASgJEgwKBHJvb3QYAiABKAlCdgoTY29tLmdvb2dsZS5wcm90b2J1ZkIIQXBpUHJvdG9QAVosZ29vZ2xlLmdvbGFuZy5vcmcvcHJvdG9idWYvdHlwZXMva25vd24vYXBpcGKiAgNHUEKqAh5Hb29nbGUuUHJvdG9idWYuV2VsbEtub3duVHlwZXNiBnByb3RvMw", [fileDesc_google_protobuf_source_context, fileDesc_google_protobuf_type]); + +// Describes the message google.protobuf.Api. Use `create(ApiDesc)` to create a new Api. +export const ApiDesc = messageDesc(fileDesc_google_protobuf_api, 0); + +// Describes the message google.protobuf.Method. Use `create(MethodDesc)` to create a new Method. +export const MethodDesc = messageDesc(fileDesc_google_protobuf_api, 1); + +// Describes the message google.protobuf.Mixin. Use `create(MixinDesc)` to create a new Mixin. +export const MixinDesc = messageDesc(fileDesc_google_protobuf_api, 2); + diff --git a/packages/protobuf-test/src/gen/js/google/protobuf/compiler/plugin_pbv2.d.ts b/packages/protobuf-test/src/gen/js/google/protobuf/compiler/plugin_pbv2.d.ts new file mode 100644 index 000000000..16d7a2007 --- /dev/null +++ b/packages/protobuf-test/src/gen/js/google/protobuf/compiler/plugin_pbv2.d.ts @@ -0,0 +1,286 @@ +// Copyright 2021-2024 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Author: kenton@google.com (Kenton Varda) +// +// protoc (aka the Protocol Compiler) can be extended via plugins. A plugin is +// just a program that reads a CodeGeneratorRequest from stdin and writes a +// CodeGeneratorResponse to stdout. +// +// Plugins written using C++ can use google/protobuf/compiler/plugin.h instead +// of dealing with the raw protocol defined here. +// +// A plugin executable needs only to be placed somewhere in the path. The +// plugin should be named "protoc-gen-$NAME", and will then be used when the +// flag "--${NAME}_out" is passed to protoc. + +// @generated by protoc-gen-es-next v1.7.2 with parameter "ts_nocheck=false,target=js+dts" +// @generated from file google/protobuf/compiler/plugin.proto (package google.protobuf.compiler, syntax proto2) +/* eslint-disable */ + +import type { DescFile } from "@bufbuild/protobuf"; +import type { Message } from "@bufbuild/protobuf/next"; +import type { TypedDescEnum, TypedDescMessage } from "@bufbuild/protobuf/next/codegenv1"; +import type { FileDescriptorProto, GeneratedCodeInfo } from "../descriptor_pbv2.js"; + +export declare const fileDesc_google_protobuf_compiler_plugin: DescFile; + +/** + * The version number of protocol compiler. + * + * @generated from message google.protobuf.compiler.Version + */ +export declare type Version = Message<"google.protobuf.compiler.Version"> & { + /** + * @generated from field: optional int32 major = 1; + */ + major: number; + + /** + * @generated from field: optional int32 minor = 2; + */ + minor: number; + + /** + * @generated from field: optional int32 patch = 3; + */ + patch: number; + + /** + * A suffix for alpha, beta or rc release, e.g., "alpha-1", "rc2". It should + * be empty for mainline stable releases. + * + * @generated from field: optional string suffix = 4; + */ + suffix: string; +}; + +// Describes the message google.protobuf.compiler.Version. Use `create(VersionDesc)` to create a new Version. +export declare const VersionDesc: TypedDescMessage; + +/** + * An encoded CodeGeneratorRequest is written to the plugin's stdin. + * + * @generated from message google.protobuf.compiler.CodeGeneratorRequest + */ +export declare type CodeGeneratorRequest = Message<"google.protobuf.compiler.CodeGeneratorRequest"> & { + /** + * The .proto files that were explicitly listed on the command-line. The + * code generator should generate code only for these files. Each file's + * descriptor will be included in proto_file, below. + * + * @generated from field: repeated string file_to_generate = 1; + */ + fileToGenerate: string[]; + + /** + * The generator parameter passed on the command-line. + * + * @generated from field: optional string parameter = 2; + */ + parameter: string; + + /** + * FileDescriptorProtos for all files in files_to_generate and everything + * they import. The files will appear in topological order, so each file + * appears before any file that imports it. + * + * Note: the files listed in files_to_generate will include runtime-retention + * options only, but all other files will include source-retention options. + * The source_file_descriptors field below is available in case you need + * source-retention options for files_to_generate. + * + * protoc guarantees that all proto_files will be written after + * the fields above, even though this is not technically guaranteed by the + * protobuf wire format. This theoretically could allow a plugin to stream + * in the FileDescriptorProtos and handle them one by one rather than read + * the entire set into memory at once. However, as of this writing, this + * is not similarly optimized on protoc's end -- it will store all fields in + * memory at once before sending them to the plugin. + * + * Type names of fields and extensions in the FileDescriptorProto are always + * fully qualified. + * + * @generated from field: repeated google.protobuf.FileDescriptorProto proto_file = 15; + */ + protoFile: FileDescriptorProto[]; + + /** + * File descriptors with all options, including source-retention options. + * These descriptors are only provided for the files listed in + * files_to_generate. + * + * @generated from field: repeated google.protobuf.FileDescriptorProto source_file_descriptors = 17; + */ + sourceFileDescriptors: FileDescriptorProto[]; + + /** + * The version number of protocol compiler. + * + * @generated from field: optional google.protobuf.compiler.Version compiler_version = 3; + */ + compilerVersion?: Version; +}; + +// Describes the message google.protobuf.compiler.CodeGeneratorRequest. Use `create(CodeGeneratorRequestDesc)` to create a new CodeGeneratorRequest. +export declare const CodeGeneratorRequestDesc: TypedDescMessage; + +/** + * The plugin writes an encoded CodeGeneratorResponse to stdout. + * + * @generated from message google.protobuf.compiler.CodeGeneratorResponse + */ +export declare type CodeGeneratorResponse = Message<"google.protobuf.compiler.CodeGeneratorResponse"> & { + /** + * Error message. If non-empty, code generation failed. The plugin process + * should exit with status code zero even if it reports an error in this way. + * + * This should be used to indicate errors in .proto files which prevent the + * code generator from generating correct code. Errors which indicate a + * problem in protoc itself -- such as the input CodeGeneratorRequest being + * unparseable -- should be reported by writing a message to stderr and + * exiting with a non-zero status code. + * + * @generated from field: optional string error = 1; + */ + error: string; + + /** + * A bitmask of supported features that the code generator supports. + * This is a bitwise "or" of values from the Feature enum. + * + * @generated from field: optional uint64 supported_features = 2; + */ + supportedFeatures: bigint; + + /** + * @generated from field: repeated google.protobuf.compiler.CodeGeneratorResponse.File file = 15; + */ + file: CodeGeneratorResponse_File[]; +}; + +// Describes the message google.protobuf.compiler.CodeGeneratorResponse. Use `create(CodeGeneratorResponseDesc)` to create a new CodeGeneratorResponse. +export declare const CodeGeneratorResponseDesc: TypedDescMessage; + +/** + * Represents a single generated file. + * + * @generated from message google.protobuf.compiler.CodeGeneratorResponse.File + */ +export declare type CodeGeneratorResponse_File = Message<"google.protobuf.compiler.CodeGeneratorResponse.File"> & { + /** + * The file name, relative to the output directory. The name must not + * contain "." or ".." components and must be relative, not be absolute (so, + * the file cannot lie outside the output directory). "/" must be used as + * the path separator, not "\". + * + * If the name is omitted, the content will be appended to the previous + * file. This allows the generator to break large files into small chunks, + * and allows the generated text to be streamed back to protoc so that large + * files need not reside completely in memory at one time. Note that as of + * this writing protoc does not optimize for this -- it will read the entire + * CodeGeneratorResponse before writing files to disk. + * + * @generated from field: optional string name = 1; + */ + name: string; + + /** + * If non-empty, indicates that the named file should already exist, and the + * content here is to be inserted into that file at a defined insertion + * point. This feature allows a code generator to extend the output + * produced by another code generator. The original generator may provide + * insertion points by placing special annotations in the file that look + * like: + * @@protoc_insertion_point(NAME) + * The annotation can have arbitrary text before and after it on the line, + * which allows it to be placed in a comment. NAME should be replaced with + * an identifier naming the point -- this is what other generators will use + * as the insertion_point. Code inserted at this point will be placed + * immediately above the line containing the insertion point (thus multiple + * insertions to the same point will come out in the order they were added). + * The double-@ is intended to make it unlikely that the generated code + * could contain things that look like insertion points by accident. + * + * For example, the C++ code generator places the following line in the + * .pb.h files that it generates: + * // @@protoc_insertion_point(namespace_scope) + * This line appears within the scope of the file's package namespace, but + * outside of any particular class. Another plugin can then specify the + * insertion_point "namespace_scope" to generate additional classes or + * other declarations that should be placed in this scope. + * + * Note that if the line containing the insertion point begins with + * whitespace, the same whitespace will be added to every line of the + * inserted text. This is useful for languages like Python, where + * indentation matters. In these languages, the insertion point comment + * should be indented the same amount as any inserted code will need to be + * in order to work correctly in that context. + * + * The code generator that generates the initial file and the one which + * inserts into it must both run as part of a single invocation of protoc. + * Code generators are executed in the order in which they appear on the + * command line. + * + * If |insertion_point| is present, |name| must also be present. + * + * @generated from field: optional string insertion_point = 2; + */ + insertionPoint: string; + + /** + * The file contents. + * + * @generated from field: optional string content = 15; + */ + content: string; + + /** + * Information describing the file content being inserted. If an insertion + * point is used, this information will be appropriately offset and inserted + * into the code generation metadata for the generated files. + * + * @generated from field: optional google.protobuf.GeneratedCodeInfo generated_code_info = 16; + */ + generatedCodeInfo?: GeneratedCodeInfo; +}; + +// Describes the message google.protobuf.compiler.CodeGeneratorResponse.File. Use `create(CodeGeneratorResponse_FileDesc)` to create a new CodeGeneratorResponse_File. +export declare const CodeGeneratorResponse_FileDesc: TypedDescMessage; + +/** + * Sync with code_generator.h. + * + * @generated from enum google.protobuf.compiler.CodeGeneratorResponse.Feature + */ +export enum CodeGeneratorResponse_Feature { + /** + * @generated from enum value: FEATURE_NONE = 0; + */ + NONE = 0, + + /** + * @generated from enum value: FEATURE_PROTO3_OPTIONAL = 1; + */ + PROTO3_OPTIONAL = 1, + + /** + * @generated from enum value: FEATURE_SUPPORTS_EDITIONS = 2; + */ + SUPPORTS_EDITIONS = 2, +} + +// Describes the enum google.protobuf.compiler.CodeGeneratorResponse.Feature. +export declare const CodeGeneratorResponse_FeatureDesc: TypedDescEnum; + diff --git a/packages/protobuf-test/src/gen/js/google/protobuf/compiler/plugin_pbv2.js b/packages/protobuf-test/src/gen/js/google/protobuf/compiler/plugin_pbv2.js new file mode 100644 index 000000000..95eff1f59 --- /dev/null +++ b/packages/protobuf-test/src/gen/js/google/protobuf/compiler/plugin_pbv2.js @@ -0,0 +1,58 @@ +// Copyright 2021-2024 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Author: kenton@google.com (Kenton Varda) +// +// protoc (aka the Protocol Compiler) can be extended via plugins. A plugin is +// just a program that reads a CodeGeneratorRequest from stdin and writes a +// CodeGeneratorResponse to stdout. +// +// Plugins written using C++ can use google/protobuf/compiler/plugin.h instead +// of dealing with the raw protocol defined here. +// +// A plugin executable needs only to be placed somewhere in the path. The +// plugin should be named "protoc-gen-$NAME", and will then be used when the +// flag "--${NAME}_out" is passed to protoc. + +// @generated by protoc-gen-es-next v1.7.2 with parameter "ts_nocheck=false,target=js+dts" +// @generated from file google/protobuf/compiler/plugin.proto (package google.protobuf.compiler, syntax proto2) +/* eslint-disable */ + +import { enumDesc, fileDesc, messageDesc, tsEnum } from "@bufbuild/protobuf/next/codegenv1"; +import { fileDesc_google_protobuf_descriptor } from "../descriptor_pbv2.js"; + +export const fileDesc_google_protobuf_compiler_plugin = fileDesc("CiVnb29nbGUvcHJvdG9idWYvY29tcGlsZXIvcGx1Z2luLnByb3RvEhhnb29nbGUucHJvdG9idWYuY29tcGlsZXIiRgoHVmVyc2lvbhINCgVtYWpvchgBIAEoBRINCgVtaW5vchgCIAEoBRINCgVwYXRjaBgDIAEoBRIOCgZzdWZmaXgYBCABKAkigQIKFENvZGVHZW5lcmF0b3JSZXF1ZXN0EhgKEGZpbGVfdG9fZ2VuZXJhdGUYASADKAkSEQoJcGFyYW1ldGVyGAIgASgJEjgKCnByb3RvX2ZpbGUYDyADKAsyJC5nb29nbGUucHJvdG9idWYuRmlsZURlc2NyaXB0b3JQcm90bxJFChdzb3VyY2VfZmlsZV9kZXNjcmlwdG9ycxgRIAMoCzIkLmdvb2dsZS5wcm90b2J1Zi5GaWxlRGVzY3JpcHRvclByb3RvEjsKEGNvbXBpbGVyX3ZlcnNpb24YAyABKAsyIS5nb29nbGUucHJvdG9idWYuY29tcGlsZXIuVmVyc2lvbiLgAgoVQ29kZUdlbmVyYXRvclJlc3BvbnNlEg0KBWVycm9yGAEgASgJEhoKEnN1cHBvcnRlZF9mZWF0dXJlcxgCIAEoBBJCCgRmaWxlGA8gAygLMjQuZ29vZ2xlLnByb3RvYnVmLmNvbXBpbGVyLkNvZGVHZW5lcmF0b3JSZXNwb25zZS5GaWxlGn8KBEZpbGUSDAoEbmFtZRgBIAEoCRIXCg9pbnNlcnRpb25fcG9pbnQYAiABKAkSDwoHY29udGVudBgPIAEoCRI/ChNnZW5lcmF0ZWRfY29kZV9pbmZvGBAgASgLMiIuZ29vZ2xlLnByb3RvYnVmLkdlbmVyYXRlZENvZGVJbmZvIlcKB0ZlYXR1cmUSEAoMRkVBVFVSRV9OT05FEAASGwoXRkVBVFVSRV9QUk9UTzNfT1BUSU9OQUwQARIdChlGRUFUVVJFX1NVUFBPUlRTX0VESVRJT05TEAJCcgocY29tLmdvb2dsZS5wcm90b2J1Zi5jb21waWxlckIMUGx1Z2luUHJvdG9zWilnb29nbGUuZ29sYW5nLm9yZy9wcm90b2J1Zi90eXBlcy9wbHVnaW5wYqoCGEdvb2dsZS5Qcm90b2J1Zi5Db21waWxlcg", [fileDesc_google_protobuf_descriptor]); + +// Describes the message google.protobuf.compiler.Version. Use `create(VersionDesc)` to create a new Version. +export const VersionDesc = messageDesc(fileDesc_google_protobuf_compiler_plugin, 0); + +// Describes the message google.protobuf.compiler.CodeGeneratorRequest. Use `create(CodeGeneratorRequestDesc)` to create a new CodeGeneratorRequest. +export const CodeGeneratorRequestDesc = messageDesc(fileDesc_google_protobuf_compiler_plugin, 1); + +// Describes the message google.protobuf.compiler.CodeGeneratorResponse. Use `create(CodeGeneratorResponseDesc)` to create a new CodeGeneratorResponse. +export const CodeGeneratorResponseDesc = messageDesc(fileDesc_google_protobuf_compiler_plugin, 2); + +// Describes the message google.protobuf.compiler.CodeGeneratorResponse.File. Use `create(CodeGeneratorResponse_FileDesc)` to create a new CodeGeneratorResponse_File. +export const CodeGeneratorResponse_FileDesc = messageDesc(fileDesc_google_protobuf_compiler_plugin, 2, 0); + +// Describes the enum google.protobuf.compiler.CodeGeneratorResponse.Feature. +export const CodeGeneratorResponse_FeatureDesc = enumDesc(fileDesc_google_protobuf_compiler_plugin, 2, 0); + +/** + * Sync with code_generator.h. + * + * @generated from enum google.protobuf.compiler.CodeGeneratorResponse.Feature + */ +export const CodeGeneratorResponse_Feature = tsEnum(CodeGeneratorResponse_FeatureDesc); + diff --git a/packages/protobuf-test/src/gen/js/google/protobuf/descriptor_pbv2.d.ts b/packages/protobuf-test/src/gen/js/google/protobuf/descriptor_pbv2.d.ts new file mode 100644 index 000000000..2e641e51b --- /dev/null +++ b/packages/protobuf-test/src/gen/js/google/protobuf/descriptor_pbv2.d.ts @@ -0,0 +1,2363 @@ +// Copyright 2021-2024 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Author: kenton@google.com (Kenton Varda) +// Based on original Protocol Buffers design by +// Sanjay Ghemawat, Jeff Dean, and others. +// +// The messages in this file describe the definitions found in .proto files. +// A valid .proto file can be translated directly to a FileDescriptorProto +// without any other information (e.g. without reading its imports). + +// @generated by protoc-gen-es-next v1.7.2 with parameter "ts_nocheck=false,target=js+dts" +// @generated from file google/protobuf/descriptor.proto (package google.protobuf, syntax proto2) +/* eslint-disable */ + +import type { DescFile } from "@bufbuild/protobuf"; +import type { Message } from "@bufbuild/protobuf/next"; +import type { TypedDescEnum, TypedDescMessage } from "@bufbuild/protobuf/next/codegenv1"; + +export declare const fileDesc_google_protobuf_descriptor: DescFile; + +/** + * The protocol compiler can output a FileDescriptorSet containing the .proto + * files it parses. + * + * @generated from message google.protobuf.FileDescriptorSet + */ +export declare type FileDescriptorSet = Message<"google.protobuf.FileDescriptorSet"> & { + /** + * @generated from field: repeated google.protobuf.FileDescriptorProto file = 1; + */ + file: FileDescriptorProto[]; +}; + +// Describes the message google.protobuf.FileDescriptorSet. Use `create(FileDescriptorSetDesc)` to create a new FileDescriptorSet. +export declare const FileDescriptorSetDesc: TypedDescMessage; + +/** + * Describes a complete .proto file. + * + * @generated from message google.protobuf.FileDescriptorProto + */ +export declare type FileDescriptorProto = Message<"google.protobuf.FileDescriptorProto"> & { + /** + * file name, relative to root of source tree + * + * @generated from field: optional string name = 1; + */ + name: string; + + /** + * e.g. "foo", "foo.bar", etc. + * + * @generated from field: optional string package = 2; + */ + package: string; + + /** + * Names of files imported by this file. + * + * @generated from field: repeated string dependency = 3; + */ + dependency: string[]; + + /** + * Indexes of the public imported files in the dependency list above. + * + * @generated from field: repeated int32 public_dependency = 10; + */ + publicDependency: number[]; + + /** + * Indexes of the weak imported files in the dependency list. + * For Google-internal migration only. Do not use. + * + * @generated from field: repeated int32 weak_dependency = 11; + */ + weakDependency: number[]; + + /** + * All top-level definitions in this file. + * + * @generated from field: repeated google.protobuf.DescriptorProto message_type = 4; + */ + messageType: DescriptorProto[]; + + /** + * @generated from field: repeated google.protobuf.EnumDescriptorProto enum_type = 5; + */ + enumType: EnumDescriptorProto[]; + + /** + * @generated from field: repeated google.protobuf.ServiceDescriptorProto service = 6; + */ + service: ServiceDescriptorProto[]; + + /** + * @generated from field: repeated google.protobuf.FieldDescriptorProto extension = 7; + */ + extension: FieldDescriptorProto[]; + + /** + * @generated from field: optional google.protobuf.FileOptions options = 8; + */ + options?: FileOptions; + + /** + * This field contains optional information about the original source code. + * You may safely remove this entire field without harming runtime + * functionality of the descriptors -- the information is needed only by + * development tools. + * + * @generated from field: optional google.protobuf.SourceCodeInfo source_code_info = 9; + */ + sourceCodeInfo?: SourceCodeInfo; + + /** + * The syntax of the proto file. + * The supported values are "proto2", "proto3", and "editions". + * + * If `edition` is present, this value must be "editions". + * + * @generated from field: optional string syntax = 12; + */ + syntax: string; + + /** + * The edition of the proto file. + * + * @generated from field: optional google.protobuf.Edition edition = 14; + */ + edition: Edition; +}; + +// Describes the message google.protobuf.FileDescriptorProto. Use `create(FileDescriptorProtoDesc)` to create a new FileDescriptorProto. +export declare const FileDescriptorProtoDesc: TypedDescMessage; + +/** + * Describes a message type. + * + * @generated from message google.protobuf.DescriptorProto + */ +export declare type DescriptorProto = Message<"google.protobuf.DescriptorProto"> & { + /** + * @generated from field: optional string name = 1; + */ + name: string; + + /** + * @generated from field: repeated google.protobuf.FieldDescriptorProto field = 2; + */ + field: FieldDescriptorProto[]; + + /** + * @generated from field: repeated google.protobuf.FieldDescriptorProto extension = 6; + */ + extension: FieldDescriptorProto[]; + + /** + * @generated from field: repeated google.protobuf.DescriptorProto nested_type = 3; + */ + nestedType: DescriptorProto[]; + + /** + * @generated from field: repeated google.protobuf.EnumDescriptorProto enum_type = 4; + */ + enumType: EnumDescriptorProto[]; + + /** + * @generated from field: repeated google.protobuf.DescriptorProto.ExtensionRange extension_range = 5; + */ + extensionRange: DescriptorProto_ExtensionRange[]; + + /** + * @generated from field: repeated google.protobuf.OneofDescriptorProto oneof_decl = 8; + */ + oneofDecl: OneofDescriptorProto[]; + + /** + * @generated from field: optional google.protobuf.MessageOptions options = 7; + */ + options?: MessageOptions; + + /** + * @generated from field: repeated google.protobuf.DescriptorProto.ReservedRange reserved_range = 9; + */ + reservedRange: DescriptorProto_ReservedRange[]; + + /** + * Reserved field names, which may not be used by fields in the same message. + * A given name may only be reserved once. + * + * @generated from field: repeated string reserved_name = 10; + */ + reservedName: string[]; +}; + +// Describes the message google.protobuf.DescriptorProto. Use `create(DescriptorProtoDesc)` to create a new DescriptorProto. +export declare const DescriptorProtoDesc: TypedDescMessage; + +/** + * @generated from message google.protobuf.DescriptorProto.ExtensionRange + */ +export declare type DescriptorProto_ExtensionRange = Message<"google.protobuf.DescriptorProto.ExtensionRange"> & { + /** + * Inclusive. + * + * @generated from field: optional int32 start = 1; + */ + start: number; + + /** + * Exclusive. + * + * @generated from field: optional int32 end = 2; + */ + end: number; + + /** + * @generated from field: optional google.protobuf.ExtensionRangeOptions options = 3; + */ + options?: ExtensionRangeOptions; +}; + +// Describes the message google.protobuf.DescriptorProto.ExtensionRange. Use `create(DescriptorProto_ExtensionRangeDesc)` to create a new DescriptorProto_ExtensionRange. +export declare const DescriptorProto_ExtensionRangeDesc: TypedDescMessage; + +/** + * Range of reserved tag numbers. Reserved tag numbers may not be used by + * fields or extension ranges in the same message. Reserved ranges may + * not overlap. + * + * @generated from message google.protobuf.DescriptorProto.ReservedRange + */ +export declare type DescriptorProto_ReservedRange = Message<"google.protobuf.DescriptorProto.ReservedRange"> & { + /** + * Inclusive. + * + * @generated from field: optional int32 start = 1; + */ + start: number; + + /** + * Exclusive. + * + * @generated from field: optional int32 end = 2; + */ + end: number; +}; + +// Describes the message google.protobuf.DescriptorProto.ReservedRange. Use `create(DescriptorProto_ReservedRangeDesc)` to create a new DescriptorProto_ReservedRange. +export declare const DescriptorProto_ReservedRangeDesc: TypedDescMessage; + +/** + * @generated from message google.protobuf.ExtensionRangeOptions + */ +export declare type ExtensionRangeOptions = Message<"google.protobuf.ExtensionRangeOptions"> & { + /** + * The parser stores options it doesn't recognize here. See above. + * + * @generated from field: repeated google.protobuf.UninterpretedOption uninterpreted_option = 999; + */ + 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. + * + * @generated from field: repeated google.protobuf.ExtensionRangeOptions.Declaration declaration = 2; + */ + declaration: ExtensionRangeOptions_Declaration[]; + + /** + * Any features defined in the specific edition. + * + * @generated from field: optional google.protobuf.FeatureSet features = 50; + */ + features?: FeatureSet; + + /** + * The verification state of the range. + * TODO: flip the default to DECLARATION once all empty ranges + * are marked as UNVERIFIED. + * + * @generated from field: optional google.protobuf.ExtensionRangeOptions.VerificationState verification = 3 [default = UNVERIFIED]; + */ + verification: ExtensionRangeOptions_VerificationState; +}; + +// Describes the message google.protobuf.ExtensionRangeOptions. Use `create(ExtensionRangeOptionsDesc)` to create a new ExtensionRangeOptions. +export declare const ExtensionRangeOptionsDesc: TypedDescMessage; + +/** + * @generated from message google.protobuf.ExtensionRangeOptions.Declaration + */ +export declare type ExtensionRangeOptions_Declaration = Message<"google.protobuf.ExtensionRangeOptions.Declaration"> & { + /** + * The extension number declared within the extension range. + * + * @generated from field: optional int32 number = 1; + */ + number: number; + + /** + * The fully-qualified name of the extension field. There must be a leading + * dot in front of the full name. + * + * @generated from field: optional string full_name = 2; + */ + 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. + * + * @generated from field: optional string type = 3; + */ + 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. + * + * @generated from field: optional bool reserved = 5; + */ + reserved: boolean; + + /** + * If true, indicates that the extension must be defined as repeated. + * Otherwise the extension must be defined as optional. + * + * @generated from field: optional bool repeated = 6; + */ + repeated: boolean; +}; + +// Describes the message google.protobuf.ExtensionRangeOptions.Declaration. Use `create(ExtensionRangeOptions_DeclarationDesc)` to create a new ExtensionRangeOptions_Declaration. +export declare const ExtensionRangeOptions_DeclarationDesc: TypedDescMessage; + +/** + * The verification state of the extension range. + * + * @generated from enum google.protobuf.ExtensionRangeOptions.VerificationState + */ +export enum ExtensionRangeOptions_VerificationState { + /** + * All the extensions of the range must be declared. + * + * @generated from enum value: DECLARATION = 0; + */ + DECLARATION = 0, + + /** + * @generated from enum value: UNVERIFIED = 1; + */ + UNVERIFIED = 1, +} + +// Describes the enum google.protobuf.ExtensionRangeOptions.VerificationState. +export declare const ExtensionRangeOptions_VerificationStateDesc: TypedDescEnum; + +/** + * Describes a field within a message. + * + * @generated from message google.protobuf.FieldDescriptorProto + */ +export declare type FieldDescriptorProto = Message<"google.protobuf.FieldDescriptorProto"> & { + /** + * @generated from field: optional string name = 1; + */ + name: string; + + /** + * @generated from field: optional int32 number = 3; + */ + number: number; + + /** + * @generated from field: optional google.protobuf.FieldDescriptorProto.Label label = 4; + */ + label: FieldDescriptorProto_Label; + + /** + * If type_name is set, this need not be set. If both this and type_name + * are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. + * + * @generated from field: optional google.protobuf.FieldDescriptorProto.Type type = 5; + */ + type: FieldDescriptorProto_Type; + + /** + * For message and enum types, this is the name of the type. If the name + * starts with a '.', it is fully-qualified. Otherwise, C++-like scoping + * rules are used to find the type (i.e. first the nested types within this + * message are searched, then within the parent, on up to the root + * namespace). + * + * @generated from field: optional string type_name = 6; + */ + typeName: string; + + /** + * For extensions, this is the name of the type being extended. It is + * resolved in the same manner as type_name. + * + * @generated from field: optional string extendee = 2; + */ + extendee: string; + + /** + * For numeric types, contains the original text representation of the value. + * For booleans, "true" or "false". + * For strings, contains the default text contents (not escaped in any way). + * For bytes, contains the C escaped value. All bytes >= 128 are escaped. + * + * @generated from field: optional string default_value = 7; + */ + defaultValue: string; + + /** + * If set, gives the index of a oneof in the containing type's oneof_decl + * list. This field is a member of that oneof. + * + * @generated from field: optional int32 oneof_index = 9; + */ + oneofIndex: number; + + /** + * JSON name of this field. The value is set by protocol compiler. If the + * user has set a "json_name" option on this field, that option's value + * will be used. Otherwise, it's deduced from the field's name by converting + * it to camelCase. + * + * @generated from field: optional string json_name = 10; + */ + jsonName: string; + + /** + * @generated from field: optional google.protobuf.FieldOptions options = 8; + */ + options?: FieldOptions; + + /** + * If true, this is a proto3 "optional". When a proto3 field is optional, it + * tracks presence regardless of field type. + * + * When proto3_optional is true, this field must be belong to a oneof to + * signal to old proto3 clients that presence is tracked for this field. This + * oneof is known as a "synthetic" oneof, and this field must be its sole + * member (each proto3 optional field gets its own synthetic oneof). Synthetic + * oneofs exist in the descriptor only, and do not generate any API. Synthetic + * oneofs must be ordered after all "real" oneofs. + * + * For message fields, proto3_optional doesn't create any semantic change, + * since non-repeated message fields always track presence. However it still + * indicates the semantic detail of whether the user wrote "optional" or not. + * This can be useful for round-tripping the .proto file. For consistency we + * give message fields a synthetic oneof also, even though it is not required + * to track presence. This is especially important because the parser can't + * tell if a field is a message or an enum, so it must always create a + * synthetic oneof. + * + * Proto2 optional fields do not set this flag, because they already indicate + * optional with `LABEL_OPTIONAL`. + * + * @generated from field: optional bool proto3_optional = 17; + */ + proto3Optional: boolean; +}; + +// Describes the message google.protobuf.FieldDescriptorProto. Use `create(FieldDescriptorProtoDesc)` to create a new FieldDescriptorProto. +export declare const FieldDescriptorProtoDesc: TypedDescMessage; + +/** + * @generated from enum google.protobuf.FieldDescriptorProto.Type + */ +export enum FieldDescriptorProto_Type { + /** + * 0 is reserved for errors. + * Order is weird for historical reasons. + * + * @generated from enum value: TYPE_DOUBLE = 1; + */ + DOUBLE = 1, + + /** + * @generated from enum value: TYPE_FLOAT = 2; + */ + FLOAT = 2, + + /** + * Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if + * negative values are likely. + * + * @generated from enum value: TYPE_INT64 = 3; + */ + INT64 = 3, + + /** + * @generated from enum value: TYPE_UINT64 = 4; + */ + UINT64 = 4, + + /** + * Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if + * negative values are likely. + * + * @generated from enum value: TYPE_INT32 = 5; + */ + INT32 = 5, + + /** + * @generated from enum value: TYPE_FIXED64 = 6; + */ + FIXED64 = 6, + + /** + * @generated from enum value: TYPE_FIXED32 = 7; + */ + FIXED32 = 7, + + /** + * @generated from enum value: TYPE_BOOL = 8; + */ + BOOL = 8, + + /** + * @generated from enum value: TYPE_STRING = 9; + */ + STRING = 9, + + /** + * Tag-delimited aggregate. + * Group type is deprecated and not supported after google.protobuf. However, Proto3 + * implementations should still be able to parse the group wire format and + * treat group fields as unknown fields. In Editions, the group wire format + * can be enabled via the `message_encoding` feature. + * + * @generated from enum value: TYPE_GROUP = 10; + */ + GROUP = 10, + + /** + * Length-delimited aggregate. + * + * @generated from enum value: TYPE_MESSAGE = 11; + */ + MESSAGE = 11, + + /** + * New in version 2. + * + * @generated from enum value: TYPE_BYTES = 12; + */ + BYTES = 12, + + /** + * @generated from enum value: TYPE_UINT32 = 13; + */ + UINT32 = 13, + + /** + * @generated from enum value: TYPE_ENUM = 14; + */ + ENUM = 14, + + /** + * @generated from enum value: TYPE_SFIXED32 = 15; + */ + SFIXED32 = 15, + + /** + * @generated from enum value: TYPE_SFIXED64 = 16; + */ + SFIXED64 = 16, + + /** + * Uses ZigZag encoding. + * + * @generated from enum value: TYPE_SINT32 = 17; + */ + SINT32 = 17, + + /** + * Uses ZigZag encoding. + * + * @generated from enum value: TYPE_SINT64 = 18; + */ + SINT64 = 18, +} + +// Describes the enum google.protobuf.FieldDescriptorProto.Type. +export declare const FieldDescriptorProto_TypeDesc: TypedDescEnum; + +/** + * @generated from enum google.protobuf.FieldDescriptorProto.Label + */ +export enum FieldDescriptorProto_Label { + /** + * 0 is reserved for errors + * + * @generated from enum value: LABEL_OPTIONAL = 1; + */ + OPTIONAL = 1, + + /** + * @generated from enum value: LABEL_REPEATED = 3; + */ + REPEATED = 3, + + /** + * 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. + * + * @generated from enum value: LABEL_REQUIRED = 2; + */ + REQUIRED = 2, +} + +// Describes the enum google.protobuf.FieldDescriptorProto.Label. +export declare const FieldDescriptorProto_LabelDesc: TypedDescEnum; + +/** + * Describes a oneof. + * + * @generated from message google.protobuf.OneofDescriptorProto + */ +export declare type OneofDescriptorProto = Message<"google.protobuf.OneofDescriptorProto"> & { + /** + * @generated from field: optional string name = 1; + */ + name: string; + + /** + * @generated from field: optional google.protobuf.OneofOptions options = 2; + */ + options?: OneofOptions; +}; + +// Describes the message google.protobuf.OneofDescriptorProto. Use `create(OneofDescriptorProtoDesc)` to create a new OneofDescriptorProto. +export declare const OneofDescriptorProtoDesc: TypedDescMessage; + +/** + * Describes an enum type. + * + * @generated from message google.protobuf.EnumDescriptorProto + */ +export declare type EnumDescriptorProto = Message<"google.protobuf.EnumDescriptorProto"> & { + /** + * @generated from field: optional string name = 1; + */ + name: string; + + /** + * @generated from field: repeated google.protobuf.EnumValueDescriptorProto value = 2; + */ + value: EnumValueDescriptorProto[]; + + /** + * @generated from field: optional google.protobuf.EnumOptions options = 3; + */ + options?: EnumOptions; + + /** + * Range of reserved numeric values. Reserved numeric values may not be used + * by enum values in the same enum declaration. Reserved ranges may not + * overlap. + * + * @generated from field: repeated google.protobuf.EnumDescriptorProto.EnumReservedRange reserved_range = 4; + */ + reservedRange: EnumDescriptorProto_EnumReservedRange[]; + + /** + * Reserved enum value names, which may not be reused. A given name may only + * be reserved once. + * + * @generated from field: repeated string reserved_name = 5; + */ + reservedName: string[]; +}; + +// Describes the message google.protobuf.EnumDescriptorProto. Use `create(EnumDescriptorProtoDesc)` to create a new EnumDescriptorProto. +export declare const EnumDescriptorProtoDesc: TypedDescMessage; + +/** + * Range of reserved numeric values. Reserved values may not be used by + * entries in the same enum. Reserved ranges may not overlap. + * + * Note that this is distinct from DescriptorProto.ReservedRange in that it + * is inclusive such that it can appropriately represent the entire int32 + * domain. + * + * @generated from message google.protobuf.EnumDescriptorProto.EnumReservedRange + */ +export declare type EnumDescriptorProto_EnumReservedRange = Message<"google.protobuf.EnumDescriptorProto.EnumReservedRange"> & { + /** + * Inclusive. + * + * @generated from field: optional int32 start = 1; + */ + start: number; + + /** + * Inclusive. + * + * @generated from field: optional int32 end = 2; + */ + end: number; +}; + +// Describes the message google.protobuf.EnumDescriptorProto.EnumReservedRange. Use `create(EnumDescriptorProto_EnumReservedRangeDesc)` to create a new EnumDescriptorProto_EnumReservedRange. +export declare const EnumDescriptorProto_EnumReservedRangeDesc: TypedDescMessage; + +/** + * Describes a value within an enum. + * + * @generated from message google.protobuf.EnumValueDescriptorProto + */ +export declare type EnumValueDescriptorProto = Message<"google.protobuf.EnumValueDescriptorProto"> & { + /** + * @generated from field: optional string name = 1; + */ + name: string; + + /** + * @generated from field: optional int32 number = 2; + */ + number: number; + + /** + * @generated from field: optional google.protobuf.EnumValueOptions options = 3; + */ + options?: EnumValueOptions; +}; + +// Describes the message google.protobuf.EnumValueDescriptorProto. Use `create(EnumValueDescriptorProtoDesc)` to create a new EnumValueDescriptorProto. +export declare const EnumValueDescriptorProtoDesc: TypedDescMessage; + +/** + * Describes a service. + * + * @generated from message google.protobuf.ServiceDescriptorProto + */ +export declare type ServiceDescriptorProto = Message<"google.protobuf.ServiceDescriptorProto"> & { + /** + * @generated from field: optional string name = 1; + */ + name: string; + + /** + * @generated from field: repeated google.protobuf.MethodDescriptorProto method = 2; + */ + method: MethodDescriptorProto[]; + + /** + * @generated from field: optional google.protobuf.ServiceOptions options = 3; + */ + options?: ServiceOptions; +}; + +// Describes the message google.protobuf.ServiceDescriptorProto. Use `create(ServiceDescriptorProtoDesc)` to create a new ServiceDescriptorProto. +export declare const ServiceDescriptorProtoDesc: TypedDescMessage; + +/** + * Describes a method of a service. + * + * @generated from message google.protobuf.MethodDescriptorProto + */ +export declare type MethodDescriptorProto = Message<"google.protobuf.MethodDescriptorProto"> & { + /** + * @generated from field: optional string name = 1; + */ + name: string; + + /** + * Input and output type names. These are resolved in the same way as + * FieldDescriptorProto.type_name, but must refer to a message type. + * + * @generated from field: optional string input_type = 2; + */ + inputType: string; + + /** + * @generated from field: optional string output_type = 3; + */ + outputType: string; + + /** + * @generated from field: optional google.protobuf.MethodOptions options = 4; + */ + options?: MethodOptions; + + /** + * Identifies if client streams multiple client messages + * + * @generated from field: optional bool client_streaming = 5 [default = false]; + */ + clientStreaming: boolean; + + /** + * Identifies if server streams multiple server messages + * + * @generated from field: optional bool server_streaming = 6 [default = false]; + */ + serverStreaming: boolean; +}; + +// Describes the message google.protobuf.MethodDescriptorProto. Use `create(MethodDescriptorProtoDesc)` to create a new MethodDescriptorProto. +export declare const MethodDescriptorProtoDesc: TypedDescMessage; + +/** + * @generated from message google.protobuf.FileOptions + */ +export declare type FileOptions = Message<"google.protobuf.FileOptions"> & { + /** + * Sets the Java package where classes generated from this .proto will be + * placed. By default, the proto package is used, but this is often + * inappropriate because proto packages do not normally start with backwards + * domain names. + * + * @generated from field: optional string java_package = 1; + */ + javaPackage: string; + + /** + * Controls the name of the wrapper Java class generated for the .proto file. + * That class will always contain the .proto file's getDescriptor() method as + * well as any top-level extensions defined in the .proto file. + * If java_multiple_files is disabled, then all the other classes from the + * .proto file will be nested inside the single wrapper outer class. + * + * @generated from field: optional string java_outer_classname = 8; + */ + javaOuterClassname: string; + + /** + * If enabled, then the Java code generator will generate a separate .java + * file for each top-level message, enum, and service defined in the .proto + * file. Thus, these types will *not* be nested inside the wrapper class + * named by java_outer_classname. However, the wrapper class will still be + * generated to contain the file's getDescriptor() method as well as any + * top-level extensions defined in the file. + * + * @generated from field: optional bool java_multiple_files = 10 [default = false]; + */ + javaMultipleFiles: boolean; + + /** + * This option does nothing. + * + * @generated from field: optional bool java_generate_equals_and_hash = 20 [deprecated = true]; + * @deprecated + */ + javaGenerateEqualsAndHash: boolean; + + /** + * If set true, then the Java2 code generator will generate code that + * throws an exception whenever an attempt is made to assign a non-UTF-8 + * byte sequence to a string field. + * Message reflection will do the same. + * However, an extension field still accepts non-UTF-8 byte sequences. + * This option has no effect on when used with the lite runtime. + * + * @generated from field: optional bool java_string_check_utf8 = 27 [default = false]; + */ + javaStringCheckUtf8: boolean; + + /** + * @generated from field: optional google.protobuf.FileOptions.OptimizeMode optimize_for = 9 [default = SPEED]; + */ + optimizeFor: FileOptions_OptimizeMode; + + /** + * Sets the Go package where structs generated from this .proto will be + * placed. If omitted, the Go package will be derived from the following: + * - The basename of the package import path, if provided. + * - Otherwise, the package statement in the .proto file, if present. + * - Otherwise, the basename of the .proto file, without extension. + * + * @generated from field: optional string go_package = 11; + */ + goPackage: string; + + /** + * Should generic services be generated in each language? "Generic" services + * are not specific to any particular RPC system. They are generated by the + * main code generators in each language (without additional plugins). + * Generic services were the only kind of service generation supported by + * early versions of google.protobuf. + * + * Generic services are now considered deprecated in favor of using plugins + * that generate code specific to your particular RPC system. Therefore, + * these default to false. Old code which depends on generic services should + * explicitly set them to true. + * + * @generated from field: optional bool cc_generic_services = 16 [default = false]; + */ + ccGenericServices: boolean; + + /** + * @generated from field: optional bool java_generic_services = 17 [default = false]; + */ + javaGenericServices: boolean; + + /** + * @generated from field: optional bool py_generic_services = 18 [default = false]; + */ + pyGenericServices: boolean; + + /** + * @generated from field: optional bool php_generic_services = 42 [default = false]; + */ + phpGenericServices: boolean; + + /** + * Is this file deprecated? + * Depending on the target platform, this can emit Deprecated annotations + * for everything in the file, or it will be completely ignored; in the very + * least, this is a formalization for deprecating files. + * + * @generated from field: optional bool deprecated = 23 [default = false]; + */ + deprecated: boolean; + + /** + * Enables the use of arenas for the proto messages in this file. This applies + * only to generated classes for C++. + * + * @generated from field: optional bool cc_enable_arenas = 31 [default = true]; + */ + ccEnableArenas: boolean; + + /** + * Sets the objective c class prefix which is prepended to all objective c + * generated classes from this .proto. There is no default. + * + * @generated from field: optional string objc_class_prefix = 36; + */ + objcClassPrefix: string; + + /** + * Namespace for generated classes; defaults to the package. + * + * @generated from field: optional string csharp_namespace = 37; + */ + csharpNamespace: string; + + /** + * By default Swift generators will take the proto package and CamelCase it + * replacing '.' with underscore and use that to prefix the types/symbols + * defined. When this options is provided, they will use this value instead + * to prefix the types/symbols defined. + * + * @generated from field: optional string swift_prefix = 39; + */ + swiftPrefix: string; + + /** + * Sets the php class prefix which is prepended to all php generated classes + * from this .proto. Default is empty. + * + * @generated from field: optional string php_class_prefix = 40; + */ + phpClassPrefix: string; + + /** + * Use this option to change the namespace of php generated classes. Default + * is empty. When this option is empty, the package name will be used for + * determining the namespace. + * + * @generated from field: optional string php_namespace = 41; + */ + phpNamespace: string; + + /** + * Use this option to change the namespace of php generated metadata classes. + * Default is empty. When this option is empty, the proto file name will be + * used for determining the namespace. + * + * @generated from field: optional string php_metadata_namespace = 44; + */ + phpMetadataNamespace: string; + + /** + * Use this option to change the package of ruby generated classes. Default + * is empty. When this option is not set, the package name will be used for + * determining the ruby package. + * + * @generated from field: optional string ruby_package = 45; + */ + rubyPackage: string; + + /** + * Any features defined in the specific edition. + * + * @generated from field: optional google.protobuf.FeatureSet features = 50; + */ + features?: FeatureSet; + + /** + * The parser stores options it doesn't recognize here. + * See the documentation for the "Options" section above. + * + * @generated from field: repeated google.protobuf.UninterpretedOption uninterpreted_option = 999; + */ + uninterpretedOption: UninterpretedOption[]; +}; + +// Describes the message google.protobuf.FileOptions. Use `create(FileOptionsDesc)` to create a new FileOptions. +export declare const FileOptionsDesc: TypedDescMessage; + +/** + * Generated classes can be optimized for speed or code size. + * + * @generated from enum google.protobuf.FileOptions.OptimizeMode + */ +export enum FileOptions_OptimizeMode { + /** + * Generate complete code for parsing, serialization, + * + * @generated from enum value: SPEED = 1; + */ + SPEED = 1, + + /** + * etc. + * + * Use ReflectionOps to implement these methods. + * + * @generated from enum value: CODE_SIZE = 2; + */ + CODE_SIZE = 2, + + /** + * Generate code using MessageLite and the lite runtime. + * + * @generated from enum value: LITE_RUNTIME = 3; + */ + LITE_RUNTIME = 3, +} + +// Describes the enum google.protobuf.FileOptions.OptimizeMode. +export declare const FileOptions_OptimizeModeDesc: TypedDescEnum; + +/** + * @generated from message google.protobuf.MessageOptions + */ +export declare type MessageOptions = Message<"google.protobuf.MessageOptions"> & { + /** + * Set true to use the old proto1 MessageSet wire format for extensions. + * This is provided for backwards-compatibility with the MessageSet wire + * format. You should not use this for any other reason: It's less + * efficient, has fewer features, and is more complicated. + * + * The message must be defined exactly as follows: + * message Foo { + * option message_set_wire_format = true; + * extensions 4 to max; + * } + * Note that the message cannot have any defined fields; MessageSets only + * have extensions. + * + * All extensions of your type must be singular messages; e.g. they cannot + * be int32s, enums, or repeated messages. + * + * Because this is an option, the above two restrictions are not enforced by + * the protocol compiler. + * + * @generated from field: optional bool message_set_wire_format = 1 [default = false]; + */ + messageSetWireFormat: boolean; + + /** + * Disables the generation of the standard "descriptor()" accessor, which can + * conflict with a field of the same name. This is meant to make migration + * from proto1 easier; new code should avoid fields named "descriptor". + * + * @generated from field: optional bool no_standard_descriptor_accessor = 2 [default = false]; + */ + noStandardDescriptorAccessor: boolean; + + /** + * Is this message deprecated? + * Depending on the target platform, this can emit Deprecated annotations + * for the message, or it will be completely ignored; in the very least, + * this is a formalization for deprecating messages. + * + * @generated from field: optional bool deprecated = 3 [default = false]; + */ + deprecated: boolean; + + /** + * NOTE: Do not set the option in .proto files. Always use the maps syntax + * instead. The option should only be implicitly set by the proto compiler + * parser. + * + * Whether the message is an automatically generated map entry type for the + * maps field. + * + * For maps fields: + * map map_field = 1; + * The parsed descriptor looks like: + * message MapFieldEntry { + * option map_entry = true; + * optional KeyType key = 1; + * optional ValueType value = 2; + * } + * repeated MapFieldEntry map_field = 1; + * + * Implementations may choose not to generate the map_entry=true message, but + * use a native map in the target language to hold the keys and values. + * The reflection APIs in such implementations still need to work as + * if the field is a repeated message field. + * + * @generated from field: optional bool map_entry = 7; + */ + mapEntry: boolean; + + /** + * Enable the legacy handling of JSON field name conflicts. This lowercases + * 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. + * + * 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 + * teams have had time to migrate. + * + * @generated from field: optional bool deprecated_legacy_json_field_conflicts = 11 [deprecated = true]; + * @deprecated + */ + deprecatedLegacyJsonFieldConflicts: boolean; + + /** + * Any features defined in the specific edition. + * + * @generated from field: optional google.protobuf.FeatureSet features = 12; + */ + features?: FeatureSet; + + /** + * The parser stores options it doesn't recognize here. See above. + * + * @generated from field: repeated google.protobuf.UninterpretedOption uninterpreted_option = 999; + */ + uninterpretedOption: UninterpretedOption[]; +}; + +// Describes the message google.protobuf.MessageOptions. Use `create(MessageOptionsDesc)` to create a new MessageOptions. +export declare const MessageOptionsDesc: TypedDescMessage; + +/** + * @generated from message google.protobuf.FieldOptions + */ +export declare type FieldOptions = Message<"google.protobuf.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! + * + * @generated from field: optional google.protobuf.FieldOptions.CType ctype = 1 [default = STRING]; + */ + ctype: FieldOptions_CType; + + /** + * The packed option can be enabled for repeated primitive fields to enable + * 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. + * + * @generated from field: optional bool packed = 2; + */ + packed: boolean; + + /** + * The jstype option determines the JavaScript type used for values of the + * field. The option is permitted only for 64 bit integral and fixed types + * (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING + * is represented as JavaScript string, which avoids loss of precision that + * can happen when a large value is converted to a floating point JavaScript. + * Specifying JS_NUMBER for the jstype causes the generated JavaScript code to + * use the JavaScript "number" type. The behavior of the default option + * JS_NORMAL is implementation dependent. + * + * This option is an enum to permit additional types to be added, e.g. + * goog.math.Integer. + * + * @generated from field: optional google.protobuf.FieldOptions.JSType jstype = 6 [default = JS_NORMAL]; + */ + jstype: FieldOptions_JSType; + + /** + * Should this field be parsed lazily? Lazy applies only to message-type + * fields. It means that when the outer message is initially parsed, the + * inner message's contents will not be parsed but instead stored in encoded + * form. The inner message will actually be parsed when it is first accessed. + * + * This is only a hint. Implementations are free to choose whether to use + * eager or lazy parsing regardless of the value of this option. However, + * setting this option true suggests that the protocol author believes that + * using lazy parsing on this field is worth the additional bookkeeping + * overhead typically needed to implement it. + * + * This option does not affect the public interface of any generated code; + * all method signatures remain the same. Furthermore, thread-safety of the + * interface is not affected by this option; const methods remain safe to + * call from multiple threads concurrently, while non-const methods continue + * to require exclusive access. + * + * Note that implementations may choose not to check required fields within + * a lazy sub-message. That is, calling IsInitialized() on the outer message + * may return true even if the inner message has missing required fields. + * This is necessary because otherwise the inner message would have to be + * parsed in order to perform the check, defeating the purpose of lazy + * parsing. An implementation which chooses not to check required fields + * must be consistent about it. That is, for any particular sub-message, the + * implementation must either *always* check its required fields, or *never* + * check its required fields, regardless of whether or not the message has + * been parsed. + * + * As of May 2022, lazy verifies the contents of the byte stream during + * parsing. An invalid byte stream will cause the overall parsing to fail. + * + * @generated from field: optional bool lazy = 5 [default = false]; + */ + lazy: boolean; + + /** + * unverified_lazy does no correctness checks on the byte stream. This should + * only be used where lazy with verification is prohibitive for performance + * reasons. + * + * @generated from field: optional bool unverified_lazy = 15 [default = false]; + */ + unverifiedLazy: boolean; + + /** + * Is this field deprecated? + * Depending on the target platform, this can emit Deprecated annotations + * for accessors, or it will be completely ignored; in the very least, this + * is a formalization for deprecating fields. + * + * @generated from field: optional bool deprecated = 3 [default = false]; + */ + deprecated: boolean; + + /** + * For Google-internal migration only. Do not use. + * + * @generated from field: optional bool weak = 10 [default = false]; + */ + weak: boolean; + + /** + * Indicate that the field value should not be printed out when using debug + * formats, e.g. when the field contains sensitive credentials. + * + * @generated from field: optional bool debug_redact = 16 [default = false]; + */ + debugRedact: boolean; + + /** + * @generated from field: optional google.protobuf.FieldOptions.OptionRetention retention = 17; + */ + retention: FieldOptions_OptionRetention; + + /** + * @generated from field: repeated google.protobuf.FieldOptions.OptionTargetType targets = 19; + */ + targets: FieldOptions_OptionTargetType[]; + + /** + * @generated from field: repeated google.protobuf.FieldOptions.EditionDefault edition_defaults = 20; + */ + editionDefaults: FieldOptions_EditionDefault[]; + + /** + * Any features defined in the specific edition. + * + * @generated from field: optional google.protobuf.FeatureSet features = 21; + */ + features?: FeatureSet; + + /** + * The parser stores options it doesn't recognize here. See above. + * + * @generated from field: repeated google.protobuf.UninterpretedOption uninterpreted_option = 999; + */ + uninterpretedOption: UninterpretedOption[]; +}; + +// Describes the message google.protobuf.FieldOptions. Use `create(FieldOptionsDesc)` to create a new FieldOptions. +export declare const FieldOptionsDesc: TypedDescMessage; + +/** + * @generated from message google.protobuf.FieldOptions.EditionDefault + */ +export declare type FieldOptions_EditionDefault = Message<"google.protobuf.FieldOptions.EditionDefault"> & { + /** + * @generated from field: optional google.protobuf.Edition edition = 3; + */ + edition: Edition; + + /** + * Textproto value. + * + * @generated from field: optional string value = 2; + */ + value: string; +}; + +// Describes the message google.protobuf.FieldOptions.EditionDefault. Use `create(FieldOptions_EditionDefaultDesc)` to create a new FieldOptions_EditionDefault. +export declare const FieldOptions_EditionDefaultDesc: TypedDescMessage; + +/** + * @generated from enum google.protobuf.FieldOptions.CType + */ +export enum FieldOptions_CType { + /** + * Default mode. + * + * @generated from enum value: STRING = 0; + */ + STRING = 0, + + /** + * 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. + * + * @generated from enum value: CORD = 1; + */ + CORD = 1, + + /** + * @generated from enum value: STRING_PIECE = 2; + */ + STRING_PIECE = 2, +} + +// Describes the enum google.protobuf.FieldOptions.CType. +export declare const FieldOptions_CTypeDesc: TypedDescEnum; + +/** + * @generated from enum google.protobuf.FieldOptions.JSType + */ +export enum FieldOptions_JSType { + /** + * Use the default type. + * + * @generated from enum value: JS_NORMAL = 0; + */ + JS_NORMAL = 0, + + /** + * Use JavaScript strings. + * + * @generated from enum value: JS_STRING = 1; + */ + JS_STRING = 1, + + /** + * Use JavaScript numbers. + * + * @generated from enum value: JS_NUMBER = 2; + */ + JS_NUMBER = 2, +} + +// Describes the enum google.protobuf.FieldOptions.JSType. +export declare const FieldOptions_JSTypeDesc: TypedDescEnum; + +/** + * 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). + * + * @generated from enum google.protobuf.FieldOptions.OptionRetention + */ +export enum FieldOptions_OptionRetention { + /** + * @generated from enum value: RETENTION_UNKNOWN = 0; + */ + RETENTION_UNKNOWN = 0, + + /** + * @generated from enum value: RETENTION_RUNTIME = 1; + */ + RETENTION_RUNTIME = 1, + + /** + * @generated from enum value: RETENTION_SOURCE = 2; + */ + RETENTION_SOURCE = 2, +} + +// Describes the enum google.protobuf.FieldOptions.OptionRetention. +export declare const FieldOptions_OptionRetentionDesc: TypedDescEnum; + +/** + * 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. Note: as of January 2023, support for this is + * in progress and does not yet have an effect (b/264593489). + * + * @generated from enum google.protobuf.FieldOptions.OptionTargetType + */ +export enum FieldOptions_OptionTargetType { + /** + * @generated from enum value: TARGET_TYPE_UNKNOWN = 0; + */ + TARGET_TYPE_UNKNOWN = 0, + + /** + * @generated from enum value: TARGET_TYPE_FILE = 1; + */ + TARGET_TYPE_FILE = 1, + + /** + * @generated from enum value: TARGET_TYPE_EXTENSION_RANGE = 2; + */ + TARGET_TYPE_EXTENSION_RANGE = 2, + + /** + * @generated from enum value: TARGET_TYPE_MESSAGE = 3; + */ + TARGET_TYPE_MESSAGE = 3, + + /** + * @generated from enum value: TARGET_TYPE_FIELD = 4; + */ + TARGET_TYPE_FIELD = 4, + + /** + * @generated from enum value: TARGET_TYPE_ONEOF = 5; + */ + TARGET_TYPE_ONEOF = 5, + + /** + * @generated from enum value: TARGET_TYPE_ENUM = 6; + */ + TARGET_TYPE_ENUM = 6, + + /** + * @generated from enum value: TARGET_TYPE_ENUM_ENTRY = 7; + */ + TARGET_TYPE_ENUM_ENTRY = 7, + + /** + * @generated from enum value: TARGET_TYPE_SERVICE = 8; + */ + TARGET_TYPE_SERVICE = 8, + + /** + * @generated from enum value: TARGET_TYPE_METHOD = 9; + */ + TARGET_TYPE_METHOD = 9, +} + +// Describes the enum google.protobuf.FieldOptions.OptionTargetType. +export declare const FieldOptions_OptionTargetTypeDesc: TypedDescEnum; + +/** + * @generated from message google.protobuf.OneofOptions + */ +export declare type OneofOptions = Message<"google.protobuf.OneofOptions"> & { + /** + * Any features defined in the specific edition. + * + * @generated from field: optional google.protobuf.FeatureSet features = 1; + */ + features?: FeatureSet; + + /** + * The parser stores options it doesn't recognize here. See above. + * + * @generated from field: repeated google.protobuf.UninterpretedOption uninterpreted_option = 999; + */ + uninterpretedOption: UninterpretedOption[]; +}; + +// Describes the message google.protobuf.OneofOptions. Use `create(OneofOptionsDesc)` to create a new OneofOptions. +export declare const OneofOptionsDesc: TypedDescMessage; + +/** + * @generated from message google.protobuf.EnumOptions + */ +export declare type EnumOptions = Message<"google.protobuf.EnumOptions"> & { + /** + * Set this option to true to allow mapping different tag names to the same + * value. + * + * @generated from field: optional bool allow_alias = 2; + */ + allowAlias: boolean; + + /** + * Is this enum deprecated? + * Depending on the target platform, this can emit Deprecated annotations + * for the enum, or it will be completely ignored; in the very least, this + * is a formalization for deprecating enums. + * + * @generated from field: optional bool deprecated = 3 [default = false]; + */ + deprecated: boolean; + + /** + * Enable the legacy handling of JSON field name conflicts. This lowercases + * 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 + * had time to migrate. + * + * @generated from field: optional bool deprecated_legacy_json_field_conflicts = 6 [deprecated = true]; + * @deprecated + */ + deprecatedLegacyJsonFieldConflicts: boolean; + + /** + * Any features defined in the specific edition. + * + * @generated from field: optional google.protobuf.FeatureSet features = 7; + */ + features?: FeatureSet; + + /** + * The parser stores options it doesn't recognize here. See above. + * + * @generated from field: repeated google.protobuf.UninterpretedOption uninterpreted_option = 999; + */ + uninterpretedOption: UninterpretedOption[]; +}; + +// Describes the message google.protobuf.EnumOptions. Use `create(EnumOptionsDesc)` to create a new EnumOptions. +export declare const EnumOptionsDesc: TypedDescMessage; + +/** + * @generated from message google.protobuf.EnumValueOptions + */ +export declare type EnumValueOptions = Message<"google.protobuf.EnumValueOptions"> & { + /** + * Is this enum value deprecated? + * Depending on the target platform, this can emit Deprecated annotations + * for the enum value, or it will be completely ignored; in the very least, + * this is a formalization for deprecating enum values. + * + * @generated from field: optional bool deprecated = 1 [default = false]; + */ + deprecated: boolean; + + /** + * Any features defined in the specific edition. + * + * @generated from field: optional google.protobuf.FeatureSet features = 2; + */ + features?: FeatureSet; + + /** + * 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. + * + * @generated from field: optional bool debug_redact = 3 [default = false]; + */ + debugRedact: boolean; + + /** + * The parser stores options it doesn't recognize here. See above. + * + * @generated from field: repeated google.protobuf.UninterpretedOption uninterpreted_option = 999; + */ + uninterpretedOption: UninterpretedOption[]; +}; + +// Describes the message google.protobuf.EnumValueOptions. Use `create(EnumValueOptionsDesc)` to create a new EnumValueOptions. +export declare const EnumValueOptionsDesc: TypedDescMessage; + +/** + * @generated from message google.protobuf.ServiceOptions + */ +export declare type ServiceOptions = Message<"google.protobuf.ServiceOptions"> & { + /** + * Any features defined in the specific edition. + * + * @generated from field: optional google.protobuf.FeatureSet features = 34; + */ + features?: FeatureSet; + + /** + * Is this service deprecated? + * Depending on the target platform, this can emit Deprecated annotations + * for the service, or it will be completely ignored; in the very least, + * this is a formalization for deprecating services. + * + * @generated from field: optional bool deprecated = 33 [default = false]; + */ + deprecated: boolean; + + /** + * The parser stores options it doesn't recognize here. See above. + * + * @generated from field: repeated google.protobuf.UninterpretedOption uninterpreted_option = 999; + */ + uninterpretedOption: UninterpretedOption[]; +}; + +// Describes the message google.protobuf.ServiceOptions. Use `create(ServiceOptionsDesc)` to create a new ServiceOptions. +export declare const ServiceOptionsDesc: TypedDescMessage; + +/** + * @generated from message google.protobuf.MethodOptions + */ +export declare type MethodOptions = Message<"google.protobuf.MethodOptions"> & { + /** + * Is this method deprecated? + * Depending on the target platform, this can emit Deprecated annotations + * for the method, or it will be completely ignored; in the very least, + * this is a formalization for deprecating methods. + * + * @generated from field: optional bool deprecated = 33 [default = false]; + */ + deprecated: boolean; + + /** + * @generated from field: optional google.protobuf.MethodOptions.IdempotencyLevel idempotency_level = 34 [default = IDEMPOTENCY_UNKNOWN]; + */ + idempotencyLevel: MethodOptions_IdempotencyLevel; + + /** + * Any features defined in the specific edition. + * + * @generated from field: optional google.protobuf.FeatureSet features = 35; + */ + features?: FeatureSet; + + /** + * The parser stores options it doesn't recognize here. See above. + * + * @generated from field: repeated google.protobuf.UninterpretedOption uninterpreted_option = 999; + */ + uninterpretedOption: UninterpretedOption[]; +}; + +// Describes the message google.protobuf.MethodOptions. Use `create(MethodOptionsDesc)` to create a new MethodOptions. +export declare const MethodOptionsDesc: TypedDescMessage; + +/** + * Is this method side-effect-free (or safe in HTTP parlance), or idempotent, + * or neither? HTTP based RPC implementation may choose GET verb for safe + * methods, and PUT verb for idempotent methods instead of the default POST. + * + * @generated from enum google.protobuf.MethodOptions.IdempotencyLevel + */ +export enum MethodOptions_IdempotencyLevel { + /** + * @generated from enum value: IDEMPOTENCY_UNKNOWN = 0; + */ + IDEMPOTENCY_UNKNOWN = 0, + + /** + * implies idempotent + * + * @generated from enum value: NO_SIDE_EFFECTS = 1; + */ + NO_SIDE_EFFECTS = 1, + + /** + * idempotent, but may have side effects + * + * @generated from enum value: IDEMPOTENT = 2; + */ + IDEMPOTENT = 2, +} + +// Describes the enum google.protobuf.MethodOptions.IdempotencyLevel. +export declare const MethodOptions_IdempotencyLevelDesc: TypedDescEnum; + +/** + * A message representing a option the parser does not recognize. This only + * appears in options protos created by the compiler::Parser class. + * DescriptorPool resolves these when building Descriptor objects. Therefore, + * options protos in descriptor objects (e.g. returned by Descriptor::options(), + * or produced by Descriptor::CopyTo()) will never have UninterpretedOptions + * in them. + * + * @generated from message google.protobuf.UninterpretedOption + */ +export declare type UninterpretedOption = Message<"google.protobuf.UninterpretedOption"> & { + /** + * @generated from field: repeated google.protobuf.UninterpretedOption.NamePart name = 2; + */ + name: UninterpretedOption_NamePart[]; + + /** + * The value of the uninterpreted option, in whatever type the tokenizer + * identified it as during parsing. Exactly one of these should be set. + * + * @generated from field: optional string identifier_value = 3; + */ + identifierValue: string; + + /** + * @generated from field: optional uint64 positive_int_value = 4; + */ + positiveIntValue: bigint; + + /** + * @generated from field: optional int64 negative_int_value = 5; + */ + negativeIntValue: bigint; + + /** + * @generated from field: optional double double_value = 6; + */ + doubleValue: number; + + /** + * @generated from field: optional bytes string_value = 7; + */ + stringValue: Uint8Array; + + /** + * @generated from field: optional string aggregate_value = 8; + */ + aggregateValue: string; +}; + +// Describes the message google.protobuf.UninterpretedOption. Use `create(UninterpretedOptionDesc)` to create a new UninterpretedOption. +export declare const UninterpretedOptionDesc: TypedDescMessage; + +/** + * The name of the uninterpreted option. Each string represents a segment in + * a dot-separated name. is_extension is true iff a segment represents an + * extension (denoted with parentheses in options specs in .proto files). + * E.g.,{ ["foo", false], ["bar.baz", true], ["moo", false] } represents + * "foo.(bar.baz).moo". + * + * @generated from message google.protobuf.UninterpretedOption.NamePart + */ +export declare type UninterpretedOption_NamePart = Message<"google.protobuf.UninterpretedOption.NamePart"> & { + /** + * @generated from field: required string name_part = 1; + */ + namePart: string; + + /** + * @generated from field: required bool is_extension = 2; + */ + isExtension: boolean; +}; + +// Describes the message google.protobuf.UninterpretedOption.NamePart. Use `create(UninterpretedOption_NamePartDesc)` to create a new UninterpretedOption_NamePart. +export declare const UninterpretedOption_NamePartDesc: TypedDescMessage; + +/** + * 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. + * + * @generated from message google.protobuf.FeatureSet + */ +export declare type FeatureSet = Message<"google.protobuf.FeatureSet"> & { + /** + * @generated from field: optional google.protobuf.FeatureSet.FieldPresence field_presence = 1; + */ + fieldPresence: FeatureSet_FieldPresence; + + /** + * @generated from field: optional google.protobuf.FeatureSet.EnumType enum_type = 2; + */ + enumType: FeatureSet_EnumType; + + /** + * @generated from field: optional google.protobuf.FeatureSet.RepeatedFieldEncoding repeated_field_encoding = 3; + */ + repeatedFieldEncoding: FeatureSet_RepeatedFieldEncoding; + + /** + * @generated from field: optional google.protobuf.FeatureSet.Utf8Validation utf8_validation = 4; + */ + utf8Validation: FeatureSet_Utf8Validation; + + /** + * @generated from field: optional google.protobuf.FeatureSet.MessageEncoding message_encoding = 5; + */ + messageEncoding: FeatureSet_MessageEncoding; + + /** + * @generated from field: optional google.protobuf.FeatureSet.JsonFormat json_format = 6; + */ + jsonFormat: FeatureSet_JsonFormat; +}; + +// Describes the message google.protobuf.FeatureSet. Use `create(FeatureSetDesc)` to create a new FeatureSet. +export declare const FeatureSetDesc: TypedDescMessage; + +/** + * @generated from enum google.protobuf.FeatureSet.FieldPresence + */ +export enum FeatureSet_FieldPresence { + /** + * @generated from enum value: FIELD_PRESENCE_UNKNOWN = 0; + */ + FIELD_PRESENCE_UNKNOWN = 0, + + /** + * @generated from enum value: EXPLICIT = 1; + */ + EXPLICIT = 1, + + /** + * @generated from enum value: IMPLICIT = 2; + */ + IMPLICIT = 2, + + /** + * @generated from enum value: LEGACY_REQUIRED = 3; + */ + LEGACY_REQUIRED = 3, +} + +// Describes the enum google.protobuf.FeatureSet.FieldPresence. +export declare const FeatureSet_FieldPresenceDesc: TypedDescEnum; + +/** + * @generated from enum google.protobuf.FeatureSet.EnumType + */ +export enum FeatureSet_EnumType { + /** + * @generated from enum value: ENUM_TYPE_UNKNOWN = 0; + */ + ENUM_TYPE_UNKNOWN = 0, + + /** + * @generated from enum value: OPEN = 1; + */ + OPEN = 1, + + /** + * @generated from enum value: CLOSED = 2; + */ + CLOSED = 2, +} + +// Describes the enum google.protobuf.FeatureSet.EnumType. +export declare const FeatureSet_EnumTypeDesc: TypedDescEnum; + +/** + * @generated from enum google.protobuf.FeatureSet.RepeatedFieldEncoding + */ +export enum FeatureSet_RepeatedFieldEncoding { + /** + * @generated from enum value: REPEATED_FIELD_ENCODING_UNKNOWN = 0; + */ + REPEATED_FIELD_ENCODING_UNKNOWN = 0, + + /** + * @generated from enum value: PACKED = 1; + */ + PACKED = 1, + + /** + * @generated from enum value: EXPANDED = 2; + */ + EXPANDED = 2, +} + +// Describes the enum google.protobuf.FeatureSet.RepeatedFieldEncoding. +export declare const FeatureSet_RepeatedFieldEncodingDesc: TypedDescEnum; + +/** + * @generated from enum google.protobuf.FeatureSet.Utf8Validation + */ +export enum FeatureSet_Utf8Validation { + /** + * @generated from enum value: UTF8_VALIDATION_UNKNOWN = 0; + */ + UTF8_VALIDATION_UNKNOWN = 0, + + /** + * @generated from enum value: NONE = 1; + */ + NONE = 1, + + /** + * @generated from enum value: VERIFY = 2; + */ + VERIFY = 2, +} + +// Describes the enum google.protobuf.FeatureSet.Utf8Validation. +export declare const FeatureSet_Utf8ValidationDesc: TypedDescEnum; + +/** + * @generated from enum google.protobuf.FeatureSet.MessageEncoding + */ +export enum FeatureSet_MessageEncoding { + /** + * @generated from enum value: MESSAGE_ENCODING_UNKNOWN = 0; + */ + MESSAGE_ENCODING_UNKNOWN = 0, + + /** + * @generated from enum value: LENGTH_PREFIXED = 1; + */ + LENGTH_PREFIXED = 1, + + /** + * @generated from enum value: DELIMITED = 2; + */ + DELIMITED = 2, +} + +// Describes the enum google.protobuf.FeatureSet.MessageEncoding. +export declare const FeatureSet_MessageEncodingDesc: TypedDescEnum; + +/** + * @generated from enum google.protobuf.FeatureSet.JsonFormat + */ +export enum FeatureSet_JsonFormat { + /** + * @generated from enum value: JSON_FORMAT_UNKNOWN = 0; + */ + JSON_FORMAT_UNKNOWN = 0, + + /** + * @generated from enum value: ALLOW = 1; + */ + ALLOW = 1, + + /** + * @generated from enum value: LEGACY_BEST_EFFORT = 2; + */ + LEGACY_BEST_EFFORT = 2, +} + +// Describes the enum google.protobuf.FeatureSet.JsonFormat. +export declare const FeatureSet_JsonFormatDesc: TypedDescEnum; + +/** + * 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. + * + * @generated from message google.protobuf.FeatureSetDefaults + */ +export declare type FeatureSetDefaults = Message<"google.protobuf.FeatureSetDefaults"> & { + /** + * @generated from field: repeated google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault defaults = 1; + */ + defaults: FeatureSetDefaults_FeatureSetEditionDefault[]; + + /** + * The minimum supported edition (inclusive) when this was constructed. + * Editions before this will not have defaults. + * + * @generated from field: optional google.protobuf.Edition minimum_edition = 4; + */ + minimumEdition: Edition; + + /** + * The maximum known edition (inclusive) when this was constructed. Editions + * after this will not have reliable defaults. + * + * @generated from field: optional google.protobuf.Edition maximum_edition = 5; + */ + maximumEdition: Edition; +}; + +// Describes the message google.protobuf.FeatureSetDefaults. Use `create(FeatureSetDefaultsDesc)` to create a new FeatureSetDefaults. +export declare const FeatureSetDefaultsDesc: TypedDescMessage; + +/** + * 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. + * + * @generated from message google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + */ +export declare type FeatureSetDefaults_FeatureSetEditionDefault = Message<"google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault"> & { + /** + * @generated from field: optional google.protobuf.Edition edition = 3; + */ + edition: Edition; + + /** + * @generated from field: optional google.protobuf.FeatureSet features = 2; + */ + features?: FeatureSet; +}; + +// Describes the message google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault. Use `create(FeatureSetDefaults_FeatureSetEditionDefaultDesc)` to create a new FeatureSetDefaults_FeatureSetEditionDefault. +export declare const FeatureSetDefaults_FeatureSetEditionDefaultDesc: TypedDescMessage; + +/** + * Encapsulates information about the original source file from which a + * FileDescriptorProto was generated. + * + * @generated from message google.protobuf.SourceCodeInfo + */ +export declare type SourceCodeInfo = Message<"google.protobuf.SourceCodeInfo"> & { + /** + * A Location identifies a piece of source code in a .proto file which + * corresponds to a particular definition. This information is intended + * to be useful to IDEs, code indexers, documentation generators, and similar + * tools. + * + * For example, say we have a file like: + * message Foo { + * optional string foo = 1; + * } + * Let's look at just the field definition: + * optional string foo = 1; + * ^ ^^ ^^ ^ ^^^ + * a bc de f ghi + * We have the following locations: + * span path represents + * [a,i) [ 4, 0, 2, 0 ] The whole field definition. + * [a,b) [ 4, 0, 2, 0, 4 ] The label (optional). + * [c,d) [ 4, 0, 2, 0, 5 ] The type (string). + * [e,f) [ 4, 0, 2, 0, 1 ] The name (foo). + * [g,h) [ 4, 0, 2, 0, 3 ] The number (1). + * + * Notes: + * - A location may refer to a repeated field itself (i.e. not to any + * particular index within it). This is used whenever a set of elements are + * logically enclosed in a single code segment. For example, an entire + * extend block (possibly containing multiple extension definitions) will + * have an outer location whose path refers to the "extensions" repeated + * field without an index. + * - Multiple locations may have the same path. This happens when a single + * logical declaration is spread out across multiple places. The most + * obvious example is the "extend" block again -- there may be multiple + * extend blocks in the same scope, each of which will have the same path. + * - A location's span is not always a subset of its parent's span. For + * example, the "extendee" of an extension declaration appears at the + * beginning of the "extend" block and is shared by all extensions within + * the block. + * - Just because a location's span is a subset of some other location's span + * does not mean that it is a descendant. For example, a "group" defines + * both a type and a field in a single declaration. Thus, the locations + * corresponding to the type and field and their components will overlap. + * - Code which tries to interpret locations should probably be designed to + * ignore those that it doesn't understand, as more types of locations could + * be recorded in the future. + * + * @generated from field: repeated google.protobuf.SourceCodeInfo.Location location = 1; + */ + location: SourceCodeInfo_Location[]; +}; + +// Describes the message google.protobuf.SourceCodeInfo. Use `create(SourceCodeInfoDesc)` to create a new SourceCodeInfo. +export declare const SourceCodeInfoDesc: TypedDescMessage; + +/** + * @generated from message google.protobuf.SourceCodeInfo.Location + */ +export declare type SourceCodeInfo_Location = Message<"google.protobuf.SourceCodeInfo.Location"> & { + /** + * Identifies which part of the FileDescriptorProto was defined at this + * location. + * + * Each element is a field number or an index. They form a path from + * the root FileDescriptorProto to the place where the definition occurs. + * For example, this path: + * [ 4, 3, 2, 7, 1 ] + * refers to: + * file.message_type(3) // 4, 3 + * .field(7) // 2, 7 + * .name() // 1 + * This is because FileDescriptorProto.message_type has field number 4: + * repeated DescriptorProto message_type = 4; + * and DescriptorProto.field has field number 2: + * repeated FieldDescriptorProto field = 2; + * and FieldDescriptorProto.name has field number 1: + * optional string name = 1; + * + * Thus, the above path gives the location of a field name. If we removed + * the last element: + * [ 4, 3, 2, 7 ] + * this path refers to the whole field declaration (from the beginning + * of the label to the terminating semicolon). + * + * @generated from field: repeated int32 path = 1 [packed = true]; + */ + path: number[]; + + /** + * Always has exactly three or four elements: start line, start column, + * end line (optional, otherwise assumed same as start line), end column. + * These are packed into a single field for efficiency. Note that line + * and column numbers are zero-based -- typically you will want to add + * 1 to each before displaying to a user. + * + * @generated from field: repeated int32 span = 2 [packed = true]; + */ + span: number[]; + + /** + * If this SourceCodeInfo represents a complete declaration, these are any + * comments appearing before and after the declaration which appear to be + * attached to the declaration. + * + * A series of line comments appearing on consecutive lines, with no other + * tokens appearing on those lines, will be treated as a single comment. + * + * leading_detached_comments will keep paragraphs of comments that appear + * before (but not connected to) the current element. Each paragraph, + * separated by empty lines, will be one comment element in the repeated + * field. + * + * Only the comment content is provided; comment markers (e.g. //) are + * stripped out. For block comments, leading whitespace and an asterisk + * will be stripped from the beginning of each line other than the first. + * Newlines are included in the output. + * + * Examples: + * + * optional int32 foo = 1; // Comment attached to foo. + * // Comment attached to bar. + * optional int32 bar = 2; + * + * optional string baz = 3; + * // Comment attached to baz. + * // Another line attached to baz. + * + * // Comment attached to moo. + * // + * // Another line attached to moo. + * optional double moo = 4; + * + * // Detached comment for corge. This is not leading or trailing comments + * // to moo or corge because there are blank lines separating it from + * // both. + * + * // Detached comment for corge paragraph 2. + * + * optional string corge = 5; + * /* Block comment attached + * * to corge. Leading asterisks + * * will be removed. *\/ + * /* Block comment attached to + * * grault. *\/ + * optional int32 grault = 6; + * + * // ignored detached comments. + * + * @generated from field: optional string leading_comments = 3; + */ + leadingComments: string; + + /** + * @generated from field: optional string trailing_comments = 4; + */ + trailingComments: string; + + /** + * @generated from field: repeated string leading_detached_comments = 6; + */ + leadingDetachedComments: string[]; +}; + +// Describes the message google.protobuf.SourceCodeInfo.Location. Use `create(SourceCodeInfo_LocationDesc)` to create a new SourceCodeInfo_Location. +export declare const SourceCodeInfo_LocationDesc: TypedDescMessage; + +/** + * Describes the relationship between generated code and its original source + * file. A GeneratedCodeInfo message is associated with only one generated + * source file, but may contain references to different source .proto files. + * + * @generated from message google.protobuf.GeneratedCodeInfo + */ +export declare type GeneratedCodeInfo = Message<"google.protobuf.GeneratedCodeInfo"> & { + /** + * An Annotation connects some span of text in generated code to an element + * of its generating .proto file. + * + * @generated from field: repeated google.protobuf.GeneratedCodeInfo.Annotation annotation = 1; + */ + annotation: GeneratedCodeInfo_Annotation[]; +}; + +// Describes the message google.protobuf.GeneratedCodeInfo. Use `create(GeneratedCodeInfoDesc)` to create a new GeneratedCodeInfo. +export declare const GeneratedCodeInfoDesc: TypedDescMessage; + +/** + * @generated from message google.protobuf.GeneratedCodeInfo.Annotation + */ +export declare type GeneratedCodeInfo_Annotation = Message<"google.protobuf.GeneratedCodeInfo.Annotation"> & { + /** + * Identifies the element in the original source .proto file. This field + * is formatted the same as SourceCodeInfo.Location.path. + * + * @generated from field: repeated int32 path = 1 [packed = true]; + */ + path: number[]; + + /** + * Identifies the filesystem path to the original source .proto. + * + * @generated from field: optional string source_file = 2; + */ + sourceFile: string; + + /** + * Identifies the starting offset in bytes in the generated code + * that relates to the identified object. + * + * @generated from field: optional int32 begin = 3; + */ + begin: number; + + /** + * Identifies the ending offset in bytes in the generated code that + * relates to the identified object. The end offset should be one past + * the last relevant byte (so the length of the text = end - begin). + * + * @generated from field: optional int32 end = 4; + */ + end: number; + + /** + * @generated from field: optional google.protobuf.GeneratedCodeInfo.Annotation.Semantic semantic = 5; + */ + semantic: GeneratedCodeInfo_Annotation_Semantic; +}; + +// Describes the message google.protobuf.GeneratedCodeInfo.Annotation. Use `create(GeneratedCodeInfo_AnnotationDesc)` to create a new GeneratedCodeInfo_Annotation. +export declare const GeneratedCodeInfo_AnnotationDesc: TypedDescMessage; + +/** + * Represents the identified object's effect on the element in the original + * .proto file. + * + * @generated from enum google.protobuf.GeneratedCodeInfo.Annotation.Semantic + */ +export enum GeneratedCodeInfo_Annotation_Semantic { + /** + * There is no effect or the effect is indescribable. + * + * @generated from enum value: NONE = 0; + */ + NONE = 0, + + /** + * The element is set or otherwise mutated. + * + * @generated from enum value: SET = 1; + */ + SET = 1, + + /** + * An alias to the element is returned. + * + * @generated from enum value: ALIAS = 2; + */ + ALIAS = 2, +} + +// Describes the enum google.protobuf.GeneratedCodeInfo.Annotation.Semantic. +export declare const GeneratedCodeInfo_Annotation_SemanticDesc: TypedDescEnum; + +/** + * The full set of known editions. + * + * @generated from enum google.protobuf.Edition + */ +export enum Edition { + /** + * A placeholder for an unknown edition value. + * + * @generated from enum value: EDITION_UNKNOWN = 0; + */ + EDITION_UNKNOWN = 0, + + /** + * 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. + * + * @generated from enum value: EDITION_PROTO2 = 998; + */ + EDITION_PROTO2 = 998, + + /** + * @generated from enum value: EDITION_PROTO3 = 999; + */ + EDITION_PROTO3 = 999, + + /** + * 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. + * + * @generated from enum value: EDITION_2023 = 1000; + */ + EDITION_2023 = 1000, + + /** + * Placeholder editions for testing feature resolution. These should not be + * used or relyed on outside of tests. + * + * @generated from enum value: EDITION_1_TEST_ONLY = 1; + */ + EDITION_1_TEST_ONLY = 1, + + /** + * @generated from enum value: EDITION_2_TEST_ONLY = 2; + */ + EDITION_2_TEST_ONLY = 2, + + /** + * @generated from enum value: EDITION_99997_TEST_ONLY = 99997; + */ + EDITION_99997_TEST_ONLY = 99997, + + /** + * @generated from enum value: EDITION_99998_TEST_ONLY = 99998; + */ + EDITION_99998_TEST_ONLY = 99998, + + /** + * @generated from enum value: EDITION_99999_TEST_ONLY = 99999; + */ + EDITION_99999_TEST_ONLY = 99999, +} + +// Describes the enum google.protobuf.Edition. +export declare const EditionDesc: TypedDescEnum; + diff --git a/packages/protobuf-test/src/gen/js/google/protobuf/descriptor_pbv2.js b/packages/protobuf-test/src/gen/js/google/protobuf/descriptor_pbv2.js new file mode 100644 index 000000000..2668ec11f --- /dev/null +++ b/packages/protobuf-test/src/gen/js/google/protobuf/descriptor_pbv2.js @@ -0,0 +1,284 @@ +// Copyright 2021-2024 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Author: kenton@google.com (Kenton Varda) +// Based on original Protocol Buffers design by +// Sanjay Ghemawat, Jeff Dean, and others. +// +// The messages in this file describe the definitions found in .proto files. +// A valid .proto file can be translated directly to a FileDescriptorProto +// without any other information (e.g. without reading its imports). + +// @generated by protoc-gen-es-next v1.7.2 with parameter "ts_nocheck=false,target=js+dts" +// @generated from file google/protobuf/descriptor.proto (package google.protobuf, syntax proto2) +/* eslint-disable */ + +import { enumDesc, fileDesc, messageDesc, tsEnum } from "@bufbuild/protobuf/next/codegenv1"; + +export const fileDesc_google_protobuf_descriptor = fileDesc("CiBnb29nbGUvcHJvdG9idWYvZGVzY3JpcHRvci5wcm90bxIPZ29vZ2xlLnByb3RvYnVmIkcKEUZpbGVEZXNjcmlwdG9yU2V0EjIKBGZpbGUYASADKAsyJC5nb29nbGUucHJvdG9idWYuRmlsZURlc2NyaXB0b3JQcm90byKGBAoTRmlsZURlc2NyaXB0b3JQcm90bxIMCgRuYW1lGAEgASgJEg8KB3BhY2thZ2UYAiABKAkSEgoKZGVwZW5kZW5jeRgDIAMoCRIZChF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b3RvYnVmLkdlbmVyYXRlZENvZGVJbmZvLkFubm90YXRpb24uU2VtYW50aWMiKAoIU2VtYW50aWMSCAoETk9ORRAAEgcKA1NFVBABEgkKBUFMSUFTEAIq6gEKB0VkaXRpb24SEwoPRURJVElPTl9VTktOT1dOEAASEwoORURJVElPTl9QUk9UTzIQ5gcSEwoORURJVElPTl9QUk9UTzMQ5wcSEQoMRURJVElPTl8yMDIzEOgHEhcKE0VESVRJT05fMV9URVNUX09OTFkQARIXChNFRElUSU9OXzJfVEVTVF9PTkxZEAISHQoXRURJVElPTl85OTk5N19URVNUX09OTFkQnY0GEh0KF0VESVRJT05fOTk5OThfVEVTVF9PTkxZEJ6NBhIdChdFRElUSU9OXzk5OTk5X1RFU1RfT05MWRCfjQZCfgoTY29tLmdvb2dsZS5wcm90b2J1ZkIQRGVzY3JpcHRvclByb3Rvc0gBWi1nb29nbGUuZ29sYW5nLm9yZy9wcm90b2J1Zi90eXBlcy9kZXNjcmlwdG9ycGL4AQGiAgNHUEKqAhpHb29nbGUuUHJvdG9idWYuUmVmbGVjdGlvbg"); + +// Describes the message google.protobuf.FileDescriptorSet. Use `create(FileDescriptorSetDesc)` to create a new FileDescriptorSet. +export const FileDescriptorSetDesc = messageDesc(fileDesc_google_protobuf_descriptor, 0); + +// Describes the message google.protobuf.FileDescriptorProto. Use `create(FileDescriptorProtoDesc)` to create a new FileDescriptorProto. +export const FileDescriptorProtoDesc = messageDesc(fileDesc_google_protobuf_descriptor, 1); + +// Describes the message google.protobuf.DescriptorProto. Use `create(DescriptorProtoDesc)` to create a new DescriptorProto. +export const DescriptorProtoDesc = messageDesc(fileDesc_google_protobuf_descriptor, 2); + +// Describes the message google.protobuf.DescriptorProto.ExtensionRange. Use `create(DescriptorProto_ExtensionRangeDesc)` to create a new DescriptorProto_ExtensionRange. +export const DescriptorProto_ExtensionRangeDesc = messageDesc(fileDesc_google_protobuf_descriptor, 2, 0); + +// Describes the message google.protobuf.DescriptorProto.ReservedRange. Use `create(DescriptorProto_ReservedRangeDesc)` to create a new DescriptorProto_ReservedRange. +export const DescriptorProto_ReservedRangeDesc = messageDesc(fileDesc_google_protobuf_descriptor, 2, 1); + +// Describes the message google.protobuf.ExtensionRangeOptions. Use `create(ExtensionRangeOptionsDesc)` to create a new ExtensionRangeOptions. +export const ExtensionRangeOptionsDesc = messageDesc(fileDesc_google_protobuf_descriptor, 3); + +// Describes the message google.protobuf.ExtensionRangeOptions.Declaration. Use `create(ExtensionRangeOptions_DeclarationDesc)` to create a new ExtensionRangeOptions_Declaration. +export const ExtensionRangeOptions_DeclarationDesc = messageDesc(fileDesc_google_protobuf_descriptor, 3, 0); + +// Describes the enum google.protobuf.ExtensionRangeOptions.VerificationState. +export const ExtensionRangeOptions_VerificationStateDesc = enumDesc(fileDesc_google_protobuf_descriptor, 3, 0); + +/** + * The verification state of the extension range. + * + * @generated from enum google.protobuf.ExtensionRangeOptions.VerificationState + */ +export const ExtensionRangeOptions_VerificationState = tsEnum(ExtensionRangeOptions_VerificationStateDesc); + +// Describes the message google.protobuf.FieldDescriptorProto. Use `create(FieldDescriptorProtoDesc)` to create a new FieldDescriptorProto. +export const FieldDescriptorProtoDesc = messageDesc(fileDesc_google_protobuf_descriptor, 4); + +// Describes the enum google.protobuf.FieldDescriptorProto.Type. +export const FieldDescriptorProto_TypeDesc = enumDesc(fileDesc_google_protobuf_descriptor, 4, 0); + +/** + * @generated from enum google.protobuf.FieldDescriptorProto.Type + */ +export const FieldDescriptorProto_Type = tsEnum(FieldDescriptorProto_TypeDesc); + +// Describes the enum google.protobuf.FieldDescriptorProto.Label. +export const FieldDescriptorProto_LabelDesc = enumDesc(fileDesc_google_protobuf_descriptor, 4, 1); + +/** + * @generated from enum google.protobuf.FieldDescriptorProto.Label + */ +export const FieldDescriptorProto_Label = tsEnum(FieldDescriptorProto_LabelDesc); + +// Describes the message google.protobuf.OneofDescriptorProto. Use `create(OneofDescriptorProtoDesc)` to create a new OneofDescriptorProto. +export const OneofDescriptorProtoDesc = messageDesc(fileDesc_google_protobuf_descriptor, 5); + +// Describes the message google.protobuf.EnumDescriptorProto. Use `create(EnumDescriptorProtoDesc)` to create a new EnumDescriptorProto. +export const EnumDescriptorProtoDesc = messageDesc(fileDesc_google_protobuf_descriptor, 6); + +// Describes the message google.protobuf.EnumDescriptorProto.EnumReservedRange. Use `create(EnumDescriptorProto_EnumReservedRangeDesc)` to create a new EnumDescriptorProto_EnumReservedRange. +export const EnumDescriptorProto_EnumReservedRangeDesc = messageDesc(fileDesc_google_protobuf_descriptor, 6, 0); + +// Describes the message google.protobuf.EnumValueDescriptorProto. Use `create(EnumValueDescriptorProtoDesc)` to create a new EnumValueDescriptorProto. +export const EnumValueDescriptorProtoDesc = messageDesc(fileDesc_google_protobuf_descriptor, 7); + +// Describes the message google.protobuf.ServiceDescriptorProto. Use `create(ServiceDescriptorProtoDesc)` to create a new ServiceDescriptorProto. +export const ServiceDescriptorProtoDesc = messageDesc(fileDesc_google_protobuf_descriptor, 8); + +// Describes the message google.protobuf.MethodDescriptorProto. Use `create(MethodDescriptorProtoDesc)` to create a new MethodDescriptorProto. +export const MethodDescriptorProtoDesc = messageDesc(fileDesc_google_protobuf_descriptor, 9); + +// Describes the message google.protobuf.FileOptions. Use `create(FileOptionsDesc)` to create a new FileOptions. +export const FileOptionsDesc = messageDesc(fileDesc_google_protobuf_descriptor, 10); + +// Describes the enum google.protobuf.FileOptions.OptimizeMode. +export const FileOptions_OptimizeModeDesc = enumDesc(fileDesc_google_protobuf_descriptor, 10, 0); + +/** + * Generated classes can be optimized for speed or code size. + * + * @generated from enum google.protobuf.FileOptions.OptimizeMode + */ +export const FileOptions_OptimizeMode = tsEnum(FileOptions_OptimizeModeDesc); + +// Describes the message google.protobuf.MessageOptions. Use `create(MessageOptionsDesc)` to create a new MessageOptions. +export const MessageOptionsDesc = messageDesc(fileDesc_google_protobuf_descriptor, 11); + +// Describes the message google.protobuf.FieldOptions. Use `create(FieldOptionsDesc)` to create a new FieldOptions. +export const FieldOptionsDesc = messageDesc(fileDesc_google_protobuf_descriptor, 12); + +// Describes the message google.protobuf.FieldOptions.EditionDefault. Use `create(FieldOptions_EditionDefaultDesc)` to create a new FieldOptions_EditionDefault. +export const FieldOptions_EditionDefaultDesc = messageDesc(fileDesc_google_protobuf_descriptor, 12, 0); + +// Describes the enum google.protobuf.FieldOptions.CType. +export const FieldOptions_CTypeDesc = enumDesc(fileDesc_google_protobuf_descriptor, 12, 0); + +/** + * @generated from enum google.protobuf.FieldOptions.CType + */ +export const FieldOptions_CType = tsEnum(FieldOptions_CTypeDesc); + +// Describes the enum google.protobuf.FieldOptions.JSType. +export const FieldOptions_JSTypeDesc = enumDesc(fileDesc_google_protobuf_descriptor, 12, 1); + +/** + * @generated from enum google.protobuf.FieldOptions.JSType + */ +export const FieldOptions_JSType = tsEnum(FieldOptions_JSTypeDesc); + +// Describes the enum google.protobuf.FieldOptions.OptionRetention. +export const FieldOptions_OptionRetentionDesc = enumDesc(fileDesc_google_protobuf_descriptor, 12, 2); + +/** + * 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). + * + * @generated from enum google.protobuf.FieldOptions.OptionRetention + */ +export const FieldOptions_OptionRetention = tsEnum(FieldOptions_OptionRetentionDesc); + +// Describes the enum google.protobuf.FieldOptions.OptionTargetType. +export const FieldOptions_OptionTargetTypeDesc = enumDesc(fileDesc_google_protobuf_descriptor, 12, 3); + +/** + * 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. Note: as of January 2023, support for this is + * in progress and does not yet have an effect (b/264593489). + * + * @generated from enum google.protobuf.FieldOptions.OptionTargetType + */ +export const FieldOptions_OptionTargetType = tsEnum(FieldOptions_OptionTargetTypeDesc); + +// Describes the message google.protobuf.OneofOptions. Use `create(OneofOptionsDesc)` to create a new OneofOptions. +export const OneofOptionsDesc = messageDesc(fileDesc_google_protobuf_descriptor, 13); + +// Describes the message google.protobuf.EnumOptions. Use `create(EnumOptionsDesc)` to create a new EnumOptions. +export const EnumOptionsDesc = messageDesc(fileDesc_google_protobuf_descriptor, 14); + +// Describes the message google.protobuf.EnumValueOptions. Use `create(EnumValueOptionsDesc)` to create a new EnumValueOptions. +export const EnumValueOptionsDesc = messageDesc(fileDesc_google_protobuf_descriptor, 15); + +// Describes the message google.protobuf.ServiceOptions. Use `create(ServiceOptionsDesc)` to create a new ServiceOptions. +export const ServiceOptionsDesc = messageDesc(fileDesc_google_protobuf_descriptor, 16); + +// Describes the message google.protobuf.MethodOptions. Use `create(MethodOptionsDesc)` to create a new MethodOptions. +export const MethodOptionsDesc = messageDesc(fileDesc_google_protobuf_descriptor, 17); + +// Describes the enum google.protobuf.MethodOptions.IdempotencyLevel. +export const MethodOptions_IdempotencyLevelDesc = enumDesc(fileDesc_google_protobuf_descriptor, 17, 0); + +/** + * Is this method side-effect-free (or safe in HTTP parlance), or idempotent, + * or neither? HTTP based RPC implementation may choose GET verb for safe + * methods, and PUT verb for idempotent methods instead of the default POST. + * + * @generated from enum google.protobuf.MethodOptions.IdempotencyLevel + */ +export const MethodOptions_IdempotencyLevel = tsEnum(MethodOptions_IdempotencyLevelDesc); + +// Describes the message google.protobuf.UninterpretedOption. Use `create(UninterpretedOptionDesc)` to create a new UninterpretedOption. +export const UninterpretedOptionDesc = messageDesc(fileDesc_google_protobuf_descriptor, 18); + +// Describes the message google.protobuf.UninterpretedOption.NamePart. Use `create(UninterpretedOption_NamePartDesc)` to create a new UninterpretedOption_NamePart. +export const UninterpretedOption_NamePartDesc = messageDesc(fileDesc_google_protobuf_descriptor, 18, 0); + +// Describes the message google.protobuf.FeatureSet. Use `create(FeatureSetDesc)` to create a new FeatureSet. +export const FeatureSetDesc = messageDesc(fileDesc_google_protobuf_descriptor, 19); + +// Describes the enum google.protobuf.FeatureSet.FieldPresence. +export const FeatureSet_FieldPresenceDesc = enumDesc(fileDesc_google_protobuf_descriptor, 19, 0); + +/** + * @generated from enum google.protobuf.FeatureSet.FieldPresence + */ +export const FeatureSet_FieldPresence = tsEnum(FeatureSet_FieldPresenceDesc); + +// Describes the enum google.protobuf.FeatureSet.EnumType. +export const FeatureSet_EnumTypeDesc = enumDesc(fileDesc_google_protobuf_descriptor, 19, 1); + +/** + * @generated from enum google.protobuf.FeatureSet.EnumType + */ +export const FeatureSet_EnumType = tsEnum(FeatureSet_EnumTypeDesc); + +// Describes the enum google.protobuf.FeatureSet.RepeatedFieldEncoding. +export const FeatureSet_RepeatedFieldEncodingDesc = enumDesc(fileDesc_google_protobuf_descriptor, 19, 2); + +/** + * @generated from enum google.protobuf.FeatureSet.RepeatedFieldEncoding + */ +export const FeatureSet_RepeatedFieldEncoding = tsEnum(FeatureSet_RepeatedFieldEncodingDesc); + +// Describes the enum google.protobuf.FeatureSet.Utf8Validation. +export const FeatureSet_Utf8ValidationDesc = enumDesc(fileDesc_google_protobuf_descriptor, 19, 3); + +/** + * @generated from enum google.protobuf.FeatureSet.Utf8Validation + */ +export const FeatureSet_Utf8Validation = tsEnum(FeatureSet_Utf8ValidationDesc); + +// Describes the enum google.protobuf.FeatureSet.MessageEncoding. +export const FeatureSet_MessageEncodingDesc = enumDesc(fileDesc_google_protobuf_descriptor, 19, 4); + +/** + * @generated from enum google.protobuf.FeatureSet.MessageEncoding + */ +export const FeatureSet_MessageEncoding = tsEnum(FeatureSet_MessageEncodingDesc); + +// Describes the enum google.protobuf.FeatureSet.JsonFormat. +export const FeatureSet_JsonFormatDesc = enumDesc(fileDesc_google_protobuf_descriptor, 19, 5); + +/** + * @generated from enum google.protobuf.FeatureSet.JsonFormat + */ +export const FeatureSet_JsonFormat = tsEnum(FeatureSet_JsonFormatDesc); + +// Describes the message google.protobuf.FeatureSetDefaults. Use `create(FeatureSetDefaultsDesc)` to create a new FeatureSetDefaults. +export const FeatureSetDefaultsDesc = messageDesc(fileDesc_google_protobuf_descriptor, 20); + +// Describes the message google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault. Use `create(FeatureSetDefaults_FeatureSetEditionDefaultDesc)` to create a new FeatureSetDefaults_FeatureSetEditionDefault. +export const FeatureSetDefaults_FeatureSetEditionDefaultDesc = messageDesc(fileDesc_google_protobuf_descriptor, 20, 0); + +// Describes the message google.protobuf.SourceCodeInfo. Use `create(SourceCodeInfoDesc)` to create a new SourceCodeInfo. +export const SourceCodeInfoDesc = messageDesc(fileDesc_google_protobuf_descriptor, 21); + +// Describes the message google.protobuf.SourceCodeInfo.Location. Use `create(SourceCodeInfo_LocationDesc)` to create a new SourceCodeInfo_Location. +export const SourceCodeInfo_LocationDesc = messageDesc(fileDesc_google_protobuf_descriptor, 21, 0); + +// Describes the message google.protobuf.GeneratedCodeInfo. Use `create(GeneratedCodeInfoDesc)` to create a new GeneratedCodeInfo. +export const GeneratedCodeInfoDesc = messageDesc(fileDesc_google_protobuf_descriptor, 22); + +// Describes the message google.protobuf.GeneratedCodeInfo.Annotation. Use `create(GeneratedCodeInfo_AnnotationDesc)` to create a new GeneratedCodeInfo_Annotation. +export const GeneratedCodeInfo_AnnotationDesc = messageDesc(fileDesc_google_protobuf_descriptor, 22, 0); + +// Describes the enum google.protobuf.GeneratedCodeInfo.Annotation.Semantic. +export const GeneratedCodeInfo_Annotation_SemanticDesc = enumDesc(fileDesc_google_protobuf_descriptor, 22, 0, 0); + +/** + * Represents the identified object's effect on the element in the original + * .proto file. + * + * @generated from enum google.protobuf.GeneratedCodeInfo.Annotation.Semantic + */ +export const GeneratedCodeInfo_Annotation_Semantic = tsEnum(GeneratedCodeInfo_Annotation_SemanticDesc); + +// Describes the enum google.protobuf.Edition. +export const EditionDesc = enumDesc(fileDesc_google_protobuf_descriptor, 0); + +/** + * The full set of known editions. + * + * @generated from enum google.protobuf.Edition + */ +export const Edition = tsEnum(EditionDesc); + diff --git a/packages/protobuf-test/src/gen/js/google/protobuf/duration_pbv2.d.ts b/packages/protobuf-test/src/gen/js/google/protobuf/duration_pbv2.d.ts new file mode 100644 index 000000000..b0c91d731 --- /dev/null +++ b/packages/protobuf-test/src/gen/js/google/protobuf/duration_pbv2.d.ts @@ -0,0 +1,113 @@ +// Copyright 2021-2024 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// @generated by protoc-gen-es-next v1.7.2 with parameter "ts_nocheck=false,target=js+dts" +// @generated from file google/protobuf/duration.proto (package google.protobuf, syntax proto3) +/* eslint-disable */ + +import type { DescFile } from "@bufbuild/protobuf"; +import type { Message } from "@bufbuild/protobuf/next"; +import type { TypedDescMessage } from "@bufbuild/protobuf/next/codegenv1"; + +export declare const fileDesc_google_protobuf_duration: DescFile; + +/** + * A Duration represents a signed, fixed-length span of time represented + * as a count of seconds and fractions of seconds at nanosecond + * resolution. It is independent of any calendar and concepts like "day" + * or "month". It is related to Timestamp in that the difference between + * two Timestamp values is a Duration and it can be added or subtracted + * from a Timestamp. Range is approximately +-10,000 years. + * + * # Examples + * + * Example 1: Compute Duration from two Timestamps in pseudo code. + * + * Timestamp start = ...; + * Timestamp end = ...; + * Duration duration = ...; + * + * duration.seconds = end.seconds - start.seconds; + * duration.nanos = end.nanos - start.nanos; + * + * if (duration.seconds < 0 && duration.nanos > 0) { + * duration.seconds += 1; + * duration.nanos -= 1000000000; + * } else if (duration.seconds > 0 && duration.nanos < 0) { + * duration.seconds -= 1; + * duration.nanos += 1000000000; + * } + * + * Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. + * + * Timestamp start = ...; + * Duration duration = ...; + * Timestamp end = ...; + * + * end.seconds = start.seconds + duration.seconds; + * end.nanos = start.nanos + duration.nanos; + * + * if (end.nanos < 0) { + * end.seconds -= 1; + * end.nanos += 1000000000; + * } else if (end.nanos >= 1000000000) { + * end.seconds += 1; + * end.nanos -= 1000000000; + * } + * + * Example 3: Compute Duration from datetime.timedelta in Python. + * + * td = datetime.timedelta(days=3, minutes=10) + * duration = Duration() + * duration.FromTimedelta(td) + * + * # JSON Mapping + * + * In JSON format, the Duration type is encoded as a string rather than an + * object, where the string ends in the suffix "s" (indicating seconds) and + * is preceded by the number of seconds, with nanoseconds expressed as + * fractional seconds. For example, 3 seconds with 0 nanoseconds should be + * encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should + * be expressed in JSON format as "3.000000001s", and 3 seconds and 1 + * microsecond should be expressed in JSON format as "3.000001s". + * + * + * @generated from message google.protobuf.Duration + */ +export declare type Duration = Message<"google.protobuf.Duration"> & { + /** + * Signed seconds of the span of time. Must be from -315,576,000,000 + * to +315,576,000,000 inclusive. Note: these bounds are computed from: + * 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years + * + * @generated from field: int64 seconds = 1; + */ + seconds: bigint; + + /** + * Signed fractions of a second at nanosecond resolution of the span + * of time. Durations less than one second are represented with a 0 + * `seconds` field and a positive or negative `nanos` field. For durations + * of one second or more, a non-zero value for the `nanos` field must be + * of the same sign as the `seconds` field. Must be from -999,999,999 + * to +999,999,999 inclusive. + * + * @generated from field: int32 nanos = 2; + */ + nanos: number; +}; + +// Describes the message google.protobuf.Duration. Use `create(DurationDesc)` to create a new Duration. +export declare const DurationDesc: TypedDescMessage; + diff --git a/packages/protobuf-test/src/gen/js/google/protobuf/duration_pbv2.js b/packages/protobuf-test/src/gen/js/google/protobuf/duration_pbv2.js new file mode 100644 index 000000000..dcf6ee71b --- /dev/null +++ b/packages/protobuf-test/src/gen/js/google/protobuf/duration_pbv2.js @@ -0,0 +1,25 @@ +// Copyright 2021-2024 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// @generated by protoc-gen-es-next v1.7.2 with parameter "ts_nocheck=false,target=js+dts" +// @generated from file google/protobuf/duration.proto (package google.protobuf, syntax proto3) +/* eslint-disable */ + +import { fileDesc, messageDesc } from "@bufbuild/protobuf/next/codegenv1"; + +export const fileDesc_google_protobuf_duration = fileDesc("Ch5nb29nbGUvcHJvdG9idWYvZHVyYXRpb24ucHJvdG8SD2dvb2dsZS5wcm90b2J1ZiIqCghEdXJhdGlvbhIPCgdzZWNvbmRzGAEgASgDEg0KBW5hbm9zGAIgASgFQoMBChNjb20uZ29vZ2xlLnByb3RvYnVmQg1EdXJhdGlvblByb3RvUAFaMWdvb2dsZS5nb2xhbmcub3JnL3Byb3RvYnVmL3R5cGVzL2tub3duL2R1cmF0aW9ucGL4AQGiAgNHUEKqAh5Hb29nbGUuUHJvdG9idWYuV2VsbEtub3duVHlwZXNiBnByb3RvMw"); + +// Describes the message google.protobuf.Duration. Use `create(DurationDesc)` to create a new Duration. +export const DurationDesc = messageDesc(fileDesc_google_protobuf_duration, 0); + diff --git a/packages/protobuf-test/src/gen/js/google/protobuf/empty_pbv2.d.ts b/packages/protobuf-test/src/gen/js/google/protobuf/empty_pbv2.d.ts new file mode 100644 index 000000000..cc9899422 --- /dev/null +++ b/packages/protobuf-test/src/gen/js/google/protobuf/empty_pbv2.d.ts @@ -0,0 +1,42 @@ +// Copyright 2021-2024 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// @generated by protoc-gen-es-next v1.7.2 with parameter "ts_nocheck=false,target=js+dts" +// @generated from file google/protobuf/empty.proto (package google.protobuf, syntax proto3) +/* eslint-disable */ + +import type { DescFile } from "@bufbuild/protobuf"; +import type { Message } from "@bufbuild/protobuf/next"; +import type { TypedDescMessage } from "@bufbuild/protobuf/next/codegenv1"; + +export declare const fileDesc_google_protobuf_empty: DescFile; + +/** + * A generic empty message that you can re-use to avoid defining duplicated + * empty messages in your APIs. A typical example is to use it as the request + * or the response type of an API method. For instance: + * + * service Foo { + * rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); + * } + * + * + * @generated from message google.protobuf.Empty + */ +export declare type Empty = Message<"google.protobuf.Empty"> & { +}; + +// Describes the message google.protobuf.Empty. Use `create(EmptyDesc)` to create a new Empty. +export declare const EmptyDesc: TypedDescMessage; + diff --git a/packages/protobuf-test/src/gen/js/google/protobuf/empty_pbv2.js b/packages/protobuf-test/src/gen/js/google/protobuf/empty_pbv2.js new file mode 100644 index 000000000..922bcfdbf --- /dev/null +++ b/packages/protobuf-test/src/gen/js/google/protobuf/empty_pbv2.js @@ -0,0 +1,25 @@ +// Copyright 2021-2024 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// @generated by protoc-gen-es-next v1.7.2 with parameter "ts_nocheck=false,target=js+dts" +// @generated from file google/protobuf/empty.proto (package google.protobuf, syntax proto3) +/* eslint-disable */ + +import { fileDesc, messageDesc } from "@bufbuild/protobuf/next/codegenv1"; + +export const fileDesc_google_protobuf_empty = fileDesc("Chtnb29nbGUvcHJvdG9idWYvZW1wdHkucHJvdG8SD2dvb2dsZS5wcm90b2J1ZiIHCgVFbXB0eUJ9ChNjb20uZ29vZ2xlLnByb3RvYnVmQgpFbXB0eVByb3RvUAFaLmdvb2dsZS5nb2xhbmcub3JnL3Byb3RvYnVmL3R5cGVzL2tub3duL2VtcHR5cGL4AQGiAgNHUEKqAh5Hb29nbGUuUHJvdG9idWYuV2VsbEtub3duVHlwZXNiBnByb3RvMw"); + +// Describes the message google.protobuf.Empty. Use `create(EmptyDesc)` to create a new Empty. +export const EmptyDesc = messageDesc(fileDesc_google_protobuf_empty, 0); + diff --git a/packages/protobuf-test/src/gen/js/google/protobuf/field_mask_pbv2.d.ts b/packages/protobuf-test/src/gen/js/google/protobuf/field_mask_pbv2.d.ts new file mode 100644 index 000000000..5eac84f2f --- /dev/null +++ b/packages/protobuf-test/src/gen/js/google/protobuf/field_mask_pbv2.d.ts @@ -0,0 +1,239 @@ +// Copyright 2021-2024 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// @generated by protoc-gen-es-next v1.7.2 with parameter "ts_nocheck=false,target=js+dts" +// @generated from file google/protobuf/field_mask.proto (package google.protobuf, syntax proto3) +/* eslint-disable */ + +import type { DescFile } from "@bufbuild/protobuf"; +import type { Message } from "@bufbuild/protobuf/next"; +import type { TypedDescMessage } from "@bufbuild/protobuf/next/codegenv1"; + +export declare const fileDesc_google_protobuf_field_mask: DescFile; + +/** + * `FieldMask` represents a set of symbolic field paths, for example: + * + * paths: "f.a" + * paths: "f.b.d" + * + * Here `f` represents a field in some root message, `a` and `b` + * fields in the message found in `f`, and `d` a field found in the + * message in `f.b`. + * + * Field masks are used to specify a subset of fields that should be + * returned by a get operation or modified by an update operation. + * Field masks also have a custom JSON encoding (see below). + * + * # Field Masks in Projections + * + * When used in the context of a projection, a response message or + * sub-message is filtered by the API to only contain those fields as + * specified in the mask. For example, if the mask in the previous + * example is applied to a response message as follows: + * + * f { + * a : 22 + * b { + * d : 1 + * x : 2 + * } + * y : 13 + * } + * z: 8 + * + * The result will not contain specific values for fields x,y and z + * (their value will be set to the default, and omitted in proto text + * output): + * + * + * f { + * a : 22 + * b { + * d : 1 + * } + * } + * + * A repeated field is not allowed except at the last position of a + * paths string. + * + * If a FieldMask object is not present in a get operation, the + * operation applies to all fields (as if a FieldMask of all fields + * had been specified). + * + * Note that a field mask does not necessarily apply to the + * top-level response message. In case of a REST get operation, the + * field mask applies directly to the response, but in case of a REST + * list operation, the mask instead applies to each individual message + * in the returned resource list. In case of a REST custom method, + * other definitions may be used. Where the mask applies will be + * clearly documented together with its declaration in the API. In + * any case, the effect on the returned resource/resources is required + * behavior for APIs. + * + * # Field Masks in Update Operations + * + * A field mask in update operations specifies which fields of the + * targeted resource are going to be updated. The API is required + * to only change the values of the fields as specified in the mask + * and leave the others untouched. If a resource is passed in to + * describe the updated values, the API ignores the values of all + * fields not covered by the mask. + * + * If a repeated field is specified for an update operation, new values will + * be appended to the existing repeated field in the target resource. Note that + * a repeated field is only allowed in the last position of a `paths` string. + * + * If a sub-message is specified in the last position of the field mask for an + * update operation, then new value will be merged into the existing sub-message + * in the target resource. + * + * For example, given the target message: + * + * f { + * b { + * d: 1 + * x: 2 + * } + * c: [1] + * } + * + * And an update message: + * + * f { + * b { + * d: 10 + * } + * c: [2] + * } + * + * then if the field mask is: + * + * paths: ["f.b", "f.c"] + * + * then the result will be: + * + * f { + * b { + * d: 10 + * x: 2 + * } + * c: [1, 2] + * } + * + * An implementation may provide options to override this default behavior for + * repeated and message fields. + * + * In order to reset a field's value to the default, the field must + * be in the mask and set to the default value in the provided resource. + * Hence, in order to reset all fields of a resource, provide a default + * instance of the resource and set all fields in the mask, or do + * not provide a mask as described below. + * + * If a field mask is not present on update, the operation applies to + * all fields (as if a field mask of all fields has been specified). + * Note that in the presence of schema evolution, this may mean that + * fields the client does not know and has therefore not filled into + * the request will be reset to their default. If this is unwanted + * behavior, a specific service may require a client to always specify + * a field mask, producing an error if not. + * + * As with get operations, the location of the resource which + * describes the updated values in the request message depends on the + * operation kind. In any case, the effect of the field mask is + * required to be honored by the API. + * + * ## Considerations for HTTP REST + * + * The HTTP kind of an update operation which uses a field mask must + * be set to PATCH instead of PUT in order to satisfy HTTP semantics + * (PUT must only be used for full updates). + * + * # JSON Encoding of Field Masks + * + * In JSON, a field mask is encoded as a single string where paths are + * separated by a comma. Fields name in each path are converted + * to/from lower-camel naming conventions. + * + * As an example, consider the following message declarations: + * + * message Profile { + * User user = 1; + * Photo photo = 2; + * } + * message User { + * string display_name = 1; + * string address = 2; + * } + * + * In proto a field mask for `Profile` may look as such: + * + * mask { + * paths: "user.display_name" + * paths: "photo" + * } + * + * In JSON, the same mask is represented as below: + * + * { + * mask: "user.displayName,photo" + * } + * + * # Field Masks and Oneof Fields + * + * Field masks treat fields in oneofs just as regular fields. Consider the + * following message: + * + * message SampleMessage { + * oneof test_oneof { + * string name = 4; + * SubMessage sub_message = 9; + * } + * } + * + * The field mask can be: + * + * mask { + * paths: "name" + * } + * + * Or: + * + * mask { + * paths: "sub_message" + * } + * + * Note that oneof type names ("test_oneof" in this case) cannot be used in + * paths. + * + * ## Field Mask Verification + * + * The implementation of any API method which has a FieldMask type field in the + * request should verify the included field paths, and return an + * `INVALID_ARGUMENT` error if any path is unmappable. + * + * @generated from message google.protobuf.FieldMask + */ +export declare type FieldMask = Message<"google.protobuf.FieldMask"> & { + /** + * The set of field mask paths. + * + * @generated from field: repeated string paths = 1; + */ + paths: string[]; +}; + +// Describes the message google.protobuf.FieldMask. Use `create(FieldMaskDesc)` to create a new FieldMask. +export declare const FieldMaskDesc: TypedDescMessage; + diff --git a/packages/protobuf-test/src/gen/js/google/protobuf/field_mask_pbv2.js b/packages/protobuf-test/src/gen/js/google/protobuf/field_mask_pbv2.js new file mode 100644 index 000000000..1c7aa3f35 --- /dev/null +++ b/packages/protobuf-test/src/gen/js/google/protobuf/field_mask_pbv2.js @@ -0,0 +1,25 @@ +// Copyright 2021-2024 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// @generated by protoc-gen-es-next v1.7.2 with parameter "ts_nocheck=false,target=js+dts" +// @generated from file google/protobuf/field_mask.proto (package google.protobuf, syntax proto3) +/* eslint-disable */ + +import { fileDesc, messageDesc } from "@bufbuild/protobuf/next/codegenv1"; + +export const fileDesc_google_protobuf_field_mask = fileDesc("CiBnb29nbGUvcHJvdG9idWYvZmllbGRfbWFzay5wcm90bxIPZ29vZ2xlLnByb3RvYnVmIhoKCUZpZWxkTWFzaxINCgVwYXRocxgBIAMoCUKFAQoTY29tLmdvb2dsZS5wcm90b2J1ZkIORmllbGRNYXNrUHJvdG9QAVoyZ29vZ2xlLmdvbGFuZy5vcmcvcHJvdG9idWYvdHlwZXMva25vd24vZmllbGRtYXNrcGL4AQGiAgNHUEKqAh5Hb29nbGUuUHJvdG9idWYuV2VsbEtub3duVHlwZXNiBnByb3RvMw"); + +// Describes the message google.protobuf.FieldMask. Use `create(FieldMaskDesc)` to create a new FieldMask. +export const FieldMaskDesc = messageDesc(fileDesc_google_protobuf_field_mask, 0); + diff --git a/packages/protobuf-test/src/gen/js/google/protobuf/map_lite_unittest_pbv2.d.ts b/packages/protobuf-test/src/gen/js/google/protobuf/map_lite_unittest_pbv2.d.ts new file mode 100644 index 000000000..fc38c6aba --- /dev/null +++ b/packages/protobuf-test/src/gen/js/google/protobuf/map_lite_unittest_pbv2.d.ts @@ -0,0 +1,395 @@ +// Copyright 2021-2024 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// @generated by protoc-gen-es-next v1.7.2 with parameter "ts_nocheck=false,target=js+dts" +// @generated from file google/protobuf/map_lite_unittest.proto (package protobuf_unittest, syntax proto2) +/* eslint-disable */ + +import type { DescFile } from "@bufbuild/protobuf"; +import type { Message } from "@bufbuild/protobuf/next"; +import type { ForeignMessageLite, TestAllExtensionsLite, TestAllTypesLite } from "./unittest_lite_pbv2.js"; +import type { TypedDescEnum, TypedDescExtension, TypedDescMessage } from "@bufbuild/protobuf/next/codegenv1"; + +export declare const fileDesc_google_protobuf_map_lite_unittest: DescFile; + +/** + * @generated from message protobuf_unittest.TestMapLite + */ +export declare type TestMapLite = Message<"protobuf_unittest.TestMapLite"> & { + /** + * @generated from field: map map_int32_int32 = 1; + */ + mapInt32Int32: { [key: number]: number }; + + /** + * @generated from field: map map_int64_int64 = 2; + */ + mapInt64Int64: { [key: string]: bigint }; + + /** + * @generated from field: map map_uint32_uint32 = 3; + */ + mapUint32Uint32: { [key: number]: number }; + + /** + * @generated from field: map map_uint64_uint64 = 4; + */ + mapUint64Uint64: { [key: string]: bigint }; + + /** + * @generated from field: map map_sint32_sint32 = 5; + */ + mapSint32Sint32: { [key: number]: number }; + + /** + * @generated from field: map map_sint64_sint64 = 6; + */ + mapSint64Sint64: { [key: string]: bigint }; + + /** + * @generated from field: map map_fixed32_fixed32 = 7; + */ + mapFixed32Fixed32: { [key: number]: number }; + + /** + * @generated from field: map map_fixed64_fixed64 = 8; + */ + mapFixed64Fixed64: { [key: string]: bigint }; + + /** + * @generated from field: map map_sfixed32_sfixed32 = 9; + */ + mapSfixed32Sfixed32: { [key: number]: number }; + + /** + * @generated from field: map map_sfixed64_sfixed64 = 10; + */ + mapSfixed64Sfixed64: { [key: string]: bigint }; + + /** + * @generated from field: map map_int32_float = 11; + */ + mapInt32Float: { [key: number]: number }; + + /** + * @generated from field: map map_int32_double = 12; + */ + mapInt32Double: { [key: number]: number }; + + /** + * @generated from field: map map_bool_bool = 13; + */ + mapBoolBool: { [key: string]: boolean }; + + /** + * @generated from field: map map_string_string = 14; + */ + mapStringString: { [key: string]: string }; + + /** + * @generated from field: map map_int32_bytes = 15; + */ + mapInt32Bytes: { [key: number]: Uint8Array }; + + /** + * @generated from field: map map_int32_enum = 16; + */ + mapInt32Enum: { [key: number]: MapEnumLite }; + + /** + * @generated from field: map map_int32_foreign_message = 17; + */ + mapInt32ForeignMessage: { [key: number]: ForeignMessageLite }; + + /** + * @generated from field: map teboring = 18; + */ + teboring: { [key: number]: number }; +}; + +// Describes the message protobuf_unittest.TestMapLite. Use `create(TestMapLiteDesc)` to create a new TestMapLite. +export declare const TestMapLiteDesc: TypedDescMessage; + +/** + * @generated from message protobuf_unittest.TestArenaMapLite + */ +export declare type TestArenaMapLite = Message<"protobuf_unittest.TestArenaMapLite"> & { + /** + * @generated from field: map map_int32_int32 = 1; + */ + mapInt32Int32: { [key: number]: number }; + + /** + * @generated from field: map map_int64_int64 = 2; + */ + mapInt64Int64: { [key: string]: bigint }; + + /** + * @generated from field: map map_uint32_uint32 = 3; + */ + mapUint32Uint32: { [key: number]: number }; + + /** + * @generated from field: map map_uint64_uint64 = 4; + */ + mapUint64Uint64: { [key: string]: bigint }; + + /** + * @generated from field: map map_sint32_sint32 = 5; + */ + mapSint32Sint32: { [key: number]: number }; + + /** + * @generated from field: map map_sint64_sint64 = 6; + */ + mapSint64Sint64: { [key: string]: bigint }; + + /** + * @generated from field: map map_fixed32_fixed32 = 7; + */ + mapFixed32Fixed32: { [key: number]: number }; + + /** + * @generated from field: map map_fixed64_fixed64 = 8; + */ + mapFixed64Fixed64: { [key: string]: bigint }; + + /** + * @generated from field: map map_sfixed32_sfixed32 = 9; + */ + mapSfixed32Sfixed32: { [key: number]: number }; + + /** + * @generated from field: map map_sfixed64_sfixed64 = 10; + */ + mapSfixed64Sfixed64: { [key: string]: bigint }; + + /** + * @generated from field: map map_int32_float = 11; + */ + mapInt32Float: { [key: number]: number }; + + /** + * @generated from field: map map_int32_double = 12; + */ + mapInt32Double: { [key: number]: number }; + + /** + * @generated from field: map map_bool_bool = 13; + */ + mapBoolBool: { [key: string]: boolean }; + + /** + * @generated from field: map map_string_string = 14; + */ + mapStringString: { [key: string]: string }; + + /** + * @generated from field: map map_int32_bytes = 15; + */ + mapInt32Bytes: { [key: number]: Uint8Array }; + + /** + * @generated from field: map map_int32_enum = 16; + */ + mapInt32Enum: { [key: number]: MapEnumLite }; + + /** + * @generated from field: map map_int32_foreign_message = 17; + */ + mapInt32ForeignMessage: { [key: number]: ForeignMessageArenaLite }; +}; + +// Describes the message protobuf_unittest.TestArenaMapLite. Use `create(TestArenaMapLiteDesc)` to create a new TestArenaMapLite. +export declare const TestArenaMapLiteDesc: TypedDescMessage; + +/** + * Test embedded message with required fields + * + * @generated from message protobuf_unittest.TestRequiredMessageMapLite + */ +export declare type TestRequiredMessageMapLite = Message<"protobuf_unittest.TestRequiredMessageMapLite"> & { + /** + * @generated from field: map map_field = 1; + */ + mapField: { [key: number]: TestRequiredLite }; +}; + +// Describes the message protobuf_unittest.TestRequiredMessageMapLite. Use `create(TestRequiredMessageMapLiteDesc)` to create a new TestRequiredMessageMapLite. +export declare const TestRequiredMessageMapLiteDesc: TypedDescMessage; + +/** + * @generated from message protobuf_unittest.TestEnumMapLite + */ +export declare type TestEnumMapLite = Message<"protobuf_unittest.TestEnumMapLite"> & { + /** + * @generated from field: map known_map_field = 101; + */ + knownMapField: { [key: number]: Proto2MapEnumLite }; + + /** + * @generated from field: map unknown_map_field = 102; + */ + unknownMapField: { [key: number]: Proto2MapEnumLite }; +}; + +// Describes the message protobuf_unittest.TestEnumMapLite. Use `create(TestEnumMapLiteDesc)` to create a new TestEnumMapLite. +export declare const TestEnumMapLiteDesc: TypedDescMessage; + +/** + * @generated from message protobuf_unittest.TestEnumMapPlusExtraLite + */ +export declare type TestEnumMapPlusExtraLite = Message<"protobuf_unittest.TestEnumMapPlusExtraLite"> & { + /** + * @generated from field: map known_map_field = 101; + */ + knownMapField: { [key: number]: Proto2MapEnumPlusExtraLite }; + + /** + * @generated from field: map unknown_map_field = 102; + */ + unknownMapField: { [key: number]: Proto2MapEnumPlusExtraLite }; +}; + +// Describes the message protobuf_unittest.TestEnumMapPlusExtraLite. Use `create(TestEnumMapPlusExtraLiteDesc)` to create a new TestEnumMapPlusExtraLite. +export declare const TestEnumMapPlusExtraLiteDesc: TypedDescMessage; + +/** + * @generated from message protobuf_unittest.TestMessageMapLite + */ +export declare type TestMessageMapLite = Message<"protobuf_unittest.TestMessageMapLite"> & { + /** + * @generated from field: map map_int32_message = 1; + */ + mapInt32Message: { [key: number]: TestAllTypesLite }; +}; + +// Describes the message protobuf_unittest.TestMessageMapLite. Use `create(TestMessageMapLiteDesc)` to create a new TestMessageMapLite. +export declare const TestMessageMapLiteDesc: TypedDescMessage; + +/** + * @generated from message protobuf_unittest.TestRequiredLite + */ +export declare type TestRequiredLite = Message<"protobuf_unittest.TestRequiredLite"> & { + /** + * @generated from field: required int32 a = 1; + */ + a: number; + + /** + * @generated from field: required int32 b = 2; + */ + b: number; + + /** + * @generated from field: required int32 c = 3; + */ + c: number; +}; + +// Describes the message protobuf_unittest.TestRequiredLite. Use `create(TestRequiredLiteDesc)` to create a new TestRequiredLite. +export declare const TestRequiredLiteDesc: TypedDescMessage; + +/** + * @generated from extension: optional protobuf_unittest.TestRequiredLite single = 1000; + */ +export declare const TestRequiredLite_single: TypedDescExtension; + +/** + * @generated from message protobuf_unittest.ForeignMessageArenaLite + */ +export declare type ForeignMessageArenaLite = Message<"protobuf_unittest.ForeignMessageArenaLite"> & { + /** + * @generated from field: optional int32 c = 1; + */ + c: number; +}; + +// Describes the message protobuf_unittest.ForeignMessageArenaLite. Use `create(ForeignMessageArenaLiteDesc)` to create a new ForeignMessageArenaLite. +export declare const ForeignMessageArenaLiteDesc: TypedDescMessage; + +/** + * @generated from enum protobuf_unittest.Proto2MapEnumLite + */ +export enum Proto2MapEnumLite { + /** + * @generated from enum value: PROTO2_MAP_ENUM_FOO_LITE = 0; + */ + PROTO2_MAP_ENUM_FOO_LITE = 0, + + /** + * @generated from enum value: PROTO2_MAP_ENUM_BAR_LITE = 1; + */ + PROTO2_MAP_ENUM_BAR_LITE = 1, + + /** + * @generated from enum value: PROTO2_MAP_ENUM_BAZ_LITE = 2; + */ + PROTO2_MAP_ENUM_BAZ_LITE = 2, +} + +// Describes the enum protobuf_unittest.Proto2MapEnumLite. +export declare const Proto2MapEnumLiteDesc: TypedDescEnum; + +/** + * @generated from enum protobuf_unittest.Proto2MapEnumPlusExtraLite + */ +export enum Proto2MapEnumPlusExtraLite { + /** + * @generated from enum value: E_PROTO2_MAP_ENUM_FOO_LITE = 0; + */ + E_PROTO2_MAP_ENUM_FOO_LITE = 0, + + /** + * @generated from enum value: E_PROTO2_MAP_ENUM_BAR_LITE = 1; + */ + E_PROTO2_MAP_ENUM_BAR_LITE = 1, + + /** + * @generated from enum value: E_PROTO2_MAP_ENUM_BAZ_LITE = 2; + */ + E_PROTO2_MAP_ENUM_BAZ_LITE = 2, + + /** + * @generated from enum value: E_PROTO2_MAP_ENUM_EXTRA_LITE = 3; + */ + E_PROTO2_MAP_ENUM_EXTRA_LITE = 3, +} + +// Describes the enum protobuf_unittest.Proto2MapEnumPlusExtraLite. +export declare const Proto2MapEnumPlusExtraLiteDesc: TypedDescEnum; + +/** + * @generated from enum protobuf_unittest.MapEnumLite + */ +export enum MapEnumLite { + /** + * @generated from enum value: MAP_ENUM_FOO_LITE = 0; + */ + MAP_ENUM_FOO_LITE = 0, + + /** + * @generated from enum value: MAP_ENUM_BAR_LITE = 1; + */ + MAP_ENUM_BAR_LITE = 1, + + /** + * @generated from enum value: MAP_ENUM_BAZ_LITE = 2; + */ + MAP_ENUM_BAZ_LITE = 2, +} + +// Describes the enum protobuf_unittest.MapEnumLite. +export declare const MapEnumLiteDesc: TypedDescEnum; + diff --git a/packages/protobuf-test/src/gen/js/google/protobuf/map_lite_unittest_pbv2.js b/packages/protobuf-test/src/gen/js/google/protobuf/map_lite_unittest_pbv2.js new file mode 100644 index 000000000..d3f022f49 --- /dev/null +++ b/packages/protobuf-test/src/gen/js/google/protobuf/map_lite_unittest_pbv2.js @@ -0,0 +1,76 @@ +// Copyright 2021-2024 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// @generated by protoc-gen-es-next v1.7.2 with parameter "ts_nocheck=false,target=js+dts" +// @generated from file google/protobuf/map_lite_unittest.proto (package protobuf_unittest, syntax proto2) +/* eslint-disable */ + +import { enumDesc, extDesc, fileDesc, messageDesc, tsEnum } from "@bufbuild/protobuf/next/codegenv1"; +import { fileDesc_google_protobuf_unittest_lite } from "./unittest_lite_pbv2.js"; + +export const fileDesc_google_protobuf_map_lite_unittest = fileDesc("Cidnb29nbGUvcHJvdG9idWYvbWFwX2xpdGVfdW5pdHRlc3QucHJvdG8SEXByb3RvYnVmX3VuaXR0ZXN0ItcTCgtUZXN0TWFwTGl0ZRJKCg9tYXBfaW50MzJfaW50MzIYASADKAsyMS5wcm90b2J1Zl91bml0dGVzdC5UZXN0TWFwTGl0ZS5NYXBJbnQzMkludDMyRW50cnkSSgoPbWFwX2ludDY0X2ludDY0GAIgAygLMjEucHJvdG9idWZfdW5pdHRlc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0cmFMaXRlEh4KGkVfUFJPVE8yX01BUF9FTlVNX0ZPT19MSVRFEAASHgoaRV9QUk9UTzJfTUFQX0VOVU1fQkFSX0xJVEUQARIeChpFX1BST1RPMl9NQVBfRU5VTV9CQVpfTElURRACEiAKHEVfUFJPVE8yX01BUF9FTlVNX0VYVFJBX0xJVEUQAypSCgtNYXBFbnVtTGl0ZRIVChFNQVBfRU5VTV9GT09fTElURRAAEhUKEU1BUF9FTlVNX0JBUl9MSVRFEAESFQoRTUFQX0VOVU1fQkFaX0xJVEUQAkIFSAP4AQE", [fileDesc_google_protobuf_unittest_lite]); + +// Describes the message protobuf_unittest.TestMapLite. Use `create(TestMapLiteDesc)` to create a new TestMapLite. +export const TestMapLiteDesc = messageDesc(fileDesc_google_protobuf_map_lite_unittest, 0); + +// Describes the message protobuf_unittest.TestArenaMapLite. Use `create(TestArenaMapLiteDesc)` to create a new TestArenaMapLite. +export const TestArenaMapLiteDesc = messageDesc(fileDesc_google_protobuf_map_lite_unittest, 1); + +// Describes the message protobuf_unittest.TestRequiredMessageMapLite. Use `create(TestRequiredMessageMapLiteDesc)` to create a new TestRequiredMessageMapLite. +export const TestRequiredMessageMapLiteDesc = messageDesc(fileDesc_google_protobuf_map_lite_unittest, 2); + +// Describes the message protobuf_unittest.TestEnumMapLite. Use `create(TestEnumMapLiteDesc)` to create a new TestEnumMapLite. +export const TestEnumMapLiteDesc = messageDesc(fileDesc_google_protobuf_map_lite_unittest, 3); + +// Describes the message protobuf_unittest.TestEnumMapPlusExtraLite. Use `create(TestEnumMapPlusExtraLiteDesc)` to create a new TestEnumMapPlusExtraLite. +export const TestEnumMapPlusExtraLiteDesc = messageDesc(fileDesc_google_protobuf_map_lite_unittest, 4); + +// Describes the message protobuf_unittest.TestMessageMapLite. Use `create(TestMessageMapLiteDesc)` to create a new TestMessageMapLite. +export const TestMessageMapLiteDesc = messageDesc(fileDesc_google_protobuf_map_lite_unittest, 5); + +// Describes the message protobuf_unittest.TestRequiredLite. Use `create(TestRequiredLiteDesc)` to create a new TestRequiredLite. +export const TestRequiredLiteDesc = messageDesc(fileDesc_google_protobuf_map_lite_unittest, 6); + +/** + * @generated from extension: optional protobuf_unittest.TestRequiredLite single = 1000; + */ +export const TestRequiredLite_single = extDesc(fileDesc_google_protobuf_map_lite_unittest, 6, 0); + +// Describes the message protobuf_unittest.ForeignMessageArenaLite. Use `create(ForeignMessageArenaLiteDesc)` to create a new ForeignMessageArenaLite. +export const ForeignMessageArenaLiteDesc = messageDesc(fileDesc_google_protobuf_map_lite_unittest, 7); + +// Describes the enum protobuf_unittest.Proto2MapEnumLite. +export const Proto2MapEnumLiteDesc = enumDesc(fileDesc_google_protobuf_map_lite_unittest, 0); + +/** + * @generated from enum protobuf_unittest.Proto2MapEnumLite + */ +export const Proto2MapEnumLite = tsEnum(Proto2MapEnumLiteDesc); + +// Describes the enum protobuf_unittest.Proto2MapEnumPlusExtraLite. +export const Proto2MapEnumPlusExtraLiteDesc = enumDesc(fileDesc_google_protobuf_map_lite_unittest, 1); + +/** + * @generated from enum protobuf_unittest.Proto2MapEnumPlusExtraLite + */ +export const Proto2MapEnumPlusExtraLite = tsEnum(Proto2MapEnumPlusExtraLiteDesc); + +// Describes the enum protobuf_unittest.MapEnumLite. +export const MapEnumLiteDesc = enumDesc(fileDesc_google_protobuf_map_lite_unittest, 2); + +/** + * @generated from enum protobuf_unittest.MapEnumLite + */ +export const MapEnumLite = tsEnum(MapEnumLiteDesc); + diff --git a/packages/protobuf-test/src/gen/js/google/protobuf/map_proto2_unittest_pbv2.d.ts b/packages/protobuf-test/src/gen/js/google/protobuf/map_proto2_unittest_pbv2.d.ts new file mode 100644 index 000000000..b9a2deea5 --- /dev/null +++ b/packages/protobuf-test/src/gen/js/google/protobuf/map_proto2_unittest_pbv2.d.ts @@ -0,0 +1,369 @@ +// Copyright 2021-2024 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// @generated by protoc-gen-es-next v1.7.2 with parameter "ts_nocheck=false,target=js+dts" +// @generated from file google/protobuf/map_proto2_unittest.proto (package protobuf_unittest, syntax proto2) +/* eslint-disable */ + +// We don't put this in a package within proto2 because we need to make sure +// that the generated code doesn't depend on being in the proto2 namespace. +// In map_test_util.h we do "using namespace unittest = protobuf_unittest". + +import type { DescFile } from "@bufbuild/protobuf"; +import type { Message } from "@bufbuild/protobuf/next"; +import type { TypedDescEnum, TypedDescMessage } from "@bufbuild/protobuf/next/codegenv1"; +import type { ImportEnumForMap } from "./unittest_import_pbv2.js"; + +export declare const fileDesc_google_protobuf_map_proto2_unittest: DescFile; + +/** + * @generated from message protobuf_unittest.TestEnumMap + */ +export declare type TestEnumMap = Message<"protobuf_unittest.TestEnumMap"> & { + /** + * @generated from field: map known_map_field = 101; + */ + knownMapField: { [key: number]: Proto2MapEnum }; + + /** + * @generated from field: map unknown_map_field = 102; + */ + unknownMapField: { [key: number]: Proto2MapEnum }; + + /** + * Other maps with all key types to test the unknown entry serialization + * + * @generated from field: map unknown_map_field_int64 = 200; + */ + unknownMapFieldInt64: { [key: string]: Proto2MapEnum }; + + /** + * @generated from field: map unknown_map_field_uint64 = 201; + */ + unknownMapFieldUint64: { [key: string]: Proto2MapEnum }; + + /** + * @generated from field: map unknown_map_field_int32 = 202; + */ + unknownMapFieldInt32: { [key: number]: Proto2MapEnum }; + + /** + * @generated from field: map unknown_map_field_uint32 = 203; + */ + unknownMapFieldUint32: { [key: number]: Proto2MapEnum }; + + /** + * @generated from field: map unknown_map_field_fixed32 = 204; + */ + unknownMapFieldFixed32: { [key: number]: Proto2MapEnum }; + + /** + * @generated from field: map unknown_map_field_fixed64 = 205; + */ + unknownMapFieldFixed64: { [key: string]: Proto2MapEnum }; + + /** + * @generated from field: map unknown_map_field_bool = 206; + */ + unknownMapFieldBool: { [key: string]: Proto2MapEnum }; + + /** + * @generated from field: map unknown_map_field_string = 207; + */ + unknownMapFieldString: { [key: string]: Proto2MapEnum }; + + /** + * @generated from field: map unknown_map_field_sint32 = 208; + */ + unknownMapFieldSint32: { [key: number]: Proto2MapEnum }; + + /** + * @generated from field: map unknown_map_field_sint64 = 209; + */ + unknownMapFieldSint64: { [key: string]: Proto2MapEnum }; + + /** + * @generated from field: map unknown_map_field_sfixed32 = 210; + */ + unknownMapFieldSfixed32: { [key: number]: Proto2MapEnum }; + + /** + * @generated from field: map unknown_map_field_sfixed64 = 211; + */ + unknownMapFieldSfixed64: { [key: string]: Proto2MapEnum }; +}; + +// Describes the message protobuf_unittest.TestEnumMap. Use `create(TestEnumMapDesc)` to create a new TestEnumMap. +export declare const TestEnumMapDesc: TypedDescMessage; + +/** + * @generated from message protobuf_unittest.TestEnumMapPlusExtra + */ +export declare type TestEnumMapPlusExtra = Message<"protobuf_unittest.TestEnumMapPlusExtra"> & { + /** + * @generated from field: map known_map_field = 101; + */ + knownMapField: { [key: number]: Proto2MapEnumPlusExtra }; + + /** + * @generated from field: map unknown_map_field = 102; + */ + unknownMapField: { [key: number]: Proto2MapEnumPlusExtra }; + + /** + * Other maps with all key types to test the unknown entry serialization + * + * @generated from field: map unknown_map_field_int64 = 200; + */ + unknownMapFieldInt64: { [key: string]: Proto2MapEnumPlusExtra }; + + /** + * @generated from field: map unknown_map_field_uint64 = 201; + */ + unknownMapFieldUint64: { [key: string]: Proto2MapEnumPlusExtra }; + + /** + * @generated from field: map unknown_map_field_int32 = 202; + */ + unknownMapFieldInt32: { [key: number]: Proto2MapEnumPlusExtra }; + + /** + * @generated from field: map unknown_map_field_uint32 = 203; + */ + unknownMapFieldUint32: { [key: number]: Proto2MapEnumPlusExtra }; + + /** + * @generated from field: map unknown_map_field_fixed32 = 204; + */ + unknownMapFieldFixed32: { [key: number]: Proto2MapEnumPlusExtra }; + + /** + * @generated from field: map unknown_map_field_fixed64 = 205; + */ + unknownMapFieldFixed64: { [key: string]: Proto2MapEnumPlusExtra }; + + /** + * @generated from field: map unknown_map_field_bool = 206; + */ + unknownMapFieldBool: { [key: string]: Proto2MapEnumPlusExtra }; + + /** + * @generated from field: map unknown_map_field_string = 207; + */ + unknownMapFieldString: { [key: string]: Proto2MapEnumPlusExtra }; + + /** + * @generated from field: map unknown_map_field_sint32 = 208; + */ + unknownMapFieldSint32: { [key: number]: Proto2MapEnumPlusExtra }; + + /** + * @generated from field: map unknown_map_field_sint64 = 209; + */ + unknownMapFieldSint64: { [key: string]: Proto2MapEnumPlusExtra }; + + /** + * @generated from field: map unknown_map_field_sfixed32 = 210; + */ + unknownMapFieldSfixed32: { [key: number]: Proto2MapEnumPlusExtra }; + + /** + * @generated from field: map unknown_map_field_sfixed64 = 211; + */ + unknownMapFieldSfixed64: { [key: string]: Proto2MapEnumPlusExtra }; +}; + +// Describes the message protobuf_unittest.TestEnumMapPlusExtra. Use `create(TestEnumMapPlusExtraDesc)` to create a new TestEnumMapPlusExtra. +export declare const TestEnumMapPlusExtraDesc: TypedDescMessage; + +/** + * @generated from message protobuf_unittest.TestImportEnumMap + */ +export declare type TestImportEnumMap = Message<"protobuf_unittest.TestImportEnumMap"> & { + /** + * @generated from field: map import_enum_amp = 1; + */ + importEnumAmp: { [key: number]: ImportEnumForMap }; +}; + +// Describes the message protobuf_unittest.TestImportEnumMap. Use `create(TestImportEnumMapDesc)` to create a new TestImportEnumMap. +export declare const TestImportEnumMapDesc: TypedDescMessage; + +/** + * @generated from message protobuf_unittest.TestIntIntMap + */ +export declare type TestIntIntMap = Message<"protobuf_unittest.TestIntIntMap"> & { + /** + * @generated from field: map m = 1; + */ + m: { [key: number]: number }; +}; + +// Describes the message protobuf_unittest.TestIntIntMap. Use `create(TestIntIntMapDesc)` to create a new TestIntIntMap. +export declare const TestIntIntMapDesc: TypedDescMessage; + +/** + * Test all key types: string, plus the non-floating-point scalars. + * + * @generated from message protobuf_unittest.TestMaps + */ +export declare type TestMaps = Message<"protobuf_unittest.TestMaps"> & { + /** + * @generated from field: map m_int32 = 1; + */ + mInt32: { [key: number]: TestIntIntMap }; + + /** + * @generated from field: map m_int64 = 2; + */ + mInt64: { [key: string]: TestIntIntMap }; + + /** + * @generated from field: map m_uint32 = 3; + */ + mUint32: { [key: number]: TestIntIntMap }; + + /** + * @generated from field: map m_uint64 = 4; + */ + mUint64: { [key: string]: TestIntIntMap }; + + /** + * @generated from field: map m_sint32 = 5; + */ + mSint32: { [key: number]: TestIntIntMap }; + + /** + * @generated from field: map m_sint64 = 6; + */ + mSint64: { [key: string]: TestIntIntMap }; + + /** + * @generated from field: map m_fixed32 = 7; + */ + mFixed32: { [key: number]: TestIntIntMap }; + + /** + * @generated from field: map m_fixed64 = 8; + */ + mFixed64: { [key: string]: TestIntIntMap }; + + /** + * @generated from field: map m_sfixed32 = 9; + */ + mSfixed32: { [key: number]: TestIntIntMap }; + + /** + * @generated from field: map m_sfixed64 = 10; + */ + mSfixed64: { [key: string]: TestIntIntMap }; + + /** + * @generated from field: map m_bool = 11; + */ + mBool: { [key: string]: TestIntIntMap }; + + /** + * @generated from field: map m_string = 12; + */ + mString: { [key: string]: TestIntIntMap }; +}; + +// Describes the message protobuf_unittest.TestMaps. Use `create(TestMapsDesc)` to create a new TestMaps. +export declare const TestMapsDesc: TypedDescMessage; + +/** + * Test maps in submessages. + * + * @generated from message protobuf_unittest.TestSubmessageMaps + */ +export declare type TestSubmessageMaps = Message<"protobuf_unittest.TestSubmessageMaps"> & { + /** + * @generated from field: optional protobuf_unittest.TestMaps m = 1; + */ + m?: TestMaps; +}; + +// Describes the message protobuf_unittest.TestSubmessageMaps. Use `create(TestSubmessageMapsDesc)` to create a new TestSubmessageMaps. +export declare const TestSubmessageMapsDesc: TypedDescMessage; + +/** + * @generated from message protobuf_unittest.TestProto2BytesMap + */ +export declare type TestProto2BytesMap = Message<"protobuf_unittest.TestProto2BytesMap"> & { + /** + * @generated from field: map map_bytes = 1; + */ + mapBytes: { [key: number]: Uint8Array }; + + /** + * @generated from field: map map_string = 2; + */ + mapString: { [key: number]: string }; +}; + +// Describes the message protobuf_unittest.TestProto2BytesMap. Use `create(TestProto2BytesMapDesc)` to create a new TestProto2BytesMap. +export declare const TestProto2BytesMapDesc: TypedDescMessage; + +/** + * @generated from enum protobuf_unittest.Proto2MapEnum + */ +export enum Proto2MapEnum { + /** + * @generated from enum value: PROTO2_MAP_ENUM_FOO = 0; + */ + FOO = 0, + + /** + * @generated from enum value: PROTO2_MAP_ENUM_BAR = 1; + */ + BAR = 1, + + /** + * @generated from enum value: PROTO2_MAP_ENUM_BAZ = 2; + */ + BAZ = 2, +} + +// Describes the enum protobuf_unittest.Proto2MapEnum. +export declare const Proto2MapEnumDesc: TypedDescEnum; + +/** + * @generated from enum protobuf_unittest.Proto2MapEnumPlusExtra + */ +export enum Proto2MapEnumPlusExtra { + /** + * @generated from enum value: E_PROTO2_MAP_ENUM_FOO = 0; + */ + E_PROTO2_MAP_ENUM_FOO = 0, + + /** + * @generated from enum value: E_PROTO2_MAP_ENUM_BAR = 1; + */ + E_PROTO2_MAP_ENUM_BAR = 1, + + /** + * @generated from enum value: E_PROTO2_MAP_ENUM_BAZ = 2; + */ + E_PROTO2_MAP_ENUM_BAZ = 2, + + /** + * @generated from enum value: E_PROTO2_MAP_ENUM_EXTRA = 3; + */ + E_PROTO2_MAP_ENUM_EXTRA = 3, +} + +// Describes the enum protobuf_unittest.Proto2MapEnumPlusExtra. +export declare const Proto2MapEnumPlusExtraDesc: TypedDescEnum; + diff --git a/packages/protobuf-test/src/gen/js/google/protobuf/map_proto2_unittest_pbv2.js b/packages/protobuf-test/src/gen/js/google/protobuf/map_proto2_unittest_pbv2.js new file mode 100644 index 000000000..500b3e1fa --- /dev/null +++ b/packages/protobuf-test/src/gen/js/google/protobuf/map_proto2_unittest_pbv2.js @@ -0,0 +1,64 @@ +// Copyright 2021-2024 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// @generated by protoc-gen-es-next v1.7.2 with parameter "ts_nocheck=false,target=js+dts" +// @generated from file google/protobuf/map_proto2_unittest.proto (package protobuf_unittest, syntax proto2) +/* eslint-disable */ + +// We don't put this in a package within proto2 because we need to make sure +// that the generated code doesn't depend on being in the proto2 namespace. +// In map_test_util.h we do "using namespace unittest = protobuf_unittest". + +import { enumDesc, fileDesc, messageDesc, tsEnum } from "@bufbuild/protobuf/next/codegenv1"; +import { fileDesc_google_protobuf_unittest_import } from "./unittest_import_pbv2.js"; + +export const fileDesc_google_protobuf_map_proto2_unittest = fileDesc("Cilnb29nbGUvcHJvdG9idWYvbWFwX3Byb3RvMl91bml0dGVzdC5wcm90bxIRcHJvdG9idWZfdW5pdHRlc3QiyRQKC1Rlc3RFbnVtTWFwEkoKD2tub3duX21hcF9maWVsZBhlIAMoCzIxLnByb3RvYnVmX3VuaXR0ZXN0LlRlc3RFbnVtTWFwLktub3duTWFwRmllbGRFbnRyeRJOChF1bmtub3duX21hcF9maWVsZBhmIAMoCzIzLnByb3RvYnVmX3VuaXR0ZXN0LlRlc3RFbnVtTWFwLlVua25vd25NYXBGaWVsZEVudHJ5EloKF3Vua25vd25fbWFwX2ZpZWxkX2ludDY0GMgBIAMoCzI4LnByb3RvYnVmX3VuaXR0ZXN0LlRlc3RFbnVtTWFwLlVua25vd25NYXBGaWVsZEludDY0RW50cnkSXAoYdW5rbm93bl9tYXBfZmllbGRfdWludDY0GMkBIAMoCzI5LnByb3RvYnVmX3VuaXR0ZXN0LlRlc3RFbnVtTWFwLlVua25v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Byb3RvYnVmX3VuaXR0ZXN0LlRlc3RQcm90bzJCeXRlc01hcC5NYXBCeXRlc0VudHJ5EkgKCm1hcF9zdHJpbmcYAiADKAsyNC5wcm90b2J1Zl91bml0dGVzdC5UZXN0UHJvdG8yQnl0ZXNNYXAuTWFwU3RyaW5nRW50cnkaLwoNTWFwQnl0ZXNFbnRyeRILCgNrZXkYASABKAUSDQoFdmFsdWUYAiABKAw6AjgBGjAKDk1hcFN0cmluZ0VudHJ5EgsKA2tleRgBIAEoBRINCgV2YWx1ZRgCIAEoCToCOAEqWgoNUHJvdG8yTWFwRW51bRIXChNQUk9UTzJfTUFQX0VOVU1fRk9PEAASFwoTUFJPVE8yX01BUF9FTlVNX0JBUhABEhcKE1BST1RPMl9NQVBfRU5VTV9CQVoQAiqGAQoWUHJvdG8yTWFwRW51bVBsdXNFeHRyYRIZChVFX1BST1RPMl9NQVBfRU5VTV9GT08QABIZChVFX1BST1RPMl9NQVBfRU5VTV9CQVIQARIZChVFX1BST1RPMl9NQVBfRU5VTV9CQVoQAhIbChdFX1BST1RPMl9NQVBfRU5VTV9FWFRSQRADQgP4AQE", [fileDesc_google_protobuf_unittest_import]); + +// Describes the message protobuf_unittest.TestEnumMap. Use `create(TestEnumMapDesc)` to create a new TestEnumMap. +export const TestEnumMapDesc = messageDesc(fileDesc_google_protobuf_map_proto2_unittest, 0); + +// Describes the message protobuf_unittest.TestEnumMapPlusExtra. Use `create(TestEnumMapPlusExtraDesc)` to create a new TestEnumMapPlusExtra. +export const TestEnumMapPlusExtraDesc = messageDesc(fileDesc_google_protobuf_map_proto2_unittest, 1); + +// Describes the message protobuf_unittest.TestImportEnumMap. Use `create(TestImportEnumMapDesc)` to create a new TestImportEnumMap. +export const TestImportEnumMapDesc = messageDesc(fileDesc_google_protobuf_map_proto2_unittest, 2); + +// Describes the message protobuf_unittest.TestIntIntMap. Use `create(TestIntIntMapDesc)` to create a new TestIntIntMap. +export const TestIntIntMapDesc = messageDesc(fileDesc_google_protobuf_map_proto2_unittest, 3); + +// Describes the message protobuf_unittest.TestMaps. Use `create(TestMapsDesc)` to create a new TestMaps. +export const TestMapsDesc = messageDesc(fileDesc_google_protobuf_map_proto2_unittest, 4); + +// Describes the message protobuf_unittest.TestSubmessageMaps. Use `create(TestSubmessageMapsDesc)` to create a new TestSubmessageMaps. +export const TestSubmessageMapsDesc = messageDesc(fileDesc_google_protobuf_map_proto2_unittest, 5); + +// Describes the message protobuf_unittest.TestProto2BytesMap. Use `create(TestProto2BytesMapDesc)` to create a new TestProto2BytesMap. +export const TestProto2BytesMapDesc = messageDesc(fileDesc_google_protobuf_map_proto2_unittest, 6); + +// Describes the enum protobuf_unittest.Proto2MapEnum. +export const Proto2MapEnumDesc = enumDesc(fileDesc_google_protobuf_map_proto2_unittest, 0); + +/** + * @generated from enum protobuf_unittest.Proto2MapEnum + */ +export const Proto2MapEnum = tsEnum(Proto2MapEnumDesc); + +// Describes the enum protobuf_unittest.Proto2MapEnumPlusExtra. +export const Proto2MapEnumPlusExtraDesc = enumDesc(fileDesc_google_protobuf_map_proto2_unittest, 1); + +/** + * @generated from enum protobuf_unittest.Proto2MapEnumPlusExtra + */ +export const Proto2MapEnumPlusExtra = tsEnum(Proto2MapEnumPlusExtraDesc); + diff --git a/packages/protobuf-test/src/gen/js/google/protobuf/map_unittest_pbv2.d.ts b/packages/protobuf-test/src/gen/js/google/protobuf/map_unittest_pbv2.d.ts new file mode 100644 index 000000000..268d9d378 --- /dev/null +++ b/packages/protobuf-test/src/gen/js/google/protobuf/map_unittest_pbv2.d.ts @@ -0,0 +1,368 @@ +// Copyright 2021-2024 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// @generated by protoc-gen-es-next v1.7.2 with parameter "ts_nocheck=false,target=js+dts" +// @generated from file google/protobuf/map_unittest.proto (package protobuf_unittest, syntax proto3) +/* eslint-disable */ + +// We don't put this in a package within proto2 because we need to make sure +// that the generated code doesn't depend on being in the proto2 namespace. +// In map_test_util.h we do "using namespace unittest = protobuf_unittest". + +import type { DescFile } from "@bufbuild/protobuf"; +import type { Message } from "@bufbuild/protobuf/next"; +import type { ForeignMessage, TestAllTypes, TestRequired } from "./unittest_pbv2.js"; +import type { TypedDescEnum, TypedDescMessage } from "@bufbuild/protobuf/next/codegenv1"; + +export declare const fileDesc_google_protobuf_map_unittest: DescFile; + +/** + * Tests maps. + * + * @generated from message protobuf_unittest.TestMap + */ +export declare type TestMap = Message<"protobuf_unittest.TestMap"> & { + /** + * @generated from field: map map_int32_int32 = 1; + */ + mapInt32Int32: { [key: number]: number }; + + /** + * @generated from field: map map_int64_int64 = 2; + */ + mapInt64Int64: { [key: string]: bigint }; + + /** + * @generated from field: map map_uint32_uint32 = 3; + */ + mapUint32Uint32: { [key: number]: number }; + + /** + * @generated from field: map map_uint64_uint64 = 4; + */ + mapUint64Uint64: { [key: string]: bigint }; + + /** + * @generated from field: map map_sint32_sint32 = 5; + */ + mapSint32Sint32: { [key: number]: number }; + + /** + * @generated from field: map map_sint64_sint64 = 6; + */ + mapSint64Sint64: { [key: string]: bigint }; + + /** + * @generated from field: map map_fixed32_fixed32 = 7; + */ + mapFixed32Fixed32: { [key: number]: number }; + + /** + * @generated from field: map map_fixed64_fixed64 = 8; + */ + mapFixed64Fixed64: { [key: string]: bigint }; + + /** + * @generated from field: map map_sfixed32_sfixed32 = 9; + */ + mapSfixed32Sfixed32: { [key: number]: number }; + + /** + * @generated from field: map map_sfixed64_sfixed64 = 10; + */ + mapSfixed64Sfixed64: { [key: string]: bigint }; + + /** + * @generated from field: map map_int32_float = 11; + */ + mapInt32Float: { [key: number]: number }; + + /** + * @generated from field: map map_int32_double = 12; + */ + mapInt32Double: { [key: number]: number }; + + /** + * @generated from field: map map_bool_bool = 13; + */ + mapBoolBool: { [key: string]: boolean }; + + /** + * @generated from field: map map_string_string = 14; + */ + mapStringString: { [key: string]: string }; + + /** + * @generated from field: map map_int32_bytes = 15; + */ + mapInt32Bytes: { [key: number]: Uint8Array }; + + /** + * @generated from field: map map_int32_enum = 16; + */ + mapInt32Enum: { [key: number]: MapEnum }; + + /** + * @generated from field: map map_int32_foreign_message = 17; + */ + mapInt32ForeignMessage: { [key: number]: ForeignMessage }; + + /** + * @generated from field: map map_string_foreign_message = 18; + */ + mapStringForeignMessage: { [key: string]: ForeignMessage }; + + /** + * @generated from field: map map_int32_all_types = 19; + */ + mapInt32AllTypes: { [key: number]: TestAllTypes }; +}; + +// Describes the message protobuf_unittest.TestMap. Use `create(TestMapDesc)` to create a new TestMap. +export declare const TestMapDesc: TypedDescMessage; + +/** + * @generated from message protobuf_unittest.TestMapSubmessage + */ +export declare type TestMapSubmessage = Message<"protobuf_unittest.TestMapSubmessage"> & { + /** + * @generated from field: protobuf_unittest.TestMap test_map = 1; + */ + testMap?: TestMap; +}; + +// Describes the message protobuf_unittest.TestMapSubmessage. Use `create(TestMapSubmessageDesc)` to create a new TestMapSubmessage. +export declare const TestMapSubmessageDesc: TypedDescMessage; + +/** + * @generated from message protobuf_unittest.TestMessageMap + */ +export declare type TestMessageMap = Message<"protobuf_unittest.TestMessageMap"> & { + /** + * @generated from field: map map_int32_message = 1; + */ + mapInt32Message: { [key: number]: TestAllTypes }; +}; + +// Describes the message protobuf_unittest.TestMessageMap. Use `create(TestMessageMapDesc)` to create a new TestMessageMap. +export declare const TestMessageMapDesc: TypedDescMessage; + +/** + * Two map fields share the same entry default instance. + * + * @generated from message protobuf_unittest.TestSameTypeMap + */ +export declare type TestSameTypeMap = Message<"protobuf_unittest.TestSameTypeMap"> & { + /** + * @generated from field: map map1 = 1; + */ + map1: { [key: number]: number }; + + /** + * @generated from field: map map2 = 2; + */ + map2: { [key: number]: number }; +}; + +// Describes the message protobuf_unittest.TestSameTypeMap. Use `create(TestSameTypeMapDesc)` to create a new TestSameTypeMap. +export declare const TestSameTypeMapDesc: TypedDescMessage; + +/** + * Test embedded message with required fields + * + * @generated from message protobuf_unittest.TestRequiredMessageMap + */ +export declare type TestRequiredMessageMap = Message<"protobuf_unittest.TestRequiredMessageMap"> & { + /** + * @generated from field: map map_field = 1; + */ + mapField: { [key: number]: TestRequired }; +}; + +// Describes the message protobuf_unittest.TestRequiredMessageMap. Use `create(TestRequiredMessageMapDesc)` to create a new TestRequiredMessageMap. +export declare const TestRequiredMessageMapDesc: TypedDescMessage; + +/** + * @generated from message protobuf_unittest.TestArenaMap + */ +export declare type TestArenaMap = Message<"protobuf_unittest.TestArenaMap"> & { + /** + * @generated from field: map map_int32_int32 = 1; + */ + mapInt32Int32: { [key: number]: number }; + + /** + * @generated from field: map map_int64_int64 = 2; + */ + mapInt64Int64: { [key: string]: bigint }; + + /** + * @generated from field: map map_uint32_uint32 = 3; + */ + mapUint32Uint32: { [key: number]: number }; + + /** + * @generated from field: map map_uint64_uint64 = 4; + */ + mapUint64Uint64: { [key: string]: bigint }; + + /** + * @generated from field: map map_sint32_sint32 = 5; + */ + mapSint32Sint32: { [key: number]: number }; + + /** + * @generated from field: map map_sint64_sint64 = 6; + */ + mapSint64Sint64: { [key: string]: bigint }; + + /** + * @generated from field: map map_fixed32_fixed32 = 7; + */ + mapFixed32Fixed32: { [key: number]: number }; + + /** + * @generated from field: map map_fixed64_fixed64 = 8; + */ + mapFixed64Fixed64: { [key: string]: bigint }; + + /** + * @generated from field: map map_sfixed32_sfixed32 = 9; + */ + mapSfixed32Sfixed32: { [key: number]: number }; + + /** + * @generated from field: map map_sfixed64_sfixed64 = 10; + */ + mapSfixed64Sfixed64: { [key: string]: bigint }; + + /** + * @generated from field: map map_int32_float = 11; + */ + mapInt32Float: { [key: number]: number }; + + /** + * @generated from field: map map_int32_double = 12; + */ + mapInt32Double: { [key: number]: number }; + + /** + * @generated from field: map map_bool_bool = 13; + */ + mapBoolBool: { [key: string]: boolean }; + + /** + * @generated from field: map map_string_string = 14; + */ + mapStringString: { [key: string]: string }; + + /** + * @generated from field: map map_int32_bytes = 15; + */ + mapInt32Bytes: { [key: number]: Uint8Array }; + + /** + * @generated from field: map map_int32_enum = 16; + */ + mapInt32Enum: { [key: number]: MapEnum }; + + /** + * @generated from field: map map_int32_foreign_message = 17; + */ + mapInt32ForeignMessage: { [key: number]: ForeignMessage }; +}; + +// Describes the message protobuf_unittest.TestArenaMap. Use `create(TestArenaMapDesc)` to create a new TestArenaMap. +export declare const TestArenaMapDesc: TypedDescMessage; + +/** + * Previously, message containing enum called Type cannot be used as value of + * map field. + * + * @generated from message protobuf_unittest.MessageContainingEnumCalledType + */ +export declare type MessageContainingEnumCalledType = Message<"protobuf_unittest.MessageContainingEnumCalledType"> & { + /** + * @generated from field: map type = 1; + */ + type: { [key: string]: MessageContainingEnumCalledType }; +}; + +// Describes the message protobuf_unittest.MessageContainingEnumCalledType. Use `create(MessageContainingEnumCalledTypeDesc)` to create a new MessageContainingEnumCalledType. +export declare const MessageContainingEnumCalledTypeDesc: TypedDescMessage; + +/** + * @generated from enum protobuf_unittest.MessageContainingEnumCalledType.Type + */ +export enum MessageContainingEnumCalledType_Type { + /** + * @generated from enum value: TYPE_FOO = 0; + */ + FOO = 0, +} + +// Describes the enum protobuf_unittest.MessageContainingEnumCalledType.Type. +export declare const MessageContainingEnumCalledType_TypeDesc: TypedDescEnum; + +/** + * Previously, message cannot contain map field called "entry". + * + * @generated from message protobuf_unittest.MessageContainingMapCalledEntry + */ +export declare type MessageContainingMapCalledEntry = Message<"protobuf_unittest.MessageContainingMapCalledEntry"> & { + /** + * @generated from field: map entry = 1; + */ + entry: { [key: number]: number }; +}; + +// Describes the message protobuf_unittest.MessageContainingMapCalledEntry. Use `create(MessageContainingMapCalledEntryDesc)` to create a new MessageContainingMapCalledEntry. +export declare const MessageContainingMapCalledEntryDesc: TypedDescMessage; + +/** + * @generated from message protobuf_unittest.TestRecursiveMapMessage + */ +export declare type TestRecursiveMapMessage = Message<"protobuf_unittest.TestRecursiveMapMessage"> & { + /** + * @generated from field: map a = 1; + */ + a: { [key: string]: TestRecursiveMapMessage }; +}; + +// Describes the message protobuf_unittest.TestRecursiveMapMessage. Use `create(TestRecursiveMapMessageDesc)` to create a new TestRecursiveMapMessage. +export declare const TestRecursiveMapMessageDesc: TypedDescMessage; + +/** + * @generated from enum protobuf_unittest.MapEnum + */ +export enum MapEnum { + /** + * @generated from enum value: MAP_ENUM_FOO = 0; + */ + FOO = 0, + + /** + * @generated from enum value: MAP_ENUM_BAR = 1; + */ + BAR = 1, + + /** + * @generated from enum value: MAP_ENUM_BAZ = 2; + */ + BAZ = 2, +} + +// Describes the enum protobuf_unittest.MapEnum. +export declare const MapEnumDesc: TypedDescEnum; + diff --git a/packages/protobuf-test/src/gen/js/google/protobuf/map_unittest_pbv2.js b/packages/protobuf-test/src/gen/js/google/protobuf/map_unittest_pbv2.js new file mode 100644 index 000000000..0385f5847 --- /dev/null +++ b/packages/protobuf-test/src/gen/js/google/protobuf/map_unittest_pbv2.js @@ -0,0 +1,70 @@ +// Copyright 2021-2024 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// @generated by protoc-gen-es-next v1.7.2 with parameter "ts_nocheck=false,target=js+dts" +// @generated from file google/protobuf/map_unittest.proto (package protobuf_unittest, syntax proto3) +/* eslint-disable */ + +// We don't put this in a package within proto2 because we need to make sure +// that the generated code doesn't depend on being in the proto2 namespace. +// In map_test_util.h we do "using namespace unittest = protobuf_unittest". + +import { enumDesc, fileDesc, messageDesc, tsEnum } from "@bufbuild/protobuf/next/codegenv1"; +import { fileDesc_google_protobuf_unittest } from "./unittest_pbv2.js"; + +export const fileDesc_google_protobuf_map_unittest = fileDesc("CiJnb29nbGUvcHJvdG9idWYvbWFwX3VuaXR0ZXN0LnByb3RvEhFwcm90b2J1Zl91bml0dGVzdCL/FAoHVGVzdE1hcBJGCg9tYXBfaW50MzJfaW50MzIYASADKAsyLS5wcm90b2J1Zl91bml0dGVzdC5UZXN0TWFwLk1hcEludDMySW50MzJFbnRyeRJGCg9tYXBfaW50NjRfaW50NjQYAiADKAsyLS5wcm90b2J1Zl91bml0dGVzdC5UZXN0TWFwLk1hcEludDY0SW50NjRFbnRyeRJKChFtYXBfdWludDMyX3VpbnQzMhgDIAMoCzIvLnByb3RvYnVmX3VuaXR0ZXN0LlRlc3RNYXAuTWFwVWludDMyVWludDMyRW50cnkSSgoRbWFwX3VpbnQ2NF91aW50NjQYBCADKAsyLy5wcm90b2J1Zl91bml0dGVzdC5UZXN0TWFwLk1hcFVpbnQ2NFVpbnQ2NEVudHJ5EkoKEW1hcF9zaW50MzJfc2ludDMyGAUgAygLMi8ucHJvdG9idWZfdW5pdHRlc3QuVGVzdE1hcC5NYXBTaW50MzJTaW50MzJFbnRyeRJKChFtYXBfc2ludDY0X3NpbnQ2NBgGIAMoCzIvLnByb3RvYnVmX3VuaXR0ZXN0LlRlc3RNYXAuTWFwU2ludDY0U2ludDY0RW50cnkSTgoTbWFwX2ZpeGVkMzJfZml4ZWQzMhgHIAMoCzIxLnByb3RvYnVmX3VuaXR0ZXN0LlRlc3RNYXAuTWFwRml4ZWQzMkZpeGVkMzJFbnRyeRJOChNtYXBfZml4ZWQ2NF9maXhlZDY0GAggAygLMjEucHJvdG9idWZfdW5pdHRlc3QuVGVzdE1hcC5NYXBGaXhlZDY0Rml4ZWQ2NEVudHJ5ElIKFW1hcF9zZml4ZWQzMl9zZml4ZWQzMhgJIAMoCzIzLnByb3RvYnVmX3VuaXR0ZX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rZXkYASABKAkSOQoFdmFsdWUYAiABKAsyKi5wcm90b2J1Zl91bml0dGVzdC5UZXN0UmVjdXJzaXZlTWFwTWVzc2FnZToCOAEqPwoHTWFwRW51bRIQCgxNQVBfRU5VTV9GT08QABIQCgxNQVBfRU5VTV9CQVIQARIQCgxNQVBfRU5VTV9CQVoQAkID+AEBYgZwcm90bzM", [fileDesc_google_protobuf_unittest]); + +// Describes the message protobuf_unittest.TestMap. Use `create(TestMapDesc)` to create a new TestMap. +export const TestMapDesc = messageDesc(fileDesc_google_protobuf_map_unittest, 0); + +// Describes the message protobuf_unittest.TestMapSubmessage. Use `create(TestMapSubmessageDesc)` to create a new TestMapSubmessage. +export const TestMapSubmessageDesc = messageDesc(fileDesc_google_protobuf_map_unittest, 1); + +// Describes the message protobuf_unittest.TestMessageMap. Use `create(TestMessageMapDesc)` to create a new TestMessageMap. +export const TestMessageMapDesc = messageDesc(fileDesc_google_protobuf_map_unittest, 2); + +// Describes the message protobuf_unittest.TestSameTypeMap. Use `create(TestSameTypeMapDesc)` to create a new TestSameTypeMap. +export const TestSameTypeMapDesc = messageDesc(fileDesc_google_protobuf_map_unittest, 3); + +// Describes the message protobuf_unittest.TestRequiredMessageMap. Use `create(TestRequiredMessageMapDesc)` to create a new TestRequiredMessageMap. +export const TestRequiredMessageMapDesc = messageDesc(fileDesc_google_protobuf_map_unittest, 4); + +// Describes the message protobuf_unittest.TestArenaMap. Use `create(TestArenaMapDesc)` to create a new TestArenaMap. +export const TestArenaMapDesc = messageDesc(fileDesc_google_protobuf_map_unittest, 5); + +// Describes the message protobuf_unittest.MessageContainingEnumCalledType. Use `create(MessageContainingEnumCalledTypeDesc)` to create a new MessageContainingEnumCalledType. +export const MessageContainingEnumCalledTypeDesc = messageDesc(fileDesc_google_protobuf_map_unittest, 6); + +// Describes the enum protobuf_unittest.MessageContainingEnumCalledType.Type. +export const MessageContainingEnumCalledType_TypeDesc = enumDesc(fileDesc_google_protobuf_map_unittest, 6, 0); + +/** + * @generated from enum protobuf_unittest.MessageContainingEnumCalledType.Type + */ +export const MessageContainingEnumCalledType_Type = tsEnum(MessageContainingEnumCalledType_TypeDesc); + +// Describes the message protobuf_unittest.MessageContainingMapCalledEntry. Use `create(MessageContainingMapCalledEntryDesc)` to create a new MessageContainingMapCalledEntry. +export const MessageContainingMapCalledEntryDesc = messageDesc(fileDesc_google_protobuf_map_unittest, 7); + +// Describes the message protobuf_unittest.TestRecursiveMapMessage. Use `create(TestRecursiveMapMessageDesc)` to create a new TestRecursiveMapMessage. +export const TestRecursiveMapMessageDesc = messageDesc(fileDesc_google_protobuf_map_unittest, 8); + +// Describes the enum protobuf_unittest.MapEnum. +export const MapEnumDesc = enumDesc(fileDesc_google_protobuf_map_unittest, 0); + +/** + * @generated from enum protobuf_unittest.MapEnum + */ +export const MapEnum = tsEnum(MapEnumDesc); + diff --git a/packages/protobuf-test/src/gen/js/google/protobuf/source_context_pbv2.d.ts b/packages/protobuf-test/src/gen/js/google/protobuf/source_context_pbv2.d.ts new file mode 100644 index 000000000..82c0e67f7 --- /dev/null +++ b/packages/protobuf-test/src/gen/js/google/protobuf/source_context_pbv2.d.ts @@ -0,0 +1,43 @@ +// Copyright 2021-2024 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// @generated by protoc-gen-es-next v1.7.2 with parameter "ts_nocheck=false,target=js+dts" +// @generated from file google/protobuf/source_context.proto (package google.protobuf, syntax proto3) +/* eslint-disable */ + +import type { DescFile } from "@bufbuild/protobuf"; +import type { Message } from "@bufbuild/protobuf/next"; +import type { TypedDescMessage } from "@bufbuild/protobuf/next/codegenv1"; + +export declare const fileDesc_google_protobuf_source_context: DescFile; + +/** + * `SourceContext` represents information about the source of a + * protobuf element, like the file in which it is defined. + * + * @generated from message google.protobuf.SourceContext + */ +export declare type SourceContext = Message<"google.protobuf.SourceContext"> & { + /** + * The path-qualified name of the .proto file that contained the associated + * protobuf element. For example: `"google/protobuf/source_context.proto"`. + * + * @generated from field: string file_name = 1; + */ + fileName: string; +}; + +// Describes the message google.protobuf.SourceContext. Use `create(SourceContextDesc)` to create a new SourceContext. +export declare const SourceContextDesc: TypedDescMessage; + diff --git a/packages/protobuf-test/src/gen/js/google/protobuf/source_context_pbv2.js b/packages/protobuf-test/src/gen/js/google/protobuf/source_context_pbv2.js new file mode 100644 index 000000000..186e337f1 --- /dev/null +++ b/packages/protobuf-test/src/gen/js/google/protobuf/source_context_pbv2.js @@ -0,0 +1,25 @@ +// Copyright 2021-2024 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// @generated by protoc-gen-es-next v1.7.2 with parameter "ts_nocheck=false,target=js+dts" +// @generated from file google/protobuf/source_context.proto (package google.protobuf, syntax proto3) +/* eslint-disable */ + +import { fileDesc, messageDesc } from "@bufbuild/protobuf/next/codegenv1"; + +export const fileDesc_google_protobuf_source_context = fileDesc("CiRnb29nbGUvcHJvdG9idWYvc291cmNlX2NvbnRleHQucHJvdG8SD2dvb2dsZS5wcm90b2J1ZiIiCg1Tb3VyY2VDb250ZXh0EhEKCWZpbGVfbmFtZRgBIAEoCUKKAQoTY29tLmdvb2dsZS5wcm90b2J1ZkISU291cmNlQ29udGV4dFByb3RvUAFaNmdvb2dsZS5nb2xhbmcub3JnL3Byb3RvYnVmL3R5cGVzL2tub3duL3NvdXJjZWNvbnRleHRwYqICA0dQQqoCHkdvb2dsZS5Qcm90b2J1Zi5XZWxsS25vd25UeXBlc2IGcHJvdG8z"); + +// Describes the message google.protobuf.SourceContext. Use `create(SourceContextDesc)` to create a new SourceContext. +export const SourceContextDesc = messageDesc(fileDesc_google_protobuf_source_context, 0); + diff --git a/packages/protobuf-test/src/gen/js/google/protobuf/struct_pbv2.d.ts b/packages/protobuf-test/src/gen/js/google/protobuf/struct_pbv2.d.ts new file mode 100644 index 000000000..6f2c43819 --- /dev/null +++ b/packages/protobuf-test/src/gen/js/google/protobuf/struct_pbv2.d.ts @@ -0,0 +1,157 @@ +// Copyright 2021-2024 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// @generated by protoc-gen-es-next v1.7.2 with parameter "ts_nocheck=false,target=js+dts" +// @generated from file google/protobuf/struct.proto (package google.protobuf, syntax proto3) +/* eslint-disable */ + +import type { DescFile } from "@bufbuild/protobuf"; +import type { Message } from "@bufbuild/protobuf/next"; +import type { TypedDescEnum, TypedDescMessage } from "@bufbuild/protobuf/next/codegenv1"; + +export declare const fileDesc_google_protobuf_struct: DescFile; + +/** + * `Struct` represents a structured data value, consisting of fields + * which map to dynamically typed values. In some languages, `Struct` + * might be supported by a native representation. For example, in + * scripting languages like JS a struct is represented as an + * object. The details of that representation are described together + * with the proto support for the language. + * + * The JSON representation for `Struct` is JSON object. + * + * @generated from message google.protobuf.Struct + */ +export declare type Struct = Message<"google.protobuf.Struct"> & { + /** + * Unordered map of dynamically typed values. + * + * @generated from field: map fields = 1; + */ + fields: { [key: string]: Value }; +}; + +// Describes the message google.protobuf.Struct. Use `create(StructDesc)` to create a new Struct. +export declare const StructDesc: TypedDescMessage; + +/** + * `Value` represents a dynamically typed value which can be either + * null, a number, a string, a boolean, a recursive struct value, or a + * list of values. A producer of value is expected to set one of these + * variants. Absence of any variant indicates an error. + * + * The JSON representation for `Value` is JSON value. + * + * @generated from message google.protobuf.Value + */ +export declare type Value = Message<"google.protobuf.Value"> & { + /** + * The kind of value. + * + * @generated from oneof google.protobuf.Value.kind + */ + kind: { + /** + * Represents a null value. + * + * @generated from field: google.protobuf.NullValue null_value = 1; + */ + value: NullValue; + case: "nullValue"; + } | { + /** + * Represents a double value. + * + * @generated from field: double number_value = 2; + */ + value: number; + case: "numberValue"; + } | { + /** + * Represents a string value. + * + * @generated from field: string string_value = 3; + */ + value: string; + case: "stringValue"; + } | { + /** + * Represents a boolean value. + * + * @generated from field: bool bool_value = 4; + */ + value: boolean; + case: "boolValue"; + } | { + /** + * Represents a structured value. + * + * @generated from field: google.protobuf.Struct struct_value = 5; + */ + value: Struct; + case: "structValue"; + } | { + /** + * Represents a repeated `Value`. + * + * @generated from field: google.protobuf.ListValue list_value = 6; + */ + value: ListValue; + case: "listValue"; + } | { case: undefined; value?: undefined }; +}; + +// Describes the message google.protobuf.Value. Use `create(ValueDesc)` to create a new Value. +export declare const ValueDesc: TypedDescMessage; + +/** + * `ListValue` is a wrapper around a repeated field of values. + * + * The JSON representation for `ListValue` is JSON array. + * + * @generated from message google.protobuf.ListValue + */ +export declare type ListValue = Message<"google.protobuf.ListValue"> & { + /** + * Repeated field of dynamically typed values. + * + * @generated from field: repeated google.protobuf.Value values = 1; + */ + values: Value[]; +}; + +// Describes the message google.protobuf.ListValue. Use `create(ListValueDesc)` to create a new ListValue. +export declare const ListValueDesc: TypedDescMessage; + +/** + * `NullValue` is a singleton enumeration to represent the null value for the + * `Value` type union. + * + * The JSON representation for `NullValue` is JSON `null`. + * + * @generated from enum google.protobuf.NullValue + */ +export enum NullValue { + /** + * Null value. + * + * @generated from enum value: NULL_VALUE = 0; + */ + NULL_VALUE = 0, +} + +// Describes the enum google.protobuf.NullValue. +export declare const NullValueDesc: TypedDescEnum; + diff --git a/packages/protobuf-test/src/gen/js/google/protobuf/struct_pbv2.js b/packages/protobuf-test/src/gen/js/google/protobuf/struct_pbv2.js new file mode 100644 index 000000000..bfc8f182f --- /dev/null +++ b/packages/protobuf-test/src/gen/js/google/protobuf/struct_pbv2.js @@ -0,0 +1,44 @@ +// Copyright 2021-2024 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// @generated by protoc-gen-es-next v1.7.2 with parameter "ts_nocheck=false,target=js+dts" +// @generated from file google/protobuf/struct.proto (package google.protobuf, syntax proto3) +/* eslint-disable */ + +import { enumDesc, fileDesc, messageDesc, tsEnum } from "@bufbuild/protobuf/next/codegenv1"; + +export const fileDesc_google_protobuf_struct = fileDesc("Chxnb29nbGUvcHJvdG9idWYvc3RydWN0LnByb3RvEg9nb29nbGUucHJvdG9idWYihAEKBlN0cnVjdBIzCgZmaWVsZHMYASADKAsyIy5nb29nbGUucHJvdG9idWYuU3RydWN0LkZpZWxkc0VudHJ5GkUKC0ZpZWxkc0VudHJ5EgsKA2tleRgBIAEoCRIlCgV2YWx1ZRgCIAEoCzIWLmdvb2dsZS5wcm90b2J1Zi5WYWx1ZToCOAEi6gEKBVZhbHVlEjAKCm51bGxfdmFsdWUYASABKA4yGi5nb29nbGUucHJvdG9idWYuTnVsbFZhbHVlSAASFgoMbnVtYmVyX3ZhbHVlGAIgASgBSAASFgoMc3RyaW5nX3ZhbHVlGAMgASgJSAASFAoKYm9vbF92YWx1ZRgEIAEoCEgAEi8KDHN0cnVjdF92YWx1ZRgFIAEoCzIXLmdvb2dsZS5wcm90b2J1Zi5TdHJ1Y3RIABIwCgpsaXN0X3ZhbHVlGAYgASgLMhouZ29vZ2xlLnByb3RvYnVmLkxpc3RWYWx1ZUgAQgYKBGtpbmQiMwoJTGlzdFZhbHVlEiYKBnZhbHVlcxgBIAMoCzIWLmdvb2dsZS5wcm90b2J1Zi5WYWx1ZSobCglOdWxsVmFsdWUSDgoKTlVMTF9WQUxVRRAAQn8KE2NvbS5nb29nbGUucHJvdG9idWZCC1N0cnVjdFByb3RvUAFaL2dvb2dsZS5nb2xhbmcub3JnL3Byb3RvYnVmL3R5cGVzL2tub3duL3N0cnVjdHBi+AEBogIDR1BCqgIeR29vZ2xlLlByb3RvYnVmLldlbGxLbm93blR5cGVzYgZwcm90bzM"); + +// Describes the message google.protobuf.Struct. Use `create(StructDesc)` to create a new Struct. +export const StructDesc = messageDesc(fileDesc_google_protobuf_struct, 0); + +// Describes the message google.protobuf.Value. Use `create(ValueDesc)` to create a new Value. +export const ValueDesc = messageDesc(fileDesc_google_protobuf_struct, 1); + +// Describes the message google.protobuf.ListValue. Use `create(ListValueDesc)` to create a new ListValue. +export const ListValueDesc = messageDesc(fileDesc_google_protobuf_struct, 2); + +// Describes the enum google.protobuf.NullValue. +export const NullValueDesc = enumDesc(fileDesc_google_protobuf_struct, 0); + +/** + * `NullValue` is a singleton enumeration to represent the null value for the + * `Value` type union. + * + * The JSON representation for `NullValue` is JSON `null`. + * + * @generated from enum google.protobuf.NullValue + */ +export const NullValue = tsEnum(NullValueDesc); + diff --git a/packages/protobuf-test/src/gen/js/google/protobuf/test_messages_proto2_pbv2.d.ts b/packages/protobuf-test/src/gen/js/google/protobuf/test_messages_proto2_pbv2.d.ts new file mode 100644 index 000000000..2b93a431b --- /dev/null +++ b/packages/protobuf-test/src/gen/js/google/protobuf/test_messages_proto2_pbv2.d.ts @@ -0,0 +1,1342 @@ +// Copyright 2021-2024 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// LINT: ALLOW_GROUPS + +// @generated by protoc-gen-es-next v1.7.2 with parameter "ts_nocheck=false,target=js+dts" +// @generated from file google/protobuf/test_messages_proto2.proto (package protobuf_test_messages.proto2, syntax proto2) +/* eslint-disable */ + +import type { DescFile } from "@bufbuild/protobuf"; +import type { Message } from "@bufbuild/protobuf/next"; +import type { TypedDescEnum, TypedDescExtension, TypedDescMessage } from "@bufbuild/protobuf/next/codegenv1"; + +export declare const fileDesc_google_protobuf_test_messages_proto2: DescFile; + +/** + * This proto includes every type of field in both singular and repeated + * forms. + * + * Also, crucially, all messages and enums in this file are eventually + * submessages of this message. So for example, a fuzz test of TestAllTypes + * could trigger bugs that occur in any message type in this file. We verify + * this stays true in a unit test. + * + * @generated from message protobuf_test_messages.proto2.TestAllTypesProto2 + */ +export declare type TestAllTypesProto2 = Message<"protobuf_test_messages.proto2.TestAllTypesProto2"> & { + /** + * Singular + * + * @generated from field: optional int32 optional_int32 = 1; + */ + optionalInt32: number; + + /** + * @generated from field: optional int64 optional_int64 = 2; + */ + optionalInt64: bigint; + + /** + * @generated from field: optional uint32 optional_uint32 = 3; + */ + optionalUint32: number; + + /** + * @generated from field: optional uint64 optional_uint64 = 4; + */ + optionalUint64: bigint; + + /** + * @generated from field: optional sint32 optional_sint32 = 5; + */ + optionalSint32: number; + + /** + * @generated from field: optional sint64 optional_sint64 = 6; + */ + optionalSint64: bigint; + + /** + * @generated from field: optional fixed32 optional_fixed32 = 7; + */ + optionalFixed32: number; + + /** + * @generated from field: optional fixed64 optional_fixed64 = 8; + */ + optionalFixed64: bigint; + + /** + * @generated from field: optional sfixed32 optional_sfixed32 = 9; + */ + optionalSfixed32: number; + + /** + * @generated from field: optional sfixed64 optional_sfixed64 = 10; + */ + optionalSfixed64: bigint; + + /** + * @generated from field: optional float optional_float = 11; + */ + optionalFloat: number; + + /** + * @generated from field: optional double optional_double = 12; + */ + optionalDouble: number; + + /** + * @generated from field: optional bool optional_bool = 13; + */ + optionalBool: boolean; + + /** + * @generated from field: optional string optional_string = 14; + */ + optionalString: string; + + /** + * @generated from field: optional bytes optional_bytes = 15; + */ + optionalBytes: Uint8Array; + + /** + * @generated from field: optional protobuf_test_messages.proto2.TestAllTypesProto2.NestedMessage optional_nested_message = 18; + */ + optionalNestedMessage?: TestAllTypesProto2_NestedMessage; + + /** + * @generated from field: optional protobuf_test_messages.proto2.ForeignMessageProto2 optional_foreign_message = 19; + */ + optionalForeignMessage?: ForeignMessageProto2; + + /** + * @generated from field: optional protobuf_test_messages.proto2.TestAllTypesProto2.NestedEnum optional_nested_enum = 21; + */ + optionalNestedEnum: TestAllTypesProto2_NestedEnum; + + /** + * @generated from field: optional protobuf_test_messages.proto2.ForeignEnumProto2 optional_foreign_enum = 22; + */ + optionalForeignEnum: ForeignEnumProto2; + + /** + * @generated from field: optional string optional_string_piece = 24; + */ + optionalStringPiece: string; + + /** + * @generated from field: optional string optional_cord = 25; + */ + optionalCord: string; + + /** + * @generated from field: optional protobuf_test_messages.proto2.TestAllTypesProto2 recursive_message = 27; + */ + recursiveMessage?: TestAllTypesProto2; + + /** + * Repeated + * + * @generated from field: repeated int32 repeated_int32 = 31; + */ + repeatedInt32: number[]; + + /** + * @generated from field: repeated int64 repeated_int64 = 32; + */ + repeatedInt64: bigint[]; + + /** + * @generated from field: repeated uint32 repeated_uint32 = 33; + */ + repeatedUint32: number[]; + + /** + * @generated from field: repeated uint64 repeated_uint64 = 34; + */ + repeatedUint64: bigint[]; + + /** + * @generated from field: repeated sint32 repeated_sint32 = 35; + */ + repeatedSint32: number[]; + + /** + * @generated from field: repeated sint64 repeated_sint64 = 36; + */ + repeatedSint64: bigint[]; + + /** + * @generated from field: repeated fixed32 repeated_fixed32 = 37; + */ + repeatedFixed32: number[]; + + /** + * @generated from field: repeated fixed64 repeated_fixed64 = 38; + */ + repeatedFixed64: bigint[]; + + /** + * @generated from field: repeated sfixed32 repeated_sfixed32 = 39; + */ + repeatedSfixed32: number[]; + + /** + * @generated from field: repeated sfixed64 repeated_sfixed64 = 40; + */ + repeatedSfixed64: bigint[]; + + /** + * @generated from field: repeated float repeated_float = 41; + */ + repeatedFloat: number[]; + + /** + * @generated from field: repeated double repeated_double = 42; + */ + repeatedDouble: number[]; + + /** + * @generated from field: repeated bool repeated_bool = 43; + */ + repeatedBool: boolean[]; + + /** + * @generated from field: repeated string repeated_string = 44; + */ + repeatedString: string[]; + + /** + * @generated from field: repeated bytes repeated_bytes = 45; + */ + repeatedBytes: Uint8Array[]; + + /** + * @generated from field: repeated protobuf_test_messages.proto2.TestAllTypesProto2.NestedMessage repeated_nested_message = 48; + */ + repeatedNestedMessage: TestAllTypesProto2_NestedMessage[]; + + /** + * @generated from field: repeated protobuf_test_messages.proto2.ForeignMessageProto2 repeated_foreign_message = 49; + */ + repeatedForeignMessage: ForeignMessageProto2[]; + + /** + * @generated from field: repeated protobuf_test_messages.proto2.TestAllTypesProto2.NestedEnum repeated_nested_enum = 51; + */ + repeatedNestedEnum: TestAllTypesProto2_NestedEnum[]; + + /** + * @generated from field: repeated protobuf_test_messages.proto2.ForeignEnumProto2 repeated_foreign_enum = 52; + */ + repeatedForeignEnum: ForeignEnumProto2[]; + + /** + * @generated from field: repeated string repeated_string_piece = 54; + */ + repeatedStringPiece: string[]; + + /** + * @generated from field: repeated string repeated_cord = 55; + */ + repeatedCord: string[]; + + /** + * Packed + * + * @generated from field: repeated int32 packed_int32 = 75 [packed = true]; + */ + packedInt32: number[]; + + /** + * @generated from field: repeated int64 packed_int64 = 76 [packed = true]; + */ + packedInt64: bigint[]; + + /** + * @generated from field: repeated uint32 packed_uint32 = 77 [packed = true]; + */ + packedUint32: number[]; + + /** + * @generated from field: repeated uint64 packed_uint64 = 78 [packed = true]; + */ + packedUint64: bigint[]; + + /** + * @generated from field: repeated sint32 packed_sint32 = 79 [packed = true]; + */ + packedSint32: number[]; + + /** + * @generated from field: repeated sint64 packed_sint64 = 80 [packed = true]; + */ + packedSint64: bigint[]; + + /** + * @generated from field: repeated fixed32 packed_fixed32 = 81 [packed = true]; + */ + packedFixed32: number[]; + + /** + * @generated from field: repeated fixed64 packed_fixed64 = 82 [packed = true]; + */ + packedFixed64: bigint[]; + + /** + * @generated from field: repeated sfixed32 packed_sfixed32 = 83 [packed = true]; + */ + packedSfixed32: number[]; + + /** + * @generated from field: repeated sfixed64 packed_sfixed64 = 84 [packed = true]; + */ + packedSfixed64: bigint[]; + + /** + * @generated from field: repeated float packed_float = 85 [packed = true]; + */ + packedFloat: number[]; + + /** + * @generated from field: repeated double packed_double = 86 [packed = true]; + */ + packedDouble: number[]; + + /** + * @generated from field: repeated bool packed_bool = 87 [packed = true]; + */ + packedBool: boolean[]; + + /** + * @generated from field: repeated protobuf_test_messages.proto2.TestAllTypesProto2.NestedEnum packed_nested_enum = 88 [packed = true]; + */ + packedNestedEnum: TestAllTypesProto2_NestedEnum[]; + + /** + * Unpacked + * + * @generated from field: repeated int32 unpacked_int32 = 89 [packed = false]; + */ + unpackedInt32: number[]; + + /** + * @generated from field: repeated int64 unpacked_int64 = 90 [packed = false]; + */ + unpackedInt64: bigint[]; + + /** + * @generated from field: repeated uint32 unpacked_uint32 = 91 [packed = false]; + */ + unpackedUint32: number[]; + + /** + * @generated from field: repeated uint64 unpacked_uint64 = 92 [packed = false]; + */ + unpackedUint64: bigint[]; + + /** + * @generated from field: repeated sint32 unpacked_sint32 = 93 [packed = false]; + */ + unpackedSint32: number[]; + + /** + * @generated from field: repeated sint64 unpacked_sint64 = 94 [packed = false]; + */ + unpackedSint64: bigint[]; + + /** + * @generated from field: repeated fixed32 unpacked_fixed32 = 95 [packed = false]; + */ + unpackedFixed32: number[]; + + /** + * @generated from field: repeated fixed64 unpacked_fixed64 = 96 [packed = false]; + */ + unpackedFixed64: bigint[]; + + /** + * @generated from field: repeated sfixed32 unpacked_sfixed32 = 97 [packed = false]; + */ + unpackedSfixed32: number[]; + + /** + * @generated from field: repeated sfixed64 unpacked_sfixed64 = 98 [packed = false]; + */ + unpackedSfixed64: bigint[]; + + /** + * @generated from field: repeated float unpacked_float = 99 [packed = false]; + */ + unpackedFloat: number[]; + + /** + * @generated from field: repeated double unpacked_double = 100 [packed = false]; + */ + unpackedDouble: number[]; + + /** + * @generated from field: repeated bool unpacked_bool = 101 [packed = false]; + */ + unpackedBool: boolean[]; + + /** + * @generated from field: repeated protobuf_test_messages.proto2.TestAllTypesProto2.NestedEnum unpacked_nested_enum = 102 [packed = false]; + */ + unpackedNestedEnum: TestAllTypesProto2_NestedEnum[]; + + /** + * Map + * + * @generated from field: map map_int32_int32 = 56; + */ + mapInt32Int32: { [key: number]: number }; + + /** + * @generated from field: map map_int64_int64 = 57; + */ + mapInt64Int64: { [key: string]: bigint }; + + /** + * @generated from field: map map_uint32_uint32 = 58; + */ + mapUint32Uint32: { [key: number]: number }; + + /** + * @generated from field: map map_uint64_uint64 = 59; + */ + mapUint64Uint64: { [key: string]: bigint }; + + /** + * @generated from field: map map_sint32_sint32 = 60; + */ + mapSint32Sint32: { [key: number]: number }; + + /** + * @generated from field: map map_sint64_sint64 = 61; + */ + mapSint64Sint64: { [key: string]: bigint }; + + /** + * @generated from field: map map_fixed32_fixed32 = 62; + */ + mapFixed32Fixed32: { [key: number]: number }; + + /** + * @generated from field: map map_fixed64_fixed64 = 63; + */ + mapFixed64Fixed64: { [key: string]: bigint }; + + /** + * @generated from field: map map_sfixed32_sfixed32 = 64; + */ + mapSfixed32Sfixed32: { [key: number]: number }; + + /** + * @generated from field: map map_sfixed64_sfixed64 = 65; + */ + mapSfixed64Sfixed64: { [key: string]: bigint }; + + /** + * @generated from field: map map_int32_float = 66; + */ + mapInt32Float: { [key: number]: number }; + + /** + * @generated from field: map map_int32_double = 67; + */ + mapInt32Double: { [key: number]: number }; + + /** + * @generated from field: map map_bool_bool = 68; + */ + mapBoolBool: { [key: string]: boolean }; + + /** + * @generated from field: map map_string_string = 69; + */ + mapStringString: { [key: string]: string }; + + /** + * @generated from field: map map_string_bytes = 70; + */ + mapStringBytes: { [key: string]: Uint8Array }; + + /** + * @generated from field: map map_string_nested_message = 71; + */ + mapStringNestedMessage: { [key: string]: TestAllTypesProto2_NestedMessage }; + + /** + * @generated from field: map map_string_foreign_message = 72; + */ + mapStringForeignMessage: { [key: string]: ForeignMessageProto2 }; + + /** + * @generated from field: map map_string_nested_enum = 73; + */ + mapStringNestedEnum: { [key: string]: TestAllTypesProto2_NestedEnum }; + + /** + * @generated from field: map map_string_foreign_enum = 74; + */ + mapStringForeignEnum: { [key: string]: ForeignEnumProto2 }; + + /** + * @generated from oneof protobuf_test_messages.proto2.TestAllTypesProto2.oneof_field + */ + oneofField: { + /** + * @generated from field: uint32 oneof_uint32 = 111; + */ + value: number; + case: "oneofUint32"; + } | { + /** + * @generated from field: protobuf_test_messages.proto2.TestAllTypesProto2.NestedMessage oneof_nested_message = 112; + */ + value: TestAllTypesProto2_NestedMessage; + case: "oneofNestedMessage"; + } | { + /** + * @generated from field: string oneof_string = 113; + */ + value: string; + case: "oneofString"; + } | { + /** + * @generated from field: bytes oneof_bytes = 114; + */ + value: Uint8Array; + case: "oneofBytes"; + } | { + /** + * @generated from field: bool oneof_bool = 115; + */ + value: boolean; + case: "oneofBool"; + } | { + /** + * @generated from field: uint64 oneof_uint64 = 116; + */ + value: bigint; + case: "oneofUint64"; + } | { + /** + * @generated from field: float oneof_float = 117; + */ + value: number; + case: "oneofFloat"; + } | { + /** + * @generated from field: double oneof_double = 118; + */ + value: number; + case: "oneofDouble"; + } | { + /** + * @generated from field: protobuf_test_messages.proto2.TestAllTypesProto2.NestedEnum oneof_enum = 119; + */ + value: TestAllTypesProto2_NestedEnum; + case: "oneofEnum"; + } | { case: undefined; value?: undefined }; + + /** + * @generated from field: optional protobuf_test_messages.proto2.TestAllTypesProto2.Data data = 201; + */ + data?: TestAllTypesProto2_Data; + + /** + * default values + * + * @generated from field: optional int32 default_int32 = 241 [default = -123456789]; + */ + defaultInt32: number; + + /** + * @generated from field: optional int64 default_int64 = 242 [default = -9123456789123456789]; + */ + defaultInt64: bigint; + + /** + * @generated from field: optional uint32 default_uint32 = 243 [default = 2123456789]; + */ + defaultUint32: number; + + /** + * @generated from field: optional uint64 default_uint64 = 244 [default = 10123456789123456789]; + */ + defaultUint64: bigint; + + /** + * @generated from field: optional sint32 default_sint32 = 245 [default = -123456789]; + */ + defaultSint32: number; + + /** + * @generated from field: optional sint64 default_sint64 = 246 [default = -9123456789123456789]; + */ + defaultSint64: bigint; + + /** + * @generated from field: optional fixed32 default_fixed32 = 247 [default = 2123456789]; + */ + defaultFixed32: number; + + /** + * @generated from field: optional fixed64 default_fixed64 = 248 [default = 10123456789123456789]; + */ + defaultFixed64: bigint; + + /** + * @generated from field: optional sfixed32 default_sfixed32 = 249 [default = -123456789]; + */ + defaultSfixed32: number; + + /** + * @generated from field: optional sfixed64 default_sfixed64 = 250 [default = -9123456789123456789]; + */ + defaultSfixed64: bigint; + + /** + * @generated from field: optional float default_float = 251 [default = 9e+09]; + */ + defaultFloat: number; + + /** + * @generated from field: optional double default_double = 252 [default = 7e+22]; + */ + defaultDouble: number; + + /** + * @generated from field: optional bool default_bool = 253 [default = true]; + */ + defaultBool: boolean; + + /** + * @generated from field: optional string default_string = 254 [default = "Rosebud"]; + */ + defaultString: string; + + /** + * @generated from field: optional bytes default_bytes = 255 [default = "joshua"]; + */ + defaultBytes: Uint8Array; + + /** + * Test field-name-to-JSON-name convention. + * (protobuf says names can be any valid C/C++ identifier.) + * + * @generated from field: optional int32 fieldname1 = 401; + */ + fieldname1: number; + + /** + * @generated from field: optional int32 field_name2 = 402; + */ + fieldName2: number; + + /** + * @generated from field: optional int32 _field_name3 = 403; + */ + FieldName3: number; + + /** + * @generated from field: optional int32 field__name4_ = 404; + */ + fieldName4: number; + + /** + * @generated from field: optional int32 field0name5 = 405; + */ + field0name5: number; + + /** + * @generated from field: optional int32 field_0_name6 = 406; + */ + field0Name6: number; + + /** + * @generated from field: optional int32 fieldName7 = 407; + */ + fieldName7: number; + + /** + * @generated from field: optional int32 FieldName8 = 408; + */ + FieldName8: number; + + /** + * @generated from field: optional int32 field_Name9 = 409; + */ + fieldName9: number; + + /** + * @generated from field: optional int32 Field_Name10 = 410; + */ + FieldName10: number; + + /** + * @generated from field: optional int32 FIELD_NAME11 = 411; + */ + FIELDNAME11: number; + + /** + * @generated from field: optional int32 FIELD_name12 = 412; + */ + FIELDName12: number; + + /** + * @generated from field: optional int32 __field_name13 = 413; + */ + FieldName13: number; + + /** + * @generated from field: optional int32 __Field_name14 = 414; + */ + FieldName14: number; + + /** + * @generated from field: optional int32 field__name15 = 415; + */ + fieldName15: number; + + /** + * @generated from field: optional int32 field__Name16 = 416; + */ + fieldName16: number; + + /** + * @generated from field: optional int32 field_name17__ = 417; + */ + fieldName17: number; + + /** + * @generated from field: optional int32 Field_name18__ = 418; + */ + FieldName18: number; +}; + +// Describes the message protobuf_test_messages.proto2.TestAllTypesProto2. Use `create(TestAllTypesProto2Desc)` to create a new TestAllTypesProto2. +export declare const TestAllTypesProto2Desc: TypedDescMessage; + +/** + * @generated from message protobuf_test_messages.proto2.TestAllTypesProto2.NestedMessage + */ +export declare type TestAllTypesProto2_NestedMessage = Message<"protobuf_test_messages.proto2.TestAllTypesProto2.NestedMessage"> & { + /** + * @generated from field: optional int32 a = 1; + */ + a: number; + + /** + * @generated from field: optional protobuf_test_messages.proto2.TestAllTypesProto2 corecursive = 2; + */ + corecursive?: TestAllTypesProto2; +}; + +// Describes the message protobuf_test_messages.proto2.TestAllTypesProto2.NestedMessage. Use `create(TestAllTypesProto2_NestedMessageDesc)` to create a new TestAllTypesProto2_NestedMessage. +export declare const TestAllTypesProto2_NestedMessageDesc: TypedDescMessage; + +/** + * groups + * + * @generated from message protobuf_test_messages.proto2.TestAllTypesProto2.Data + */ +export declare type TestAllTypesProto2_Data = Message<"protobuf_test_messages.proto2.TestAllTypesProto2.Data"> & { + /** + * @generated from field: optional int32 group_int32 = 202; + */ + groupInt32: number; + + /** + * @generated from field: optional uint32 group_uint32 = 203; + */ + groupUint32: number; +}; + +// Describes the message protobuf_test_messages.proto2.TestAllTypesProto2.Data. Use `create(TestAllTypesProto2_DataDesc)` to create a new TestAllTypesProto2_Data. +export declare const TestAllTypesProto2_DataDesc: TypedDescMessage; + +/** + * message_set test case. + * + * @generated from message protobuf_test_messages.proto2.TestAllTypesProto2.MessageSetCorrect + */ +export declare type TestAllTypesProto2_MessageSetCorrect = Message<"protobuf_test_messages.proto2.TestAllTypesProto2.MessageSetCorrect"> & { +}; + +// Describes the message protobuf_test_messages.proto2.TestAllTypesProto2.MessageSetCorrect. Use `create(TestAllTypesProto2_MessageSetCorrectDesc)` to create a new TestAllTypesProto2_MessageSetCorrect. +export declare const TestAllTypesProto2_MessageSetCorrectDesc: TypedDescMessage; + +/** + * @generated from message protobuf_test_messages.proto2.TestAllTypesProto2.MessageSetCorrectExtension1 + */ +export declare type TestAllTypesProto2_MessageSetCorrectExtension1 = Message<"protobuf_test_messages.proto2.TestAllTypesProto2.MessageSetCorrectExtension1"> & { + /** + * @generated from field: optional string str = 25; + */ + str: string; +}; + +// Describes the message protobuf_test_messages.proto2.TestAllTypesProto2.MessageSetCorrectExtension1. Use `create(TestAllTypesProto2_MessageSetCorrectExtension1Desc)` to create a new TestAllTypesProto2_MessageSetCorrectExtension1. +export declare const TestAllTypesProto2_MessageSetCorrectExtension1Desc: TypedDescMessage; + +/** + * @generated from extension: optional protobuf_test_messages.proto2.TestAllTypesProto2.MessageSetCorrectExtension1 message_set_extension = 1547769; + */ +export declare const TestAllTypesProto2_MessageSetCorrectExtension1_message_set_extension: TypedDescExtension; + +/** + * @generated from message protobuf_test_messages.proto2.TestAllTypesProto2.MessageSetCorrectExtension2 + */ +export declare type TestAllTypesProto2_MessageSetCorrectExtension2 = Message<"protobuf_test_messages.proto2.TestAllTypesProto2.MessageSetCorrectExtension2"> & { + /** + * @generated from field: optional int32 i = 9; + */ + i: number; +}; + +// Describes the message protobuf_test_messages.proto2.TestAllTypesProto2.MessageSetCorrectExtension2. Use `create(TestAllTypesProto2_MessageSetCorrectExtension2Desc)` to create a new TestAllTypesProto2_MessageSetCorrectExtension2. +export declare const TestAllTypesProto2_MessageSetCorrectExtension2Desc: TypedDescMessage; + +/** + * @generated from extension: optional protobuf_test_messages.proto2.TestAllTypesProto2.MessageSetCorrectExtension2 message_set_extension = 4135312; + */ +export declare const TestAllTypesProto2_MessageSetCorrectExtension2_message_set_extension: TypedDescExtension; + +/** + * @generated from enum protobuf_test_messages.proto2.TestAllTypesProto2.NestedEnum + */ +export enum TestAllTypesProto2_NestedEnum { + /** + * @generated from enum value: FOO = 0; + */ + FOO = 0, + + /** + * @generated from enum value: BAR = 1; + */ + BAR = 1, + + /** + * @generated from enum value: BAZ = 2; + */ + BAZ = 2, + + /** + * Intentionally negative. + * + * @generated from enum value: NEG = -1; + */ + NEG = -1, +} + +// Describes the enum protobuf_test_messages.proto2.TestAllTypesProto2.NestedEnum. +export declare const TestAllTypesProto2_NestedEnumDesc: TypedDescEnum; + +/** + * @generated from message protobuf_test_messages.proto2.ForeignMessageProto2 + */ +export declare type ForeignMessageProto2 = Message<"protobuf_test_messages.proto2.ForeignMessageProto2"> & { + /** + * @generated from field: optional int32 c = 1; + */ + c: number; +}; + +// Describes the message protobuf_test_messages.proto2.ForeignMessageProto2. Use `create(ForeignMessageProto2Desc)` to create a new ForeignMessageProto2. +export declare const ForeignMessageProto2Desc: TypedDescMessage; + +/** + * @generated from message protobuf_test_messages.proto2.UnknownToTestAllTypes + */ +export declare type UnknownToTestAllTypes = Message<"protobuf_test_messages.proto2.UnknownToTestAllTypes"> & { + /** + * @generated from field: optional int32 optional_int32 = 1001; + */ + optionalInt32: number; + + /** + * @generated from field: optional string optional_string = 1002; + */ + optionalString: string; + + /** + * @generated from field: optional protobuf_test_messages.proto2.ForeignMessageProto2 nested_message = 1003; + */ + nestedMessage?: ForeignMessageProto2; + + /** + * @generated from field: optional protobuf_test_messages.proto2.UnknownToTestAllTypes.OptionalGroup optionalgroup = 1004; + */ + optionalgroup?: UnknownToTestAllTypes_OptionalGroup; + + /** + * @generated from field: optional bool optional_bool = 1006; + */ + optionalBool: boolean; + + /** + * @generated from field: repeated int32 repeated_int32 = 1011; + */ + repeatedInt32: number[]; +}; + +// Describes the message protobuf_test_messages.proto2.UnknownToTestAllTypes. Use `create(UnknownToTestAllTypesDesc)` to create a new UnknownToTestAllTypes. +export declare const UnknownToTestAllTypesDesc: TypedDescMessage; + +/** + * @generated from message protobuf_test_messages.proto2.UnknownToTestAllTypes.OptionalGroup + */ +export declare type UnknownToTestAllTypes_OptionalGroup = Message<"protobuf_test_messages.proto2.UnknownToTestAllTypes.OptionalGroup"> & { + /** + * @generated from field: optional int32 a = 1; + */ + a: number; +}; + +// Describes the message protobuf_test_messages.proto2.UnknownToTestAllTypes.OptionalGroup. Use `create(UnknownToTestAllTypes_OptionalGroupDesc)` to create a new UnknownToTestAllTypes_OptionalGroup. +export declare const UnknownToTestAllTypes_OptionalGroupDesc: TypedDescMessage; + +/** + * @generated from message protobuf_test_messages.proto2.NullHypothesisProto2 + */ +export declare type NullHypothesisProto2 = Message<"protobuf_test_messages.proto2.NullHypothesisProto2"> & { +}; + +// Describes the message protobuf_test_messages.proto2.NullHypothesisProto2. Use `create(NullHypothesisProto2Desc)` to create a new NullHypothesisProto2. +export declare const NullHypothesisProto2Desc: TypedDescMessage; + +/** + * @generated from message protobuf_test_messages.proto2.EnumOnlyProto2 + */ +export declare type EnumOnlyProto2 = Message<"protobuf_test_messages.proto2.EnumOnlyProto2"> & { +}; + +// Describes the message protobuf_test_messages.proto2.EnumOnlyProto2. Use `create(EnumOnlyProto2Desc)` to create a new EnumOnlyProto2. +export declare const EnumOnlyProto2Desc: TypedDescMessage; + +/** + * @generated from enum protobuf_test_messages.proto2.EnumOnlyProto2.Bool + */ +export enum EnumOnlyProto2_Bool { + /** + * @generated from enum value: kFalse = 0; + */ + kFalse = 0, + + /** + * @generated from enum value: kTrue = 1; + */ + kTrue = 1, +} + +// Describes the enum protobuf_test_messages.proto2.EnumOnlyProto2.Bool. +export declare const EnumOnlyProto2_BoolDesc: TypedDescEnum; + +/** + * @generated from message protobuf_test_messages.proto2.OneStringProto2 + */ +export declare type OneStringProto2 = Message<"protobuf_test_messages.proto2.OneStringProto2"> & { + /** + * @generated from field: optional string data = 1; + */ + data: string; +}; + +// Describes the message protobuf_test_messages.proto2.OneStringProto2. Use `create(OneStringProto2Desc)` to create a new OneStringProto2. +export declare const OneStringProto2Desc: TypedDescMessage; + +/** + * @generated from message protobuf_test_messages.proto2.ProtoWithKeywords + */ +export declare type ProtoWithKeywords = Message<"protobuf_test_messages.proto2.ProtoWithKeywords"> & { + /** + * @generated from field: optional int32 inline = 1; + */ + inline: number; + + /** + * @generated from field: optional string concept = 2; + */ + concept: string; + + /** + * @generated from field: repeated string requires = 3; + */ + requires: string[]; +}; + +// Describes the message protobuf_test_messages.proto2.ProtoWithKeywords. Use `create(ProtoWithKeywordsDesc)` to create a new ProtoWithKeywords. +export declare const ProtoWithKeywordsDesc: TypedDescMessage; + +/** + * @generated from message protobuf_test_messages.proto2.TestAllRequiredTypesProto2 + */ +export declare type TestAllRequiredTypesProto2 = Message<"protobuf_test_messages.proto2.TestAllRequiredTypesProto2"> & { + /** + * Singular + * + * @generated from field: required int32 required_int32 = 1; + */ + requiredInt32: number; + + /** + * @generated from field: required int64 required_int64 = 2; + */ + requiredInt64: bigint; + + /** + * @generated from field: required uint32 required_uint32 = 3; + */ + requiredUint32: number; + + /** + * @generated from field: required uint64 required_uint64 = 4; + */ + requiredUint64: bigint; + + /** + * @generated from field: required sint32 required_sint32 = 5; + */ + requiredSint32: number; + + /** + * @generated from field: required sint64 required_sint64 = 6; + */ + requiredSint64: bigint; + + /** + * @generated from field: required fixed32 required_fixed32 = 7; + */ + requiredFixed32: number; + + /** + * @generated from field: required fixed64 required_fixed64 = 8; + */ + requiredFixed64: bigint; + + /** + * @generated from field: required sfixed32 required_sfixed32 = 9; + */ + requiredSfixed32: number; + + /** + * @generated from field: required sfixed64 required_sfixed64 = 10; + */ + requiredSfixed64: bigint; + + /** + * @generated from field: required float required_float = 11; + */ + requiredFloat: number; + + /** + * @generated from field: required double required_double = 12; + */ + requiredDouble: number; + + /** + * @generated from field: required bool required_bool = 13; + */ + requiredBool: boolean; + + /** + * @generated from field: required string required_string = 14; + */ + requiredString: string; + + /** + * @generated from field: required bytes required_bytes = 15; + */ + requiredBytes: Uint8Array; + + /** + * @generated from field: required protobuf_test_messages.proto2.TestAllRequiredTypesProto2.NestedMessage required_nested_message = 18; + */ + requiredNestedMessage?: TestAllRequiredTypesProto2_NestedMessage; + + /** + * @generated from field: required protobuf_test_messages.proto2.ForeignMessageProto2 required_foreign_message = 19; + */ + requiredForeignMessage?: ForeignMessageProto2; + + /** + * @generated from field: required protobuf_test_messages.proto2.TestAllRequiredTypesProto2.NestedEnum required_nested_enum = 21; + */ + requiredNestedEnum: TestAllRequiredTypesProto2_NestedEnum; + + /** + * @generated from field: required protobuf_test_messages.proto2.ForeignEnumProto2 required_foreign_enum = 22; + */ + requiredForeignEnum: ForeignEnumProto2; + + /** + * @generated from field: required string required_string_piece = 24; + */ + requiredStringPiece: string; + + /** + * @generated from field: required string required_cord = 25; + */ + requiredCord: string; + + /** + * @generated from field: required protobuf_test_messages.proto2.TestAllRequiredTypesProto2 recursive_message = 27; + */ + recursiveMessage?: TestAllRequiredTypesProto2; + + /** + * @generated from field: optional protobuf_test_messages.proto2.TestAllRequiredTypesProto2 optional_recursive_message = 28; + */ + optionalRecursiveMessage?: TestAllRequiredTypesProto2; + + /** + * @generated from field: required protobuf_test_messages.proto2.TestAllRequiredTypesProto2.Data data = 201; + */ + data?: TestAllRequiredTypesProto2_Data; + + /** + * default values + * + * @generated from field: required int32 default_int32 = 241 [default = -123456789]; + */ + defaultInt32: number; + + /** + * @generated from field: required int64 default_int64 = 242 [default = -9123456789123456789]; + */ + defaultInt64: bigint; + + /** + * @generated from field: required uint32 default_uint32 = 243 [default = 2123456789]; + */ + defaultUint32: number; + + /** + * @generated from field: required uint64 default_uint64 = 244 [default = 10123456789123456789]; + */ + defaultUint64: bigint; + + /** + * @generated from field: required sint32 default_sint32 = 245 [default = -123456789]; + */ + defaultSint32: number; + + /** + * @generated from field: required sint64 default_sint64 = 246 [default = -9123456789123456789]; + */ + defaultSint64: bigint; + + /** + * @generated from field: required fixed32 default_fixed32 = 247 [default = 2123456789]; + */ + defaultFixed32: number; + + /** + * @generated from field: required fixed64 default_fixed64 = 248 [default = 10123456789123456789]; + */ + defaultFixed64: bigint; + + /** + * @generated from field: required sfixed32 default_sfixed32 = 249 [default = -123456789]; + */ + defaultSfixed32: number; + + /** + * @generated from field: required sfixed64 default_sfixed64 = 250 [default = -9123456789123456789]; + */ + defaultSfixed64: bigint; + + /** + * @generated from field: required float default_float = 251 [default = 9e+09]; + */ + defaultFloat: number; + + /** + * @generated from field: required double default_double = 252 [default = 7e+22]; + */ + defaultDouble: number; + + /** + * @generated from field: required bool default_bool = 253 [default = true]; + */ + defaultBool: boolean; + + /** + * @generated from field: required string default_string = 254 [default = "Rosebud"]; + */ + defaultString: string; + + /** + * @generated from field: required bytes default_bytes = 255 [default = "joshua"]; + */ + defaultBytes: Uint8Array; +}; + +// Describes the message protobuf_test_messages.proto2.TestAllRequiredTypesProto2. Use `create(TestAllRequiredTypesProto2Desc)` to create a new TestAllRequiredTypesProto2. +export declare const TestAllRequiredTypesProto2Desc: TypedDescMessage; + +/** + * @generated from message protobuf_test_messages.proto2.TestAllRequiredTypesProto2.NestedMessage + */ +export declare type TestAllRequiredTypesProto2_NestedMessage = Message<"protobuf_test_messages.proto2.TestAllRequiredTypesProto2.NestedMessage"> & { + /** + * @generated from field: required int32 a = 1; + */ + a: number; + + /** + * @generated from field: required protobuf_test_messages.proto2.TestAllRequiredTypesProto2 corecursive = 2; + */ + corecursive?: TestAllRequiredTypesProto2; + + /** + * @generated from field: optional protobuf_test_messages.proto2.TestAllRequiredTypesProto2 optional_corecursive = 3; + */ + optionalCorecursive?: TestAllRequiredTypesProto2; +}; + +// Describes the message protobuf_test_messages.proto2.TestAllRequiredTypesProto2.NestedMessage. Use `create(TestAllRequiredTypesProto2_NestedMessageDesc)` to create a new TestAllRequiredTypesProto2_NestedMessage. +export declare const TestAllRequiredTypesProto2_NestedMessageDesc: TypedDescMessage; + +/** + * groups + * + * @generated from message protobuf_test_messages.proto2.TestAllRequiredTypesProto2.Data + */ +export declare type TestAllRequiredTypesProto2_Data = Message<"protobuf_test_messages.proto2.TestAllRequiredTypesProto2.Data"> & { + /** + * @generated from field: required int32 group_int32 = 202; + */ + groupInt32: number; + + /** + * @generated from field: required uint32 group_uint32 = 203; + */ + groupUint32: number; +}; + +// Describes the message protobuf_test_messages.proto2.TestAllRequiredTypesProto2.Data. Use `create(TestAllRequiredTypesProto2_DataDesc)` to create a new TestAllRequiredTypesProto2_Data. +export declare const TestAllRequiredTypesProto2_DataDesc: TypedDescMessage; + +/** + * message_set test case. + * + * @generated from message protobuf_test_messages.proto2.TestAllRequiredTypesProto2.MessageSetCorrect + */ +export declare type TestAllRequiredTypesProto2_MessageSetCorrect = Message<"protobuf_test_messages.proto2.TestAllRequiredTypesProto2.MessageSetCorrect"> & { +}; + +// Describes the message protobuf_test_messages.proto2.TestAllRequiredTypesProto2.MessageSetCorrect. Use `create(TestAllRequiredTypesProto2_MessageSetCorrectDesc)` to create a new TestAllRequiredTypesProto2_MessageSetCorrect. +export declare const TestAllRequiredTypesProto2_MessageSetCorrectDesc: TypedDescMessage; + +/** + * @generated from message protobuf_test_messages.proto2.TestAllRequiredTypesProto2.MessageSetCorrectExtension1 + */ +export declare type TestAllRequiredTypesProto2_MessageSetCorrectExtension1 = Message<"protobuf_test_messages.proto2.TestAllRequiredTypesProto2.MessageSetCorrectExtension1"> & { + /** + * @generated from field: required string str = 25; + */ + str: string; +}; + +// Describes the message protobuf_test_messages.proto2.TestAllRequiredTypesProto2.MessageSetCorrectExtension1. Use `create(TestAllRequiredTypesProto2_MessageSetCorrectExtension1Desc)` to create a new TestAllRequiredTypesProto2_MessageSetCorrectExtension1. +export declare const TestAllRequiredTypesProto2_MessageSetCorrectExtension1Desc: TypedDescMessage; + +/** + * @generated from extension: optional protobuf_test_messages.proto2.TestAllRequiredTypesProto2.MessageSetCorrectExtension1 message_set_extension = 1547769; + */ +export declare const TestAllRequiredTypesProto2_MessageSetCorrectExtension1_message_set_extension: TypedDescExtension; + +/** + * @generated from message protobuf_test_messages.proto2.TestAllRequiredTypesProto2.MessageSetCorrectExtension2 + */ +export declare type TestAllRequiredTypesProto2_MessageSetCorrectExtension2 = Message<"protobuf_test_messages.proto2.TestAllRequiredTypesProto2.MessageSetCorrectExtension2"> & { + /** + * @generated from field: required int32 i = 9; + */ + i: number; +}; + +// Describes the message protobuf_test_messages.proto2.TestAllRequiredTypesProto2.MessageSetCorrectExtension2. Use `create(TestAllRequiredTypesProto2_MessageSetCorrectExtension2Desc)` to create a new TestAllRequiredTypesProto2_MessageSetCorrectExtension2. +export declare const TestAllRequiredTypesProto2_MessageSetCorrectExtension2Desc: TypedDescMessage; + +/** + * @generated from extension: optional protobuf_test_messages.proto2.TestAllRequiredTypesProto2.MessageSetCorrectExtension2 message_set_extension = 4135312; + */ +export declare const TestAllRequiredTypesProto2_MessageSetCorrectExtension2_message_set_extension: TypedDescExtension; + +/** + * @generated from enum protobuf_test_messages.proto2.TestAllRequiredTypesProto2.NestedEnum + */ +export enum TestAllRequiredTypesProto2_NestedEnum { + /** + * @generated from enum value: FOO = 0; + */ + FOO = 0, + + /** + * @generated from enum value: BAR = 1; + */ + BAR = 1, + + /** + * @generated from enum value: BAZ = 2; + */ + BAZ = 2, + + /** + * Intentionally negative. + * + * @generated from enum value: NEG = -1; + */ + NEG = -1, +} + +// Describes the enum protobuf_test_messages.proto2.TestAllRequiredTypesProto2.NestedEnum. +export declare const TestAllRequiredTypesProto2_NestedEnumDesc: TypedDescEnum; + +/** + * @generated from enum protobuf_test_messages.proto2.ForeignEnumProto2 + */ +export enum ForeignEnumProto2 { + /** + * @generated from enum value: FOREIGN_FOO = 0; + */ + FOREIGN_FOO = 0, + + /** + * @generated from enum value: FOREIGN_BAR = 1; + */ + FOREIGN_BAR = 1, + + /** + * @generated from enum value: FOREIGN_BAZ = 2; + */ + FOREIGN_BAZ = 2, +} + +// Describes the enum protobuf_test_messages.proto2.ForeignEnumProto2. +export declare const ForeignEnumProto2Desc: TypedDescEnum; + +/** + * @generated from extension: optional int32 extension_int32 = 120; + */ +export declare const extension_int32: TypedDescExtension; + diff --git a/packages/protobuf-test/src/gen/js/google/protobuf/test_messages_proto2_pbv2.js b/packages/protobuf-test/src/gen/js/google/protobuf/test_messages_proto2_pbv2.js new file mode 100644 index 000000000..62c7b3189 --- /dev/null +++ b/packages/protobuf-test/src/gen/js/google/protobuf/test_messages_proto2_pbv2.js @@ -0,0 +1,138 @@ +// Copyright 2021-2024 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// LINT: ALLOW_GROUPS + +// @generated by protoc-gen-es-next v1.7.2 with parameter "ts_nocheck=false,target=js+dts" +// @generated from file google/protobuf/test_messages_proto2.proto (package protobuf_test_messages.proto2, syntax proto2) +/* eslint-disable */ + +import { enumDesc, extDesc, fileDesc, messageDesc, tsEnum } from "@bufbuild/protobuf/next/codegenv1"; + +export const fileDesc_google_protobuf_test_messages_proto2 = fileDesc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ZPTxAAEgcKA0JBUhABEgcKA0JBWhACEhAKA05FRxD///////////8BKgUIeBDJAUoGCOgHEJBOKkYKEUZvcmVpZ25FbnVtUHJvdG8yEg8KC0ZPUkVJR05fRk9PEAASDwoLRk9SRUlHTl9CQVIQARIPCgtGT1JFSUdOX0JBWhACOloKD2V4dGVuc2lvbl9pbnQzMhIxLnByb3RvYnVmX3Rlc3RfbWVzc2FnZXMucHJvdG8yLlRlc3RBbGxUeXBlc1Byb3RvMhh4IAEoBVIOZXh0ZW5zaW9uSW50MzJCOAooY29tLmdvb2dsZS5wcm90b2J1Zl90ZXN0X21lc3NhZ2VzLnByb3RvMkgB+AEBogIGUHJvdG8y"); + +// Describes the message protobuf_test_messages.proto2.TestAllTypesProto2. Use `create(TestAllTypesProto2Desc)` to create a new TestAllTypesProto2. +export const TestAllTypesProto2Desc = messageDesc(fileDesc_google_protobuf_test_messages_proto2, 0); + +// Describes the message protobuf_test_messages.proto2.TestAllTypesProto2.NestedMessage. Use `create(TestAllTypesProto2_NestedMessageDesc)` to create a new TestAllTypesProto2_NestedMessage. +export const TestAllTypesProto2_NestedMessageDesc = messageDesc(fileDesc_google_protobuf_test_messages_proto2, 0, 0); + +// Describes the message protobuf_test_messages.proto2.TestAllTypesProto2.Data. Use `create(TestAllTypesProto2_DataDesc)` to create a new TestAllTypesProto2_Data. +export const TestAllTypesProto2_DataDesc = messageDesc(fileDesc_google_protobuf_test_messages_proto2, 0, 1); + +// Describes the message protobuf_test_messages.proto2.TestAllTypesProto2.MessageSetCorrect. Use `create(TestAllTypesProto2_MessageSetCorrectDesc)` to create a new TestAllTypesProto2_MessageSetCorrect. +export const TestAllTypesProto2_MessageSetCorrectDesc = messageDesc(fileDesc_google_protobuf_test_messages_proto2, 0, 2); + +// Describes the message protobuf_test_messages.proto2.TestAllTypesProto2.MessageSetCorrectExtension1. Use `create(TestAllTypesProto2_MessageSetCorrectExtension1Desc)` to create a new TestAllTypesProto2_MessageSetCorrectExtension1. +export const TestAllTypesProto2_MessageSetCorrectExtension1Desc = messageDesc(fileDesc_google_protobuf_test_messages_proto2, 0, 3); + +/** + * @generated from extension: optional protobuf_test_messages.proto2.TestAllTypesProto2.MessageSetCorrectExtension1 message_set_extension = 1547769; + */ +export const TestAllTypesProto2_MessageSetCorrectExtension1_message_set_extension = extDesc(fileDesc_google_protobuf_test_messages_proto2, 0, 3, 0); + +// Describes the message protobuf_test_messages.proto2.TestAllTypesProto2.MessageSetCorrectExtension2. Use `create(TestAllTypesProto2_MessageSetCorrectExtension2Desc)` to create a new TestAllTypesProto2_MessageSetCorrectExtension2. +export const TestAllTypesProto2_MessageSetCorrectExtension2Desc = messageDesc(fileDesc_google_protobuf_test_messages_proto2, 0, 4); + +/** + * @generated from extension: optional protobuf_test_messages.proto2.TestAllTypesProto2.MessageSetCorrectExtension2 message_set_extension = 4135312; + */ +export const TestAllTypesProto2_MessageSetCorrectExtension2_message_set_extension = extDesc(fileDesc_google_protobuf_test_messages_proto2, 0, 4, 0); + +// Describes the enum protobuf_test_messages.proto2.TestAllTypesProto2.NestedEnum. +export const TestAllTypesProto2_NestedEnumDesc = enumDesc(fileDesc_google_protobuf_test_messages_proto2, 0, 0); + +/** + * @generated from enum protobuf_test_messages.proto2.TestAllTypesProto2.NestedEnum + */ +export const TestAllTypesProto2_NestedEnum = tsEnum(TestAllTypesProto2_NestedEnumDesc); + +// Describes the message protobuf_test_messages.proto2.ForeignMessageProto2. Use `create(ForeignMessageProto2Desc)` to create a new ForeignMessageProto2. +export const ForeignMessageProto2Desc = messageDesc(fileDesc_google_protobuf_test_messages_proto2, 1); + +// Describes the message protobuf_test_messages.proto2.UnknownToTestAllTypes. Use `create(UnknownToTestAllTypesDesc)` to create a new UnknownToTestAllTypes. +export const UnknownToTestAllTypesDesc = messageDesc(fileDesc_google_protobuf_test_messages_proto2, 2); + +// Describes the message protobuf_test_messages.proto2.UnknownToTestAllTypes.OptionalGroup. Use `create(UnknownToTestAllTypes_OptionalGroupDesc)` to create a new UnknownToTestAllTypes_OptionalGroup. +export const UnknownToTestAllTypes_OptionalGroupDesc = messageDesc(fileDesc_google_protobuf_test_messages_proto2, 2, 0); + +// Describes the message protobuf_test_messages.proto2.NullHypothesisProto2. Use `create(NullHypothesisProto2Desc)` to create a new NullHypothesisProto2. +export const NullHypothesisProto2Desc = messageDesc(fileDesc_google_protobuf_test_messages_proto2, 3); + +// Describes the message protobuf_test_messages.proto2.EnumOnlyProto2. Use `create(EnumOnlyProto2Desc)` to create a new EnumOnlyProto2. +export const EnumOnlyProto2Desc = messageDesc(fileDesc_google_protobuf_test_messages_proto2, 4); + +// Describes the enum protobuf_test_messages.proto2.EnumOnlyProto2.Bool. +export const EnumOnlyProto2_BoolDesc = enumDesc(fileDesc_google_protobuf_test_messages_proto2, 4, 0); + +/** + * @generated from enum protobuf_test_messages.proto2.EnumOnlyProto2.Bool + */ +export const EnumOnlyProto2_Bool = tsEnum(EnumOnlyProto2_BoolDesc); + +// Describes the message protobuf_test_messages.proto2.OneStringProto2. Use `create(OneStringProto2Desc)` to create a new OneStringProto2. +export const OneStringProto2Desc = messageDesc(fileDesc_google_protobuf_test_messages_proto2, 5); + +// Describes the message protobuf_test_messages.proto2.ProtoWithKeywords. Use `create(ProtoWithKeywordsDesc)` to create a new ProtoWithKeywords. +export const ProtoWithKeywordsDesc = messageDesc(fileDesc_google_protobuf_test_messages_proto2, 6); + +// Describes the message protobuf_test_messages.proto2.TestAllRequiredTypesProto2. Use `create(TestAllRequiredTypesProto2Desc)` to create a new TestAllRequiredTypesProto2. +export const TestAllRequiredTypesProto2Desc = messageDesc(fileDesc_google_protobuf_test_messages_proto2, 7); + +// Describes the message protobuf_test_messages.proto2.TestAllRequiredTypesProto2.NestedMessage. Use `create(TestAllRequiredTypesProto2_NestedMessageDesc)` to create a new TestAllRequiredTypesProto2_NestedMessage. +export const TestAllRequiredTypesProto2_NestedMessageDesc = messageDesc(fileDesc_google_protobuf_test_messages_proto2, 7, 0); + +// Describes the message protobuf_test_messages.proto2.TestAllRequiredTypesProto2.Data. Use `create(TestAllRequiredTypesProto2_DataDesc)` to create a new TestAllRequiredTypesProto2_Data. +export const TestAllRequiredTypesProto2_DataDesc = messageDesc(fileDesc_google_protobuf_test_messages_proto2, 7, 1); + +// Describes the message protobuf_test_messages.proto2.TestAllRequiredTypesProto2.MessageSetCorrect. Use `create(TestAllRequiredTypesProto2_MessageSetCorrectDesc)` to create a new TestAllRequiredTypesProto2_MessageSetCorrect. +export const TestAllRequiredTypesProto2_MessageSetCorrectDesc = messageDesc(fileDesc_google_protobuf_test_messages_proto2, 7, 2); + +// Describes the message protobuf_test_messages.proto2.TestAllRequiredTypesProto2.MessageSetCorrectExtension1. Use `create(TestAllRequiredTypesProto2_MessageSetCorrectExtension1Desc)` to create a new TestAllRequiredTypesProto2_MessageSetCorrectExtension1. +export const TestAllRequiredTypesProto2_MessageSetCorrectExtension1Desc = messageDesc(fileDesc_google_protobuf_test_messages_proto2, 7, 3); + +/** + * @generated from extension: optional protobuf_test_messages.proto2.TestAllRequiredTypesProto2.MessageSetCorrectExtension1 message_set_extension = 1547769; + */ +export const TestAllRequiredTypesProto2_MessageSetCorrectExtension1_message_set_extension = extDesc(fileDesc_google_protobuf_test_messages_proto2, 7, 3, 0); + +// Describes the message protobuf_test_messages.proto2.TestAllRequiredTypesProto2.MessageSetCorrectExtension2. Use `create(TestAllRequiredTypesProto2_MessageSetCorrectExtension2Desc)` to create a new TestAllRequiredTypesProto2_MessageSetCorrectExtension2. +export const TestAllRequiredTypesProto2_MessageSetCorrectExtension2Desc = messageDesc(fileDesc_google_protobuf_test_messages_proto2, 7, 4); + +/** + * @generated from extension: optional protobuf_test_messages.proto2.TestAllRequiredTypesProto2.MessageSetCorrectExtension2 message_set_extension = 4135312; + */ +export const TestAllRequiredTypesProto2_MessageSetCorrectExtension2_message_set_extension = extDesc(fileDesc_google_protobuf_test_messages_proto2, 7, 4, 0); + +// Describes the enum protobuf_test_messages.proto2.TestAllRequiredTypesProto2.NestedEnum. +export const TestAllRequiredTypesProto2_NestedEnumDesc = enumDesc(fileDesc_google_protobuf_test_messages_proto2, 7, 0); + +/** + * @generated from enum protobuf_test_messages.proto2.TestAllRequiredTypesProto2.NestedEnum + */ +export const TestAllRequiredTypesProto2_NestedEnum = tsEnum(TestAllRequiredTypesProto2_NestedEnumDesc); + +// Describes the enum protobuf_test_messages.proto2.ForeignEnumProto2. +export const ForeignEnumProto2Desc = enumDesc(fileDesc_google_protobuf_test_messages_proto2, 0); + +/** + * @generated from enum protobuf_test_messages.proto2.ForeignEnumProto2 + */ +export const ForeignEnumProto2 = tsEnum(ForeignEnumProto2Desc); + +/** + * @generated from extension: optional int32 extension_int32 = 120; + */ +export const extension_int32 = extDesc(fileDesc_google_protobuf_test_messages_proto2, 0); + diff --git a/packages/protobuf-test/src/gen/js/google/protobuf/test_messages_proto3_pbv2.d.ts b/packages/protobuf-test/src/gen/js/google/protobuf/test_messages_proto3_pbv2.d.ts new file mode 100644 index 000000000..a96f7451b --- /dev/null +++ b/packages/protobuf-test/src/gen/js/google/protobuf/test_messages_proto3_pbv2.d.ts @@ -0,0 +1,983 @@ +// Copyright 2021-2024 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// @generated by protoc-gen-es-next v1.7.2 with parameter "ts_nocheck=false,target=js+dts" +// @generated from file google/protobuf/test_messages_proto3.proto (package protobuf_test_messages.proto3, syntax proto3) +/* eslint-disable */ + +import type { DescFile } from "@bufbuild/protobuf"; +import type { Any, BoolValue, BytesValue, DoubleValue, Duration, FieldMask, FloatValue, Int32Value, Int64Value, ListValue, Message, NullValue, StringValue, Struct, Timestamp, UInt32Value, UInt64Value, Value } from "@bufbuild/protobuf/next"; +import type { TypedDescEnum, TypedDescMessage } from "@bufbuild/protobuf/next/codegenv1"; + +export declare const fileDesc_google_protobuf_test_messages_proto3: DescFile; + +/** + * This proto includes every type of field in both singular and repeated + * forms. + * + * Also, crucially, all messages and enums in this file are eventually + * submessages of this message. So for example, a fuzz test of TestAllTypes + * could trigger bugs that occur in any message type in this file. We verify + * this stays true in a unit test. + * + * @generated from message protobuf_test_messages.proto3.TestAllTypesProto3 + */ +export declare type TestAllTypesProto3 = Message<"protobuf_test_messages.proto3.TestAllTypesProto3"> & { + /** + * Singular + * + * @generated from field: int32 optional_int32 = 1; + */ + optionalInt32: number; + + /** + * @generated from field: int64 optional_int64 = 2; + */ + optionalInt64: bigint; + + /** + * @generated from field: uint32 optional_uint32 = 3; + */ + optionalUint32: number; + + /** + * @generated from field: uint64 optional_uint64 = 4; + */ + optionalUint64: bigint; + + /** + * @generated from field: sint32 optional_sint32 = 5; + */ + optionalSint32: number; + + /** + * @generated from field: sint64 optional_sint64 = 6; + */ + optionalSint64: bigint; + + /** + * @generated from field: fixed32 optional_fixed32 = 7; + */ + optionalFixed32: number; + + /** + * @generated from field: fixed64 optional_fixed64 = 8; + */ + optionalFixed64: bigint; + + /** + * @generated from field: sfixed32 optional_sfixed32 = 9; + */ + optionalSfixed32: number; + + /** + * @generated from field: sfixed64 optional_sfixed64 = 10; + */ + optionalSfixed64: bigint; + + /** + * @generated from field: float optional_float = 11; + */ + optionalFloat: number; + + /** + * @generated from field: double optional_double = 12; + */ + optionalDouble: number; + + /** + * @generated from field: bool optional_bool = 13; + */ + optionalBool: boolean; + + /** + * @generated from field: string optional_string = 14; + */ + optionalString: string; + + /** + * @generated from field: bytes optional_bytes = 15; + */ + optionalBytes: Uint8Array; + + /** + * @generated from field: protobuf_test_messages.proto3.TestAllTypesProto3.NestedMessage optional_nested_message = 18; + */ + optionalNestedMessage?: TestAllTypesProto3_NestedMessage; + + /** + * @generated from field: protobuf_test_messages.proto3.ForeignMessage optional_foreign_message = 19; + */ + optionalForeignMessage?: ForeignMessage; + + /** + * @generated from field: protobuf_test_messages.proto3.TestAllTypesProto3.NestedEnum optional_nested_enum = 21; + */ + optionalNestedEnum: TestAllTypesProto3_NestedEnum; + + /** + * @generated from field: protobuf_test_messages.proto3.ForeignEnum optional_foreign_enum = 22; + */ + optionalForeignEnum: ForeignEnum; + + /** + * @generated from field: protobuf_test_messages.proto3.TestAllTypesProto3.AliasedEnum optional_aliased_enum = 23; + */ + optionalAliasedEnum: TestAllTypesProto3_AliasedEnum; + + /** + * @generated from field: string optional_string_piece = 24; + */ + optionalStringPiece: string; + + /** + * @generated from field: string optional_cord = 25; + */ + optionalCord: string; + + /** + * @generated from field: protobuf_test_messages.proto3.TestAllTypesProto3 recursive_message = 27; + */ + recursiveMessage?: TestAllTypesProto3; + + /** + * Repeated + * + * @generated from field: repeated int32 repeated_int32 = 31; + */ + repeatedInt32: number[]; + + /** + * @generated from field: repeated int64 repeated_int64 = 32; + */ + repeatedInt64: bigint[]; + + /** + * @generated from field: repeated uint32 repeated_uint32 = 33; + */ + repeatedUint32: number[]; + + /** + * @generated from field: repeated uint64 repeated_uint64 = 34; + */ + repeatedUint64: bigint[]; + + /** + * @generated from field: repeated sint32 repeated_sint32 = 35; + */ + repeatedSint32: number[]; + + /** + * @generated from field: repeated sint64 repeated_sint64 = 36; + */ + repeatedSint64: bigint[]; + + /** + * @generated from field: repeated fixed32 repeated_fixed32 = 37; + */ + repeatedFixed32: number[]; + + /** + * @generated from field: repeated fixed64 repeated_fixed64 = 38; + */ + repeatedFixed64: bigint[]; + + /** + * @generated from field: repeated sfixed32 repeated_sfixed32 = 39; + */ + repeatedSfixed32: number[]; + + /** + * @generated from field: repeated sfixed64 repeated_sfixed64 = 40; + */ + repeatedSfixed64: bigint[]; + + /** + * @generated from field: repeated float repeated_float = 41; + */ + repeatedFloat: number[]; + + /** + * @generated from field: repeated double repeated_double = 42; + */ + repeatedDouble: number[]; + + /** + * @generated from field: repeated bool repeated_bool = 43; + */ + repeatedBool: boolean[]; + + /** + * @generated from field: repeated string repeated_string = 44; + */ + repeatedString: string[]; + + /** + * @generated from field: repeated bytes repeated_bytes = 45; + */ + repeatedBytes: Uint8Array[]; + + /** + * @generated from field: repeated protobuf_test_messages.proto3.TestAllTypesProto3.NestedMessage repeated_nested_message = 48; + */ + repeatedNestedMessage: TestAllTypesProto3_NestedMessage[]; + + /** + * @generated from field: repeated protobuf_test_messages.proto3.ForeignMessage repeated_foreign_message = 49; + */ + repeatedForeignMessage: ForeignMessage[]; + + /** + * @generated from field: repeated protobuf_test_messages.proto3.TestAllTypesProto3.NestedEnum repeated_nested_enum = 51; + */ + repeatedNestedEnum: TestAllTypesProto3_NestedEnum[]; + + /** + * @generated from field: repeated protobuf_test_messages.proto3.ForeignEnum repeated_foreign_enum = 52; + */ + repeatedForeignEnum: ForeignEnum[]; + + /** + * @generated from field: repeated string repeated_string_piece = 54; + */ + repeatedStringPiece: string[]; + + /** + * @generated from field: repeated string repeated_cord = 55; + */ + repeatedCord: string[]; + + /** + * Packed + * + * @generated from field: repeated int32 packed_int32 = 75 [packed = true]; + */ + packedInt32: number[]; + + /** + * @generated from field: repeated int64 packed_int64 = 76 [packed = true]; + */ + packedInt64: bigint[]; + + /** + * @generated from field: repeated uint32 packed_uint32 = 77 [packed = true]; + */ + packedUint32: number[]; + + /** + * @generated from field: repeated uint64 packed_uint64 = 78 [packed = true]; + */ + packedUint64: bigint[]; + + /** + * @generated from field: repeated sint32 packed_sint32 = 79 [packed = true]; + */ + packedSint32: number[]; + + /** + * @generated from field: repeated sint64 packed_sint64 = 80 [packed = true]; + */ + packedSint64: bigint[]; + + /** + * @generated from field: repeated fixed32 packed_fixed32 = 81 [packed = true]; + */ + packedFixed32: number[]; + + /** + * @generated from field: repeated fixed64 packed_fixed64 = 82 [packed = true]; + */ + packedFixed64: bigint[]; + + /** + * @generated from field: repeated sfixed32 packed_sfixed32 = 83 [packed = true]; + */ + packedSfixed32: number[]; + + /** + * @generated from field: repeated sfixed64 packed_sfixed64 = 84 [packed = true]; + */ + packedSfixed64: bigint[]; + + /** + * @generated from field: repeated float packed_float = 85 [packed = true]; + */ + packedFloat: number[]; + + /** + * @generated from field: repeated double packed_double = 86 [packed = true]; + */ + packedDouble: number[]; + + /** + * @generated from field: repeated bool packed_bool = 87 [packed = true]; + */ + packedBool: boolean[]; + + /** + * @generated from field: repeated protobuf_test_messages.proto3.TestAllTypesProto3.NestedEnum packed_nested_enum = 88 [packed = true]; + */ + packedNestedEnum: TestAllTypesProto3_NestedEnum[]; + + /** + * Unpacked + * + * @generated from field: repeated int32 unpacked_int32 = 89 [packed = false]; + */ + unpackedInt32: number[]; + + /** + * @generated from field: repeated int64 unpacked_int64 = 90 [packed = false]; + */ + unpackedInt64: bigint[]; + + /** + * @generated from field: repeated uint32 unpacked_uint32 = 91 [packed = false]; + */ + unpackedUint32: number[]; + + /** + * @generated from field: repeated uint64 unpacked_uint64 = 92 [packed = false]; + */ + unpackedUint64: bigint[]; + + /** + * @generated from field: repeated sint32 unpacked_sint32 = 93 [packed = false]; + */ + unpackedSint32: number[]; + + /** + * @generated from field: repeated sint64 unpacked_sint64 = 94 [packed = false]; + */ + unpackedSint64: bigint[]; + + /** + * @generated from field: repeated fixed32 unpacked_fixed32 = 95 [packed = false]; + */ + unpackedFixed32: number[]; + + /** + * @generated from field: repeated fixed64 unpacked_fixed64 = 96 [packed = false]; + */ + unpackedFixed64: bigint[]; + + /** + * @generated from field: repeated sfixed32 unpacked_sfixed32 = 97 [packed = false]; + */ + unpackedSfixed32: number[]; + + /** + * @generated from field: repeated sfixed64 unpacked_sfixed64 = 98 [packed = false]; + */ + unpackedSfixed64: bigint[]; + + /** + * @generated from field: repeated float unpacked_float = 99 [packed = false]; + */ + unpackedFloat: number[]; + + /** + * @generated from field: repeated double unpacked_double = 100 [packed = false]; + */ + unpackedDouble: number[]; + + /** + * @generated from field: repeated bool unpacked_bool = 101 [packed = false]; + */ + unpackedBool: boolean[]; + + /** + * @generated from field: repeated protobuf_test_messages.proto3.TestAllTypesProto3.NestedEnum unpacked_nested_enum = 102 [packed = false]; + */ + unpackedNestedEnum: TestAllTypesProto3_NestedEnum[]; + + /** + * Map + * + * @generated from field: map map_int32_int32 = 56; + */ + mapInt32Int32: { [key: number]: number }; + + /** + * @generated from field: map map_int64_int64 = 57; + */ + mapInt64Int64: { [key: string]: bigint }; + + /** + * @generated from field: map map_uint32_uint32 = 58; + */ + mapUint32Uint32: { [key: number]: number }; + + /** + * @generated from field: map map_uint64_uint64 = 59; + */ + mapUint64Uint64: { [key: string]: bigint }; + + /** + * @generated from field: map map_sint32_sint32 = 60; + */ + mapSint32Sint32: { [key: number]: number }; + + /** + * @generated from field: map map_sint64_sint64 = 61; + */ + mapSint64Sint64: { [key: string]: bigint }; + + /** + * @generated from field: map map_fixed32_fixed32 = 62; + */ + mapFixed32Fixed32: { [key: number]: number }; + + /** + * @generated from field: map map_fixed64_fixed64 = 63; + */ + mapFixed64Fixed64: { [key: string]: bigint }; + + /** + * @generated from field: map map_sfixed32_sfixed32 = 64; + */ + mapSfixed32Sfixed32: { [key: number]: number }; + + /** + * @generated from field: map map_sfixed64_sfixed64 = 65; + */ + mapSfixed64Sfixed64: { [key: string]: bigint }; + + /** + * @generated from field: map map_int32_float = 66; + */ + mapInt32Float: { [key: number]: number }; + + /** + * @generated from field: map map_int32_double = 67; + */ + mapInt32Double: { [key: number]: number }; + + /** + * @generated from field: map map_bool_bool = 68; + */ + mapBoolBool: { [key: string]: boolean }; + + /** + * @generated from field: map map_string_string = 69; + */ + mapStringString: { [key: string]: string }; + + /** + * @generated from field: map map_string_bytes = 70; + */ + mapStringBytes: { [key: string]: Uint8Array }; + + /** + * @generated from field: map map_string_nested_message = 71; + */ + mapStringNestedMessage: { [key: string]: TestAllTypesProto3_NestedMessage }; + + /** + * @generated from field: map map_string_foreign_message = 72; + */ + mapStringForeignMessage: { [key: string]: ForeignMessage }; + + /** + * @generated from field: map map_string_nested_enum = 73; + */ + mapStringNestedEnum: { [key: string]: TestAllTypesProto3_NestedEnum }; + + /** + * @generated from field: map map_string_foreign_enum = 74; + */ + mapStringForeignEnum: { [key: string]: ForeignEnum }; + + /** + * @generated from oneof protobuf_test_messages.proto3.TestAllTypesProto3.oneof_field + */ + oneofField: { + /** + * @generated from field: uint32 oneof_uint32 = 111; + */ + value: number; + case: "oneofUint32"; + } | { + /** + * @generated from field: protobuf_test_messages.proto3.TestAllTypesProto3.NestedMessage oneof_nested_message = 112; + */ + value: TestAllTypesProto3_NestedMessage; + case: "oneofNestedMessage"; + } | { + /** + * @generated from field: string oneof_string = 113; + */ + value: string; + case: "oneofString"; + } | { + /** + * @generated from field: bytes oneof_bytes = 114; + */ + value: Uint8Array; + case: "oneofBytes"; + } | { + /** + * @generated from field: bool oneof_bool = 115; + */ + value: boolean; + case: "oneofBool"; + } | { + /** + * @generated from field: uint64 oneof_uint64 = 116; + */ + value: bigint; + case: "oneofUint64"; + } | { + /** + * @generated from field: float oneof_float = 117; + */ + value: number; + case: "oneofFloat"; + } | { + /** + * @generated from field: double oneof_double = 118; + */ + value: number; + case: "oneofDouble"; + } | { + /** + * @generated from field: protobuf_test_messages.proto3.TestAllTypesProto3.NestedEnum oneof_enum = 119; + */ + value: TestAllTypesProto3_NestedEnum; + case: "oneofEnum"; + } | { + /** + * @generated from field: google.protobuf.NullValue oneof_null_value = 120; + */ + value: NullValue; + case: "oneofNullValue"; + } | { case: undefined; value?: undefined }; + + /** + * Well-known types + * + * @generated from field: google.protobuf.BoolValue optional_bool_wrapper = 201; + */ + optionalBoolWrapper?: boolean; + + /** + * @generated from field: google.protobuf.Int32Value optional_int32_wrapper = 202; + */ + optionalInt32Wrapper?: number; + + /** + * @generated from field: google.protobuf.Int64Value optional_int64_wrapper = 203; + */ + optionalInt64Wrapper?: bigint; + + /** + * @generated from field: google.protobuf.UInt32Value optional_uint32_wrapper = 204; + */ + optionalUint32Wrapper?: number; + + /** + * @generated from field: google.protobuf.UInt64Value optional_uint64_wrapper = 205; + */ + optionalUint64Wrapper?: bigint; + + /** + * @generated from field: google.protobuf.FloatValue optional_float_wrapper = 206; + */ + optionalFloatWrapper?: number; + + /** + * @generated from field: google.protobuf.DoubleValue optional_double_wrapper = 207; + */ + optionalDoubleWrapper?: number; + + /** + * @generated from field: google.protobuf.StringValue optional_string_wrapper = 208; + */ + optionalStringWrapper?: string; + + /** + * @generated from field: google.protobuf.BytesValue optional_bytes_wrapper = 209; + */ + optionalBytesWrapper?: Uint8Array; + + /** + * @generated from field: repeated google.protobuf.BoolValue repeated_bool_wrapper = 211; + */ + repeatedBoolWrapper: BoolValue[]; + + /** + * @generated from field: repeated google.protobuf.Int32Value repeated_int32_wrapper = 212; + */ + repeatedInt32Wrapper: Int32Value[]; + + /** + * @generated from field: repeated google.protobuf.Int64Value repeated_int64_wrapper = 213; + */ + repeatedInt64Wrapper: Int64Value[]; + + /** + * @generated from field: repeated google.protobuf.UInt32Value repeated_uint32_wrapper = 214; + */ + repeatedUint32Wrapper: UInt32Value[]; + + /** + * @generated from field: repeated google.protobuf.UInt64Value repeated_uint64_wrapper = 215; + */ + repeatedUint64Wrapper: UInt64Value[]; + + /** + * @generated from field: repeated google.protobuf.FloatValue repeated_float_wrapper = 216; + */ + repeatedFloatWrapper: FloatValue[]; + + /** + * @generated from field: repeated google.protobuf.DoubleValue repeated_double_wrapper = 217; + */ + repeatedDoubleWrapper: DoubleValue[]; + + /** + * @generated from field: repeated google.protobuf.StringValue repeated_string_wrapper = 218; + */ + repeatedStringWrapper: StringValue[]; + + /** + * @generated from field: repeated google.protobuf.BytesValue repeated_bytes_wrapper = 219; + */ + repeatedBytesWrapper: BytesValue[]; + + /** + * @generated from field: google.protobuf.Duration optional_duration = 301; + */ + optionalDuration?: Duration; + + /** + * @generated from field: google.protobuf.Timestamp optional_timestamp = 302; + */ + optionalTimestamp?: Timestamp; + + /** + * @generated from field: google.protobuf.FieldMask optional_field_mask = 303; + */ + optionalFieldMask?: FieldMask; + + /** + * @generated from field: google.protobuf.Struct optional_struct = 304; + */ + optionalStruct?: Struct; + + /** + * @generated from field: google.protobuf.Any optional_any = 305; + */ + optionalAny?: Any; + + /** + * @generated from field: google.protobuf.Value optional_value = 306; + */ + optionalValue?: Value; + + /** + * @generated from field: google.protobuf.NullValue optional_null_value = 307; + */ + optionalNullValue: NullValue; + + /** + * @generated from field: repeated google.protobuf.Duration repeated_duration = 311; + */ + repeatedDuration: Duration[]; + + /** + * @generated from field: repeated google.protobuf.Timestamp repeated_timestamp = 312; + */ + repeatedTimestamp: Timestamp[]; + + /** + * @generated from field: repeated google.protobuf.FieldMask repeated_fieldmask = 313; + */ + repeatedFieldmask: FieldMask[]; + + /** + * @generated from field: repeated google.protobuf.Struct repeated_struct = 324; + */ + repeatedStruct: Struct[]; + + /** + * @generated from field: repeated google.protobuf.Any repeated_any = 315; + */ + repeatedAny: Any[]; + + /** + * @generated from field: repeated google.protobuf.Value repeated_value = 316; + */ + repeatedValue: Value[]; + + /** + * @generated from field: repeated google.protobuf.ListValue repeated_list_value = 317; + */ + repeatedListValue: ListValue[]; + + /** + * Test field-name-to-JSON-name convention. + * (protobuf says names can be any valid C/C++ identifier.) + * + * @generated from field: int32 fieldname1 = 401; + */ + fieldname1: number; + + /** + * @generated from field: int32 field_name2 = 402; + */ + fieldName2: number; + + /** + * @generated from field: int32 _field_name3 = 403; + */ + FieldName3: number; + + /** + * @generated from field: int32 field__name4_ = 404; + */ + fieldName4: number; + + /** + * @generated from field: int32 field0name5 = 405; + */ + field0name5: number; + + /** + * @generated from field: int32 field_0_name6 = 406; + */ + field0Name6: number; + + /** + * @generated from field: int32 fieldName7 = 407; + */ + fieldName7: number; + + /** + * @generated from field: int32 FieldName8 = 408; + */ + FieldName8: number; + + /** + * @generated from field: int32 field_Name9 = 409; + */ + fieldName9: number; + + /** + * @generated from field: int32 Field_Name10 = 410; + */ + FieldName10: number; + + /** + * @generated from field: int32 FIELD_NAME11 = 411; + */ + FIELDNAME11: number; + + /** + * @generated from field: int32 FIELD_name12 = 412; + */ + FIELDName12: number; + + /** + * @generated from field: int32 __field_name13 = 413; + */ + FieldName13: number; + + /** + * @generated from field: int32 __Field_name14 = 414; + */ + FieldName14: number; + + /** + * @generated from field: int32 field__name15 = 415; + */ + fieldName15: number; + + /** + * @generated from field: int32 field__Name16 = 416; + */ + fieldName16: number; + + /** + * @generated from field: int32 field_name17__ = 417; + */ + fieldName17: number; + + /** + * @generated from field: int32 Field_name18__ = 418; + */ + FieldName18: number; +}; + +// Describes the message protobuf_test_messages.proto3.TestAllTypesProto3. Use `create(TestAllTypesProto3Desc)` to create a new TestAllTypesProto3. +export declare const TestAllTypesProto3Desc: TypedDescMessage; + +/** + * @generated from message protobuf_test_messages.proto3.TestAllTypesProto3.NestedMessage + */ +export declare type TestAllTypesProto3_NestedMessage = Message<"protobuf_test_messages.proto3.TestAllTypesProto3.NestedMessage"> & { + /** + * @generated from field: int32 a = 1; + */ + a: number; + + /** + * @generated from field: protobuf_test_messages.proto3.TestAllTypesProto3 corecursive = 2; + */ + corecursive?: TestAllTypesProto3; +}; + +// Describes the message protobuf_test_messages.proto3.TestAllTypesProto3.NestedMessage. Use `create(TestAllTypesProto3_NestedMessageDesc)` to create a new TestAllTypesProto3_NestedMessage. +export declare const TestAllTypesProto3_NestedMessageDesc: TypedDescMessage; + +/** + * @generated from enum protobuf_test_messages.proto3.TestAllTypesProto3.NestedEnum + */ +export enum TestAllTypesProto3_NestedEnum { + /** + * @generated from enum value: FOO = 0; + */ + FOO = 0, + + /** + * @generated from enum value: BAR = 1; + */ + BAR = 1, + + /** + * @generated from enum value: BAZ = 2; + */ + BAZ = 2, + + /** + * Intentionally negative. + * + * @generated from enum value: NEG = -1; + */ + NEG = -1, +} + +// Describes the enum protobuf_test_messages.proto3.TestAllTypesProto3.NestedEnum. +export declare const TestAllTypesProto3_NestedEnumDesc: TypedDescEnum; + +/** + * @generated from enum protobuf_test_messages.proto3.TestAllTypesProto3.AliasedEnum + */ +export enum TestAllTypesProto3_AliasedEnum { + /** + * @generated from enum value: ALIAS_FOO = 0; + */ + ALIAS_FOO = 0, + + /** + * @generated from enum value: ALIAS_BAR = 1; + */ + ALIAS_BAR = 1, + + /** + * @generated from enum value: ALIAS_BAZ = 2; + */ + ALIAS_BAZ = 2, + + /** + * @generated from enum value: MOO = 2; + */ + MOO = 2, + + /** + * @generated from enum value: moo = 2; + */ + moo = 2, + + /** + * @generated from enum value: bAz = 2; + */ + bAz = 2, +} + +// Describes the enum protobuf_test_messages.proto3.TestAllTypesProto3.AliasedEnum. +export declare const TestAllTypesProto3_AliasedEnumDesc: TypedDescEnum; + +/** + * @generated from message protobuf_test_messages.proto3.ForeignMessage + */ +export declare type ForeignMessage = Message<"protobuf_test_messages.proto3.ForeignMessage"> & { + /** + * @generated from field: int32 c = 1; + */ + c: number; +}; + +// Describes the message protobuf_test_messages.proto3.ForeignMessage. Use `create(ForeignMessageDesc)` to create a new ForeignMessage. +export declare const ForeignMessageDesc: TypedDescMessage; + +/** + * @generated from message protobuf_test_messages.proto3.NullHypothesisProto3 + */ +export declare type NullHypothesisProto3 = Message<"protobuf_test_messages.proto3.NullHypothesisProto3"> & { +}; + +// Describes the message protobuf_test_messages.proto3.NullHypothesisProto3. Use `create(NullHypothesisProto3Desc)` to create a new NullHypothesisProto3. +export declare const NullHypothesisProto3Desc: TypedDescMessage; + +/** + * @generated from message protobuf_test_messages.proto3.EnumOnlyProto3 + */ +export declare type EnumOnlyProto3 = Message<"protobuf_test_messages.proto3.EnumOnlyProto3"> & { +}; + +// Describes the message protobuf_test_messages.proto3.EnumOnlyProto3. Use `create(EnumOnlyProto3Desc)` to create a new EnumOnlyProto3. +export declare const EnumOnlyProto3Desc: TypedDescMessage; + +/** + * @generated from enum protobuf_test_messages.proto3.EnumOnlyProto3.Bool + */ +export enum EnumOnlyProto3_Bool { + /** + * @generated from enum value: kFalse = 0; + */ + kFalse = 0, + + /** + * @generated from enum value: kTrue = 1; + */ + kTrue = 1, +} + +// Describes the enum protobuf_test_messages.proto3.EnumOnlyProto3.Bool. +export declare const EnumOnlyProto3_BoolDesc: TypedDescEnum; + +/** + * @generated from enum protobuf_test_messages.proto3.ForeignEnum + */ +export enum ForeignEnum { + /** + * @generated from enum value: FOREIGN_FOO = 0; + */ + FOREIGN_FOO = 0, + + /** + * @generated from enum value: FOREIGN_BAR = 1; + */ + FOREIGN_BAR = 1, + + /** + * @generated from enum value: FOREIGN_BAZ = 2; + */ + FOREIGN_BAZ = 2, +} + +// Describes the enum protobuf_test_messages.proto3.ForeignEnum. +export declare const ForeignEnumDesc: TypedDescEnum; + diff --git a/packages/protobuf-test/src/gen/js/google/protobuf/test_messages_proto3_pbv2.js b/packages/protobuf-test/src/gen/js/google/protobuf/test_messages_proto3_pbv2.js new file mode 100644 index 000000000..e8770aa9a --- /dev/null +++ b/packages/protobuf-test/src/gen/js/google/protobuf/test_messages_proto3_pbv2.js @@ -0,0 +1,70 @@ +// Copyright 2021-2024 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// @generated by protoc-gen-es-next v1.7.2 with parameter "ts_nocheck=false,target=js+dts" +// @generated from file google/protobuf/test_messages_proto3.proto (package protobuf_test_messages.proto3, syntax proto3) +/* eslint-disable */ + +import { enumDesc, fileDesc, messageDesc, tsEnum } from "@bufbuild/protobuf/next/codegenv1"; +import { fileDesc_google_protobuf_any, fileDesc_google_protobuf_duration, fileDesc_google_protobuf_field_mask, fileDesc_google_protobuf_struct, fileDesc_google_protobuf_timestamp, fileDesc_google_protobuf_wrappers } from "@bufbuild/protobuf/next"; + +export const fileDesc_google_protobuf_test_messages_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gNCQVoQAhIQCgNORUcQ////////////ASJZCgtBbGlhc2VkRW51bRINCglBTElBU19GT08QABINCglBTElBU19CQVIQARINCglBTElBU19CQVoQAhIHCgNNT08QAhIHCgNtb28QAhIHCgNiQXoQAhoCEAFCDQoLb25lb2ZfZmllbGRKBgj1AxD/AyIbCg5Gb3JlaWduTWVzc2FnZRIJCgFjGAEgASgFIhYKFE51bGxIeXBvdGhlc2lzUHJvdG8zIi8KDkVudW1Pbmx5UHJvdG8zIh0KBEJvb2wSCgoGa0ZhbHNlEAASCQoFa1RydWUQASpACgtGb3JlaWduRW51bRIPCgtGT1JFSUdOX0ZPTxAAEg8KC0ZPUkVJR05fQkFSEAESDwoLRk9SRUlHTl9CQVoQAkI4Cihjb20uZ29vZ2xlLnByb3RvYnVmX3Rlc3RfbWVzc2FnZXMucHJvdG8zSAH4AQGiAgZQcm90bzNiBnByb3RvMw", [fileDesc_google_protobuf_any, fileDesc_google_protobuf_duration, fileDesc_google_protobuf_field_mask, fileDesc_google_protobuf_struct, fileDesc_google_protobuf_timestamp, fileDesc_google_protobuf_wrappers]); + +// Describes the message protobuf_test_messages.proto3.TestAllTypesProto3. Use `create(TestAllTypesProto3Desc)` to create a new TestAllTypesProto3. +export const TestAllTypesProto3Desc = messageDesc(fileDesc_google_protobuf_test_messages_proto3, 0); + +// Describes the message protobuf_test_messages.proto3.TestAllTypesProto3.NestedMessage. Use `create(TestAllTypesProto3_NestedMessageDesc)` to create a new TestAllTypesProto3_NestedMessage. +export const TestAllTypesProto3_NestedMessageDesc = messageDesc(fileDesc_google_protobuf_test_messages_proto3, 0, 0); + +// Describes the enum protobuf_test_messages.proto3.TestAllTypesProto3.NestedEnum. +export const TestAllTypesProto3_NestedEnumDesc = enumDesc(fileDesc_google_protobuf_test_messages_proto3, 0, 0); + +/** + * @generated from enum protobuf_test_messages.proto3.TestAllTypesProto3.NestedEnum + */ +export const TestAllTypesProto3_NestedEnum = tsEnum(TestAllTypesProto3_NestedEnumDesc); + +// Describes the enum protobuf_test_messages.proto3.TestAllTypesProto3.AliasedEnum. +export const TestAllTypesProto3_AliasedEnumDesc = enumDesc(fileDesc_google_protobuf_test_messages_proto3, 0, 1); + +/** + * @generated from enum protobuf_test_messages.proto3.TestAllTypesProto3.AliasedEnum + */ +export const TestAllTypesProto3_AliasedEnum = tsEnum(TestAllTypesProto3_AliasedEnumDesc); + +// Describes the message protobuf_test_messages.proto3.ForeignMessage. Use `create(ForeignMessageDesc)` to create a new ForeignMessage. +export const ForeignMessageDesc = messageDesc(fileDesc_google_protobuf_test_messages_proto3, 1); + +// Describes the message protobuf_test_messages.proto3.NullHypothesisProto3. Use `create(NullHypothesisProto3Desc)` to create a new NullHypothesisProto3. +export const NullHypothesisProto3Desc = messageDesc(fileDesc_google_protobuf_test_messages_proto3, 2); + +// Describes the message protobuf_test_messages.proto3.EnumOnlyProto3. Use `create(EnumOnlyProto3Desc)` to create a new EnumOnlyProto3. +export const EnumOnlyProto3Desc = messageDesc(fileDesc_google_protobuf_test_messages_proto3, 3); + +// Describes the enum protobuf_test_messages.proto3.EnumOnlyProto3.Bool. +export const EnumOnlyProto3_BoolDesc = enumDesc(fileDesc_google_protobuf_test_messages_proto3, 3, 0); + +/** + * @generated from enum protobuf_test_messages.proto3.EnumOnlyProto3.Bool + */ +export const EnumOnlyProto3_Bool = tsEnum(EnumOnlyProto3_BoolDesc); + +// Describes the enum protobuf_test_messages.proto3.ForeignEnum. +export const ForeignEnumDesc = enumDesc(fileDesc_google_protobuf_test_messages_proto3, 0); + +/** + * @generated from enum protobuf_test_messages.proto3.ForeignEnum + */ +export const ForeignEnum = tsEnum(ForeignEnumDesc); + diff --git a/packages/protobuf-test/src/gen/js/google/protobuf/timestamp_pbv2.d.ts b/packages/protobuf-test/src/gen/js/google/protobuf/timestamp_pbv2.d.ts new file mode 100644 index 000000000..33c3dd0b7 --- /dev/null +++ b/packages/protobuf-test/src/gen/js/google/protobuf/timestamp_pbv2.d.ts @@ -0,0 +1,142 @@ +// Copyright 2021-2024 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// @generated by protoc-gen-es-next v1.7.2 with parameter "ts_nocheck=false,target=js+dts" +// @generated from file google/protobuf/timestamp.proto (package google.protobuf, syntax proto3) +/* eslint-disable */ + +import type { DescFile } from "@bufbuild/protobuf"; +import type { Message } from "@bufbuild/protobuf/next"; +import type { TypedDescMessage } from "@bufbuild/protobuf/next/codegenv1"; + +export declare const fileDesc_google_protobuf_timestamp: DescFile; + +/** + * A Timestamp represents a point in time independent of any time zone or local + * calendar, encoded as a count of seconds and fractions of seconds at + * nanosecond resolution. The count is relative to an epoch at UTC midnight on + * January 1, 1970, in the proleptic Gregorian calendar which extends the + * Gregorian calendar backwards to year one. + * + * All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap + * second table is needed for interpretation, using a [24-hour linear + * smear](https://developers.google.com/time/smear). + * + * The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By + * restricting to that range, we ensure that we can convert to and from [RFC + * 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. + * + * # Examples + * + * Example 1: Compute Timestamp from POSIX `time()`. + * + * Timestamp timestamp; + * timestamp.set_seconds(time(NULL)); + * timestamp.set_nanos(0); + * + * Example 2: Compute Timestamp from POSIX `gettimeofday()`. + * + * struct timeval tv; + * gettimeofday(&tv, NULL); + * + * Timestamp timestamp; + * timestamp.set_seconds(tv.tv_sec); + * timestamp.set_nanos(tv.tv_usec * 1000); + * + * Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. + * + * FILETIME ft; + * GetSystemTimeAsFileTime(&ft); + * UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; + * + * // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z + * // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. + * Timestamp timestamp; + * timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); + * timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); + * + * Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. + * + * long millis = System.currentTimeMillis(); + * + * Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) + * .setNanos((int) ((millis % 1000) * 1000000)).build(); + * + * Example 5: Compute Timestamp from Java `Instant.now()`. + * + * Instant now = Instant.now(); + * + * Timestamp timestamp = + * Timestamp.newBuilder().setSeconds(now.getEpochSecond()) + * .setNanos(now.getNano()).build(); + * + * Example 6: Compute Timestamp from current time in Python. + * + * timestamp = Timestamp() + * timestamp.GetCurrentTime() + * + * # JSON Mapping + * + * In JSON format, the Timestamp type is encoded as a string in the + * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the + * format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" + * where {year} is always expressed using four digits while {month}, {day}, + * {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional + * seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), + * are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone + * is required. A proto3 JSON serializer should always use UTC (as indicated by + * "Z") when printing the Timestamp type and a proto3 JSON parser should be + * able to accept both UTC and other timezones (as indicated by an offset). + * + * For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past + * 01:30 UTC on January 15, 2017. + * + * In JavaScript, one can convert a Date object to this format using the + * standard + * [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) + * method. In Python, a standard `datetime.datetime` object can be converted + * to this format using + * [`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() + * ) to obtain a formatter capable of generating timestamps in this format. + * + * + * @generated from message google.protobuf.Timestamp + */ +export declare type Timestamp = Message<"google.protobuf.Timestamp"> & { + /** + * Represents seconds of UTC time since Unix epoch + * 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to + * 9999-12-31T23:59:59Z inclusive. + * + * @generated from field: int64 seconds = 1; + */ + seconds: bigint; + + /** + * Non-negative fractions of a second at nanosecond resolution. Negative + * second values with fractions must still have non-negative nanos values + * that count forward in time. Must be from 0 to 999,999,999 + * inclusive. + * + * @generated from field: int32 nanos = 2; + */ + nanos: number; +}; + +// Describes the message google.protobuf.Timestamp. Use `create(TimestampDesc)` to create a new Timestamp. +export declare const TimestampDesc: TypedDescMessage; + diff --git a/packages/protobuf-test/src/gen/js/google/protobuf/timestamp_pbv2.js b/packages/protobuf-test/src/gen/js/google/protobuf/timestamp_pbv2.js new file mode 100644 index 000000000..9c77ef91b --- /dev/null +++ b/packages/protobuf-test/src/gen/js/google/protobuf/timestamp_pbv2.js @@ -0,0 +1,25 @@ +// Copyright 2021-2024 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// @generated by protoc-gen-es-next v1.7.2 with parameter "ts_nocheck=false,target=js+dts" +// @generated from file google/protobuf/timestamp.proto (package google.protobuf, syntax proto3) +/* eslint-disable */ + +import { fileDesc, messageDesc } from "@bufbuild/protobuf/next/codegenv1"; + +export const fileDesc_google_protobuf_timestamp = fileDesc("Ch9nb29nbGUvcHJvdG9idWYvdGltZXN0YW1wLnByb3RvEg9nb29nbGUucHJvdG9idWYiKwoJVGltZXN0YW1wEg8KB3NlY29uZHMYASABKAMSDQoFbmFub3MYAiABKAVChQEKE2NvbS5nb29nbGUucHJvdG9idWZCDlRpbWVzdGFtcFByb3RvUAFaMmdvb2dsZS5nb2xhbmcub3JnL3Byb3RvYnVmL3R5cGVzL2tub3duL3RpbWVzdGFtcHBi+AEBogIDR1BCqgIeR29vZ2xlLlByb3RvYnVmLldlbGxLbm93blR5cGVzYgZwcm90bzM"); + +// Describes the message google.protobuf.Timestamp. Use `create(TimestampDesc)` to create a new Timestamp. +export const TimestampDesc = messageDesc(fileDesc_google_protobuf_timestamp, 0); + diff --git a/packages/protobuf-test/src/gen/js/google/protobuf/type_pbv2.d.ts b/packages/protobuf-test/src/gen/js/google/protobuf/type_pbv2.d.ts new file mode 100644 index 000000000..da73f1cf8 --- /dev/null +++ b/packages/protobuf-test/src/gen/js/google/protobuf/type_pbv2.d.ts @@ -0,0 +1,493 @@ +// Copyright 2021-2024 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// @generated by protoc-gen-es-next v1.7.2 with parameter "ts_nocheck=false,target=js+dts" +// @generated from file google/protobuf/type.proto (package google.protobuf, syntax proto3) +/* eslint-disable */ + +import type { DescFile } from "@bufbuild/protobuf"; +import type { Message } from "@bufbuild/protobuf/next"; +import type { SourceContext } from "./source_context_pbv2.js"; +import type { TypedDescEnum, TypedDescMessage } from "@bufbuild/protobuf/next/codegenv1"; +import type { Any } from "./any_pbv2.js"; + +export declare const fileDesc_google_protobuf_type: DescFile; + +/** + * A protocol buffer message type. + * + * @generated from message google.protobuf.Type + */ +export declare type Type = Message<"google.protobuf.Type"> & { + /** + * The fully qualified message name. + * + * @generated from field: string name = 1; + */ + name: string; + + /** + * The list of fields. + * + * @generated from field: repeated google.protobuf.Field fields = 2; + */ + fields: Field[]; + + /** + * The list of types appearing in `oneof` definitions in this type. + * + * @generated from field: repeated string oneofs = 3; + */ + oneofs: string[]; + + /** + * The protocol buffer options. + * + * @generated from field: repeated google.protobuf.Option options = 4; + */ + options: Option[]; + + /** + * The source context. + * + * @generated from field: google.protobuf.SourceContext source_context = 5; + */ + sourceContext?: SourceContext; + + /** + * The source syntax. + * + * @generated from field: google.protobuf.Syntax syntax = 6; + */ + syntax: Syntax; + + /** + * The source edition string, only valid when syntax is SYNTAX_EDITIONS. + * + * @generated from field: string edition = 7; + */ + edition: string; +}; + +// Describes the message google.protobuf.Type. Use `create(TypeDesc)` to create a new Type. +export declare const TypeDesc: TypedDescMessage; + +/** + * A single field of a message type. + * + * @generated from message google.protobuf.Field + */ +export declare type Field = Message<"google.protobuf.Field"> & { + /** + * The field type. + * + * @generated from field: google.protobuf.Field.Kind kind = 1; + */ + kind: Field_Kind; + + /** + * The field cardinality. + * + * @generated from field: google.protobuf.Field.Cardinality cardinality = 2; + */ + cardinality: Field_Cardinality; + + /** + * The field number. + * + * @generated from field: int32 number = 3; + */ + number: number; + + /** + * The field name. + * + * @generated from field: string name = 4; + */ + name: string; + + /** + * The field type URL, without the scheme, for message or enumeration + * types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`. + * + * @generated from field: string type_url = 6; + */ + typeUrl: string; + + /** + * The index of the field type in `Type.oneofs`, for message or enumeration + * types. The first type has index 1; zero means the type is not in the list. + * + * @generated from field: int32 oneof_index = 7; + */ + oneofIndex: number; + + /** + * Whether to use alternative packed wire representation. + * + * @generated from field: bool packed = 8; + */ + packed: boolean; + + /** + * The protocol buffer options. + * + * @generated from field: repeated google.protobuf.Option options = 9; + */ + options: Option[]; + + /** + * The field JSON name. + * + * @generated from field: string json_name = 10; + */ + jsonName: string; + + /** + * The string value of the default value of this field. Proto2 syntax only. + * + * @generated from field: string default_value = 11; + */ + defaultValue: string; +}; + +// Describes the message google.protobuf.Field. Use `create(FieldDesc)` to create a new Field. +export declare const FieldDesc: TypedDescMessage; + +/** + * Basic field types. + * + * @generated from enum google.protobuf.Field.Kind + */ +export enum Field_Kind { + /** + * Field type unknown. + * + * @generated from enum value: TYPE_UNKNOWN = 0; + */ + TYPE_UNKNOWN = 0, + + /** + * Field type double. + * + * @generated from enum value: TYPE_DOUBLE = 1; + */ + TYPE_DOUBLE = 1, + + /** + * Field type float. + * + * @generated from enum value: TYPE_FLOAT = 2; + */ + TYPE_FLOAT = 2, + + /** + * Field type int64. + * + * @generated from enum value: TYPE_INT64 = 3; + */ + TYPE_INT64 = 3, + + /** + * Field type uint64. + * + * @generated from enum value: TYPE_UINT64 = 4; + */ + TYPE_UINT64 = 4, + + /** + * Field type int32. + * + * @generated from enum value: TYPE_INT32 = 5; + */ + TYPE_INT32 = 5, + + /** + * Field type fixed64. + * + * @generated from enum value: TYPE_FIXED64 = 6; + */ + TYPE_FIXED64 = 6, + + /** + * Field type fixed32. + * + * @generated from enum value: TYPE_FIXED32 = 7; + */ + TYPE_FIXED32 = 7, + + /** + * Field type bool. + * + * @generated from enum value: TYPE_BOOL = 8; + */ + TYPE_BOOL = 8, + + /** + * Field type string. + * + * @generated from enum value: TYPE_STRING = 9; + */ + TYPE_STRING = 9, + + /** + * Field type group. Proto2 syntax only, and deprecated. + * + * @generated from enum value: TYPE_GROUP = 10; + */ + TYPE_GROUP = 10, + + /** + * Field type message. + * + * @generated from enum value: TYPE_MESSAGE = 11; + */ + TYPE_MESSAGE = 11, + + /** + * Field type bytes. + * + * @generated from enum value: TYPE_BYTES = 12; + */ + TYPE_BYTES = 12, + + /** + * Field type uint32. + * + * @generated from enum value: TYPE_UINT32 = 13; + */ + TYPE_UINT32 = 13, + + /** + * Field type enum. + * + * @generated from enum value: TYPE_ENUM = 14; + */ + TYPE_ENUM = 14, + + /** + * Field type sfixed32. + * + * @generated from enum value: TYPE_SFIXED32 = 15; + */ + TYPE_SFIXED32 = 15, + + /** + * Field type sfixed64. + * + * @generated from enum value: TYPE_SFIXED64 = 16; + */ + TYPE_SFIXED64 = 16, + + /** + * Field type sint32. + * + * @generated from enum value: TYPE_SINT32 = 17; + */ + TYPE_SINT32 = 17, + + /** + * Field type sint64. + * + * @generated from enum value: TYPE_SINT64 = 18; + */ + TYPE_SINT64 = 18, +} + +// Describes the enum google.protobuf.Field.Kind. +export declare const Field_KindDesc: TypedDescEnum; + +/** + * Whether a field is optional, required, or repeated. + * + * @generated from enum google.protobuf.Field.Cardinality + */ +export enum Field_Cardinality { + /** + * For fields with unknown cardinality. + * + * @generated from enum value: CARDINALITY_UNKNOWN = 0; + */ + UNKNOWN = 0, + + /** + * For optional fields. + * + * @generated from enum value: CARDINALITY_OPTIONAL = 1; + */ + OPTIONAL = 1, + + /** + * For required fields. Proto2 syntax only. + * + * @generated from enum value: CARDINALITY_REQUIRED = 2; + */ + REQUIRED = 2, + + /** + * For repeated fields. + * + * @generated from enum value: CARDINALITY_REPEATED = 3; + */ + REPEATED = 3, +} + +// Describes the enum google.protobuf.Field.Cardinality. +export declare const Field_CardinalityDesc: TypedDescEnum; + +/** + * Enum type definition. + * + * @generated from message google.protobuf.Enum + */ +export declare type Enum = Message<"google.protobuf.Enum"> & { + /** + * Enum type name. + * + * @generated from field: string name = 1; + */ + name: string; + + /** + * Enum value definitions. + * + * @generated from field: repeated google.protobuf.EnumValue enumvalue = 2; + */ + enumvalue: EnumValue[]; + + /** + * Protocol buffer options. + * + * @generated from field: repeated google.protobuf.Option options = 3; + */ + options: Option[]; + + /** + * The source context. + * + * @generated from field: google.protobuf.SourceContext source_context = 4; + */ + sourceContext?: SourceContext; + + /** + * The source syntax. + * + * @generated from field: google.protobuf.Syntax syntax = 5; + */ + syntax: Syntax; + + /** + * The source edition string, only valid when syntax is SYNTAX_EDITIONS. + * + * @generated from field: string edition = 6; + */ + edition: string; +}; + +// Describes the message google.protobuf.Enum. Use `create(EnumDesc)` to create a new Enum. +export declare const EnumDesc: TypedDescMessage; + +/** + * Enum value definition. + * + * @generated from message google.protobuf.EnumValue + */ +export declare type EnumValue = Message<"google.protobuf.EnumValue"> & { + /** + * Enum value name. + * + * @generated from field: string name = 1; + */ + name: string; + + /** + * Enum value number. + * + * @generated from field: int32 number = 2; + */ + number: number; + + /** + * Protocol buffer options. + * + * @generated from field: repeated google.protobuf.Option options = 3; + */ + options: Option[]; +}; + +// Describes the message google.protobuf.EnumValue. Use `create(EnumValueDesc)` to create a new EnumValue. +export declare const EnumValueDesc: TypedDescMessage; + +/** + * A protocol buffer option, which can be attached to a message, field, + * enumeration, etc. + * + * @generated from message google.protobuf.Option + */ +export declare type Option = Message<"google.protobuf.Option"> & { + /** + * The option's name. For protobuf built-in options (options defined in + * descriptor.proto), this is the short name. For example, `"map_entry"`. + * For custom options, it should be the fully-qualified name. For example, + * `"google.api.http"`. + * + * @generated from field: string name = 1; + */ + name: string; + + /** + * The option's value packed in an Any message. If the value is a primitive, + * the corresponding wrapper type defined in google/protobuf/wrappers.proto + * should be used. If the value is an enum, it should be stored as an int32 + * value using the google.protobuf.Int32Value type. + * + * @generated from field: google.protobuf.Any value = 2; + */ + value?: Any; +}; + +// Describes the message google.protobuf.Option. Use `create(OptionDesc)` to create a new Option. +export declare const OptionDesc: TypedDescMessage