export type GetApiV1AdminDqSweepCmpArgs = {a?: string | undefined, b?: string | undefined, symbols?: string | undefined, asof?: string | undefined}; export type GetApiV1AdminDqSweepCmpOptions = {baseUrl: string, ApiKey?: string | undefined, fetch?: typeof fetch | undefined}; /** * GET /v1/admin/dq/sweep-cmp */ export const getApiV1AdminDqSweepCmp = async (args: GetApiV1AdminDqSweepCmpArgs, options: GetApiV1AdminDqSweepCmpOptions) => { const {baseUrl, fetch: fetchFn = fetch, ApiKey} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (args.a != null) query.append("a", String(args.a)) if (args.b != null) query.append("b", String(args.b)) if (args.symbols != null) query.append("symbols", String(args.symbols)) if (args.asof != null) query.append("asof", String(args.asof)) if (ApiKey !== undefined) headers.set("X-Api-Key", ApiKey) const url = `${baseUrl.replace(/\/+$/, '')}/v1/admin/dq/sweep-cmp${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 };