export type DeleteApiApiV1ProjectsProjectIdChildrenChildProjectIdArgs = {projectId: number, childProjectId: number}; export type DeleteApiApiV1ProjectsProjectIdChildrenChildProjectIdOptions = {baseUrl?: string | undefined, BearerToken?: string | undefined, fetch?: typeof fetch | undefined}; /** * Unassign a child agent. * * DELETE /api/v1/projects/{projectId}/children/{childProjectId} */ export const deleteApiApiV1ProjectsProjectIdChildrenChildProjectId = async (args: DeleteApiApiV1ProjectsProjectIdChildrenChildProjectIdArgs, options?: DeleteApiApiV1ProjectsProjectIdChildrenChildProjectIdOptions) => { const {baseUrl = "https://app.customgpt.ai", fetch: fetchFn = fetch, BearerToken} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (BearerToken !== undefined) headers.set('authorization', `Bearer ${BearerToken}`) const url = `${baseUrl.replace(/\/+$/, '')}/api/v1/projects/${encodeURIComponent(String(args.projectId))}/children/${encodeURIComponent(String(args.childProjectId))}${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 };