@teslemetry/tesla-protocol 0.1.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.
Files changed (150) hide show
  1. package/README.md +20 -0
  2. package/dist/command/car_server.cjs +11126 -0
  3. package/dist/command/car_server.d.cts +1281 -0
  4. package/dist/command/car_server.d.mts +1281 -0
  5. package/dist/command/car_server.mjs +10880 -0
  6. package/dist/command/common.cjs +1536 -0
  7. package/dist/command/common.d.cts +327 -0
  8. package/dist/command/common.d.mts +327 -0
  9. package/dist/command/common.mjs +1488 -0
  10. package/dist/command/errors.cjs +107 -0
  11. package/dist/command/errors.d.cts +40 -0
  12. package/dist/command/errors.d.mts +40 -0
  13. package/dist/command/errors.mjs +102 -0
  14. package/dist/command/google/protobuf/timestamp.cjs +71 -0
  15. package/dist/command/google/protobuf/timestamp.d.cts +124 -0
  16. package/dist/command/google/protobuf/timestamp.d.mts +124 -0
  17. package/dist/command/google/protobuf/timestamp.mjs +69 -0
  18. package/dist/command/google/protobuf/wrappers.cjs +421 -0
  19. package/dist/command/google/protobuf/wrappers.d.cts +134 -0
  20. package/dist/command/google/protobuf/wrappers.d.mts +134 -0
  21. package/dist/command/google/protobuf/wrappers.mjs +411 -0
  22. package/dist/command/keys.cjs +60 -0
  23. package/dist/command/keys.d.cts +23 -0
  24. package/dist/command/keys.d.mts +23 -0
  25. package/dist/command/keys.mjs +56 -0
  26. package/dist/command/managed_charging.cjs +435 -0
  27. package/dist/command/managed_charging.d.cts +86 -0
  28. package/dist/command/managed_charging.d.mts +86 -0
  29. package/dist/command/managed_charging.mjs +421 -0
  30. package/dist/command/session.cjs +119 -0
  31. package/dist/command/session.d.cts +28 -0
  32. package/dist/command/session.d.mts +28 -0
  33. package/dist/command/session.mjs +117 -0
  34. package/dist/command/signatures.cjs +696 -0
  35. package/dist/command/signatures.d.cts +107 -0
  36. package/dist/command/signatures.d.mts +107 -0
  37. package/dist/command/signatures.mjs +678 -0
  38. package/dist/command/universal_message.cjs +588 -0
  39. package/dist/command/universal_message.d.cts +141 -0
  40. package/dist/command/universal_message.d.mts +141 -0
  41. package/dist/command/universal_message.mjs +571 -0
  42. package/dist/command/vcsec.cjs +2281 -0
  43. package/dist/command/vcsec.d.cts +404 -0
  44. package/dist/command/vcsec.d.mts +404 -0
  45. package/dist/command/vcsec.mjs +2218 -0
  46. package/dist/command/vehicle.cjs +10332 -0
  47. package/dist/command/vehicle.d.cts +1429 -0
  48. package/dist/command/vehicle.d.mts +1429 -0
  49. package/dist/command/vehicle.mjs +10168 -0
  50. package/dist/energy_command/identifier_type.cjs +47 -0
  51. package/dist/energy_command/identifier_type.d.cts +19 -0
  52. package/dist/energy_command/identifier_type.d.mts +19 -0
  53. package/dist/energy_command/identifier_type.mjs +43 -0
  54. package/dist/energy_device/authorization_api.cjs +815 -0
  55. package/dist/energy_device/authorization_api.d.cts +92 -0
  56. package/dist/energy_device/authorization_api.d.mts +92 -0
  57. package/dist/energy_device/authorization_api.mjs +801 -0
  58. package/dist/energy_device/authorization_types.cjs +348 -0
  59. package/dist/energy_device/authorization_types.d.cts +79 -0
  60. package/dist/energy_device/authorization_types.d.mts +79 -0
  61. package/dist/energy_device/authorization_types.mjs +331 -0
  62. package/dist/energy_device/common_api.cjs +2104 -0
  63. package/dist/energy_device/common_api.d.cts +211 -0
  64. package/dist/energy_device/common_api.d.mts +211 -0
  65. package/dist/energy_device/common_api.mjs +2064 -0
  66. package/dist/energy_device/device.cjs +485 -0
  67. package/dist/energy_device/device.d.cts +102 -0
  68. package/dist/energy_device/device.d.mts +102 -0
  69. package/dist/energy_device/device.mjs +462 -0
  70. package/dist/energy_device/energy.cjs +442 -0
  71. package/dist/energy_device/energy.d.cts +82 -0
  72. package/dist/energy_device/energy.d.mts +82 -0
  73. package/dist/energy_device/energy.mjs +429 -0
  74. package/dist/energy_device/energy_site_net.cjs +235 -0
  75. package/dist/energy_device/energy_site_net.d.cts +69 -0
  76. package/dist/energy_device/energy_site_net.d.mts +69 -0
  77. package/dist/energy_device/energy_site_net.mjs +219 -0
  78. package/dist/energy_device/error.cjs +53 -0
  79. package/dist/energy_device/error.d.cts +27 -0
  80. package/dist/energy_device/error.d.mts +27 -0
  81. package/dist/energy_device/error.mjs +51 -0
  82. package/dist/energy_device/google/protobuf/timestamp.cjs +71 -0
  83. package/dist/energy_device/google/protobuf/timestamp.d.cts +124 -0
  84. package/dist/energy_device/google/protobuf/timestamp.d.mts +124 -0
  85. package/dist/energy_device/google/protobuf/timestamp.mjs +69 -0
  86. package/dist/energy_device/google/protobuf/wrappers.cjs +421 -0
  87. package/dist/energy_device/google/protobuf/wrappers.d.cts +134 -0
  88. package/dist/energy_device/google/protobuf/wrappers.d.mts +134 -0
  89. package/dist/energy_device/google/protobuf/wrappers.mjs +411 -0
  90. package/dist/energy_device/google/rpc/status.cjs +65 -0
  91. package/dist/energy_device/google/rpc/status.d.cts +26 -0
  92. package/dist/energy_device/google/rpc/status.d.mts +26 -0
  93. package/dist/energy_device/google/rpc/status.mjs +63 -0
  94. package/dist/energy_device/networking.cjs +834 -0
  95. package/dist/energy_device/networking.d.cts +141 -0
  96. package/dist/energy_device/networking.d.mts +141 -0
  97. package/dist/energy_device/networking.mjs +810 -0
  98. package/dist/energy_device/teg_api.cjs +594 -0
  99. package/dist/energy_device/teg_api.d.cts +140 -0
  100. package/dist/energy_device/teg_api.d.mts +140 -0
  101. package/dist/energy_device/teg_api.mjs +581 -0
  102. package/dist/energy_device/transport.cjs +478 -0
  103. package/dist/energy_device/transport.d.cts +95 -0
  104. package/dist/energy_device/transport.d.mts +95 -0
  105. package/dist/energy_device/transport.mjs +460 -0
  106. package/dist/energy_device/update.cjs +521 -0
  107. package/dist/energy_device/update.d.cts +86 -0
  108. package/dist/energy_device/update.d.mts +86 -0
  109. package/dist/energy_device/update.mjs +506 -0
  110. package/dist/energy_device/wall_connector.cjs +634 -0
  111. package/dist/energy_device/wall_connector.d.cts +182 -0
  112. package/dist/energy_device/wall_connector.d.mts +182 -0
  113. package/dist/energy_device/wall_connector.mjs +590 -0
  114. package/dist/telemetry/google/protobuf/timestamp.cjs +71 -0
  115. package/dist/telemetry/google/protobuf/timestamp.d.cts +124 -0
  116. package/dist/telemetry/google/protobuf/timestamp.d.mts +124 -0
  117. package/dist/telemetry/google/protobuf/timestamp.mjs +69 -0
  118. package/dist/telemetry/vehicle_alert.cjs +214 -0
  119. package/dist/telemetry/vehicle_alert.d.cts +48 -0
  120. package/dist/telemetry/vehicle_alert.d.mts +48 -0
  121. package/dist/telemetry/vehicle_alert.mjs +208 -0
  122. package/dist/telemetry/vehicle_connectivity.cjs +145 -0
  123. package/dist/telemetry/vehicle_connectivity.d.cts +41 -0
  124. package/dist/telemetry/vehicle_connectivity.d.mts +41 -0
  125. package/dist/telemetry/vehicle_connectivity.mjs +140 -0
  126. package/dist/telemetry/vehicle_data.cjs +3792 -0
  127. package/dist/telemetry/vehicle_data.d.cts +872 -0
  128. package/dist/telemetry/vehicle_data.d.mts +872 -0
  129. package/dist/telemetry/vehicle_data.mjs +3655 -0
  130. package/dist/telemetry/vehicle_error.cjs +245 -0
  131. package/dist/telemetry/vehicle_error.d.cts +45 -0
  132. package/dist/telemetry/vehicle_error.d.mts +45 -0
  133. package/dist/telemetry/vehicle_error.mjs +241 -0
  134. package/dist/telemetry/vehicle_metric.cjs +236 -0
  135. package/dist/telemetry/vehicle_metric.d.cts +44 -0
  136. package/dist/telemetry/vehicle_metric.d.mts +44 -0
  137. package/dist/telemetry/vehicle_metric.mjs +232 -0
  138. package/dist/teslapower/google/protobuf/any.cjs +84 -0
  139. package/dist/teslapower/google/protobuf/any.d.cts +140 -0
  140. package/dist/teslapower/google/protobuf/any.d.mts +140 -0
  141. package/dist/teslapower/google/protobuf/any.mjs +82 -0
  142. package/dist/teslapower/google/protobuf/timestamp.cjs +71 -0
  143. package/dist/teslapower/google/protobuf/timestamp.d.cts +124 -0
  144. package/dist/teslapower/google/protobuf/timestamp.d.mts +124 -0
  145. package/dist/teslapower/google/protobuf/timestamp.mjs +69 -0
  146. package/dist/teslapower/teslapower.cjs +5486 -0
  147. package/dist/teslapower/teslapower.d.cts +518 -0
  148. package/dist/teslapower/teslapower.d.mts +518 -0
  149. package/dist/teslapower/teslapower.mjs +5381 -0
  150. package/package.json +53 -0
@@ -0,0 +1,421 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ let _bufbuild_protobuf_wire = require("@bufbuild/protobuf/wire");
3
+ //#region src/energy_device/google/protobuf/wrappers.ts
4
+ const protobufPackage = "google.protobuf";
5
+ function createBaseDoubleValue() {
6
+ return { value: 0 };
7
+ }
8
+ const DoubleValue = {
9
+ encode(message, writer = new _bufbuild_protobuf_wire.BinaryWriter()) {
10
+ if (message.value !== 0) writer.uint32(9).double(message.value);
11
+ return writer;
12
+ },
13
+ decode(input, length) {
14
+ const reader = input instanceof _bufbuild_protobuf_wire.BinaryReader ? input : new _bufbuild_protobuf_wire.BinaryReader(input);
15
+ const end = length === void 0 ? reader.len : reader.pos + length;
16
+ const message = createBaseDoubleValue();
17
+ while (reader.pos < end) {
18
+ const tag = reader.uint32();
19
+ switch (tag >>> 3) {
20
+ case 1:
21
+ if (tag !== 9) break;
22
+ message.value = reader.double();
23
+ continue;
24
+ }
25
+ if ((tag & 7) === 4 || tag === 0) break;
26
+ reader.skip(tag & 7);
27
+ }
28
+ return message;
29
+ },
30
+ fromJSON(object) {
31
+ return { value: isSet(object.value) ? globalThis.Number(object.value) : 0 };
32
+ },
33
+ toJSON(message) {
34
+ const obj = {};
35
+ if (message.value !== void 0) obj.value = message.value;
36
+ return obj;
37
+ },
38
+ create(base) {
39
+ return DoubleValue.fromPartial(base ?? {});
40
+ },
41
+ fromPartial(object) {
42
+ const message = createBaseDoubleValue();
43
+ message.value = object.value ?? 0;
44
+ return message;
45
+ }
46
+ };
47
+ function createBaseFloatValue() {
48
+ return { value: 0 };
49
+ }
50
+ const FloatValue = {
51
+ encode(message, writer = new _bufbuild_protobuf_wire.BinaryWriter()) {
52
+ if (message.value !== 0) writer.uint32(13).float(message.value);
53
+ return writer;
54
+ },
55
+ decode(input, length) {
56
+ const reader = input instanceof _bufbuild_protobuf_wire.BinaryReader ? input : new _bufbuild_protobuf_wire.BinaryReader(input);
57
+ const end = length === void 0 ? reader.len : reader.pos + length;
58
+ const message = createBaseFloatValue();
59
+ while (reader.pos < end) {
60
+ const tag = reader.uint32();
61
+ switch (tag >>> 3) {
62
+ case 1:
63
+ if (tag !== 13) break;
64
+ message.value = reader.float();
65
+ continue;
66
+ }
67
+ if ((tag & 7) === 4 || tag === 0) break;
68
+ reader.skip(tag & 7);
69
+ }
70
+ return message;
71
+ },
72
+ fromJSON(object) {
73
+ return { value: isSet(object.value) ? globalThis.Number(object.value) : 0 };
74
+ },
75
+ toJSON(message) {
76
+ const obj = {};
77
+ if (message.value !== void 0) obj.value = message.value;
78
+ return obj;
79
+ },
80
+ create(base) {
81
+ return FloatValue.fromPartial(base ?? {});
82
+ },
83
+ fromPartial(object) {
84
+ const message = createBaseFloatValue();
85
+ message.value = object.value ?? 0;
86
+ return message;
87
+ }
88
+ };
89
+ function createBaseInt64Value() {
90
+ return { value: 0 };
91
+ }
92
+ const Int64Value = {
93
+ encode(message, writer = new _bufbuild_protobuf_wire.BinaryWriter()) {
94
+ if (message.value !== 0) writer.uint32(8).int64(message.value);
95
+ return writer;
96
+ },
97
+ decode(input, length) {
98
+ const reader = input instanceof _bufbuild_protobuf_wire.BinaryReader ? input : new _bufbuild_protobuf_wire.BinaryReader(input);
99
+ const end = length === void 0 ? reader.len : reader.pos + length;
100
+ const message = createBaseInt64Value();
101
+ while (reader.pos < end) {
102
+ const tag = reader.uint32();
103
+ switch (tag >>> 3) {
104
+ case 1:
105
+ if (tag !== 8) break;
106
+ message.value = longToNumber(reader.int64());
107
+ continue;
108
+ }
109
+ if ((tag & 7) === 4 || tag === 0) break;
110
+ reader.skip(tag & 7);
111
+ }
112
+ return message;
113
+ },
114
+ fromJSON(object) {
115
+ return { value: isSet(object.value) ? globalThis.Number(object.value) : 0 };
116
+ },
117
+ toJSON(message) {
118
+ const obj = {};
119
+ if (message.value !== void 0) obj.value = Math.round(message.value);
120
+ return obj;
121
+ },
122
+ create(base) {
123
+ return Int64Value.fromPartial(base ?? {});
124
+ },
125
+ fromPartial(object) {
126
+ const message = createBaseInt64Value();
127
+ message.value = object.value ?? 0;
128
+ return message;
129
+ }
130
+ };
131
+ function createBaseUInt64Value() {
132
+ return { value: 0 };
133
+ }
134
+ const UInt64Value = {
135
+ encode(message, writer = new _bufbuild_protobuf_wire.BinaryWriter()) {
136
+ if (message.value !== 0) writer.uint32(8).uint64(message.value);
137
+ return writer;
138
+ },
139
+ decode(input, length) {
140
+ const reader = input instanceof _bufbuild_protobuf_wire.BinaryReader ? input : new _bufbuild_protobuf_wire.BinaryReader(input);
141
+ const end = length === void 0 ? reader.len : reader.pos + length;
142
+ const message = createBaseUInt64Value();
143
+ while (reader.pos < end) {
144
+ const tag = reader.uint32();
145
+ switch (tag >>> 3) {
146
+ case 1:
147
+ if (tag !== 8) break;
148
+ message.value = longToNumber(reader.uint64());
149
+ continue;
150
+ }
151
+ if ((tag & 7) === 4 || tag === 0) break;
152
+ reader.skip(tag & 7);
153
+ }
154
+ return message;
155
+ },
156
+ fromJSON(object) {
157
+ return { value: isSet(object.value) ? globalThis.Number(object.value) : 0 };
158
+ },
159
+ toJSON(message) {
160
+ const obj = {};
161
+ if (message.value !== void 0) obj.value = Math.round(message.value);
162
+ return obj;
163
+ },
164
+ create(base) {
165
+ return UInt64Value.fromPartial(base ?? {});
166
+ },
167
+ fromPartial(object) {
168
+ const message = createBaseUInt64Value();
169
+ message.value = object.value ?? 0;
170
+ return message;
171
+ }
172
+ };
173
+ function createBaseInt32Value() {
174
+ return { value: 0 };
175
+ }
176
+ const Int32Value = {
177
+ encode(message, writer = new _bufbuild_protobuf_wire.BinaryWriter()) {
178
+ if (message.value !== 0) writer.uint32(8).int32(message.value);
179
+ return writer;
180
+ },
181
+ decode(input, length) {
182
+ const reader = input instanceof _bufbuild_protobuf_wire.BinaryReader ? input : new _bufbuild_protobuf_wire.BinaryReader(input);
183
+ const end = length === void 0 ? reader.len : reader.pos + length;
184
+ const message = createBaseInt32Value();
185
+ while (reader.pos < end) {
186
+ const tag = reader.uint32();
187
+ switch (tag >>> 3) {
188
+ case 1:
189
+ if (tag !== 8) break;
190
+ message.value = reader.int32();
191
+ continue;
192
+ }
193
+ if ((tag & 7) === 4 || tag === 0) break;
194
+ reader.skip(tag & 7);
195
+ }
196
+ return message;
197
+ },
198
+ fromJSON(object) {
199
+ return { value: isSet(object.value) ? globalThis.Number(object.value) : 0 };
200
+ },
201
+ toJSON(message) {
202
+ const obj = {};
203
+ if (message.value !== void 0) obj.value = Math.round(message.value);
204
+ return obj;
205
+ },
206
+ create(base) {
207
+ return Int32Value.fromPartial(base ?? {});
208
+ },
209
+ fromPartial(object) {
210
+ const message = createBaseInt32Value();
211
+ message.value = object.value ?? 0;
212
+ return message;
213
+ }
214
+ };
215
+ function createBaseUInt32Value() {
216
+ return { value: 0 };
217
+ }
218
+ const UInt32Value = {
219
+ encode(message, writer = new _bufbuild_protobuf_wire.BinaryWriter()) {
220
+ if (message.value !== 0) writer.uint32(8).uint32(message.value);
221
+ return writer;
222
+ },
223
+ decode(input, length) {
224
+ const reader = input instanceof _bufbuild_protobuf_wire.BinaryReader ? input : new _bufbuild_protobuf_wire.BinaryReader(input);
225
+ const end = length === void 0 ? reader.len : reader.pos + length;
226
+ const message = createBaseUInt32Value();
227
+ while (reader.pos < end) {
228
+ const tag = reader.uint32();
229
+ switch (tag >>> 3) {
230
+ case 1:
231
+ if (tag !== 8) break;
232
+ message.value = reader.uint32();
233
+ continue;
234
+ }
235
+ if ((tag & 7) === 4 || tag === 0) break;
236
+ reader.skip(tag & 7);
237
+ }
238
+ return message;
239
+ },
240
+ fromJSON(object) {
241
+ return { value: isSet(object.value) ? globalThis.Number(object.value) : 0 };
242
+ },
243
+ toJSON(message) {
244
+ const obj = {};
245
+ if (message.value !== void 0) obj.value = Math.round(message.value);
246
+ return obj;
247
+ },
248
+ create(base) {
249
+ return UInt32Value.fromPartial(base ?? {});
250
+ },
251
+ fromPartial(object) {
252
+ const message = createBaseUInt32Value();
253
+ message.value = object.value ?? 0;
254
+ return message;
255
+ }
256
+ };
257
+ function createBaseBoolValue() {
258
+ return { value: false };
259
+ }
260
+ const BoolValue = {
261
+ encode(message, writer = new _bufbuild_protobuf_wire.BinaryWriter()) {
262
+ if (message.value !== false) writer.uint32(8).bool(message.value);
263
+ return writer;
264
+ },
265
+ decode(input, length) {
266
+ const reader = input instanceof _bufbuild_protobuf_wire.BinaryReader ? input : new _bufbuild_protobuf_wire.BinaryReader(input);
267
+ const end = length === void 0 ? reader.len : reader.pos + length;
268
+ const message = createBaseBoolValue();
269
+ while (reader.pos < end) {
270
+ const tag = reader.uint32();
271
+ switch (tag >>> 3) {
272
+ case 1:
273
+ if (tag !== 8) break;
274
+ message.value = reader.bool();
275
+ continue;
276
+ }
277
+ if ((tag & 7) === 4 || tag === 0) break;
278
+ reader.skip(tag & 7);
279
+ }
280
+ return message;
281
+ },
282
+ fromJSON(object) {
283
+ return { value: isSet(object.value) ? globalThis.Boolean(object.value) : false };
284
+ },
285
+ toJSON(message) {
286
+ const obj = {};
287
+ if (message.value !== void 0) obj.value = message.value;
288
+ return obj;
289
+ },
290
+ create(base) {
291
+ return BoolValue.fromPartial(base ?? {});
292
+ },
293
+ fromPartial(object) {
294
+ const message = createBaseBoolValue();
295
+ message.value = object.value ?? false;
296
+ return message;
297
+ }
298
+ };
299
+ function createBaseStringValue() {
300
+ return { value: "" };
301
+ }
302
+ const StringValue = {
303
+ encode(message, writer = new _bufbuild_protobuf_wire.BinaryWriter()) {
304
+ if (message.value !== "") writer.uint32(10).string(message.value);
305
+ return writer;
306
+ },
307
+ decode(input, length) {
308
+ const reader = input instanceof _bufbuild_protobuf_wire.BinaryReader ? input : new _bufbuild_protobuf_wire.BinaryReader(input);
309
+ const end = length === void 0 ? reader.len : reader.pos + length;
310
+ const message = createBaseStringValue();
311
+ while (reader.pos < end) {
312
+ const tag = reader.uint32();
313
+ switch (tag >>> 3) {
314
+ case 1:
315
+ if (tag !== 10) break;
316
+ message.value = reader.string();
317
+ continue;
318
+ }
319
+ if ((tag & 7) === 4 || tag === 0) break;
320
+ reader.skip(tag & 7);
321
+ }
322
+ return message;
323
+ },
324
+ fromJSON(object) {
325
+ return { value: isSet(object.value) ? globalThis.String(object.value) : "" };
326
+ },
327
+ toJSON(message) {
328
+ const obj = {};
329
+ if (message.value !== void 0) obj.value = message.value;
330
+ return obj;
331
+ },
332
+ create(base) {
333
+ return StringValue.fromPartial(base ?? {});
334
+ },
335
+ fromPartial(object) {
336
+ const message = createBaseStringValue();
337
+ message.value = object.value ?? "";
338
+ return message;
339
+ }
340
+ };
341
+ function createBaseBytesValue() {
342
+ return { value: /* @__PURE__ */ new Uint8Array(0) };
343
+ }
344
+ const BytesValue = {
345
+ encode(message, writer = new _bufbuild_protobuf_wire.BinaryWriter()) {
346
+ if (message.value.length !== 0) writer.uint32(10).bytes(message.value);
347
+ return writer;
348
+ },
349
+ decode(input, length) {
350
+ const reader = input instanceof _bufbuild_protobuf_wire.BinaryReader ? input : new _bufbuild_protobuf_wire.BinaryReader(input);
351
+ const end = length === void 0 ? reader.len : reader.pos + length;
352
+ const message = createBaseBytesValue();
353
+ while (reader.pos < end) {
354
+ const tag = reader.uint32();
355
+ switch (tag >>> 3) {
356
+ case 1:
357
+ if (tag !== 10) break;
358
+ message.value = reader.bytes();
359
+ continue;
360
+ }
361
+ if ((tag & 7) === 4 || tag === 0) break;
362
+ reader.skip(tag & 7);
363
+ }
364
+ return message;
365
+ },
366
+ fromJSON(object) {
367
+ return { value: isSet(object.value) ? bytesFromBase64(object.value) : /* @__PURE__ */ new Uint8Array(0) };
368
+ },
369
+ toJSON(message) {
370
+ const obj = {};
371
+ if (message.value !== void 0) obj.value = base64FromBytes(message.value);
372
+ return obj;
373
+ },
374
+ create(base) {
375
+ return BytesValue.fromPartial(base ?? {});
376
+ },
377
+ fromPartial(object) {
378
+ const message = createBaseBytesValue();
379
+ message.value = object.value ?? /* @__PURE__ */ new Uint8Array(0);
380
+ return message;
381
+ }
382
+ };
383
+ function bytesFromBase64(b64) {
384
+ if (globalThis.Buffer) return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
385
+ else {
386
+ const bin = globalThis.atob(b64);
387
+ const arr = new Uint8Array(bin.length);
388
+ for (let i = 0; i < bin.length; ++i) arr[i] = bin.charCodeAt(i);
389
+ return arr;
390
+ }
391
+ }
392
+ function base64FromBytes(arr) {
393
+ if (globalThis.Buffer) return globalThis.Buffer.from(arr).toString("base64");
394
+ else {
395
+ const bin = [];
396
+ arr.forEach((byte) => {
397
+ bin.push(globalThis.String.fromCharCode(byte));
398
+ });
399
+ return globalThis.btoa(bin.join(""));
400
+ }
401
+ }
402
+ function longToNumber(int64) {
403
+ const num = globalThis.Number(int64.toString());
404
+ if (num > globalThis.Number.MAX_SAFE_INTEGER) throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
405
+ if (num < globalThis.Number.MIN_SAFE_INTEGER) throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");
406
+ return num;
407
+ }
408
+ function isSet(value) {
409
+ return value !== null && value !== void 0;
410
+ }
411
+ //#endregion
412
+ exports.BoolValue = BoolValue;
413
+ exports.BytesValue = BytesValue;
414
+ exports.DoubleValue = DoubleValue;
415
+ exports.FloatValue = FloatValue;
416
+ exports.Int32Value = Int32Value;
417
+ exports.Int64Value = Int64Value;
418
+ exports.StringValue = StringValue;
419
+ exports.UInt32Value = UInt32Value;
420
+ exports.UInt64Value = UInt64Value;
421
+ exports.protobufPackage = protobufPackage;
@@ -0,0 +1,134 @@
1
+ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
2
+ //#region src/energy_device/google/protobuf/wrappers.d.ts
3
+ declare const protobufPackage = "google.protobuf";
4
+ /**
5
+ * Wrapper message for `double`.
6
+ *
7
+ * The JSON representation for `DoubleValue` is JSON number.
8
+ *
9
+ * Not recommended for use in new APIs, but still useful for legacy APIs and
10
+ * has no plan to be removed.
11
+ */
12
+ interface DoubleValue {
13
+ /** The double value. */
14
+ value: number;
15
+ }
16
+ /**
17
+ * Wrapper message for `float`.
18
+ *
19
+ * The JSON representation for `FloatValue` is JSON number.
20
+ *
21
+ * Not recommended for use in new APIs, but still useful for legacy APIs and
22
+ * has no plan to be removed.
23
+ */
24
+ interface FloatValue {
25
+ /** The float value. */
26
+ value: number;
27
+ }
28
+ /**
29
+ * Wrapper message for `int64`.
30
+ *
31
+ * The JSON representation for `Int64Value` is JSON string.
32
+ *
33
+ * Not recommended for use in new APIs, but still useful for legacy APIs and
34
+ * has no plan to be removed.
35
+ */
36
+ interface Int64Value {
37
+ /** The int64 value. */
38
+ value: number;
39
+ }
40
+ /**
41
+ * Wrapper message for `uint64`.
42
+ *
43
+ * The JSON representation for `UInt64Value` is JSON string.
44
+ *
45
+ * Not recommended for use in new APIs, but still useful for legacy APIs and
46
+ * has no plan to be removed.
47
+ */
48
+ interface UInt64Value {
49
+ /** The uint64 value. */
50
+ value: number;
51
+ }
52
+ /**
53
+ * Wrapper message for `int32`.
54
+ *
55
+ * The JSON representation for `Int32Value` is JSON number.
56
+ *
57
+ * Not recommended for use in new APIs, but still useful for legacy APIs and
58
+ * has no plan to be removed.
59
+ */
60
+ interface Int32Value {
61
+ /** The int32 value. */
62
+ value: number;
63
+ }
64
+ /**
65
+ * Wrapper message for `uint32`.
66
+ *
67
+ * The JSON representation for `UInt32Value` is JSON number.
68
+ *
69
+ * Not recommended for use in new APIs, but still useful for legacy APIs and
70
+ * has no plan to be removed.
71
+ */
72
+ interface UInt32Value {
73
+ /** The uint32 value. */
74
+ value: number;
75
+ }
76
+ /**
77
+ * Wrapper message for `bool`.
78
+ *
79
+ * The JSON representation for `BoolValue` is JSON `true` and `false`.
80
+ *
81
+ * Not recommended for use in new APIs, but still useful for legacy APIs and
82
+ * has no plan to be removed.
83
+ */
84
+ interface BoolValue {
85
+ /** The bool value. */
86
+ value: boolean;
87
+ }
88
+ /**
89
+ * Wrapper message for `string`.
90
+ *
91
+ * The JSON representation for `StringValue` is JSON string.
92
+ *
93
+ * Not recommended for use in new APIs, but still useful for legacy APIs and
94
+ * has no plan to be removed.
95
+ */
96
+ interface StringValue {
97
+ /** The string value. */
98
+ value: string;
99
+ }
100
+ /**
101
+ * Wrapper message for `bytes`.
102
+ *
103
+ * The JSON representation for `BytesValue` is JSON string.
104
+ *
105
+ * Not recommended for use in new APIs, but still useful for legacy APIs and
106
+ * has no plan to be removed.
107
+ */
108
+ interface BytesValue {
109
+ /** The bytes value. */
110
+ value: Uint8Array;
111
+ }
112
+ declare const DoubleValue: MessageFns<DoubleValue>;
113
+ declare const FloatValue: MessageFns<FloatValue>;
114
+ declare const Int64Value: MessageFns<Int64Value>;
115
+ declare const UInt64Value: MessageFns<UInt64Value>;
116
+ declare const Int32Value: MessageFns<Int32Value>;
117
+ declare const UInt32Value: MessageFns<UInt32Value>;
118
+ declare const BoolValue: MessageFns<BoolValue>;
119
+ declare const StringValue: MessageFns<StringValue>;
120
+ declare const BytesValue: MessageFns<BytesValue>;
121
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
122
+ type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? { [K in keyof T]?: DeepPartial<T[K]>; } : Partial<T>;
123
+ type KeysOfUnion<T> = T extends T ? keyof T : never;
124
+ type Exact<P, I extends P> = P extends Builtin ? P : P & { [K in keyof P]: Exact<P[K], I[K]>; } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never; };
125
+ interface MessageFns<T> {
126
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
127
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
128
+ fromJSON(object: any): T;
129
+ toJSON(message: T): unknown;
130
+ create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
131
+ fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
132
+ }
133
+ //#endregion
134
+ export { BoolValue, BytesValue, DeepPartial, DoubleValue, Exact, FloatValue, Int32Value, Int64Value, MessageFns, StringValue, UInt32Value, UInt64Value, protobufPackage };
@@ -0,0 +1,134 @@
1
+ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
2
+ //#region src/energy_device/google/protobuf/wrappers.d.ts
3
+ declare const protobufPackage = "google.protobuf";
4
+ /**
5
+ * Wrapper message for `double`.
6
+ *
7
+ * The JSON representation for `DoubleValue` is JSON number.
8
+ *
9
+ * Not recommended for use in new APIs, but still useful for legacy APIs and
10
+ * has no plan to be removed.
11
+ */
12
+ interface DoubleValue {
13
+ /** The double value. */
14
+ value: number;
15
+ }
16
+ /**
17
+ * Wrapper message for `float`.
18
+ *
19
+ * The JSON representation for `FloatValue` is JSON number.
20
+ *
21
+ * Not recommended for use in new APIs, but still useful for legacy APIs and
22
+ * has no plan to be removed.
23
+ */
24
+ interface FloatValue {
25
+ /** The float value. */
26
+ value: number;
27
+ }
28
+ /**
29
+ * Wrapper message for `int64`.
30
+ *
31
+ * The JSON representation for `Int64Value` is JSON string.
32
+ *
33
+ * Not recommended for use in new APIs, but still useful for legacy APIs and
34
+ * has no plan to be removed.
35
+ */
36
+ interface Int64Value {
37
+ /** The int64 value. */
38
+ value: number;
39
+ }
40
+ /**
41
+ * Wrapper message for `uint64`.
42
+ *
43
+ * The JSON representation for `UInt64Value` is JSON string.
44
+ *
45
+ * Not recommended for use in new APIs, but still useful for legacy APIs and
46
+ * has no plan to be removed.
47
+ */
48
+ interface UInt64Value {
49
+ /** The uint64 value. */
50
+ value: number;
51
+ }
52
+ /**
53
+ * Wrapper message for `int32`.
54
+ *
55
+ * The JSON representation for `Int32Value` is JSON number.
56
+ *
57
+ * Not recommended for use in new APIs, but still useful for legacy APIs and
58
+ * has no plan to be removed.
59
+ */
60
+ interface Int32Value {
61
+ /** The int32 value. */
62
+ value: number;
63
+ }
64
+ /**
65
+ * Wrapper message for `uint32`.
66
+ *
67
+ * The JSON representation for `UInt32Value` is JSON number.
68
+ *
69
+ * Not recommended for use in new APIs, but still useful for legacy APIs and
70
+ * has no plan to be removed.
71
+ */
72
+ interface UInt32Value {
73
+ /** The uint32 value. */
74
+ value: number;
75
+ }
76
+ /**
77
+ * Wrapper message for `bool`.
78
+ *
79
+ * The JSON representation for `BoolValue` is JSON `true` and `false`.
80
+ *
81
+ * Not recommended for use in new APIs, but still useful for legacy APIs and
82
+ * has no plan to be removed.
83
+ */
84
+ interface BoolValue {
85
+ /** The bool value. */
86
+ value: boolean;
87
+ }
88
+ /**
89
+ * Wrapper message for `string`.
90
+ *
91
+ * The JSON representation for `StringValue` is JSON string.
92
+ *
93
+ * Not recommended for use in new APIs, but still useful for legacy APIs and
94
+ * has no plan to be removed.
95
+ */
96
+ interface StringValue {
97
+ /** The string value. */
98
+ value: string;
99
+ }
100
+ /**
101
+ * Wrapper message for `bytes`.
102
+ *
103
+ * The JSON representation for `BytesValue` is JSON string.
104
+ *
105
+ * Not recommended for use in new APIs, but still useful for legacy APIs and
106
+ * has no plan to be removed.
107
+ */
108
+ interface BytesValue {
109
+ /** The bytes value. */
110
+ value: Uint8Array;
111
+ }
112
+ declare const DoubleValue: MessageFns<DoubleValue>;
113
+ declare const FloatValue: MessageFns<FloatValue>;
114
+ declare const Int64Value: MessageFns<Int64Value>;
115
+ declare const UInt64Value: MessageFns<UInt64Value>;
116
+ declare const Int32Value: MessageFns<Int32Value>;
117
+ declare const UInt32Value: MessageFns<UInt32Value>;
118
+ declare const BoolValue: MessageFns<BoolValue>;
119
+ declare const StringValue: MessageFns<StringValue>;
120
+ declare const BytesValue: MessageFns<BytesValue>;
121
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
122
+ type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? { [K in keyof T]?: DeepPartial<T[K]>; } : Partial<T>;
123
+ type KeysOfUnion<T> = T extends T ? keyof T : never;
124
+ type Exact<P, I extends P> = P extends Builtin ? P : P & { [K in keyof P]: Exact<P[K], I[K]>; } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never; };
125
+ interface MessageFns<T> {
126
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
127
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
128
+ fromJSON(object: any): T;
129
+ toJSON(message: T): unknown;
130
+ create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
131
+ fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
132
+ }
133
+ //#endregion
134
+ export { BoolValue, BytesValue, DeepPartial, DoubleValue, Exact, FloatValue, Int32Value, Int64Value, MessageFns, StringValue, UInt32Value, UInt64Value, protobufPackage };