export type GetApiV1JobsJobIdSubtaskRunReviewsArgs = {organizationId?: string | undefined, taskType?: string | undefined, jobId: string}; export type GetApiV1JobsJobIdSubtaskRunReviewsOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Get review details for a job's subtask runs in one call * * GET /v1/jobs/{jobId}/subtask-run-reviews */ export const getApiV1JobsJobIdSubtaskRunReviews = async (args: GetApiV1JobsJobIdSubtaskRunReviewsArgs, options?: GetApiV1JobsJobIdSubtaskRunReviewsOptions) => { const {baseUrl = "https://api.printhiv3d.com", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (args.organizationId != null) query.append("organizationId", String(args.organizationId)) if (args.taskType != null) query.append("taskType", String(args.taskType)) const url = `${baseUrl.replace(/\/+$/, '')}/v1/jobs/${encodeURIComponent(String(args.jobId))}/subtask-run-reviews${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "GET", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };