@shaggytools/nhtsa-api-wrapper
Version:
Universal javascript wrapper for the NHTSA.dot.gov VPIC 'vehicles' API, useful for VIN decoding, etc.
1 lines • 156 kB
Source Map (JSON)
{"version":3,"file":"nhtsa-api-wrapper.umd.cjs","sources":["../src/utils/argHandler.ts","../src/utils/errorHandler.ts","../src/utils/getTypeof.ts","../src/utils/isValidVin.ts","../src/constants.ts","../src/utils/queryString.ts","../src/api/endpoints/DecodeVin.ts","../src/api/endpoints/DecodeVinExtended.ts","../src/api/endpoints/DecodeVinValues.ts","../src/api/endpoints/DecodeVinValuesBatch.ts","../src/api/endpoints/DecodeVinValuesExtended.ts","../src/api/endpoints/DecodeWMI.ts","../src/api/endpoints/GetAllMakes.ts","../src/api/endpoints/GetAllManufacturers.ts","../src/api/endpoints/GetCanadianVehicleSpecifications.ts","../src/api/endpoints/GetEquipmentPlantCodes.ts","../src/api/endpoints/GetMakeForManufacturer.ts","../src/api/endpoints/GetMakesForManufacturerAndYear.ts","../src/api/endpoints/GetMakesForVehicleType.ts","../src/api/endpoints/GetManufacturerDetails.ts","../src/api/endpoints/GetModelsForMake.ts","../src/api/endpoints/GetModelsForMakeId.ts","../src/api/endpoints/GetModelsForMakeIdYear.ts","../src/api/endpoints/GetModelsForMakeYear.ts","../src/api/endpoints/GetParts.ts","../src/api/endpoints/GetVehicleTypesForMake.ts","../src/api/endpoints/GetVehicleTypesForMakeId.ts","../src/api/endpoints/GetVehicleVariableList.ts","../src/api/endpoints/GetVehicleVariableValuesList.ts","../src/api/endpoints/GetWMIsForManufacturer.ts","../src/api/useNHTSA.ts"],"sourcesContent":["/**\n * @module utils/argHandler\n * @category Utility Functions\n */\n\nimport { getTypeof } from '@/utils'\nimport type { AtLeastOne } from '@/types'\n\nexport type IArgToValidate = {\n name: string\n value: unknown\n errorMode?: 'error' | 'boolean'\n} & AtLeastOne<{\n required?: boolean\n types?: string[]\n}>\n\n/**\n * Will validate a single argument based on the provided options and throws an error with a message\n * detailing the invalid argument(s) and what was expected.\n *\n * There are two modes for this function:\n * - 'error' - (default) - Throws an error if the argument fails validation.\n * - 'boolean' - Returns false if the argument fails validation, does not throw an error.\n *\n * Both modes return true if the argument passes validation.\n *\n * The logic is the same for both modes, the only difference is the return value.\n *\n * `error` mode is useful for validating arguments supplied to a function and throwing an\n * error if the arguments are invalid. Can also be used to validate existence and type of any\n * value matches an array of type names you provide. It will throw an error if the argument is\n * invalid and return true if the argument is valid.\n *\n * `boolean` mode is useful for validating arguments in a function that returns a boolean value,\n * such as in Array.filter() or 'if' statements. It will return false if the argument is invalid\n * and true if the argument is valid.\n *\n * ### Options\n *\n * The main purpose for this function is to throw a helpful Error message to the user when they\n * are using the endpoint functions in a way that would cause the NHTSA API to return an error.\n * In default mode, it uses the `options.name` and `options.types` array (if provided) to build the\n * error message in the case of validation failure.\n *\n * - `options.name` and `options.value` are required in each arg object. It's ok to pass undefined\n * as the value, i.e. `{ value: someVarThatMightBeUndefined }`, but you must provide a name for the\n * argument. If you didn't provide a name then the error message would not be as helpful.\n *\n * - `options.required` and `options.types` are optional.\n *\n * At least one of `options.required` or `options.types` must be provided as part of each arg\n * object. At least one of these options must be provided for each arg object, otherwise it will\n * always return true. You probably don't need to validate that arg if you don't provide at least\n * one of these options.\n *\n * ### Validation Logic\n *\n * If both `required` is true and `types` are provided, it will validate the value is defined and\n * that the typeof value is one of the provided strings in the `types` array.\n *\n * If `required` is true and no `types` are provided, it will only validate value is defined.\n *\n * - If `types` is provided but it is not `required`, it will only validate value is one of the\n * type strings in the `types` array.\n * - If `types` is provided but it is not `required` and value is 'undefined' it will skip\n * validation as there is no value to validate against and user would mark it required if they\n * wanted to validate against a defined value. If the value is not required and you give types of\n * ['string', 'number'] for example, it will validate that the value is either a string or a number.\n * - If neither `required` nor `types` are provided, it will not peerform validation and will\n * simply return true.\n *\n * @param options - options object\n * @param {string} options.name - name of the argument\n * @param {unknown} options.value - value of the argument\n * @param {boolean} [options.required] - if true, will validate that value is defined\n * @param {(string[])} [options.types] - array of strings to validate value against\n * @param {(\"error\"|\"boolean\")} [options.errorMode='error'] - 'error' or 'boolean' - 'error' will\n * throw an error if the argument is invalid, 'boolean' will return false if the argument is invalid\n * @returns {(Error|boolean)} - true if validation passes, mode 'error' throws Error in the case of\n * validation failure, mode 'boolean' returns false in the case of validation failure\n */\nexport const validateArgument = ({\n name,\n value,\n required,\n types,\n errorMode = 'error',\n}: IArgToValidate): boolean => {\n if (getTypeof(name) !== 'string') {\n throw Error(`'name', is required and must be of type string`)\n }\n\n let error = ''\n const typeofValue = getTypeof(value)\n const errorPrepend = `error validating argument named \"${name}\",`\n const errorAppend = `received value: ${value} - of type: <${typeofValue}>`\n\n if (types && (getTypeof(types) !== 'array' || !types.length)) {\n throw Error(`${errorPrepend} 'types' must be an array of strings`)\n }\n\n /* ex: if types = ['string', 'number'] then you'll get '<string | number>' */\n const joinedTypes = types ? `<${types.join(' | ')}>` : ''\n\n /* argument validation logic */\n if (required && !types) {\n if (!value) {\n error = `${errorPrepend} is required, ${errorAppend}`\n }\n } else if (types && !required) {\n /* if value is not defined and is not required then we don't need to validate the type */\n if (value !== undefined && !types.includes(typeofValue)) {\n error = `${errorPrepend} must be of type(s) ${joinedTypes}, ${errorAppend}`\n }\n } else if (required && types) {\n if (!value || !types.includes(typeofValue)) {\n error = `${errorPrepend} is required and must be of type(s) ${joinedTypes}, ${errorAppend}`\n }\n }\n\n if (error.length) {\n if (errorMode === 'boolean') return false\n else throw Error(error)\n }\n\n return true\n}\n\n/**\n * Catches invalid arguments passed to functions and throws an error with a message detailing the\n * invalid argument(s) and what was expected.\n *\n * At least one of `required` or `types` must be provided for each arg to validate against or it\n * will validate nothing and return true for that arg value as if it was valid.\n *\n * Under the hood it loops through the args and calls `validateArgument` to validate each arg.\n * `validateArgument` will throw an error if any of the arguments are invalid based on the provided\n * options in each arg. See the description for `validateArgument` for more details on how\n * validation logic works and how to override the default error throwing behavior.\n *\n * @param {Object} options - options object\n * @param {IArgToValidate[]} options.args - array of IArgToValidate objects\n * @param {boolean} [options.mode=default] - 'default' or 'atLeast' - 'default' will validate all\n * args, 'atLeast' will validate at least one arg in in the array has a defined value\n * @returns {boolean} - true if validation passes, throws error in the case of validation failure\n */\nexport const catchInvalidArguments = ({\n args,\n mode = 'default',\n}: {\n args: IArgToValidate[]\n mode?: 'default' | 'atLeast'\n}) => {\n if (getTypeof(args) !== 'array' || !args.length) {\n throw Error(\n `catchInvalidArguments requires \"args\" that must be an array of IArgToValidate objects`\n )\n }\n\n if (mode === 'default') {\n args.forEach((arg) => validateArgument(arg))\n } else if (mode === 'atLeast') {\n const providedArg = args.find((arg) => !!arg.value)\n if (!providedArg) {\n throw Error(\n `must provide at least one of the following arguments: ${args\n .map((arg) => arg.name)\n .join(', ')}`\n )\n }\n }\n\n return true\n}\n","/**\n * @module utils/errorHandler\n * @category Utility Functions\n */\n\nimport { getTypeof } from '@/utils'\n\n/**\n * Checks if `error` is an instance of any Error type.\n *\n * @param error - Any type of value\n * @returns - True if `error` is an instance of Error, TypeError, etc.\n */\nexport const isError = (error: unknown): boolean => {\n return getTypeof(error) === 'error'\n}\n\n/**\n * Handles errors by returning an Error instance.\n * Accepts any type of value but will return default error message of `an unknown error occurred` if\n * `error` is not an Error type or a message string.\n *\n * @param error - Any type of value\n * @returns - instance of Error with message\n */\nexport const handleError = (error: unknown): Error => {\n let message = 'an unknown error occurred.'\n if (isError(error)) {\n if (!(error as Error).message) {\n ;(error as Error).message = message\n }\n return error as Error\n }\n if (getTypeof(error) === 'string') {\n message = error as string\n }\n return Error(message)\n}\n\n/**\n * Returns a Promise rejection containing an Error instance.\n * Uses {@link handleError} to return a default error message if `error` is\n * not an Error type.\n *\n * @param error - Any type of value\n */\nexport const rejectWithError = async (error: unknown): Promise<never> => {\n return Promise.reject(handleError(error))\n}\n","/**\n * @module utils/getTypeof\n * @category Utility Functions\n */\n\n/**\n * Gets type of `value` using `Object.prototype.toString.call(value)`.\n *\n * Why? Because `typeof` is not reliable for all types of values.\n *\n * Object.prototype.toString gives more accurate results in the case someone has used an object wrapper\n * for primitive data types such as `new Number()` or `new String()`.\n * It will also accurately recognize any Error types, Error, TypeError, etc., as 'error'.\n *\n * @param {any} value - Any kind of value (string, object, array, function, etc).\n * @returns {string} - Type of value, normalized to a lowercase string.\n */\nexport const getTypeof = (value: unknown): string => {\n const toString: string = Object.prototype.toString\n .call(value)\n .toLowerCase() /* ex: => '[object string]' or '[object array], etc. */\n\n /* return only the type, ex: 'string' or 'array' */\n return toString.slice(8, toString.length - 1)\n}\n","/**\n * @module utils/isValidVin\n * @category Utility Functions\n */\n\n/**\n * There will need to be some way to translate vin digits that are alphabetic into their number\n * value in the VIN algorithm transliteration table. Later, during the creation of the checksum\n * variable, those digits will be multiplied against their corresponding weight (by index) in the\n * WEIGHTS_ARRAY. This transliteration table is a key part of the VIN validation algorithm.\n */\nconst TRANSLITERATION_TABLE: Record<string, number> = {\n A: 1,\n B: 2,\n C: 3,\n D: 4,\n E: 5,\n F: 6,\n G: 7,\n H: 8,\n J: 1,\n K: 2,\n L: 3,\n M: 4,\n N: 5,\n P: 7,\n R: 9,\n S: 2,\n T: 3,\n U: 4,\n V: 5,\n W: 6,\n X: 7,\n Y: 8,\n Z: 9,\n}\n\n/**\n * During the creation of the 'checksum' variable, these weights will be multiplied by the value of\n * their mirrored index vin digits. The array index of each weight corresponds to the same index of\n * each digit in the 'vin'.\n */\nconst WEIGHTS_ARRAY: number[] = [\n 8, 7, 6, 5, 4, 3, 2, 10, 0, 9, 8, 7, 6, 5, 4, 3, 2,\n]\n\n/**\n * Provides **offline** validation of Vehicle Identification Numbers (VINs) using the\n * [VIN Check Algorithm](https://en.wikibooks.org/wiki/Vehicle_Identification_Numbers_(VIN_codes)/Check_digit).\n *\n * If you need to test that the algorithm is working correctly, you can use 17 ones `1` as\n * the VIN and it should return `true` as the result.\n *\n * @example <caption>Browser via html script tags</caption>\n * const isValid = NHTSA.isValidVin('3VWD07AJ5EM388202')\n * console.log(isValid) // true\n *\n * @example <caption>Imported as a module</caption>\n * import { isValidVin } from '@shaggytools/nhtsa-api-wrapper'\n * const isValid = isValidVin('3VWD07AJ5EM388202')\n * console.log(isValid) // true\n *\n * @param {string} vin - Vehicle Identification Number.\n * @returns {boolean} True for a valid VIN, false for an invalid VIN.\n */\nexport function isValidVin(vin: string): boolean {\n /* A valid VIN must be a string and is always exactly 17 digits */\n if (typeof vin !== 'string' || vin.length != 17) {\n return false\n }\n\n /* Normalize the vin to all uppercase letters */\n vin = vin.toUpperCase()\n /* split the vin digits into an array */\n const vinArray: string[] = vin.split('')\n /* checkDigit will be tested against the checkSum later */\n const checkDigit: string = vinArray[8]\n\n /*\n * In a valid VIN, the checkDigit can either be:\n * a number, 0-9 inclusive OR the character 'X'\n */\n if (isNaN(parseInt(checkDigit)) && checkDigit !== 'X') {\n return false\n }\n\n /*\n * The checkValue must be a digit and 'X' is the only valid alphabetic check value.\n * As per the algorithm, a checkDigit of 'X' is equal to a checkValue of `10` and needs to be\n * converted as such.\n */\n const checkValue: number = checkDigit === 'X' ? 10 : parseInt(checkDigit)\n\n /*\n * Maps the vinArray and converts any values (digits) that are alphabetic, into numbers, using the\n * TRANSLITERATION_TABLE. Then these numbers are multiplied against their corresponding weight in\n * the WEIGHTS_ARRAY, matched by index position. All 17 of those digitValues are then added\n * together and divided by 11. The remainder, or % modulo, of that division will be the final\n * 'checksum'.\n */\n const checksum: number =\n vinArray\n .map((digit: string, index: number) => {\n let digitValue: number\n /* Use the transliteration table to convert any Not a Number(NaN) values to numbers */\n isNaN(parseInt(digit))\n ? (digitValue = TRANSLITERATION_TABLE[digit])\n : (digitValue = parseInt(digit))\n\n /* Convert the digitValue to a weighted number corresponding to it's position, by index */\n const weight: number = WEIGHTS_ARRAY[index]\n\n /* The final step for each digit is to multiply the digit by it's corresponding weight */\n return digitValue * weight\n })\n /* Finally, get the sum of all digits and divide by 11, the modulo of that is the checksum */\n .reduce((acc, currValue) => acc + currValue, 0) % 11\n\n /*\n * The checksum is compared against the checkValue we set earlier (the 9th digit of the VIN). As\n * per the algorithm, if they are equal to each other, then the VIN must be valid and we return\n * true, otherwise the VIN is invalid and we return false.\n */\n return checksum === checkValue\n}\n","export const NHTSA_BASE_URL = 'https://vpic.nhtsa.dot.gov/api/vehicles'\nexport const NHTSA_RESPONSE_FORMAT = 'json'\n","/**\n * @module utils/queryString\n * @category Utility Functions\n */\n\nimport { NHTSA_RESPONSE_FORMAT } from '@/constants'\nimport { validateArgument } from '@/utils'\n\n/** Valid URI component types */\nexport type QueryStringTypes = string | number | boolean\n\n/** Object to build the query string with */\nexport type QueryStringParams = Record<string, QueryStringTypes>\n\n/** Object returned by encodeQueryStringParams() */\nexport type QueryStringParamsEncoded<T> = { [key in keyof T]: string }\n\n/**\n * This function is used internally by other package functions. As a consumer of this package, you\n * should not need to use this function directly in most cases.\n *\n * Utility function to perform URI component encoding on all values in an object, for use in URL\n * query strings.\n *\n * - Returns an object of valid URI encoded parameters with same keys as the original object.\n * - Will silently filter out parameters with values that are not type `string`, `number`, or\n * `boolean`.\n * - It filters invalid key/values so that encodeURIComponent() does not throw an error.\n *\n * In it's current implementation, this function assumes that invalid types have already been\n * filtered out, and that all values are valid. If you need to be sure that all keys are present\n * in the returned object, you can use the `validateArgument()` function to check the types of all\n * values are valid before calling this function.\n *\n * This function is not exported by the package, but is used internally by other\n * functions. However, it _is_ exported by the package as part of the composable function\n * `useQueryString`, and renamed to `encodeParams` for less verbose use.\n *\n * @param {QueryStringParams} params - An object of search parameters to be encoded.\n * @returns {QueryStringParamsEncoded} - A new object of same keys as the original object with\n * values converted to URI component strings. Any keys with values not a string, number, or\n * boolean are filtered out of final object.\n */\nexport const encodeQueryStringParams = <T extends QueryStringParams>(\n params: T\n): QueryStringParamsEncoded<T> => {\n /* Validate user provided params is an object */\n validateArgument({\n name: 'params',\n value: params,\n required: true,\n types: ['object'],\n })\n\n const _params = Object.entries(params)\n .filter(([key, value]) =>\n validateArgument({\n name: key,\n types: ['string', 'number', 'boolean'],\n value,\n errorMode: 'boolean',\n })\n )\n .reduce((acc, [key, value]) => {\n /* can expect only strings, numbers, and booleans after filtering */\n acc[key as keyof T] = encodeURIComponent(value)\n return acc\n }, {} as QueryStringParamsEncoded<T>)\n\n return _params\n}\n\n/**\n * This function is used internally by other package functions. As a consumer of this package, you\n * should not need to use this function directly in most cases.\n *\n * Utility function to generate a query string conforming to URI component standards. Takes an an\n * optional object of search parameters and returns an encoded query string.\n *\n * This function will always override `params.format` with `{ format: 'json' }`. This is hardcoded\n * into the package and cannot be overridden, this package provides no support for CSV or XML\n * formats at this time. This means the default query string will be `\"?format=json\"` even if no\n * `params` are provided by user.\n *\n * - Ignores parameters that are not strings, numbers, or booleans, and also ignores empty strings\n * by default.\n *\n * - If you don't provide an object as the first argument, an error will be thrown. Providing an\n * empty object will not throw an error.\n *\n * - If the second argument, `allowEmptyParams`, is set to `true`, the function will include keys\n * with empty string values in the final query string, e.g. 'emptyKey='.\n *\n * @param {QueryStringParams} params - An object of search parameters to be converted to a query\n * string.\n * @param {boolean} [allowEmptyParams=false] - Set to `true` to include keys with empty string\n * values, e.g. 'emptyKey='.\n * @returns {string} - A query string of search parameters for use in a final fetch URL.\n */\nexport const createQueryString = <T extends QueryStringParams>(\n params = {} as T,\n allowEmptyParams = false\n): string => {\n /* Validate user provided params is an object */\n validateArgument({\n name: 'params',\n value: params,\n types: ['object'],\n })\n\n /* Merge with valid user params but override with static params */\n const _params = encodeQueryStringParams({\n ...params,\n format: NHTSA_RESPONSE_FORMAT,\n })\n\n /* Create query string from params, default: ?format=json */\n return (\n '?' +\n Object.entries(_params)\n .map(([key, value], index, array) => {\n return value.length || (allowEmptyParams && value === '')\n ? `${key}=${value}${index < array.length - 1 ? '&' : ''}`\n : ''\n })\n .join('')\n )\n}\n","/**\n * @module api/endpoints/DecodeVin\n * @category API Endpoints\n */\n\nimport { useNHTSA } from '@/api'\nimport { catchInvalidArguments, rejectWithError } from '@/utils'\nimport type { IArgToValidate, NhtsaResponse } from '@/types'\n\n/**\n * ::: tip :bulb: More Information\n * See: [DecodeVin Documentation](/api/endpoints/decode-vin)\n * :::\n *\n * `DecodeVin` decodes a Vehicle Identification Number (VIN) and returns useful information about\n * the vehicle.\n *\n * Providing `params.modelYear` allows for the decoding to specifically be done in the current, or\n * older (pre-1980), model year ranges. It is recommended to always provide `params.modelYear` if\n * the model year is known at the time of decoding, but it is not required.\n *\n * This endpoint also supports partial VIN decoding (VINs that are less than 17 characters).\n * - Ex: 5UXWX7C5*BA\n * - In this case, the VIN will be decoded partially with the available characters\n * - In case of partial VINs, a `*` could be used to indicate the unavailable characters\n * - The 9th digit is not necessary\n *\n * @param {string} vin - Vehicle Identification Number (full or partial)\n * @param [params] - Object of Query Search names and values to append to the URL as a query string\n * @param {(string|number)} [params.modelYear] - Optional Model Year search parameter\n * @param {boolean} [doFetch=true] - Whether to fetch the data or just return the URL\n * (default: `true`)\n * @returns {(Promise<NhtsaResponse<DecodeVinResults> | string>)} - Api Response `object`\n * -or- url `string` if `doFetch = false`\n */\nfunction DecodeVin(vin: string): Promise<NhtsaResponse<DecodeVinResults>>\n\nfunction DecodeVin(\n vin: string,\n doFetch: true,\n _dummy?: undefined\n): Promise<NhtsaResponse<DecodeVinResults>>\n\nfunction DecodeVin(\n vin: string,\n doFetch: false,\n _dummy?: undefined\n): Promise<string>\n\nfunction DecodeVin(\n vin: string,\n params: { modelYear?: string | number },\n doFetch: false\n): Promise<string>\n\nfunction DecodeVin(\n vin: string,\n params?: { modelYear?: string | number },\n doFetch?: true\n): Promise<NhtsaResponse<DecodeVinResults>>\n\n/* Implementation */\nasync function DecodeVin(\n vin: string,\n params?:\n | {\n modelYear?: string | number\n }\n | boolean,\n doFetch = true\n): Promise<NhtsaResponse<DecodeVinResults> | string> {\n const endpointName = 'DecodeVin'\n\n try {\n if (typeof params === 'boolean') {\n doFetch = params\n params = undefined\n }\n\n const args: IArgToValidate[] = [\n { name: 'vin', value: vin, required: true, types: ['string'] },\n { name: 'params', value: params, types: ['object'] },\n {\n name: 'modelYear',\n value: params?.modelYear,\n types: ['string', 'number'],\n },\n ]\n catchInvalidArguments({ args })\n\n const { get, createCachedUrl, getCachedUrl } = useNHTSA()\n\n createCachedUrl({ endpointName, path: vin, params })\n\n if (!doFetch) {\n return getCachedUrl()\n } else {\n return get()\n }\n } catch (error) {\n return rejectWithError(error)\n }\n}\n\nexport { DecodeVin }\n\n/**\n * Objects in the `Results` array of `DecodeVin` endpoint response.\n */\nexport type DecodeVinResults = {\n Value: string | null\n ValueId: string | null\n Variable: DecodeVinVariable\n VariableId: number\n}\n\n/**\n * Possible `DecodeVinResults.Variable` values for DecodeVin endpoint.\n *\n * This type is here to provide a list of possible values manually extracted from an actual API\n * response. There are some things to note:\n * - Names are ordered to mirror actual API response order.\n * - Names have been known to change slightly or be added/removed.\n * - Some listed here could be missing from the API response.\n * - There may be more actual values than listed here.\n *\n * Last Updated: 02/14/2023\n */\nexport type DecodeVinVariable =\n | 'Suggested VIN'\n | 'Error Code'\n | 'Possible Values'\n | 'Additional Error Text'\n | 'Error Text'\n | 'Vehicle Descriptor'\n | 'Destination Market'\n | 'Make'\n | 'Manufacturer Name'\n | 'Model'\n | 'Model Year'\n | 'Plant City'\n | 'Series'\n | 'Trim'\n | 'Vehicle Type'\n | 'Plant Country'\n | 'Plant Company Name'\n | 'Plant State'\n | 'Trim2'\n | 'Series2'\n | 'Note'\n | 'Base Price ($)'\n | 'Non-Land Use'\n | 'Body Class'\n | 'Doors'\n | 'Windows'\n | 'Wheel Base Type'\n | 'Track Width (inches)'\n | 'Gross Vehicle Weight Rating From'\n | 'Bed Length (inches)'\n | 'Curb Weight (pounds)'\n | 'Wheel Base (inches) From'\n | 'Wheel Base (inches) To'\n | 'Gross Combination Weight Rating From'\n | 'Gross Combination Weight Rating To'\n | 'Gross Vehicle Weight Rating To'\n | 'Bed Type'\n | 'Cab Type'\n | 'Trailer Type Connection'\n | 'Trailer Body Type'\n | 'Trailer Length (feet)'\n | 'Other Trailer Info'\n | 'Number of Wheels'\n | 'Wheel Size Front (inches)'\n | 'Wheel Size Rear (inches)'\n | 'Entertainment System'\n | 'Steering Location'\n | 'Number of Seats'\n | 'Number of Seat Rows'\n | 'Transmission Style'\n | 'Transmission Speeds'\n | 'Drive Type'\n | 'Axles'\n | 'Axle Configuration'\n | 'Brake System Type'\n | 'Brake System Description'\n | 'Other Battery Info'\n | 'Battery Type'\n | 'Number of Battery Cells per Module'\n | 'Battery Current (Amps) From'\n | 'Battery Voltage (Volts) From'\n | 'Battery Energy (kWh) From'\n | 'EV Drive Unit'\n | 'Battery Current (Amps) To'\n | 'Battery Voltage (Volts) To'\n | 'Battery Energy (kWh) To'\n | 'Number of Battery Modules per Pack'\n | 'Number of Battery Packs per Vehicle'\n | 'Charger Level'\n | 'Charger Power (kW)'\n | 'Engine Number of Cylinders'\n | 'Displacement (CC)'\n | 'Displacement (CI)'\n | 'Displacement (L)'\n | 'Engine Stroke Cycles'\n | 'Engine Model'\n | 'Engine Power (kW)'\n | 'Fuel Type - Primary'\n | 'Valve Train Design'\n | 'Engine Configuration'\n | 'Fuel Type - Secondary'\n | 'Fuel Delivery / Fuel Injection Type'\n | 'Engine Brake (hp) From'\n | 'Cooling Type'\n | 'Engine Brake (hp) To'\n | 'Electrification Level'\n | 'Other Engine Info'\n | 'Turbo'\n | 'Top Speed (MPH)'\n | 'Engine Manufacturer'\n | 'Pretensioner'\n | 'Seat Belt Type'\n | 'Other Restraint System Info'\n | 'Curtain Air Bag Locations'\n | 'Seat Cushion Air Bag Locations'\n | 'Front Air Bag Locations'\n | 'Knee Air Bag Locations'\n | 'Side Air Bag Locations'\n | 'Anti-lock Braking System (ABS)'\n | 'Electronic Stability Control (ESC)'\n | 'Traction Control'\n | 'Tire Pressure Monitoring System (TPMS) Type'\n | 'Active Safety System Note'\n | 'Auto-Reverse System for Windows and Sunroofs'\n | 'Automatic Pedestrian Alerting Sound (for Hybrid and EV only)'\n | 'Event Data Recorder (EDR)'\n | 'Keyless Ignition'\n | 'SAE Automation Level From'\n | 'SAE Automation Level To'\n | 'Adaptive Cruise Control (ACC)'\n | 'Crash Imminent Braking (CIB)'\n | 'Blind Spot Warning (BSW)'\n | 'Forward Collision Warning (FCW)'\n | 'Lane Departure Warning (LDW)'\n | 'Lane Keeping Assistance (LKA)'\n | 'Backup Camera'\n | 'Parking Assist'\n | 'Bus Length (feet)'\n | 'Bus Floor Configuration Type'\n | 'Bus Type'\n | 'Other Bus Info'\n | 'Custom Motorcycle Type'\n | 'Motorcycle Suspension Type'\n | 'Motorcycle Chassis Type'\n | 'Other Motorcycle Info'\n | 'Dynamic Brake Support (DBS)'\n | 'Pedestrian Automatic Emergency Braking (PAEB)'\n | 'Automatic Crash Notification (ACN) / Advanced Automatic Crash Notification (AACN)'\n | 'Daytime Running Light (DRL)'\n | 'Headlamp Light Source'\n | 'Semiautomatic Headlamp Beam Switching'\n | 'Adaptive Driving Beam (ADB)'\n | 'Rear Cross Traffic Alert'\n | 'Rear Automatic Emergency Braking'\n | 'Blind Spot Intervention (BSI)'\n | 'Lane Centering Assistance'\n | (string & Record<string, never>)\n","/**\n * @module api/endpoints/DecodeVinExtended\n * @category API Endpoints\n */\n\nimport { useNHTSA } from '@/api'\nimport { catchInvalidArguments, rejectWithError } from '@/utils'\nimport type { IArgToValidate, NhtsaResponse } from '@/types'\n\n/**\n * ::: tip :bulb: More Information\n * See: [DecodeVinExtended Documentation](/api/endpoints/decode-vin-extended)\n * :::\n *\n * `DecodeVinExtended` decodes a Vehicle Identification Number (VIN) and returns useful information\n * about the vehicle.\n *\n * This endpoint is similar to `DecodeVin` but returns additional information on variables related\n * to other NHTSA programs like the\n * [NCSA](https://www.nhtsa.gov/research-data/national-center-statistics-and-analysis-ncsa).\n *\n * Providing `params.modelYear` allows for the decoding to specifically be done in the current, or\n * older (pre-1980), model year ranges. It is recommended to always provide `params.modelYear` if\n * the model year is known at the time of decoding, but it is not required.\n *\n * This endpoint also supports partial VIN decoding (VINs that are less than 17 characters).\n * - Ex: 5UXWX7C5*BA\n * - In this case, the VIN will be decoded partially with the available characters\n * - In case of partial VINs, a `*` could be used to indicate the unavailable characters\n * - The 9th digit is not necessary\n *\n * @param {string} vin - Vehicle Identification Number (full or partial)\n * @param [params] - Object of Query Search names and values to append to the URL as a query string\n * @param {(string|number)} [params.modelYear] - Optional Model Year search parameter\n * @param {boolean} [doFetch=true] - Whether to fetch the data or just return the URL\n * (default: `true`)\n * @returns {(Promise<NhtsaResponse<DecodeVinExtendedResults> | string>)} - Api Response `object`\n * -or- url `string` if `doFetch = false` (default: `true`)\n */\nfunction DecodeVinExtended(\n vin: string\n): Promise<NhtsaResponse<DecodeVinExtendedResults>>\n\nfunction DecodeVinExtended(\n vin: string,\n doFetch: true,\n _dummy?: undefined\n): Promise<NhtsaResponse<DecodeVinExtendedResults>>\n\nfunction DecodeVinExtended(\n vin: string,\n doFetch: false,\n _dummy?: undefined\n): Promise<string>\n\nfunction DecodeVinExtended(\n vin: string,\n params: { modelYear?: string | number },\n doFetch: false\n): Promise<string>\n\nfunction DecodeVinExtended(\n vin: string,\n params?: { modelYear?: string | number },\n doFetch?: true\n): Promise<NhtsaResponse<DecodeVinExtendedResults>>\n\n/* Implementation */\nasync function DecodeVinExtended(\n vin: string,\n params?:\n | {\n modelYear?: string | number\n }\n | boolean,\n doFetch = true\n): Promise<NhtsaResponse<DecodeVinExtendedResults> | string> {\n const endpointName = 'DecodeVinExtended'\n\n try {\n if (typeof params === 'boolean') {\n doFetch = params\n params = undefined\n }\n\n const args: IArgToValidate[] = [\n { name: 'vin', value: vin, required: true, types: ['string'] },\n { name: 'params', value: params, types: ['object'] },\n {\n name: 'modelYear',\n value: params?.modelYear,\n types: ['string', 'number'],\n },\n ]\n catchInvalidArguments({ args })\n\n const { get, createCachedUrl, getCachedUrl } = useNHTSA()\n\n createCachedUrl({ endpointName, path: vin, params })\n\n if (!doFetch) {\n return getCachedUrl()\n } else {\n return get()\n }\n } catch (error) {\n return rejectWithError(error)\n }\n}\n\nexport { DecodeVinExtended }\n\n/**\n * Objects in the `Results` array of `DecodeVinExtended` endpoint response.\n */\nexport type DecodeVinExtendedResults = {\n Value: string | null\n ValueId: string | null\n Variable: DecodeVinExtendedVariable\n VariableId: number\n}\n\n/**\n * Possible `DecodeVinExtendedResults.Variable` values for DecodeVinExtended endpoint.\n *\n * This type is here to provide a list of possible values manually extracted from an actual API\n * response. There are some things to note:\n * - Names are ordered to mirror actual API response order.\n * - Names have been known to change slightly or be added/removed.\n * - Some listed here could be missing from the API response.\n * - There may be more actual values than listed here.\n *\n * Last Updated: 02/14/2023\n */\nexport type DecodeVinExtendedVariable =\n | 'Suggested VIN'\n | 'Error Code'\n | 'Possible Values'\n | 'Additional Error Text'\n | 'Error Text'\n | 'Vehicle Descriptor'\n | 'Destination Market'\n | 'Make'\n | 'Manufacturer Name'\n | 'Model'\n | 'Model Year'\n | 'Plant City'\n | 'Series'\n | 'Trim'\n | 'Vehicle Type'\n | 'Plant Country'\n | 'Plant Company Name'\n | 'Plant State'\n | 'Trim2'\n | 'Series2'\n | 'Note'\n | 'Base Price ($)'\n | 'Non-Land Use'\n | 'Body Class'\n | 'Doors'\n | 'Windows'\n | 'Wheel Base Type'\n | 'Track Width (inches)'\n | 'Gross Vehicle Weight Rating From'\n | 'Bed Length (inches)'\n | 'Curb Weight (pounds)'\n | 'Wheel Base (inches) From'\n | 'Wheel Base (inches) To'\n | 'Gross Combination Weight Rating From'\n | 'Gross Combination Weight Rating To'\n | 'Gross Vehicle Weight Rating To'\n | 'Bed Type'\n | 'Cab Type'\n | 'Trailer Type Connection'\n | 'Trailer Body Type'\n | 'Trailer Length (feet)'\n | 'Other Trailer Info'\n | 'Number of Wheels'\n | 'Wheel Size Front (inches)'\n | 'Wheel Size Rear (inches)'\n | 'Entertainment System'\n | 'Steering Location'\n | 'Number of Seats'\n | 'Number of Seat Rows'\n | 'Transmission Style'\n | 'Transmission Speeds'\n | 'Drive Type'\n | 'Axles'\n | 'Axle Configuration'\n | 'Brake System Type'\n | 'Brake System Description'\n | 'Other Battery Info'\n | 'Battery Type'\n | 'Number of Battery Cells per Module'\n | 'Battery Current (Amps) From'\n | 'Battery Voltage (Volts) From'\n | 'Battery Energy (kWh) From'\n | 'EV Drive Unit'\n | 'Battery Current (Amps) To'\n | 'Battery Voltage (Volts) To'\n | 'Battery Energy (kWh) To'\n | 'Number of Battery Modules per Pack'\n | 'Number of Battery Packs per Vehicle'\n | 'Charger Level'\n | 'Charger Power (kW)'\n | 'Engine Number of Cylinders'\n | 'Displacement (CC)'\n | 'Displacement (CI)'\n | 'Displacement (L)'\n | 'Engine Stroke Cycles'\n | 'Engine Model'\n | 'Engine Power (kW)'\n | 'Fuel Type - Primary'\n | 'Valve Train Design'\n | 'Engine Configuration'\n | 'Fuel Type - Secondary'\n | 'Fuel Delivery / Fuel Injection Type'\n | 'Engine Brake (hp) From'\n | 'Cooling Type'\n | 'Engine Brake (hp) To'\n | 'Electrification Level'\n | 'Other Engine Info'\n | 'Turbo'\n | 'Top Speed (MPH)'\n | 'Engine Manufacturer'\n | 'Pretensioner'\n | 'Seat Belt Type'\n | 'Other Restraint System Info'\n | 'Curtain Air Bag Locations'\n | 'Seat Cushion Air Bag Locations'\n | 'Front Air Bag Locations'\n | 'Knee Air Bag Locations'\n | 'Side Air Bag Locations'\n | 'Anti-lock Braking System (ABS)'\n | 'Electronic Stability Control (ESC)'\n | 'Traction Control'\n | 'Tire Pressure Monitoring System (TPMS) Type'\n | 'Active Safety System Note'\n | 'Auto-Reverse System for Windows and Sunroofs'\n | 'Automatic Pedestrian Alerting Sound (for Hybrid and EV only)'\n | 'Event Data Recorder (EDR)'\n | 'Keyless Ignition'\n | 'SAE Automation Level From'\n | 'SAE Automation Level To'\n | 'NCSA Body Type'\n | 'NCSA Make'\n | 'NCSA Model'\n | 'NCSA Note'\n | 'Adaptive Cruise Control (ACC)'\n | 'Crash Imminent Braking (CIB)'\n | 'Blind Spot Warning (BSW)'\n | 'Forward Collision Warning (FCW)'\n | 'Lane Departure Warning (LDW)'\n | 'Lane Keeping Assistance (LKA)'\n | 'Backup Camera'\n | 'Parking Assist'\n | 'Bus Length (feet)'\n | 'Bus Floor Configuration Type'\n | 'Bus Type'\n | 'Other Bus Info'\n | 'Custom Motorcycle Type'\n | 'Motorcycle Suspension Type'\n | 'Motorcycle Chassis Type'\n | 'Other Motorcycle Info'\n | 'Dynamic Brake Support (DBS)'\n | 'Pedestrian Automatic Emergency Braking (PAEB)'\n | 'Automatic Crash Notification (ACN) / Advanced Automatic Crash Notification (AACN)'\n | 'Daytime Running Light (DRL)'\n | 'Headlamp Light Source'\n | 'Semiautomatic Headlamp Beam Switching'\n | 'Adaptive Driving Beam (ADB)'\n | 'Rear Cross Traffic Alert'\n | 'Rear Automatic Emergency Braking'\n | 'Blind Spot Intervention (BSI)'\n | 'Lane Centering Assistance'\n | (string & Record<string, never>)\n","/**\n * @module api/endpoints/DecodeVinValues\n * @category API Endpoints\n */\n\nimport { useNHTSA } from '@/api'\nimport { catchInvalidArguments, rejectWithError } from '@/utils'\nimport type { IArgToValidate, NhtsaResponse } from '@/types'\n\n/**\n * ::: tip :bulb: More Information\n * See: [DecodeVinValues Documentation](/api/endpoints/decode-vin-values)\n * :::\n *\n * `DecodeVinValues` decodes a Vehicle Identification Number (VIN) and returns useful information\n * about the vehicle in in a _flat format_. This means the endpoint will return an array with a\n * single object of results. Each key in the object is the name of a variable.\n *\n * Providing `params.modelYear` allows for the decoding to specifically be done in the current, or\n * older (pre-1980), model year ranges. It is recommended to always provide `params.modelYear` if\n * the model year is known at the time of decoding, but it is not required.\n *\n * This endpoint also supports partial VIN decoding (VINs that are less than 17 characters).\n * - Ex: \"5UXWX7C5*BA\"\n * - In this case, the VIN will be decoded partially with the available characters\n * - In case of partial VINs, a `*` could be used to indicate the unavailable characters\n * - The 9th digit is not necessary\n *\n * @param {string} vin - Vehicle Identification Number (full or partial)\n * @param [params] - Object of Query Search names and values to append to the URL as a query string\n * @param {(string|number)} [params.modelYear] - Optional Model Year search parameter\n * @param {boolean} [doFetch=true] - Whether to fetch the data or just return the URL\n * (default: `true`)\n * @returns {(Promise<NhtsaResponse<DecodeVinValuesResults> | string>)} - Api Response `object`\n * -or- url `string` if `doFetch = false`\n */\nfunction DecodeVinValues(\n vin: string\n): Promise<NhtsaResponse<DecodeVinValuesResults>>\n\nfunction DecodeVinValues(\n vin: string,\n doFetch: true,\n _dummy?: undefined\n): Promise<NhtsaResponse<DecodeVinValuesResults>>\n\nfunction DecodeVinValues(\n vin: string,\n doFetch: false,\n _dummy?: undefined\n): Promise<string>\n\nfunction DecodeVinValues(\n vin: string,\n params: { modelYear?: string | number },\n doFetch: false\n): Promise<string>\n\nfunction DecodeVinValues(\n vin: string,\n params?: { modelYear?: string | number },\n doFetch?: true\n): Promise<NhtsaResponse<DecodeVinValuesResults>>\n\n/* Implementation */\nasync function DecodeVinValues(\n vin: string,\n params?:\n | {\n modelYear?: string | number\n }\n | boolean,\n doFetch = true\n): Promise<NhtsaResponse<DecodeVinValuesResults> | string> {\n const endpointName = 'DecodeVinValues'\n\n try {\n if (typeof params === 'boolean') {\n doFetch = params\n params = undefined\n }\n\n const args: IArgToValidate[] = [\n { name: 'vin', value: vin, required: true, types: ['string'] },\n { name: 'params', value: params, types: ['object'] },\n {\n name: 'modelYear',\n value: params?.modelYear,\n types: ['string', 'number'],\n },\n ]\n catchInvalidArguments({ args })\n\n const { get, createCachedUrl, getCachedUrl } = useNHTSA()\n\n createCachedUrl({ endpointName, path: vin, params })\n\n if (!doFetch) {\n return getCachedUrl()\n } else {\n return get()\n }\n } catch (error) {\n return rejectWithError(error)\n }\n}\n\nexport { DecodeVinValues }\n\n/** Query String Parameters for this endpoint */\nexport type DecodeVinValuesParams = {\n modelYear?: string | number\n}\n\n/**\n * Single object found in the `Results` array of `DecodeVinValues` endpoint response.\n */\nexport type DecodeVinValuesResults = {\n ABS: string\n ActiveSafetySysNote: string\n AdaptiveCruiseControl: string\n AdaptiveDrivingBeam: string\n AdaptiveHeadlights: string\n AdditionalErrorText: string\n AirBagLocCurtain: string\n AirBagLocFront: string\n AirBagLocKnee: string\n AirBagLocSeatCushion: string\n AirBagLocSide: string\n AutoReverseSystem: string\n AutomaticPedestrianAlertingSound: string\n AxleConfiguration: string\n Axles: string\n BasePrice: string\n BatteryA: string\n BatteryA_to: string\n BatteryCells: string\n BatteryInfo: string\n BatteryKWh: string\n BatteryKWh_to: string\n BatteryModules: string\n BatteryPacks: string\n BatteryType: string\n BatteryV: string\n BatteryV_to: string\n BedLengthIN: string\n BedType: string\n BlindSpotIntervention: string\n BlindSpotMon: string\n BodyCabType: string\n BodyClass: string\n BrakeSystemDesc: string\n BrakeSystemType: string\n BusFloorConfigType: string\n BusLength: string\n BusType: string\n CAN_AACN: string\n CIB: string\n CashForClunkers: string\n ChargerLevel: string\n ChargerPowerKW: string\n CoolingType: string\n CurbWeightLB: string\n CustomMotorcycleType: string\n DaytimeRunningLight: string\n DestinationMarket: string\n DisplacementCC: string\n DisplacementCI: string\n DisplacementL: string\n Doors: string\n DriveType: string\n DriverAssist: string\n DynamicBrakeSupport: string\n EDR: string\n ESC: string\n EVDriveUnit: string\n ElectrificationLevel: string\n EngineConfiguration: string\n EngineCycles: string\n EngineCylinders: string\n EngineHP: string\n EngineHP_to: string\n EngineKW: string\n EngineManufacturer: string\n EngineModel: string\n EntertainmentSystem: string\n ErrorCode: string\n ErrorText: string\n ForwardCollisionWarning: string\n FuelInjectionType: string\n FuelTypePrimary: string\n FuelTypeSecondary: string\n GCWR: string\n GCWR_to: string\n GVWR: string\n GVWR_to: string\n KeylessIgnition: string\n LaneCenteringAssistance: string\n LaneDepartureWarning: string\n LaneKeepSystem: string\n LowerBeamHeadlampLightSource: string\n Make: string\n MakeID: string\n Manufacturer: string\n ManufacturerId: string\n Model: string\n ModelID: string\n ModelYear: string\n MotorcycleChassisType: string\n MotorcycleSuspensionType: string\n NCSABodyType: string\n NCSAMake: string\n NCSAMapExcApprovedBy: string\n NCSAMapExcApprovedOn: string\n NCSAMappingException: string\n NCSAModel: string\n NCSANote: string\n NonLandUse: string\n Note: string\n OtherBusInfo: string\n OtherEngineInfo: string\n OtherMotorcycleInfo: string\n OtherRestraintSystemInfo: string\n OtherTrailerInfo: string\n ParkAssist: string\n PedestrianAutomaticEmergencyBraking: string\n PlantCity: string\n PlantCompanyName: string\n PlantCountry: string\n PlantState: string\n PossibleValues: string\n Pretensioner: string\n RearAutomaticEmergencyBraking: string\n RearCrossTrafficAlert: string\n RearVisibilitySystem: string\n SAEAutomationLevel: string\n SAEAutomationLevel_to: string\n SeatBeltsAll: string\n SeatRows: string\n Seats: string\n SemiautomaticHeadlampBeamSwitching: string\n Series: string\n Series2: string\n SteeringLocation: string\n SuggestedVIN: string\n TPMS: string\n TopSpeedMPH: string\n TrackWidth: string\n TractionControl: string\n TrailerBodyType: string\n TrailerLength: string\n TrailerType: string\n TransmissionSpeeds: string\n TransmissionStyle: string\n Trim: string\n Trim2: string\n Turbo: string\n VIN: string\n ValveTrainDesign: string\n VehicleDescriptor: string\n VehicleType: string\n WheelBaseLong: string\n WheelBaseShort: string\n WheelBaseType: string\n WheelSizeFront: string\n WheelSizeRear: string\n Wheels: string\n Windows: string\n}\n","/**\n * @module api/endpoints/DecodeVinValuesBatch\n * @category API Endpoints\n */\n\nimport { useNHTSA } from '@/api'\nimport { catchInvalidArguments, rejectWithError } from '@/utils'\nimport type { IArgToValidate, NhtsaResponse } from '@/types'\n\n/**\n * ::: tip :bulb: More Information\n * See: [DecodeVinValuesBatch Documentation](/api/endpoints/decode-vin-values-batch)\n * :::\n *\n * `DecodeVinValuesBatch` decodes a batch of Vehicle Identification Numbers (VINs) and returns\n * useful information about the vehicles in in a _flat format_. This means the endpoint will return\n * an array with multiple objects of results. Each object represents a VIN from the `inputString`\n * and the key:value pairs in the objects are variables and their values for each particular VIN.\n *\n * For this particular API you just have to provide a string of VINs, `inputString`, that are\n * separated by a `;`. You can also indicate the model year after the vin, preceded by a `,`.\n *\n * The `inputString` parameter should be in the following format:\n * - ex: `5UXWX7C5*BA, 2011; 5YJSA3DS*EF`\n * - no modelYear: `vin; vin; vin`\n * - with modelYear: `vin, modelYear; vin, modelYear; vin, modelYear`\n * - mix of with/without modelYear: `vin; vin, modelYear`\n * - _vin_ and _modelYear_ are placeholders for real values in these examples\n * - all spaces between `;` and `,` are used in these examples for readability and are optional\n * - _Max 50 VINs per batch_\n *\n * Providing the modelYear in the input string allows for the decoding to specifically be done in\n * the current, or older (pre-1980), model year ranges. It is recommended to always provide\n * the model year if it is known at the time of decoding, but it is not required.\n *\n * @param {string} inputString - A string of Vehicle Identification Numbers (full or partial)\n * following the format listed in the description\n * @param {boolean} [doFetch=true] - Whether to fetch the data or just return the URL\n * (default: `true`)\n * @returns {(Promise<NhtsaResponse<DecodeVinValuesBatchResults> | string>)} - Api Response `object`\n * -or- url `string` if `doFetch = false`\n */\nfunction DecodeVinValuesBatch(\n inputString: string,\n doFetch?: true\n): Promise<NhtsaResponse<DecodeVinValuesBatchResults>>\n\nfunction DecodeVinValuesBatch(\n inputString: string,\n doFetch: false\n): Promise<string>\n\n/* Implementation */\nasync function DecodeVinValuesBatch(\n inputString: string,\n doFetch = true\n): Promise<NhtsaResponse<DecodeVinValuesBatchResults> | string> {\n const endpointName = 'DecodeVinValuesBatch'\n\n try {\n const args: IArgToValidate[] = [\n {\n name: 'inputString',\n value: inputString,\n required: true,\n types: ['string'],\n },\n ]\n catchInvalidArguments({ args })\n\n const { post, createCachedUrl, getCachedUrl } = useNHTSA()\n\n createCachedUrl({ endpointName, includeQueryString: false })\n\n if (!doFetch) {\n return getCachedUrl()\n } else {\n return post(getCachedUrl(), { body: inputString })\n }\n } catch (error) {\n return rejectWithError(error)\n }\n}\n\nexport { DecodeVinValuesBatch }\n\n/**\n * Objects found in the `Results` array of `DecodeVinValuesBatch` endpoint response.\n */\nexport type DecodeVinValuesBatchResults = {\n ABS: string\n ActiveSafetySysNote: string\n AdaptiveCruiseControl: string\n AdaptiveDrivingBeam: string\n AdaptiveHeadlights: string\n AdditionalErrorText: string\n AirBagLocCurtain: string\n AirBagLocFront: string\n AirBagLocKnee: string\n AirBagLocSeatCushion: string\n AirBagLocSide: string\n AutoReverseSystem: string\n AutomaticPedestrianAlertingSound: string\n AxleConfiguration: string\n Axles: string\n BasePrice: string\n BatteryA: string\n BatteryA_to: string\n BatteryCells: string\n BatteryInfo: string\n BatteryKWh: string\n BatteryKWh_to: string\n BatteryModules: string\n BatteryPacks: string\n BatteryType: string\n BatteryV: string\n BatteryV_to: string\n BedLengthIN: string\n BedType: string\n BlindSpotIntervention: string\n BlindSpotMon: string\n BodyCabType: string\n BodyClass: string\n BrakeSystemDesc: string\n BrakeSystemType: string\n BusFloorConfigType: string\n BusLength: string\n BusType: string\n CAN_AACN: string\n CIB: string\n CashForClunkers: string\n ChargerLevel: string\n ChargerPowerKW: string\n CoolingType: string\n CurbWeightLB: string\n CustomMotorcycleType: string\n DaytimeRunningLight: string\n DestinationMarket: string\n DisplacementCC: string\n DisplacementCI: string\n DisplacementL: string\n Doors: string\n DriveType: string\n DriverAssist: string\n DynamicBrakeSupport: string\n EDR: string\n ESC: string\n EVDriveUnit: string\n ElectrificationLevel: string\n EngineConfiguration: string\n EngineCycles: string\n EngineCylinders: string\n EngineHP: string\n EngineHP_to: string\n EngineKW: string\n EngineManufacturer: string\n EngineModel: string\n EntertainmentSystem: string\n ErrorCode: string\n ErrorText: string\n ForwardCollisionWarning: string\n FuelInjectionType: string\n FuelTypePrimary: string\n FuelTypeSecondary: string\n GCWR: string\n GCWR_to: string\n GVWR: string\n GVWR_to: