@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,801 @@
1
+ import { Timestamp } from "./google/protobuf/timestamp.mjs";
2
+ import { AuthorizationRecord, authorizationRoleFromJSON, authorizationRoleToJSON, authorizedClientTypeFromJSON, authorizedClientTypeToJSON, authorizedKeyTypeFromJSON, authorizedKeyTypeToJSON } from "./authorization_types.mjs";
3
+ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
4
+ //#region src/energy_device/authorization_api.ts
5
+ const protobufPackage = "tesla.proto.energy_device.v1";
6
+ function createBaseAuthorizationAPIAddAuthorizedClientRequest() {
7
+ return {
8
+ type: 0,
9
+ description: "",
10
+ keyType: 0,
11
+ publicKey: /* @__PURE__ */ new Uint8Array(0)
12
+ };
13
+ }
14
+ const AuthorizationAPIAddAuthorizedClientRequest = {
15
+ encode(message, writer = new BinaryWriter()) {
16
+ if (message.type !== 0) writer.uint32(8).int32(message.type);
17
+ if (message.description !== "") writer.uint32(18).string(message.description);
18
+ if (message.keyType !== 0) writer.uint32(24).int32(message.keyType);
19
+ if (message.publicKey.length !== 0) writer.uint32(34).bytes(message.publicKey);
20
+ return writer;
21
+ },
22
+ decode(input, length) {
23
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
24
+ const end = length === void 0 ? reader.len : reader.pos + length;
25
+ const message = createBaseAuthorizationAPIAddAuthorizedClientRequest();
26
+ while (reader.pos < end) {
27
+ const tag = reader.uint32();
28
+ switch (tag >>> 3) {
29
+ case 1:
30
+ if (tag !== 8) break;
31
+ message.type = reader.int32();
32
+ continue;
33
+ case 2:
34
+ if (tag !== 18) break;
35
+ message.description = reader.string();
36
+ continue;
37
+ case 3:
38
+ if (tag !== 24) break;
39
+ message.keyType = reader.int32();
40
+ continue;
41
+ case 4:
42
+ if (tag !== 34) break;
43
+ message.publicKey = reader.bytes();
44
+ continue;
45
+ }
46
+ if ((tag & 7) === 4 || tag === 0) break;
47
+ reader.skip(tag & 7);
48
+ }
49
+ return message;
50
+ },
51
+ fromJSON(object) {
52
+ return {
53
+ type: isSet(object.type) ? authorizedClientTypeFromJSON(object.type) : 0,
54
+ description: isSet(object.description) ? globalThis.String(object.description) : "",
55
+ keyType: isSet(object.keyType) ? authorizedKeyTypeFromJSON(object.keyType) : 0,
56
+ publicKey: isSet(object.publicKey) ? bytesFromBase64(object.publicKey) : /* @__PURE__ */ new Uint8Array(0)
57
+ };
58
+ },
59
+ toJSON(message) {
60
+ const obj = {};
61
+ if (message.type !== void 0) obj.type = authorizedClientTypeToJSON(message.type);
62
+ if (message.description !== void 0) obj.description = message.description;
63
+ if (message.keyType !== void 0) obj.keyType = authorizedKeyTypeToJSON(message.keyType);
64
+ if (message.publicKey !== void 0) obj.publicKey = base64FromBytes(message.publicKey);
65
+ return obj;
66
+ },
67
+ create(base) {
68
+ return AuthorizationAPIAddAuthorizedClientRequest.fromPartial(base ?? {});
69
+ },
70
+ fromPartial(object) {
71
+ const message = createBaseAuthorizationAPIAddAuthorizedClientRequest();
72
+ message.type = object.type ?? 0;
73
+ message.description = object.description ?? "";
74
+ message.keyType = object.keyType ?? 0;
75
+ message.publicKey = object.publicKey ?? /* @__PURE__ */ new Uint8Array(0);
76
+ return message;
77
+ }
78
+ };
79
+ function createBaseAuthorizationAPIAddAuthorizedClientResponse() {
80
+ return { client: void 0 };
81
+ }
82
+ const AuthorizationAPIAddAuthorizedClientResponse = {
83
+ encode(message, writer = new BinaryWriter()) {
84
+ if (message.client !== void 0) AuthorizationRecord.encode(message.client, writer.uint32(10).fork()).join();
85
+ return writer;
86
+ },
87
+ decode(input, length) {
88
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
89
+ const end = length === void 0 ? reader.len : reader.pos + length;
90
+ const message = createBaseAuthorizationAPIAddAuthorizedClientResponse();
91
+ while (reader.pos < end) {
92
+ const tag = reader.uint32();
93
+ switch (tag >>> 3) {
94
+ case 1:
95
+ if (tag !== 10) break;
96
+ message.client = AuthorizationRecord.decode(reader, reader.uint32());
97
+ continue;
98
+ }
99
+ if ((tag & 7) === 4 || tag === 0) break;
100
+ reader.skip(tag & 7);
101
+ }
102
+ return message;
103
+ },
104
+ fromJSON(object) {
105
+ return { client: isSet(object.client) ? AuthorizationRecord.fromJSON(object.client) : void 0 };
106
+ },
107
+ toJSON(message) {
108
+ const obj = {};
109
+ if (message.client !== void 0) obj.client = AuthorizationRecord.toJSON(message.client);
110
+ return obj;
111
+ },
112
+ create(base) {
113
+ return AuthorizationAPIAddAuthorizedClientResponse.fromPartial(base ?? {});
114
+ },
115
+ fromPartial(object) {
116
+ const message = createBaseAuthorizationAPIAddAuthorizedClientResponse();
117
+ message.client = object.client !== void 0 && object.client !== null ? AuthorizationRecord.fromPartial(object.client) : void 0;
118
+ return message;
119
+ }
120
+ };
121
+ function createBaseAuthorizationAPIAddAuthorizedClientByTrustedSignatureRequest() {
122
+ return {
123
+ type: 0,
124
+ description: "",
125
+ keyType: 0,
126
+ publicKey: /* @__PURE__ */ new Uint8Array(0),
127
+ roles: [],
128
+ identifier: ""
129
+ };
130
+ }
131
+ const AuthorizationAPIAddAuthorizedClientByTrustedSignatureRequest = {
132
+ encode(message, writer = new BinaryWriter()) {
133
+ if (message.type !== 0) writer.uint32(8).int32(message.type);
134
+ if (message.description !== "") writer.uint32(18).string(message.description);
135
+ if (message.keyType !== 0) writer.uint32(24).int32(message.keyType);
136
+ if (message.publicKey.length !== 0) writer.uint32(34).bytes(message.publicKey);
137
+ writer.uint32(42).fork();
138
+ for (const v of message.roles) writer.int32(v);
139
+ writer.join();
140
+ if (message.identifier !== "") writer.uint32(50).string(message.identifier);
141
+ return writer;
142
+ },
143
+ decode(input, length) {
144
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
145
+ const end = length === void 0 ? reader.len : reader.pos + length;
146
+ const message = createBaseAuthorizationAPIAddAuthorizedClientByTrustedSignatureRequest();
147
+ while (reader.pos < end) {
148
+ const tag = reader.uint32();
149
+ switch (tag >>> 3) {
150
+ case 1:
151
+ if (tag !== 8) break;
152
+ message.type = reader.int32();
153
+ continue;
154
+ case 2:
155
+ if (tag !== 18) break;
156
+ message.description = reader.string();
157
+ continue;
158
+ case 3:
159
+ if (tag !== 24) break;
160
+ message.keyType = reader.int32();
161
+ continue;
162
+ case 4:
163
+ if (tag !== 34) break;
164
+ message.publicKey = reader.bytes();
165
+ continue;
166
+ case 5:
167
+ if (tag === 40) {
168
+ message.roles.push(reader.int32());
169
+ continue;
170
+ }
171
+ if (tag === 42) {
172
+ const end2 = reader.uint32() + reader.pos;
173
+ while (reader.pos < end2) message.roles.push(reader.int32());
174
+ continue;
175
+ }
176
+ break;
177
+ case 6:
178
+ if (tag !== 50) break;
179
+ message.identifier = reader.string();
180
+ continue;
181
+ }
182
+ if ((tag & 7) === 4 || tag === 0) break;
183
+ reader.skip(tag & 7);
184
+ }
185
+ return message;
186
+ },
187
+ fromJSON(object) {
188
+ return {
189
+ type: isSet(object.type) ? authorizedClientTypeFromJSON(object.type) : 0,
190
+ description: isSet(object.description) ? globalThis.String(object.description) : "",
191
+ keyType: isSet(object.keyType) ? authorizedKeyTypeFromJSON(object.keyType) : 0,
192
+ publicKey: isSet(object.publicKey) ? bytesFromBase64(object.publicKey) : /* @__PURE__ */ new Uint8Array(0),
193
+ roles: globalThis.Array.isArray(object?.roles) ? object.roles.map((e) => authorizationRoleFromJSON(e)) : [],
194
+ identifier: isSet(object.identifier) ? globalThis.String(object.identifier) : ""
195
+ };
196
+ },
197
+ toJSON(message) {
198
+ const obj = {};
199
+ if (message.type !== void 0) obj.type = authorizedClientTypeToJSON(message.type);
200
+ if (message.description !== void 0) obj.description = message.description;
201
+ if (message.keyType !== void 0) obj.keyType = authorizedKeyTypeToJSON(message.keyType);
202
+ if (message.publicKey !== void 0) obj.publicKey = base64FromBytes(message.publicKey);
203
+ if (message.roles?.length) obj.roles = message.roles.map((e) => authorizationRoleToJSON(e));
204
+ if (message.identifier !== void 0) obj.identifier = message.identifier;
205
+ return obj;
206
+ },
207
+ create(base) {
208
+ return AuthorizationAPIAddAuthorizedClientByTrustedSignatureRequest.fromPartial(base ?? {});
209
+ },
210
+ fromPartial(object) {
211
+ const message = createBaseAuthorizationAPIAddAuthorizedClientByTrustedSignatureRequest();
212
+ message.type = object.type ?? 0;
213
+ message.description = object.description ?? "";
214
+ message.keyType = object.keyType ?? 0;
215
+ message.publicKey = object.publicKey ?? /* @__PURE__ */ new Uint8Array(0);
216
+ message.roles = object.roles?.map((e) => e) || [];
217
+ message.identifier = object.identifier ?? "";
218
+ return message;
219
+ }
220
+ };
221
+ function createBaseAuthorizationAPIAddAuthorizedClientByTrustedSignatureResponse() {
222
+ return { client: void 0 };
223
+ }
224
+ const AuthorizationAPIAddAuthorizedClientByTrustedSignatureResponse = {
225
+ encode(message, writer = new BinaryWriter()) {
226
+ if (message.client !== void 0) AuthorizationRecord.encode(message.client, writer.uint32(10).fork()).join();
227
+ return writer;
228
+ },
229
+ decode(input, length) {
230
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
231
+ const end = length === void 0 ? reader.len : reader.pos + length;
232
+ const message = createBaseAuthorizationAPIAddAuthorizedClientByTrustedSignatureResponse();
233
+ while (reader.pos < end) {
234
+ const tag = reader.uint32();
235
+ switch (tag >>> 3) {
236
+ case 1:
237
+ if (tag !== 10) break;
238
+ message.client = AuthorizationRecord.decode(reader, reader.uint32());
239
+ continue;
240
+ }
241
+ if ((tag & 7) === 4 || tag === 0) break;
242
+ reader.skip(tag & 7);
243
+ }
244
+ return message;
245
+ },
246
+ fromJSON(object) {
247
+ return { client: isSet(object.client) ? AuthorizationRecord.fromJSON(object.client) : void 0 };
248
+ },
249
+ toJSON(message) {
250
+ const obj = {};
251
+ if (message.client !== void 0) obj.client = AuthorizationRecord.toJSON(message.client);
252
+ return obj;
253
+ },
254
+ create(base) {
255
+ return AuthorizationAPIAddAuthorizedClientByTrustedSignatureResponse.fromPartial(base ?? {});
256
+ },
257
+ fromPartial(object) {
258
+ const message = createBaseAuthorizationAPIAddAuthorizedClientByTrustedSignatureResponse();
259
+ message.client = object.client !== void 0 && object.client !== null ? AuthorizationRecord.fromPartial(object.client) : void 0;
260
+ return message;
261
+ }
262
+ };
263
+ function createBaseAuthorizationAPIRemoveAuthorizedClientRequest() {
264
+ return { publicKey: /* @__PURE__ */ new Uint8Array(0) };
265
+ }
266
+ const AuthorizationAPIRemoveAuthorizedClientRequest = {
267
+ encode(message, writer = new BinaryWriter()) {
268
+ if (message.publicKey.length !== 0) writer.uint32(10).bytes(message.publicKey);
269
+ return writer;
270
+ },
271
+ decode(input, length) {
272
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
273
+ const end = length === void 0 ? reader.len : reader.pos + length;
274
+ const message = createBaseAuthorizationAPIRemoveAuthorizedClientRequest();
275
+ while (reader.pos < end) {
276
+ const tag = reader.uint32();
277
+ switch (tag >>> 3) {
278
+ case 1:
279
+ if (tag !== 10) break;
280
+ message.publicKey = reader.bytes();
281
+ continue;
282
+ }
283
+ if ((tag & 7) === 4 || tag === 0) break;
284
+ reader.skip(tag & 7);
285
+ }
286
+ return message;
287
+ },
288
+ fromJSON(object) {
289
+ return { publicKey: isSet(object.publicKey) ? bytesFromBase64(object.publicKey) : /* @__PURE__ */ new Uint8Array(0) };
290
+ },
291
+ toJSON(message) {
292
+ const obj = {};
293
+ if (message.publicKey !== void 0) obj.publicKey = base64FromBytes(message.publicKey);
294
+ return obj;
295
+ },
296
+ create(base) {
297
+ return AuthorizationAPIRemoveAuthorizedClientRequest.fromPartial(base ?? {});
298
+ },
299
+ fromPartial(object) {
300
+ const message = createBaseAuthorizationAPIRemoveAuthorizedClientRequest();
301
+ message.publicKey = object.publicKey ?? /* @__PURE__ */ new Uint8Array(0);
302
+ return message;
303
+ }
304
+ };
305
+ function createBaseAuthorizationAPIRemoveAuthorizedClientResponse() {
306
+ return {};
307
+ }
308
+ const AuthorizationAPIRemoveAuthorizedClientResponse = {
309
+ encode(_, writer = new BinaryWriter()) {
310
+ return writer;
311
+ },
312
+ decode(input, length) {
313
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
314
+ const end = length === void 0 ? reader.len : reader.pos + length;
315
+ const message = createBaseAuthorizationAPIRemoveAuthorizedClientResponse();
316
+ while (reader.pos < end) {
317
+ const tag = reader.uint32();
318
+ switch (tag >>> 3) {}
319
+ if ((tag & 7) === 4 || tag === 0) break;
320
+ reader.skip(tag & 7);
321
+ }
322
+ return message;
323
+ },
324
+ fromJSON(_) {
325
+ return {};
326
+ },
327
+ toJSON(_) {
328
+ return {};
329
+ },
330
+ create(base) {
331
+ return AuthorizationAPIRemoveAuthorizedClientResponse.fromPartial(base ?? {});
332
+ },
333
+ fromPartial(_) {
334
+ return createBaseAuthorizationAPIRemoveAuthorizedClientResponse();
335
+ }
336
+ };
337
+ function createBaseAuthorizationAPIListAuthorizedClientsRequest() {
338
+ return {};
339
+ }
340
+ const AuthorizationAPIListAuthorizedClientsRequest = {
341
+ encode(_, writer = new BinaryWriter()) {
342
+ return writer;
343
+ },
344
+ decode(input, length) {
345
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
346
+ const end = length === void 0 ? reader.len : reader.pos + length;
347
+ const message = createBaseAuthorizationAPIListAuthorizedClientsRequest();
348
+ while (reader.pos < end) {
349
+ const tag = reader.uint32();
350
+ switch (tag >>> 3) {}
351
+ if ((tag & 7) === 4 || tag === 0) break;
352
+ reader.skip(tag & 7);
353
+ }
354
+ return message;
355
+ },
356
+ fromJSON(_) {
357
+ return {};
358
+ },
359
+ toJSON(_) {
360
+ return {};
361
+ },
362
+ create(base) {
363
+ return AuthorizationAPIListAuthorizedClientsRequest.fromPartial(base ?? {});
364
+ },
365
+ fromPartial(_) {
366
+ return createBaseAuthorizationAPIListAuthorizedClientsRequest();
367
+ }
368
+ };
369
+ function createBaseAuthorizationAPIListAuthorizedClientsResponse() {
370
+ return {
371
+ clients: [],
372
+ enableLineSwitchOff: false
373
+ };
374
+ }
375
+ const AuthorizationAPIListAuthorizedClientsResponse = {
376
+ encode(message, writer = new BinaryWriter()) {
377
+ for (const v of message.clients) AuthorizationRecord.encode(v, writer.uint32(10).fork()).join();
378
+ if (message.enableLineSwitchOff !== false) writer.uint32(16).bool(message.enableLineSwitchOff);
379
+ return writer;
380
+ },
381
+ decode(input, length) {
382
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
383
+ const end = length === void 0 ? reader.len : reader.pos + length;
384
+ const message = createBaseAuthorizationAPIListAuthorizedClientsResponse();
385
+ while (reader.pos < end) {
386
+ const tag = reader.uint32();
387
+ switch (tag >>> 3) {
388
+ case 1:
389
+ if (tag !== 10) break;
390
+ message.clients.push(AuthorizationRecord.decode(reader, reader.uint32()));
391
+ continue;
392
+ case 2:
393
+ if (tag !== 16) break;
394
+ message.enableLineSwitchOff = reader.bool();
395
+ continue;
396
+ }
397
+ if ((tag & 7) === 4 || tag === 0) break;
398
+ reader.skip(tag & 7);
399
+ }
400
+ return message;
401
+ },
402
+ fromJSON(object) {
403
+ return {
404
+ clients: globalThis.Array.isArray(object?.clients) ? object.clients.map((e) => AuthorizationRecord.fromJSON(e)) : [],
405
+ enableLineSwitchOff: isSet(object.enableLineSwitchOff) ? globalThis.Boolean(object.enableLineSwitchOff) : false
406
+ };
407
+ },
408
+ toJSON(message) {
409
+ const obj = {};
410
+ if (message.clients?.length) obj.clients = message.clients.map((e) => AuthorizationRecord.toJSON(e));
411
+ if (message.enableLineSwitchOff !== void 0) obj.enableLineSwitchOff = message.enableLineSwitchOff;
412
+ return obj;
413
+ },
414
+ create(base) {
415
+ return AuthorizationAPIListAuthorizedClientsResponse.fromPartial(base ?? {});
416
+ },
417
+ fromPartial(object) {
418
+ const message = createBaseAuthorizationAPIListAuthorizedClientsResponse();
419
+ message.clients = object.clients?.map((e) => AuthorizationRecord.fromPartial(e)) || [];
420
+ message.enableLineSwitchOff = object.enableLineSwitchOff ?? false;
421
+ return message;
422
+ }
423
+ };
424
+ function createBaseAuthorizationAPIGetSignedCommandsPublicKeyRequest() {
425
+ return {};
426
+ }
427
+ const AuthorizationAPIGetSignedCommandsPublicKeyRequest = {
428
+ encode(_, writer = new BinaryWriter()) {
429
+ return writer;
430
+ },
431
+ decode(input, length) {
432
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
433
+ const end = length === void 0 ? reader.len : reader.pos + length;
434
+ const message = createBaseAuthorizationAPIGetSignedCommandsPublicKeyRequest();
435
+ while (reader.pos < end) {
436
+ const tag = reader.uint32();
437
+ switch (tag >>> 3) {}
438
+ if ((tag & 7) === 4 || tag === 0) break;
439
+ reader.skip(tag & 7);
440
+ }
441
+ return message;
442
+ },
443
+ fromJSON(_) {
444
+ return {};
445
+ },
446
+ toJSON(_) {
447
+ return {};
448
+ },
449
+ create(base) {
450
+ return AuthorizationAPIGetSignedCommandsPublicKeyRequest.fromPartial(base ?? {});
451
+ },
452
+ fromPartial(_) {
453
+ return createBaseAuthorizationAPIGetSignedCommandsPublicKeyRequest();
454
+ }
455
+ };
456
+ function createBaseAuthorizationAPIGetSignedCommandsPublicKeyResponse() {
457
+ return { pubKeyEcc: /* @__PURE__ */ new Uint8Array(0) };
458
+ }
459
+ const AuthorizationAPIGetSignedCommandsPublicKeyResponse = {
460
+ encode(message, writer = new BinaryWriter()) {
461
+ if (message.pubKeyEcc.length !== 0) writer.uint32(10).bytes(message.pubKeyEcc);
462
+ return writer;
463
+ },
464
+ decode(input, length) {
465
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
466
+ const end = length === void 0 ? reader.len : reader.pos + length;
467
+ const message = createBaseAuthorizationAPIGetSignedCommandsPublicKeyResponse();
468
+ while (reader.pos < end) {
469
+ const tag = reader.uint32();
470
+ switch (tag >>> 3) {
471
+ case 1:
472
+ if (tag !== 10) break;
473
+ message.pubKeyEcc = reader.bytes();
474
+ continue;
475
+ }
476
+ if ((tag & 7) === 4 || tag === 0) break;
477
+ reader.skip(tag & 7);
478
+ }
479
+ return message;
480
+ },
481
+ fromJSON(object) {
482
+ return { pubKeyEcc: isSet(object.pubKeyEcc) ? bytesFromBase64(object.pubKeyEcc) : /* @__PURE__ */ new Uint8Array(0) };
483
+ },
484
+ toJSON(message) {
485
+ const obj = {};
486
+ if (message.pubKeyEcc !== void 0) obj.pubKeyEcc = base64FromBytes(message.pubKeyEcc);
487
+ return obj;
488
+ },
489
+ create(base) {
490
+ return AuthorizationAPIGetSignedCommandsPublicKeyResponse.fromPartial(base ?? {});
491
+ },
492
+ fromPartial(object) {
493
+ const message = createBaseAuthorizationAPIGetSignedCommandsPublicKeyResponse();
494
+ message.pubKeyEcc = object.pubKeyEcc ?? /* @__PURE__ */ new Uint8Array(0);
495
+ return message;
496
+ }
497
+ };
498
+ function createBaseAuthorizationAPIConfigureRemoteServiceRequest() {
499
+ return {
500
+ durationSeconds: 0,
501
+ sessionId: "",
502
+ requesterEmail: ""
503
+ };
504
+ }
505
+ const AuthorizationAPIConfigureRemoteServiceRequest = {
506
+ encode(message, writer = new BinaryWriter()) {
507
+ if (message.durationSeconds !== 0) writer.uint32(8).uint32(message.durationSeconds);
508
+ if (message.sessionId !== "") writer.uint32(18).string(message.sessionId);
509
+ if (message.requesterEmail !== "") writer.uint32(26).string(message.requesterEmail);
510
+ return writer;
511
+ },
512
+ decode(input, length) {
513
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
514
+ const end = length === void 0 ? reader.len : reader.pos + length;
515
+ const message = createBaseAuthorizationAPIConfigureRemoteServiceRequest();
516
+ while (reader.pos < end) {
517
+ const tag = reader.uint32();
518
+ switch (tag >>> 3) {
519
+ case 1:
520
+ if (tag !== 8) break;
521
+ message.durationSeconds = reader.uint32();
522
+ continue;
523
+ case 2:
524
+ if (tag !== 18) break;
525
+ message.sessionId = reader.string();
526
+ continue;
527
+ case 3:
528
+ if (tag !== 26) break;
529
+ message.requesterEmail = reader.string();
530
+ continue;
531
+ }
532
+ if ((tag & 7) === 4 || tag === 0) break;
533
+ reader.skip(tag & 7);
534
+ }
535
+ return message;
536
+ },
537
+ fromJSON(object) {
538
+ return {
539
+ durationSeconds: isSet(object.durationSeconds) ? globalThis.Number(object.durationSeconds) : 0,
540
+ sessionId: isSet(object.sessionId) ? globalThis.String(object.sessionId) : "",
541
+ requesterEmail: isSet(object.requesterEmail) ? globalThis.String(object.requesterEmail) : ""
542
+ };
543
+ },
544
+ toJSON(message) {
545
+ const obj = {};
546
+ if (message.durationSeconds !== void 0) obj.durationSeconds = Math.round(message.durationSeconds);
547
+ if (message.sessionId !== void 0) obj.sessionId = message.sessionId;
548
+ if (message.requesterEmail !== void 0) obj.requesterEmail = message.requesterEmail;
549
+ return obj;
550
+ },
551
+ create(base) {
552
+ return AuthorizationAPIConfigureRemoteServiceRequest.fromPartial(base ?? {});
553
+ },
554
+ fromPartial(object) {
555
+ const message = createBaseAuthorizationAPIConfigureRemoteServiceRequest();
556
+ message.durationSeconds = object.durationSeconds ?? 0;
557
+ message.sessionId = object.sessionId ?? "";
558
+ message.requesterEmail = object.requesterEmail ?? "";
559
+ return message;
560
+ }
561
+ };
562
+ function createBaseAuthorizationAPIConfigureRemoteServiceResponse() {
563
+ return {
564
+ beginTime: void 0,
565
+ expiryTime: void 0
566
+ };
567
+ }
568
+ const AuthorizationAPIConfigureRemoteServiceResponse = {
569
+ encode(message, writer = new BinaryWriter()) {
570
+ if (message.beginTime !== void 0) Timestamp.encode(toTimestamp(message.beginTime), writer.uint32(10).fork()).join();
571
+ if (message.expiryTime !== void 0) Timestamp.encode(toTimestamp(message.expiryTime), writer.uint32(18).fork()).join();
572
+ return writer;
573
+ },
574
+ decode(input, length) {
575
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
576
+ const end = length === void 0 ? reader.len : reader.pos + length;
577
+ const message = createBaseAuthorizationAPIConfigureRemoteServiceResponse();
578
+ while (reader.pos < end) {
579
+ const tag = reader.uint32();
580
+ switch (tag >>> 3) {
581
+ case 1:
582
+ if (tag !== 10) break;
583
+ message.beginTime = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
584
+ continue;
585
+ case 2:
586
+ if (tag !== 18) break;
587
+ message.expiryTime = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
588
+ continue;
589
+ }
590
+ if ((tag & 7) === 4 || tag === 0) break;
591
+ reader.skip(tag & 7);
592
+ }
593
+ return message;
594
+ },
595
+ fromJSON(object) {
596
+ return {
597
+ beginTime: isSet(object.beginTime) ? fromJsonTimestamp(object.beginTime) : void 0,
598
+ expiryTime: isSet(object.expiryTime) ? fromJsonTimestamp(object.expiryTime) : void 0
599
+ };
600
+ },
601
+ toJSON(message) {
602
+ const obj = {};
603
+ if (message.beginTime !== void 0) obj.beginTime = message.beginTime.toISOString();
604
+ if (message.expiryTime !== void 0) obj.expiryTime = message.expiryTime.toISOString();
605
+ return obj;
606
+ },
607
+ create(base) {
608
+ return AuthorizationAPIConfigureRemoteServiceResponse.fromPartial(base ?? {});
609
+ },
610
+ fromPartial(object) {
611
+ const message = createBaseAuthorizationAPIConfigureRemoteServiceResponse();
612
+ message.beginTime = object.beginTime ?? void 0;
613
+ message.expiryTime = object.expiryTime ?? void 0;
614
+ return message;
615
+ }
616
+ };
617
+ function createBaseAuthorizationMessages() {
618
+ return {
619
+ addAuthorizedClientRequest: void 0,
620
+ addAuthorizedClientResponse: void 0,
621
+ removeAuthorizedClientRequest: void 0,
622
+ removeAuthorizedClientResponse: void 0,
623
+ listAuthorizedClientsRequest: void 0,
624
+ listAuthorizedClientsResponse: void 0,
625
+ getSignedCommandsPublicKeyRequest: void 0,
626
+ getSignedCommandsPublicKeyResponse: void 0,
627
+ addAuthorizedClientByTrustedSignatureRequest: void 0,
628
+ addAuthorizedClientByTrustedSignatureResponse: void 0,
629
+ configureRemoteServiceRequest: void 0,
630
+ configureRemoteServiceResponse: void 0
631
+ };
632
+ }
633
+ const AuthorizationMessages = {
634
+ encode(message, writer = new BinaryWriter()) {
635
+ if (message.addAuthorizedClientRequest !== void 0) AuthorizationAPIAddAuthorizedClientRequest.encode(message.addAuthorizedClientRequest, writer.uint32(10).fork()).join();
636
+ if (message.addAuthorizedClientResponse !== void 0) AuthorizationAPIAddAuthorizedClientResponse.encode(message.addAuthorizedClientResponse, writer.uint32(18).fork()).join();
637
+ if (message.removeAuthorizedClientRequest !== void 0) AuthorizationAPIRemoveAuthorizedClientRequest.encode(message.removeAuthorizedClientRequest, writer.uint32(26).fork()).join();
638
+ if (message.removeAuthorizedClientResponse !== void 0) AuthorizationAPIRemoveAuthorizedClientResponse.encode(message.removeAuthorizedClientResponse, writer.uint32(34).fork()).join();
639
+ if (message.listAuthorizedClientsRequest !== void 0) AuthorizationAPIListAuthorizedClientsRequest.encode(message.listAuthorizedClientsRequest, writer.uint32(42).fork()).join();
640
+ if (message.listAuthorizedClientsResponse !== void 0) AuthorizationAPIListAuthorizedClientsResponse.encode(message.listAuthorizedClientsResponse, writer.uint32(50).fork()).join();
641
+ if (message.getSignedCommandsPublicKeyRequest !== void 0) AuthorizationAPIGetSignedCommandsPublicKeyRequest.encode(message.getSignedCommandsPublicKeyRequest, writer.uint32(58).fork()).join();
642
+ if (message.getSignedCommandsPublicKeyResponse !== void 0) AuthorizationAPIGetSignedCommandsPublicKeyResponse.encode(message.getSignedCommandsPublicKeyResponse, writer.uint32(66).fork()).join();
643
+ if (message.addAuthorizedClientByTrustedSignatureRequest !== void 0) AuthorizationAPIAddAuthorizedClientByTrustedSignatureRequest.encode(message.addAuthorizedClientByTrustedSignatureRequest, writer.uint32(74).fork()).join();
644
+ if (message.addAuthorizedClientByTrustedSignatureResponse !== void 0) AuthorizationAPIAddAuthorizedClientByTrustedSignatureResponse.encode(message.addAuthorizedClientByTrustedSignatureResponse, writer.uint32(82).fork()).join();
645
+ if (message.configureRemoteServiceRequest !== void 0) AuthorizationAPIConfigureRemoteServiceRequest.encode(message.configureRemoteServiceRequest, writer.uint32(90).fork()).join();
646
+ if (message.configureRemoteServiceResponse !== void 0) AuthorizationAPIConfigureRemoteServiceResponse.encode(message.configureRemoteServiceResponse, writer.uint32(98).fork()).join();
647
+ return writer;
648
+ },
649
+ decode(input, length) {
650
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
651
+ const end = length === void 0 ? reader.len : reader.pos + length;
652
+ const message = createBaseAuthorizationMessages();
653
+ while (reader.pos < end) {
654
+ const tag = reader.uint32();
655
+ switch (tag >>> 3) {
656
+ case 1:
657
+ if (tag !== 10) break;
658
+ message.addAuthorizedClientRequest = AuthorizationAPIAddAuthorizedClientRequest.decode(reader, reader.uint32());
659
+ continue;
660
+ case 2:
661
+ if (tag !== 18) break;
662
+ message.addAuthorizedClientResponse = AuthorizationAPIAddAuthorizedClientResponse.decode(reader, reader.uint32());
663
+ continue;
664
+ case 3:
665
+ if (tag !== 26) break;
666
+ message.removeAuthorizedClientRequest = AuthorizationAPIRemoveAuthorizedClientRequest.decode(reader, reader.uint32());
667
+ continue;
668
+ case 4:
669
+ if (tag !== 34) break;
670
+ message.removeAuthorizedClientResponse = AuthorizationAPIRemoveAuthorizedClientResponse.decode(reader, reader.uint32());
671
+ continue;
672
+ case 5:
673
+ if (tag !== 42) break;
674
+ message.listAuthorizedClientsRequest = AuthorizationAPIListAuthorizedClientsRequest.decode(reader, reader.uint32());
675
+ continue;
676
+ case 6:
677
+ if (tag !== 50) break;
678
+ message.listAuthorizedClientsResponse = AuthorizationAPIListAuthorizedClientsResponse.decode(reader, reader.uint32());
679
+ continue;
680
+ case 7:
681
+ if (tag !== 58) break;
682
+ message.getSignedCommandsPublicKeyRequest = AuthorizationAPIGetSignedCommandsPublicKeyRequest.decode(reader, reader.uint32());
683
+ continue;
684
+ case 8:
685
+ if (tag !== 66) break;
686
+ message.getSignedCommandsPublicKeyResponse = AuthorizationAPIGetSignedCommandsPublicKeyResponse.decode(reader, reader.uint32());
687
+ continue;
688
+ case 9:
689
+ if (tag !== 74) break;
690
+ message.addAuthorizedClientByTrustedSignatureRequest = AuthorizationAPIAddAuthorizedClientByTrustedSignatureRequest.decode(reader, reader.uint32());
691
+ continue;
692
+ case 10:
693
+ if (tag !== 82) break;
694
+ message.addAuthorizedClientByTrustedSignatureResponse = AuthorizationAPIAddAuthorizedClientByTrustedSignatureResponse.decode(reader, reader.uint32());
695
+ continue;
696
+ case 11:
697
+ if (tag !== 90) break;
698
+ message.configureRemoteServiceRequest = AuthorizationAPIConfigureRemoteServiceRequest.decode(reader, reader.uint32());
699
+ continue;
700
+ case 12:
701
+ if (tag !== 98) break;
702
+ message.configureRemoteServiceResponse = AuthorizationAPIConfigureRemoteServiceResponse.decode(reader, reader.uint32());
703
+ continue;
704
+ }
705
+ if ((tag & 7) === 4 || tag === 0) break;
706
+ reader.skip(tag & 7);
707
+ }
708
+ return message;
709
+ },
710
+ fromJSON(object) {
711
+ return {
712
+ addAuthorizedClientRequest: isSet(object.addAuthorizedClientRequest) ? AuthorizationAPIAddAuthorizedClientRequest.fromJSON(object.addAuthorizedClientRequest) : void 0,
713
+ addAuthorizedClientResponse: isSet(object.addAuthorizedClientResponse) ? AuthorizationAPIAddAuthorizedClientResponse.fromJSON(object.addAuthorizedClientResponse) : void 0,
714
+ removeAuthorizedClientRequest: isSet(object.removeAuthorizedClientRequest) ? AuthorizationAPIRemoveAuthorizedClientRequest.fromJSON(object.removeAuthorizedClientRequest) : void 0,
715
+ removeAuthorizedClientResponse: isSet(object.removeAuthorizedClientResponse) ? AuthorizationAPIRemoveAuthorizedClientResponse.fromJSON(object.removeAuthorizedClientResponse) : void 0,
716
+ listAuthorizedClientsRequest: isSet(object.listAuthorizedClientsRequest) ? AuthorizationAPIListAuthorizedClientsRequest.fromJSON(object.listAuthorizedClientsRequest) : void 0,
717
+ listAuthorizedClientsResponse: isSet(object.listAuthorizedClientsResponse) ? AuthorizationAPIListAuthorizedClientsResponse.fromJSON(object.listAuthorizedClientsResponse) : void 0,
718
+ getSignedCommandsPublicKeyRequest: isSet(object.getSignedCommandsPublicKeyRequest) ? AuthorizationAPIGetSignedCommandsPublicKeyRequest.fromJSON(object.getSignedCommandsPublicKeyRequest) : void 0,
719
+ getSignedCommandsPublicKeyResponse: isSet(object.getSignedCommandsPublicKeyResponse) ? AuthorizationAPIGetSignedCommandsPublicKeyResponse.fromJSON(object.getSignedCommandsPublicKeyResponse) : void 0,
720
+ addAuthorizedClientByTrustedSignatureRequest: isSet(object.addAuthorizedClientByTrustedSignatureRequest) ? AuthorizationAPIAddAuthorizedClientByTrustedSignatureRequest.fromJSON(object.addAuthorizedClientByTrustedSignatureRequest) : void 0,
721
+ addAuthorizedClientByTrustedSignatureResponse: isSet(object.addAuthorizedClientByTrustedSignatureResponse) ? AuthorizationAPIAddAuthorizedClientByTrustedSignatureResponse.fromJSON(object.addAuthorizedClientByTrustedSignatureResponse) : void 0,
722
+ configureRemoteServiceRequest: isSet(object.configureRemoteServiceRequest) ? AuthorizationAPIConfigureRemoteServiceRequest.fromJSON(object.configureRemoteServiceRequest) : void 0,
723
+ configureRemoteServiceResponse: isSet(object.configureRemoteServiceResponse) ? AuthorizationAPIConfigureRemoteServiceResponse.fromJSON(object.configureRemoteServiceResponse) : void 0
724
+ };
725
+ },
726
+ toJSON(message) {
727
+ const obj = {};
728
+ if (message.addAuthorizedClientRequest !== void 0) obj.addAuthorizedClientRequest = AuthorizationAPIAddAuthorizedClientRequest.toJSON(message.addAuthorizedClientRequest);
729
+ if (message.addAuthorizedClientResponse !== void 0) obj.addAuthorizedClientResponse = AuthorizationAPIAddAuthorizedClientResponse.toJSON(message.addAuthorizedClientResponse);
730
+ if (message.removeAuthorizedClientRequest !== void 0) obj.removeAuthorizedClientRequest = AuthorizationAPIRemoveAuthorizedClientRequest.toJSON(message.removeAuthorizedClientRequest);
731
+ if (message.removeAuthorizedClientResponse !== void 0) obj.removeAuthorizedClientResponse = AuthorizationAPIRemoveAuthorizedClientResponse.toJSON(message.removeAuthorizedClientResponse);
732
+ if (message.listAuthorizedClientsRequest !== void 0) obj.listAuthorizedClientsRequest = AuthorizationAPIListAuthorizedClientsRequest.toJSON(message.listAuthorizedClientsRequest);
733
+ if (message.listAuthorizedClientsResponse !== void 0) obj.listAuthorizedClientsResponse = AuthorizationAPIListAuthorizedClientsResponse.toJSON(message.listAuthorizedClientsResponse);
734
+ if (message.getSignedCommandsPublicKeyRequest !== void 0) obj.getSignedCommandsPublicKeyRequest = AuthorizationAPIGetSignedCommandsPublicKeyRequest.toJSON(message.getSignedCommandsPublicKeyRequest);
735
+ if (message.getSignedCommandsPublicKeyResponse !== void 0) obj.getSignedCommandsPublicKeyResponse = AuthorizationAPIGetSignedCommandsPublicKeyResponse.toJSON(message.getSignedCommandsPublicKeyResponse);
736
+ if (message.addAuthorizedClientByTrustedSignatureRequest !== void 0) obj.addAuthorizedClientByTrustedSignatureRequest = AuthorizationAPIAddAuthorizedClientByTrustedSignatureRequest.toJSON(message.addAuthorizedClientByTrustedSignatureRequest);
737
+ if (message.addAuthorizedClientByTrustedSignatureResponse !== void 0) obj.addAuthorizedClientByTrustedSignatureResponse = AuthorizationAPIAddAuthorizedClientByTrustedSignatureResponse.toJSON(message.addAuthorizedClientByTrustedSignatureResponse);
738
+ if (message.configureRemoteServiceRequest !== void 0) obj.configureRemoteServiceRequest = AuthorizationAPIConfigureRemoteServiceRequest.toJSON(message.configureRemoteServiceRequest);
739
+ if (message.configureRemoteServiceResponse !== void 0) obj.configureRemoteServiceResponse = AuthorizationAPIConfigureRemoteServiceResponse.toJSON(message.configureRemoteServiceResponse);
740
+ return obj;
741
+ },
742
+ create(base) {
743
+ return AuthorizationMessages.fromPartial(base ?? {});
744
+ },
745
+ fromPartial(object) {
746
+ const message = createBaseAuthorizationMessages();
747
+ message.addAuthorizedClientRequest = object.addAuthorizedClientRequest !== void 0 && object.addAuthorizedClientRequest !== null ? AuthorizationAPIAddAuthorizedClientRequest.fromPartial(object.addAuthorizedClientRequest) : void 0;
748
+ message.addAuthorizedClientResponse = object.addAuthorizedClientResponse !== void 0 && object.addAuthorizedClientResponse !== null ? AuthorizationAPIAddAuthorizedClientResponse.fromPartial(object.addAuthorizedClientResponse) : void 0;
749
+ message.removeAuthorizedClientRequest = object.removeAuthorizedClientRequest !== void 0 && object.removeAuthorizedClientRequest !== null ? AuthorizationAPIRemoveAuthorizedClientRequest.fromPartial(object.removeAuthorizedClientRequest) : void 0;
750
+ message.removeAuthorizedClientResponse = object.removeAuthorizedClientResponse !== void 0 && object.removeAuthorizedClientResponse !== null ? AuthorizationAPIRemoveAuthorizedClientResponse.fromPartial(object.removeAuthorizedClientResponse) : void 0;
751
+ message.listAuthorizedClientsRequest = object.listAuthorizedClientsRequest !== void 0 && object.listAuthorizedClientsRequest !== null ? AuthorizationAPIListAuthorizedClientsRequest.fromPartial(object.listAuthorizedClientsRequest) : void 0;
752
+ message.listAuthorizedClientsResponse = object.listAuthorizedClientsResponse !== void 0 && object.listAuthorizedClientsResponse !== null ? AuthorizationAPIListAuthorizedClientsResponse.fromPartial(object.listAuthorizedClientsResponse) : void 0;
753
+ message.getSignedCommandsPublicKeyRequest = object.getSignedCommandsPublicKeyRequest !== void 0 && object.getSignedCommandsPublicKeyRequest !== null ? AuthorizationAPIGetSignedCommandsPublicKeyRequest.fromPartial(object.getSignedCommandsPublicKeyRequest) : void 0;
754
+ message.getSignedCommandsPublicKeyResponse = object.getSignedCommandsPublicKeyResponse !== void 0 && object.getSignedCommandsPublicKeyResponse !== null ? AuthorizationAPIGetSignedCommandsPublicKeyResponse.fromPartial(object.getSignedCommandsPublicKeyResponse) : void 0;
755
+ message.addAuthorizedClientByTrustedSignatureRequest = object.addAuthorizedClientByTrustedSignatureRequest !== void 0 && object.addAuthorizedClientByTrustedSignatureRequest !== null ? AuthorizationAPIAddAuthorizedClientByTrustedSignatureRequest.fromPartial(object.addAuthorizedClientByTrustedSignatureRequest) : void 0;
756
+ message.addAuthorizedClientByTrustedSignatureResponse = object.addAuthorizedClientByTrustedSignatureResponse !== void 0 && object.addAuthorizedClientByTrustedSignatureResponse !== null ? AuthorizationAPIAddAuthorizedClientByTrustedSignatureResponse.fromPartial(object.addAuthorizedClientByTrustedSignatureResponse) : void 0;
757
+ message.configureRemoteServiceRequest = object.configureRemoteServiceRequest !== void 0 && object.configureRemoteServiceRequest !== null ? AuthorizationAPIConfigureRemoteServiceRequest.fromPartial(object.configureRemoteServiceRequest) : void 0;
758
+ message.configureRemoteServiceResponse = object.configureRemoteServiceResponse !== void 0 && object.configureRemoteServiceResponse !== null ? AuthorizationAPIConfigureRemoteServiceResponse.fromPartial(object.configureRemoteServiceResponse) : void 0;
759
+ return message;
760
+ }
761
+ };
762
+ function bytesFromBase64(b64) {
763
+ if (globalThis.Buffer) return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
764
+ else {
765
+ const bin = globalThis.atob(b64);
766
+ const arr = new Uint8Array(bin.length);
767
+ for (let i = 0; i < bin.length; ++i) arr[i] = bin.charCodeAt(i);
768
+ return arr;
769
+ }
770
+ }
771
+ function base64FromBytes(arr) {
772
+ if (globalThis.Buffer) return globalThis.Buffer.from(arr).toString("base64");
773
+ else {
774
+ const bin = [];
775
+ arr.forEach((byte) => {
776
+ bin.push(globalThis.String.fromCharCode(byte));
777
+ });
778
+ return globalThis.btoa(bin.join(""));
779
+ }
780
+ }
781
+ function toTimestamp(date) {
782
+ return {
783
+ seconds: Math.trunc(date.getTime() / 1e3),
784
+ nanos: date.getTime() % 1e3 * 1e6
785
+ };
786
+ }
787
+ function fromTimestamp(t) {
788
+ let millis = (t.seconds || 0) * 1e3;
789
+ millis += (t.nanos || 0) / 1e6;
790
+ return new globalThis.Date(millis);
791
+ }
792
+ function fromJsonTimestamp(o) {
793
+ if (o instanceof globalThis.Date) return o;
794
+ else if (typeof o === "string") return new globalThis.Date(o);
795
+ else return fromTimestamp(Timestamp.fromJSON(o));
796
+ }
797
+ function isSet(value) {
798
+ return value !== null && value !== void 0;
799
+ }
800
+ //#endregion
801
+ export { AuthorizationAPIAddAuthorizedClientByTrustedSignatureRequest, AuthorizationAPIAddAuthorizedClientByTrustedSignatureResponse, AuthorizationAPIAddAuthorizedClientRequest, AuthorizationAPIAddAuthorizedClientResponse, AuthorizationAPIConfigureRemoteServiceRequest, AuthorizationAPIConfigureRemoteServiceResponse, AuthorizationAPIGetSignedCommandsPublicKeyRequest, AuthorizationAPIGetSignedCommandsPublicKeyResponse, AuthorizationAPIListAuthorizedClientsRequest, AuthorizationAPIListAuthorizedClientsResponse, AuthorizationAPIRemoveAuthorizedClientRequest, AuthorizationAPIRemoveAuthorizedClientResponse, AuthorizationMessages, protobufPackage };