export type DeleteApiV0PlatformCosignersIdArgs = {id: string}; export type DeleteApiV0PlatformCosignersIdOptions = {baseUrl?: string | undefined, APIKey?: string | undefined, fetch?: typeof fetch | undefined}; /** * Delete Cosigner External Route * * DELETE /v0/platform/cosigners/{id} * * Also accepts auth: ClientID, JWT */ export const deleteApiV0PlatformCosignersId = async (args: DeleteApiV0PlatformCosignersIdArgs, options?: DeleteApiV0PlatformCosignersIdOptions) => { const {baseUrl = "https://api.blockaid.io", fetch: fetchFn = fetch, APIKey} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (APIKey !== undefined) headers.set("X-API-Key", APIKey) const url = `${baseUrl.replace(/\/+$/, '')}/v0/platform/cosigners/${encodeURIComponent(String(args.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 };