export type ProductoLoteRqs = {productID?: number | undefined, puntos?: number | undefined, activo?: boolean | undefined, isPromotion?: boolean | undefined, assignValue?: number | undefined}; export type CreateUpdateProductosSucursalesRqs = {listaPaises?: (Array | null) | undefined, listaAccounts?: (Array | null) | undefined, listaStores?: (Array | null) | undefined, listaProductos?: (Array | null) | undefined}; export type CreateApiV1ApiProductsProductStoreLotesArgs = {body: CreateUpdateProductosSucursalesRqs}; export type CreateApiV1ApiProductsProductStoreLotesOptions = {baseUrl: string, Bearer?: string | undefined, fetch?: typeof fetch | undefined}; /** * POST /v1/api/Products/ProductStoreLotes */ export const createApiV1ApiProductsProductStoreLotes = async (args: CreateApiV1ApiProductsProductStoreLotesArgs, options: CreateApiV1ApiProductsProductStoreLotesOptions) => { const {baseUrl, fetch: fetchFn = fetch, Bearer} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('content-type', "application/json") if (Bearer !== undefined) headers.set("Authorization", Bearer) const url = `${baseUrl.replace(/\/+$/, '')}/v1/api/Products/ProductStoreLotes${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "POST", headers, body: JSON.stringify(args.body)}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };