{"version":3,"file":"Api.DP8F1333.mjs","names":[],"sources":["https:/framerusercontent.com/modules/AAXvLQIFKKh9GsTWu6EG/rAHAKNIDUeW6aHKkIL7V/Api.js"],"sourcesContent":["/**\n * Telematics API - Shared API functions and types\n */import{API_URL}from\"https://framerusercontent.com/modules/SwQjqWc6j32r4pQLdM35/uX7wTJ9jsSCOQYqT068Y/Constants.js\";// ===== API Helper =====\nexport async function apiPost(endpoint,body,sessionId){const response=await fetch(`${API_URL}${endpoint}`,{method:\"POST\",headers:{\"Content-Type\":\"application/json\",\"X-Session-ID\":sessionId},body:JSON.stringify(body)});if(!response.ok){throw new Error(`API error: ${response.status}`);}return response.json();}// ===== Authentication =====\n/**\n * Authenticate with Geotab telematics provider.\n * Returns session_id on success which should be saved for subsequent API calls.\n */export async function authenticateGeotab(username,password,database){const response=await fetch(`${API_URL}/api/v1/telematics/geotab/authenticate`,{method:\"POST\",headers:{\"Content-Type\":\"application/json\"},body:JSON.stringify({username,password,database})});return response.json();}/**\n * Authenticate with Motive using an API key.\n * Returns session_id on success which should be saved for subsequent API calls.\n */export async function authenticateMotiveApiKey(apiKey){const response=await fetch(`${API_URL}/api/v1/telematics/motive/authenticate-api-key`,{method:\"POST\",headers:{\"Content-Type\":\"application/json\"},body:JSON.stringify({api_key:apiKey})});return response.json();}// ===== Shared Functions =====\nexport async function listTrucks(service,sessionId){const endpoint=`/api/v1/telematics/${service}/list_trucks`;const data=await apiPost(endpoint,{},sessionId);return data.trucks;}/**\n * MCP COMPATIBILITY FOOTER. DO NOT MODIFY.\n * FEROX SYSTEMS 2025\n *\n * The Framer MCP can only see files that export an override. This dummy\n * override makes this file visible and editable to the MCP.\n *\n * Does nothing; just returns the component unchanged.\n * @framerDisableUnlink\n */export function withMcp(Component){return Component;}\nexport const __FramerMetadata__ = {\"exports\":{\"authenticateGeotab\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"TelematicsService\":{\"type\":\"tsType\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"authenticateMotiveApiKey\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"AuthenticateResponse\":{\"type\":\"tsType\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"listTrucks\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"apiPost\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withMcp\":{\"type\":\"reactHoc\",\"name\":\"withMcp\",\"annotations\":{\"framerContractVersion\":\"1\",\"framerDisableUnlink\":\"\"}},\"Truck\":{\"type\":\"tsType\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"FuelHistory\":{\"type\":\"tsType\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}"],"mappings":"wGAGA,eAAsB,EAAQ,EAAS,EAAK,EAAU,CAAC,IAAM,EAAS,MAAM,MAAM,GAAG,IAAU,IAAW,CAAC,OAAO,OAAO,QAAQ,CAAC,eAAe,mBAAmB,eAAe,EAAU,CAAC,KAAK,KAAK,UAAU,EAAK,CAAC,CAAC,CAAC,GAAG,CAAC,EAAS,GAAI,MAAU,MAAM,cAAc,EAAS,SAAS,CAAE,OAAO,EAAS,MAAM,CAIhT,eAAsB,EAAmB,EAAS,EAAS,EAAS,CAA8L,OAA9K,MAAM,MAAM,GAAG,EAAQ,wCAAwC,CAAC,OAAO,OAAO,QAAQ,CAAC,eAAe,mBAAmB,CAAC,KAAK,KAAK,UAAU,CAAC,WAAS,WAAS,WAAS,CAAC,CAAC,CAAC,EAAiB,MAAM,CAGxR,eAAsB,EAAyB,EAAO,CAA0L,OAA1K,MAAM,MAAM,GAAG,EAAQ,gDAAgD,CAAC,OAAO,OAAO,QAAQ,CAAC,eAAe,mBAAmB,CAAC,KAAK,KAAK,UAAU,CAAC,QAAQ,EAAO,CAAC,CAAC,CAAC,EAAiB,MAAM,CACzQ,eAAsB,EAAW,EAAQ,EAAU,CAA4G,OAArC,MAAM,EAA7D,sBAAsB,EAAQ,cAAgD,EAAE,CAAC,EAAU,EAAa,wBATtD"}