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