export type UUIDSchema = string; export type GetApiInspectImageUUIDArgs = {imageUUID: UUIDSchema}; export type GetApiInspectImageUUIDOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Redirect to /inspect/{imageUUID}/ * * GET /inspect/{imageUUID} */ export const getApiInspectImageUUID = async (args: GetApiInspectImageUUIDArgs, options?: GetApiInspectImageUUIDOptions) => { const {baseUrl = "https://api.tokenfactory.nebius.com", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() const url = `${baseUrl.replace(/\/+$/, '')}/inspect/${encodeURIComponent(String(args.imageUUID))}${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 };