export type DeleteApiCrmLists202603ListIdArgs = {listId: string}; export type DeleteApiCrmLists202603ListIdOptions = {baseUrl?: string | undefined, privateApps?: string | undefined, fetch?: typeof fetch | undefined}; /** * DELETE /crm/lists/2026-03/{listId} * * Also accepts auth: developer_hapikey */ export const deleteApiCrmLists202603ListId = async (args: DeleteApiCrmLists202603ListIdArgs, options?: DeleteApiCrmLists202603ListIdOptions) => { 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/lists/2026-03/${encodeURIComponent(String(args.listId))}${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 };