export type DeleteApiCmsHubdb202603TablesTableIdOrNameRowsRowIdDraftArgs = {rowId: string, tableIdOrName: string}; export type DeleteApiCmsHubdb202603TablesTableIdOrNameRowsRowIdDraftOptions = {baseUrl?: string | undefined, oauth2?: string | undefined, fetch?: typeof fetch | undefined}; /** * Permanently deletes a row * * DELETE /cms/hubdb/2026-03/tables/{tableIdOrName}/rows/{rowId}/draft * * Also accepts auth: oauth2 */ export const deleteApiCmsHubdb202603TablesTableIdOrNameRowsRowIdDraft = async (args: DeleteApiCmsHubdb202603TablesTableIdOrNameRowsRowIdDraftArgs, options?: DeleteApiCmsHubdb202603TablesTableIdOrNameRowsRowIdDraftOptions) => { const {baseUrl = "https://api.hubapi.com", fetch: fetchFn = fetch, oauth2} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (oauth2 !== undefined) headers.set('authorization', `Bearer ${oauth2}`) const url = `${baseUrl.replace(/\/+$/, '')}/cms/hubdb/2026-03/tables/${encodeURIComponent(String(args.tableIdOrName))}/rows/${encodeURIComponent(String(args.rowId))}/draft${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 };