export type UpdateApiCrmLists202603ListIdRestoreArgs = {listId: string}; export type UpdateApiCrmLists202603ListIdRestoreOptions = {baseUrl?: string | undefined, privateApps?: string | undefined, fetch?: typeof fetch | undefined}; /** * PUT /crm/lists/2026-03/{listId}/restore * * Also accepts auth: developer_hapikey */ export const updateApiCrmLists202603ListIdRestore = async (args: UpdateApiCrmLists202603ListIdRestoreArgs, options?: UpdateApiCrmLists202603ListIdRestoreOptions) => { 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))}/restore${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "PUT", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };