export type GetApiV1SellerReportReportIdArgs = {reportId: string}; export type GetApiV1SellerReportReportIdOptions = {baseUrl?: string | undefined, SellerAuth?: string | undefined, fetch?: typeof fetch | undefined}; /** * Report * * * GET /v1/seller/report/{reportId} */ export const getApiV1SellerReportReportId = async (args: GetApiV1SellerReportReportIdArgs, options?: GetApiV1SellerReportReportIdOptions) => { const {baseUrl = "https://scx-sbx.api.jtl-software.com", fetch: fetchFn = fetch, SellerAuth} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('accept', "application/gzip") if (SellerAuth !== undefined) headers.set('authorization', `Bearer ${SellerAuth}`) const url = `${baseUrl.replace(/\/+$/, '')}/v1/seller/report/${encodeURIComponent(String(args.reportId))}${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() };