export type CreateApiIcypeasApiSearchFilesReadArgs = {body: {file?: string | undefined, next?: boolean | undefined, sorts?: Array | undefined}}; export type CreateApiIcypeasApiSearchFilesReadOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * List bulk search files with progress info or get a specific bulk search by file ID. Shows found, done, in-progress, total counts. * * POST /icypeas/api/search-files/read */ export const createApiIcypeasApiSearchFilesRead = async (args: CreateApiIcypeasApiSearchFilesReadArgs, options?: CreateApiIcypeasApiSearchFilesReadOptions) => { const {baseUrl = "https://api.orthogonal.com/mpp", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('content-type', "application/json") const url = `${baseUrl.replace(/\/+$/, '')}/icypeas/api/search-files/read${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "POST", headers, body: JSON.stringify(args.body)}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };