export type DeleteApiV4AdminLakeMaintenanceIntegrationIdScheduleArgs = {integration_id: string | string, kind?: ('full' | 'daily') | undefined}; export type DeleteApiV4AdminLakeMaintenanceIntegrationIdScheduleOptions = {baseUrl: string, fetch?: typeof fetch | undefined}; /** * Delete the scheduled DuckLake maintenance for an integration * * DELETE /v4/admin/lake/maintenance/{integration_id}/schedule */ export const deleteApiV4AdminLakeMaintenanceIntegrationIdSchedule = async (args: DeleteApiV4AdminLakeMaintenanceIntegrationIdScheduleArgs, options: DeleteApiV4AdminLakeMaintenanceIntegrationIdScheduleOptions) => { const {baseUrl, fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (args.kind != null) query.append("kind", String(args.kind)) const url = `${baseUrl.replace(/\/+$/, '')}/v4/admin/lake/maintenance/${encodeURIComponent(String(args.integration_id))}/schedule${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 };