export type ShippingAddressDTO = {address?: string | undefined, addressFull?: string | undefined, editor?: ('OWNER' | 'ACCEPTOR') | undefined, id?: number | undefined, identifier?: string | undefined, latitude?: number | undefined, longitude?: number | undefined, number?: string | undefined, part?: string | undefined, userId?: number | undefined, userLogin?: string | undefined}; export type UpdateApiApiAcceptorShippingAddressesAcceptorCodeUpdateArgs = {acceptorCode: string, body: ShippingAddressDTO}; export type UpdateApiApiAcceptorShippingAddressesAcceptorCodeUpdateOptions = {baseUrl: string, fetch?: typeof fetch | undefined}; /** * updateShippingAddress * * PUT /api/acceptor/shipping-addresses/{acceptorCode}/update */ export const updateApiApiAcceptorShippingAddressesAcceptorCodeUpdate = async (args: UpdateApiApiAcceptorShippingAddressesAcceptorCodeUpdateArgs, options: UpdateApiApiAcceptorShippingAddressesAcceptorCodeUpdateOptions) => { 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/shipping-addresses/${encodeURIComponent(String(args.acceptorCode))}/update${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() };