export type DeleteApiCrmObjects2026030420ListingIdArgs = {listingId: string}; export type DeleteApiCrmObjects2026030420ListingIdOptions = {baseUrl?: string | undefined, privateApps?: string | undefined, fetch?: typeof fetch | undefined}; /** * Archive * * DELETE /crm/objects/2026-03/0-420/{listingId} * * Also accepts auth: developer_hapikey */ export const deleteApiCrmObjects2026030420ListingId = async (args: DeleteApiCrmObjects2026030420ListingIdArgs, options?: DeleteApiCrmObjects2026030420ListingIdOptions) => { 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-420/${encodeURIComponent(String(args.listingId))}${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 };