export type GetApiApiTasksQueuePolldataAllArgs = {workerSize?: number | undefined, workerOpt?: ('GT' | 'LT') | undefined, queueSize?: number | undefined, queueOpt?: ('GT' | 'LT') | undefined, lastPollTimeSize?: number | undefined, lastPollTimeOpt?: ('GT' | 'LT') | undefined}; export type GetApiApiTasksQueuePolldataAllOptions = {baseUrl?: string | undefined, apiKey?: string | undefined, fetch?: typeof fetch | undefined}; /** * Get the last poll data for all task types * * GET /api/tasks/queue/polldata/all */ export const getApiApiTasksQueuePolldataAll = async (args: GetApiApiTasksQueuePolldataAllArgs, options?: GetApiApiTasksQueuePolldataAllOptions) => { const {baseUrl = "https://developer.orkescloud.com", fetch: fetchFn = fetch, apiKey} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('accept', "*/*") if (args.workerSize != null) query.append("workerSize", String(args.workerSize)) if (args.workerOpt != null) query.append("workerOpt", String(args.workerOpt)) if (args.queueSize != null) query.append("queueSize", String(args.queueSize)) if (args.queueOpt != null) query.append("queueOpt", String(args.queueOpt)) if (args.lastPollTimeSize != null) query.append("lastPollTimeSize", String(args.lastPollTimeSize)) if (args.lastPollTimeOpt != null) query.append("lastPollTimeOpt", String(args.lastPollTimeOpt)) if (apiKey !== undefined) headers.set("X-Authorization", apiKey) const url = `${baseUrl.replace(/\/+$/, '')}/api/tasks/queue/polldata/all${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 res.blob() };