export type GetApiV1AppsJobScoreExistsAppIdOptions = {baseUrl: string, apiToken?: string | undefined, fetch?: typeof fetch | undefined}; /** * check if model confidence score is available for the app * * GET /v1/apps/job-score-exists/{app_id} */ export const getApiV1AppsJobScoreExistsAppId = async (options: GetApiV1AppsJobScoreExistsAppIdOptions) => { const {baseUrl, fetch: fetchFn = fetch, apiToken} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (apiToken !== undefined) headers.set("API-KEY", apiToken) const url = `${baseUrl.replace(/\/+$/, '')}/v1/apps/job-score-exists/${encodeURIComponent(String(args.app_id))}${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 };