export type DeleteApiRunnersProjectsProjectIdArgs = {projectId: string}; export type DeleteApiRunnersProjectsProjectIdOptions = {baseUrl?: string | undefined, JWTAuth?: string | undefined, fetch?: typeof fetch | undefined}; /** * Delete a project * * DELETE /runners/projects/{projectId} */ export const deleteApiRunnersProjectsProjectId = async (args: DeleteApiRunnersProjectsProjectIdArgs, options?: DeleteApiRunnersProjectsProjectIdOptions) => { const {baseUrl = "https://api.firefly.ai/v2", fetch: fetchFn = fetch, JWTAuth} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (JWTAuth !== undefined) headers.set('authorization', `Bearer ${JWTAuth}`) const url = `${baseUrl.replace(/\/+$/, '')}/runners/projects/${encodeURIComponent(String(args.projectId))}${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 };