export type CarrierIssueUpdatedData = {carrierIssueId: string | null, issueType: 'DETENTION_PICKUP' | 'DETENTION_DELIVERY' | 'LUMPER' | 'TONU' | 'LAYOVER' | 'BREAKDOWN' | 'DAMAGE' | 'SHORTAGE' | 'OVERAGE' | 'OTHER', status: 'OPEN' | 'RESOLVED' | 'CANCELED', stopType?: ('PICKUP' | 'DELIVERY' | 'null' | null) | undefined, stopSequenceNumber?: (number | null) | undefined, amountCents?: (number | null) | undefined, waitTimeMinutes?: (number | null) | undefined, description: string, resolution?: (string | null) | undefined, externalId?: string | undefined}; export type CarrierIssueUpdatedEvent = {id: string, workflow: 'TRACK_AND_TRACE' | 'CARRIER_SUPPORT' | 'POD_COLLECTION' | 'LOAD_BUILDING' | 'CARRIER_SELECTION' | 'SCHEDULING' | 'CUSTOMER_SUPPORT' | 'null' | null, occurredAt: string, loadNumber: string | null, customerLoadInternalId: string | null, eventType: 'CARRIER_ISSUE_UPDATED', data: CarrierIssueUpdatedData}; export type CreateApiCARRIERISSUEUPDATEDArgs = {body: CarrierIssueUpdatedEvent}; export type CreateApiCARRIERISSUEUPDATEDOptions = {baseUrl: string, fetch?: typeof fetch | undefined}; /** * Carrier Issue Updated * * POST /CARRIER_ISSUE_UPDATED */ export const createApiCARRIERISSUEUPDATED = async (args: CreateApiCARRIERISSUEUPDATEDArgs, options: CreateApiCARRIERISSUEUPDATEDOptions) => { const {baseUrl, fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('content-type', "application/json") const url = `${baseUrl.replace(/\/+$/, '')}/CARRIER_ISSUE_UPDATED${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "POST", headers, body: JSON.stringify(args.body)}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };