@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,478 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_energy_device_authorization_types = require("./authorization_types.cjs");
|
|
3
|
+
const require_energy_device_authorization_api = require("./authorization_api.cjs");
|
|
4
|
+
const require_energy_device_common_api = require("./common_api.cjs");
|
|
5
|
+
const require_energy_device_teg_api = require("./teg_api.cjs");
|
|
6
|
+
let _bufbuild_protobuf_wire = require("@bufbuild/protobuf/wire");
|
|
7
|
+
//#region src/energy_device/transport.ts
|
|
8
|
+
const protobufPackage = "tesla.proto.energy_device.v1";
|
|
9
|
+
/**
|
|
10
|
+
* TESLEMETRY SOURCE-OF-RECORD - no upstream.
|
|
11
|
+
* Provenance: Tesla Energy gateway (TEG) local API, from our own
|
|
12
|
+
* observations and contributions from the community
|
|
13
|
+
*/
|
|
14
|
+
let DeliveryChannel = /* @__PURE__ */ function(DeliveryChannel) {
|
|
15
|
+
DeliveryChannel[DeliveryChannel["DELIVERY_CHANNEL_INVALID"] = 0] = "DELIVERY_CHANNEL_INVALID";
|
|
16
|
+
DeliveryChannel[DeliveryChannel["DELIVERY_CHANNEL_LOCAL_HTTPS"] = 1] = "DELIVERY_CHANNEL_LOCAL_HTTPS";
|
|
17
|
+
DeliveryChannel[DeliveryChannel["DELIVERY_CHANNEL_HERMES_COMMAND"] = 2] = "DELIVERY_CHANNEL_HERMES_COMMAND";
|
|
18
|
+
DeliveryChannel[DeliveryChannel["DELIVERY_CHANNEL_BLE"] = 3] = "DELIVERY_CHANNEL_BLE";
|
|
19
|
+
DeliveryChannel[DeliveryChannel["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
20
|
+
return DeliveryChannel;
|
|
21
|
+
}({});
|
|
22
|
+
function deliveryChannelFromJSON(object) {
|
|
23
|
+
switch (object) {
|
|
24
|
+
case 0:
|
|
25
|
+
case "DELIVERY_CHANNEL_INVALID": return 0;
|
|
26
|
+
case 1:
|
|
27
|
+
case "DELIVERY_CHANNEL_LOCAL_HTTPS": return 1;
|
|
28
|
+
case 2:
|
|
29
|
+
case "DELIVERY_CHANNEL_HERMES_COMMAND": return 2;
|
|
30
|
+
case 3:
|
|
31
|
+
case "DELIVERY_CHANNEL_BLE": return 3;
|
|
32
|
+
default: return -1;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
function deliveryChannelToJSON(object) {
|
|
36
|
+
switch (object) {
|
|
37
|
+
case 0: return "DELIVERY_CHANNEL_INVALID";
|
|
38
|
+
case 1: return "DELIVERY_CHANNEL_LOCAL_HTTPS";
|
|
39
|
+
case 2: return "DELIVERY_CHANNEL_HERMES_COMMAND";
|
|
40
|
+
case 3: return "DELIVERY_CHANNEL_BLE";
|
|
41
|
+
default: return "UNRECOGNIZED";
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
let TeslaService = /* @__PURE__ */ function(TeslaService) {
|
|
45
|
+
TeslaService[TeslaService["TESLA_SERVICE_INVALID"] = 0] = "TESLA_SERVICE_INVALID";
|
|
46
|
+
TeslaService[TeslaService["TESLA_SERVICE_COMMAND"] = 1] = "TESLA_SERVICE_COMMAND";
|
|
47
|
+
TeslaService[TeslaService["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
48
|
+
return TeslaService;
|
|
49
|
+
}({});
|
|
50
|
+
function teslaServiceFromJSON(object) {
|
|
51
|
+
switch (object) {
|
|
52
|
+
case 0:
|
|
53
|
+
case "TESLA_SERVICE_INVALID": return 0;
|
|
54
|
+
case 1:
|
|
55
|
+
case "TESLA_SERVICE_COMMAND": return 1;
|
|
56
|
+
default: return -1;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
function teslaServiceToJSON(object) {
|
|
60
|
+
switch (object) {
|
|
61
|
+
case 0: return "TESLA_SERVICE_INVALID";
|
|
62
|
+
case 1: return "TESLA_SERVICE_COMMAND";
|
|
63
|
+
default: return "UNRECOGNIZED";
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
let LocalParticipant = /* @__PURE__ */ function(LocalParticipant) {
|
|
67
|
+
LocalParticipant[LocalParticipant["LOCAL_PARTICIPANT_INVALID"] = 0] = "LOCAL_PARTICIPANT_INVALID";
|
|
68
|
+
LocalParticipant[LocalParticipant["LOCAL_PARTICIPANT_INSTALLER"] = 1] = "LOCAL_PARTICIPANT_INSTALLER";
|
|
69
|
+
LocalParticipant[LocalParticipant["LOCAL_PARTICIPANT_CUSTOMER"] = 2] = "LOCAL_PARTICIPANT_CUSTOMER";
|
|
70
|
+
LocalParticipant[LocalParticipant["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
71
|
+
return LocalParticipant;
|
|
72
|
+
}({});
|
|
73
|
+
function localParticipantFromJSON(object) {
|
|
74
|
+
switch (object) {
|
|
75
|
+
case 0:
|
|
76
|
+
case "LOCAL_PARTICIPANT_INVALID": return 0;
|
|
77
|
+
case 1:
|
|
78
|
+
case "LOCAL_PARTICIPANT_INSTALLER": return 1;
|
|
79
|
+
case 2:
|
|
80
|
+
case "LOCAL_PARTICIPANT_CUSTOMER": return 2;
|
|
81
|
+
default: return -1;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
function localParticipantToJSON(object) {
|
|
85
|
+
switch (object) {
|
|
86
|
+
case 0: return "LOCAL_PARTICIPANT_INVALID";
|
|
87
|
+
case 1: return "LOCAL_PARTICIPANT_INSTALLER";
|
|
88
|
+
case 2: return "LOCAL_PARTICIPANT_CUSTOMER";
|
|
89
|
+
default: return "UNRECOGNIZED";
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
let ExternalAuthType = /* @__PURE__ */ function(ExternalAuthType) {
|
|
93
|
+
ExternalAuthType[ExternalAuthType["EXTERNAL_AUTH_TYPE_INVALID"] = 0] = "EXTERNAL_AUTH_TYPE_INVALID";
|
|
94
|
+
ExternalAuthType[ExternalAuthType["EXTERNAL_AUTH_TYPE_PRESENCE"] = 1] = "EXTERNAL_AUTH_TYPE_PRESENCE";
|
|
95
|
+
ExternalAuthType[ExternalAuthType["EXTERNAL_AUTH_TYPE_MTLS"] = 2] = "EXTERNAL_AUTH_TYPE_MTLS";
|
|
96
|
+
ExternalAuthType[ExternalAuthType["EXTERNAL_AUTH_TYPE_HERMES_COMMAND"] = 4] = "EXTERNAL_AUTH_TYPE_HERMES_COMMAND";
|
|
97
|
+
ExternalAuthType[ExternalAuthType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
98
|
+
return ExternalAuthType;
|
|
99
|
+
}({});
|
|
100
|
+
function externalAuthTypeFromJSON(object) {
|
|
101
|
+
switch (object) {
|
|
102
|
+
case 0:
|
|
103
|
+
case "EXTERNAL_AUTH_TYPE_INVALID": return 0;
|
|
104
|
+
case 1:
|
|
105
|
+
case "EXTERNAL_AUTH_TYPE_PRESENCE": return 1;
|
|
106
|
+
case 2:
|
|
107
|
+
case "EXTERNAL_AUTH_TYPE_MTLS": return 2;
|
|
108
|
+
case 4:
|
|
109
|
+
case "EXTERNAL_AUTH_TYPE_HERMES_COMMAND": return 4;
|
|
110
|
+
default: return -1;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
function externalAuthTypeToJSON(object) {
|
|
114
|
+
switch (object) {
|
|
115
|
+
case 0: return "EXTERNAL_AUTH_TYPE_INVALID";
|
|
116
|
+
case 1: return "EXTERNAL_AUTH_TYPE_PRESENCE";
|
|
117
|
+
case 2: return "EXTERNAL_AUTH_TYPE_MTLS";
|
|
118
|
+
case 4: return "EXTERNAL_AUTH_TYPE_HERMES_COMMAND";
|
|
119
|
+
default: return "UNRECOGNIZED";
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
function createBaseExternalAuth() {
|
|
123
|
+
return { type: 0 };
|
|
124
|
+
}
|
|
125
|
+
const ExternalAuth = {
|
|
126
|
+
encode(message, writer = new _bufbuild_protobuf_wire.BinaryWriter()) {
|
|
127
|
+
if (message.type !== 0) writer.uint32(8).int32(message.type);
|
|
128
|
+
return writer;
|
|
129
|
+
},
|
|
130
|
+
decode(input, length) {
|
|
131
|
+
const reader = input instanceof _bufbuild_protobuf_wire.BinaryReader ? input : new _bufbuild_protobuf_wire.BinaryReader(input);
|
|
132
|
+
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
133
|
+
const message = createBaseExternalAuth();
|
|
134
|
+
while (reader.pos < end) {
|
|
135
|
+
const tag = reader.uint32();
|
|
136
|
+
switch (tag >>> 3) {
|
|
137
|
+
case 1:
|
|
138
|
+
if (tag !== 8) break;
|
|
139
|
+
message.type = reader.int32();
|
|
140
|
+
continue;
|
|
141
|
+
}
|
|
142
|
+
if ((tag & 7) === 4 || tag === 0) break;
|
|
143
|
+
reader.skip(tag & 7);
|
|
144
|
+
}
|
|
145
|
+
return message;
|
|
146
|
+
},
|
|
147
|
+
fromJSON(object) {
|
|
148
|
+
return { type: isSet(object.type) ? externalAuthTypeFromJSON(object.type) : 0 };
|
|
149
|
+
},
|
|
150
|
+
toJSON(message) {
|
|
151
|
+
const obj = {};
|
|
152
|
+
if (message.type !== void 0) obj.type = externalAuthTypeToJSON(message.type);
|
|
153
|
+
return obj;
|
|
154
|
+
},
|
|
155
|
+
create(base) {
|
|
156
|
+
return ExternalAuth.fromPartial(base ?? {});
|
|
157
|
+
},
|
|
158
|
+
fromPartial(object) {
|
|
159
|
+
const message = createBaseExternalAuth();
|
|
160
|
+
message.type = object.type ?? 0;
|
|
161
|
+
return message;
|
|
162
|
+
}
|
|
163
|
+
};
|
|
164
|
+
function createBaseAuthEnvelope() {
|
|
165
|
+
return {
|
|
166
|
+
payload: /* @__PURE__ */ new Uint8Array(0),
|
|
167
|
+
externalAuth: void 0
|
|
168
|
+
};
|
|
169
|
+
}
|
|
170
|
+
const AuthEnvelope = {
|
|
171
|
+
encode(message, writer = new _bufbuild_protobuf_wire.BinaryWriter()) {
|
|
172
|
+
if (message.payload.length !== 0) writer.uint32(10).bytes(message.payload);
|
|
173
|
+
if (message.externalAuth !== void 0) ExternalAuth.encode(message.externalAuth, writer.uint32(18).fork()).join();
|
|
174
|
+
return writer;
|
|
175
|
+
},
|
|
176
|
+
decode(input, length) {
|
|
177
|
+
const reader = input instanceof _bufbuild_protobuf_wire.BinaryReader ? input : new _bufbuild_protobuf_wire.BinaryReader(input);
|
|
178
|
+
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
179
|
+
const message = createBaseAuthEnvelope();
|
|
180
|
+
while (reader.pos < end) {
|
|
181
|
+
const tag = reader.uint32();
|
|
182
|
+
switch (tag >>> 3) {
|
|
183
|
+
case 1:
|
|
184
|
+
if (tag !== 10) break;
|
|
185
|
+
message.payload = reader.bytes();
|
|
186
|
+
continue;
|
|
187
|
+
case 2:
|
|
188
|
+
if (tag !== 18) break;
|
|
189
|
+
message.externalAuth = ExternalAuth.decode(reader, reader.uint32());
|
|
190
|
+
continue;
|
|
191
|
+
}
|
|
192
|
+
if ((tag & 7) === 4 || tag === 0) break;
|
|
193
|
+
reader.skip(tag & 7);
|
|
194
|
+
}
|
|
195
|
+
return message;
|
|
196
|
+
},
|
|
197
|
+
fromJSON(object) {
|
|
198
|
+
return {
|
|
199
|
+
payload: isSet(object.payload) ? bytesFromBase64(object.payload) : /* @__PURE__ */ new Uint8Array(0),
|
|
200
|
+
externalAuth: isSet(object.externalAuth) ? ExternalAuth.fromJSON(object.externalAuth) : void 0
|
|
201
|
+
};
|
|
202
|
+
},
|
|
203
|
+
toJSON(message) {
|
|
204
|
+
const obj = {};
|
|
205
|
+
if (message.payload !== void 0) obj.payload = base64FromBytes(message.payload);
|
|
206
|
+
if (message.externalAuth !== void 0) obj.externalAuth = ExternalAuth.toJSON(message.externalAuth);
|
|
207
|
+
return obj;
|
|
208
|
+
},
|
|
209
|
+
create(base) {
|
|
210
|
+
return AuthEnvelope.fromPartial(base ?? {});
|
|
211
|
+
},
|
|
212
|
+
fromPartial(object) {
|
|
213
|
+
const message = createBaseAuthEnvelope();
|
|
214
|
+
message.payload = object.payload ?? /* @__PURE__ */ new Uint8Array(0);
|
|
215
|
+
message.externalAuth = object.externalAuth !== void 0 && object.externalAuth !== null ? ExternalAuth.fromPartial(object.externalAuth) : void 0;
|
|
216
|
+
return message;
|
|
217
|
+
}
|
|
218
|
+
};
|
|
219
|
+
function createBaseParticipant() {
|
|
220
|
+
return {
|
|
221
|
+
din: void 0,
|
|
222
|
+
teslaService: void 0,
|
|
223
|
+
local: void 0,
|
|
224
|
+
authorizedClient: void 0
|
|
225
|
+
};
|
|
226
|
+
}
|
|
227
|
+
const Participant = {
|
|
228
|
+
encode(message, writer = new _bufbuild_protobuf_wire.BinaryWriter()) {
|
|
229
|
+
if (message.din !== void 0) writer.uint32(10).string(message.din);
|
|
230
|
+
if (message.teslaService !== void 0) writer.uint32(16).int32(message.teslaService);
|
|
231
|
+
if (message.local !== void 0) writer.uint32(24).int32(message.local);
|
|
232
|
+
if (message.authorizedClient !== void 0) writer.uint32(32).int32(message.authorizedClient);
|
|
233
|
+
return writer;
|
|
234
|
+
},
|
|
235
|
+
decode(input, length) {
|
|
236
|
+
const reader = input instanceof _bufbuild_protobuf_wire.BinaryReader ? input : new _bufbuild_protobuf_wire.BinaryReader(input);
|
|
237
|
+
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
238
|
+
const message = createBaseParticipant();
|
|
239
|
+
while (reader.pos < end) {
|
|
240
|
+
const tag = reader.uint32();
|
|
241
|
+
switch (tag >>> 3) {
|
|
242
|
+
case 1:
|
|
243
|
+
if (tag !== 10) break;
|
|
244
|
+
message.din = reader.string();
|
|
245
|
+
continue;
|
|
246
|
+
case 2:
|
|
247
|
+
if (tag !== 16) break;
|
|
248
|
+
message.teslaService = reader.int32();
|
|
249
|
+
continue;
|
|
250
|
+
case 3:
|
|
251
|
+
if (tag !== 24) break;
|
|
252
|
+
message.local = reader.int32();
|
|
253
|
+
continue;
|
|
254
|
+
case 4:
|
|
255
|
+
if (tag !== 32) break;
|
|
256
|
+
message.authorizedClient = reader.int32();
|
|
257
|
+
continue;
|
|
258
|
+
}
|
|
259
|
+
if ((tag & 7) === 4 || tag === 0) break;
|
|
260
|
+
reader.skip(tag & 7);
|
|
261
|
+
}
|
|
262
|
+
return message;
|
|
263
|
+
},
|
|
264
|
+
fromJSON(object) {
|
|
265
|
+
return {
|
|
266
|
+
din: isSet(object.din) ? globalThis.String(object.din) : void 0,
|
|
267
|
+
teslaService: isSet(object.teslaService) ? teslaServiceFromJSON(object.teslaService) : void 0,
|
|
268
|
+
local: isSet(object.local) ? localParticipantFromJSON(object.local) : void 0,
|
|
269
|
+
authorizedClient: isSet(object.authorizedClient) ? require_energy_device_authorization_types.authorizedClientTypeFromJSON(object.authorizedClient) : void 0
|
|
270
|
+
};
|
|
271
|
+
},
|
|
272
|
+
toJSON(message) {
|
|
273
|
+
const obj = {};
|
|
274
|
+
if (message.din !== void 0) obj.din = message.din;
|
|
275
|
+
if (message.teslaService !== void 0) obj.teslaService = teslaServiceToJSON(message.teslaService);
|
|
276
|
+
if (message.local !== void 0) obj.local = localParticipantToJSON(message.local);
|
|
277
|
+
if (message.authorizedClient !== void 0) obj.authorizedClient = require_energy_device_authorization_types.authorizedClientTypeToJSON(message.authorizedClient);
|
|
278
|
+
return obj;
|
|
279
|
+
},
|
|
280
|
+
create(base) {
|
|
281
|
+
return Participant.fromPartial(base ?? {});
|
|
282
|
+
},
|
|
283
|
+
fromPartial(object) {
|
|
284
|
+
const message = createBaseParticipant();
|
|
285
|
+
message.din = object.din ?? void 0;
|
|
286
|
+
message.teslaService = object.teslaService ?? void 0;
|
|
287
|
+
message.local = object.local ?? void 0;
|
|
288
|
+
message.authorizedClient = object.authorizedClient ?? void 0;
|
|
289
|
+
return message;
|
|
290
|
+
}
|
|
291
|
+
};
|
|
292
|
+
function createBaseRegistrationPayload() {
|
|
293
|
+
return {
|
|
294
|
+
customerRegistrationInfo: /* @__PURE__ */ new Uint8Array(0),
|
|
295
|
+
nonce: /* @__PURE__ */ new Uint8Array(0)
|
|
296
|
+
};
|
|
297
|
+
}
|
|
298
|
+
const RegistrationPayload = {
|
|
299
|
+
encode(message, writer = new _bufbuild_protobuf_wire.BinaryWriter()) {
|
|
300
|
+
if (message.customerRegistrationInfo.length !== 0) writer.uint32(10).bytes(message.customerRegistrationInfo);
|
|
301
|
+
if (message.nonce.length !== 0) writer.uint32(18).bytes(message.nonce);
|
|
302
|
+
return writer;
|
|
303
|
+
},
|
|
304
|
+
decode(input, length) {
|
|
305
|
+
const reader = input instanceof _bufbuild_protobuf_wire.BinaryReader ? input : new _bufbuild_protobuf_wire.BinaryReader(input);
|
|
306
|
+
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
307
|
+
const message = createBaseRegistrationPayload();
|
|
308
|
+
while (reader.pos < end) {
|
|
309
|
+
const tag = reader.uint32();
|
|
310
|
+
switch (tag >>> 3) {
|
|
311
|
+
case 1:
|
|
312
|
+
if (tag !== 10) break;
|
|
313
|
+
message.customerRegistrationInfo = reader.bytes();
|
|
314
|
+
continue;
|
|
315
|
+
case 2:
|
|
316
|
+
if (tag !== 18) break;
|
|
317
|
+
message.nonce = reader.bytes();
|
|
318
|
+
continue;
|
|
319
|
+
}
|
|
320
|
+
if ((tag & 7) === 4 || tag === 0) break;
|
|
321
|
+
reader.skip(tag & 7);
|
|
322
|
+
}
|
|
323
|
+
return message;
|
|
324
|
+
},
|
|
325
|
+
fromJSON(object) {
|
|
326
|
+
return {
|
|
327
|
+
customerRegistrationInfo: isSet(object.customerRegistrationInfo) ? bytesFromBase64(object.customerRegistrationInfo) : /* @__PURE__ */ new Uint8Array(0),
|
|
328
|
+
nonce: isSet(object.nonce) ? bytesFromBase64(object.nonce) : /* @__PURE__ */ new Uint8Array(0)
|
|
329
|
+
};
|
|
330
|
+
},
|
|
331
|
+
toJSON(message) {
|
|
332
|
+
const obj = {};
|
|
333
|
+
if (message.customerRegistrationInfo !== void 0) obj.customerRegistrationInfo = base64FromBytes(message.customerRegistrationInfo);
|
|
334
|
+
if (message.nonce !== void 0) obj.nonce = base64FromBytes(message.nonce);
|
|
335
|
+
return obj;
|
|
336
|
+
},
|
|
337
|
+
create(base) {
|
|
338
|
+
return RegistrationPayload.fromPartial(base ?? {});
|
|
339
|
+
},
|
|
340
|
+
fromPartial(object) {
|
|
341
|
+
const message = createBaseRegistrationPayload();
|
|
342
|
+
message.customerRegistrationInfo = object.customerRegistrationInfo ?? /* @__PURE__ */ new Uint8Array(0);
|
|
343
|
+
message.nonce = object.nonce ?? /* @__PURE__ */ new Uint8Array(0);
|
|
344
|
+
return message;
|
|
345
|
+
}
|
|
346
|
+
};
|
|
347
|
+
function createBaseMessageEnvelope() {
|
|
348
|
+
return {
|
|
349
|
+
deliveryChannel: 0,
|
|
350
|
+
sender: void 0,
|
|
351
|
+
recipient: void 0,
|
|
352
|
+
common: void 0,
|
|
353
|
+
teg: void 0,
|
|
354
|
+
authorization: void 0
|
|
355
|
+
};
|
|
356
|
+
}
|
|
357
|
+
const MessageEnvelope = {
|
|
358
|
+
encode(message, writer = new _bufbuild_protobuf_wire.BinaryWriter()) {
|
|
359
|
+
if (message.deliveryChannel !== 0) writer.uint32(8).int32(message.deliveryChannel);
|
|
360
|
+
if (message.sender !== void 0) Participant.encode(message.sender, writer.uint32(18).fork()).join();
|
|
361
|
+
if (message.recipient !== void 0) Participant.encode(message.recipient, writer.uint32(26).fork()).join();
|
|
362
|
+
if (message.common !== void 0) require_energy_device_common_api.CommonMessages.encode(message.common, writer.uint32(34).fork()).join();
|
|
363
|
+
if (message.teg !== void 0) require_energy_device_teg_api.TEGMessages.encode(message.teg, writer.uint32(42).fork()).join();
|
|
364
|
+
if (message.authorization !== void 0) require_energy_device_authorization_api.AuthorizationMessages.encode(message.authorization, writer.uint32(98).fork()).join();
|
|
365
|
+
return writer;
|
|
366
|
+
},
|
|
367
|
+
decode(input, length) {
|
|
368
|
+
const reader = input instanceof _bufbuild_protobuf_wire.BinaryReader ? input : new _bufbuild_protobuf_wire.BinaryReader(input);
|
|
369
|
+
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
370
|
+
const message = createBaseMessageEnvelope();
|
|
371
|
+
while (reader.pos < end) {
|
|
372
|
+
const tag = reader.uint32();
|
|
373
|
+
switch (tag >>> 3) {
|
|
374
|
+
case 1:
|
|
375
|
+
if (tag !== 8) break;
|
|
376
|
+
message.deliveryChannel = reader.int32();
|
|
377
|
+
continue;
|
|
378
|
+
case 2:
|
|
379
|
+
if (tag !== 18) break;
|
|
380
|
+
message.sender = Participant.decode(reader, reader.uint32());
|
|
381
|
+
continue;
|
|
382
|
+
case 3:
|
|
383
|
+
if (tag !== 26) break;
|
|
384
|
+
message.recipient = Participant.decode(reader, reader.uint32());
|
|
385
|
+
continue;
|
|
386
|
+
case 4:
|
|
387
|
+
if (tag !== 34) break;
|
|
388
|
+
message.common = require_energy_device_common_api.CommonMessages.decode(reader, reader.uint32());
|
|
389
|
+
continue;
|
|
390
|
+
case 5:
|
|
391
|
+
if (tag !== 42) break;
|
|
392
|
+
message.teg = require_energy_device_teg_api.TEGMessages.decode(reader, reader.uint32());
|
|
393
|
+
continue;
|
|
394
|
+
case 12:
|
|
395
|
+
if (tag !== 98) break;
|
|
396
|
+
message.authorization = require_energy_device_authorization_api.AuthorizationMessages.decode(reader, reader.uint32());
|
|
397
|
+
continue;
|
|
398
|
+
}
|
|
399
|
+
if ((tag & 7) === 4 || tag === 0) break;
|
|
400
|
+
reader.skip(tag & 7);
|
|
401
|
+
}
|
|
402
|
+
return message;
|
|
403
|
+
},
|
|
404
|
+
fromJSON(object) {
|
|
405
|
+
return {
|
|
406
|
+
deliveryChannel: isSet(object.deliveryChannel) ? deliveryChannelFromJSON(object.deliveryChannel) : 0,
|
|
407
|
+
sender: isSet(object.sender) ? Participant.fromJSON(object.sender) : void 0,
|
|
408
|
+
recipient: isSet(object.recipient) ? Participant.fromJSON(object.recipient) : void 0,
|
|
409
|
+
common: isSet(object.common) ? require_energy_device_common_api.CommonMessages.fromJSON(object.common) : void 0,
|
|
410
|
+
teg: isSet(object.teg) ? require_energy_device_teg_api.TEGMessages.fromJSON(object.teg) : void 0,
|
|
411
|
+
authorization: isSet(object.authorization) ? require_energy_device_authorization_api.AuthorizationMessages.fromJSON(object.authorization) : void 0
|
|
412
|
+
};
|
|
413
|
+
},
|
|
414
|
+
toJSON(message) {
|
|
415
|
+
const obj = {};
|
|
416
|
+
if (message.deliveryChannel !== void 0) obj.deliveryChannel = deliveryChannelToJSON(message.deliveryChannel);
|
|
417
|
+
if (message.sender !== void 0) obj.sender = Participant.toJSON(message.sender);
|
|
418
|
+
if (message.recipient !== void 0) obj.recipient = Participant.toJSON(message.recipient);
|
|
419
|
+
if (message.common !== void 0) obj.common = require_energy_device_common_api.CommonMessages.toJSON(message.common);
|
|
420
|
+
if (message.teg !== void 0) obj.teg = require_energy_device_teg_api.TEGMessages.toJSON(message.teg);
|
|
421
|
+
if (message.authorization !== void 0) obj.authorization = require_energy_device_authorization_api.AuthorizationMessages.toJSON(message.authorization);
|
|
422
|
+
return obj;
|
|
423
|
+
},
|
|
424
|
+
create(base) {
|
|
425
|
+
return MessageEnvelope.fromPartial(base ?? {});
|
|
426
|
+
},
|
|
427
|
+
fromPartial(object) {
|
|
428
|
+
const message = createBaseMessageEnvelope();
|
|
429
|
+
message.deliveryChannel = object.deliveryChannel ?? 0;
|
|
430
|
+
message.sender = object.sender !== void 0 && object.sender !== null ? Participant.fromPartial(object.sender) : void 0;
|
|
431
|
+
message.recipient = object.recipient !== void 0 && object.recipient !== null ? Participant.fromPartial(object.recipient) : void 0;
|
|
432
|
+
message.common = object.common !== void 0 && object.common !== null ? require_energy_device_common_api.CommonMessages.fromPartial(object.common) : void 0;
|
|
433
|
+
message.teg = object.teg !== void 0 && object.teg !== null ? require_energy_device_teg_api.TEGMessages.fromPartial(object.teg) : void 0;
|
|
434
|
+
message.authorization = object.authorization !== void 0 && object.authorization !== null ? require_energy_device_authorization_api.AuthorizationMessages.fromPartial(object.authorization) : void 0;
|
|
435
|
+
return message;
|
|
436
|
+
}
|
|
437
|
+
};
|
|
438
|
+
function bytesFromBase64(b64) {
|
|
439
|
+
if (globalThis.Buffer) return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
|
|
440
|
+
else {
|
|
441
|
+
const bin = globalThis.atob(b64);
|
|
442
|
+
const arr = new Uint8Array(bin.length);
|
|
443
|
+
for (let i = 0; i < bin.length; ++i) arr[i] = bin.charCodeAt(i);
|
|
444
|
+
return arr;
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
function base64FromBytes(arr) {
|
|
448
|
+
if (globalThis.Buffer) return globalThis.Buffer.from(arr).toString("base64");
|
|
449
|
+
else {
|
|
450
|
+
const bin = [];
|
|
451
|
+
arr.forEach((byte) => {
|
|
452
|
+
bin.push(globalThis.String.fromCharCode(byte));
|
|
453
|
+
});
|
|
454
|
+
return globalThis.btoa(bin.join(""));
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
function isSet(value) {
|
|
458
|
+
return value !== null && value !== void 0;
|
|
459
|
+
}
|
|
460
|
+
//#endregion
|
|
461
|
+
exports.AuthEnvelope = AuthEnvelope;
|
|
462
|
+
exports.DeliveryChannel = DeliveryChannel;
|
|
463
|
+
exports.ExternalAuth = ExternalAuth;
|
|
464
|
+
exports.ExternalAuthType = ExternalAuthType;
|
|
465
|
+
exports.LocalParticipant = LocalParticipant;
|
|
466
|
+
exports.MessageEnvelope = MessageEnvelope;
|
|
467
|
+
exports.Participant = Participant;
|
|
468
|
+
exports.RegistrationPayload = RegistrationPayload;
|
|
469
|
+
exports.TeslaService = TeslaService;
|
|
470
|
+
exports.deliveryChannelFromJSON = deliveryChannelFromJSON;
|
|
471
|
+
exports.deliveryChannelToJSON = deliveryChannelToJSON;
|
|
472
|
+
exports.externalAuthTypeFromJSON = externalAuthTypeFromJSON;
|
|
473
|
+
exports.externalAuthTypeToJSON = externalAuthTypeToJSON;
|
|
474
|
+
exports.localParticipantFromJSON = localParticipantFromJSON;
|
|
475
|
+
exports.localParticipantToJSON = localParticipantToJSON;
|
|
476
|
+
exports.protobufPackage = protobufPackage;
|
|
477
|
+
exports.teslaServiceFromJSON = teslaServiceFromJSON;
|
|
478
|
+
exports.teslaServiceToJSON = teslaServiceToJSON;
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { AuthorizedClientType } from "./authorization_types.cjs";
|
|
2
|
+
import { AuthorizationMessages } from "./authorization_api.cjs";
|
|
3
|
+
import { CommonMessages } from "./common_api.cjs";
|
|
4
|
+
import { TEGMessages } from "./teg_api.cjs";
|
|
5
|
+
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
6
|
+
//#region src/energy_device/transport.d.ts
|
|
7
|
+
declare const protobufPackage = "tesla.proto.energy_device.v1";
|
|
8
|
+
/**
|
|
9
|
+
* TESLEMETRY SOURCE-OF-RECORD - no upstream.
|
|
10
|
+
* Provenance: Tesla Energy gateway (TEG) local API, from our own
|
|
11
|
+
* observations and contributions from the community
|
|
12
|
+
*/
|
|
13
|
+
declare enum DeliveryChannel {
|
|
14
|
+
DELIVERY_CHANNEL_INVALID = 0,
|
|
15
|
+
DELIVERY_CHANNEL_LOCAL_HTTPS = 1,
|
|
16
|
+
DELIVERY_CHANNEL_HERMES_COMMAND = 2,
|
|
17
|
+
DELIVERY_CHANNEL_BLE = 3,
|
|
18
|
+
UNRECOGNIZED = -1
|
|
19
|
+
}
|
|
20
|
+
declare function deliveryChannelFromJSON(object: any): DeliveryChannel;
|
|
21
|
+
declare function deliveryChannelToJSON(object: DeliveryChannel): string;
|
|
22
|
+
declare enum TeslaService {
|
|
23
|
+
TESLA_SERVICE_INVALID = 0,
|
|
24
|
+
TESLA_SERVICE_COMMAND = 1,
|
|
25
|
+
UNRECOGNIZED = -1
|
|
26
|
+
}
|
|
27
|
+
declare function teslaServiceFromJSON(object: any): TeslaService;
|
|
28
|
+
declare function teslaServiceToJSON(object: TeslaService): string;
|
|
29
|
+
declare enum LocalParticipant {
|
|
30
|
+
LOCAL_PARTICIPANT_INVALID = 0,
|
|
31
|
+
LOCAL_PARTICIPANT_INSTALLER = 1,
|
|
32
|
+
LOCAL_PARTICIPANT_CUSTOMER = 2,
|
|
33
|
+
UNRECOGNIZED = -1
|
|
34
|
+
}
|
|
35
|
+
declare function localParticipantFromJSON(object: any): LocalParticipant;
|
|
36
|
+
declare function localParticipantToJSON(object: LocalParticipant): string;
|
|
37
|
+
declare enum ExternalAuthType {
|
|
38
|
+
EXTERNAL_AUTH_TYPE_INVALID = 0,
|
|
39
|
+
EXTERNAL_AUTH_TYPE_PRESENCE = 1,
|
|
40
|
+
EXTERNAL_AUTH_TYPE_MTLS = 2,
|
|
41
|
+
EXTERNAL_AUTH_TYPE_HERMES_COMMAND = 4,
|
|
42
|
+
UNRECOGNIZED = -1
|
|
43
|
+
}
|
|
44
|
+
declare function externalAuthTypeFromJSON(object: any): ExternalAuthType;
|
|
45
|
+
declare function externalAuthTypeToJSON(object: ExternalAuthType): string;
|
|
46
|
+
interface ExternalAuth {
|
|
47
|
+
type: ExternalAuthType;
|
|
48
|
+
}
|
|
49
|
+
interface AuthEnvelope {
|
|
50
|
+
payload: Uint8Array;
|
|
51
|
+
externalAuth?: ExternalAuth | undefined;
|
|
52
|
+
}
|
|
53
|
+
interface Participant {
|
|
54
|
+
/** Device Identification Number (DIN) */
|
|
55
|
+
din?: string | undefined;
|
|
56
|
+
teslaService?: TeslaService | undefined;
|
|
57
|
+
local?: LocalParticipant | undefined;
|
|
58
|
+
authorizedClient?: AuthorizedClientType | undefined;
|
|
59
|
+
}
|
|
60
|
+
interface RegistrationPayload {
|
|
61
|
+
customerRegistrationInfo: Uint8Array;
|
|
62
|
+
nonce: Uint8Array;
|
|
63
|
+
}
|
|
64
|
+
interface MessageEnvelope {
|
|
65
|
+
deliveryChannel: DeliveryChannel;
|
|
66
|
+
sender: Participant | undefined;
|
|
67
|
+
recipient: Participant | undefined;
|
|
68
|
+
common?: CommonMessages | undefined;
|
|
69
|
+
teg?: TEGMessages | undefined;
|
|
70
|
+
/**
|
|
71
|
+
* WCMessages wc = 6;
|
|
72
|
+
* NeurioMeterMessages neuriometer = 9;
|
|
73
|
+
* EnergySiteNetMessages energysitenet = 10;
|
|
74
|
+
*/
|
|
75
|
+
authorization?: AuthorizationMessages | undefined;
|
|
76
|
+
}
|
|
77
|
+
declare const ExternalAuth: MessageFns<ExternalAuth>;
|
|
78
|
+
declare const AuthEnvelope: MessageFns<AuthEnvelope>;
|
|
79
|
+
declare const Participant: MessageFns<Participant>;
|
|
80
|
+
declare const RegistrationPayload: MessageFns<RegistrationPayload>;
|
|
81
|
+
declare const MessageEnvelope: MessageFns<MessageEnvelope>;
|
|
82
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
83
|
+
type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? { [K in keyof T]?: DeepPartial<T[K]>; } : Partial<T>;
|
|
84
|
+
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
85
|
+
type Exact<P, I extends P> = P extends Builtin ? P : P & { [K in keyof P]: Exact<P[K], I[K]>; } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never; };
|
|
86
|
+
interface MessageFns<T> {
|
|
87
|
+
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
88
|
+
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
89
|
+
fromJSON(object: any): T;
|
|
90
|
+
toJSON(message: T): unknown;
|
|
91
|
+
create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
|
|
92
|
+
fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
|
|
93
|
+
}
|
|
94
|
+
//#endregion
|
|
95
|
+
export { AuthEnvelope, DeepPartial, DeliveryChannel, Exact, ExternalAuth, ExternalAuthType, LocalParticipant, MessageEnvelope, MessageFns, Participant, RegistrationPayload, TeslaService, deliveryChannelFromJSON, deliveryChannelToJSON, externalAuthTypeFromJSON, externalAuthTypeToJSON, localParticipantFromJSON, localParticipantToJSON, protobufPackage, teslaServiceFromJSON, teslaServiceToJSON };
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { AuthorizedClientType } from "./authorization_types.mjs";
|
|
2
|
+
import { AuthorizationMessages } from "./authorization_api.mjs";
|
|
3
|
+
import { CommonMessages } from "./common_api.mjs";
|
|
4
|
+
import { TEGMessages } from "./teg_api.mjs";
|
|
5
|
+
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
6
|
+
//#region src/energy_device/transport.d.ts
|
|
7
|
+
declare const protobufPackage = "tesla.proto.energy_device.v1";
|
|
8
|
+
/**
|
|
9
|
+
* TESLEMETRY SOURCE-OF-RECORD - no upstream.
|
|
10
|
+
* Provenance: Tesla Energy gateway (TEG) local API, from our own
|
|
11
|
+
* observations and contributions from the community
|
|
12
|
+
*/
|
|
13
|
+
declare enum DeliveryChannel {
|
|
14
|
+
DELIVERY_CHANNEL_INVALID = 0,
|
|
15
|
+
DELIVERY_CHANNEL_LOCAL_HTTPS = 1,
|
|
16
|
+
DELIVERY_CHANNEL_HERMES_COMMAND = 2,
|
|
17
|
+
DELIVERY_CHANNEL_BLE = 3,
|
|
18
|
+
UNRECOGNIZED = -1
|
|
19
|
+
}
|
|
20
|
+
declare function deliveryChannelFromJSON(object: any): DeliveryChannel;
|
|
21
|
+
declare function deliveryChannelToJSON(object: DeliveryChannel): string;
|
|
22
|
+
declare enum TeslaService {
|
|
23
|
+
TESLA_SERVICE_INVALID = 0,
|
|
24
|
+
TESLA_SERVICE_COMMAND = 1,
|
|
25
|
+
UNRECOGNIZED = -1
|
|
26
|
+
}
|
|
27
|
+
declare function teslaServiceFromJSON(object: any): TeslaService;
|
|
28
|
+
declare function teslaServiceToJSON(object: TeslaService): string;
|
|
29
|
+
declare enum LocalParticipant {
|
|
30
|
+
LOCAL_PARTICIPANT_INVALID = 0,
|
|
31
|
+
LOCAL_PARTICIPANT_INSTALLER = 1,
|
|
32
|
+
LOCAL_PARTICIPANT_CUSTOMER = 2,
|
|
33
|
+
UNRECOGNIZED = -1
|
|
34
|
+
}
|
|
35
|
+
declare function localParticipantFromJSON(object: any): LocalParticipant;
|
|
36
|
+
declare function localParticipantToJSON(object: LocalParticipant): string;
|
|
37
|
+
declare enum ExternalAuthType {
|
|
38
|
+
EXTERNAL_AUTH_TYPE_INVALID = 0,
|
|
39
|
+
EXTERNAL_AUTH_TYPE_PRESENCE = 1,
|
|
40
|
+
EXTERNAL_AUTH_TYPE_MTLS = 2,
|
|
41
|
+
EXTERNAL_AUTH_TYPE_HERMES_COMMAND = 4,
|
|
42
|
+
UNRECOGNIZED = -1
|
|
43
|
+
}
|
|
44
|
+
declare function externalAuthTypeFromJSON(object: any): ExternalAuthType;
|
|
45
|
+
declare function externalAuthTypeToJSON(object: ExternalAuthType): string;
|
|
46
|
+
interface ExternalAuth {
|
|
47
|
+
type: ExternalAuthType;
|
|
48
|
+
}
|
|
49
|
+
interface AuthEnvelope {
|
|
50
|
+
payload: Uint8Array;
|
|
51
|
+
externalAuth?: ExternalAuth | undefined;
|
|
52
|
+
}
|
|
53
|
+
interface Participant {
|
|
54
|
+
/** Device Identification Number (DIN) */
|
|
55
|
+
din?: string | undefined;
|
|
56
|
+
teslaService?: TeslaService | undefined;
|
|
57
|
+
local?: LocalParticipant | undefined;
|
|
58
|
+
authorizedClient?: AuthorizedClientType | undefined;
|
|
59
|
+
}
|
|
60
|
+
interface RegistrationPayload {
|
|
61
|
+
customerRegistrationInfo: Uint8Array;
|
|
62
|
+
nonce: Uint8Array;
|
|
63
|
+
}
|
|
64
|
+
interface MessageEnvelope {
|
|
65
|
+
deliveryChannel: DeliveryChannel;
|
|
66
|
+
sender: Participant | undefined;
|
|
67
|
+
recipient: Participant | undefined;
|
|
68
|
+
common?: CommonMessages | undefined;
|
|
69
|
+
teg?: TEGMessages | undefined;
|
|
70
|
+
/**
|
|
71
|
+
* WCMessages wc = 6;
|
|
72
|
+
* NeurioMeterMessages neuriometer = 9;
|
|
73
|
+
* EnergySiteNetMessages energysitenet = 10;
|
|
74
|
+
*/
|
|
75
|
+
authorization?: AuthorizationMessages | undefined;
|
|
76
|
+
}
|
|
77
|
+
declare const ExternalAuth: MessageFns<ExternalAuth>;
|
|
78
|
+
declare const AuthEnvelope: MessageFns<AuthEnvelope>;
|
|
79
|
+
declare const Participant: MessageFns<Participant>;
|
|
80
|
+
declare const RegistrationPayload: MessageFns<RegistrationPayload>;
|
|
81
|
+
declare const MessageEnvelope: MessageFns<MessageEnvelope>;
|
|
82
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
83
|
+
type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? { [K in keyof T]?: DeepPartial<T[K]>; } : Partial<T>;
|
|
84
|
+
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
85
|
+
type Exact<P, I extends P> = P extends Builtin ? P : P & { [K in keyof P]: Exact<P[K], I[K]>; } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never; };
|
|
86
|
+
interface MessageFns<T> {
|
|
87
|
+
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
88
|
+
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
89
|
+
fromJSON(object: any): T;
|
|
90
|
+
toJSON(message: T): unknown;
|
|
91
|
+
create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
|
|
92
|
+
fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
|
|
93
|
+
}
|
|
94
|
+
//#endregion
|
|
95
|
+
export { AuthEnvelope, DeepPartial, DeliveryChannel, Exact, ExternalAuth, ExternalAuthType, LocalParticipant, MessageEnvelope, MessageFns, Participant, RegistrationPayload, TeslaService, deliveryChannelFromJSON, deliveryChannelToJSON, externalAuthTypeFromJSON, externalAuthTypeToJSON, localParticipantFromJSON, localParticipantToJSON, protobufPackage, teslaServiceFromJSON, teslaServiceToJSON };
|