feature/IO-3702-ESPD-UI-AND-FIXES - Stage 2
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { APIGatewayProxyEvent, APIGatewayProxyResult } from 'aws-lambda';
|
||||
import axios from 'axios';
|
||||
import FormData from 'form-data';
|
||||
import { gql, GraphQLClient } from 'graphql-request';
|
||||
import { GraphQLClient } from 'graphql-request';
|
||||
import { ESJobObject, RawJobDataObject } from '../../../shared/types';
|
||||
import { transformJobForEstimateScrubber } from '../lib/transformEstimate';
|
||||
import { getVehicleType } from '../lib/vehicleTypes/vehicleType';
|
||||
@@ -22,6 +22,7 @@ interface ScrubResponse {
|
||||
identified_item?: unknown;
|
||||
}
|
||||
|
||||
// noinspection JSUnusedGlobalSymbols
|
||||
export const handler = async (event: APIGatewayProxyEvent): Promise<APIGatewayProxyResult> => {
|
||||
try {
|
||||
const {
|
||||
@@ -116,7 +117,7 @@ const uploadJobToHasura = async (rawJob: RawJobDataObject, esApiKey: string): Pr
|
||||
});
|
||||
};
|
||||
|
||||
const LATEST_VERSION_BY_CLM_NO = gql`
|
||||
const LATEST_VERSION_BY_CLM_NO = `
|
||||
query LATEST_VERSION_BY_CLM_NO($esApiKey: String!, $clm_no: String!) {
|
||||
jobs(
|
||||
where: { clm_no: { _eq: $clm_no }, shop: { es_api_key: { _eq: $esApiKey } } }
|
||||
@@ -130,7 +131,7 @@ const LATEST_VERSION_BY_CLM_NO = gql`
|
||||
}
|
||||
`;
|
||||
|
||||
const INSERT_JOB = gql`
|
||||
const INSERT_JOB = `
|
||||
mutation INSERT_JOB($job: jobs_insert_input!) {
|
||||
insert_jobs_one(object: $job) {
|
||||
id
|
||||
|
||||
Reference in New Issue
Block a user