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