import { IdentifiedKey, SignatureData } from "./signatures.cjs"; import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; //#region src/command/universal_message.d.ts declare const protobufPackage = "UniversalMessage"; /** * UPSTREAM-SOURCE: teslamotors/vehicle-command * UPSTREAM-PATH: pkg/protocol/protobuf/universal_message.proto * UPSTREAM-COMMIT: see upstream.json * This file = upstream base + Teslemetry extensions marked TESLEMETRY-EXT. */ declare enum Domain { DOMAIN_BROADCAST = 0, DOMAIN_VEHICLE_SECURITY = 2, DOMAIN_INFOTAINMENT = 3, /** DOMAIN_AUTOPILOT - TESLEMETRY-EXT */ DOMAIN_AUTOPILOT = 4, /** DOMAIN_AUTHD - TESLEMETRY-EXT */ DOMAIN_AUTHD = 5, /** DOMAIN_ENERGY_DEVICE - TESLEMETRY-EXT */ DOMAIN_ENERGY_DEVICE = 7, /** DOMAIN_ENERGY_DEVICE_AUTH - TESLEMETRY-EXT */ DOMAIN_ENERGY_DEVICE_AUTH = 8, /** DOMAIN_ENERGY_DEVICE_AUTHORIZED_COMMAND - TESLEMETRY-EXT UNCONFIRMED: not yet confirmed on a live vehicle */ DOMAIN_ENERGY_DEVICE_AUTHORIZED_COMMAND = 11, UNRECOGNIZED = -1 } declare function domainFromJSON(object: any): Domain; declare function domainToJSON(object: Domain): string; declare enum OperationStatusE { OPERATIONSTATUS_OK = 0, OPERATIONSTATUS_WAIT = 1, OPERATIONSTATUS_ERROR = 2, UNRECOGNIZED = -1 } declare function operationStatusEFromJSON(object: any): OperationStatusE; declare function operationStatusEToJSON(object: OperationStatusE): string; declare enum MessageFaultE { /** MESSAGEFAULT_ERROR_NONE - Request succeeded. */ MESSAGEFAULT_ERROR_NONE = 0, /** MESSAGEFAULT_ERROR_BUSY - Required vehicle subsystem is busy. Try again. */ MESSAGEFAULT_ERROR_BUSY = 1, /** MESSAGEFAULT_ERROR_TIMEOUT - Vehicle subsystem did not respond. Try again. */ MESSAGEFAULT_ERROR_TIMEOUT = 2, /** MESSAGEFAULT_ERROR_UNKNOWN_KEY_ID - Vehicle did not recognize the key used to authorize command. Make sure your key is paired with the vehicle. */ MESSAGEFAULT_ERROR_UNKNOWN_KEY_ID = 3, /** MESSAGEFAULT_ERROR_INACTIVE_KEY - Key used to authorize command has been disabled. */ MESSAGEFAULT_ERROR_INACTIVE_KEY = 4, /** MESSAGEFAULT_ERROR_INVALID_SIGNATURE - Command signature/MAC is incorrect. Use included session info to update session and try again. */ MESSAGEFAULT_ERROR_INVALID_SIGNATURE = 5, /** MESSAGEFAULT_ERROR_INVALID_TOKEN_OR_COUNTER - Command anti-replay counter has been used before. Use included session info to update session and try again. */ MESSAGEFAULT_ERROR_INVALID_TOKEN_OR_COUNTER = 6, /** MESSAGEFAULT_ERROR_INSUFFICIENT_PRIVILEGES - User is not authorized to execute command. This can be because of the role or because of vehicle state. */ MESSAGEFAULT_ERROR_INSUFFICIENT_PRIVILEGES = 7, /** MESSAGEFAULT_ERROR_INVALID_DOMAINS - Command was malformed or addressed to an unrecognized vehicle system. May indicate client error or older vehicle firmware. */ MESSAGEFAULT_ERROR_INVALID_DOMAINS = 8, /** MESSAGEFAULT_ERROR_INVALID_COMMAND - Unrecognized command. May indicate client error or unsupported vehicle firmware. */ MESSAGEFAULT_ERROR_INVALID_COMMAND = 9, /** MESSAGEFAULT_ERROR_DECODING - Could not parse command. Indicates client error. */ MESSAGEFAULT_ERROR_DECODING = 10, /** MESSAGEFAULT_ERROR_INTERNAL - Internal vehicle error. Try again. Most commonly encountered when the vehicle has not finished booting. */ MESSAGEFAULT_ERROR_INTERNAL = 11, /** MESSAGEFAULT_ERROR_WRONG_PERSONALIZATION - Command sent to wrong VIN. */ MESSAGEFAULT_ERROR_WRONG_PERSONALIZATION = 12, /** MESSAGEFAULT_ERROR_BAD_PARAMETER - Command was malformed or used a deprecated parameter. */ MESSAGEFAULT_ERROR_BAD_PARAMETER = 13, /** MESSAGEFAULT_ERROR_KEYCHAIN_IS_FULL - Vehicle's keychain is full. You must delete a key before you can add another. */ MESSAGEFAULT_ERROR_KEYCHAIN_IS_FULL = 14, /** MESSAGEFAULT_ERROR_INCORRECT_EPOCH - Session ID mismatch. Use included session info to update session and try again. */ MESSAGEFAULT_ERROR_INCORRECT_EPOCH = 15, /** MESSAGEFAULT_ERROR_IV_INCORRECT_LENGTH - Initialization Value length is incorrect (AES-GCM must use 12-byte IVs). Indicates a client programming error. */ MESSAGEFAULT_ERROR_IV_INCORRECT_LENGTH = 16, /** MESSAGEFAULT_ERROR_TIME_EXPIRED - Command expired. Use included session info to determine if clocks have desynchronized and try again. */ MESSAGEFAULT_ERROR_TIME_EXPIRED = 17, /** MESSAGEFAULT_ERROR_NOT_PROVISIONED_WITH_IDENTITY - Vehicle has not been provisioned with a VIN and may require service. */ MESSAGEFAULT_ERROR_NOT_PROVISIONED_WITH_IDENTITY = 18, /** MESSAGEFAULT_ERROR_COULD_NOT_HASH_METADATA - Internal vehicle error. */ MESSAGEFAULT_ERROR_COULD_NOT_HASH_METADATA = 19, /** MESSAGEFAULT_ERROR_TIME_TO_LIVE_TOO_LONG - Vehicle rejected command because its expiration time was too far in the future. This is a security precaution. */ MESSAGEFAULT_ERROR_TIME_TO_LIVE_TOO_LONG = 20, /** MESSAGEFAULT_ERROR_REMOTE_ACCESS_DISABLED - The vehicle owner has disabled Mobile access. */ MESSAGEFAULT_ERROR_REMOTE_ACCESS_DISABLED = 21, /** MESSAGEFAULT_ERROR_REMOTE_SERVICE_ACCESS_DISABLED - The command was authorized with a Service key, but the vehicle has not been configured to permit remote service commands. */ MESSAGEFAULT_ERROR_REMOTE_SERVICE_ACCESS_DISABLED = 22, /** MESSAGEFAULT_ERROR_COMMAND_REQUIRES_ACCOUNT_CREDENTIALS - The command requires proof of Tesla account credentials but was not sent over a channel that provides this proof. Resend the command using Fleet API. */ MESSAGEFAULT_ERROR_COMMAND_REQUIRES_ACCOUNT_CREDENTIALS = 23, /** MESSAGEFAULT_ERROR_REQUEST_MTU_EXCEEDED - Client sent a request with a field that exceeds MTU */ MESSAGEFAULT_ERROR_REQUEST_MTU_EXCEEDED = 24, /** MESSAGEFAULT_ERROR_RESPONSE_MTU_EXCEEDED - Client's request was received, but response size exceeded MTU */ MESSAGEFAULT_ERROR_RESPONSE_MTU_EXCEEDED = 25, MESSAGEFAULT_ERROR_REPEATED_COUNTER = 26, MESSAGEFAULT_ERROR_INVALID_KEY_HANDLE = 27, MESSAGEFAULT_ERROR_REQUIRES_RESPONSE_ENCRYPTION = 28, /** MESSAGEFAULT_ERROR_COMMAND_REQUIRES_PHYSICAL_PROXIMITY - TESLEMETRY-EXT UNCONFIRMED: not yet confirmed on a live vehicle */ MESSAGEFAULT_ERROR_COMMAND_REQUIRES_PHYSICAL_PROXIMITY = 29, UNRECOGNIZED = -1 } declare function messageFaultEFromJSON(object: any): MessageFaultE; declare function messageFaultEToJSON(object: MessageFaultE): string; declare enum Flags { FLAG_USER_COMMAND = 0, FLAG_ENCRYPT_RESPONSE = 1, /** FLAG_SUPPORTS_MESSAGE_FRAMING - TESLEMETRY-EXT UNCONFIRMED: not yet confirmed on a live vehicle */ FLAG_SUPPORTS_MESSAGE_FRAMING = 2, /** FLAG_COMPRESSED_ZLIB - TESLEMETRY-EXT UNCONFIRMED: not yet confirmed on a live vehicle */ FLAG_COMPRESSED_ZLIB = 3, /** FLAG_SUPPORTS_COMPRESSION_ZLIB - TESLEMETRY-EXT UNCONFIRMED: not yet confirmed on a live vehicle */ FLAG_SUPPORTS_COMPRESSION_ZLIB = 4, UNRECOGNIZED = -1 } declare function flagsFromJSON(object: any): Flags; declare function flagsToJSON(object: Flags): string; interface Destination { domain?: Domain | undefined; routingAddress?: Uint8Array | undefined; } interface MessageStatus { operationStatus: OperationStatusE; signedMessageFault: MessageFaultE; } interface SessionInfoRequest { publicKey: Uint8Array; challenge: Uint8Array; /** TESLEMETRY-EXT UNCONFIRMED: not yet confirmed on a live vehicle */ handle: number; /** TESLEMETRY-EXT UNCONFIRMED: not yet confirmed on a live vehicle */ identifiedKey: IdentifiedKey; } /** * ===== TESLEMETRY-EXT BEGIN ===== * One chunk of a RoutableMessage split across several transport frames. * UNCONFIRMED: not yet confirmed on a live vehicle. */ interface MessageFrame { chunkIndex: number; totalChunks: number; data: Uint8Array; } interface RoutableMessage { toDestination: Destination | undefined; fromDestination: Destination | undefined; protobufMessageAsBytes?: Uint8Array | undefined; sessionInfoRequest?: SessionInfoRequest | undefined; sessionInfo?: Uint8Array | undefined; signatureData?: SignatureData | undefined; signedMessageStatus: MessageStatus | undefined; requestUuid: Uint8Array; uuid: Uint8Array; flags: number; /** TESLEMETRY-EXT UNCONFIRMED: not yet confirmed on a live vehicle */ messageFrame: MessageFrame | undefined; } declare const Destination: MessageFns; declare const MessageStatus: MessageFns; declare const SessionInfoRequest: MessageFns; declare const MessageFrame: MessageFns; declare const RoutableMessage: MessageFns; type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; type DeepPartial = T extends Builtin ? T : T extends globalThis.Array ? globalThis.Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { [K in keyof T]?: DeepPartial; } : Partial; type KeysOfUnion = T extends T ? keyof T : never; type Exact = P extends Builtin ? P : P & { [K in keyof P]: Exact; } & { [K in Exclude>]: never; }; interface MessageFns { encode(message: T, writer?: BinaryWriter): BinaryWriter; decode(input: BinaryReader | Uint8Array, length?: number): T; fromJSON(object: any): T; toJSON(message: T): unknown; create, I>>(base?: I): T; fromPartial, I>>(object: I): T; } //#endregion export { DeepPartial, Destination, Domain, Exact, Flags, MessageFaultE, MessageFns, MessageFrame, MessageStatus, OperationStatusE, RoutableMessage, SessionInfoRequest, domainFromJSON, domainToJSON, flagsFromJSON, flagsToJSON, messageFaultEFromJSON, messageFaultEToJSON, operationStatusEFromJSON, operationStatusEToJSON, protobufPackage };