@aptre/protobuf-es-lite 0.5.0 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -1
- package/dist/protoplugin/ecmascript/generated-file.d.ts +0 -4
- package/dist/protoplugin/ecmascript/generated-file.js +0 -3
- package/dist/protoplugin/ecmascript/import-path.js +1 -1
- package/example/example.pb.ts +2 -6
- package/example/tsconfig.json +3 -0
- package/package.json +58 -13
- package/dist/google/index.d.ts +0 -9
- package/dist/google/index.js +0 -9
- package/dist/google/protobuf/any.pb.d.ts +0 -148
- package/dist/google/protobuf/any.pb.js +0 -120
- package/dist/google/protobuf/api.pb.d.ts +0 -232
- package/dist/google/protobuf/api.pb.js +0 -88
- package/dist/google/protobuf/duration.pb.d.ts +0 -93
- package/dist/google/protobuf/duration.pb.js +0 -89
- package/dist/google/protobuf/empty.pb.d.ts +0 -17
- package/dist/google/protobuf/empty.pb.js +0 -37
- package/dist/google/protobuf/source_context.pb.d.ts +0 -18
- package/dist/google/protobuf/source_context.pb.js +0 -39
- package/dist/google/protobuf/struct.pb.d.ts +0 -141
- package/dist/google/protobuf/struct.pb.js +0 -228
- package/dist/google/protobuf/timestamp.pb.d.ts +0 -125
- package/dist/google/protobuf/timestamp.pb.js +0 -137
- package/dist/google/protobuf/type.pb.d.ts +0 -401
- package/dist/google/protobuf/type.pb.js +0 -347
- package/dist/google/protobuf/wrappers.pb.d.ts +0 -201
- package/dist/google/protobuf/wrappers.pb.js +0 -365
|
@@ -1,232 +0,0 @@
|
|
|
1
|
-
import type { Syntax } from "./type.pb.js";
|
|
2
|
-
import { Option } from "./type.pb.js";
|
|
3
|
-
import type { MessageType } from "../../index.js";
|
|
4
|
-
import { SourceContext } from "./source_context.pb.js";
|
|
5
|
-
export declare const protobufPackage = "google.protobuf";
|
|
6
|
-
/**
|
|
7
|
-
* Method represents a method of an API interface.
|
|
8
|
-
*
|
|
9
|
-
* @generated from message google.protobuf.Method
|
|
10
|
-
*/
|
|
11
|
-
export interface Method {
|
|
12
|
-
/**
|
|
13
|
-
* The simple name of this method.
|
|
14
|
-
*
|
|
15
|
-
* @generated from field: string name = 1;
|
|
16
|
-
*/
|
|
17
|
-
name?: string;
|
|
18
|
-
/**
|
|
19
|
-
* A URL of the input message type.
|
|
20
|
-
*
|
|
21
|
-
* @generated from field: string request_type_url = 2;
|
|
22
|
-
*/
|
|
23
|
-
requestTypeUrl?: string;
|
|
24
|
-
/**
|
|
25
|
-
* If true, the request is streamed.
|
|
26
|
-
*
|
|
27
|
-
* @generated from field: bool request_streaming = 3;
|
|
28
|
-
*/
|
|
29
|
-
requestStreaming?: boolean;
|
|
30
|
-
/**
|
|
31
|
-
* The URL of the output message type.
|
|
32
|
-
*
|
|
33
|
-
* @generated from field: string response_type_url = 4;
|
|
34
|
-
*/
|
|
35
|
-
responseTypeUrl?: string;
|
|
36
|
-
/**
|
|
37
|
-
* If true, the response is streamed.
|
|
38
|
-
*
|
|
39
|
-
* @generated from field: bool response_streaming = 5;
|
|
40
|
-
*/
|
|
41
|
-
responseStreaming?: boolean;
|
|
42
|
-
/**
|
|
43
|
-
* Any metadata attached to the method.
|
|
44
|
-
*
|
|
45
|
-
* @generated from field: repeated google.protobuf.Option options = 6;
|
|
46
|
-
*/
|
|
47
|
-
options?: Option[];
|
|
48
|
-
/**
|
|
49
|
-
* The source syntax of this method.
|
|
50
|
-
*
|
|
51
|
-
* @generated from field: google.protobuf.Syntax syntax = 7;
|
|
52
|
-
*/
|
|
53
|
-
syntax?: Syntax;
|
|
54
|
-
}
|
|
55
|
-
export declare const Method: MessageType<Method>;
|
|
56
|
-
/**
|
|
57
|
-
* Declares an API Interface to be included in this interface. The including
|
|
58
|
-
* interface must redeclare all the methods from the included interface, but
|
|
59
|
-
* documentation and options are inherited as follows:
|
|
60
|
-
*
|
|
61
|
-
* - If after comment and whitespace stripping, the documentation
|
|
62
|
-
* string of the redeclared method is empty, it will be inherited
|
|
63
|
-
* from the original method.
|
|
64
|
-
*
|
|
65
|
-
* - Each annotation belonging to the service config (http,
|
|
66
|
-
* visibility) which is not set in the redeclared method will be
|
|
67
|
-
* inherited.
|
|
68
|
-
*
|
|
69
|
-
* - If an http annotation is inherited, the path pattern will be
|
|
70
|
-
* modified as follows. Any version prefix will be replaced by the
|
|
71
|
-
* version of the including interface plus the [root][] path if
|
|
72
|
-
* specified.
|
|
73
|
-
*
|
|
74
|
-
* Example of a simple mixin:
|
|
75
|
-
*
|
|
76
|
-
* package google.acl.v1;
|
|
77
|
-
* service AccessControl {
|
|
78
|
-
* // Get the underlying ACL object.
|
|
79
|
-
* rpc GetAcl(GetAclRequest) returns (Acl) {
|
|
80
|
-
* option (google.api.http).get = "/v1/{resource=**}:getAcl";
|
|
81
|
-
* }
|
|
82
|
-
* }
|
|
83
|
-
*
|
|
84
|
-
* package google.storage.v2;
|
|
85
|
-
* service Storage {
|
|
86
|
-
* rpc GetAcl(GetAclRequest) returns (Acl);
|
|
87
|
-
*
|
|
88
|
-
* // Get a data record.
|
|
89
|
-
* rpc GetData(GetDataRequest) returns (Data) {
|
|
90
|
-
* option (google.api.http).get = "/v2/{resource=**}";
|
|
91
|
-
* }
|
|
92
|
-
* }
|
|
93
|
-
*
|
|
94
|
-
* Example of a mixin configuration:
|
|
95
|
-
*
|
|
96
|
-
* apis:
|
|
97
|
-
* - name: google.storage.v2.Storage
|
|
98
|
-
* mixins:
|
|
99
|
-
* - name: google.acl.v1.AccessControl
|
|
100
|
-
*
|
|
101
|
-
* The mixin construct implies that all methods in `AccessControl` are
|
|
102
|
-
* also declared with same name and request/response types in
|
|
103
|
-
* `Storage`. A documentation generator or annotation processor will
|
|
104
|
-
* see the effective `Storage.GetAcl` method after inherting
|
|
105
|
-
* documentation and annotations as follows:
|
|
106
|
-
*
|
|
107
|
-
* service Storage {
|
|
108
|
-
* // Get the underlying ACL object.
|
|
109
|
-
* rpc GetAcl(GetAclRequest) returns (Acl) {
|
|
110
|
-
* option (google.api.http).get = "/v2/{resource=**}:getAcl";
|
|
111
|
-
* }
|
|
112
|
-
* ...
|
|
113
|
-
* }
|
|
114
|
-
*
|
|
115
|
-
* Note how the version in the path pattern changed from `v1` to `v2`.
|
|
116
|
-
*
|
|
117
|
-
* If the `root` field in the mixin is specified, it should be a
|
|
118
|
-
* relative path under which inherited HTTP paths are placed. Example:
|
|
119
|
-
*
|
|
120
|
-
* apis:
|
|
121
|
-
* - name: google.storage.v2.Storage
|
|
122
|
-
* mixins:
|
|
123
|
-
* - name: google.acl.v1.AccessControl
|
|
124
|
-
* root: acls
|
|
125
|
-
*
|
|
126
|
-
* This implies the following inherited HTTP annotation:
|
|
127
|
-
*
|
|
128
|
-
* service Storage {
|
|
129
|
-
* // Get the underlying ACL object.
|
|
130
|
-
* rpc GetAcl(GetAclRequest) returns (Acl) {
|
|
131
|
-
* option (google.api.http).get = "/v2/acls/{resource=**}:getAcl";
|
|
132
|
-
* }
|
|
133
|
-
* ...
|
|
134
|
-
* }
|
|
135
|
-
*
|
|
136
|
-
* @generated from message google.protobuf.Mixin
|
|
137
|
-
*/
|
|
138
|
-
export interface Mixin {
|
|
139
|
-
/**
|
|
140
|
-
* The fully qualified name of the interface which is included.
|
|
141
|
-
*
|
|
142
|
-
* @generated from field: string name = 1;
|
|
143
|
-
*/
|
|
144
|
-
name?: string;
|
|
145
|
-
/**
|
|
146
|
-
* If non-empty specifies a path under which inherited HTTP paths
|
|
147
|
-
* are rooted.
|
|
148
|
-
*
|
|
149
|
-
* @generated from field: string root = 2;
|
|
150
|
-
*/
|
|
151
|
-
root?: string;
|
|
152
|
-
}
|
|
153
|
-
export declare const Mixin: MessageType<Mixin>;
|
|
154
|
-
/**
|
|
155
|
-
* Api is a light-weight descriptor for an API Interface.
|
|
156
|
-
*
|
|
157
|
-
* Interfaces are also described as "protocol buffer services" in some contexts,
|
|
158
|
-
* such as by the "service" keyword in a .proto file, but they are different
|
|
159
|
-
* from API Services, which represent a concrete implementation of an interface
|
|
160
|
-
* as opposed to simply a description of methods and bindings. They are also
|
|
161
|
-
* sometimes simply referred to as "APIs" in other contexts, such as the name of
|
|
162
|
-
* this message itself. See https://cloud.google.com/apis/design/glossary for
|
|
163
|
-
* detailed terminology.
|
|
164
|
-
*
|
|
165
|
-
* @generated from message google.protobuf.Api
|
|
166
|
-
*/
|
|
167
|
-
export interface Api {
|
|
168
|
-
/**
|
|
169
|
-
* The fully qualified name of this interface, including package name
|
|
170
|
-
* followed by the interface's simple name.
|
|
171
|
-
*
|
|
172
|
-
* @generated from field: string name = 1;
|
|
173
|
-
*/
|
|
174
|
-
name?: string;
|
|
175
|
-
/**
|
|
176
|
-
* The methods of this interface, in unspecified order.
|
|
177
|
-
*
|
|
178
|
-
* @generated from field: repeated google.protobuf.Method methods = 2;
|
|
179
|
-
*/
|
|
180
|
-
methods?: Method[];
|
|
181
|
-
/**
|
|
182
|
-
* Any metadata attached to the interface.
|
|
183
|
-
*
|
|
184
|
-
* @generated from field: repeated google.protobuf.Option options = 3;
|
|
185
|
-
*/
|
|
186
|
-
options?: Option[];
|
|
187
|
-
/**
|
|
188
|
-
* A version string for this interface. If specified, must have the form
|
|
189
|
-
* `major-version.minor-version`, as in `1.10`. If the minor version is
|
|
190
|
-
* omitted, it defaults to zero. If the entire version field is empty, the
|
|
191
|
-
* major version is derived from the package name, as outlined below. If the
|
|
192
|
-
* field is not empty, the version in the package name will be verified to be
|
|
193
|
-
* consistent with what is provided here.
|
|
194
|
-
*
|
|
195
|
-
* The versioning schema uses [semantic
|
|
196
|
-
* versioning](http://semver.org) where the major version number
|
|
197
|
-
* indicates a breaking change and the minor version an additive,
|
|
198
|
-
* non-breaking change. Both version numbers are signals to users
|
|
199
|
-
* what to expect from different versions, and should be carefully
|
|
200
|
-
* chosen based on the product plan.
|
|
201
|
-
*
|
|
202
|
-
* The major version is also reflected in the package name of the
|
|
203
|
-
* interface, which must end in `v<major-version>`, as in
|
|
204
|
-
* `google.feature.v1`. For major versions 0 and 1, the suffix can
|
|
205
|
-
* be omitted. Zero major versions must only be used for
|
|
206
|
-
* experimental, non-GA interfaces.
|
|
207
|
-
*
|
|
208
|
-
*
|
|
209
|
-
* @generated from field: string version = 4;
|
|
210
|
-
*/
|
|
211
|
-
version?: string;
|
|
212
|
-
/**
|
|
213
|
-
* Source context for the protocol buffer service represented by this
|
|
214
|
-
* message.
|
|
215
|
-
*
|
|
216
|
-
* @generated from field: google.protobuf.SourceContext source_context = 5;
|
|
217
|
-
*/
|
|
218
|
-
sourceContext?: SourceContext;
|
|
219
|
-
/**
|
|
220
|
-
* Included interfaces. See [Mixin][].
|
|
221
|
-
*
|
|
222
|
-
* @generated from field: repeated google.protobuf.Mixin mixins = 6;
|
|
223
|
-
*/
|
|
224
|
-
mixins?: Mixin[];
|
|
225
|
-
/**
|
|
226
|
-
* The source syntax of the service.
|
|
227
|
-
*
|
|
228
|
-
* @generated from field: google.protobuf.Syntax syntax = 7;
|
|
229
|
-
*/
|
|
230
|
-
syntax?: Syntax;
|
|
231
|
-
}
|
|
232
|
-
export declare const Api: MessageType<Api>;
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
// Protocol Buffers - Google's data interchange format
|
|
2
|
-
// Copyright 2008 Google Inc. All rights reserved.
|
|
3
|
-
// https://developers.google.com/protocol-buffers/
|
|
4
|
-
//
|
|
5
|
-
// Redistribution and use in source and binary forms, with or without
|
|
6
|
-
// modification, are permitted provided that the following conditions are
|
|
7
|
-
// met:
|
|
8
|
-
//
|
|
9
|
-
// * Redistributions of source code must retain the above copyright
|
|
10
|
-
// notice, this list of conditions and the following disclaimer.
|
|
11
|
-
// * Redistributions in binary form must reproduce the above
|
|
12
|
-
// copyright notice, this list of conditions and the following disclaimer
|
|
13
|
-
// in the documentation and/or other materials provided with the
|
|
14
|
-
// distribution.
|
|
15
|
-
// * Neither the name of Google Inc. nor the names of its
|
|
16
|
-
// contributors may be used to endorse or promote products derived from
|
|
17
|
-
// this software without specific prior written permission.
|
|
18
|
-
//
|
|
19
|
-
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
20
|
-
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
21
|
-
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
22
|
-
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
23
|
-
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
24
|
-
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
25
|
-
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
26
|
-
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
27
|
-
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
28
|
-
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
29
|
-
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
30
|
-
import { Option, Syntax_Enum } from "./type.pb.js";
|
|
31
|
-
import { createMessageType, ScalarType } from "../../index.js";
|
|
32
|
-
import { SourceContext } from "./source_context.pb.js";
|
|
33
|
-
export const protobufPackage = "google.protobuf";
|
|
34
|
-
// Method contains the message type declaration for Method.
|
|
35
|
-
export const Method = createMessageType({
|
|
36
|
-
typeName: "google.protobuf.Method",
|
|
37
|
-
fields: [
|
|
38
|
-
{ no: 1, name: "name", kind: "scalar", T: ScalarType.STRING },
|
|
39
|
-
{ no: 2, name: "request_type_url", kind: "scalar", T: ScalarType.STRING },
|
|
40
|
-
{ no: 3, name: "request_streaming", kind: "scalar", T: ScalarType.BOOL },
|
|
41
|
-
{ no: 4, name: "response_type_url", kind: "scalar", T: ScalarType.STRING },
|
|
42
|
-
{ no: 5, name: "response_streaming", kind: "scalar", T: ScalarType.BOOL },
|
|
43
|
-
{
|
|
44
|
-
no: 6,
|
|
45
|
-
name: "options",
|
|
46
|
-
kind: "message",
|
|
47
|
-
T: () => Option,
|
|
48
|
-
repeated: true,
|
|
49
|
-
},
|
|
50
|
-
{ no: 7, name: "syntax", kind: "enum", T: Syntax_Enum },
|
|
51
|
-
],
|
|
52
|
-
packedByDefault: true,
|
|
53
|
-
});
|
|
54
|
-
// Mixin contains the message type declaration for Mixin.
|
|
55
|
-
export const Mixin = createMessageType({
|
|
56
|
-
typeName: "google.protobuf.Mixin",
|
|
57
|
-
fields: [
|
|
58
|
-
{ no: 1, name: "name", kind: "scalar", T: ScalarType.STRING },
|
|
59
|
-
{ no: 2, name: "root", kind: "scalar", T: ScalarType.STRING },
|
|
60
|
-
],
|
|
61
|
-
packedByDefault: true,
|
|
62
|
-
});
|
|
63
|
-
// Api contains the message type declaration for Api.
|
|
64
|
-
export const Api = createMessageType({
|
|
65
|
-
typeName: "google.protobuf.Api",
|
|
66
|
-
fields: [
|
|
67
|
-
{ no: 1, name: "name", kind: "scalar", T: ScalarType.STRING },
|
|
68
|
-
{
|
|
69
|
-
no: 2,
|
|
70
|
-
name: "methods",
|
|
71
|
-
kind: "message",
|
|
72
|
-
T: () => Method,
|
|
73
|
-
repeated: true,
|
|
74
|
-
},
|
|
75
|
-
{
|
|
76
|
-
no: 3,
|
|
77
|
-
name: "options",
|
|
78
|
-
kind: "message",
|
|
79
|
-
T: () => Option,
|
|
80
|
-
repeated: true,
|
|
81
|
-
},
|
|
82
|
-
{ no: 4, name: "version", kind: "scalar", T: ScalarType.STRING },
|
|
83
|
-
{ no: 5, name: "source_context", kind: "message", T: () => SourceContext },
|
|
84
|
-
{ no: 6, name: "mixins", kind: "message", T: () => Mixin, repeated: true },
|
|
85
|
-
{ no: 7, name: "syntax", kind: "enum", T: Syntax_Enum },
|
|
86
|
-
],
|
|
87
|
-
packedByDefault: true,
|
|
88
|
-
});
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
import type { JsonReadOptions, JsonValue, MessageType } from "../../index.js";
|
|
2
|
-
export declare const protobufPackage = "google.protobuf";
|
|
3
|
-
/**
|
|
4
|
-
* A Duration represents a signed, fixed-length span of time represented
|
|
5
|
-
* as a count of seconds and fractions of seconds at nanosecond
|
|
6
|
-
* resolution. It is independent of any calendar and concepts like "day"
|
|
7
|
-
* or "month". It is related to Timestamp in that the difference between
|
|
8
|
-
* two Timestamp values is a Duration and it can be added or subtracted
|
|
9
|
-
* from a Timestamp. Range is approximately +-10,000 years.
|
|
10
|
-
*
|
|
11
|
-
* # Examples
|
|
12
|
-
*
|
|
13
|
-
* Example 1: Compute Duration from two Timestamps in pseudo code.
|
|
14
|
-
*
|
|
15
|
-
* Timestamp start = ...;
|
|
16
|
-
* Timestamp end = ...;
|
|
17
|
-
* Duration duration = ...;
|
|
18
|
-
*
|
|
19
|
-
* duration.seconds = end.seconds - start.seconds;
|
|
20
|
-
* duration.nanos = end.nanos - start.nanos;
|
|
21
|
-
*
|
|
22
|
-
* if (duration.seconds < 0 && duration.nanos > 0) {
|
|
23
|
-
* duration.seconds += 1;
|
|
24
|
-
* duration.nanos -= 1000000000;
|
|
25
|
-
* } else if (duration.seconds > 0 && duration.nanos < 0) {
|
|
26
|
-
* duration.seconds -= 1;
|
|
27
|
-
* duration.nanos += 1000000000;
|
|
28
|
-
* }
|
|
29
|
-
*
|
|
30
|
-
* Example 2: Compute Timestamp from Timestamp + Duration in pseudo code.
|
|
31
|
-
*
|
|
32
|
-
* Timestamp start = ...;
|
|
33
|
-
* Duration duration = ...;
|
|
34
|
-
* Timestamp end = ...;
|
|
35
|
-
*
|
|
36
|
-
* end.seconds = start.seconds + duration.seconds;
|
|
37
|
-
* end.nanos = start.nanos + duration.nanos;
|
|
38
|
-
*
|
|
39
|
-
* if (end.nanos < 0) {
|
|
40
|
-
* end.seconds -= 1;
|
|
41
|
-
* end.nanos += 1000000000;
|
|
42
|
-
* } else if (end.nanos >= 1000000000) {
|
|
43
|
-
* end.seconds += 1;
|
|
44
|
-
* end.nanos -= 1000000000;
|
|
45
|
-
* }
|
|
46
|
-
*
|
|
47
|
-
* Example 3: Compute Duration from datetime.timedelta in Python.
|
|
48
|
-
*
|
|
49
|
-
* td = datetime.timedelta(days=3, minutes=10)
|
|
50
|
-
* duration = Duration()
|
|
51
|
-
* duration.FromTimedelta(td)
|
|
52
|
-
*
|
|
53
|
-
* # JSON Mapping
|
|
54
|
-
*
|
|
55
|
-
* In JSON format, the Duration type is encoded as a string rather than an
|
|
56
|
-
* object, where the string ends in the suffix "s" (indicating seconds) and
|
|
57
|
-
* is preceded by the number of seconds, with nanoseconds expressed as
|
|
58
|
-
* fractional seconds. For example, 3 seconds with 0 nanoseconds should be
|
|
59
|
-
* encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should
|
|
60
|
-
* be expressed in JSON format as "3.000000001s", and 3 seconds and 1
|
|
61
|
-
* microsecond should be expressed in JSON format as "3.000001s".
|
|
62
|
-
*
|
|
63
|
-
* protobuf-go-lite:disable-text
|
|
64
|
-
*
|
|
65
|
-
* @generated from message google.protobuf.Duration
|
|
66
|
-
*/
|
|
67
|
-
export interface Duration {
|
|
68
|
-
/**
|
|
69
|
-
* Signed seconds of the span of time. Must be from -315,576,000,000
|
|
70
|
-
* to +315,576,000,000 inclusive. Note: these bounds are computed from:
|
|
71
|
-
* 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
|
|
72
|
-
*
|
|
73
|
-
* @generated from field: int64 seconds = 1;
|
|
74
|
-
*/
|
|
75
|
-
seconds?: bigint;
|
|
76
|
-
/**
|
|
77
|
-
* Signed fractions of a second at nanosecond resolution of the span
|
|
78
|
-
* of time. Durations less than one second are represented with a 0
|
|
79
|
-
* `seconds` field and a positive or negative `nanos` field. For durations
|
|
80
|
-
* of one second or more, a non-zero value for the `nanos` field must be
|
|
81
|
-
* of the same sign as the `seconds` field. Must be from -999,999,999
|
|
82
|
-
* to +999,999,999 inclusive.
|
|
83
|
-
*
|
|
84
|
-
* @generated from field: int32 nanos = 2;
|
|
85
|
-
*/
|
|
86
|
-
nanos?: number;
|
|
87
|
-
}
|
|
88
|
-
declare const Duration_Wkt: {
|
|
89
|
-
fromJson(json: JsonValue | null | undefined, _options?: Partial<JsonReadOptions>): Duration;
|
|
90
|
-
toJson(msg: Duration): JsonValue;
|
|
91
|
-
};
|
|
92
|
-
export declare const Duration: MessageType<Duration> & typeof Duration_Wkt;
|
|
93
|
-
export {};
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
// Protocol Buffers - Google's data interchange format
|
|
2
|
-
// Copyright 2008 Google Inc. All rights reserved.
|
|
3
|
-
// https://developers.google.com/protocol-buffers/
|
|
4
|
-
//
|
|
5
|
-
// Redistribution and use in source and binary forms, with or without
|
|
6
|
-
// modification, are permitted provided that the following conditions are
|
|
7
|
-
// met:
|
|
8
|
-
//
|
|
9
|
-
// * Redistributions of source code must retain the above copyright
|
|
10
|
-
// notice, this list of conditions and the following disclaimer.
|
|
11
|
-
// * Redistributions in binary form must reproduce the above
|
|
12
|
-
// copyright notice, this list of conditions and the following disclaimer
|
|
13
|
-
// in the documentation and/or other materials provided with the
|
|
14
|
-
// distribution.
|
|
15
|
-
// * Neither the name of Google Inc. nor the names of its
|
|
16
|
-
// contributors may be used to endorse or promote products derived from
|
|
17
|
-
// this software without specific prior written permission.
|
|
18
|
-
//
|
|
19
|
-
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
20
|
-
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
21
|
-
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
22
|
-
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
23
|
-
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
24
|
-
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
25
|
-
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
26
|
-
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
27
|
-
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
28
|
-
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
29
|
-
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
30
|
-
import { createMessageType, jsonDebugValue, protoInt64, ScalarType, } from "../../index.js";
|
|
31
|
-
export const protobufPackage = "google.protobuf";
|
|
32
|
-
// Duration_Wkt contains the well-known-type overrides for Duration.
|
|
33
|
-
const Duration_Wkt = {
|
|
34
|
-
fromJson(json, _options) {
|
|
35
|
-
if (typeof json !== "string") {
|
|
36
|
-
throw new Error(`cannot decode google.protobuf.Duration from JSON: ${jsonDebugValue(json)}`);
|
|
37
|
-
}
|
|
38
|
-
const match = json.match(/^(-?[0-9]+)(?:\.([0-9]+))?s/);
|
|
39
|
-
if (match === null) {
|
|
40
|
-
throw new Error(`cannot decode google.protobuf.Duration from JSON: ${jsonDebugValue(json)}`);
|
|
41
|
-
}
|
|
42
|
-
const longSeconds = Number(match[1]);
|
|
43
|
-
if (longSeconds > 315576000000 || longSeconds < -315576000000) {
|
|
44
|
-
throw new Error(`cannot decode google.protobuf.Duration from JSON: ${jsonDebugValue(json)}`);
|
|
45
|
-
}
|
|
46
|
-
const msg = {};
|
|
47
|
-
msg.seconds = protoInt64.parse(longSeconds);
|
|
48
|
-
if (typeof match[2] == "string") {
|
|
49
|
-
const nanosStr = match[2] + "0".repeat(9 - match[2].length);
|
|
50
|
-
msg.nanos = parseInt(nanosStr);
|
|
51
|
-
if (longSeconds < 0 || Object.is(longSeconds, -0)) {
|
|
52
|
-
msg.nanos = -msg.nanos;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
return msg;
|
|
56
|
-
},
|
|
57
|
-
toJson(msg) {
|
|
58
|
-
const secs = Number(msg.seconds ?? 0);
|
|
59
|
-
const nanos = Number(msg.nanos ?? 0);
|
|
60
|
-
if (secs > 315576000000 || secs < -315576000000) {
|
|
61
|
-
throw new Error(`cannot encode google.protobuf.Duration to JSON: value out of range`);
|
|
62
|
-
}
|
|
63
|
-
let text = secs.toString();
|
|
64
|
-
if (nanos !== 0) {
|
|
65
|
-
let nanosStr = Math.abs(nanos).toString();
|
|
66
|
-
nanosStr = "0".repeat(9 - nanosStr.length) + nanosStr;
|
|
67
|
-
if (nanosStr.substring(3) === "000000") {
|
|
68
|
-
nanosStr = nanosStr.substring(0, 3);
|
|
69
|
-
}
|
|
70
|
-
else if (nanosStr.substring(6) === "000") {
|
|
71
|
-
nanosStr = nanosStr.substring(0, 6);
|
|
72
|
-
}
|
|
73
|
-
text += "." + nanosStr;
|
|
74
|
-
if (nanos < 0 && secs === 0) {
|
|
75
|
-
text = "-" + text;
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
return text + "s";
|
|
79
|
-
},
|
|
80
|
-
};
|
|
81
|
-
// Duration contains the message type declaration for Duration.
|
|
82
|
-
export const Duration = createMessageType({
|
|
83
|
-
typeName: "google.protobuf.Duration",
|
|
84
|
-
fields: [
|
|
85
|
-
{ no: 1, name: "seconds", kind: "scalar", T: ScalarType.INT64 },
|
|
86
|
-
{ no: 2, name: "nanos", kind: "scalar", T: ScalarType.INT32 },
|
|
87
|
-
],
|
|
88
|
-
packedByDefault: true,
|
|
89
|
-
}, Duration_Wkt);
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type { MessageType } from "../../index.js";
|
|
2
|
-
export declare const protobufPackage = "google.protobuf";
|
|
3
|
-
/**
|
|
4
|
-
* A generic empty message that you can re-use to avoid defining duplicated
|
|
5
|
-
* empty messages in your APIs. A typical example is to use it as the request
|
|
6
|
-
* or the response type of an API method. For instance:
|
|
7
|
-
*
|
|
8
|
-
* service Foo {
|
|
9
|
-
* rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
|
|
10
|
-
* }
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
* @generated from message google.protobuf.Empty
|
|
14
|
-
*/
|
|
15
|
-
export interface Empty {
|
|
16
|
-
}
|
|
17
|
-
export declare const Empty: MessageType<Empty>;
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
// Protocol Buffers - Google's data interchange format
|
|
2
|
-
// Copyright 2008 Google Inc. All rights reserved.
|
|
3
|
-
// https://developers.google.com/protocol-buffers/
|
|
4
|
-
//
|
|
5
|
-
// Redistribution and use in source and binary forms, with or without
|
|
6
|
-
// modification, are permitted provided that the following conditions are
|
|
7
|
-
// met:
|
|
8
|
-
//
|
|
9
|
-
// * Redistributions of source code must retain the above copyright
|
|
10
|
-
// notice, this list of conditions and the following disclaimer.
|
|
11
|
-
// * Redistributions in binary form must reproduce the above
|
|
12
|
-
// copyright notice, this list of conditions and the following disclaimer
|
|
13
|
-
// in the documentation and/or other materials provided with the
|
|
14
|
-
// distribution.
|
|
15
|
-
// * Neither the name of Google Inc. nor the names of its
|
|
16
|
-
// contributors may be used to endorse or promote products derived from
|
|
17
|
-
// this software without specific prior written permission.
|
|
18
|
-
//
|
|
19
|
-
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
20
|
-
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
21
|
-
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
22
|
-
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
23
|
-
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
24
|
-
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
25
|
-
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
26
|
-
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
27
|
-
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
28
|
-
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
29
|
-
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
30
|
-
import { createMessageType } from "../../index.js";
|
|
31
|
-
export const protobufPackage = "google.protobuf";
|
|
32
|
-
// Empty contains the message type declaration for Empty.
|
|
33
|
-
export const Empty = createMessageType({
|
|
34
|
-
typeName: "google.protobuf.Empty",
|
|
35
|
-
fields: [],
|
|
36
|
-
packedByDefault: true,
|
|
37
|
-
});
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { MessageType } from "../../index.js";
|
|
2
|
-
export declare const protobufPackage = "google.protobuf";
|
|
3
|
-
/**
|
|
4
|
-
* `SourceContext` represents information about the source of a
|
|
5
|
-
* protobuf element, like the file in which it is defined.
|
|
6
|
-
*
|
|
7
|
-
* @generated from message google.protobuf.SourceContext
|
|
8
|
-
*/
|
|
9
|
-
export interface SourceContext {
|
|
10
|
-
/**
|
|
11
|
-
* The path-qualified name of the .proto file that contained the associated
|
|
12
|
-
* protobuf element. For example: `"google/protobuf/source_context.proto"`.
|
|
13
|
-
*
|
|
14
|
-
* @generated from field: string file_name = 1;
|
|
15
|
-
*/
|
|
16
|
-
fileName?: string;
|
|
17
|
-
}
|
|
18
|
-
export declare const SourceContext: MessageType<SourceContext>;
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
// Protocol Buffers - Google's data interchange format
|
|
2
|
-
// Copyright 2008 Google Inc. All rights reserved.
|
|
3
|
-
// https://developers.google.com/protocol-buffers/
|
|
4
|
-
//
|
|
5
|
-
// Redistribution and use in source and binary forms, with or without
|
|
6
|
-
// modification, are permitted provided that the following conditions are
|
|
7
|
-
// met:
|
|
8
|
-
//
|
|
9
|
-
// * Redistributions of source code must retain the above copyright
|
|
10
|
-
// notice, this list of conditions and the following disclaimer.
|
|
11
|
-
// * Redistributions in binary form must reproduce the above
|
|
12
|
-
// copyright notice, this list of conditions and the following disclaimer
|
|
13
|
-
// in the documentation and/or other materials provided with the
|
|
14
|
-
// distribution.
|
|
15
|
-
// * Neither the name of Google Inc. nor the names of its
|
|
16
|
-
// contributors may be used to endorse or promote products derived from
|
|
17
|
-
// this software without specific prior written permission.
|
|
18
|
-
//
|
|
19
|
-
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
20
|
-
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
21
|
-
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
22
|
-
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
23
|
-
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
24
|
-
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
25
|
-
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
26
|
-
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
27
|
-
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
28
|
-
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
29
|
-
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
30
|
-
import { createMessageType, ScalarType } from "../../index.js";
|
|
31
|
-
export const protobufPackage = "google.protobuf";
|
|
32
|
-
// SourceContext contains the message type declaration for SourceContext.
|
|
33
|
-
export const SourceContext = createMessageType({
|
|
34
|
-
typeName: "google.protobuf.SourceContext",
|
|
35
|
-
fields: [
|
|
36
|
-
{ no: 1, name: "file_name", kind: "scalar", T: ScalarType.STRING },
|
|
37
|
-
],
|
|
38
|
-
packedByDefault: true,
|
|
39
|
-
});
|