@teslemetry/tesla-protocol 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (150) hide show
  1. package/README.md +20 -0
  2. package/dist/command/car_server.cjs +11126 -0
  3. package/dist/command/car_server.d.cts +1281 -0
  4. package/dist/command/car_server.d.mts +1281 -0
  5. package/dist/command/car_server.mjs +10880 -0
  6. package/dist/command/common.cjs +1536 -0
  7. package/dist/command/common.d.cts +327 -0
  8. package/dist/command/common.d.mts +327 -0
  9. package/dist/command/common.mjs +1488 -0
  10. package/dist/command/errors.cjs +107 -0
  11. package/dist/command/errors.d.cts +40 -0
  12. package/dist/command/errors.d.mts +40 -0
  13. package/dist/command/errors.mjs +102 -0
  14. package/dist/command/google/protobuf/timestamp.cjs +71 -0
  15. package/dist/command/google/protobuf/timestamp.d.cts +124 -0
  16. package/dist/command/google/protobuf/timestamp.d.mts +124 -0
  17. package/dist/command/google/protobuf/timestamp.mjs +69 -0
  18. package/dist/command/google/protobuf/wrappers.cjs +421 -0
  19. package/dist/command/google/protobuf/wrappers.d.cts +134 -0
  20. package/dist/command/google/protobuf/wrappers.d.mts +134 -0
  21. package/dist/command/google/protobuf/wrappers.mjs +411 -0
  22. package/dist/command/keys.cjs +60 -0
  23. package/dist/command/keys.d.cts +23 -0
  24. package/dist/command/keys.d.mts +23 -0
  25. package/dist/command/keys.mjs +56 -0
  26. package/dist/command/managed_charging.cjs +435 -0
  27. package/dist/command/managed_charging.d.cts +86 -0
  28. package/dist/command/managed_charging.d.mts +86 -0
  29. package/dist/command/managed_charging.mjs +421 -0
  30. package/dist/command/session.cjs +119 -0
  31. package/dist/command/session.d.cts +28 -0
  32. package/dist/command/session.d.mts +28 -0
  33. package/dist/command/session.mjs +117 -0
  34. package/dist/command/signatures.cjs +696 -0
  35. package/dist/command/signatures.d.cts +107 -0
  36. package/dist/command/signatures.d.mts +107 -0
  37. package/dist/command/signatures.mjs +678 -0
  38. package/dist/command/universal_message.cjs +588 -0
  39. package/dist/command/universal_message.d.cts +141 -0
  40. package/dist/command/universal_message.d.mts +141 -0
  41. package/dist/command/universal_message.mjs +571 -0
  42. package/dist/command/vcsec.cjs +2281 -0
  43. package/dist/command/vcsec.d.cts +404 -0
  44. package/dist/command/vcsec.d.mts +404 -0
  45. package/dist/command/vcsec.mjs +2218 -0
  46. package/dist/command/vehicle.cjs +10332 -0
  47. package/dist/command/vehicle.d.cts +1429 -0
  48. package/dist/command/vehicle.d.mts +1429 -0
  49. package/dist/command/vehicle.mjs +10168 -0
  50. package/dist/energy_command/identifier_type.cjs +47 -0
  51. package/dist/energy_command/identifier_type.d.cts +19 -0
  52. package/dist/energy_command/identifier_type.d.mts +19 -0
  53. package/dist/energy_command/identifier_type.mjs +43 -0
  54. package/dist/energy_device/authorization_api.cjs +815 -0
  55. package/dist/energy_device/authorization_api.d.cts +92 -0
  56. package/dist/energy_device/authorization_api.d.mts +92 -0
  57. package/dist/energy_device/authorization_api.mjs +801 -0
  58. package/dist/energy_device/authorization_types.cjs +348 -0
  59. package/dist/energy_device/authorization_types.d.cts +79 -0
  60. package/dist/energy_device/authorization_types.d.mts +79 -0
  61. package/dist/energy_device/authorization_types.mjs +331 -0
  62. package/dist/energy_device/common_api.cjs +2104 -0
  63. package/dist/energy_device/common_api.d.cts +211 -0
  64. package/dist/energy_device/common_api.d.mts +211 -0
  65. package/dist/energy_device/common_api.mjs +2064 -0
  66. package/dist/energy_device/device.cjs +485 -0
  67. package/dist/energy_device/device.d.cts +102 -0
  68. package/dist/energy_device/device.d.mts +102 -0
  69. package/dist/energy_device/device.mjs +462 -0
  70. package/dist/energy_device/energy.cjs +442 -0
  71. package/dist/energy_device/energy.d.cts +82 -0
  72. package/dist/energy_device/energy.d.mts +82 -0
  73. package/dist/energy_device/energy.mjs +429 -0
  74. package/dist/energy_device/energy_site_net.cjs +235 -0
  75. package/dist/energy_device/energy_site_net.d.cts +69 -0
  76. package/dist/energy_device/energy_site_net.d.mts +69 -0
  77. package/dist/energy_device/energy_site_net.mjs +219 -0
  78. package/dist/energy_device/error.cjs +53 -0
  79. package/dist/energy_device/error.d.cts +27 -0
  80. package/dist/energy_device/error.d.mts +27 -0
  81. package/dist/energy_device/error.mjs +51 -0
  82. package/dist/energy_device/google/protobuf/timestamp.cjs +71 -0
  83. package/dist/energy_device/google/protobuf/timestamp.d.cts +124 -0
  84. package/dist/energy_device/google/protobuf/timestamp.d.mts +124 -0
  85. package/dist/energy_device/google/protobuf/timestamp.mjs +69 -0
  86. package/dist/energy_device/google/protobuf/wrappers.cjs +421 -0
  87. package/dist/energy_device/google/protobuf/wrappers.d.cts +134 -0
  88. package/dist/energy_device/google/protobuf/wrappers.d.mts +134 -0
  89. package/dist/energy_device/google/protobuf/wrappers.mjs +411 -0
  90. package/dist/energy_device/google/rpc/status.cjs +65 -0
  91. package/dist/energy_device/google/rpc/status.d.cts +26 -0
  92. package/dist/energy_device/google/rpc/status.d.mts +26 -0
  93. package/dist/energy_device/google/rpc/status.mjs +63 -0
  94. package/dist/energy_device/networking.cjs +834 -0
  95. package/dist/energy_device/networking.d.cts +141 -0
  96. package/dist/energy_device/networking.d.mts +141 -0
  97. package/dist/energy_device/networking.mjs +810 -0
  98. package/dist/energy_device/teg_api.cjs +594 -0
  99. package/dist/energy_device/teg_api.d.cts +140 -0
  100. package/dist/energy_device/teg_api.d.mts +140 -0
  101. package/dist/energy_device/teg_api.mjs +581 -0
  102. package/dist/energy_device/transport.cjs +478 -0
  103. package/dist/energy_device/transport.d.cts +95 -0
  104. package/dist/energy_device/transport.d.mts +95 -0
  105. package/dist/energy_device/transport.mjs +460 -0
  106. package/dist/energy_device/update.cjs +521 -0
  107. package/dist/energy_device/update.d.cts +86 -0
  108. package/dist/energy_device/update.d.mts +86 -0
  109. package/dist/energy_device/update.mjs +506 -0
  110. package/dist/energy_device/wall_connector.cjs +634 -0
  111. package/dist/energy_device/wall_connector.d.cts +182 -0
  112. package/dist/energy_device/wall_connector.d.mts +182 -0
  113. package/dist/energy_device/wall_connector.mjs +590 -0
  114. package/dist/telemetry/google/protobuf/timestamp.cjs +71 -0
  115. package/dist/telemetry/google/protobuf/timestamp.d.cts +124 -0
  116. package/dist/telemetry/google/protobuf/timestamp.d.mts +124 -0
  117. package/dist/telemetry/google/protobuf/timestamp.mjs +69 -0
  118. package/dist/telemetry/vehicle_alert.cjs +214 -0
  119. package/dist/telemetry/vehicle_alert.d.cts +48 -0
  120. package/dist/telemetry/vehicle_alert.d.mts +48 -0
  121. package/dist/telemetry/vehicle_alert.mjs +208 -0
  122. package/dist/telemetry/vehicle_connectivity.cjs +145 -0
  123. package/dist/telemetry/vehicle_connectivity.d.cts +41 -0
  124. package/dist/telemetry/vehicle_connectivity.d.mts +41 -0
  125. package/dist/telemetry/vehicle_connectivity.mjs +140 -0
  126. package/dist/telemetry/vehicle_data.cjs +3792 -0
  127. package/dist/telemetry/vehicle_data.d.cts +872 -0
  128. package/dist/telemetry/vehicle_data.d.mts +872 -0
  129. package/dist/telemetry/vehicle_data.mjs +3655 -0
  130. package/dist/telemetry/vehicle_error.cjs +245 -0
  131. package/dist/telemetry/vehicle_error.d.cts +45 -0
  132. package/dist/telemetry/vehicle_error.d.mts +45 -0
  133. package/dist/telemetry/vehicle_error.mjs +241 -0
  134. package/dist/telemetry/vehicle_metric.cjs +236 -0
  135. package/dist/telemetry/vehicle_metric.d.cts +44 -0
  136. package/dist/telemetry/vehicle_metric.d.mts +44 -0
  137. package/dist/telemetry/vehicle_metric.mjs +232 -0
  138. package/dist/teslapower/google/protobuf/any.cjs +84 -0
  139. package/dist/teslapower/google/protobuf/any.d.cts +140 -0
  140. package/dist/teslapower/google/protobuf/any.d.mts +140 -0
  141. package/dist/teslapower/google/protobuf/any.mjs +82 -0
  142. package/dist/teslapower/google/protobuf/timestamp.cjs +71 -0
  143. package/dist/teslapower/google/protobuf/timestamp.d.cts +124 -0
  144. package/dist/teslapower/google/protobuf/timestamp.d.mts +124 -0
  145. package/dist/teslapower/google/protobuf/timestamp.mjs +69 -0
  146. package/dist/teslapower/teslapower.cjs +5486 -0
  147. package/dist/teslapower/teslapower.d.cts +518 -0
  148. package/dist/teslapower/teslapower.d.mts +518 -0
  149. package/dist/teslapower/teslapower.mjs +5381 -0
  150. package/package.json +53 -0
@@ -0,0 +1,107 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ let _bufbuild_protobuf_wire = require("@bufbuild/protobuf/wire");
3
+ //#region src/command/errors.ts
4
+ const protobufPackage = "Errors";
5
+ /**
6
+ * UPSTREAM-SOURCE: teslamotors/vehicle-command
7
+ * UPSTREAM-PATH: pkg/protocol/protobuf/errors.proto
8
+ * UPSTREAM-COMMIT: see upstream.json
9
+ * This file = upstream base + Teslemetry extensions marked TESLEMETRY-EXT.
10
+ */
11
+ let GenericErrorE = /* @__PURE__ */ function(GenericErrorE) {
12
+ GenericErrorE[GenericErrorE["GENERICERROR_NONE"] = 0] = "GENERICERROR_NONE";
13
+ GenericErrorE[GenericErrorE["GENERICERROR_UNKNOWN"] = 1] = "GENERICERROR_UNKNOWN";
14
+ GenericErrorE[GenericErrorE["GENERICERROR_CLOSURES_OPEN"] = 2] = "GENERICERROR_CLOSURES_OPEN";
15
+ GenericErrorE[GenericErrorE["GENERICERROR_ALREADY_ON"] = 3] = "GENERICERROR_ALREADY_ON";
16
+ GenericErrorE[GenericErrorE["GENERICERROR_DISABLED_FOR_USER_COMMAND"] = 4] = "GENERICERROR_DISABLED_FOR_USER_COMMAND";
17
+ GenericErrorE[GenericErrorE["GENERICERROR_VEHICLE_NOT_IN_PARK"] = 5] = "GENERICERROR_VEHICLE_NOT_IN_PARK";
18
+ GenericErrorE[GenericErrorE["GENERICERROR_UNAUTHORIZED"] = 6] = "GENERICERROR_UNAUTHORIZED";
19
+ GenericErrorE[GenericErrorE["GENERICERROR_NOT_ALLOWED_OVER_TRANSPORT"] = 7] = "GENERICERROR_NOT_ALLOWED_OVER_TRANSPORT";
20
+ GenericErrorE[GenericErrorE["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
21
+ return GenericErrorE;
22
+ }({});
23
+ function genericErrorEFromJSON(object) {
24
+ switch (object) {
25
+ case 0:
26
+ case "GENERICERROR_NONE": return 0;
27
+ case 1:
28
+ case "GENERICERROR_UNKNOWN": return 1;
29
+ case 2:
30
+ case "GENERICERROR_CLOSURES_OPEN": return 2;
31
+ case 3:
32
+ case "GENERICERROR_ALREADY_ON": return 3;
33
+ case 4:
34
+ case "GENERICERROR_DISABLED_FOR_USER_COMMAND": return 4;
35
+ case 5:
36
+ case "GENERICERROR_VEHICLE_NOT_IN_PARK": return 5;
37
+ case 6:
38
+ case "GENERICERROR_UNAUTHORIZED": return 6;
39
+ case 7:
40
+ case "GENERICERROR_NOT_ALLOWED_OVER_TRANSPORT": return 7;
41
+ default: return -1;
42
+ }
43
+ }
44
+ function genericErrorEToJSON(object) {
45
+ switch (object) {
46
+ case 0: return "GENERICERROR_NONE";
47
+ case 1: return "GENERICERROR_UNKNOWN";
48
+ case 2: return "GENERICERROR_CLOSURES_OPEN";
49
+ case 3: return "GENERICERROR_ALREADY_ON";
50
+ case 4: return "GENERICERROR_DISABLED_FOR_USER_COMMAND";
51
+ case 5: return "GENERICERROR_VEHICLE_NOT_IN_PARK";
52
+ case 6: return "GENERICERROR_UNAUTHORIZED";
53
+ case 7: return "GENERICERROR_NOT_ALLOWED_OVER_TRANSPORT";
54
+ default: return "UNRECOGNIZED";
55
+ }
56
+ }
57
+ function createBaseNominalError() {
58
+ return { genericError: 0 };
59
+ }
60
+ const NominalError = {
61
+ encode(message, writer = new _bufbuild_protobuf_wire.BinaryWriter()) {
62
+ if (message.genericError !== 0) writer.uint32(8).int32(message.genericError);
63
+ return writer;
64
+ },
65
+ decode(input, length) {
66
+ const reader = input instanceof _bufbuild_protobuf_wire.BinaryReader ? input : new _bufbuild_protobuf_wire.BinaryReader(input);
67
+ const end = length === void 0 ? reader.len : reader.pos + length;
68
+ const message = createBaseNominalError();
69
+ while (reader.pos < end) {
70
+ const tag = reader.uint32();
71
+ switch (tag >>> 3) {
72
+ case 1:
73
+ if (tag !== 8) break;
74
+ message.genericError = reader.int32();
75
+ continue;
76
+ }
77
+ if ((tag & 7) === 4 || tag === 0) break;
78
+ reader.skip(tag & 7);
79
+ }
80
+ return message;
81
+ },
82
+ fromJSON(object) {
83
+ return { genericError: isSet(object.genericError) ? genericErrorEFromJSON(object.genericError) : 0 };
84
+ },
85
+ toJSON(message) {
86
+ const obj = {};
87
+ if (message.genericError !== void 0) obj.genericError = genericErrorEToJSON(message.genericError);
88
+ return obj;
89
+ },
90
+ create(base) {
91
+ return NominalError.fromPartial(base ?? {});
92
+ },
93
+ fromPartial(object) {
94
+ const message = createBaseNominalError();
95
+ message.genericError = object.genericError ?? 0;
96
+ return message;
97
+ }
98
+ };
99
+ function isSet(value) {
100
+ return value !== null && value !== void 0;
101
+ }
102
+ //#endregion
103
+ exports.GenericErrorE = GenericErrorE;
104
+ exports.NominalError = NominalError;
105
+ exports.genericErrorEFromJSON = genericErrorEFromJSON;
106
+ exports.genericErrorEToJSON = genericErrorEToJSON;
107
+ exports.protobufPackage = protobufPackage;
@@ -0,0 +1,40 @@
1
+ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
2
+ //#region src/command/errors.d.ts
3
+ declare const protobufPackage = "Errors";
4
+ /**
5
+ * UPSTREAM-SOURCE: teslamotors/vehicle-command
6
+ * UPSTREAM-PATH: pkg/protocol/protobuf/errors.proto
7
+ * UPSTREAM-COMMIT: see upstream.json
8
+ * This file = upstream base + Teslemetry extensions marked TESLEMETRY-EXT.
9
+ */
10
+ declare enum GenericErrorE {
11
+ GENERICERROR_NONE = 0,
12
+ GENERICERROR_UNKNOWN = 1,
13
+ GENERICERROR_CLOSURES_OPEN = 2,
14
+ GENERICERROR_ALREADY_ON = 3,
15
+ GENERICERROR_DISABLED_FOR_USER_COMMAND = 4,
16
+ GENERICERROR_VEHICLE_NOT_IN_PARK = 5,
17
+ GENERICERROR_UNAUTHORIZED = 6,
18
+ GENERICERROR_NOT_ALLOWED_OVER_TRANSPORT = 7,
19
+ UNRECOGNIZED = -1
20
+ }
21
+ declare function genericErrorEFromJSON(object: any): GenericErrorE;
22
+ declare function genericErrorEToJSON(object: GenericErrorE): string;
23
+ interface NominalError {
24
+ genericError: GenericErrorE;
25
+ }
26
+ declare const NominalError: MessageFns<NominalError>;
27
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
28
+ 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>;
29
+ type KeysOfUnion<T> = T extends T ? keyof T : never;
30
+ 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; };
31
+ interface MessageFns<T> {
32
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
33
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
34
+ fromJSON(object: any): T;
35
+ toJSON(message: T): unknown;
36
+ create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
37
+ fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
38
+ }
39
+ //#endregion
40
+ export { DeepPartial, Exact, GenericErrorE, MessageFns, NominalError, genericErrorEFromJSON, genericErrorEToJSON, protobufPackage };
@@ -0,0 +1,40 @@
1
+ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
2
+ //#region src/command/errors.d.ts
3
+ declare const protobufPackage = "Errors";
4
+ /**
5
+ * UPSTREAM-SOURCE: teslamotors/vehicle-command
6
+ * UPSTREAM-PATH: pkg/protocol/protobuf/errors.proto
7
+ * UPSTREAM-COMMIT: see upstream.json
8
+ * This file = upstream base + Teslemetry extensions marked TESLEMETRY-EXT.
9
+ */
10
+ declare enum GenericErrorE {
11
+ GENERICERROR_NONE = 0,
12
+ GENERICERROR_UNKNOWN = 1,
13
+ GENERICERROR_CLOSURES_OPEN = 2,
14
+ GENERICERROR_ALREADY_ON = 3,
15
+ GENERICERROR_DISABLED_FOR_USER_COMMAND = 4,
16
+ GENERICERROR_VEHICLE_NOT_IN_PARK = 5,
17
+ GENERICERROR_UNAUTHORIZED = 6,
18
+ GENERICERROR_NOT_ALLOWED_OVER_TRANSPORT = 7,
19
+ UNRECOGNIZED = -1
20
+ }
21
+ declare function genericErrorEFromJSON(object: any): GenericErrorE;
22
+ declare function genericErrorEToJSON(object: GenericErrorE): string;
23
+ interface NominalError {
24
+ genericError: GenericErrorE;
25
+ }
26
+ declare const NominalError: MessageFns<NominalError>;
27
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
28
+ 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>;
29
+ type KeysOfUnion<T> = T extends T ? keyof T : never;
30
+ 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; };
31
+ interface MessageFns<T> {
32
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
33
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
34
+ fromJSON(object: any): T;
35
+ toJSON(message: T): unknown;
36
+ create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
37
+ fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
38
+ }
39
+ //#endregion
40
+ export { DeepPartial, Exact, GenericErrorE, MessageFns, NominalError, genericErrorEFromJSON, genericErrorEToJSON, protobufPackage };
@@ -0,0 +1,102 @@
1
+ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
2
+ //#region src/command/errors.ts
3
+ const protobufPackage = "Errors";
4
+ /**
5
+ * UPSTREAM-SOURCE: teslamotors/vehicle-command
6
+ * UPSTREAM-PATH: pkg/protocol/protobuf/errors.proto
7
+ * UPSTREAM-COMMIT: see upstream.json
8
+ * This file = upstream base + Teslemetry extensions marked TESLEMETRY-EXT.
9
+ */
10
+ let GenericErrorE = /* @__PURE__ */ function(GenericErrorE) {
11
+ GenericErrorE[GenericErrorE["GENERICERROR_NONE"] = 0] = "GENERICERROR_NONE";
12
+ GenericErrorE[GenericErrorE["GENERICERROR_UNKNOWN"] = 1] = "GENERICERROR_UNKNOWN";
13
+ GenericErrorE[GenericErrorE["GENERICERROR_CLOSURES_OPEN"] = 2] = "GENERICERROR_CLOSURES_OPEN";
14
+ GenericErrorE[GenericErrorE["GENERICERROR_ALREADY_ON"] = 3] = "GENERICERROR_ALREADY_ON";
15
+ GenericErrorE[GenericErrorE["GENERICERROR_DISABLED_FOR_USER_COMMAND"] = 4] = "GENERICERROR_DISABLED_FOR_USER_COMMAND";
16
+ GenericErrorE[GenericErrorE["GENERICERROR_VEHICLE_NOT_IN_PARK"] = 5] = "GENERICERROR_VEHICLE_NOT_IN_PARK";
17
+ GenericErrorE[GenericErrorE["GENERICERROR_UNAUTHORIZED"] = 6] = "GENERICERROR_UNAUTHORIZED";
18
+ GenericErrorE[GenericErrorE["GENERICERROR_NOT_ALLOWED_OVER_TRANSPORT"] = 7] = "GENERICERROR_NOT_ALLOWED_OVER_TRANSPORT";
19
+ GenericErrorE[GenericErrorE["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
20
+ return GenericErrorE;
21
+ }({});
22
+ function genericErrorEFromJSON(object) {
23
+ switch (object) {
24
+ case 0:
25
+ case "GENERICERROR_NONE": return 0;
26
+ case 1:
27
+ case "GENERICERROR_UNKNOWN": return 1;
28
+ case 2:
29
+ case "GENERICERROR_CLOSURES_OPEN": return 2;
30
+ case 3:
31
+ case "GENERICERROR_ALREADY_ON": return 3;
32
+ case 4:
33
+ case "GENERICERROR_DISABLED_FOR_USER_COMMAND": return 4;
34
+ case 5:
35
+ case "GENERICERROR_VEHICLE_NOT_IN_PARK": return 5;
36
+ case 6:
37
+ case "GENERICERROR_UNAUTHORIZED": return 6;
38
+ case 7:
39
+ case "GENERICERROR_NOT_ALLOWED_OVER_TRANSPORT": return 7;
40
+ default: return -1;
41
+ }
42
+ }
43
+ function genericErrorEToJSON(object) {
44
+ switch (object) {
45
+ case 0: return "GENERICERROR_NONE";
46
+ case 1: return "GENERICERROR_UNKNOWN";
47
+ case 2: return "GENERICERROR_CLOSURES_OPEN";
48
+ case 3: return "GENERICERROR_ALREADY_ON";
49
+ case 4: return "GENERICERROR_DISABLED_FOR_USER_COMMAND";
50
+ case 5: return "GENERICERROR_VEHICLE_NOT_IN_PARK";
51
+ case 6: return "GENERICERROR_UNAUTHORIZED";
52
+ case 7: return "GENERICERROR_NOT_ALLOWED_OVER_TRANSPORT";
53
+ default: return "UNRECOGNIZED";
54
+ }
55
+ }
56
+ function createBaseNominalError() {
57
+ return { genericError: 0 };
58
+ }
59
+ const NominalError = {
60
+ encode(message, writer = new BinaryWriter()) {
61
+ if (message.genericError !== 0) writer.uint32(8).int32(message.genericError);
62
+ return writer;
63
+ },
64
+ decode(input, length) {
65
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
66
+ const end = length === void 0 ? reader.len : reader.pos + length;
67
+ const message = createBaseNominalError();
68
+ while (reader.pos < end) {
69
+ const tag = reader.uint32();
70
+ switch (tag >>> 3) {
71
+ case 1:
72
+ if (tag !== 8) break;
73
+ message.genericError = reader.int32();
74
+ continue;
75
+ }
76
+ if ((tag & 7) === 4 || tag === 0) break;
77
+ reader.skip(tag & 7);
78
+ }
79
+ return message;
80
+ },
81
+ fromJSON(object) {
82
+ return { genericError: isSet(object.genericError) ? genericErrorEFromJSON(object.genericError) : 0 };
83
+ },
84
+ toJSON(message) {
85
+ const obj = {};
86
+ if (message.genericError !== void 0) obj.genericError = genericErrorEToJSON(message.genericError);
87
+ return obj;
88
+ },
89
+ create(base) {
90
+ return NominalError.fromPartial(base ?? {});
91
+ },
92
+ fromPartial(object) {
93
+ const message = createBaseNominalError();
94
+ message.genericError = object.genericError ?? 0;
95
+ return message;
96
+ }
97
+ };
98
+ function isSet(value) {
99
+ return value !== null && value !== void 0;
100
+ }
101
+ //#endregion
102
+ export { GenericErrorE, NominalError, genericErrorEFromJSON, genericErrorEToJSON, protobufPackage };
@@ -0,0 +1,71 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ let _bufbuild_protobuf_wire = require("@bufbuild/protobuf/wire");
3
+ //#region src/command/google/protobuf/timestamp.ts
4
+ const protobufPackage = "google.protobuf";
5
+ function createBaseTimestamp() {
6
+ return {
7
+ seconds: 0,
8
+ nanos: 0
9
+ };
10
+ }
11
+ const Timestamp = {
12
+ encode(message, writer = new _bufbuild_protobuf_wire.BinaryWriter()) {
13
+ if (message.seconds !== 0) writer.uint32(8).int64(message.seconds);
14
+ if (message.nanos !== 0) writer.uint32(16).int32(message.nanos);
15
+ return writer;
16
+ },
17
+ decode(input, length) {
18
+ const reader = input instanceof _bufbuild_protobuf_wire.BinaryReader ? input : new _bufbuild_protobuf_wire.BinaryReader(input);
19
+ const end = length === void 0 ? reader.len : reader.pos + length;
20
+ const message = createBaseTimestamp();
21
+ while (reader.pos < end) {
22
+ const tag = reader.uint32();
23
+ switch (tag >>> 3) {
24
+ case 1:
25
+ if (tag !== 8) break;
26
+ message.seconds = longToNumber(reader.int64());
27
+ continue;
28
+ case 2:
29
+ if (tag !== 16) break;
30
+ message.nanos = reader.int32();
31
+ continue;
32
+ }
33
+ if ((tag & 7) === 4 || tag === 0) break;
34
+ reader.skip(tag & 7);
35
+ }
36
+ return message;
37
+ },
38
+ fromJSON(object) {
39
+ return {
40
+ seconds: isSet(object.seconds) ? globalThis.Number(object.seconds) : 0,
41
+ nanos: isSet(object.nanos) ? globalThis.Number(object.nanos) : 0
42
+ };
43
+ },
44
+ toJSON(message) {
45
+ const obj = {};
46
+ if (message.seconds !== void 0) obj.seconds = Math.round(message.seconds);
47
+ if (message.nanos !== void 0) obj.nanos = Math.round(message.nanos);
48
+ return obj;
49
+ },
50
+ create(base) {
51
+ return Timestamp.fromPartial(base ?? {});
52
+ },
53
+ fromPartial(object) {
54
+ const message = createBaseTimestamp();
55
+ message.seconds = object.seconds ?? 0;
56
+ message.nanos = object.nanos ?? 0;
57
+ return message;
58
+ }
59
+ };
60
+ function longToNumber(int64) {
61
+ const num = globalThis.Number(int64.toString());
62
+ if (num > globalThis.Number.MAX_SAFE_INTEGER) throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
63
+ if (num < globalThis.Number.MIN_SAFE_INTEGER) throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");
64
+ return num;
65
+ }
66
+ function isSet(value) {
67
+ return value !== null && value !== void 0;
68
+ }
69
+ //#endregion
70
+ exports.Timestamp = Timestamp;
71
+ exports.protobufPackage = protobufPackage;
@@ -0,0 +1,124 @@
1
+ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
2
+ //#region src/command/google/protobuf/timestamp.d.ts
3
+ declare const protobufPackage = "google.protobuf";
4
+ /**
5
+ * A Timestamp represents a point in time independent of any time zone or local
6
+ * calendar, encoded as a count of seconds and fractions of seconds at
7
+ * nanosecond resolution. The count is relative to an epoch at UTC midnight on
8
+ * January 1, 1970, in the proleptic Gregorian calendar which extends the
9
+ * Gregorian calendar backwards to year one.
10
+ *
11
+ * All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap
12
+ * second table is needed for interpretation, using a [24-hour linear
13
+ * smear](https://developers.google.com/time/smear).
14
+ *
15
+ * The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By
16
+ * restricting to that range, we ensure that we can convert to and from [RFC
17
+ * 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings.
18
+ *
19
+ * # Examples
20
+ *
21
+ * Example 1: Compute Timestamp from POSIX `time()`.
22
+ *
23
+ * Timestamp timestamp;
24
+ * timestamp.set_seconds(time(NULL));
25
+ * timestamp.set_nanos(0);
26
+ *
27
+ * Example 2: Compute Timestamp from POSIX `gettimeofday()`.
28
+ *
29
+ * struct timeval tv;
30
+ * gettimeofday(&tv, NULL);
31
+ *
32
+ * Timestamp timestamp;
33
+ * timestamp.set_seconds(tv.tv_sec);
34
+ * timestamp.set_nanos(tv.tv_usec * 1000);
35
+ *
36
+ * Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`.
37
+ *
38
+ * FILETIME ft;
39
+ * GetSystemTimeAsFileTime(&ft);
40
+ * UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;
41
+ *
42
+ * // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
43
+ * // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
44
+ * Timestamp timestamp;
45
+ * timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
46
+ * timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));
47
+ *
48
+ * Example 4: Compute Timestamp from Java `System.currentTimeMillis()`.
49
+ *
50
+ * long millis = System.currentTimeMillis();
51
+ *
52
+ * Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
53
+ * .setNanos((int) ((millis % 1000) * 1000000)).build();
54
+ *
55
+ * Example 5: Compute Timestamp from Java `Instant.now()`.
56
+ *
57
+ * Instant now = Instant.now();
58
+ *
59
+ * Timestamp timestamp =
60
+ * Timestamp.newBuilder().setSeconds(now.getEpochSecond())
61
+ * .setNanos(now.getNano()).build();
62
+ *
63
+ * Example 6: Compute Timestamp from current time in Python.
64
+ *
65
+ * timestamp = Timestamp()
66
+ * timestamp.GetCurrentTime()
67
+ *
68
+ * # JSON Mapping
69
+ *
70
+ * In JSON format, the Timestamp type is encoded as a string in the
71
+ * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the
72
+ * format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z"
73
+ * where {year} is always expressed using four digits while {month}, {day},
74
+ * {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional
75
+ * seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution),
76
+ * are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone
77
+ * is required. A proto3 JSON serializer should always use UTC (as indicated by
78
+ * "Z") when printing the Timestamp type and a proto3 JSON parser should be
79
+ * able to accept both UTC and other timezones (as indicated by an offset).
80
+ *
81
+ * For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past
82
+ * 01:30 UTC on January 15, 2017.
83
+ *
84
+ * In JavaScript, one can convert a Date object to this format using the
85
+ * standard
86
+ * [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)
87
+ * method. In Python, a standard `datetime.datetime` object can be converted
88
+ * to this format using
89
+ * [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with
90
+ * the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use
91
+ * the Joda Time's [`ISODateTimeFormat.dateTime()`](
92
+ * http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()
93
+ * ) to obtain a formatter capable of generating timestamps in this format.
94
+ */
95
+ interface Timestamp {
96
+ /**
97
+ * Represents seconds of UTC time since Unix epoch
98
+ * 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
99
+ * 9999-12-31T23:59:59Z inclusive.
100
+ */
101
+ seconds: number;
102
+ /**
103
+ * Non-negative fractions of a second at nanosecond resolution. Negative
104
+ * second values with fractions must still have non-negative nanos values
105
+ * that count forward in time. Must be from 0 to 999,999,999
106
+ * inclusive.
107
+ */
108
+ nanos: number;
109
+ }
110
+ declare const Timestamp: MessageFns<Timestamp>;
111
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
112
+ 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>;
113
+ type KeysOfUnion<T> = T extends T ? keyof T : never;
114
+ 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; };
115
+ interface MessageFns<T> {
116
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
117
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
118
+ fromJSON(object: any): T;
119
+ toJSON(message: T): unknown;
120
+ create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
121
+ fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
122
+ }
123
+ //#endregion
124
+ export { DeepPartial, Exact, MessageFns, Timestamp, protobufPackage };
@@ -0,0 +1,124 @@
1
+ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
2
+ //#region src/command/google/protobuf/timestamp.d.ts
3
+ declare const protobufPackage = "google.protobuf";
4
+ /**
5
+ * A Timestamp represents a point in time independent of any time zone or local
6
+ * calendar, encoded as a count of seconds and fractions of seconds at
7
+ * nanosecond resolution. The count is relative to an epoch at UTC midnight on
8
+ * January 1, 1970, in the proleptic Gregorian calendar which extends the
9
+ * Gregorian calendar backwards to year one.
10
+ *
11
+ * All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap
12
+ * second table is needed for interpretation, using a [24-hour linear
13
+ * smear](https://developers.google.com/time/smear).
14
+ *
15
+ * The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By
16
+ * restricting to that range, we ensure that we can convert to and from [RFC
17
+ * 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings.
18
+ *
19
+ * # Examples
20
+ *
21
+ * Example 1: Compute Timestamp from POSIX `time()`.
22
+ *
23
+ * Timestamp timestamp;
24
+ * timestamp.set_seconds(time(NULL));
25
+ * timestamp.set_nanos(0);
26
+ *
27
+ * Example 2: Compute Timestamp from POSIX `gettimeofday()`.
28
+ *
29
+ * struct timeval tv;
30
+ * gettimeofday(&tv, NULL);
31
+ *
32
+ * Timestamp timestamp;
33
+ * timestamp.set_seconds(tv.tv_sec);
34
+ * timestamp.set_nanos(tv.tv_usec * 1000);
35
+ *
36
+ * Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`.
37
+ *
38
+ * FILETIME ft;
39
+ * GetSystemTimeAsFileTime(&ft);
40
+ * UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;
41
+ *
42
+ * // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
43
+ * // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
44
+ * Timestamp timestamp;
45
+ * timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
46
+ * timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));
47
+ *
48
+ * Example 4: Compute Timestamp from Java `System.currentTimeMillis()`.
49
+ *
50
+ * long millis = System.currentTimeMillis();
51
+ *
52
+ * Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
53
+ * .setNanos((int) ((millis % 1000) * 1000000)).build();
54
+ *
55
+ * Example 5: Compute Timestamp from Java `Instant.now()`.
56
+ *
57
+ * Instant now = Instant.now();
58
+ *
59
+ * Timestamp timestamp =
60
+ * Timestamp.newBuilder().setSeconds(now.getEpochSecond())
61
+ * .setNanos(now.getNano()).build();
62
+ *
63
+ * Example 6: Compute Timestamp from current time in Python.
64
+ *
65
+ * timestamp = Timestamp()
66
+ * timestamp.GetCurrentTime()
67
+ *
68
+ * # JSON Mapping
69
+ *
70
+ * In JSON format, the Timestamp type is encoded as a string in the
71
+ * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the
72
+ * format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z"
73
+ * where {year} is always expressed using four digits while {month}, {day},
74
+ * {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional
75
+ * seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution),
76
+ * are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone
77
+ * is required. A proto3 JSON serializer should always use UTC (as indicated by
78
+ * "Z") when printing the Timestamp type and a proto3 JSON parser should be
79
+ * able to accept both UTC and other timezones (as indicated by an offset).
80
+ *
81
+ * For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past
82
+ * 01:30 UTC on January 15, 2017.
83
+ *
84
+ * In JavaScript, one can convert a Date object to this format using the
85
+ * standard
86
+ * [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)
87
+ * method. In Python, a standard `datetime.datetime` object can be converted
88
+ * to this format using
89
+ * [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with
90
+ * the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use
91
+ * the Joda Time's [`ISODateTimeFormat.dateTime()`](
92
+ * http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()
93
+ * ) to obtain a formatter capable of generating timestamps in this format.
94
+ */
95
+ interface Timestamp {
96
+ /**
97
+ * Represents seconds of UTC time since Unix epoch
98
+ * 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
99
+ * 9999-12-31T23:59:59Z inclusive.
100
+ */
101
+ seconds: number;
102
+ /**
103
+ * Non-negative fractions of a second at nanosecond resolution. Negative
104
+ * second values with fractions must still have non-negative nanos values
105
+ * that count forward in time. Must be from 0 to 999,999,999
106
+ * inclusive.
107
+ */
108
+ nanos: number;
109
+ }
110
+ declare const Timestamp: MessageFns<Timestamp>;
111
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
112
+ 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>;
113
+ type KeysOfUnion<T> = T extends T ? keyof T : never;
114
+ 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; };
115
+ interface MessageFns<T> {
116
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
117
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
118
+ fromJSON(object: any): T;
119
+ toJSON(message: T): unknown;
120
+ create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
121
+ fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
122
+ }
123
+ //#endregion
124
+ export { DeepPartial, Exact, MessageFns, Timestamp, protobufPackage };
@@ -0,0 +1,69 @@
1
+ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
2
+ //#region src/command/google/protobuf/timestamp.ts
3
+ const protobufPackage = "google.protobuf";
4
+ function createBaseTimestamp() {
5
+ return {
6
+ seconds: 0,
7
+ nanos: 0
8
+ };
9
+ }
10
+ const Timestamp = {
11
+ encode(message, writer = new BinaryWriter()) {
12
+ if (message.seconds !== 0) writer.uint32(8).int64(message.seconds);
13
+ if (message.nanos !== 0) writer.uint32(16).int32(message.nanos);
14
+ return writer;
15
+ },
16
+ decode(input, length) {
17
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
18
+ const end = length === void 0 ? reader.len : reader.pos + length;
19
+ const message = createBaseTimestamp();
20
+ while (reader.pos < end) {
21
+ const tag = reader.uint32();
22
+ switch (tag >>> 3) {
23
+ case 1:
24
+ if (tag !== 8) break;
25
+ message.seconds = longToNumber(reader.int64());
26
+ continue;
27
+ case 2:
28
+ if (tag !== 16) break;
29
+ message.nanos = reader.int32();
30
+ continue;
31
+ }
32
+ if ((tag & 7) === 4 || tag === 0) break;
33
+ reader.skip(tag & 7);
34
+ }
35
+ return message;
36
+ },
37
+ fromJSON(object) {
38
+ return {
39
+ seconds: isSet(object.seconds) ? globalThis.Number(object.seconds) : 0,
40
+ nanos: isSet(object.nanos) ? globalThis.Number(object.nanos) : 0
41
+ };
42
+ },
43
+ toJSON(message) {
44
+ const obj = {};
45
+ if (message.seconds !== void 0) obj.seconds = Math.round(message.seconds);
46
+ if (message.nanos !== void 0) obj.nanos = Math.round(message.nanos);
47
+ return obj;
48
+ },
49
+ create(base) {
50
+ return Timestamp.fromPartial(base ?? {});
51
+ },
52
+ fromPartial(object) {
53
+ const message = createBaseTimestamp();
54
+ message.seconds = object.seconds ?? 0;
55
+ message.nanos = object.nanos ?? 0;
56
+ return message;
57
+ }
58
+ };
59
+ function longToNumber(int64) {
60
+ const num = globalThis.Number(int64.toString());
61
+ if (num > globalThis.Number.MAX_SAFE_INTEGER) throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
62
+ if (num < globalThis.Number.MIN_SAFE_INTEGER) throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");
63
+ return num;
64
+ }
65
+ function isSet(value) {
66
+ return value !== null && value !== void 0;
67
+ }
68
+ //#endregion
69
+ export { Timestamp, protobufPackage };