export type DeleteApiCrmObjects20260303DealIdArgs = {dealId: string}; export type DeleteApiCrmObjects20260303DealIdOptions = {baseUrl?: string | undefined, privateApps?: string | undefined, fetch?: typeof fetch | undefined}; /** * Archive * * DELETE /crm/objects/2026-03/0-3/{dealId} * * Also accepts auth: developer_hapikey */ export const deleteApiCrmObjects20260303DealId = async (args: DeleteApiCrmObjects20260303DealIdArgs, options?: DeleteApiCrmObjects20260303DealIdOptions) => { const {baseUrl = "https://api.hubapi.com", fetch: fetchFn = fetch, privateApps} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (privateApps !== undefined) headers.set('authorization', `Bearer ${privateApps}`) const url = `${baseUrl.replace(/\/+$/, '')}/crm/objects/2026-03/0-3/${encodeURIComponent(String(args.dealId))}${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 };