@aptre/protobuf-es-lite 0.2.7 → 0.2.8

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.
Files changed (121) hide show
  1. package/.ignore +1 -0
  2. package/README.md +23 -24
  3. package/bin/protoc-gen-es-lite +3 -3
  4. package/dist/binary-encoding.d.ts +420 -0
  5. package/dist/binary-encoding.js +437 -0
  6. package/dist/binary.d.ts +35 -2
  7. package/dist/binary.js +64 -65
  8. package/dist/codegen-info.d.ts +43 -0
  9. package/dist/codegen-info.js +72 -0
  10. package/dist/create-descriptor-set.d.ts +36 -0
  11. package/dist/create-descriptor-set.js +936 -0
  12. package/dist/descriptor-set.d.ts +672 -0
  13. package/dist/{editions.js → descriptor-set.js} +0 -11
  14. package/dist/enum.d.ts +35 -1
  15. package/dist/feature-set.d.ts +19 -0
  16. package/dist/feature-set.js +103 -0
  17. package/dist/field-wrapper.d.ts +7 -3
  18. package/dist/field-wrapper.js +30 -1
  19. package/dist/field.d.ts +8 -19
  20. package/dist/field.js +15 -117
  21. package/dist/google/index.d.ts +9 -0
  22. package/dist/google/index.js +41 -0
  23. package/dist/google/protobuf/any.pb.d.ts +139 -0
  24. package/dist/google/protobuf/any.pb.js +42 -0
  25. package/dist/google/protobuf/api.pb.d.ts +252 -0
  26. package/dist/google/protobuf/api.pb.js +70 -0
  27. package/dist/google/protobuf/compiler/plugin.pb.d.ts +240 -0
  28. package/dist/google/protobuf/compiler/plugin.pb.js +203 -0
  29. package/dist/google/protobuf/descriptor.pb.d.ts +2132 -0
  30. package/dist/google/protobuf/descriptor.pb.js +1080 -0
  31. package/dist/google/protobuf/duration.pb.d.ts +92 -0
  32. package/dist/google/protobuf/duration.pb.js +42 -0
  33. package/dist/google/protobuf/empty.pb.d.ts +18 -0
  34. package/dist/google/protobuf/empty.pb.js +39 -0
  35. package/dist/google/protobuf/source_context.pb.d.ts +21 -0
  36. package/dist/google/protobuf/source_context.pb.js +41 -0
  37. package/dist/google/protobuf/struct.pb.d.ts +121 -0
  38. package/dist/google/protobuf/struct.pb.js +83 -0
  39. package/dist/google/protobuf/timestamp.pb.d.ts +121 -0
  40. package/dist/google/protobuf/timestamp.pb.js +42 -0
  41. package/dist/google/protobuf/type.pb.d.ts +464 -0
  42. package/dist/google/protobuf/type.pb.js +338 -0
  43. package/dist/google/protobuf/wrappers.pb.d.ts +183 -0
  44. package/dist/google/protobuf/wrappers.pb.js +107 -0
  45. package/dist/index.d.ts +8 -3
  46. package/dist/index.js +38 -8
  47. package/dist/is-message.d.ts +10 -2
  48. package/dist/is-message.js +74 -3
  49. package/dist/json.d.ts +68 -1
  50. package/dist/json.js +57 -81
  51. package/dist/message.d.ts +30 -61
  52. package/dist/message.js +61 -20
  53. package/dist/names.d.ts +43 -0
  54. package/dist/names.js +276 -0
  55. package/dist/partial.js +14 -15
  56. package/dist/proto-base64.d.ts +18 -0
  57. package/dist/proto-base64.js +128 -0
  58. package/dist/proto-double.d.ts +5 -0
  59. package/dist/proto-double.js +29 -0
  60. package/dist/proto-int64.d.ts +95 -0
  61. package/dist/proto-int64.js +116 -0
  62. package/dist/protoc-gen-es-lite/protoc-gen-es-lite-plugin.d.ts +1 -0
  63. package/dist/{protoc-gen-es-lite-plugin.js → protoc-gen-es-lite/protoc-gen-es-lite-plugin.js} +2 -2
  64. package/dist/{typescript.d.ts → protoc-gen-es-lite/typescript.d.ts} +3 -2
  65. package/dist/{typescript.js → protoc-gen-es-lite/typescript.js} +46 -34
  66. package/dist/protoplugin/create-es-plugin.d.ts +83 -0
  67. package/dist/protoplugin/create-es-plugin.js +119 -0
  68. package/dist/protoplugin/ecmascript/file-preamble.d.ts +2 -0
  69. package/dist/protoplugin/ecmascript/file-preamble.js +74 -0
  70. package/dist/protoplugin/ecmascript/generated-file.d.ts +116 -0
  71. package/dist/protoplugin/ecmascript/generated-file.js +407 -0
  72. package/dist/protoplugin/ecmascript/import-path.d.ts +65 -0
  73. package/dist/protoplugin/ecmascript/import-path.js +156 -0
  74. package/dist/protoplugin/ecmascript/import-symbol.d.ts +39 -0
  75. package/dist/protoplugin/ecmascript/import-symbol.js +37 -0
  76. package/dist/protoplugin/ecmascript/index.d.ts +7 -0
  77. package/dist/protoplugin/ecmascript/index.js +20 -0
  78. package/dist/protoplugin/ecmascript/jsdoc.d.ts +14 -0
  79. package/dist/protoplugin/ecmascript/jsdoc.js +93 -0
  80. package/dist/protoplugin/ecmascript/opaque-printables.d.ts +27 -0
  81. package/dist/protoplugin/ecmascript/opaque-printables.js +15 -0
  82. package/dist/protoplugin/ecmascript/parameter.d.ts +13 -0
  83. package/dist/protoplugin/ecmascript/parameter.js +161 -0
  84. package/dist/protoplugin/ecmascript/reify-wkt.d.ts +100 -0
  85. package/dist/protoplugin/ecmascript/reify-wkt.js +170 -0
  86. package/dist/protoplugin/ecmascript/runtime-imports.d.ts +6 -0
  87. package/dist/protoplugin/ecmascript/runtime-imports.js +28 -0
  88. package/dist/protoplugin/ecmascript/schema.d.ts +43 -0
  89. package/dist/protoplugin/ecmascript/schema.js +73 -0
  90. package/dist/protoplugin/ecmascript/target.d.ts +4 -0
  91. package/dist/protoplugin/ecmascript/target.js +15 -0
  92. package/dist/protoplugin/ecmascript/transpile.d.ts +2 -0
  93. package/dist/protoplugin/ecmascript/transpile.js +149 -0
  94. package/dist/protoplugin/error.d.ts +6 -0
  95. package/dist/protoplugin/error.js +43 -0
  96. package/dist/protoplugin/index.d.ts +8 -0
  97. package/dist/protoplugin/index.js +20 -0
  98. package/dist/protoplugin/plugin.d.ts +18 -0
  99. package/dist/protoplugin/plugin.js +15 -0
  100. package/dist/protoplugin/run-node.d.ts +12 -0
  101. package/dist/protoplugin/run-node.js +83 -0
  102. package/dist/scalar.d.ts +53 -1
  103. package/dist/scalar.js +87 -22
  104. package/dist/service-type.d.ts +95 -0
  105. package/dist/service-type.js +53 -0
  106. package/dist/text-format.d.ts +4 -0
  107. package/dist/text-format.js +189 -0
  108. package/dist/type-registry.d.ts +43 -0
  109. package/dist/type-registry.js +15 -0
  110. package/dist/unknown.d.ts +1 -1
  111. package/dist/util.d.ts +2 -2
  112. package/dist/util.js +46 -44
  113. package/dist/varint.d.ts +70 -0
  114. package/dist/varint.js +324 -0
  115. package/example/example.pb.ts +87 -0
  116. package/example/example.proto +1 -0
  117. package/example/tsconfig.json +8 -2
  118. package/package.json +19 -12
  119. package/tsconfig.json +4 -4
  120. package/dist/editions.d.ts +0 -6
  121. package/dist/protoc-gen-es-lite-plugin.d.ts +0 -1
@@ -0,0 +1,92 @@
1
+ import type { MessageType } from "../../";
2
+ import { Message } from "../../";
3
+ export declare const protobufPackage = "google.protobuf";
4
+ /**
5
+ * A Duration represents a signed, fixed-length span of time represented
6
+ * as a count of seconds and fractions of seconds at nanosecond
7
+ * resolution. It is independent of any calendar and concepts like "day"
8
+ * or "month". It is related to Timestamp in that the difference between
9
+ * two Timestamp values is a Duration and it can be added or subtracted
10
+ * from a Timestamp. Range is approximately +-10,000 years.
11
+ *
12
+ * # Examples
13
+ *
14
+ * Example 1: Compute Duration from two Timestamps in pseudo code.
15
+ *
16
+ * Timestamp start = ...;
17
+ * Timestamp end = ...;
18
+ * Duration duration = ...;
19
+ *
20
+ * duration.seconds = end.seconds - start.seconds;
21
+ * duration.nanos = end.nanos - start.nanos;
22
+ *
23
+ * if (duration.seconds < 0 && duration.nanos > 0) {
24
+ * duration.seconds += 1;
25
+ * duration.nanos -= 1000000000;
26
+ * } else if (duration.seconds > 0 && duration.nanos < 0) {
27
+ * duration.seconds -= 1;
28
+ * duration.nanos += 1000000000;
29
+ * }
30
+ *
31
+ * Example 2: Compute Timestamp from Timestamp + Duration in pseudo code.
32
+ *
33
+ * Timestamp start = ...;
34
+ * Duration duration = ...;
35
+ * Timestamp end = ...;
36
+ *
37
+ * end.seconds = start.seconds + duration.seconds;
38
+ * end.nanos = start.nanos + duration.nanos;
39
+ *
40
+ * if (end.nanos < 0) {
41
+ * end.seconds -= 1;
42
+ * end.nanos += 1000000000;
43
+ * } else if (end.nanos >= 1000000000) {
44
+ * end.seconds += 1;
45
+ * end.nanos -= 1000000000;
46
+ * }
47
+ *
48
+ * Example 3: Compute Duration from datetime.timedelta in Python.
49
+ *
50
+ * td = datetime.timedelta(days=3, minutes=10)
51
+ * duration = Duration()
52
+ * duration.FromTimedelta(td)
53
+ *
54
+ * # JSON Mapping
55
+ *
56
+ * In JSON format, the Duration type is encoded as a string rather than an
57
+ * object, where the string ends in the suffix "s" (indicating seconds) and
58
+ * is preceded by the number of seconds, with nanoseconds expressed as
59
+ * fractional seconds. For example, 3 seconds with 0 nanoseconds should be
60
+ * encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should
61
+ * be expressed in JSON format as "3.000000001s", and 3 seconds and 1
62
+ * microsecond should be expressed in JSON format as "3.000001s".
63
+ *
64
+ * protobuf-go-lite:disable-text
65
+ *
66
+ *
67
+ * @generated from message google.protobuf.Duration
68
+ */
69
+ export type Duration = Message<{
70
+ /**
71
+ * Signed seconds of the span of time. Must be from -315,576,000,000
72
+ * to +315,576,000,000 inclusive. Note: these bounds are computed from:
73
+ * 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
74
+ *
75
+ *
76
+ * @generated from field: int64 seconds = 1 [packed = false, default = , jstype = JS_NORMAL];
77
+ */
78
+ seconds?: bigint;
79
+ /**
80
+ * Signed fractions of a second at nanosecond resolution of the span
81
+ * of time. Durations less than one second are represented with a 0
82
+ * `seconds` field and a positive or negative `nanos` field. For durations
83
+ * of one second or more, a non-zero value for the `nanos` field must be
84
+ * of the same sign as the `seconds` field. Must be from -999,999,999
85
+ * to +999,999,999 inclusive.
86
+ *
87
+ *
88
+ * @generated from field: int32 nanos = 2 [packed = false, default = , jstype = JS_NORMAL];
89
+ */
90
+ nanos?: number;
91
+ }>;
92
+ export declare const Duration: MessageType<Duration>;
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ // Protocol Buffers - Google's data interchange format
3
+ // Copyright 2008 Google Inc. All rights reserved.
4
+ // https://developers.google.com/protocol-buffers/
5
+ //
6
+ // Redistribution and use in source and binary forms, with or without
7
+ // modification, are permitted provided that the following conditions are
8
+ // met:
9
+ //
10
+ // * Redistributions of source code must retain the above copyright
11
+ // notice, this list of conditions and the following disclaimer.
12
+ // * Redistributions in binary form must reproduce the above
13
+ // copyright notice, this list of conditions and the following disclaimer
14
+ // in the documentation and/or other materials provided with the
15
+ // distribution.
16
+ // * Neither the name of Google Inc. nor the names of its
17
+ // contributors may be used to endorse or promote products derived from
18
+ // this software without specific prior written permission.
19
+ //
20
+ // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21
+ // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22
+ // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23
+ // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24
+ // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25
+ // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26
+ // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27
+ // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28
+ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29
+ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30
+ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31
+ Object.defineProperty(exports, "__esModule", { value: true });
32
+ exports.Duration = exports.protobufPackage = void 0;
33
+ const __1 = require("../../");
34
+ exports.protobufPackage = "google.protobuf";
35
+ exports.Duration = (0, __1.createMessageType)({
36
+ typeName: "google.protobuf.Duration",
37
+ fields: [
38
+ { no: 1, name: "seconds", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
39
+ { no: 2, name: "nanos", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
40
+ ],
41
+ packedByDefault: true,
42
+ });
@@ -0,0 +1,18 @@
1
+ import type { MessageType } from "../../";
2
+ import { Message } from "../../";
3
+ export declare const protobufPackage = "google.protobuf";
4
+ /**
5
+ * A generic empty message that you can re-use to avoid defining duplicated
6
+ * empty messages in your APIs. A typical example is to use it as the request
7
+ * or the response type of an API method. For instance:
8
+ *
9
+ * service Foo {
10
+ * rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
11
+ * }
12
+ *
13
+ *
14
+ *
15
+ * @generated from message google.protobuf.Empty
16
+ */
17
+ export type Empty = Message<{}>;
18
+ export declare const Empty: MessageType<Empty>;
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ // Protocol Buffers - Google's data interchange format
3
+ // Copyright 2008 Google Inc. All rights reserved.
4
+ // https://developers.google.com/protocol-buffers/
5
+ //
6
+ // Redistribution and use in source and binary forms, with or without
7
+ // modification, are permitted provided that the following conditions are
8
+ // met:
9
+ //
10
+ // * Redistributions of source code must retain the above copyright
11
+ // notice, this list of conditions and the following disclaimer.
12
+ // * Redistributions in binary form must reproduce the above
13
+ // copyright notice, this list of conditions and the following disclaimer
14
+ // in the documentation and/or other materials provided with the
15
+ // distribution.
16
+ // * Neither the name of Google Inc. nor the names of its
17
+ // contributors may be used to endorse or promote products derived from
18
+ // this software without specific prior written permission.
19
+ //
20
+ // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21
+ // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22
+ // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23
+ // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24
+ // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25
+ // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26
+ // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27
+ // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28
+ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29
+ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30
+ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31
+ Object.defineProperty(exports, "__esModule", { value: true });
32
+ exports.Empty = exports.protobufPackage = void 0;
33
+ const __1 = require("../../");
34
+ exports.protobufPackage = "google.protobuf";
35
+ exports.Empty = (0, __1.createMessageType)({
36
+ typeName: "google.protobuf.Empty",
37
+ fields: [],
38
+ packedByDefault: true,
39
+ });
@@ -0,0 +1,21 @@
1
+ import type { MessageType } from "../../";
2
+ import { Message } from "../../";
3
+ export declare const protobufPackage = "google.protobuf";
4
+ /**
5
+ * `SourceContext` represents information about the source of a
6
+ * protobuf element, like the file in which it is defined.
7
+ *
8
+ *
9
+ * @generated from message google.protobuf.SourceContext
10
+ */
11
+ export type SourceContext = Message<{
12
+ /**
13
+ * The path-qualified name of the .proto file that contained the associated
14
+ * protobuf element. For example: `"google/protobuf/source_context.proto"`.
15
+ *
16
+ *
17
+ * @generated from field: string file_name = 1 [packed = false, default = "", jstype = JS_NORMAL];
18
+ */
19
+ fileName?: string;
20
+ }>;
21
+ export declare const SourceContext: MessageType<SourceContext>;
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ // Protocol Buffers - Google's data interchange format
3
+ // Copyright 2008 Google Inc. All rights reserved.
4
+ // https://developers.google.com/protocol-buffers/
5
+ //
6
+ // Redistribution and use in source and binary forms, with or without
7
+ // modification, are permitted provided that the following conditions are
8
+ // met:
9
+ //
10
+ // * Redistributions of source code must retain the above copyright
11
+ // notice, this list of conditions and the following disclaimer.
12
+ // * Redistributions in binary form must reproduce the above
13
+ // copyright notice, this list of conditions and the following disclaimer
14
+ // in the documentation and/or other materials provided with the
15
+ // distribution.
16
+ // * Neither the name of Google Inc. nor the names of its
17
+ // contributors may be used to endorse or promote products derived from
18
+ // this software without specific prior written permission.
19
+ //
20
+ // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21
+ // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22
+ // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23
+ // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24
+ // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25
+ // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26
+ // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27
+ // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28
+ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29
+ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30
+ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31
+ Object.defineProperty(exports, "__esModule", { value: true });
32
+ exports.SourceContext = exports.protobufPackage = void 0;
33
+ const __1 = require("../../");
34
+ exports.protobufPackage = "google.protobuf";
35
+ exports.SourceContext = (0, __1.createMessageType)({
36
+ typeName: "google.protobuf.SourceContext",
37
+ fields: [
38
+ { no: 1, name: "file_name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
39
+ ],
40
+ packedByDefault: true,
41
+ });
@@ -0,0 +1,121 @@
1
+ import type { MessageType } from "../../";
2
+ import { Message } from "../../";
3
+ export declare const protobufPackage = "google.protobuf";
4
+ /**
5
+ * `NullValue` is a singleton enumeration to represent the null value for the
6
+ * `Value` type union.
7
+ *
8
+ * The JSON representation for `NullValue` is JSON `null`.
9
+ *
10
+ *
11
+ * @generated from enum google.protobuf.NullValue
12
+ */
13
+ export declare enum NullValue {
14
+ /**
15
+ * Null value.
16
+ *
17
+ *
18
+ * @generated from enum value: NULL_VALUE = 0;
19
+ */
20
+ NULL_VALUE = 0
21
+ }
22
+ export declare const NullValue_Enum: import("../../enum").EnumType;
23
+ /**
24
+ * `ListValue` is a wrapper around a repeated field of values.
25
+ *
26
+ * The JSON representation for `ListValue` is JSON array.
27
+ *
28
+ *
29
+ * @generated from message google.protobuf.ListValue
30
+ */
31
+ export type ListValue = Message<{
32
+ /**
33
+ * Repeated field of dynamically typed values.
34
+ *
35
+ *
36
+ * @generated from field: repeated google.protobuf.Value values = 1 [packed = false, default = , jstype = JS_NORMAL];
37
+ */
38
+ values?: Value[];
39
+ }>;
40
+ export declare const ListValue: MessageType<ListValue>;
41
+ /**
42
+ * `Value` represents a dynamically typed value which can be either
43
+ * null, a number, a string, a boolean, a recursive struct value, or a
44
+ * list of values. A producer of value is expected to set one of these
45
+ * variants. Absence of any variant indicates an error.
46
+ *
47
+ * The JSON representation for `Value` is JSON value.
48
+ *
49
+ *
50
+ * @generated from message google.protobuf.Value
51
+ */
52
+ export type Value = Message<{
53
+ /**
54
+ * Represents a null value.
55
+ *
56
+ *
57
+ * @generated from field: google.protobuf.NullValue null_value = 1 [packed = false, default = , jstype = JS_NORMAL];
58
+ */
59
+ nullValue?: NullValue;
60
+ /**
61
+ * Represents a double value.
62
+ *
63
+ *
64
+ * @generated from field: double number_value = 2 [packed = false, default = , jstype = JS_NORMAL];
65
+ */
66
+ numberValue?: number;
67
+ /**
68
+ * Represents a string value.
69
+ *
70
+ *
71
+ * @generated from field: string string_value = 3 [packed = false, default = "", jstype = JS_NORMAL];
72
+ */
73
+ stringValue?: string;
74
+ /**
75
+ * Represents a boolean value.
76
+ *
77
+ *
78
+ * @generated from field: bool bool_value = 4 [packed = false, default = , jstype = JS_NORMAL];
79
+ */
80
+ boolValue?: boolean;
81
+ /**
82
+ * Represents a structured value.
83
+ *
84
+ *
85
+ * @generated from field: google.protobuf.Struct struct_value = 5 [packed = false, default = , jstype = JS_NORMAL];
86
+ */
87
+ structValue?: Struct;
88
+ /**
89
+ * Represents a repeated `Value`.
90
+ *
91
+ *
92
+ * @generated from field: google.protobuf.ListValue list_value = 6 [packed = false, default = , jstype = JS_NORMAL];
93
+ */
94
+ listValue?: ListValue;
95
+ }>;
96
+ export declare const Value: MessageType<Value>;
97
+ /**
98
+ * `Struct` represents a structured data value, consisting of fields
99
+ * which map to dynamically typed values. In some languages, `Struct`
100
+ * might be supported by a native representation. For example, in
101
+ * scripting languages like JS a struct is represented as an
102
+ * object. The details of that representation are described together
103
+ * with the proto support for the language.
104
+ *
105
+ * The JSON representation for `Struct` is JSON object.
106
+ *
107
+ *
108
+ * @generated from message google.protobuf.Struct
109
+ */
110
+ export type Struct = Message<{
111
+ /**
112
+ * Unordered map of dynamically typed values.
113
+ *
114
+ *
115
+ * @generated from field: map<string, google.protobuf.Value> fields = 1 [packed = false, default = , jstype = JS_NORMAL];
116
+ */
117
+ fields?: {
118
+ [key: string]: Value;
119
+ };
120
+ }>;
121
+ export declare const Struct: MessageType<Struct>;
@@ -0,0 +1,83 @@
1
+ "use strict";
2
+ // Protocol Buffers - Google's data interchange format
3
+ // Copyright 2008 Google Inc. All rights reserved.
4
+ // https://developers.google.com/protocol-buffers/
5
+ //
6
+ // Redistribution and use in source and binary forms, with or without
7
+ // modification, are permitted provided that the following conditions are
8
+ // met:
9
+ //
10
+ // * Redistributions of source code must retain the above copyright
11
+ // notice, this list of conditions and the following disclaimer.
12
+ // * Redistributions in binary form must reproduce the above
13
+ // copyright notice, this list of conditions and the following disclaimer
14
+ // in the documentation and/or other materials provided with the
15
+ // distribution.
16
+ // * Neither the name of Google Inc. nor the names of its
17
+ // contributors may be used to endorse or promote products derived from
18
+ // this software without specific prior written permission.
19
+ //
20
+ // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21
+ // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22
+ // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23
+ // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24
+ // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25
+ // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26
+ // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27
+ // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28
+ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29
+ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30
+ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31
+ Object.defineProperty(exports, "__esModule", { value: true });
32
+ exports.Struct = exports.Value = exports.ListValue = exports.NullValue_Enum = exports.NullValue = exports.protobufPackage = void 0;
33
+ const __1 = require("../../");
34
+ exports.protobufPackage = "google.protobuf";
35
+ /**
36
+ * `NullValue` is a singleton enumeration to represent the null value for the
37
+ * `Value` type union.
38
+ *
39
+ * The JSON representation for `NullValue` is JSON `null`.
40
+ *
41
+ *
42
+ * @generated from enum google.protobuf.NullValue
43
+ */
44
+ var NullValue;
45
+ (function (NullValue) {
46
+ /**
47
+ * Null value.
48
+ *
49
+ *
50
+ * @generated from enum value: NULL_VALUE = 0;
51
+ */
52
+ NullValue[NullValue["NULL_VALUE"] = 0] = "NULL_VALUE";
53
+ })(NullValue || (exports.NullValue = NullValue = {}));
54
+ // NullValue_Enum is the enum type for NullValue.
55
+ exports.NullValue_Enum = (0, __1.createEnumType)("google.protobuf.NullValue", [
56
+ { no: 0, name: "NULL_VALUE" },
57
+ ]);
58
+ exports.ListValue = (0, __1.createMessageType)({
59
+ typeName: "google.protobuf.ListValue",
60
+ fields: [
61
+ { no: 1, name: "values", kind: "message", T: () => exports.Value, repeated: true },
62
+ ],
63
+ packedByDefault: true,
64
+ });
65
+ exports.Value = (0, __1.createMessageType)({
66
+ typeName: "google.protobuf.Value",
67
+ fields: [
68
+ { no: 1, name: "null_value", kind: "enum", T: exports.NullValue_Enum },
69
+ { no: 2, name: "number_value", kind: "scalar", T: 1 /* ScalarType.DOUBLE */ },
70
+ { no: 3, name: "string_value", kind: "scalar", T: 9 /* ScalarType.STRING */ },
71
+ { no: 4, name: "bool_value", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
72
+ { no: 5, name: "struct_value", kind: "message", T: () => exports.Struct },
73
+ { no: 6, name: "list_value", kind: "message", T: () => exports.ListValue },
74
+ ],
75
+ packedByDefault: true,
76
+ });
77
+ exports.Struct = (0, __1.createMessageType)({
78
+ typeName: "google.protobuf.Struct",
79
+ fields: [
80
+ { no: 1, name: "fields", kind: "map", K: 9 /* ScalarType.STRING */, V: { kind: "message", T: () => exports.Value } },
81
+ ],
82
+ packedByDefault: true,
83
+ });
@@ -0,0 +1,121 @@
1
+ import type { MessageType } from "../../";
2
+ import { Message } from "../../";
3
+ export declare const protobufPackage = "google.protobuf";
4
+ /**
5
+ * A Timestamp represents a point in time independent of any time zone or local
6
+ * calendar, encoded as a count of seconds and fractions of seconds at
7
+ * nanosecond resolution. The count is relative to an epoch at UTC midnight on
8
+ * January 1, 1970, in the proleptic Gregorian calendar which extends the
9
+ * Gregorian calendar backwards to year one.
10
+ *
11
+ * All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap
12
+ * second table is needed for interpretation, using a [24-hour linear
13
+ * smear](https://developers.google.com/time/smear).
14
+ *
15
+ * The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By
16
+ * restricting to that range, we ensure that we can convert to and from [RFC
17
+ * 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings.
18
+ *
19
+ * # Examples
20
+ *
21
+ * Example 1: Compute Timestamp from POSIX `time()`.
22
+ *
23
+ * Timestamp timestamp;
24
+ * timestamp.set_seconds(time(NULL));
25
+ * timestamp.set_nanos(0);
26
+ *
27
+ * Example 2: Compute Timestamp from POSIX `gettimeofday()`.
28
+ *
29
+ * struct timeval tv;
30
+ * gettimeofday(&tv, NULL);
31
+ *
32
+ * Timestamp timestamp;
33
+ * timestamp.set_seconds(tv.tv_sec);
34
+ * timestamp.set_nanos(tv.tv_usec * 1000);
35
+ *
36
+ * Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`.
37
+ *
38
+ * FILETIME ft;
39
+ * GetSystemTimeAsFileTime(&ft);
40
+ * UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;
41
+ *
42
+ * // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
43
+ * // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
44
+ * Timestamp timestamp;
45
+ * timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
46
+ * timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));
47
+ *
48
+ * Example 4: Compute Timestamp from Java `System.currentTimeMillis()`.
49
+ *
50
+ * long millis = System.currentTimeMillis();
51
+ *
52
+ * Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
53
+ * .setNanos((int) ((millis % 1000) * 1000000)).build();
54
+ *
55
+ * Example 5: Compute Timestamp from Java `Instant.now()`.
56
+ *
57
+ * Instant now = Instant.now();
58
+ *
59
+ * Timestamp timestamp =
60
+ * Timestamp.newBuilder().setSeconds(now.getEpochSecond())
61
+ * .setNanos(now.getNano()).build();
62
+ *
63
+ * Example 6: Compute Timestamp from current time in Python.
64
+ *
65
+ * timestamp = Timestamp()
66
+ * timestamp.GetCurrentTime()
67
+ *
68
+ * # JSON Mapping
69
+ *
70
+ * In JSON format, the Timestamp type is encoded as a string in the
71
+ * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the
72
+ * format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z"
73
+ * where {year} is always expressed using four digits while {month}, {day},
74
+ * {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional
75
+ * seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution),
76
+ * are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone
77
+ * is required. A proto3 JSON serializer should always use UTC (as indicated by
78
+ * "Z") when printing the Timestamp type and a proto3 JSON parser should be
79
+ * able to accept both UTC and other timezones (as indicated by an offset).
80
+ *
81
+ * For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past
82
+ * 01:30 UTC on January 15, 2017.
83
+ *
84
+ * In JavaScript, one can convert a Date object to this format using the
85
+ * standard
86
+ * [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)
87
+ * method. In Python, a standard `datetime.datetime` object can be converted
88
+ * to this format using
89
+ * [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with
90
+ * the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use
91
+ * the Joda Time's [`ISODateTimeFormat.dateTime()`](
92
+ * http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()
93
+ * ) to obtain a formatter capable of generating timestamps in this format.
94
+ *
95
+ * protobuf-go-lite:disable-text
96
+ *
97
+ *
98
+ * @generated from message google.protobuf.Timestamp
99
+ */
100
+ export type Timestamp = Message<{
101
+ /**
102
+ * Represents seconds of UTC time since Unix epoch
103
+ * 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
104
+ * 9999-12-31T23:59:59Z inclusive.
105
+ *
106
+ *
107
+ * @generated from field: int64 seconds = 1 [packed = false, default = , jstype = JS_NORMAL];
108
+ */
109
+ seconds?: bigint;
110
+ /**
111
+ * Non-negative fractions of a second at nanosecond resolution. Negative
112
+ * second values with fractions must still have non-negative nanos values
113
+ * that count forward in time. Must be from 0 to 999,999,999
114
+ * inclusive.
115
+ *
116
+ *
117
+ * @generated from field: int32 nanos = 2 [packed = false, default = , jstype = JS_NORMAL];
118
+ */
119
+ nanos?: number;
120
+ }>;
121
+ export declare const Timestamp: MessageType<Timestamp>;
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ // Protocol Buffers - Google's data interchange format
3
+ // Copyright 2008 Google Inc. All rights reserved.
4
+ // https://developers.google.com/protocol-buffers/
5
+ //
6
+ // Redistribution and use in source and binary forms, with or without
7
+ // modification, are permitted provided that the following conditions are
8
+ // met:
9
+ //
10
+ // * Redistributions of source code must retain the above copyright
11
+ // notice, this list of conditions and the following disclaimer.
12
+ // * Redistributions in binary form must reproduce the above
13
+ // copyright notice, this list of conditions and the following disclaimer
14
+ // in the documentation and/or other materials provided with the
15
+ // distribution.
16
+ // * Neither the name of Google Inc. nor the names of its
17
+ // contributors may be used to endorse or promote products derived from
18
+ // this software without specific prior written permission.
19
+ //
20
+ // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21
+ // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22
+ // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23
+ // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24
+ // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25
+ // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26
+ // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27
+ // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28
+ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29
+ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30
+ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31
+ Object.defineProperty(exports, "__esModule", { value: true });
32
+ exports.Timestamp = exports.protobufPackage = void 0;
33
+ const __1 = require("../../");
34
+ exports.protobufPackage = "google.protobuf";
35
+ exports.Timestamp = (0, __1.createMessageType)({
36
+ typeName: "google.protobuf.Timestamp",
37
+ fields: [
38
+ { no: 1, name: "seconds", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
39
+ { no: 2, name: "nanos", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
40
+ ],
41
+ packedByDefault: true,
42
+ });