export type GetApiV1AdminDqReconcileTickerArgs = {ticker: string, a?: string | undefined, b?: string | undefined, asof?: string | undefined}; export type GetApiV1AdminDqReconcileTickerOptions = {baseUrl: string, ApiKey?: string | undefined, fetch?: typeof fetch | undefined}; /** * GET /v1/admin/dq/reconcile/{ticker} */ export const getApiV1AdminDqReconcileTicker = async (args: GetApiV1AdminDqReconcileTickerArgs, options: GetApiV1AdminDqReconcileTickerOptions) => { 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.asof != null) query.append("asof", String(args.asof)) if (ApiKey !== undefined) headers.set("X-Api-Key", ApiKey) const url = `${baseUrl.replace(/\/+$/, '')}/v1/admin/dq/reconcile/${encodeURIComponent(String(args.ticker))}${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 };