rearrage_stuff

This commit is contained in:
Kim Ravn Hansen
2025-09-16 11:26:40 +02:00
parent 40e8c5e0ab
commit 3f11ebe6dc
4937 changed files with 1146031 additions and 134 deletions

38
node_modules/@bufbuild/protobuf/dist/esm/wkt/any.d.ts generated vendored Normal file
View File

@@ -0,0 +1,38 @@
import type { Message, MessageShape } from "../types.js";
import type { Any } from "./gen/google/protobuf/any_pb.js";
import type { DescMessage } from "../descriptors.js";
import type { Registry } from "../registry.js";
/**
* Creates a `google.protobuf.Any` from a message.
*/
export declare function anyPack<Desc extends DescMessage>(schema: Desc, message: MessageShape<Desc>): Any;
/**
* Packs the message into the given any.
*/
export declare function anyPack<Desc extends DescMessage>(schema: Desc, message: MessageShape<Desc>, into: Any): void;
/**
* Returns true if the Any contains the type given by schema.
*/
export declare function anyIs(any: Any, schema: DescMessage): boolean;
/**
* Returns true if the Any contains a message with the given typeName.
*/
export declare function anyIs(any: Any, typeName: string): boolean;
/**
* Unpacks the message the Any represents.
*
* Returns undefined if the Any is empty, or if packed type is not included
* in the given registry.
*/
export declare function anyUnpack(any: Any, registry: Registry): Message | undefined;
/**
* Unpacks the message the Any represents.
*
* Returns undefined if the Any is empty, or if it does not contain the type
* given by schema.
*/
export declare function anyUnpack<Desc extends DescMessage>(any: Any, schema: Desc): MessageShape<Desc> | undefined;
/**
* Same as anyUnpack but unpacks into the target message.
*/
export declare function anyUnpackTo<Desc extends DescMessage>(any: Any, schema: Desc, message: MessageShape<Desc>): MessageShape<Desc> | undefined;

69
node_modules/@bufbuild/protobuf/dist/esm/wkt/any.js generated vendored Normal file
View File

@@ -0,0 +1,69 @@
// Copyright 2021-2025 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.
import { AnySchema } from "./gen/google/protobuf/any_pb.js";
import { create } from "../create.js";
import { toBinary } from "../to-binary.js";
import { fromBinary, mergeFromBinary } from "../from-binary.js";
export function anyPack(schema, message, into) {
let ret = false;
if (!into) {
into = create(AnySchema);
ret = true;
}
into.value = toBinary(schema, message);
into.typeUrl = typeNameToUrl(message.$typeName);
return ret ? into : undefined;
}
export function anyIs(any, descOrTypeName) {
if (any.typeUrl === "") {
return false;
}
const want = typeof descOrTypeName == "string"
? descOrTypeName
: descOrTypeName.typeName;
const got = typeUrlToName(any.typeUrl);
return want === got;
}
export function anyUnpack(any, registryOrMessageDesc) {
if (any.typeUrl === "") {
return undefined;
}
const desc = registryOrMessageDesc.kind == "message"
? registryOrMessageDesc
: registryOrMessageDesc.getMessage(typeUrlToName(any.typeUrl));
if (!desc || !anyIs(any, desc)) {
return undefined;
}
return fromBinary(desc, any.value);
}
/**
* Same as anyUnpack but unpacks into the target message.
*/
export function anyUnpackTo(any, schema, message) {
if (!anyIs(any, schema)) {
return undefined;
}
return mergeFromBinary(schema, message, any.value);
}
function typeNameToUrl(name) {
return `type.googleapis.com/${name}`;
}
function typeUrlToName(url) {
const slash = url.lastIndexOf("/");
const name = slash >= 0 ? url.substring(slash + 1) : url;
if (!name.length) {
throw new Error(`invalid type url: ${url}`);
}
return name;
}

View File

@@ -0,0 +1,238 @@
import type { GenFile, GenMessage } from "../../../../codegenv2/types.js";
import type { Message } from "../../../../types.js";
/**
* Describes the file google/protobuf/any.proto.
*/
export declare const file_google_protobuf_any: GenFile;
/**
* `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": <string>,
* "lastName": <string>
* }
*
* 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 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;
};
/**
* `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": <string>,
* "lastName": <string>
* }
*
* 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 type AnyJson = {
"@type"?: string;
};
/**
* Describes the message google.protobuf.Any.
* Use `create(AnySchema)` to create a new message.
*/
export declare const AnySchema: GenMessage<Any, {
jsonType: AnyJson;
}>;

View File

@@ -0,0 +1,24 @@
// Copyright 2021-2025 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.
import { fileDesc } from "../../../../codegenv2/file.js";
import { messageDesc } from "../../../../codegenv2/message.js";
/**
* Describes the file google/protobuf/any.proto.
*/
export const file_google_protobuf_any = /*@__PURE__*/ fileDesc("Chlnb29nbGUvcHJvdG9idWYvYW55LnByb3RvEg9nb29nbGUucHJvdG9idWYiJgoDQW55EhAKCHR5cGVfdXJsGAEgASgJEg0KBXZhbHVlGAIgASgMQnYKE2NvbS5nb29nbGUucHJvdG9idWZCCEFueVByb3RvUAFaLGdvb2dsZS5nb2xhbmcub3JnL3Byb3RvYnVmL3R5cGVzL2tub3duL2FueXBiogIDR1BCqgIeR29vZ2xlLlByb3RvYnVmLldlbGxLbm93blR5cGVzYgZwcm90bzM");
/**
* Describes the message google.protobuf.Any.
* Use `create(AnySchema)` to create a new message.
*/
export const AnySchema = /*@__PURE__*/ messageDesc(file_google_protobuf_any, 0);

View File

@@ -0,0 +1,537 @@
import type { GenFile, GenMessage } from "../../../../codegenv2/types.js";
import type { SourceContext, SourceContextJson } from "./source_context_pb.js";
import type { Option, OptionJson, Syntax, SyntaxJson } from "./type_pb.js";
import type { Message } from "../../../../types.js";
/**
* Describes the file google/protobuf/api.proto.
*/
export declare const file_google_protobuf_api: GenFile;
/**
* 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.
*
* New usages of this message as an alternative to ServiceDescriptorProto are
* strongly discouraged. This message does not reliability preserve all
* information necessary to model the schema and preserve semantics. Instead
* make use of FileDescriptorSet which preserves the necessary information.
*
* @generated from message google.protobuf.Api
*/
export 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<major-version>`, 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;
/**
* The source edition string, only valid when syntax is SYNTAX_EDITIONS.
*
* @generated from field: string edition = 8;
*/
edition: string;
};
/**
* 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.
*
* New usages of this message as an alternative to ServiceDescriptorProto are
* strongly discouraged. This message does not reliability preserve all
* information necessary to model the schema and preserve semantics. Instead
* make use of FileDescriptorSet which preserves the necessary information.
*
* @generated from message google.protobuf.Api
*/
export type ApiJson = {
/**
* 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?: MethodJson[];
/**
* Any metadata attached to the interface.
*
* @generated from field: repeated google.protobuf.Option options = 3;
*/
options?: OptionJson[];
/**
* 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<major-version>`, 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?: SourceContextJson;
/**
* Included interfaces. See [Mixin][].
*
* @generated from field: repeated google.protobuf.Mixin mixins = 6;
*/
mixins?: MixinJson[];
/**
* The source syntax of the service.
*
* @generated from field: google.protobuf.Syntax syntax = 7;
*/
syntax?: SyntaxJson;
/**
* The source edition string, only valid when syntax is SYNTAX_EDITIONS.
*
* @generated from field: string edition = 8;
*/
edition?: string;
};
/**
* Describes the message google.protobuf.Api.
* Use `create(ApiSchema)` to create a new message.
*/
export declare const ApiSchema: GenMessage<Api, {
jsonType: ApiJson;
}>;
/**
* Method represents a method of an API interface.
*
* New usages of this message as an alternative to MethodDescriptorProto are
* strongly discouraged. This message does not reliability preserve all
* information necessary to model the schema and preserve semantics. Instead
* make use of FileDescriptorSet which preserves the necessary information.
*
* @generated from message google.protobuf.Method
*/
export 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.
*
* This field should be ignored, instead the syntax should be inherited from
* Api. This is similar to Field and EnumValue.
*
* @generated from field: google.protobuf.Syntax syntax = 7 [deprecated = true];
* @deprecated
*/
syntax: Syntax;
/**
* The source edition string, only valid when syntax is SYNTAX_EDITIONS.
*
* This field should be ignored, instead the edition should be inherited from
* Api. This is similar to Field and EnumValue.
*
* @generated from field: string edition = 8 [deprecated = true];
* @deprecated
*/
edition: string;
};
/**
* Method represents a method of an API interface.
*
* New usages of this message as an alternative to MethodDescriptorProto are
* strongly discouraged. This message does not reliability preserve all
* information necessary to model the schema and preserve semantics. Instead
* make use of FileDescriptorSet which preserves the necessary information.
*
* @generated from message google.protobuf.Method
*/
export type MethodJson = {
/**
* 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?: OptionJson[];
/**
* The source syntax of this method.
*
* This field should be ignored, instead the syntax should be inherited from
* Api. This is similar to Field and EnumValue.
*
* @generated from field: google.protobuf.Syntax syntax = 7 [deprecated = true];
* @deprecated
*/
syntax?: SyntaxJson;
/**
* The source edition string, only valid when syntax is SYNTAX_EDITIONS.
*
* This field should be ignored, instead the edition should be inherited from
* Api. This is similar to Field and EnumValue.
*
* @generated from field: string edition = 8 [deprecated = true];
* @deprecated
*/
edition?: string;
};
/**
* Describes the message google.protobuf.Method.
* Use `create(MethodSchema)` to create a new message.
*/
export declare const MethodSchema: GenMessage<Method, {
jsonType: MethodJson;
}>;
/**
* 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 inheriting
* 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 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;
};
/**
* 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 inheriting
* 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 type MixinJson = {
/**
* 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(MixinSchema)` to create a new message.
*/
export declare const MixinSchema: GenMessage<Mixin, {
jsonType: MixinJson;
}>;

View File

@@ -0,0 +1,36 @@
// Copyright 2021-2025 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.
import { fileDesc } from "../../../../codegenv2/file.js";
import { file_google_protobuf_source_context } from "./source_context_pb.js";
import { file_google_protobuf_type } from "./type_pb.js";
import { messageDesc } from "../../../../codegenv2/message.js";
/**
* Describes the file google/protobuf/api.proto.
*/
export const file_google_protobuf_api = /*@__PURE__*/ fileDesc("Chlnb29nbGUvcHJvdG9idWYvYXBpLnByb3RvEg9nb29nbGUucHJvdG9idWYikgIKA0FwaRIMCgRuYW1lGAEgASgJEigKB21ldGhvZHMYAiADKAsyFy5nb29nbGUucHJvdG9idWYuTWV0aG9kEigKB29wdGlvbnMYAyADKAsyFy5nb29nbGUucHJvdG9idWYuT3B0aW9uEg8KB3ZlcnNpb24YBCABKAkSNgoOc291cmNlX2NvbnRleHQYBSABKAsyHi5nb29nbGUucHJvdG9idWYuU291cmNlQ29udGV4dBImCgZtaXhpbnMYBiADKAsyFi5nb29nbGUucHJvdG9idWYuTWl4aW4SJwoGc3ludGF4GAcgASgOMhcuZ29vZ2xlLnByb3RvYnVmLlN5bnRheBIPCgdlZGl0aW9uGAggASgJIu4BCgZNZXRob2QSDAoEbmFtZRgBIAEoCRIYChByZXF1ZXN0X3R5cGVfdXJsGAIgASgJEhkKEXJlcXVlc3Rfc3RyZWFtaW5nGAMgASgIEhkKEXJlc3BvbnNlX3R5cGVfdXJsGAQgASgJEhoKEnJlc3BvbnNlX3N0cmVhbWluZxgFIAEoCBIoCgdvcHRpb25zGAYgAygLMhcuZ29vZ2xlLnByb3RvYnVmLk9wdGlvbhIrCgZzeW50YXgYByABKA4yFy5nb29nbGUucHJvdG9idWYuU3ludGF4QgIYARITCgdlZGl0aW9uGAggASgJQgIYASIjCgVNaXhpbhIMCgRuYW1lGAEgASgJEgwKBHJvb3QYAiABKAlCdgoTY29tLmdvb2dsZS5wcm90b2J1ZkIIQXBpUHJvdG9QAVosZ29vZ2xlLmdvbGFuZy5vcmcvcHJvdG9idWYvdHlwZXMva25vd24vYXBpcGKiAgNHUEKqAh5Hb29nbGUuUHJvdG9idWYuV2VsbEtub3duVHlwZXNiBnByb3RvMw", [file_google_protobuf_source_context, file_google_protobuf_type]);
/**
* Describes the message google.protobuf.Api.
* Use `create(ApiSchema)` to create a new message.
*/
export const ApiSchema = /*@__PURE__*/ messageDesc(file_google_protobuf_api, 0);
/**
* Describes the message google.protobuf.Method.
* Use `create(MethodSchema)` to create a new message.
*/
export const MethodSchema = /*@__PURE__*/ messageDesc(file_google_protobuf_api, 1);
/**
* Describes the message google.protobuf.Mixin.
* Use `create(MixinSchema)` to create a new message.
*/
export const MixinSchema = /*@__PURE__*/ messageDesc(file_google_protobuf_api, 2);

View File

@@ -0,0 +1,490 @@
import type { GenEnum, GenFile, GenMessage } from "../../../../../codegenv2/types.js";
import type { FileDescriptorProto, FileDescriptorProtoJson, GeneratedCodeInfo, GeneratedCodeInfoJson } from "../descriptor_pb.js";
import type { Message } from "../../../../../types.js";
/**
* Describes the file google/protobuf/compiler/plugin.proto.
*/
export declare const file_google_protobuf_compiler_plugin: GenFile;
/**
* The version number of protocol compiler.
*
* @generated from message google.protobuf.compiler.Version
*/
export 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;
};
/**
* The version number of protocol compiler.
*
* @generated from message google.protobuf.compiler.Version
*/
export type VersionJson = {
/**
* @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(VersionSchema)` to create a new message.
*/
export declare const VersionSchema: GenMessage<Version, {
jsonType: VersionJson;
}>;
/**
* An encoded CodeGeneratorRequest is written to the plugin's stdin.
*
* @generated from message google.protobuf.compiler.CodeGeneratorRequest
*/
export 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;
};
/**
* An encoded CodeGeneratorRequest is written to the plugin's stdin.
*
* @generated from message google.protobuf.compiler.CodeGeneratorRequest
*/
export type CodeGeneratorRequestJson = {
/**
* 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?: FileDescriptorProtoJson[];
/**
* 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?: FileDescriptorProtoJson[];
/**
* The version number of protocol compiler.
*
* @generated from field: optional google.protobuf.compiler.Version compiler_version = 3;
*/
compilerVersion?: VersionJson;
};
/**
* Describes the message google.protobuf.compiler.CodeGeneratorRequest.
* Use `create(CodeGeneratorRequestSchema)` to create a new message.
*/
export declare const CodeGeneratorRequestSchema: GenMessage<CodeGeneratorRequest, {
jsonType: CodeGeneratorRequestJson;
}>;
/**
* The plugin writes an encoded CodeGeneratorResponse to stdout.
*
* @generated from message google.protobuf.compiler.CodeGeneratorResponse
*/
export 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;
/**
* The minimum edition this plugin supports. This will be treated as an
* Edition enum, but we want to allow unknown values. It should be specified
* according the edition enum value, *not* the edition number. Only takes
* effect for plugins that have FEATURE_SUPPORTS_EDITIONS set.
*
* @generated from field: optional int32 minimum_edition = 3;
*/
minimumEdition: number;
/**
* The maximum edition this plugin supports. This will be treated as an
* Edition enum, but we want to allow unknown values. It should be specified
* according the edition enum value, *not* the edition number. Only takes
* effect for plugins that have FEATURE_SUPPORTS_EDITIONS set.
*
* @generated from field: optional int32 maximum_edition = 4;
*/
maximumEdition: number;
/**
* @generated from field: repeated google.protobuf.compiler.CodeGeneratorResponse.File file = 15;
*/
file: CodeGeneratorResponse_File[];
};
/**
* The plugin writes an encoded CodeGeneratorResponse to stdout.
*
* @generated from message google.protobuf.compiler.CodeGeneratorResponse
*/
export type CodeGeneratorResponseJson = {
/**
* 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?: string;
/**
* The minimum edition this plugin supports. This will be treated as an
* Edition enum, but we want to allow unknown values. It should be specified
* according the edition enum value, *not* the edition number. Only takes
* effect for plugins that have FEATURE_SUPPORTS_EDITIONS set.
*
* @generated from field: optional int32 minimum_edition = 3;
*/
minimumEdition?: number;
/**
* The maximum edition this plugin supports. This will be treated as an
* Edition enum, but we want to allow unknown values. It should be specified
* according the edition enum value, *not* the edition number. Only takes
* effect for plugins that have FEATURE_SUPPORTS_EDITIONS set.
*
* @generated from field: optional int32 maximum_edition = 4;
*/
maximumEdition?: number;
/**
* @generated from field: repeated google.protobuf.compiler.CodeGeneratorResponse.File file = 15;
*/
file?: CodeGeneratorResponse_FileJson[];
};
/**
* Describes the message google.protobuf.compiler.CodeGeneratorResponse.
* Use `create(CodeGeneratorResponseSchema)` to create a new message.
*/
export declare const CodeGeneratorResponseSchema: GenMessage<CodeGeneratorResponse, {
jsonType: CodeGeneratorResponseJson;
}>;
/**
* Represents a single generated file.
*
* @generated from message google.protobuf.compiler.CodeGeneratorResponse.File
*/
export 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;
};
/**
* Represents a single generated file.
*
* @generated from message google.protobuf.compiler.CodeGeneratorResponse.File
*/
export type CodeGeneratorResponse_FileJson = {
/**
* 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?: GeneratedCodeInfoJson;
};
/**
* Describes the message google.protobuf.compiler.CodeGeneratorResponse.File.
* Use `create(CodeGeneratorResponse_FileSchema)` to create a new message.
*/
export declare const CodeGeneratorResponse_FileSchema: GenMessage<CodeGeneratorResponse_File, {
jsonType: CodeGeneratorResponse_FileJson;
}>;
/**
* Sync with code_generator.h.
*
* @generated from enum google.protobuf.compiler.CodeGeneratorResponse.Feature
*/
export declare 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
}
/**
* Sync with code_generator.h.
*
* @generated from enum google.protobuf.compiler.CodeGeneratorResponse.Feature
*/
export type CodeGeneratorResponse_FeatureJson = "FEATURE_NONE" | "FEATURE_PROTO3_OPTIONAL" | "FEATURE_SUPPORTS_EDITIONS";
/**
* Describes the enum google.protobuf.compiler.CodeGeneratorResponse.Feature.
*/
export declare const CodeGeneratorResponse_FeatureSchema: GenEnum<CodeGeneratorResponse_Feature, CodeGeneratorResponse_FeatureJson>;

View File

@@ -0,0 +1,65 @@
// Copyright 2021-2025 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.
import { fileDesc } from "../../../../../codegenv2/file.js";
import { file_google_protobuf_descriptor } from "../descriptor_pb.js";
import { messageDesc } from "../../../../../codegenv2/message.js";
import { enumDesc } from "../../../../../codegenv2/enum.js";
/**
* Describes the file google/protobuf/compiler/plugin.proto.
*/
export const file_google_protobuf_compiler_plugin = /*@__PURE__*/ fileDesc("CiVnb29nbGUvcHJvdG9idWYvY29tcGlsZXIvcGx1Z2luLnByb3RvEhhnb29nbGUucHJvdG9idWYuY29tcGlsZXIiRgoHVmVyc2lvbhINCgVtYWpvchgBIAEoBRINCgVtaW5vchgCIAEoBRINCgVwYXRjaBgDIAEoBRIOCgZzdWZmaXgYBCABKAkigQIKFENvZGVHZW5lcmF0b3JSZXF1ZXN0EhgKEGZpbGVfdG9fZ2VuZXJhdGUYASADKAkSEQoJcGFyYW1ldGVyGAIgASgJEjgKCnByb3RvX2ZpbGUYDyADKAsyJC5nb29nbGUucHJvdG9idWYuRmlsZURlc2NyaXB0b3JQcm90bxJFChdzb3VyY2VfZmlsZV9kZXNjcmlwdG9ycxgRIAMoCzIkLmdvb2dsZS5wcm90b2J1Zi5GaWxlRGVzY3JpcHRvclByb3RvEjsKEGNvbXBpbGVyX3ZlcnNpb24YAyABKAsyIS5nb29nbGUucHJvdG9idWYuY29tcGlsZXIuVmVyc2lvbiKSAwoVQ29kZUdlbmVyYXRvclJlc3BvbnNlEg0KBWVycm9yGAEgASgJEhoKEnN1cHBvcnRlZF9mZWF0dXJlcxgCIAEoBBIXCg9taW5pbXVtX2VkaXRpb24YAyABKAUSFwoPbWF4aW11bV9lZGl0aW9uGAQgASgFEkIKBGZpbGUYDyADKAsyNC5nb29nbGUucHJvdG9idWYuY29tcGlsZXIuQ29kZUdlbmVyYXRvclJlc3BvbnNlLkZpbGUafwoERmlsZRIMCgRuYW1lGAEgASgJEhcKD2luc2VydGlvbl9wb2ludBgCIAEoCRIPCgdjb250ZW50GA8gASgJEj8KE2dlbmVyYXRlZF9jb2RlX2luZm8YECABKAsyIi5nb29nbGUucHJvdG9idWYuR2VuZXJhdGVkQ29kZUluZm8iVwoHRmVhdHVyZRIQCgxGRUFUVVJFX05PTkUQABIbChdGRUFUVVJFX1BST1RPM19PUFRJT05BTBABEh0KGUZFQVRVUkVfU1VQUE9SVFNfRURJVElPTlMQAkJyChxjb20uZ29vZ2xlLnByb3RvYnVmLmNvbXBpbGVyQgxQbHVnaW5Qcm90b3NaKWdvb2dsZS5nb2xhbmcub3JnL3Byb3RvYnVmL3R5cGVzL3BsdWdpbnBiqgIYR29vZ2xlLlByb3RvYnVmLkNvbXBpbGVy", [file_google_protobuf_descriptor]);
/**
* Describes the message google.protobuf.compiler.Version.
* Use `create(VersionSchema)` to create a new message.
*/
export const VersionSchema = /*@__PURE__*/ messageDesc(file_google_protobuf_compiler_plugin, 0);
/**
* Describes the message google.protobuf.compiler.CodeGeneratorRequest.
* Use `create(CodeGeneratorRequestSchema)` to create a new message.
*/
export const CodeGeneratorRequestSchema = /*@__PURE__*/ messageDesc(file_google_protobuf_compiler_plugin, 1);
/**
* Describes the message google.protobuf.compiler.CodeGeneratorResponse.
* Use `create(CodeGeneratorResponseSchema)` to create a new message.
*/
export const CodeGeneratorResponseSchema = /*@__PURE__*/ messageDesc(file_google_protobuf_compiler_plugin, 2);
/**
* Describes the message google.protobuf.compiler.CodeGeneratorResponse.File.
* Use `create(CodeGeneratorResponse_FileSchema)` to create a new message.
*/
export const CodeGeneratorResponse_FileSchema = /*@__PURE__*/ messageDesc(file_google_protobuf_compiler_plugin, 2, 0);
/**
* Sync with code_generator.h.
*
* @generated from enum google.protobuf.compiler.CodeGeneratorResponse.Feature
*/
export var CodeGeneratorResponse_Feature;
(function (CodeGeneratorResponse_Feature) {
/**
* @generated from enum value: FEATURE_NONE = 0;
*/
CodeGeneratorResponse_Feature[CodeGeneratorResponse_Feature["NONE"] = 0] = "NONE";
/**
* @generated from enum value: FEATURE_PROTO3_OPTIONAL = 1;
*/
CodeGeneratorResponse_Feature[CodeGeneratorResponse_Feature["PROTO3_OPTIONAL"] = 1] = "PROTO3_OPTIONAL";
/**
* @generated from enum value: FEATURE_SUPPORTS_EDITIONS = 2;
*/
CodeGeneratorResponse_Feature[CodeGeneratorResponse_Feature["SUPPORTS_EDITIONS"] = 2] = "SUPPORTS_EDITIONS";
})(CodeGeneratorResponse_Feature || (CodeGeneratorResponse_Feature = {}));
/**
* Describes the enum google.protobuf.compiler.CodeGeneratorResponse.Feature.
*/
export const CodeGeneratorResponse_FeatureSchema = /*@__PURE__*/ enumDesc(file_google_protobuf_compiler_plugin, 2, 0);

View File

@@ -0,0 +1,91 @@
import type { GenEnum, GenExtension, GenFile, GenMessage } from "../../../../codegenv2/types.js";
import type { FeatureSet } from "./descriptor_pb.js";
import type { Message } from "../../../../types.js";
/**
* Describes the file google/protobuf/cpp_features.proto.
*/
export declare const file_google_protobuf_cpp_features: GenFile;
/**
* @generated from message pb.CppFeatures
*/
export type CppFeatures = Message<"pb.CppFeatures"> & {
/**
* Whether or not to treat an enum field as closed. This option is only
* applicable to enum fields, and will be removed in the future. It is
* consistent with the legacy behavior of using proto3 enum types for proto2
* fields.
*
* @generated from field: optional bool legacy_closed_enum = 1;
*/
legacyClosedEnum: boolean;
/**
* @generated from field: optional pb.CppFeatures.StringType string_type = 2;
*/
stringType: CppFeatures_StringType;
/**
* @generated from field: optional bool enum_name_uses_string_view = 3;
*/
enumNameUsesStringView: boolean;
};
/**
* @generated from message pb.CppFeatures
*/
export type CppFeaturesJson = {
/**
* Whether or not to treat an enum field as closed. This option is only
* applicable to enum fields, and will be removed in the future. It is
* consistent with the legacy behavior of using proto3 enum types for proto2
* fields.
*
* @generated from field: optional bool legacy_closed_enum = 1;
*/
legacyClosedEnum?: boolean;
/**
* @generated from field: optional pb.CppFeatures.StringType string_type = 2;
*/
stringType?: CppFeatures_StringTypeJson;
/**
* @generated from field: optional bool enum_name_uses_string_view = 3;
*/
enumNameUsesStringView?: boolean;
};
/**
* Describes the message pb.CppFeatures.
* Use `create(CppFeaturesSchema)` to create a new message.
*/
export declare const CppFeaturesSchema: GenMessage<CppFeatures, {
jsonType: CppFeaturesJson;
}>;
/**
* @generated from enum pb.CppFeatures.StringType
*/
export declare enum CppFeatures_StringType {
/**
* @generated from enum value: STRING_TYPE_UNKNOWN = 0;
*/
STRING_TYPE_UNKNOWN = 0,
/**
* @generated from enum value: VIEW = 1;
*/
VIEW = 1,
/**
* @generated from enum value: CORD = 2;
*/
CORD = 2,
/**
* @generated from enum value: STRING = 3;
*/
STRING = 3
}
/**
* @generated from enum pb.CppFeatures.StringType
*/
export type CppFeatures_StringTypeJson = "STRING_TYPE_UNKNOWN" | "VIEW" | "CORD" | "STRING";
/**
* Describes the enum pb.CppFeatures.StringType.
*/
export declare const CppFeatures_StringTypeSchema: GenEnum<CppFeatures_StringType, CppFeatures_StringTypeJson>;
/**
* @generated from extension: optional pb.CppFeatures cpp = 1000;
*/
export declare const cpp: GenExtension<FeatureSet, CppFeatures>;

View File

@@ -0,0 +1,57 @@
// Copyright 2021-2025 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.
import { fileDesc } from "../../../../codegenv2/file.js";
import { file_google_protobuf_descriptor } from "./descriptor_pb.js";
import { messageDesc } from "../../../../codegenv2/message.js";
import { enumDesc } from "../../../../codegenv2/enum.js";
import { extDesc } from "../../../../codegenv2/extension.js";
/**
* Describes the file google/protobuf/cpp_features.proto.
*/
export const file_google_protobuf_cpp_features = /*@__PURE__*/ fileDesc("CiJnb29nbGUvcHJvdG9idWYvY3BwX2ZlYXR1cmVzLnByb3RvEgJwYiL8AwoLQ3BwRmVhdHVyZXMS+wEKEmxlZ2FjeV9jbG9zZWRfZW51bRgBIAEoCELeAYgBAZgBBJgBAaIBCRIEdHJ1ZRiEB6IBChIFZmFsc2UY5weyAbgBCOgHEOgHGq8BVGhlIGxlZ2FjeSBjbG9zZWQgZW51bSBiZWhhdmlvciBpbiBDKysgaXMgZGVwcmVjYXRlZCBhbmQgaXMgc2NoZWR1bGVkIHRvIGJlIHJlbW92ZWQgaW4gZWRpdGlvbiAyMDI1LiAgU2VlIGh0dHA6Ly9wcm90b2J1Zi5kZXYvcHJvZ3JhbW1pbmctZ3VpZGVzL2VudW0vI2NwcCBmb3IgbW9yZSBpbmZvcm1hdGlvbhJaCgtzdHJpbmdfdHlwZRgCIAEoDjIaLnBiLkNwcEZlYXR1cmVzLlN0cmluZ1R5cGVCKYgBAZgBBJgBAaIBCxIGU1RSSU5HGIQHogEJEgRWSUVXGOkHsgEDCOgHEkwKGmVudW1fbmFtZV91c2VzX3N0cmluZ192aWV3GAMgASgIQiiIAQGYAQaYAQGiAQoSBWZhbHNlGIQHogEJEgR0cnVlGOkHsgEDCOkHIkUKClN0cmluZ1R5cGUSFwoTU1RSSU5HX1RZUEVfVU5LTk9XThAAEggKBFZJRVcQARIICgRDT1JEEAISCgoGU1RSSU5HEAM6PwoDY3BwEhsuZ29vZ2xlLnByb3RvYnVmLkZlYXR1cmVTZXQY6AcgASgLMg8ucGIuQ3BwRmVhdHVyZXNSA2NwcA", [file_google_protobuf_descriptor]);
/**
* Describes the message pb.CppFeatures.
* Use `create(CppFeaturesSchema)` to create a new message.
*/
export const CppFeaturesSchema = /*@__PURE__*/ messageDesc(file_google_protobuf_cpp_features, 0);
/**
* @generated from enum pb.CppFeatures.StringType
*/
export var CppFeatures_StringType;
(function (CppFeatures_StringType) {
/**
* @generated from enum value: STRING_TYPE_UNKNOWN = 0;
*/
CppFeatures_StringType[CppFeatures_StringType["STRING_TYPE_UNKNOWN"] = 0] = "STRING_TYPE_UNKNOWN";
/**
* @generated from enum value: VIEW = 1;
*/
CppFeatures_StringType[CppFeatures_StringType["VIEW"] = 1] = "VIEW";
/**
* @generated from enum value: CORD = 2;
*/
CppFeatures_StringType[CppFeatures_StringType["CORD"] = 2] = "CORD";
/**
* @generated from enum value: STRING = 3;
*/
CppFeatures_StringType[CppFeatures_StringType["STRING"] = 3] = "STRING";
})(CppFeatures_StringType || (CppFeatures_StringType = {}));
/**
* Describes the enum pb.CppFeatures.StringType.
*/
export const CppFeatures_StringTypeSchema = /*@__PURE__*/ enumDesc(file_google_protobuf_cpp_features, 0, 0);
/**
* @generated from extension: optional pb.CppFeatures cpp = 1000;
*/
export const cpp = /*@__PURE__*/ extDesc(file_google_protobuf_cpp_features, 0);

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,161 @@
import type { GenFile, GenMessage } from "../../../../codegenv2/types.js";
import type { Message } from "../../../../types.js";
/**
* Describes the file google/protobuf/duration.proto.
*/
export declare const file_google_protobuf_duration: GenFile;
/**
* 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 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;
};
/**
* 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 type DurationJson = string;
/**
* Describes the message google.protobuf.Duration.
* Use `create(DurationSchema)` to create a new message.
*/
export declare const DurationSchema: GenMessage<Duration, {
jsonType: DurationJson;
}>;

View File

@@ -0,0 +1,24 @@
// Copyright 2021-2025 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.
import { fileDesc } from "../../../../codegenv2/file.js";
import { messageDesc } from "../../../../codegenv2/message.js";
/**
* Describes the file google/protobuf/duration.proto.
*/
export const file_google_protobuf_duration = /*@__PURE__*/ fileDesc("Ch5nb29nbGUvcHJvdG9idWYvZHVyYXRpb24ucHJvdG8SD2dvb2dsZS5wcm90b2J1ZiIqCghEdXJhdGlvbhIPCgdzZWNvbmRzGAEgASgDEg0KBW5hbm9zGAIgASgFQoMBChNjb20uZ29vZ2xlLnByb3RvYnVmQg1EdXJhdGlvblByb3RvUAFaMWdvb2dsZS5nb2xhbmcub3JnL3Byb3RvYnVmL3R5cGVzL2tub3duL2R1cmF0aW9ucGL4AQGiAgNHUEKqAh5Hb29nbGUuUHJvdG9idWYuV2VsbEtub3duVHlwZXNiBnByb3RvMw");
/**
* Describes the message google.protobuf.Duration.
* Use `create(DurationSchema)` to create a new message.
*/
export const DurationSchema = /*@__PURE__*/ messageDesc(file_google_protobuf_duration, 0);

View File

@@ -0,0 +1,39 @@
import type { GenFile, GenMessage } from "../../../../codegenv2/types.js";
import type { Message } from "../../../../types.js";
/**
* Describes the file google/protobuf/empty.proto.
*/
export declare const file_google_protobuf_empty: GenFile;
/**
* 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 type Empty = Message<"google.protobuf.Empty"> & {};
/**
* 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 type EmptyJson = Record<string, never>;
/**
* Describes the message google.protobuf.Empty.
* Use `create(EmptySchema)` to create a new message.
*/
export declare const EmptySchema: GenMessage<Empty, {
jsonType: EmptyJson;
}>;

View File

@@ -0,0 +1,24 @@
// Copyright 2021-2025 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.
import { fileDesc } from "../../../../codegenv2/file.js";
import { messageDesc } from "../../../../codegenv2/message.js";
/**
* Describes the file google/protobuf/empty.proto.
*/
export const file_google_protobuf_empty = /*@__PURE__*/ fileDesc("Chtnb29nbGUvcHJvdG9idWYvZW1wdHkucHJvdG8SD2dvb2dsZS5wcm90b2J1ZiIHCgVFbXB0eUJ9ChNjb20uZ29vZ2xlLnByb3RvYnVmQgpFbXB0eVByb3RvUAFaLmdvb2dsZS5nb2xhbmcub3JnL3Byb3RvYnVmL3R5cGVzL2tub3duL2VtcHR5cGL4AQGiAgNHUEKqAh5Hb29nbGUuUHJvdG9idWYuV2VsbEtub3duVHlwZXNiBnByb3RvMw");
/**
* Describes the message google.protobuf.Empty.
* Use `create(EmptySchema)` to create a new message.
*/
export const EmptySchema = /*@__PURE__*/ messageDesc(file_google_protobuf_empty, 0);

View File

@@ -0,0 +1,428 @@
import type { GenFile, GenMessage } from "../../../../codegenv2/types.js";
import type { Message } from "../../../../types.js";
/**
* Describes the file google/protobuf/field_mask.proto.
*/
export declare const file_google_protobuf_field_mask: GenFile;
/**
* `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 type FieldMask = Message<"google.protobuf.FieldMask"> & {
/**
* The set of field mask paths.
*
* @generated from field: repeated string paths = 1;
*/
paths: string[];
};
/**
* `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 type FieldMaskJson = string;
/**
* Describes the message google.protobuf.FieldMask.
* Use `create(FieldMaskSchema)` to create a new message.
*/
export declare const FieldMaskSchema: GenMessage<FieldMask, {
jsonType: FieldMaskJson;
}>;

View File

@@ -0,0 +1,24 @@
// Copyright 2021-2025 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.
import { fileDesc } from "../../../../codegenv2/file.js";
import { messageDesc } from "../../../../codegenv2/message.js";
/**
* Describes the file google/protobuf/field_mask.proto.
*/
export const file_google_protobuf_field_mask = /*@__PURE__*/ fileDesc("CiBnb29nbGUvcHJvdG9idWYvZmllbGRfbWFzay5wcm90bxIPZ29vZ2xlLnByb3RvYnVmIhoKCUZpZWxkTWFzaxINCgVwYXRocxgBIAMoCUKFAQoTY29tLmdvb2dsZS5wcm90b2J1ZkIORmllbGRNYXNrUHJvdG9QAVoyZ29vZ2xlLmdvbGFuZy5vcmcvcHJvdG9idWYvdHlwZXMva25vd24vZmllbGRtYXNrcGL4AQGiAgNHUEKqAh5Hb29nbGUuUHJvdG9idWYuV2VsbEtub3duVHlwZXNiBnByb3RvMw");
/**
* Describes the message google.protobuf.FieldMask.
* Use `create(FieldMaskSchema)` to create a new message.
*/
export const FieldMaskSchema = /*@__PURE__*/ messageDesc(file_google_protobuf_field_mask, 0);

View File

@@ -0,0 +1,124 @@
import type { GenEnum, GenExtension, GenFile, GenMessage } from "../../../../codegenv2/types.js";
import type { FeatureSet } from "./descriptor_pb.js";
import type { Message } from "../../../../types.js";
/**
* Describes the file google/protobuf/go_features.proto.
*/
export declare const file_google_protobuf_go_features: GenFile;
/**
* @generated from message pb.GoFeatures
*/
export type GoFeatures = Message<"pb.GoFeatures"> & {
/**
* Whether or not to generate the deprecated UnmarshalJSON method for enums.
* Can only be true for proto using the Open Struct api.
*
* @generated from field: optional bool legacy_unmarshal_json_enum = 1;
*/
legacyUnmarshalJsonEnum: boolean;
/**
* One of OPEN, HYBRID or OPAQUE.
*
* @generated from field: optional pb.GoFeatures.APILevel api_level = 2;
*/
apiLevel: GoFeatures_APILevel;
/**
* @generated from field: optional pb.GoFeatures.StripEnumPrefix strip_enum_prefix = 3;
*/
stripEnumPrefix: GoFeatures_StripEnumPrefix;
};
/**
* @generated from message pb.GoFeatures
*/
export type GoFeaturesJson = {
/**
* Whether or not to generate the deprecated UnmarshalJSON method for enums.
* Can only be true for proto using the Open Struct api.
*
* @generated from field: optional bool legacy_unmarshal_json_enum = 1;
*/
legacyUnmarshalJsonEnum?: boolean;
/**
* One of OPEN, HYBRID or OPAQUE.
*
* @generated from field: optional pb.GoFeatures.APILevel api_level = 2;
*/
apiLevel?: GoFeatures_APILevelJson;
/**
* @generated from field: optional pb.GoFeatures.StripEnumPrefix strip_enum_prefix = 3;
*/
stripEnumPrefix?: GoFeatures_StripEnumPrefixJson;
};
/**
* Describes the message pb.GoFeatures.
* Use `create(GoFeaturesSchema)` to create a new message.
*/
export declare const GoFeaturesSchema: GenMessage<GoFeatures, {
jsonType: GoFeaturesJson;
}>;
/**
* @generated from enum pb.GoFeatures.APILevel
*/
export declare enum GoFeatures_APILevel {
/**
* API_LEVEL_UNSPECIFIED results in selecting the OPEN API,
* but needs to be a separate value to distinguish between
* an explicitly set api level or a missing api level.
*
* @generated from enum value: API_LEVEL_UNSPECIFIED = 0;
*/
API_LEVEL_UNSPECIFIED = 0,
/**
* @generated from enum value: API_OPEN = 1;
*/
API_OPEN = 1,
/**
* @generated from enum value: API_HYBRID = 2;
*/
API_HYBRID = 2,
/**
* @generated from enum value: API_OPAQUE = 3;
*/
API_OPAQUE = 3
}
/**
* @generated from enum pb.GoFeatures.APILevel
*/
export type GoFeatures_APILevelJson = "API_LEVEL_UNSPECIFIED" | "API_OPEN" | "API_HYBRID" | "API_OPAQUE";
/**
* Describes the enum pb.GoFeatures.APILevel.
*/
export declare const GoFeatures_APILevelSchema: GenEnum<GoFeatures_APILevel, GoFeatures_APILevelJson>;
/**
* @generated from enum pb.GoFeatures.StripEnumPrefix
*/
export declare enum GoFeatures_StripEnumPrefix {
/**
* @generated from enum value: STRIP_ENUM_PREFIX_UNSPECIFIED = 0;
*/
UNSPECIFIED = 0,
/**
* @generated from enum value: STRIP_ENUM_PREFIX_KEEP = 1;
*/
KEEP = 1,
/**
* @generated from enum value: STRIP_ENUM_PREFIX_GENERATE_BOTH = 2;
*/
GENERATE_BOTH = 2,
/**
* @generated from enum value: STRIP_ENUM_PREFIX_STRIP = 3;
*/
STRIP = 3
}
/**
* @generated from enum pb.GoFeatures.StripEnumPrefix
*/
export type GoFeatures_StripEnumPrefixJson = "STRIP_ENUM_PREFIX_UNSPECIFIED" | "STRIP_ENUM_PREFIX_KEEP" | "STRIP_ENUM_PREFIX_GENERATE_BOTH" | "STRIP_ENUM_PREFIX_STRIP";
/**
* Describes the enum pb.GoFeatures.StripEnumPrefix.
*/
export declare const GoFeatures_StripEnumPrefixSchema: GenEnum<GoFeatures_StripEnumPrefix, GoFeatures_StripEnumPrefixJson>;
/**
* @generated from extension: optional pb.GoFeatures go = 1002;
*/
export declare const go: GenExtension<FeatureSet, GoFeatures>;

View File

@@ -0,0 +1,87 @@
// Copyright 2021-2025 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.
import { fileDesc } from "../../../../codegenv2/file.js";
import { file_google_protobuf_descriptor } from "./descriptor_pb.js";
import { messageDesc } from "../../../../codegenv2/message.js";
import { enumDesc } from "../../../../codegenv2/enum.js";
import { extDesc } from "../../../../codegenv2/extension.js";
/**
* Describes the file google/protobuf/go_features.proto.
*/
export const file_google_protobuf_go_features = /*@__PURE__*/ fileDesc("CiFnb29nbGUvcHJvdG9idWYvZ29fZmVhdHVyZXMucHJvdG8SAnBiIvcECgpHb0ZlYXR1cmVzEqUBChpsZWdhY3lfdW5tYXJzaGFsX2pzb25fZW51bRgBIAEoCEKAAYgBAZgBBpgBAaIBCRIEdHJ1ZRiEB6IBChIFZmFsc2UY5weyAVsI6AcQ6AcaU1RoZSBsZWdhY3kgVW5tYXJzaGFsSlNPTiBBUEkgaXMgZGVwcmVjYXRlZCBhbmQgd2lsbCBiZSByZW1vdmVkIGluIGEgZnV0dXJlIGVkaXRpb24uEmoKCWFwaV9sZXZlbBgCIAEoDjIXLnBiLkdvRmVhdHVyZXMuQVBJTGV2ZWxCPogBAZgBA5gBAaIBGhIVQVBJX0xFVkVMX1VOU1BFQ0lGSUVEGIQHogEPEgpBUElfT1BBUVVFGOkHsgEDCOgHEmsKEXN0cmlwX2VudW1fcHJlZml4GAMgASgOMh4ucGIuR29GZWF0dXJlcy5TdHJpcEVudW1QcmVmaXhCMIgBAZgBBpgBB5gBAaIBGxIWU1RSSVBfRU5VTV9QUkVGSVhfS0VFUBiEB7IBAwjpByJTCghBUElMZXZlbBIZChVBUElfTEVWRUxfVU5TUEVDSUZJRUQQABIMCghBUElfT1BFThABEg4KCkFQSV9IWUJSSUQQAhIOCgpBUElfT1BBUVVFEAMikgEKD1N0cmlwRW51bVByZWZpeBIhCh1TVFJJUF9FTlVNX1BSRUZJWF9VTlNQRUNJRklFRBAAEhoKFlNUUklQX0VOVU1fUFJFRklYX0tFRVAQARIjCh9TVFJJUF9FTlVNX1BSRUZJWF9HRU5FUkFURV9CT1RIEAISGwoXU1RSSVBfRU5VTV9QUkVGSVhfU1RSSVAQAzo8CgJnbxIbLmdvb2dsZS5wcm90b2J1Zi5GZWF0dXJlU2V0GOoHIAEoCzIOLnBiLkdvRmVhdHVyZXNSAmdvQi9aLWdvb2dsZS5nb2xhbmcub3JnL3Byb3RvYnVmL3R5cGVzL2dvZmVhdHVyZXNwYg", [file_google_protobuf_descriptor]);
/**
* Describes the message pb.GoFeatures.
* Use `create(GoFeaturesSchema)` to create a new message.
*/
export const GoFeaturesSchema = /*@__PURE__*/ messageDesc(file_google_protobuf_go_features, 0);
/**
* @generated from enum pb.GoFeatures.APILevel
*/
export var GoFeatures_APILevel;
(function (GoFeatures_APILevel) {
/**
* API_LEVEL_UNSPECIFIED results in selecting the OPEN API,
* but needs to be a separate value to distinguish between
* an explicitly set api level or a missing api level.
*
* @generated from enum value: API_LEVEL_UNSPECIFIED = 0;
*/
GoFeatures_APILevel[GoFeatures_APILevel["API_LEVEL_UNSPECIFIED"] = 0] = "API_LEVEL_UNSPECIFIED";
/**
* @generated from enum value: API_OPEN = 1;
*/
GoFeatures_APILevel[GoFeatures_APILevel["API_OPEN"] = 1] = "API_OPEN";
/**
* @generated from enum value: API_HYBRID = 2;
*/
GoFeatures_APILevel[GoFeatures_APILevel["API_HYBRID"] = 2] = "API_HYBRID";
/**
* @generated from enum value: API_OPAQUE = 3;
*/
GoFeatures_APILevel[GoFeatures_APILevel["API_OPAQUE"] = 3] = "API_OPAQUE";
})(GoFeatures_APILevel || (GoFeatures_APILevel = {}));
/**
* Describes the enum pb.GoFeatures.APILevel.
*/
export const GoFeatures_APILevelSchema = /*@__PURE__*/ enumDesc(file_google_protobuf_go_features, 0, 0);
/**
* @generated from enum pb.GoFeatures.StripEnumPrefix
*/
export var GoFeatures_StripEnumPrefix;
(function (GoFeatures_StripEnumPrefix) {
/**
* @generated from enum value: STRIP_ENUM_PREFIX_UNSPECIFIED = 0;
*/
GoFeatures_StripEnumPrefix[GoFeatures_StripEnumPrefix["UNSPECIFIED"] = 0] = "UNSPECIFIED";
/**
* @generated from enum value: STRIP_ENUM_PREFIX_KEEP = 1;
*/
GoFeatures_StripEnumPrefix[GoFeatures_StripEnumPrefix["KEEP"] = 1] = "KEEP";
/**
* @generated from enum value: STRIP_ENUM_PREFIX_GENERATE_BOTH = 2;
*/
GoFeatures_StripEnumPrefix[GoFeatures_StripEnumPrefix["GENERATE_BOTH"] = 2] = "GENERATE_BOTH";
/**
* @generated from enum value: STRIP_ENUM_PREFIX_STRIP = 3;
*/
GoFeatures_StripEnumPrefix[GoFeatures_StripEnumPrefix["STRIP"] = 3] = "STRIP";
})(GoFeatures_StripEnumPrefix || (GoFeatures_StripEnumPrefix = {}));
/**
* Describes the enum pb.GoFeatures.StripEnumPrefix.
*/
export const GoFeatures_StripEnumPrefixSchema = /*@__PURE__*/ enumDesc(file_google_protobuf_go_features, 0, 1);
/**
* @generated from extension: optional pb.GoFeatures go = 1002;
*/
export const go = /*@__PURE__*/ extDesc(file_google_protobuf_go_features, 0);

View File

@@ -0,0 +1,194 @@
import type { GenEnum, GenExtension, GenFile, GenMessage } from "../../../../codegenv2/types.js";
import type { FeatureSet } from "./descriptor_pb.js";
import type { Message } from "../../../../types.js";
/**
* Describes the file google/protobuf/java_features.proto.
*/
export declare const file_google_protobuf_java_features: GenFile;
/**
* @generated from message pb.JavaFeatures
*/
export type JavaFeatures = Message<"pb.JavaFeatures"> & {
/**
* Whether or not to treat an enum field as closed. This option is only
* applicable to enum fields, and will be removed in the future. It is
* consistent with the legacy behavior of using proto3 enum types for proto2
* fields.
*
* @generated from field: optional bool legacy_closed_enum = 1;
*/
legacyClosedEnum: boolean;
/**
* @generated from field: optional pb.JavaFeatures.Utf8Validation utf8_validation = 2;
*/
utf8Validation: JavaFeatures_Utf8Validation;
/**
* Allows creation of large Java enums, extending beyond the standard
* constant limits imposed by the Java language.
*
* @generated from field: optional bool large_enum = 3;
*/
largeEnum: boolean;
/**
* Whether to use the old default outer class name scheme, or the new feature
* which adds a "Proto" suffix to the outer class name.
*
* Users will not be able to set this option, because we removed it in the
* same edition that it was introduced. But we use it to determine which
* naming scheme to use for outer class name defaults.
*
* @generated from field: optional bool use_old_outer_classname_default = 4;
*/
useOldOuterClassnameDefault: boolean;
/**
* Whether to nest the generated class in the generated file class. This is
* only applicable to *top-level* messages, enums, and services.
*
* @generated from field: optional pb.JavaFeatures.NestInFileClassFeature.NestInFileClass nest_in_file_class = 5;
*/
nestInFileClass: JavaFeatures_NestInFileClassFeature_NestInFileClass;
};
/**
* @generated from message pb.JavaFeatures
*/
export type JavaFeaturesJson = {
/**
* Whether or not to treat an enum field as closed. This option is only
* applicable to enum fields, and will be removed in the future. It is
* consistent with the legacy behavior of using proto3 enum types for proto2
* fields.
*
* @generated from field: optional bool legacy_closed_enum = 1;
*/
legacyClosedEnum?: boolean;
/**
* @generated from field: optional pb.JavaFeatures.Utf8Validation utf8_validation = 2;
*/
utf8Validation?: JavaFeatures_Utf8ValidationJson;
/**
* Allows creation of large Java enums, extending beyond the standard
* constant limits imposed by the Java language.
*
* @generated from field: optional bool large_enum = 3;
*/
largeEnum?: boolean;
/**
* Whether to use the old default outer class name scheme, or the new feature
* which adds a "Proto" suffix to the outer class name.
*
* Users will not be able to set this option, because we removed it in the
* same edition that it was introduced. But we use it to determine which
* naming scheme to use for outer class name defaults.
*
* @generated from field: optional bool use_old_outer_classname_default = 4;
*/
useOldOuterClassnameDefault?: boolean;
/**
* Whether to nest the generated class in the generated file class. This is
* only applicable to *top-level* messages, enums, and services.
*
* @generated from field: optional pb.JavaFeatures.NestInFileClassFeature.NestInFileClass nest_in_file_class = 5;
*/
nestInFileClass?: JavaFeatures_NestInFileClassFeature_NestInFileClassJson;
};
/**
* Describes the message pb.JavaFeatures.
* Use `create(JavaFeaturesSchema)` to create a new message.
*/
export declare const JavaFeaturesSchema: GenMessage<JavaFeatures, {
jsonType: JavaFeaturesJson;
}>;
/**
* @generated from message pb.JavaFeatures.NestInFileClassFeature
*/
export type JavaFeatures_NestInFileClassFeature = Message<"pb.JavaFeatures.NestInFileClassFeature"> & {};
/**
* @generated from message pb.JavaFeatures.NestInFileClassFeature
*/
export type JavaFeatures_NestInFileClassFeatureJson = {};
/**
* Describes the message pb.JavaFeatures.NestInFileClassFeature.
* Use `create(JavaFeatures_NestInFileClassFeatureSchema)` to create a new message.
*/
export declare const JavaFeatures_NestInFileClassFeatureSchema: GenMessage<JavaFeatures_NestInFileClassFeature, {
jsonType: JavaFeatures_NestInFileClassFeatureJson;
}>;
/**
* @generated from enum pb.JavaFeatures.NestInFileClassFeature.NestInFileClass
*/
export declare enum JavaFeatures_NestInFileClassFeature_NestInFileClass {
/**
* Invalid default, which should never be used.
*
* @generated from enum value: NEST_IN_FILE_CLASS_UNKNOWN = 0;
*/
NEST_IN_FILE_CLASS_UNKNOWN = 0,
/**
* Do not nest the generated class in the file class.
*
* @generated from enum value: NO = 1;
*/
NO = 1,
/**
* Nest the generated class in the file class.
*
* @generated from enum value: YES = 2;
*/
YES = 2,
/**
* Fall back to the `java_multiple_files` option. Users won't be able to
* set this option.
*
* @generated from enum value: LEGACY = 3;
*/
LEGACY = 3
}
/**
* @generated from enum pb.JavaFeatures.NestInFileClassFeature.NestInFileClass
*/
export type JavaFeatures_NestInFileClassFeature_NestInFileClassJson = "NEST_IN_FILE_CLASS_UNKNOWN" | "NO" | "YES" | "LEGACY";
/**
* Describes the enum pb.JavaFeatures.NestInFileClassFeature.NestInFileClass.
*/
export declare const JavaFeatures_NestInFileClassFeature_NestInFileClassSchema: GenEnum<JavaFeatures_NestInFileClassFeature_NestInFileClass, JavaFeatures_NestInFileClassFeature_NestInFileClassJson>;
/**
* The UTF8 validation strategy to use.
*
* @generated from enum pb.JavaFeatures.Utf8Validation
*/
export declare enum JavaFeatures_Utf8Validation {
/**
* Invalid default, which should never be used.
*
* @generated from enum value: UTF8_VALIDATION_UNKNOWN = 0;
*/
UTF8_VALIDATION_UNKNOWN = 0,
/**
* Respect the UTF8 validation behavior specified by the global
* utf8_validation feature.
*
* @generated from enum value: DEFAULT = 1;
*/
DEFAULT = 1,
/**
* Verifies UTF8 validity overriding the global utf8_validation
* feature. This represents the legacy java_string_check_utf8 option.
*
* @generated from enum value: VERIFY = 2;
*/
VERIFY = 2
}
/**
* The UTF8 validation strategy to use.
*
* @generated from enum pb.JavaFeatures.Utf8Validation
*/
export type JavaFeatures_Utf8ValidationJson = "UTF8_VALIDATION_UNKNOWN" | "DEFAULT" | "VERIFY";
/**
* Describes the enum pb.JavaFeatures.Utf8Validation.
*/
export declare const JavaFeatures_Utf8ValidationSchema: GenEnum<JavaFeatures_Utf8Validation, JavaFeatures_Utf8ValidationJson>;
/**
* @generated from extension: optional pb.JavaFeatures java = 1001;
*/
export declare const java: GenExtension<FeatureSet, JavaFeatures>;

View File

@@ -0,0 +1,103 @@
// Copyright 2021-2025 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.
import { fileDesc } from "../../../../codegenv2/file.js";
import { file_google_protobuf_descriptor } from "./descriptor_pb.js";
import { messageDesc } from "../../../../codegenv2/message.js";
import { enumDesc } from "../../../../codegenv2/enum.js";
import { extDesc } from "../../../../codegenv2/extension.js";
/**
* Describes the file google/protobuf/java_features.proto.
*/
export const file_google_protobuf_java_features = /*@__PURE__*/ fileDesc("CiNnb29nbGUvcHJvdG9idWYvamF2YV9mZWF0dXJlcy5wcm90bxICcGIigwgKDEphdmFGZWF0dXJlcxL+AQoSbGVnYWN5X2Nsb3NlZF9lbnVtGAEgASgIQuEBiAEBmAEEmAEBogEJEgR0cnVlGIQHogEKEgVmYWxzZRjnB7IBuwEI6AcQ6AcasgFUaGUgbGVnYWN5IGNsb3NlZCBlbnVtIGJlaGF2aW9yIGluIEphdmEgaXMgZGVwcmVjYXRlZCBhbmQgaXMgc2NoZWR1bGVkIHRvIGJlIHJlbW92ZWQgaW4gZWRpdGlvbiAyMDI1LiAgU2VlIGh0dHA6Ly9wcm90b2J1Zi5kZXYvcHJvZ3JhbW1pbmctZ3VpZGVzL2VudW0vI2phdmEgZm9yIG1vcmUgaW5mb3JtYXRpb24uEp8CCg91dGY4X3ZhbGlkYXRpb24YAiABKA4yHy5wYi5KYXZhRmVhdHVyZXMuVXRmOFZhbGlkYXRpb25C5AGIAQGYAQSYAQGiAQwSB0RFRkFVTFQYhAeyAcgBCOgHEOkHGr8BVGhlIEphdmEtc3BlY2lmaWMgdXRmOCB2YWxpZGF0aW9uIGZlYXR1cmUgaXMgZGVwcmVjYXRlZCBhbmQgaXMgc2NoZWR1bGVkIHRvIGJlIHJlbW92ZWQgaW4gZWRpdGlvbiAyMDI1LiAgVXRmOCB2YWxpZGF0aW9uIGJlaGF2aW9yIHNob3VsZCB1c2UgdGhlIGdsb2JhbCBjcm9zcy1sYW5ndWFnZSB1dGY4X3ZhbGlkYXRpb24gZmVhdHVyZS4SMAoKbGFyZ2VfZW51bRgDIAEoCEIciAEBmAEGmAEBogEKEgVmYWxzZRiEB7IBAwjpBxJRCh91c2Vfb2xkX291dGVyX2NsYXNzbmFtZV9kZWZhdWx0GAQgASgIQiiIAQGYAQGiAQkSBHRydWUYhAeiAQoSBWZhbHNlGOkHsgEGCOkHIOkHEn8KEm5lc3RfaW5fZmlsZV9jbGFzcxgFIAEoDjI3LnBiLkphdmFGZWF0dXJlcy5OZXN0SW5GaWxlQ2xhc3NGZWF0dXJlLk5lc3RJbkZpbGVDbGFzc0IqiAEBmAEDmAEGmAEIogELEgZMRUdBQ1kYhAeiAQcSAk5PGOkHsgEDCOkHGnwKFk5lc3RJbkZpbGVDbGFzc0ZlYXR1cmUiWAoPTmVzdEluRmlsZUNsYXNzEh4KGk5FU1RfSU5fRklMRV9DTEFTU19VTktOT1dOEAASBgoCTk8QARIHCgNZRVMQAhIUCgZMRUdBQ1kQAxoIIgYI6Qcg6QdKCAgBEICAgIACIkYKDlV0ZjhWYWxpZGF0aW9uEhsKF1VURjhfVkFMSURBVElPTl9VTktOT1dOEAASCwoHREVGQVVMVBABEgoKBlZFUklGWRACSgQIBhAHOkIKBGphdmESGy5nb29nbGUucHJvdG9idWYuRmVhdHVyZVNldBjpByABKAsyEC5wYi5KYXZhRmVhdHVyZXNSBGphdmFCKAoTY29tLmdvb2dsZS5wcm90b2J1ZkIRSmF2YUZlYXR1cmVzUHJvdG8", [file_google_protobuf_descriptor]);
/**
* Describes the message pb.JavaFeatures.
* Use `create(JavaFeaturesSchema)` to create a new message.
*/
export const JavaFeaturesSchema = /*@__PURE__*/ messageDesc(file_google_protobuf_java_features, 0);
/**
* Describes the message pb.JavaFeatures.NestInFileClassFeature.
* Use `create(JavaFeatures_NestInFileClassFeatureSchema)` to create a new message.
*/
export const JavaFeatures_NestInFileClassFeatureSchema = /*@__PURE__*/ messageDesc(file_google_protobuf_java_features, 0, 0);
/**
* @generated from enum pb.JavaFeatures.NestInFileClassFeature.NestInFileClass
*/
export var JavaFeatures_NestInFileClassFeature_NestInFileClass;
(function (JavaFeatures_NestInFileClassFeature_NestInFileClass) {
/**
* Invalid default, which should never be used.
*
* @generated from enum value: NEST_IN_FILE_CLASS_UNKNOWN = 0;
*/
JavaFeatures_NestInFileClassFeature_NestInFileClass[JavaFeatures_NestInFileClassFeature_NestInFileClass["NEST_IN_FILE_CLASS_UNKNOWN"] = 0] = "NEST_IN_FILE_CLASS_UNKNOWN";
/**
* Do not nest the generated class in the file class.
*
* @generated from enum value: NO = 1;
*/
JavaFeatures_NestInFileClassFeature_NestInFileClass[JavaFeatures_NestInFileClassFeature_NestInFileClass["NO"] = 1] = "NO";
/**
* Nest the generated class in the file class.
*
* @generated from enum value: YES = 2;
*/
JavaFeatures_NestInFileClassFeature_NestInFileClass[JavaFeatures_NestInFileClassFeature_NestInFileClass["YES"] = 2] = "YES";
/**
* Fall back to the `java_multiple_files` option. Users won't be able to
* set this option.
*
* @generated from enum value: LEGACY = 3;
*/
JavaFeatures_NestInFileClassFeature_NestInFileClass[JavaFeatures_NestInFileClassFeature_NestInFileClass["LEGACY"] = 3] = "LEGACY";
})(JavaFeatures_NestInFileClassFeature_NestInFileClass || (JavaFeatures_NestInFileClassFeature_NestInFileClass = {}));
/**
* Describes the enum pb.JavaFeatures.NestInFileClassFeature.NestInFileClass.
*/
export const JavaFeatures_NestInFileClassFeature_NestInFileClassSchema = /*@__PURE__*/ enumDesc(file_google_protobuf_java_features, 0, 0, 0);
/**
* The UTF8 validation strategy to use.
*
* @generated from enum pb.JavaFeatures.Utf8Validation
*/
export var JavaFeatures_Utf8Validation;
(function (JavaFeatures_Utf8Validation) {
/**
* Invalid default, which should never be used.
*
* @generated from enum value: UTF8_VALIDATION_UNKNOWN = 0;
*/
JavaFeatures_Utf8Validation[JavaFeatures_Utf8Validation["UTF8_VALIDATION_UNKNOWN"] = 0] = "UTF8_VALIDATION_UNKNOWN";
/**
* Respect the UTF8 validation behavior specified by the global
* utf8_validation feature.
*
* @generated from enum value: DEFAULT = 1;
*/
JavaFeatures_Utf8Validation[JavaFeatures_Utf8Validation["DEFAULT"] = 1] = "DEFAULT";
/**
* Verifies UTF8 validity overriding the global utf8_validation
* feature. This represents the legacy java_string_check_utf8 option.
*
* @generated from enum value: VERIFY = 2;
*/
JavaFeatures_Utf8Validation[JavaFeatures_Utf8Validation["VERIFY"] = 2] = "VERIFY";
})(JavaFeatures_Utf8Validation || (JavaFeatures_Utf8Validation = {}));
/**
* Describes the enum pb.JavaFeatures.Utf8Validation.
*/
export const JavaFeatures_Utf8ValidationSchema = /*@__PURE__*/ enumDesc(file_google_protobuf_java_features, 0, 0);
/**
* @generated from extension: optional pb.JavaFeatures java = 1001;
*/
export const java = /*@__PURE__*/ extDesc(file_google_protobuf_java_features, 0);

View File

@@ -0,0 +1,43 @@
import type { GenFile, GenMessage } from "../../../../codegenv2/types.js";
import type { Message } from "../../../../types.js";
/**
* Describes the file google/protobuf/source_context.proto.
*/
export declare const file_google_protobuf_source_context: GenFile;
/**
* `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 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;
};
/**
* `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 type SourceContextJson = {
/**
* 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(SourceContextSchema)` to create a new message.
*/
export declare const SourceContextSchema: GenMessage<SourceContext, {
jsonType: SourceContextJson;
}>;

View File

@@ -0,0 +1,24 @@
// Copyright 2021-2025 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.
import { fileDesc } from "../../../../codegenv2/file.js";
import { messageDesc } from "../../../../codegenv2/message.js";
/**
* Describes the file google/protobuf/source_context.proto.
*/
export const file_google_protobuf_source_context = /*@__PURE__*/ fileDesc("CiRnb29nbGUvcHJvdG9idWYvc291cmNlX2NvbnRleHQucHJvdG8SD2dvb2dsZS5wcm90b2J1ZiIiCg1Tb3VyY2VDb250ZXh0EhEKCWZpbGVfbmFtZRgBIAEoCUKKAQoTY29tLmdvb2dsZS5wcm90b2J1ZkISU291cmNlQ29udGV4dFByb3RvUAFaNmdvb2dsZS5nb2xhbmcub3JnL3Byb3RvYnVmL3R5cGVzL2tub3duL3NvdXJjZWNvbnRleHRwYqICA0dQQqoCHkdvb2dsZS5Qcm90b2J1Zi5XZWxsS25vd25UeXBlc2IGcHJvdG8z");
/**
* Describes the message google.protobuf.SourceContext.
* Use `create(SourceContextSchema)` to create a new message.
*/
export const SourceContextSchema = /*@__PURE__*/ messageDesc(file_google_protobuf_source_context, 0);

View File

@@ -0,0 +1,195 @@
import type { GenEnum, GenFile, GenMessage } from "../../../../codegenv2/types.js";
import type { Message } from "../../../../types.js";
import type { JsonObject, JsonValue } from "../../../../json-value.js";
/**
* Describes the file google/protobuf/struct.proto.
*/
export declare const file_google_protobuf_struct: GenFile;
/**
* `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 type Struct = Message<"google.protobuf.Struct"> & {
/**
* Unordered map of dynamically typed values.
*
* @generated from field: map<string, google.protobuf.Value> fields = 1;
*/
fields: {
[key: string]: Value;
};
};
/**
* `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 type StructJson = JsonObject;
/**
* Describes the message google.protobuf.Struct.
* Use `create(StructSchema)` to create a new message.
*/
export declare const StructSchema: GenMessage<Struct, {
jsonType: StructJson;
}>;
/**
* `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 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;
};
};
/**
* `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 type ValueJson = JsonValue;
/**
* Describes the message google.protobuf.Value.
* Use `create(ValueSchema)` to create a new message.
*/
export declare const ValueSchema: GenMessage<Value, {
jsonType: ValueJson;
}>;
/**
* `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 type ListValue = Message<"google.protobuf.ListValue"> & {
/**
* Repeated field of dynamically typed values.
*
* @generated from field: repeated google.protobuf.Value values = 1;
*/
values: Value[];
};
/**
* `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 type ListValueJson = JsonValue[];
/**
* Describes the message google.protobuf.ListValue.
* Use `create(ListValueSchema)` to create a new message.
*/
export declare const ListValueSchema: GenMessage<ListValue, {
jsonType: ListValueJson;
}>;
/**
* `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 declare enum NullValue {
/**
* Null value.
*
* @generated from enum value: NULL_VALUE = 0;
*/
NULL_VALUE = 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 type NullValueJson = null;
/**
* Describes the enum google.protobuf.NullValue.
*/
export declare const NullValueSchema: GenEnum<NullValue, NullValueJson>;

View File

@@ -0,0 +1,56 @@
// Copyright 2021-2025 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.
import { fileDesc } from "../../../../codegenv2/file.js";
import { messageDesc } from "../../../../codegenv2/message.js";
import { enumDesc } from "../../../../codegenv2/enum.js";
/**
* Describes the file google/protobuf/struct.proto.
*/
export const file_google_protobuf_struct = /*@__PURE__*/ fileDesc("Chxnb29nbGUvcHJvdG9idWYvc3RydWN0LnByb3RvEg9nb29nbGUucHJvdG9idWYihAEKBlN0cnVjdBIzCgZmaWVsZHMYASADKAsyIy5nb29nbGUucHJvdG9idWYuU3RydWN0LkZpZWxkc0VudHJ5GkUKC0ZpZWxkc0VudHJ5EgsKA2tleRgBIAEoCRIlCgV2YWx1ZRgCIAEoCzIWLmdvb2dsZS5wcm90b2J1Zi5WYWx1ZToCOAEi6gEKBVZhbHVlEjAKCm51bGxfdmFsdWUYASABKA4yGi5nb29nbGUucHJvdG9idWYuTnVsbFZhbHVlSAASFgoMbnVtYmVyX3ZhbHVlGAIgASgBSAASFgoMc3RyaW5nX3ZhbHVlGAMgASgJSAASFAoKYm9vbF92YWx1ZRgEIAEoCEgAEi8KDHN0cnVjdF92YWx1ZRgFIAEoCzIXLmdvb2dsZS5wcm90b2J1Zi5TdHJ1Y3RIABIwCgpsaXN0X3ZhbHVlGAYgASgLMhouZ29vZ2xlLnByb3RvYnVmLkxpc3RWYWx1ZUgAQgYKBGtpbmQiMwoJTGlzdFZhbHVlEiYKBnZhbHVlcxgBIAMoCzIWLmdvb2dsZS5wcm90b2J1Zi5WYWx1ZSobCglOdWxsVmFsdWUSDgoKTlVMTF9WQUxVRRAAQn8KE2NvbS5nb29nbGUucHJvdG9idWZCC1N0cnVjdFByb3RvUAFaL2dvb2dsZS5nb2xhbmcub3JnL3Byb3RvYnVmL3R5cGVzL2tub3duL3N0cnVjdHBi+AEBogIDR1BCqgIeR29vZ2xlLlByb3RvYnVmLldlbGxLbm93blR5cGVzYgZwcm90bzM");
/**
* Describes the message google.protobuf.Struct.
* Use `create(StructSchema)` to create a new message.
*/
export const StructSchema = /*@__PURE__*/ messageDesc(file_google_protobuf_struct, 0);
/**
* Describes the message google.protobuf.Value.
* Use `create(ValueSchema)` to create a new message.
*/
export const ValueSchema = /*@__PURE__*/ messageDesc(file_google_protobuf_struct, 1);
/**
* Describes the message google.protobuf.ListValue.
* Use `create(ListValueSchema)` to create a new message.
*/
export const ListValueSchema = /*@__PURE__*/ messageDesc(file_google_protobuf_struct, 2);
/**
* `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 var NullValue;
(function (NullValue) {
/**
* Null value.
*
* @generated from enum value: NULL_VALUE = 0;
*/
NullValue[NullValue["NULL_VALUE"] = 0] = "NULL_VALUE";
})(NullValue || (NullValue = {}));
/**
* Describes the enum google.protobuf.NullValue.
*/
export const NullValueSchema = /*@__PURE__*/ enumDesc(file_google_protobuf_struct, 0);

View File

@@ -0,0 +1,221 @@
import type { GenFile, GenMessage } from "../../../../codegenv2/types.js";
import type { Message } from "../../../../types.js";
/**
* Describes the file google/protobuf/timestamp.proto.
*/
export declare const file_google_protobuf_timestamp: GenFile;
/**
* 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 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;
};
/**
* 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 type TimestampJson = string;
/**
* Describes the message google.protobuf.Timestamp.
* Use `create(TimestampSchema)` to create a new message.
*/
export declare const TimestampSchema: GenMessage<Timestamp, {
jsonType: TimestampJson;
}>;

View File

@@ -0,0 +1,24 @@
// Copyright 2021-2025 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.
import { fileDesc } from "../../../../codegenv2/file.js";
import { messageDesc } from "../../../../codegenv2/message.js";
/**
* Describes the file google/protobuf/timestamp.proto.
*/
export const file_google_protobuf_timestamp = /*@__PURE__*/ fileDesc("Ch9nb29nbGUvcHJvdG9idWYvdGltZXN0YW1wLnByb3RvEg9nb29nbGUucHJvdG9idWYiKwoJVGltZXN0YW1wEg8KB3NlY29uZHMYASABKAMSDQoFbmFub3MYAiABKAVChQEKE2NvbS5nb29nbGUucHJvdG9idWZCDlRpbWVzdGFtcFByb3RvUAFaMmdvb2dsZS5nb2xhbmcub3JnL3Byb3RvYnVmL3R5cGVzL2tub3duL3RpbWVzdGFtcHBi+AEBogIDR1BCqgIeR29vZ2xlLlByb3RvYnVmLldlbGxLbm93blR5cGVzYgZwcm90bzM");
/**
* Describes the message google.protobuf.Timestamp.
* Use `create(TimestampSchema)` to create a new message.
*/
export const TimestampSchema = /*@__PURE__*/ messageDesc(file_google_protobuf_timestamp, 0);

View File

@@ -0,0 +1,722 @@
import type { GenEnum, GenFile, GenMessage } from "../../../../codegenv2/types.js";
import type { Any, AnyJson } from "./any_pb.js";
import type { SourceContext, SourceContextJson } from "./source_context_pb.js";
import type { Message } from "../../../../types.js";
/**
* Describes the file google/protobuf/type.proto.
*/
export declare const file_google_protobuf_type: GenFile;
/**
* A protocol buffer message type.
*
* New usages of this message as an alternative to DescriptorProto are strongly
* discouraged. This message does not reliability preserve all information
* necessary to model the schema and preserve semantics. Instead make use of
* FileDescriptorSet which preserves the necessary information.
*
* @generated from message google.protobuf.Type
*/
export 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;
};
/**
* A protocol buffer message type.
*
* New usages of this message as an alternative to DescriptorProto are strongly
* discouraged. This message does not reliability preserve all information
* necessary to model the schema and preserve semantics. Instead make use of
* FileDescriptorSet which preserves the necessary information.
*
* @generated from message google.protobuf.Type
*/
export type TypeJson = {
/**
* 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?: FieldJson[];
/**
* 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?: OptionJson[];
/**
* The source context.
*
* @generated from field: google.protobuf.SourceContext source_context = 5;
*/
sourceContext?: SourceContextJson;
/**
* The source syntax.
*
* @generated from field: google.protobuf.Syntax syntax = 6;
*/
syntax?: SyntaxJson;
/**
* 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(TypeSchema)` to create a new message.
*/
export declare const TypeSchema: GenMessage<Type, {
jsonType: TypeJson;
}>;
/**
* A single field of a message type.
*
* New usages of this message as an alternative to FieldDescriptorProto are
* strongly discouraged. This message does not reliability preserve all
* information necessary to model the schema and preserve semantics. Instead
* make use of FileDescriptorSet which preserves the necessary information.
*
* @generated from message google.protobuf.Field
*/
export 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;
};
/**
* A single field of a message type.
*
* New usages of this message as an alternative to FieldDescriptorProto are
* strongly discouraged. This message does not reliability preserve all
* information necessary to model the schema and preserve semantics. Instead
* make use of FileDescriptorSet which preserves the necessary information.
*
* @generated from message google.protobuf.Field
*/
export type FieldJson = {
/**
* The field type.
*
* @generated from field: google.protobuf.Field.Kind kind = 1;
*/
kind?: Field_KindJson;
/**
* The field cardinality.
*
* @generated from field: google.protobuf.Field.Cardinality cardinality = 2;
*/
cardinality?: Field_CardinalityJson;
/**
* 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?: OptionJson[];
/**
* 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(FieldSchema)` to create a new message.
*/
export declare const FieldSchema: GenMessage<Field, {
jsonType: FieldJson;
}>;
/**
* Basic field types.
*
* @generated from enum google.protobuf.Field.Kind
*/
export declare 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
}
/**
* Basic field types.
*
* @generated from enum google.protobuf.Field.Kind
*/
export type Field_KindJson = "TYPE_UNKNOWN" | "TYPE_DOUBLE" | "TYPE_FLOAT" | "TYPE_INT64" | "TYPE_UINT64" | "TYPE_INT32" | "TYPE_FIXED64" | "TYPE_FIXED32" | "TYPE_BOOL" | "TYPE_STRING" | "TYPE_GROUP" | "TYPE_MESSAGE" | "TYPE_BYTES" | "TYPE_UINT32" | "TYPE_ENUM" | "TYPE_SFIXED32" | "TYPE_SFIXED64" | "TYPE_SINT32" | "TYPE_SINT64";
/**
* Describes the enum google.protobuf.Field.Kind.
*/
export declare const Field_KindSchema: GenEnum<Field_Kind, Field_KindJson>;
/**
* Whether a field is optional, required, or repeated.
*
* @generated from enum google.protobuf.Field.Cardinality
*/
export declare 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
}
/**
* Whether a field is optional, required, or repeated.
*
* @generated from enum google.protobuf.Field.Cardinality
*/
export type Field_CardinalityJson = "CARDINALITY_UNKNOWN" | "CARDINALITY_OPTIONAL" | "CARDINALITY_REQUIRED" | "CARDINALITY_REPEATED";
/**
* Describes the enum google.protobuf.Field.Cardinality.
*/
export declare const Field_CardinalitySchema: GenEnum<Field_Cardinality, Field_CardinalityJson>;
/**
* Enum type definition.
*
* New usages of this message as an alternative to EnumDescriptorProto are
* strongly discouraged. This message does not reliability preserve all
* information necessary to model the schema and preserve semantics. Instead
* make use of FileDescriptorSet which preserves the necessary information.
*
* @generated from message google.protobuf.Enum
*/
export 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;
};
/**
* Enum type definition.
*
* New usages of this message as an alternative to EnumDescriptorProto are
* strongly discouraged. This message does not reliability preserve all
* information necessary to model the schema and preserve semantics. Instead
* make use of FileDescriptorSet which preserves the necessary information.
*
* @generated from message google.protobuf.Enum
*/
export type EnumJson = {
/**
* Enum type name.
*
* @generated from field: string name = 1;
*/
name?: string;
/**
* Enum value definitions.
*
* @generated from field: repeated google.protobuf.EnumValue enumvalue = 2;
*/
enumvalue?: EnumValueJson[];
/**
* Protocol buffer options.
*
* @generated from field: repeated google.protobuf.Option options = 3;
*/
options?: OptionJson[];
/**
* The source context.
*
* @generated from field: google.protobuf.SourceContext source_context = 4;
*/
sourceContext?: SourceContextJson;
/**
* The source syntax.
*
* @generated from field: google.protobuf.Syntax syntax = 5;
*/
syntax?: SyntaxJson;
/**
* 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(EnumSchema)` to create a new message.
*/
export declare const EnumSchema: GenMessage<Enum, {
jsonType: EnumJson;
}>;
/**
* Enum value definition.
*
* New usages of this message as an alternative to EnumValueDescriptorProto are
* strongly discouraged. This message does not reliability preserve all
* information necessary to model the schema and preserve semantics. Instead
* make use of FileDescriptorSet which preserves the necessary information.
*
* @generated from message google.protobuf.EnumValue
*/
export 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[];
};
/**
* Enum value definition.
*
* New usages of this message as an alternative to EnumValueDescriptorProto are
* strongly discouraged. This message does not reliability preserve all
* information necessary to model the schema and preserve semantics. Instead
* make use of FileDescriptorSet which preserves the necessary information.
*
* @generated from message google.protobuf.EnumValue
*/
export type EnumValueJson = {
/**
* 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?: OptionJson[];
};
/**
* Describes the message google.protobuf.EnumValue.
* Use `create(EnumValueSchema)` to create a new message.
*/
export declare const EnumValueSchema: GenMessage<EnumValue, {
jsonType: EnumValueJson;
}>;
/**
* A protocol buffer option, which can be attached to a message, field,
* enumeration, etc.
*
* New usages of this message as an alternative to FileOptions, MessageOptions,
* FieldOptions, EnumOptions, EnumValueOptions, ServiceOptions, or MethodOptions
* are strongly discouraged.
*
* @generated from message google.protobuf.Option
*/
export 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;
};
/**
* A protocol buffer option, which can be attached to a message, field,
* enumeration, etc.
*
* New usages of this message as an alternative to FileOptions, MessageOptions,
* FieldOptions, EnumOptions, EnumValueOptions, ServiceOptions, or MethodOptions
* are strongly discouraged.
*
* @generated from message google.protobuf.Option
*/
export type OptionJson = {
/**
* 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?: AnyJson;
};
/**
* Describes the message google.protobuf.Option.
* Use `create(OptionSchema)` to create a new message.
*/
export declare const OptionSchema: GenMessage<Option, {
jsonType: OptionJson;
}>;
/**
* The syntax in which a protocol buffer element is defined.
*
* @generated from enum google.protobuf.Syntax
*/
export declare enum Syntax {
/**
* Syntax `proto2`.
*
* @generated from enum value: SYNTAX_PROTO2 = 0;
*/
PROTO2 = 0,
/**
* Syntax `proto3`.
*
* @generated from enum value: SYNTAX_PROTO3 = 1;
*/
PROTO3 = 1,
/**
* Syntax `editions`.
*
* @generated from enum value: SYNTAX_EDITIONS = 2;
*/
EDITIONS = 2
}
/**
* The syntax in which a protocol buffer element is defined.
*
* @generated from enum google.protobuf.Syntax
*/
export type SyntaxJson = "SYNTAX_PROTO2" | "SYNTAX_PROTO3" | "SYNTAX_EDITIONS";
/**
* Describes the enum google.protobuf.Syntax.
*/
export declare const SyntaxSchema: GenEnum<Syntax, SyntaxJson>;

View File

@@ -0,0 +1,239 @@
// Copyright 2021-2025 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.
import { fileDesc } from "../../../../codegenv2/file.js";
import { file_google_protobuf_any } from "./any_pb.js";
import { file_google_protobuf_source_context } from "./source_context_pb.js";
import { messageDesc } from "../../../../codegenv2/message.js";
import { enumDesc } from "../../../../codegenv2/enum.js";
/**
* Describes the file google/protobuf/type.proto.
*/
export const file_google_protobuf_type = /*@__PURE__*/ fileDesc("Chpnb29nbGUvcHJvdG9idWYvdHlwZS5wcm90bxIPZ29vZ2xlLnByb3RvYnVmIugBCgRUeXBlEgwKBG5hbWUYASABKAkSJgoGZmllbGRzGAIgAygLMhYuZ29vZ2xlLnByb3RvYnVmLkZpZWxkEg4KBm9uZW9mcxgDIAMoCRIoCgdvcHRpb25zGAQgAygLMhcuZ29vZ2xlLnByb3RvYnVmLk9wdGlvbhI2Cg5zb3VyY2VfY29udGV4dBgFIAEoCzIeLmdvb2dsZS5wcm90b2J1Zi5Tb3VyY2VDb250ZXh0EicKBnN5bnRheBgGIAEoDjIXLmdvb2dsZS5wcm90b2J1Zi5TeW50YXgSDwoHZWRpdGlvbhgHIAEoCSLVBQoFRmllbGQSKQoEa2luZBgBIAEoDjIbLmdvb2dsZS5wcm90b2J1Zi5GaWVsZC5LaW5kEjcKC2NhcmRpbmFsaXR5GAIgASgOMiIuZ29vZ2xlLnByb3RvYnVmLkZpZWxkLkNhcmRpbmFsaXR5Eg4KBm51bWJlchgDIAEoBRIMCgRuYW1lGAQgASgJEhAKCHR5cGVfdXJsGAYgASgJEhMKC29uZW9mX2luZGV4GAcgASgFEg4KBnBhY2tlZBgIIAEoCBIoCgdvcHRpb25zGAkgAygLMhcuZ29vZ2xlLnByb3RvYnVmLk9wdGlvbhIRCglqc29uX25hbWUYCiABKAkSFQoNZGVmYXVsdF92YWx1ZRgLIAEoCSLIAgoES2luZBIQCgxUWVBFX1VOS05PV04QABIPCgtUWVBFX0RPVUJMRRABEg4KClRZUEVfRkxPQVQQAhIOCgpUWVBFX0lOVDY0EAMSDwoLVFlQRV9VSU5UNjQQBBIOCgpUWVBFX0lOVDMyEAUSEAoMVFlQRV9GSVhFRDY0EAYSEAoMVFlQRV9GSVhFRDMyEAcSDQoJVFlQRV9CT09MEAgSDwoLVFlQRV9TVFJJTkcQCRIOCgpUWVBFX0dST1VQEAoSEAoMVFlQRV9NRVNTQUdFEAsSDgoKVFlQRV9CWVRFUxAMEg8KC1RZUEVfVUlOVDMyEA0SDQoJVFlQRV9FTlVNEA4SEQoNVFlQRV9TRklYRUQzMhAPEhEKDVRZUEVfU0ZJWEVENjQQEBIPCgtUWVBFX1NJTlQzMhAREg8KC1RZUEVfU0lOVDY0EBIidAoLQ2FyZGluYWxpdHkSFwoTQ0FSRElOQUxJVFlfVU5LTk9XThAAEhgKFENBUkRJTkFMSVRZX09QVElPTkFMEAESGAoUQ0FSRElOQUxJVFlfUkVRVUlSRUQQAhIYChRDQVJESU5BTElUWV9SRVBFQVRFRBADIt8BCgRFbnVtEgwKBG5hbWUYASABKAkSLQoJZW51bXZhbHVlGAIgAygLMhouZ29vZ2xlLnByb3RvYnVmLkVudW1WYWx1ZRIoCgdvcHRpb25zGAMgAygLMhcuZ29vZ2xlLnByb3RvYnVmLk9wdGlvbhI2Cg5zb3VyY2VfY29udGV4dBgEIAEoCzIeLmdvb2dsZS5wcm90b2J1Zi5Tb3VyY2VDb250ZXh0EicKBnN5bnRheBgFIAEoDjIXLmdvb2dsZS5wcm90b2J1Zi5TeW50YXgSDwoHZWRpdGlvbhgGIAEoCSJTCglFbnVtVmFsdWUSDAoEbmFtZRgBIAEoCRIOCgZudW1iZXIYAiABKAUSKAoHb3B0aW9ucxgDIAMoCzIXLmdvb2dsZS5wcm90b2J1Zi5PcHRpb24iOwoGT3B0aW9uEgwKBG5hbWUYASABKAkSIwoFdmFsdWUYAiABKAsyFC5nb29nbGUucHJvdG9idWYuQW55KkMKBlN5bnRheBIRCg1TWU5UQVhfUFJPVE8yEAASEQoNU1lOVEFYX1BST1RPMxABEhMKD1NZTlRBWF9FRElUSU9OUxACQnsKE2NvbS5nb29nbGUucHJvdG9idWZCCVR5cGVQcm90b1ABWi1nb29nbGUuZ29sYW5nLm9yZy9wcm90b2J1Zi90eXBlcy9rbm93bi90eXBlcGL4AQGiAgNHUEKqAh5Hb29nbGUuUHJvdG9idWYuV2VsbEtub3duVHlwZXNiBnByb3RvMw", [file_google_protobuf_any, file_google_protobuf_source_context]);
/**
* Describes the message google.protobuf.Type.
* Use `create(TypeSchema)` to create a new message.
*/
export const TypeSchema = /*@__PURE__*/ messageDesc(file_google_protobuf_type, 0);
/**
* Describes the message google.protobuf.Field.
* Use `create(FieldSchema)` to create a new message.
*/
export const FieldSchema = /*@__PURE__*/ messageDesc(file_google_protobuf_type, 1);
/**
* Basic field types.
*
* @generated from enum google.protobuf.Field.Kind
*/
export var Field_Kind;
(function (Field_Kind) {
/**
* Field type unknown.
*
* @generated from enum value: TYPE_UNKNOWN = 0;
*/
Field_Kind[Field_Kind["TYPE_UNKNOWN"] = 0] = "TYPE_UNKNOWN";
/**
* Field type double.
*
* @generated from enum value: TYPE_DOUBLE = 1;
*/
Field_Kind[Field_Kind["TYPE_DOUBLE"] = 1] = "TYPE_DOUBLE";
/**
* Field type float.
*
* @generated from enum value: TYPE_FLOAT = 2;
*/
Field_Kind[Field_Kind["TYPE_FLOAT"] = 2] = "TYPE_FLOAT";
/**
* Field type int64.
*
* @generated from enum value: TYPE_INT64 = 3;
*/
Field_Kind[Field_Kind["TYPE_INT64"] = 3] = "TYPE_INT64";
/**
* Field type uint64.
*
* @generated from enum value: TYPE_UINT64 = 4;
*/
Field_Kind[Field_Kind["TYPE_UINT64"] = 4] = "TYPE_UINT64";
/**
* Field type int32.
*
* @generated from enum value: TYPE_INT32 = 5;
*/
Field_Kind[Field_Kind["TYPE_INT32"] = 5] = "TYPE_INT32";
/**
* Field type fixed64.
*
* @generated from enum value: TYPE_FIXED64 = 6;
*/
Field_Kind[Field_Kind["TYPE_FIXED64"] = 6] = "TYPE_FIXED64";
/**
* Field type fixed32.
*
* @generated from enum value: TYPE_FIXED32 = 7;
*/
Field_Kind[Field_Kind["TYPE_FIXED32"] = 7] = "TYPE_FIXED32";
/**
* Field type bool.
*
* @generated from enum value: TYPE_BOOL = 8;
*/
Field_Kind[Field_Kind["TYPE_BOOL"] = 8] = "TYPE_BOOL";
/**
* Field type string.
*
* @generated from enum value: TYPE_STRING = 9;
*/
Field_Kind[Field_Kind["TYPE_STRING"] = 9] = "TYPE_STRING";
/**
* Field type group. Proto2 syntax only, and deprecated.
*
* @generated from enum value: TYPE_GROUP = 10;
*/
Field_Kind[Field_Kind["TYPE_GROUP"] = 10] = "TYPE_GROUP";
/**
* Field type message.
*
* @generated from enum value: TYPE_MESSAGE = 11;
*/
Field_Kind[Field_Kind["TYPE_MESSAGE"] = 11] = "TYPE_MESSAGE";
/**
* Field type bytes.
*
* @generated from enum value: TYPE_BYTES = 12;
*/
Field_Kind[Field_Kind["TYPE_BYTES"] = 12] = "TYPE_BYTES";
/**
* Field type uint32.
*
* @generated from enum value: TYPE_UINT32 = 13;
*/
Field_Kind[Field_Kind["TYPE_UINT32"] = 13] = "TYPE_UINT32";
/**
* Field type enum.
*
* @generated from enum value: TYPE_ENUM = 14;
*/
Field_Kind[Field_Kind["TYPE_ENUM"] = 14] = "TYPE_ENUM";
/**
* Field type sfixed32.
*
* @generated from enum value: TYPE_SFIXED32 = 15;
*/
Field_Kind[Field_Kind["TYPE_SFIXED32"] = 15] = "TYPE_SFIXED32";
/**
* Field type sfixed64.
*
* @generated from enum value: TYPE_SFIXED64 = 16;
*/
Field_Kind[Field_Kind["TYPE_SFIXED64"] = 16] = "TYPE_SFIXED64";
/**
* Field type sint32.
*
* @generated from enum value: TYPE_SINT32 = 17;
*/
Field_Kind[Field_Kind["TYPE_SINT32"] = 17] = "TYPE_SINT32";
/**
* Field type sint64.
*
* @generated from enum value: TYPE_SINT64 = 18;
*/
Field_Kind[Field_Kind["TYPE_SINT64"] = 18] = "TYPE_SINT64";
})(Field_Kind || (Field_Kind = {}));
/**
* Describes the enum google.protobuf.Field.Kind.
*/
export const Field_KindSchema = /*@__PURE__*/ enumDesc(file_google_protobuf_type, 1, 0);
/**
* Whether a field is optional, required, or repeated.
*
* @generated from enum google.protobuf.Field.Cardinality
*/
export var Field_Cardinality;
(function (Field_Cardinality) {
/**
* For fields with unknown cardinality.
*
* @generated from enum value: CARDINALITY_UNKNOWN = 0;
*/
Field_Cardinality[Field_Cardinality["UNKNOWN"] = 0] = "UNKNOWN";
/**
* For optional fields.
*
* @generated from enum value: CARDINALITY_OPTIONAL = 1;
*/
Field_Cardinality[Field_Cardinality["OPTIONAL"] = 1] = "OPTIONAL";
/**
* For required fields. Proto2 syntax only.
*
* @generated from enum value: CARDINALITY_REQUIRED = 2;
*/
Field_Cardinality[Field_Cardinality["REQUIRED"] = 2] = "REQUIRED";
/**
* For repeated fields.
*
* @generated from enum value: CARDINALITY_REPEATED = 3;
*/
Field_Cardinality[Field_Cardinality["REPEATED"] = 3] = "REPEATED";
})(Field_Cardinality || (Field_Cardinality = {}));
/**
* Describes the enum google.protobuf.Field.Cardinality.
*/
export const Field_CardinalitySchema = /*@__PURE__*/ enumDesc(file_google_protobuf_type, 1, 1);
/**
* Describes the message google.protobuf.Enum.
* Use `create(EnumSchema)` to create a new message.
*/
export const EnumSchema = /*@__PURE__*/ messageDesc(file_google_protobuf_type, 2);
/**
* Describes the message google.protobuf.EnumValue.
* Use `create(EnumValueSchema)` to create a new message.
*/
export const EnumValueSchema = /*@__PURE__*/ messageDesc(file_google_protobuf_type, 3);
/**
* Describes the message google.protobuf.Option.
* Use `create(OptionSchema)` to create a new message.
*/
export const OptionSchema = /*@__PURE__*/ messageDesc(file_google_protobuf_type, 4);
/**
* The syntax in which a protocol buffer element is defined.
*
* @generated from enum google.protobuf.Syntax
*/
export var Syntax;
(function (Syntax) {
/**
* Syntax `proto2`.
*
* @generated from enum value: SYNTAX_PROTO2 = 0;
*/
Syntax[Syntax["PROTO2"] = 0] = "PROTO2";
/**
* Syntax `proto3`.
*
* @generated from enum value: SYNTAX_PROTO3 = 1;
*/
Syntax[Syntax["PROTO3"] = 1] = "PROTO3";
/**
* Syntax `editions`.
*
* @generated from enum value: SYNTAX_EDITIONS = 2;
*/
Syntax[Syntax["EDITIONS"] = 2] = "EDITIONS";
})(Syntax || (Syntax = {}));
/**
* Describes the enum google.protobuf.Syntax.
*/
export const SyntaxSchema = /*@__PURE__*/ enumDesc(file_google_protobuf_type, 0);

View File

@@ -0,0 +1,330 @@
import type { GenFile, GenMessage } from "../../../../codegenv2/types.js";
import type { Message } from "../../../../types.js";
/**
* Describes the file google/protobuf/wrappers.proto.
*/
export declare const file_google_protobuf_wrappers: GenFile;
/**
* Wrapper message for `double`.
*
* The JSON representation for `DoubleValue` is JSON number.
*
* Not recommended for use in new APIs, but still useful for legacy APIs and
* has no plan to be removed.
*
* @generated from message google.protobuf.DoubleValue
*/
export type DoubleValue = Message<"google.protobuf.DoubleValue"> & {
/**
* The double value.
*
* @generated from field: double value = 1;
*/
value: number;
};
/**
* Wrapper message for `double`.
*
* The JSON representation for `DoubleValue` is JSON number.
*
* Not recommended for use in new APIs, but still useful for legacy APIs and
* has no plan to be removed.
*
* @generated from message google.protobuf.DoubleValue
*/
export type DoubleValueJson = number | "NaN" | "Infinity" | "-Infinity";
/**
* Describes the message google.protobuf.DoubleValue.
* Use `create(DoubleValueSchema)` to create a new message.
*/
export declare const DoubleValueSchema: GenMessage<DoubleValue, {
jsonType: DoubleValueJson;
}>;
/**
* Wrapper message for `float`.
*
* The JSON representation for `FloatValue` is JSON number.
*
* Not recommended for use in new APIs, but still useful for legacy APIs and
* has no plan to be removed.
*
* @generated from message google.protobuf.FloatValue
*/
export type FloatValue = Message<"google.protobuf.FloatValue"> & {
/**
* The float value.
*
* @generated from field: float value = 1;
*/
value: number;
};
/**
* Wrapper message for `float`.
*
* The JSON representation for `FloatValue` is JSON number.
*
* Not recommended for use in new APIs, but still useful for legacy APIs and
* has no plan to be removed.
*
* @generated from message google.protobuf.FloatValue
*/
export type FloatValueJson = number | "NaN" | "Infinity" | "-Infinity";
/**
* Describes the message google.protobuf.FloatValue.
* Use `create(FloatValueSchema)` to create a new message.
*/
export declare const FloatValueSchema: GenMessage<FloatValue, {
jsonType: FloatValueJson;
}>;
/**
* Wrapper message for `int64`.
*
* The JSON representation for `Int64Value` is JSON string.
*
* Not recommended for use in new APIs, but still useful for legacy APIs and
* has no plan to be removed.
*
* @generated from message google.protobuf.Int64Value
*/
export type Int64Value = Message<"google.protobuf.Int64Value"> & {
/**
* The int64 value.
*
* @generated from field: int64 value = 1;
*/
value: bigint;
};
/**
* Wrapper message for `int64`.
*
* The JSON representation for `Int64Value` is JSON string.
*
* Not recommended for use in new APIs, but still useful for legacy APIs and
* has no plan to be removed.
*
* @generated from message google.protobuf.Int64Value
*/
export type Int64ValueJson = string;
/**
* Describes the message google.protobuf.Int64Value.
* Use `create(Int64ValueSchema)` to create a new message.
*/
export declare const Int64ValueSchema: GenMessage<Int64Value, {
jsonType: Int64ValueJson;
}>;
/**
* Wrapper message for `uint64`.
*
* The JSON representation for `UInt64Value` is JSON string.
*
* Not recommended for use in new APIs, but still useful for legacy APIs and
* has no plan to be removed.
*
* @generated from message google.protobuf.UInt64Value
*/
export type UInt64Value = Message<"google.protobuf.UInt64Value"> & {
/**
* The uint64 value.
*
* @generated from field: uint64 value = 1;
*/
value: bigint;
};
/**
* Wrapper message for `uint64`.
*
* The JSON representation for `UInt64Value` is JSON string.
*
* Not recommended for use in new APIs, but still useful for legacy APIs and
* has no plan to be removed.
*
* @generated from message google.protobuf.UInt64Value
*/
export type UInt64ValueJson = string;
/**
* Describes the message google.protobuf.UInt64Value.
* Use `create(UInt64ValueSchema)` to create a new message.
*/
export declare const UInt64ValueSchema: GenMessage<UInt64Value, {
jsonType: UInt64ValueJson;
}>;
/**
* Wrapper message for `int32`.
*
* The JSON representation for `Int32Value` is JSON number.
*
* Not recommended for use in new APIs, but still useful for legacy APIs and
* has no plan to be removed.
*
* @generated from message google.protobuf.Int32Value
*/
export type Int32Value = Message<"google.protobuf.Int32Value"> & {
/**
* The int32 value.
*
* @generated from field: int32 value = 1;
*/
value: number;
};
/**
* Wrapper message for `int32`.
*
* The JSON representation for `Int32Value` is JSON number.
*
* Not recommended for use in new APIs, but still useful for legacy APIs and
* has no plan to be removed.
*
* @generated from message google.protobuf.Int32Value
*/
export type Int32ValueJson = number;
/**
* Describes the message google.protobuf.Int32Value.
* Use `create(Int32ValueSchema)` to create a new message.
*/
export declare const Int32ValueSchema: GenMessage<Int32Value, {
jsonType: Int32ValueJson;
}>;
/**
* Wrapper message for `uint32`.
*
* The JSON representation for `UInt32Value` is JSON number.
*
* Not recommended for use in new APIs, but still useful for legacy APIs and
* has no plan to be removed.
*
* @generated from message google.protobuf.UInt32Value
*/
export type UInt32Value = Message<"google.protobuf.UInt32Value"> & {
/**
* The uint32 value.
*
* @generated from field: uint32 value = 1;
*/
value: number;
};
/**
* Wrapper message for `uint32`.
*
* The JSON representation for `UInt32Value` is JSON number.
*
* Not recommended for use in new APIs, but still useful for legacy APIs and
* has no plan to be removed.
*
* @generated from message google.protobuf.UInt32Value
*/
export type UInt32ValueJson = number;
/**
* Describes the message google.protobuf.UInt32Value.
* Use `create(UInt32ValueSchema)` to create a new message.
*/
export declare const UInt32ValueSchema: GenMessage<UInt32Value, {
jsonType: UInt32ValueJson;
}>;
/**
* Wrapper message for `bool`.
*
* The JSON representation for `BoolValue` is JSON `true` and `false`.
*
* Not recommended for use in new APIs, but still useful for legacy APIs and
* has no plan to be removed.
*
* @generated from message google.protobuf.BoolValue
*/
export type BoolValue = Message<"google.protobuf.BoolValue"> & {
/**
* The bool value.
*
* @generated from field: bool value = 1;
*/
value: boolean;
};
/**
* Wrapper message for `bool`.
*
* The JSON representation for `BoolValue` is JSON `true` and `false`.
*
* Not recommended for use in new APIs, but still useful for legacy APIs and
* has no plan to be removed.
*
* @generated from message google.protobuf.BoolValue
*/
export type BoolValueJson = boolean;
/**
* Describes the message google.protobuf.BoolValue.
* Use `create(BoolValueSchema)` to create a new message.
*/
export declare const BoolValueSchema: GenMessage<BoolValue, {
jsonType: BoolValueJson;
}>;
/**
* Wrapper message for `string`.
*
* The JSON representation for `StringValue` is JSON string.
*
* Not recommended for use in new APIs, but still useful for legacy APIs and
* has no plan to be removed.
*
* @generated from message google.protobuf.StringValue
*/
export type StringValue = Message<"google.protobuf.StringValue"> & {
/**
* The string value.
*
* @generated from field: string value = 1;
*/
value: string;
};
/**
* Wrapper message for `string`.
*
* The JSON representation for `StringValue` is JSON string.
*
* Not recommended for use in new APIs, but still useful for legacy APIs and
* has no plan to be removed.
*
* @generated from message google.protobuf.StringValue
*/
export type StringValueJson = string;
/**
* Describes the message google.protobuf.StringValue.
* Use `create(StringValueSchema)` to create a new message.
*/
export declare const StringValueSchema: GenMessage<StringValue, {
jsonType: StringValueJson;
}>;
/**
* Wrapper message for `bytes`.
*
* The JSON representation for `BytesValue` is JSON string.
*
* Not recommended for use in new APIs, but still useful for legacy APIs and
* has no plan to be removed.
*
* @generated from message google.protobuf.BytesValue
*/
export type BytesValue = Message<"google.protobuf.BytesValue"> & {
/**
* The bytes value.
*
* @generated from field: bytes value = 1;
*/
value: Uint8Array;
};
/**
* Wrapper message for `bytes`.
*
* The JSON representation for `BytesValue` is JSON string.
*
* Not recommended for use in new APIs, but still useful for legacy APIs and
* has no plan to be removed.
*
* @generated from message google.protobuf.BytesValue
*/
export type BytesValueJson = string;
/**
* Describes the message google.protobuf.BytesValue.
* Use `create(BytesValueSchema)` to create a new message.
*/
export declare const BytesValueSchema: GenMessage<BytesValue, {
jsonType: BytesValueJson;
}>;

View File

@@ -0,0 +1,64 @@
// Copyright 2021-2025 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.
import { fileDesc } from "../../../../codegenv2/file.js";
import { messageDesc } from "../../../../codegenv2/message.js";
/**
* Describes the file google/protobuf/wrappers.proto.
*/
export const file_google_protobuf_wrappers = /*@__PURE__*/ fileDesc("Ch5nb29nbGUvcHJvdG9idWYvd3JhcHBlcnMucHJvdG8SD2dvb2dsZS5wcm90b2J1ZiIcCgtEb3VibGVWYWx1ZRINCgV2YWx1ZRgBIAEoASIbCgpGbG9hdFZhbHVlEg0KBXZhbHVlGAEgASgCIhsKCkludDY0VmFsdWUSDQoFdmFsdWUYASABKAMiHAoLVUludDY0VmFsdWUSDQoFdmFsdWUYASABKAQiGwoKSW50MzJWYWx1ZRINCgV2YWx1ZRgBIAEoBSIcCgtVSW50MzJWYWx1ZRINCgV2YWx1ZRgBIAEoDSIaCglCb29sVmFsdWUSDQoFdmFsdWUYASABKAgiHAoLU3RyaW5nVmFsdWUSDQoFdmFsdWUYASABKAkiGwoKQnl0ZXNWYWx1ZRINCgV2YWx1ZRgBIAEoDEKDAQoTY29tLmdvb2dsZS5wcm90b2J1ZkINV3JhcHBlcnNQcm90b1ABWjFnb29nbGUuZ29sYW5nLm9yZy9wcm90b2J1Zi90eXBlcy9rbm93bi93cmFwcGVyc3Bi+AEBogIDR1BCqgIeR29vZ2xlLlByb3RvYnVmLldlbGxLbm93blR5cGVzYgZwcm90bzM");
/**
* Describes the message google.protobuf.DoubleValue.
* Use `create(DoubleValueSchema)` to create a new message.
*/
export const DoubleValueSchema = /*@__PURE__*/ messageDesc(file_google_protobuf_wrappers, 0);
/**
* Describes the message google.protobuf.FloatValue.
* Use `create(FloatValueSchema)` to create a new message.
*/
export const FloatValueSchema = /*@__PURE__*/ messageDesc(file_google_protobuf_wrappers, 1);
/**
* Describes the message google.protobuf.Int64Value.
* Use `create(Int64ValueSchema)` to create a new message.
*/
export const Int64ValueSchema = /*@__PURE__*/ messageDesc(file_google_protobuf_wrappers, 2);
/**
* Describes the message google.protobuf.UInt64Value.
* Use `create(UInt64ValueSchema)` to create a new message.
*/
export const UInt64ValueSchema = /*@__PURE__*/ messageDesc(file_google_protobuf_wrappers, 3);
/**
* Describes the message google.protobuf.Int32Value.
* Use `create(Int32ValueSchema)` to create a new message.
*/
export const Int32ValueSchema = /*@__PURE__*/ messageDesc(file_google_protobuf_wrappers, 4);
/**
* Describes the message google.protobuf.UInt32Value.
* Use `create(UInt32ValueSchema)` to create a new message.
*/
export const UInt32ValueSchema = /*@__PURE__*/ messageDesc(file_google_protobuf_wrappers, 5);
/**
* Describes the message google.protobuf.BoolValue.
* Use `create(BoolValueSchema)` to create a new message.
*/
export const BoolValueSchema = /*@__PURE__*/ messageDesc(file_google_protobuf_wrappers, 6);
/**
* Describes the message google.protobuf.StringValue.
* Use `create(StringValueSchema)` to create a new message.
*/
export const StringValueSchema = /*@__PURE__*/ messageDesc(file_google_protobuf_wrappers, 7);
/**
* Describes the message google.protobuf.BytesValue.
* Use `create(BytesValueSchema)` to create a new message.
*/
export const BytesValueSchema = /*@__PURE__*/ messageDesc(file_google_protobuf_wrappers, 8);

View File

@@ -0,0 +1,18 @@
export * from "./timestamp.js";
export * from "./any.js";
export * from "./wrappers.js";
export * from "./gen/google/protobuf/any_pb.js";
export * from "./gen/google/protobuf/api_pb.js";
export * from "./gen/google/protobuf/cpp_features_pb.js";
export * from "./gen/google/protobuf/descriptor_pb.js";
export * from "./gen/google/protobuf/duration_pb.js";
export * from "./gen/google/protobuf/empty_pb.js";
export * from "./gen/google/protobuf/field_mask_pb.js";
export * from "./gen/google/protobuf/go_features_pb.js";
export * from "./gen/google/protobuf/java_features_pb.js";
export * from "./gen/google/protobuf/source_context_pb.js";
export * from "./gen/google/protobuf/struct_pb.js";
export * from "./gen/google/protobuf/timestamp_pb.js";
export * from "./gen/google/protobuf/type_pb.js";
export * from "./gen/google/protobuf/wrappers_pb.js";
export * from "./gen/google/protobuf/compiler/plugin_pb.js";

31
node_modules/@bufbuild/protobuf/dist/esm/wkt/index.js generated vendored Normal file
View File

@@ -0,0 +1,31 @@
// Copyright 2021-2025 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.
export * from "./timestamp.js";
export * from "./any.js";
export * from "./wrappers.js";
export * from "./gen/google/protobuf/any_pb.js";
export * from "./gen/google/protobuf/api_pb.js";
export * from "./gen/google/protobuf/cpp_features_pb.js";
export * from "./gen/google/protobuf/descriptor_pb.js";
export * from "./gen/google/protobuf/duration_pb.js";
export * from "./gen/google/protobuf/empty_pb.js";
export * from "./gen/google/protobuf/field_mask_pb.js";
export * from "./gen/google/protobuf/go_features_pb.js";
export * from "./gen/google/protobuf/java_features_pb.js";
export * from "./gen/google/protobuf/source_context_pb.js";
export * from "./gen/google/protobuf/struct_pb.js";
export * from "./gen/google/protobuf/timestamp_pb.js";
export * from "./gen/google/protobuf/type_pb.js";
export * from "./gen/google/protobuf/wrappers_pb.js";
export * from "./gen/google/protobuf/compiler/plugin_pb.js";

View File

@@ -0,0 +1,21 @@
import type { Timestamp } from "./gen/google/protobuf/timestamp_pb.js";
/**
* Create a google.protobuf.Timestamp for the current time.
*/
export declare function timestampNow(): Timestamp;
/**
* Create a google.protobuf.Timestamp message from an ECMAScript Date.
*/
export declare function timestampFromDate(date: Date): Timestamp;
/**
* Convert a google.protobuf.Timestamp message to an ECMAScript Date.
*/
export declare function timestampDate(timestamp: Timestamp): Date;
/**
* Create a google.protobuf.Timestamp message from a Unix timestamp in milliseconds.
*/
export declare function timestampFromMs(timestampMs: number): Timestamp;
/**
* Convert a google.protobuf.Timestamp to a Unix timestamp in milliseconds.
*/
export declare function timestampMs(timestamp: Timestamp): number;

View File

@@ -0,0 +1,50 @@
// Copyright 2021-2025 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.
import { TimestampSchema } from "./gen/google/protobuf/timestamp_pb.js";
import { create } from "../create.js";
import { protoInt64 } from "../proto-int64.js";
/**
* Create a google.protobuf.Timestamp for the current time.
*/
export function timestampNow() {
return timestampFromDate(new Date());
}
/**
* Create a google.protobuf.Timestamp message from an ECMAScript Date.
*/
export function timestampFromDate(date) {
return timestampFromMs(date.getTime());
}
/**
* Convert a google.protobuf.Timestamp message to an ECMAScript Date.
*/
export function timestampDate(timestamp) {
return new Date(timestampMs(timestamp));
}
/**
* Create a google.protobuf.Timestamp message from a Unix timestamp in milliseconds.
*/
export function timestampFromMs(timestampMs) {
const seconds = Math.floor(timestampMs / 1000);
return create(TimestampSchema, {
seconds: protoInt64.parse(seconds),
nanos: (timestampMs - seconds * 1000) * 1000000,
});
}
/**
* Convert a google.protobuf.Timestamp to a Unix timestamp in milliseconds.
*/
export function timestampMs(timestamp) {
return (Number(timestamp.seconds) * 1000 + Math.round(timestamp.nanos / 1000000));
}

View File

@@ -0,0 +1,15 @@
import type { Message } from "../types.js";
import type { BoolValue, BytesValue, DoubleValue, FloatValue, Int32Value, Int64Value, StringValue, UInt32Value, UInt64Value } from "./gen/google/protobuf/wrappers_pb.js";
import type { DescField, DescMessage } from "../descriptors.js";
export declare function isWrapper(arg: Message): arg is DoubleValue | FloatValue | Int64Value | UInt64Value | Int32Value | UInt32Value | BoolValue | StringValue | BytesValue;
export type WktWrapperDesc = DescMessage & {
fields: [
DescField & {
fieldKind: "scalar";
number: 1;
name: "value";
oneof: undefined;
}
];
};
export declare function isWrapperDesc(messageDesc: DescMessage): messageDesc is WktWrapperDesc;

View File

@@ -0,0 +1,38 @@
// Copyright 2021-2025 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.
export function isWrapper(arg) {
return isWrapperTypeName(arg.$typeName);
}
export function isWrapperDesc(messageDesc) {
const f = messageDesc.fields[0];
return (isWrapperTypeName(messageDesc.typeName) &&
f !== undefined &&
f.fieldKind == "scalar" &&
f.name == "value" &&
f.number == 1);
}
function isWrapperTypeName(name) {
return (name.startsWith("google.protobuf.") &&
[
"DoubleValue",
"FloatValue",
"Int64Value",
"UInt64Value",
"Int32Value",
"UInt32Value",
"BoolValue",
"StringValue",
"BytesValue",
].includes(name.substring(16)));
}