CEC-3301, CEC-3317 Magna security dll and remote commands (#249)

* CEC-3301, CEC-3317 Magna security dll and remote commands

* Fix test
This commit is contained in:
John Wu
2022-12-12 10:59:30 -08:00
committed by GitHub
parent 8e1b01b651
commit 2ec340efc5
28 changed files with 644 additions and 71 deletions

View File

@@ -1,11 +1,8 @@
import {
errorHandler,
getAuthHeaderOptions,
fetchRespHandler,
addQueryParams,
addQueryParams, errorHandler, fetchRespHandler, getAuthHeaderOptions
} from "../utils/http";
const API_ENDPOINT = process.env.REACT_APP_UPLOAD_SERVICE_URL;
const API_ENDPOINT = process.env.REACT_APP_OTA_SERVICE_URL;
const canFiltersAPI = {
addFilter: async (vin, filter, token) =>

View File

@@ -1,11 +1,8 @@
import {
errorHandler,
getAuthHeaderOptions,
fetchRespHandler,
addQueryParams,
addQueryParams, errorHandler, fetchRespHandler, getAuthHeaderOptions
} from "../utils/http";
const API_ENDPOINT = process.env.REACT_APP_UPLOAD_SERVICE_URL;
const API_ENDPOINT = process.env.REACT_APP_OTA_SERVICE_URL;
const fleetsAPI = {
addFleet: async (fleet, token) =>

View File

@@ -1,11 +1,8 @@
import {
errorHandler,
getAuthHeaderOptions,
fetchRespHandler,
addQueryParams,
addQueryParams, errorHandler, fetchRespHandler, getAuthHeaderOptions
} from "../utils/http";
const API_ENDPOINT = process.env.REACT_APP_UPLOAD_SERVICE_URL;
const API_ENDPOINT = process.env.REACT_APP_OTA_SERVICE_URL;
const manifestsAPI = {
deleteManifest: async (manifest_id, token) =>

View File

@@ -0,0 +1,2 @@
export const SECURITY_DLL_URL = process.env.REACT_APP_SECURITY_DLL_URL;
export const SECURITY_DLL_64_URL = process.env.REACT_APP_SECURITY_DLL_64_URL;

View File

@@ -1,17 +1,15 @@
import {
errorHandler,
getAuthHeaderOptions,
fetchRespHandler,
errorHandler, fetchRespHandler, getAuthHeaderOptions
} from "../utils/http";
const API_ENDPOINT = process.env.REACT_APP_UPLOAD_SERVICE_URL;
const API_ENDPOINT = process.env.REACT_APP_OTA_SERVICE_URL;
const smsAPI = {
/**
* Sends a SMS to an ICCID
* @param {*} data
* @param {*} token
* @returns
* @param {*} data
* @param {*} token
* @returns
*/
send: async (data, token) =>
fetch(`${API_ENDPOINT}/sms`, {

View File

@@ -1,11 +1,10 @@
import {
getAuthHeaderOptions,
addQueryParams,
addQueryParams, getAuthHeaderOptions
} from "../utils/http";
//Added the token we got from the first authorization and set it as the auth token, and that allowed us to hit the request
const API_ENDPOINT = process.env.REACT_APP_UPLOAD_SERVICE_URL;
const API_ENDPOINT = process.env.REACT_APP_OTA_SERVICE_URL;
const supersetAPI = {
getGuestToken: async(token) => {

View File

@@ -1,11 +1,8 @@
import {
errorHandler,
getAuthHeaderOptions,
fetchRespHandler,
addQueryParams,
addQueryParams, errorHandler, fetchRespHandler, getAuthHeaderOptions
} from "../utils/http";
const API_ENDPOINT = process.env.REACT_APP_UPLOAD_SERVICE_URL;
const API_ENDPOINT = process.env.REACT_APP_OTA_SERVICE_URL;
const suppliersAPI = {
addSupplier: async (vehicle, token) =>
@@ -78,6 +75,17 @@ const suppliersAPI = {
})
.then(fetchRespHandler)
.catch(errorHandler),
getManufactureCert: async (token) =>
fetch(`${API_ENDPOINT}/manufacture-certs`, {
method: "POST",
headers: Object.assign(
{ "Content-Type": "application/json" },
getAuthHeaderOptions(token)
),
})
.then(fetchRespHandler)
.catch(errorHandler)
};
export default suppliersAPI;

View File

@@ -1,11 +1,8 @@
import {
errorHandler,
getAuthHeaderOptions,
fetchRespHandler,
addQueryParams,
addQueryParams, errorHandler, fetchRespHandler, getAuthHeaderOptions
} from "../utils/http";
const API_ENDPOINT = process.env.REACT_APP_UPLOAD_SERVICE_URL;
const API_ENDPOINT = process.env.REACT_APP_OTA_SERVICE_URL;
const createDeployUpdatesClosure = (suffix) => {
return async (data, token) =>

View File

@@ -1,6 +1,6 @@
import axios from "axios";
const UPLOAD_ENDPOINT = process.env.REACT_APP_UPLOAD_SERVICE_URL;
const UPLOAD_ENDPOINT = process.env.REACT_APP_OTA_SERVICE_URL;
const fileField = "file";
export const getCancelToken = () => {

View File

@@ -1,11 +1,8 @@
import {
errorHandler,
getAuthHeaderOptions,
fetchRespHandler,
addQueryParams,
addQueryParams, errorHandler, fetchRespHandler, getAuthHeaderOptions
} from "../utils/http";
const API_ENDPOINT = process.env.REACT_APP_UPLOAD_SERVICE_URL;
const API_ENDPOINT = process.env.REACT_APP_OTA_SERVICE_URL;
const vehiclesAPI = {
addVehicle: async (vehicle, token) =>