export type DeleteApiV0ClaimsClaimIdArgs = {'claim-id': string}; export type DeleteApiV0ClaimsClaimIdOptions = {baseUrl?: string | undefined, apiKeyAuth?: string | undefined, fetch?: typeof fetch | undefined}; /** * Deletes an existing claim about a Legal Person. * * DELETE /v0/claims/{claim-id} */ export const deleteApiV0ClaimsClaimId = async (args: DeleteApiV0ClaimsClaimIdArgs, options?: DeleteApiV0ClaimsClaimIdOptions) => { const {baseUrl = "https://api.griffin.com", fetch: fetchFn = fetch, apiKeyAuth} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (apiKeyAuth !== undefined) headers.set("Authorization", apiKeyAuth) const url = `${baseUrl.replace(/\/+$/, '')}/v0/claims/${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 };