export type GetApi202601RetailMediaCatalogsCatalogIdOutputArgs = {catalogId: string}; export type GetApi202601RetailMediaCatalogsCatalogIdOutputOptions = {baseUrl?: string | undefined, oauth?: string | undefined, fetch?: typeof fetch | undefined}; /** * /2026-01/retail-media/catalogs/{catalogId}/output * * GET /2026-01/retail-media/catalogs/{catalogId}/output */ export const getApi202601RetailMediaCatalogsCatalogIdOutput = async (args: GetApi202601RetailMediaCatalogsCatalogIdOutputArgs, options?: GetApi202601RetailMediaCatalogsCatalogIdOutputOptions) => { const {baseUrl = "https://api.criteo.com", fetch: fetchFn = fetch, oauth} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('accept', "application/x-json-stream") if (oauth !== undefined) headers.set('authorization', `Bearer ${oauth}`) const url = `${baseUrl.replace(/\/+$/, '')}/2026-01/retail-media/catalogs/${encodeURIComponent(String(args.catalogId))}/output${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() };