export type DeleteApiPettyCashesSpecificTripClaimClaimIdArgs = {claim_id: number}; export type DeleteApiPettyCashesSpecificTripClaimClaimIdOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Delete specific trip claim with status "pending" * * DELETE /petty_cashes/specific_trip_claim/{claim_id} */ export const deleteApiPettyCashesSpecificTripClaimClaimId = async (args: DeleteApiPettyCashesSpecificTripClaimClaimIdArgs, options?: DeleteApiPettyCashesSpecificTripClaimClaimIdOptions) => { const {baseUrl = "http://api.gostarmartbus.com/api", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() const url = `${baseUrl.replace(/\/+$/, '')}/petty_cashes/specific_trip_claim/${encodeURIComponent(String(args.claim_id))}${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "DELETE", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };