@teslemetry/tesla-protocol 0.5.0 → 1.0.0
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 +1 -3
- package/dist/charging/charging.cjs +550 -0
- package/dist/charging/charging.d.cts +75 -0
- package/dist/charging/charging.d.mts +75 -0
- package/dist/charging/charging.mjs +543 -0
- package/dist/command/car_server.cjs +212 -11
- package/dist/command/car_server.d.cts +121 -96
- package/dist/command/car_server.d.mts +121 -96
- package/dist/command/car_server.mjs +206 -12
- package/dist/command/common.cjs +43 -0
- package/dist/command/common.d.cts +6 -2
- package/dist/command/common.d.mts +6 -2
- package/dist/command/common.mjs +43 -1
- package/dist/command/managed_charging.d.cts +1 -1
- package/dist/command/managed_charging.d.mts +1 -1
- package/dist/command/session.d.cts +0 -4
- package/dist/command/session.d.mts +0 -4
- package/dist/command/universal_message.cjs +8 -3
- package/dist/command/universal_message.d.cts +5 -3
- package/dist/command/universal_message.d.mts +5 -3
- package/dist/command/universal_message.mjs +8 -3
- package/dist/command/vcsec.cjs +124 -39
- package/dist/command/vcsec.d.cts +50 -40
- package/dist/command/vcsec.d.mts +50 -40
- package/dist/command/vcsec.mjs +123 -40
- package/dist/command/vehicle.cjs +156 -18
- package/dist/command/vehicle.d.cts +70 -57
- package/dist/command/vehicle.d.mts +70 -57
- package/dist/command/vehicle.mjs +156 -20
- package/dist/dashcam/dashcam_sei.cjs +263 -0
- package/dist/dashcam/dashcam_sei.d.cts +60 -0
- package/dist/dashcam/dashcam_sei.d.mts +60 -0
- package/dist/dashcam/dashcam_sei.mjs +255 -0
- package/dist/energy_command/identifier_type.cjs +0 -5
- package/dist/energy_command/identifier_type.d.cts +0 -5
- package/dist/energy_command/identifier_type.d.mts +0 -5
- package/dist/energy_command/identifier_type.mjs +0 -5
- package/dist/energy_device/authorization_api.d.cts +0 -5
- package/dist/energy_device/authorization_api.d.mts +0 -5
- package/dist/energy_device/authorization_types.cjs +0 -5
- package/dist/energy_device/authorization_types.d.cts +0 -5
- package/dist/energy_device/authorization_types.d.mts +0 -5
- package/dist/energy_device/authorization_types.mjs +0 -5
- package/dist/energy_device/common_api.cjs +604 -11
- package/dist/energy_device/common_api.d.cts +60 -8
- package/dist/energy_device/common_api.d.mts +60 -8
- package/dist/energy_device/common_api.mjs +596 -12
- package/dist/energy_device/device.cjs +129 -5
- package/dist/energy_device/device.d.cts +13 -6
- package/dist/energy_device/device.d.mts +13 -6
- package/dist/energy_device/device.mjs +127 -6
- package/dist/energy_device/energy.cjs +0 -5
- package/dist/energy_device/energy.d.cts +0 -5
- package/dist/energy_device/energy.d.mts +0 -5
- package/dist/energy_device/energy.mjs +0 -5
- package/dist/energy_device/energy_site_net.cjs +747 -5
- package/dist/energy_device/energy_site_net.d.cts +84 -6
- package/dist/energy_device/energy_site_net.d.mts +84 -6
- package/dist/energy_device/energy_site_net.mjs +736 -6
- package/dist/energy_device/error.d.cts +0 -5
- package/dist/energy_device/error.d.mts +0 -5
- package/dist/energy_device/filestore_api.cjs +570 -0
- package/dist/energy_device/filestore_api.d.cts +76 -0
- package/dist/energy_device/filestore_api.d.mts +76 -0
- package/dist/energy_device/filestore_api.mjs +558 -0
- package/dist/energy_device/google/protobuf/duration.cjs +71 -0
- package/dist/energy_device/google/protobuf/duration.d.cts +95 -0
- package/dist/energy_device/google/protobuf/duration.d.mts +95 -0
- package/dist/energy_device/google/protobuf/duration.mjs +69 -0
- package/dist/energy_device/graphql_api.cjs +444 -0
- package/dist/energy_device/graphql_api.d.cts +73 -0
- package/dist/energy_device/graphql_api.d.mts +73 -0
- package/dist/energy_device/graphql_api.mjs +429 -0
- package/dist/energy_device/intra_site_api.cjs +1693 -0
- package/dist/energy_device/intra_site_api.d.cts +222 -0
- package/dist/energy_device/intra_site_api.d.mts +222 -0
- package/dist/energy_device/intra_site_api.mjs +1639 -0
- package/dist/energy_device/local_auth_api.cjs +500 -0
- package/dist/energy_device/local_auth_api.d.cts +68 -0
- package/dist/energy_device/local_auth_api.d.mts +68 -0
- package/dist/energy_device/local_auth_api.mjs +487 -0
- package/dist/energy_device/networking.cjs +20 -7
- package/dist/energy_device/networking.d.cts +2 -5
- package/dist/energy_device/networking.d.mts +2 -5
- package/dist/energy_device/networking.mjs +20 -7
- package/dist/energy_device/neurio_meter_api.cjs +1437 -0
- package/dist/energy_device/neurio_meter_api.d.cts +197 -0
- package/dist/energy_device/neurio_meter_api.d.mts +197 -0
- package/dist/energy_device/neurio_meter_api.mjs +1396 -0
- package/dist/energy_device/pvi_api.cjs +2949 -0
- package/dist/energy_device/pvi_api.d.cts +314 -0
- package/dist/energy_device/pvi_api.d.mts +314 -0
- package/dist/energy_device/pvi_api.mjs +2887 -0
- package/dist/energy_device/teg_api.cjs +5179 -147
- package/dist/energy_device/teg_api.d.cts +490 -80
- package/dist/energy_device/teg_api.d.mts +490 -80
- package/dist/energy_device/teg_api.mjs +5059 -148
- package/dist/energy_device/transport.cjs +82 -7
- package/dist/energy_device/transport.d.cts +16 -10
- package/dist/energy_device/transport.d.mts +16 -10
- package/dist/energy_device/transport.mjs +82 -7
- package/dist/energy_device/update.cjs +33 -11
- package/dist/energy_device/update.d.cts +3 -5
- package/dist/energy_device/update.d.mts +3 -5
- package/dist/energy_device/update.mjs +33 -11
- package/dist/energy_device/wall_connector.cjs +6729 -10
- package/dist/energy_device/wall_connector.d.cts +696 -7
- package/dist/energy_device/wall_connector.d.mts +696 -7
- package/dist/energy_device/wall_connector.mjs +6591 -11
- package/dist/telemetry/vehicle_data.cjs +1 -1
- package/dist/telemetry/vehicle_data.d.cts +1 -1
- package/dist/telemetry/vehicle_data.d.mts +1 -1
- package/dist/telemetry/vehicle_data.mjs +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,487 @@
|
|
|
1
|
+
import { WifiPassword } from "./networking.mjs";
|
|
2
|
+
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
3
|
+
//#region src/energy_device/local_auth_api.ts
|
|
4
|
+
const protobufPackage = "tesla.proto.energy_device.v1";
|
|
5
|
+
let LocalAuthResult = /* @__PURE__ */ function(LocalAuthResult) {
|
|
6
|
+
LocalAuthResult[LocalAuthResult["LOCAL_AUTH_RESULT_INVALID"] = 0] = "LOCAL_AUTH_RESULT_INVALID";
|
|
7
|
+
LocalAuthResult[LocalAuthResult["LOCAL_AUTH_RESULT_SUCCESS"] = 1] = "LOCAL_AUTH_RESULT_SUCCESS";
|
|
8
|
+
LocalAuthResult[LocalAuthResult["LOCAL_AUTH_RESULT_INVALID_PARAMETERS"] = 2] = "LOCAL_AUTH_RESULT_INVALID_PARAMETERS";
|
|
9
|
+
LocalAuthResult[LocalAuthResult["LOCAL_AUTH_RESULT_INVALID_PASSWORD"] = 3] = "LOCAL_AUTH_RESULT_INVALID_PASSWORD";
|
|
10
|
+
LocalAuthResult[LocalAuthResult["LOCAL_AUTH_RESULT_PRESENCE_PROOF_REQUIRED"] = 4] = "LOCAL_AUTH_RESULT_PRESENCE_PROOF_REQUIRED";
|
|
11
|
+
LocalAuthResult[LocalAuthResult["LOCAL_AUTH_RESULT_PRESENCE_PROOF_TIMED_OUT"] = 5] = "LOCAL_AUTH_RESULT_PRESENCE_PROOF_TIMED_OUT";
|
|
12
|
+
LocalAuthResult[LocalAuthResult["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
13
|
+
return LocalAuthResult;
|
|
14
|
+
}({});
|
|
15
|
+
function localAuthResultFromJSON(object) {
|
|
16
|
+
switch (object) {
|
|
17
|
+
case 0:
|
|
18
|
+
case "LOCAL_AUTH_RESULT_INVALID": return 0;
|
|
19
|
+
case 1:
|
|
20
|
+
case "LOCAL_AUTH_RESULT_SUCCESS": return 1;
|
|
21
|
+
case 2:
|
|
22
|
+
case "LOCAL_AUTH_RESULT_INVALID_PARAMETERS": return 2;
|
|
23
|
+
case 3:
|
|
24
|
+
case "LOCAL_AUTH_RESULT_INVALID_PASSWORD": return 3;
|
|
25
|
+
case 4:
|
|
26
|
+
case "LOCAL_AUTH_RESULT_PRESENCE_PROOF_REQUIRED": return 4;
|
|
27
|
+
case 5:
|
|
28
|
+
case "LOCAL_AUTH_RESULT_PRESENCE_PROOF_TIMED_OUT": return 5;
|
|
29
|
+
default: return -1;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
function localAuthResultToJSON(object) {
|
|
33
|
+
switch (object) {
|
|
34
|
+
case 0: return "LOCAL_AUTH_RESULT_INVALID";
|
|
35
|
+
case 1: return "LOCAL_AUTH_RESULT_SUCCESS";
|
|
36
|
+
case 2: return "LOCAL_AUTH_RESULT_INVALID_PARAMETERS";
|
|
37
|
+
case 3: return "LOCAL_AUTH_RESULT_INVALID_PASSWORD";
|
|
38
|
+
case 4: return "LOCAL_AUTH_RESULT_PRESENCE_PROOF_REQUIRED";
|
|
39
|
+
case 5: return "LOCAL_AUTH_RESULT_PRESENCE_PROOF_TIMED_OUT";
|
|
40
|
+
default: return "UNRECOGNIZED";
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
function createBaseLocalAuthAPIRequiredFactorsRequest() {
|
|
44
|
+
return {};
|
|
45
|
+
}
|
|
46
|
+
const LocalAuthAPIRequiredFactorsRequest = {
|
|
47
|
+
encode(_, writer = new BinaryWriter()) {
|
|
48
|
+
return writer;
|
|
49
|
+
},
|
|
50
|
+
decode(input, length) {
|
|
51
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
52
|
+
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
53
|
+
const message = createBaseLocalAuthAPIRequiredFactorsRequest();
|
|
54
|
+
while (reader.pos < end) {
|
|
55
|
+
const tag = reader.uint32();
|
|
56
|
+
switch (tag >>> 3) {}
|
|
57
|
+
if ((tag & 7) === 4 || tag === 0) break;
|
|
58
|
+
reader.skip(tag & 7);
|
|
59
|
+
}
|
|
60
|
+
return message;
|
|
61
|
+
},
|
|
62
|
+
fromJSON(_) {
|
|
63
|
+
return {};
|
|
64
|
+
},
|
|
65
|
+
toJSON(_) {
|
|
66
|
+
return {};
|
|
67
|
+
},
|
|
68
|
+
create(base) {
|
|
69
|
+
return LocalAuthAPIRequiredFactorsRequest.fromPartial(base ?? {});
|
|
70
|
+
},
|
|
71
|
+
fromPartial(_) {
|
|
72
|
+
return createBaseLocalAuthAPIRequiredFactorsRequest();
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
function createBaseLocalAuthAPIRequiredFactorsResponse() {
|
|
76
|
+
return {
|
|
77
|
+
password: false,
|
|
78
|
+
presence: false
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
const LocalAuthAPIRequiredFactorsResponse = {
|
|
82
|
+
encode(message, writer = new BinaryWriter()) {
|
|
83
|
+
if (message.password !== false) writer.uint32(8).bool(message.password);
|
|
84
|
+
if (message.presence !== false) writer.uint32(16).bool(message.presence);
|
|
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 = createBaseLocalAuthAPIRequiredFactorsResponse();
|
|
91
|
+
while (reader.pos < end) {
|
|
92
|
+
const tag = reader.uint32();
|
|
93
|
+
switch (tag >>> 3) {
|
|
94
|
+
case 1:
|
|
95
|
+
if (tag !== 8) break;
|
|
96
|
+
message.password = reader.bool();
|
|
97
|
+
continue;
|
|
98
|
+
case 2:
|
|
99
|
+
if (tag !== 16) break;
|
|
100
|
+
message.presence = reader.bool();
|
|
101
|
+
continue;
|
|
102
|
+
}
|
|
103
|
+
if ((tag & 7) === 4 || tag === 0) break;
|
|
104
|
+
reader.skip(tag & 7);
|
|
105
|
+
}
|
|
106
|
+
return message;
|
|
107
|
+
},
|
|
108
|
+
fromJSON(object) {
|
|
109
|
+
return {
|
|
110
|
+
password: isSet(object.password) ? globalThis.Boolean(object.password) : false,
|
|
111
|
+
presence: isSet(object.presence) ? globalThis.Boolean(object.presence) : false
|
|
112
|
+
};
|
|
113
|
+
},
|
|
114
|
+
toJSON(message) {
|
|
115
|
+
const obj = {};
|
|
116
|
+
if (message.password !== void 0) obj.password = message.password;
|
|
117
|
+
if (message.presence !== void 0) obj.presence = message.presence;
|
|
118
|
+
return obj;
|
|
119
|
+
},
|
|
120
|
+
create(base) {
|
|
121
|
+
return LocalAuthAPIRequiredFactorsResponse.fromPartial(base ?? {});
|
|
122
|
+
},
|
|
123
|
+
fromPartial(object) {
|
|
124
|
+
const message = createBaseLocalAuthAPIRequiredFactorsResponse();
|
|
125
|
+
message.password = object.password ?? false;
|
|
126
|
+
message.presence = object.presence ?? false;
|
|
127
|
+
return message;
|
|
128
|
+
}
|
|
129
|
+
};
|
|
130
|
+
function createBaseLocalAuthAPILoginRequest() {
|
|
131
|
+
return {
|
|
132
|
+
participant: 0,
|
|
133
|
+
email: "",
|
|
134
|
+
password: void 0
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
const LocalAuthAPILoginRequest = {
|
|
138
|
+
encode(message, writer = new BinaryWriter()) {
|
|
139
|
+
if (message.participant !== 0) writer.uint32(8).int32(message.participant);
|
|
140
|
+
if (message.email !== "") writer.uint32(18).string(message.email);
|
|
141
|
+
if (message.password !== void 0) WifiPassword.encode(message.password, writer.uint32(26).fork()).join();
|
|
142
|
+
return writer;
|
|
143
|
+
},
|
|
144
|
+
decode(input, length) {
|
|
145
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
146
|
+
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
147
|
+
const message = createBaseLocalAuthAPILoginRequest();
|
|
148
|
+
while (reader.pos < end) {
|
|
149
|
+
const tag = reader.uint32();
|
|
150
|
+
switch (tag >>> 3) {
|
|
151
|
+
case 1:
|
|
152
|
+
if (tag !== 8) break;
|
|
153
|
+
message.participant = reader.int32();
|
|
154
|
+
continue;
|
|
155
|
+
case 2:
|
|
156
|
+
if (tag !== 18) break;
|
|
157
|
+
message.email = reader.string();
|
|
158
|
+
continue;
|
|
159
|
+
case 3:
|
|
160
|
+
if (tag !== 26) break;
|
|
161
|
+
message.password = WifiPassword.decode(reader, reader.uint32());
|
|
162
|
+
continue;
|
|
163
|
+
}
|
|
164
|
+
if ((tag & 7) === 4 || tag === 0) break;
|
|
165
|
+
reader.skip(tag & 7);
|
|
166
|
+
}
|
|
167
|
+
return message;
|
|
168
|
+
},
|
|
169
|
+
fromJSON(object) {
|
|
170
|
+
return {
|
|
171
|
+
participant: isSet(object.participant) ? globalThis.Number(object.participant) : 0,
|
|
172
|
+
email: isSet(object.email) ? globalThis.String(object.email) : "",
|
|
173
|
+
password: isSet(object.password) ? WifiPassword.fromJSON(object.password) : void 0
|
|
174
|
+
};
|
|
175
|
+
},
|
|
176
|
+
toJSON(message) {
|
|
177
|
+
const obj = {};
|
|
178
|
+
if (message.participant !== void 0) obj.participant = Math.round(message.participant);
|
|
179
|
+
if (message.email !== void 0) obj.email = message.email;
|
|
180
|
+
if (message.password !== void 0) obj.password = WifiPassword.toJSON(message.password);
|
|
181
|
+
return obj;
|
|
182
|
+
},
|
|
183
|
+
create(base) {
|
|
184
|
+
return LocalAuthAPILoginRequest.fromPartial(base ?? {});
|
|
185
|
+
},
|
|
186
|
+
fromPartial(object) {
|
|
187
|
+
const message = createBaseLocalAuthAPILoginRequest();
|
|
188
|
+
message.participant = object.participant ?? 0;
|
|
189
|
+
message.email = object.email ?? "";
|
|
190
|
+
message.password = object.password !== void 0 && object.password !== null ? WifiPassword.fromPartial(object.password) : void 0;
|
|
191
|
+
return message;
|
|
192
|
+
}
|
|
193
|
+
};
|
|
194
|
+
function createBaseLocalAuthAPILoginResponse() {
|
|
195
|
+
return { result: 0 };
|
|
196
|
+
}
|
|
197
|
+
const LocalAuthAPILoginResponse = {
|
|
198
|
+
encode(message, writer = new BinaryWriter()) {
|
|
199
|
+
if (message.result !== 0) writer.uint32(8).int32(message.result);
|
|
200
|
+
return writer;
|
|
201
|
+
},
|
|
202
|
+
decode(input, length) {
|
|
203
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
204
|
+
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
205
|
+
const message = createBaseLocalAuthAPILoginResponse();
|
|
206
|
+
while (reader.pos < end) {
|
|
207
|
+
const tag = reader.uint32();
|
|
208
|
+
switch (tag >>> 3) {
|
|
209
|
+
case 1:
|
|
210
|
+
if (tag !== 8) break;
|
|
211
|
+
message.result = reader.int32();
|
|
212
|
+
continue;
|
|
213
|
+
}
|
|
214
|
+
if ((tag & 7) === 4 || tag === 0) break;
|
|
215
|
+
reader.skip(tag & 7);
|
|
216
|
+
}
|
|
217
|
+
return message;
|
|
218
|
+
},
|
|
219
|
+
fromJSON(object) {
|
|
220
|
+
return { result: isSet(object.result) ? localAuthResultFromJSON(object.result) : 0 };
|
|
221
|
+
},
|
|
222
|
+
toJSON(message) {
|
|
223
|
+
const obj = {};
|
|
224
|
+
if (message.result !== void 0) obj.result = localAuthResultToJSON(message.result);
|
|
225
|
+
return obj;
|
|
226
|
+
},
|
|
227
|
+
create(base) {
|
|
228
|
+
return LocalAuthAPILoginResponse.fromPartial(base ?? {});
|
|
229
|
+
},
|
|
230
|
+
fromPartial(object) {
|
|
231
|
+
const message = createBaseLocalAuthAPILoginResponse();
|
|
232
|
+
message.result = object.result ?? 0;
|
|
233
|
+
return message;
|
|
234
|
+
}
|
|
235
|
+
};
|
|
236
|
+
function createBaseLocalAuthAPILogoutRequest() {
|
|
237
|
+
return {};
|
|
238
|
+
}
|
|
239
|
+
const LocalAuthAPILogoutRequest = {
|
|
240
|
+
encode(_, writer = new BinaryWriter()) {
|
|
241
|
+
return writer;
|
|
242
|
+
},
|
|
243
|
+
decode(input, length) {
|
|
244
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
245
|
+
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
246
|
+
const message = createBaseLocalAuthAPILogoutRequest();
|
|
247
|
+
while (reader.pos < end) {
|
|
248
|
+
const tag = reader.uint32();
|
|
249
|
+
switch (tag >>> 3) {}
|
|
250
|
+
if ((tag & 7) === 4 || tag === 0) break;
|
|
251
|
+
reader.skip(tag & 7);
|
|
252
|
+
}
|
|
253
|
+
return message;
|
|
254
|
+
},
|
|
255
|
+
fromJSON(_) {
|
|
256
|
+
return {};
|
|
257
|
+
},
|
|
258
|
+
toJSON(_) {
|
|
259
|
+
return {};
|
|
260
|
+
},
|
|
261
|
+
create(base) {
|
|
262
|
+
return LocalAuthAPILogoutRequest.fromPartial(base ?? {});
|
|
263
|
+
},
|
|
264
|
+
fromPartial(_) {
|
|
265
|
+
return createBaseLocalAuthAPILogoutRequest();
|
|
266
|
+
}
|
|
267
|
+
};
|
|
268
|
+
function createBaseLocalAuthAPILogoutResponse() {
|
|
269
|
+
return {};
|
|
270
|
+
}
|
|
271
|
+
const LocalAuthAPILogoutResponse = {
|
|
272
|
+
encode(_, writer = new BinaryWriter()) {
|
|
273
|
+
return writer;
|
|
274
|
+
},
|
|
275
|
+
decode(input, length) {
|
|
276
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
277
|
+
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
278
|
+
const message = createBaseLocalAuthAPILogoutResponse();
|
|
279
|
+
while (reader.pos < end) {
|
|
280
|
+
const tag = reader.uint32();
|
|
281
|
+
switch (tag >>> 3) {}
|
|
282
|
+
if ((tag & 7) === 4 || tag === 0) break;
|
|
283
|
+
reader.skip(tag & 7);
|
|
284
|
+
}
|
|
285
|
+
return message;
|
|
286
|
+
},
|
|
287
|
+
fromJSON(_) {
|
|
288
|
+
return {};
|
|
289
|
+
},
|
|
290
|
+
toJSON(_) {
|
|
291
|
+
return {};
|
|
292
|
+
},
|
|
293
|
+
create(base) {
|
|
294
|
+
return LocalAuthAPILogoutResponse.fromPartial(base ?? {});
|
|
295
|
+
},
|
|
296
|
+
fromPartial(_) {
|
|
297
|
+
return createBaseLocalAuthAPILogoutResponse();
|
|
298
|
+
}
|
|
299
|
+
};
|
|
300
|
+
function createBaseLocalAuthAPICheckAuthStatusRequest() {
|
|
301
|
+
return {};
|
|
302
|
+
}
|
|
303
|
+
const LocalAuthAPICheckAuthStatusRequest = {
|
|
304
|
+
encode(_, writer = new BinaryWriter()) {
|
|
305
|
+
return writer;
|
|
306
|
+
},
|
|
307
|
+
decode(input, length) {
|
|
308
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
309
|
+
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
310
|
+
const message = createBaseLocalAuthAPICheckAuthStatusRequest();
|
|
311
|
+
while (reader.pos < end) {
|
|
312
|
+
const tag = reader.uint32();
|
|
313
|
+
switch (tag >>> 3) {}
|
|
314
|
+
if ((tag & 7) === 4 || tag === 0) break;
|
|
315
|
+
reader.skip(tag & 7);
|
|
316
|
+
}
|
|
317
|
+
return message;
|
|
318
|
+
},
|
|
319
|
+
fromJSON(_) {
|
|
320
|
+
return {};
|
|
321
|
+
},
|
|
322
|
+
toJSON(_) {
|
|
323
|
+
return {};
|
|
324
|
+
},
|
|
325
|
+
create(base) {
|
|
326
|
+
return LocalAuthAPICheckAuthStatusRequest.fromPartial(base ?? {});
|
|
327
|
+
},
|
|
328
|
+
fromPartial(_) {
|
|
329
|
+
return createBaseLocalAuthAPICheckAuthStatusRequest();
|
|
330
|
+
}
|
|
331
|
+
};
|
|
332
|
+
function createBaseLocalAuthAPICheckAuthStatusResponse() {
|
|
333
|
+
return { result: 0 };
|
|
334
|
+
}
|
|
335
|
+
const LocalAuthAPICheckAuthStatusResponse = {
|
|
336
|
+
encode(message, writer = new BinaryWriter()) {
|
|
337
|
+
if (message.result !== 0) writer.uint32(8).int32(message.result);
|
|
338
|
+
return writer;
|
|
339
|
+
},
|
|
340
|
+
decode(input, length) {
|
|
341
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
342
|
+
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
343
|
+
const message = createBaseLocalAuthAPICheckAuthStatusResponse();
|
|
344
|
+
while (reader.pos < end) {
|
|
345
|
+
const tag = reader.uint32();
|
|
346
|
+
switch (tag >>> 3) {
|
|
347
|
+
case 1:
|
|
348
|
+
if (tag !== 8) break;
|
|
349
|
+
message.result = reader.int32();
|
|
350
|
+
continue;
|
|
351
|
+
}
|
|
352
|
+
if ((tag & 7) === 4 || tag === 0) break;
|
|
353
|
+
reader.skip(tag & 7);
|
|
354
|
+
}
|
|
355
|
+
return message;
|
|
356
|
+
},
|
|
357
|
+
fromJSON(object) {
|
|
358
|
+
return { result: isSet(object.result) ? localAuthResultFromJSON(object.result) : 0 };
|
|
359
|
+
},
|
|
360
|
+
toJSON(message) {
|
|
361
|
+
const obj = {};
|
|
362
|
+
if (message.result !== void 0) obj.result = localAuthResultToJSON(message.result);
|
|
363
|
+
return obj;
|
|
364
|
+
},
|
|
365
|
+
create(base) {
|
|
366
|
+
return LocalAuthAPICheckAuthStatusResponse.fromPartial(base ?? {});
|
|
367
|
+
},
|
|
368
|
+
fromPartial(object) {
|
|
369
|
+
const message = createBaseLocalAuthAPICheckAuthStatusResponse();
|
|
370
|
+
message.result = object.result ?? 0;
|
|
371
|
+
return message;
|
|
372
|
+
}
|
|
373
|
+
};
|
|
374
|
+
function createBaseLocalAuthMessages() {
|
|
375
|
+
return {
|
|
376
|
+
requiredFactorsRequest: void 0,
|
|
377
|
+
requiredFactorsResponse: void 0,
|
|
378
|
+
loginRequest: void 0,
|
|
379
|
+
loginResponse: void 0,
|
|
380
|
+
logoutRequest: void 0,
|
|
381
|
+
logoutResponse: void 0,
|
|
382
|
+
checkAuthStatusRequest: void 0,
|
|
383
|
+
checkAuthStatusResponse: void 0
|
|
384
|
+
};
|
|
385
|
+
}
|
|
386
|
+
const LocalAuthMessages = {
|
|
387
|
+
encode(message, writer = new BinaryWriter()) {
|
|
388
|
+
if (message.requiredFactorsRequest !== void 0) LocalAuthAPIRequiredFactorsRequest.encode(message.requiredFactorsRequest, writer.uint32(10).fork()).join();
|
|
389
|
+
if (message.requiredFactorsResponse !== void 0) LocalAuthAPIRequiredFactorsResponse.encode(message.requiredFactorsResponse, writer.uint32(18).fork()).join();
|
|
390
|
+
if (message.loginRequest !== void 0) LocalAuthAPILoginRequest.encode(message.loginRequest, writer.uint32(26).fork()).join();
|
|
391
|
+
if (message.loginResponse !== void 0) LocalAuthAPILoginResponse.encode(message.loginResponse, writer.uint32(34).fork()).join();
|
|
392
|
+
if (message.logoutRequest !== void 0) LocalAuthAPILogoutRequest.encode(message.logoutRequest, writer.uint32(42).fork()).join();
|
|
393
|
+
if (message.logoutResponse !== void 0) LocalAuthAPILogoutResponse.encode(message.logoutResponse, writer.uint32(50).fork()).join();
|
|
394
|
+
if (message.checkAuthStatusRequest !== void 0) LocalAuthAPICheckAuthStatusRequest.encode(message.checkAuthStatusRequest, writer.uint32(58).fork()).join();
|
|
395
|
+
if (message.checkAuthStatusResponse !== void 0) LocalAuthAPICheckAuthStatusResponse.encode(message.checkAuthStatusResponse, writer.uint32(66).fork()).join();
|
|
396
|
+
return writer;
|
|
397
|
+
},
|
|
398
|
+
decode(input, length) {
|
|
399
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
400
|
+
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
401
|
+
const message = createBaseLocalAuthMessages();
|
|
402
|
+
while (reader.pos < end) {
|
|
403
|
+
const tag = reader.uint32();
|
|
404
|
+
switch (tag >>> 3) {
|
|
405
|
+
case 1:
|
|
406
|
+
if (tag !== 10) break;
|
|
407
|
+
message.requiredFactorsRequest = LocalAuthAPIRequiredFactorsRequest.decode(reader, reader.uint32());
|
|
408
|
+
continue;
|
|
409
|
+
case 2:
|
|
410
|
+
if (tag !== 18) break;
|
|
411
|
+
message.requiredFactorsResponse = LocalAuthAPIRequiredFactorsResponse.decode(reader, reader.uint32());
|
|
412
|
+
continue;
|
|
413
|
+
case 3:
|
|
414
|
+
if (tag !== 26) break;
|
|
415
|
+
message.loginRequest = LocalAuthAPILoginRequest.decode(reader, reader.uint32());
|
|
416
|
+
continue;
|
|
417
|
+
case 4:
|
|
418
|
+
if (tag !== 34) break;
|
|
419
|
+
message.loginResponse = LocalAuthAPILoginResponse.decode(reader, reader.uint32());
|
|
420
|
+
continue;
|
|
421
|
+
case 5:
|
|
422
|
+
if (tag !== 42) break;
|
|
423
|
+
message.logoutRequest = LocalAuthAPILogoutRequest.decode(reader, reader.uint32());
|
|
424
|
+
continue;
|
|
425
|
+
case 6:
|
|
426
|
+
if (tag !== 50) break;
|
|
427
|
+
message.logoutResponse = LocalAuthAPILogoutResponse.decode(reader, reader.uint32());
|
|
428
|
+
continue;
|
|
429
|
+
case 7:
|
|
430
|
+
if (tag !== 58) break;
|
|
431
|
+
message.checkAuthStatusRequest = LocalAuthAPICheckAuthStatusRequest.decode(reader, reader.uint32());
|
|
432
|
+
continue;
|
|
433
|
+
case 8:
|
|
434
|
+
if (tag !== 66) break;
|
|
435
|
+
message.checkAuthStatusResponse = LocalAuthAPICheckAuthStatusResponse.decode(reader, reader.uint32());
|
|
436
|
+
continue;
|
|
437
|
+
}
|
|
438
|
+
if ((tag & 7) === 4 || tag === 0) break;
|
|
439
|
+
reader.skip(tag & 7);
|
|
440
|
+
}
|
|
441
|
+
return message;
|
|
442
|
+
},
|
|
443
|
+
fromJSON(object) {
|
|
444
|
+
return {
|
|
445
|
+
requiredFactorsRequest: isSet(object.requiredFactorsRequest) ? LocalAuthAPIRequiredFactorsRequest.fromJSON(object.requiredFactorsRequest) : void 0,
|
|
446
|
+
requiredFactorsResponse: isSet(object.requiredFactorsResponse) ? LocalAuthAPIRequiredFactorsResponse.fromJSON(object.requiredFactorsResponse) : void 0,
|
|
447
|
+
loginRequest: isSet(object.loginRequest) ? LocalAuthAPILoginRequest.fromJSON(object.loginRequest) : void 0,
|
|
448
|
+
loginResponse: isSet(object.loginResponse) ? LocalAuthAPILoginResponse.fromJSON(object.loginResponse) : void 0,
|
|
449
|
+
logoutRequest: isSet(object.logoutRequest) ? LocalAuthAPILogoutRequest.fromJSON(object.logoutRequest) : void 0,
|
|
450
|
+
logoutResponse: isSet(object.logoutResponse) ? LocalAuthAPILogoutResponse.fromJSON(object.logoutResponse) : void 0,
|
|
451
|
+
checkAuthStatusRequest: isSet(object.checkAuthStatusRequest) ? LocalAuthAPICheckAuthStatusRequest.fromJSON(object.checkAuthStatusRequest) : void 0,
|
|
452
|
+
checkAuthStatusResponse: isSet(object.checkAuthStatusResponse) ? LocalAuthAPICheckAuthStatusResponse.fromJSON(object.checkAuthStatusResponse) : void 0
|
|
453
|
+
};
|
|
454
|
+
},
|
|
455
|
+
toJSON(message) {
|
|
456
|
+
const obj = {};
|
|
457
|
+
if (message.requiredFactorsRequest !== void 0) obj.requiredFactorsRequest = LocalAuthAPIRequiredFactorsRequest.toJSON(message.requiredFactorsRequest);
|
|
458
|
+
if (message.requiredFactorsResponse !== void 0) obj.requiredFactorsResponse = LocalAuthAPIRequiredFactorsResponse.toJSON(message.requiredFactorsResponse);
|
|
459
|
+
if (message.loginRequest !== void 0) obj.loginRequest = LocalAuthAPILoginRequest.toJSON(message.loginRequest);
|
|
460
|
+
if (message.loginResponse !== void 0) obj.loginResponse = LocalAuthAPILoginResponse.toJSON(message.loginResponse);
|
|
461
|
+
if (message.logoutRequest !== void 0) obj.logoutRequest = LocalAuthAPILogoutRequest.toJSON(message.logoutRequest);
|
|
462
|
+
if (message.logoutResponse !== void 0) obj.logoutResponse = LocalAuthAPILogoutResponse.toJSON(message.logoutResponse);
|
|
463
|
+
if (message.checkAuthStatusRequest !== void 0) obj.checkAuthStatusRequest = LocalAuthAPICheckAuthStatusRequest.toJSON(message.checkAuthStatusRequest);
|
|
464
|
+
if (message.checkAuthStatusResponse !== void 0) obj.checkAuthStatusResponse = LocalAuthAPICheckAuthStatusResponse.toJSON(message.checkAuthStatusResponse);
|
|
465
|
+
return obj;
|
|
466
|
+
},
|
|
467
|
+
create(base) {
|
|
468
|
+
return LocalAuthMessages.fromPartial(base ?? {});
|
|
469
|
+
},
|
|
470
|
+
fromPartial(object) {
|
|
471
|
+
const message = createBaseLocalAuthMessages();
|
|
472
|
+
message.requiredFactorsRequest = object.requiredFactorsRequest !== void 0 && object.requiredFactorsRequest !== null ? LocalAuthAPIRequiredFactorsRequest.fromPartial(object.requiredFactorsRequest) : void 0;
|
|
473
|
+
message.requiredFactorsResponse = object.requiredFactorsResponse !== void 0 && object.requiredFactorsResponse !== null ? LocalAuthAPIRequiredFactorsResponse.fromPartial(object.requiredFactorsResponse) : void 0;
|
|
474
|
+
message.loginRequest = object.loginRequest !== void 0 && object.loginRequest !== null ? LocalAuthAPILoginRequest.fromPartial(object.loginRequest) : void 0;
|
|
475
|
+
message.loginResponse = object.loginResponse !== void 0 && object.loginResponse !== null ? LocalAuthAPILoginResponse.fromPartial(object.loginResponse) : void 0;
|
|
476
|
+
message.logoutRequest = object.logoutRequest !== void 0 && object.logoutRequest !== null ? LocalAuthAPILogoutRequest.fromPartial(object.logoutRequest) : void 0;
|
|
477
|
+
message.logoutResponse = object.logoutResponse !== void 0 && object.logoutResponse !== null ? LocalAuthAPILogoutResponse.fromPartial(object.logoutResponse) : void 0;
|
|
478
|
+
message.checkAuthStatusRequest = object.checkAuthStatusRequest !== void 0 && object.checkAuthStatusRequest !== null ? LocalAuthAPICheckAuthStatusRequest.fromPartial(object.checkAuthStatusRequest) : void 0;
|
|
479
|
+
message.checkAuthStatusResponse = object.checkAuthStatusResponse !== void 0 && object.checkAuthStatusResponse !== null ? LocalAuthAPICheckAuthStatusResponse.fromPartial(object.checkAuthStatusResponse) : void 0;
|
|
480
|
+
return message;
|
|
481
|
+
}
|
|
482
|
+
};
|
|
483
|
+
function isSet(value) {
|
|
484
|
+
return value !== null && value !== void 0;
|
|
485
|
+
}
|
|
486
|
+
//#endregion
|
|
487
|
+
export { LocalAuthAPICheckAuthStatusRequest, LocalAuthAPICheckAuthStatusResponse, LocalAuthAPILoginRequest, LocalAuthAPILoginResponse, LocalAuthAPILogoutRequest, LocalAuthAPILogoutResponse, LocalAuthAPIRequiredFactorsRequest, LocalAuthAPIRequiredFactorsResponse, LocalAuthMessages, LocalAuthResult, localAuthResultFromJSON, localAuthResultToJSON, protobufPackage };
|
|
@@ -3,11 +3,6 @@ const require_energy_device_google_protobuf_wrappers = require("./google/protobu
|
|
|
3
3
|
let _bufbuild_protobuf_wire = require("@bufbuild/protobuf/wire");
|
|
4
4
|
//#region src/energy_device/networking.ts
|
|
5
5
|
const protobufPackage = "tesla.proto.energy_device.v1";
|
|
6
|
-
/**
|
|
7
|
-
* TESLEMETRY SOURCE-OF-RECORD - no upstream.
|
|
8
|
-
* Provenance: Tesla Energy gateway (TEG) local API, from our own
|
|
9
|
-
* observations and contributions from the community
|
|
10
|
-
*/
|
|
11
6
|
let WifiNetworkSecurityType = /* @__PURE__ */ function(WifiNetworkSecurityType) {
|
|
12
7
|
WifiNetworkSecurityType[WifiNetworkSecurityType["WIFI_NETWORK_SECURITY_TYPE_INVALID"] = 0] = "WIFI_NETWORK_SECURITY_TYPE_INVALID";
|
|
13
8
|
WifiNetworkSecurityType[WifiNetworkSecurityType["WIFI_NETWORK_SECURITY_TYPE_NONE"] = 1] = "WIFI_NETWORK_SECURITY_TYPE_NONE";
|
|
@@ -667,7 +662,9 @@ function createBaseNetworkInterface() {
|
|
|
667
662
|
enabled: false,
|
|
668
663
|
activeRoute: false,
|
|
669
664
|
ipv4Config: void 0,
|
|
670
|
-
connectivityStatus: void 0
|
|
665
|
+
connectivityStatus: void 0,
|
|
666
|
+
deviceState: 0,
|
|
667
|
+
deviceStateReason: 0
|
|
671
668
|
};
|
|
672
669
|
}
|
|
673
670
|
const NetworkInterface = {
|
|
@@ -677,6 +674,8 @@ const NetworkInterface = {
|
|
|
677
674
|
if (message.activeRoute !== false) writer.uint32(24).bool(message.activeRoute);
|
|
678
675
|
if (message.ipv4Config !== void 0) NetworkInterfaceIPv4Config.encode(message.ipv4Config, writer.uint32(34).fork()).join();
|
|
679
676
|
if (message.connectivityStatus !== void 0) NetworkConnectivityStatus.encode(message.connectivityStatus, writer.uint32(42).fork()).join();
|
|
677
|
+
if (message.deviceState !== 0) writer.uint32(48).int32(message.deviceState);
|
|
678
|
+
if (message.deviceStateReason !== 0) writer.uint32(56).int32(message.deviceStateReason);
|
|
680
679
|
return writer;
|
|
681
680
|
},
|
|
682
681
|
decode(input, length) {
|
|
@@ -706,6 +705,14 @@ const NetworkInterface = {
|
|
|
706
705
|
if (tag !== 42) break;
|
|
707
706
|
message.connectivityStatus = NetworkConnectivityStatus.decode(reader, reader.uint32());
|
|
708
707
|
continue;
|
|
708
|
+
case 6:
|
|
709
|
+
if (tag !== 48) break;
|
|
710
|
+
message.deviceState = reader.int32();
|
|
711
|
+
continue;
|
|
712
|
+
case 7:
|
|
713
|
+
if (tag !== 56) break;
|
|
714
|
+
message.deviceStateReason = reader.int32();
|
|
715
|
+
continue;
|
|
709
716
|
}
|
|
710
717
|
if ((tag & 7) === 4 || tag === 0) break;
|
|
711
718
|
reader.skip(tag & 7);
|
|
@@ -718,7 +725,9 @@ const NetworkInterface = {
|
|
|
718
725
|
enabled: isSet(object.enabled) ? globalThis.Boolean(object.enabled) : false,
|
|
719
726
|
activeRoute: isSet(object.activeRoute) ? globalThis.Boolean(object.activeRoute) : false,
|
|
720
727
|
ipv4Config: isSet(object.ipv4Config) ? NetworkInterfaceIPv4Config.fromJSON(object.ipv4Config) : void 0,
|
|
721
|
-
connectivityStatus: isSet(object.connectivityStatus) ? NetworkConnectivityStatus.fromJSON(object.connectivityStatus) : void 0
|
|
728
|
+
connectivityStatus: isSet(object.connectivityStatus) ? NetworkConnectivityStatus.fromJSON(object.connectivityStatus) : void 0,
|
|
729
|
+
deviceState: isSet(object.deviceState) ? networkDeviceStateFromJSON(object.deviceState) : 0,
|
|
730
|
+
deviceStateReason: isSet(object.deviceStateReason) ? networkDeviceStateReasonFromJSON(object.deviceStateReason) : 0
|
|
722
731
|
};
|
|
723
732
|
},
|
|
724
733
|
toJSON(message) {
|
|
@@ -728,6 +737,8 @@ const NetworkInterface = {
|
|
|
728
737
|
if (message.activeRoute !== void 0) obj.activeRoute = message.activeRoute;
|
|
729
738
|
if (message.ipv4Config !== void 0) obj.ipv4Config = NetworkInterfaceIPv4Config.toJSON(message.ipv4Config);
|
|
730
739
|
if (message.connectivityStatus !== void 0) obj.connectivityStatus = NetworkConnectivityStatus.toJSON(message.connectivityStatus);
|
|
740
|
+
if (message.deviceState !== void 0) obj.deviceState = networkDeviceStateToJSON(message.deviceState);
|
|
741
|
+
if (message.deviceStateReason !== void 0) obj.deviceStateReason = networkDeviceStateReasonToJSON(message.deviceStateReason);
|
|
731
742
|
return obj;
|
|
732
743
|
},
|
|
733
744
|
create(base) {
|
|
@@ -740,6 +751,8 @@ const NetworkInterface = {
|
|
|
740
751
|
message.activeRoute = object.activeRoute ?? false;
|
|
741
752
|
message.ipv4Config = object.ipv4Config !== void 0 && object.ipv4Config !== null ? NetworkInterfaceIPv4Config.fromPartial(object.ipv4Config) : void 0;
|
|
742
753
|
message.connectivityStatus = object.connectivityStatus !== void 0 && object.connectivityStatus !== null ? NetworkConnectivityStatus.fromPartial(object.connectivityStatus) : void 0;
|
|
754
|
+
message.deviceState = object.deviceState ?? 0;
|
|
755
|
+
message.deviceStateReason = object.deviceStateReason ?? 0;
|
|
743
756
|
return message;
|
|
744
757
|
}
|
|
745
758
|
};
|
|
@@ -1,11 +1,6 @@
|
|
|
1
1
|
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
2
2
|
//#region src/energy_device/networking.d.ts
|
|
3
3
|
declare const protobufPackage = "tesla.proto.energy_device.v1";
|
|
4
|
-
/**
|
|
5
|
-
* TESLEMETRY SOURCE-OF-RECORD - no upstream.
|
|
6
|
-
* Provenance: Tesla Energy gateway (TEG) local API, from our own
|
|
7
|
-
* observations and contributions from the community
|
|
8
|
-
*/
|
|
9
4
|
declare enum WifiNetworkSecurityType {
|
|
10
5
|
WIFI_NETWORK_SECURITY_TYPE_INVALID = 0,
|
|
11
6
|
WIFI_NETWORK_SECURITY_TYPE_NONE = 1,
|
|
@@ -113,6 +108,8 @@ interface NetworkInterface {
|
|
|
113
108
|
activeRoute: boolean;
|
|
114
109
|
ipv4Config: NetworkInterfaceIPv4Config | undefined;
|
|
115
110
|
connectivityStatus: NetworkConnectivityStatus | undefined;
|
|
111
|
+
deviceState: NetworkDeviceState;
|
|
112
|
+
deviceStateReason: NetworkDeviceStateReason;
|
|
116
113
|
}
|
|
117
114
|
interface CellularEID {
|
|
118
115
|
value: string;
|
|
@@ -1,11 +1,6 @@
|
|
|
1
1
|
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
2
2
|
//#region src/energy_device/networking.d.ts
|
|
3
3
|
declare const protobufPackage = "tesla.proto.energy_device.v1";
|
|
4
|
-
/**
|
|
5
|
-
* TESLEMETRY SOURCE-OF-RECORD - no upstream.
|
|
6
|
-
* Provenance: Tesla Energy gateway (TEG) local API, from our own
|
|
7
|
-
* observations and contributions from the community
|
|
8
|
-
*/
|
|
9
4
|
declare enum WifiNetworkSecurityType {
|
|
10
5
|
WIFI_NETWORK_SECURITY_TYPE_INVALID = 0,
|
|
11
6
|
WIFI_NETWORK_SECURITY_TYPE_NONE = 1,
|
|
@@ -113,6 +108,8 @@ interface NetworkInterface {
|
|
|
113
108
|
activeRoute: boolean;
|
|
114
109
|
ipv4Config: NetworkInterfaceIPv4Config | undefined;
|
|
115
110
|
connectivityStatus: NetworkConnectivityStatus | undefined;
|
|
111
|
+
deviceState: NetworkDeviceState;
|
|
112
|
+
deviceStateReason: NetworkDeviceStateReason;
|
|
116
113
|
}
|
|
117
114
|
interface CellularEID {
|
|
118
115
|
value: string;
|
|
@@ -2,11 +2,6 @@ import { Int32Value, UInt32Value } from "./google/protobuf/wrappers.mjs";
|
|
|
2
2
|
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
3
3
|
//#region src/energy_device/networking.ts
|
|
4
4
|
const protobufPackage = "tesla.proto.energy_device.v1";
|
|
5
|
-
/**
|
|
6
|
-
* TESLEMETRY SOURCE-OF-RECORD - no upstream.
|
|
7
|
-
* Provenance: Tesla Energy gateway (TEG) local API, from our own
|
|
8
|
-
* observations and contributions from the community
|
|
9
|
-
*/
|
|
10
5
|
let WifiNetworkSecurityType = /* @__PURE__ */ function(WifiNetworkSecurityType) {
|
|
11
6
|
WifiNetworkSecurityType[WifiNetworkSecurityType["WIFI_NETWORK_SECURITY_TYPE_INVALID"] = 0] = "WIFI_NETWORK_SECURITY_TYPE_INVALID";
|
|
12
7
|
WifiNetworkSecurityType[WifiNetworkSecurityType["WIFI_NETWORK_SECURITY_TYPE_NONE"] = 1] = "WIFI_NETWORK_SECURITY_TYPE_NONE";
|
|
@@ -666,7 +661,9 @@ function createBaseNetworkInterface() {
|
|
|
666
661
|
enabled: false,
|
|
667
662
|
activeRoute: false,
|
|
668
663
|
ipv4Config: void 0,
|
|
669
|
-
connectivityStatus: void 0
|
|
664
|
+
connectivityStatus: void 0,
|
|
665
|
+
deviceState: 0,
|
|
666
|
+
deviceStateReason: 0
|
|
670
667
|
};
|
|
671
668
|
}
|
|
672
669
|
const NetworkInterface = {
|
|
@@ -676,6 +673,8 @@ const NetworkInterface = {
|
|
|
676
673
|
if (message.activeRoute !== false) writer.uint32(24).bool(message.activeRoute);
|
|
677
674
|
if (message.ipv4Config !== void 0) NetworkInterfaceIPv4Config.encode(message.ipv4Config, writer.uint32(34).fork()).join();
|
|
678
675
|
if (message.connectivityStatus !== void 0) NetworkConnectivityStatus.encode(message.connectivityStatus, writer.uint32(42).fork()).join();
|
|
676
|
+
if (message.deviceState !== 0) writer.uint32(48).int32(message.deviceState);
|
|
677
|
+
if (message.deviceStateReason !== 0) writer.uint32(56).int32(message.deviceStateReason);
|
|
679
678
|
return writer;
|
|
680
679
|
},
|
|
681
680
|
decode(input, length) {
|
|
@@ -705,6 +704,14 @@ const NetworkInterface = {
|
|
|
705
704
|
if (tag !== 42) break;
|
|
706
705
|
message.connectivityStatus = NetworkConnectivityStatus.decode(reader, reader.uint32());
|
|
707
706
|
continue;
|
|
707
|
+
case 6:
|
|
708
|
+
if (tag !== 48) break;
|
|
709
|
+
message.deviceState = reader.int32();
|
|
710
|
+
continue;
|
|
711
|
+
case 7:
|
|
712
|
+
if (tag !== 56) break;
|
|
713
|
+
message.deviceStateReason = reader.int32();
|
|
714
|
+
continue;
|
|
708
715
|
}
|
|
709
716
|
if ((tag & 7) === 4 || tag === 0) break;
|
|
710
717
|
reader.skip(tag & 7);
|
|
@@ -717,7 +724,9 @@ const NetworkInterface = {
|
|
|
717
724
|
enabled: isSet(object.enabled) ? globalThis.Boolean(object.enabled) : false,
|
|
718
725
|
activeRoute: isSet(object.activeRoute) ? globalThis.Boolean(object.activeRoute) : false,
|
|
719
726
|
ipv4Config: isSet(object.ipv4Config) ? NetworkInterfaceIPv4Config.fromJSON(object.ipv4Config) : void 0,
|
|
720
|
-
connectivityStatus: isSet(object.connectivityStatus) ? NetworkConnectivityStatus.fromJSON(object.connectivityStatus) : void 0
|
|
727
|
+
connectivityStatus: isSet(object.connectivityStatus) ? NetworkConnectivityStatus.fromJSON(object.connectivityStatus) : void 0,
|
|
728
|
+
deviceState: isSet(object.deviceState) ? networkDeviceStateFromJSON(object.deviceState) : 0,
|
|
729
|
+
deviceStateReason: isSet(object.deviceStateReason) ? networkDeviceStateReasonFromJSON(object.deviceStateReason) : 0
|
|
721
730
|
};
|
|
722
731
|
},
|
|
723
732
|
toJSON(message) {
|
|
@@ -727,6 +736,8 @@ const NetworkInterface = {
|
|
|
727
736
|
if (message.activeRoute !== void 0) obj.activeRoute = message.activeRoute;
|
|
728
737
|
if (message.ipv4Config !== void 0) obj.ipv4Config = NetworkInterfaceIPv4Config.toJSON(message.ipv4Config);
|
|
729
738
|
if (message.connectivityStatus !== void 0) obj.connectivityStatus = NetworkConnectivityStatus.toJSON(message.connectivityStatus);
|
|
739
|
+
if (message.deviceState !== void 0) obj.deviceState = networkDeviceStateToJSON(message.deviceState);
|
|
740
|
+
if (message.deviceStateReason !== void 0) obj.deviceStateReason = networkDeviceStateReasonToJSON(message.deviceStateReason);
|
|
730
741
|
return obj;
|
|
731
742
|
},
|
|
732
743
|
create(base) {
|
|
@@ -739,6 +750,8 @@ const NetworkInterface = {
|
|
|
739
750
|
message.activeRoute = object.activeRoute ?? false;
|
|
740
751
|
message.ipv4Config = object.ipv4Config !== void 0 && object.ipv4Config !== null ? NetworkInterfaceIPv4Config.fromPartial(object.ipv4Config) : void 0;
|
|
741
752
|
message.connectivityStatus = object.connectivityStatus !== void 0 && object.connectivityStatus !== null ? NetworkConnectivityStatus.fromPartial(object.connectivityStatus) : void 0;
|
|
753
|
+
message.deviceState = object.deviceState ?? 0;
|
|
754
|
+
message.deviceStateReason = object.deviceStateReason ?? 0;
|
|
742
755
|
return message;
|
|
743
756
|
}
|
|
744
757
|
};
|