export type CreateApiAideV1NotebooksIdStartArgs = {id: unknown}; export type CreateApiAideV1NotebooksIdStartOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * start a Notebook, request information from mongo * * POST /aide/v1/notebooks/{id}/start */ export const createApiAideV1NotebooksIdStart = async (args: CreateApiAideV1NotebooksIdStartArgs, options?: CreateApiAideV1NotebooksIdStartOptions) => { const {baseUrl = "https://gateway.mlss.aide", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() const url = `${baseUrl.replace(/\/+$/, '')}/aide/v1/notebooks/${encodeURIComponent(String(args.id))}/start${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "POST", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };