export type KalaPriceCommand = {id?: number | undefined, name: string, order?: number | undefined, price: number, selected?: boolean | undefined, type: 'COLOR' | 'SIZE'}; export type UpdateApiApiAcceptorKalaUpdateMultiPriceAcceptorCode1KalaIdArgs = {acceptorCode1: string, kalaId: number, body: KalaPriceCommand}; export type UpdateApiApiAcceptorKalaUpdateMultiPriceAcceptorCode1KalaIdOptions = {baseUrl: string, fetch?: typeof fetch | undefined}; /** * updateMultiPrice * * PUT /api/acceptor-kala/update-multi-price/{acceptorCode1}/{kalaId} */ export const updateApiApiAcceptorKalaUpdateMultiPriceAcceptorCode1KalaId = async (args: UpdateApiApiAcceptorKalaUpdateMultiPriceAcceptorCode1KalaIdArgs, options: UpdateApiApiAcceptorKalaUpdateMultiPriceAcceptorCode1KalaIdOptions) => { const {baseUrl, fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('content-type', "application/json") headers.set('accept', "*/*") const url = `${baseUrl.replace(/\/+$/, '')}/api/acceptor-kala/update-multi-price/${encodeURIComponent(String(args.acceptorCode1))}/${encodeURIComponent(String(args.kalaId))}${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "PUT", 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 res.blob() };