export type GetApiV1ApiValidacionFreePointsGetAllLogArgs = {paisID?: number | undefined, email?: string | undefined, startDate?: string | undefined, endDate?: string | undefined, razonDeAsignacion?: string | undefined}; export type GetApiV1ApiValidacionFreePointsGetAllLogOptions = {baseUrl: string, Bearer?: string | undefined, fetch?: typeof fetch | undefined}; /** * GET /v1/api/ValidacionFreePoints/GetAllLog */ export const getApiV1ApiValidacionFreePointsGetAllLog = async (args: GetApiV1ApiValidacionFreePointsGetAllLogArgs, options: GetApiV1ApiValidacionFreePointsGetAllLogOptions) => { const {baseUrl, fetch: fetchFn = fetch, Bearer} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (args.paisID != null) query.append("paisID", String(args.paisID)) if (args.email != null) query.append("email", String(args.email)) if (args.startDate != null) query.append("startDate", String(args.startDate)) if (args.endDate != null) query.append("endDate", String(args.endDate)) if (args.razonDeAsignacion != null) query.append("razonDeAsignacion", String(args.razonDeAsignacion)) if (Bearer !== undefined) headers.set("Authorization", Bearer) const url = `${baseUrl.replace(/\/+$/, '')}/v1/api/ValidacionFreePoints/GetAllLog${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 };