export type GetApiV1JobsJobIdParseTranscriptArtifactRefArgs = {artifact_ref: string, job_id: string, Range?: (string | null) | undefined}; export type GetApiV1JobsJobIdParseTranscriptArtifactRefOptions = {baseUrl?: string | undefined, APIKeyHeader?: string | undefined, fetch?: typeof fetch | undefined}; /** * get_parse_transcript_content * * GET /v1/jobs/{job_id}/parse-transcript/{artifact_ref} */ export const getApiV1JobsJobIdParseTranscriptArtifactRef = async (args: GetApiV1JobsJobIdParseTranscriptArtifactRefArgs, options?: GetApiV1JobsJobIdParseTranscriptArtifactRefOptions) => { const {baseUrl = "https://ndi-api.nace.ai", fetch: fetchFn = fetch, APIKeyHeader} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (args.Range != null) headers.set("Range", String(args.Range)) if (APIKeyHeader !== undefined) headers.set("X-API-Key", APIKeyHeader) const url = `${baseUrl.replace(/\/+$/, '')}/v1/jobs/${encodeURIComponent(String(args.job_id))}/parse-transcript/${encodeURIComponent(String(args.artifact_ref))}${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 };