export type GetApiV1ApiReportesReportDetailReviewByIDReviewIDArgs = {ReviewID: number, PaisIds?: Array | undefined, AccountsIDs?: Array | undefined, StoresIDs?: Array | undefined}; export type GetApiV1ApiReportesReportDetailReviewByIDReviewIDOptions = {baseUrl: string, Bearer?: string | undefined, fetch?: typeof fetch | undefined}; /** * GET /v1/api/Reportes/ReportDetailReviewByID/{ReviewID} */ export const getApiV1ApiReportesReportDetailReviewByIDReviewID = async (args: GetApiV1ApiReportesReportDetailReviewByIDReviewIDArgs, options: GetApiV1ApiReportesReportDetailReviewByIDReviewIDOptions) => { const {baseUrl, fetch: fetchFn = fetch, Bearer} = options ?? {} const query = new URLSearchParams() const headers = new Headers() for (const item of args.PaisIds ?? []) query.append("PaisIds", String(item)) for (const item of args.AccountsIDs ?? []) query.append("AccountsIDs", String(item)) for (const item of args.StoresIDs ?? []) query.append("StoresIDs", String(item)) if (Bearer !== undefined) headers.set("Authorization", Bearer) const url = `${baseUrl.replace(/\/+$/, '')}/v1/api/Reportes/ReportDetailReviewByID/${encodeURIComponent(String(args.ReviewID))}${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 };