export type CreateApiItemsSellerSellerIdRefreshArgs = {sellerId: number}; export type CreateApiItemsSellerSellerIdRefreshOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Refresh/Sync inventory with Warehouse * * POST /items/seller/{sellerId}/refresh */ export const createApiItemsSellerSellerIdRefresh = async (args: CreateApiItemsSellerSellerIdRefreshArgs, options?: CreateApiItemsSellerSellerIdRefreshOptions) => { const {baseUrl = "https://api.quivo.co", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() const url = `${baseUrl.replace(/\/+$/, '')}/items/seller/${encodeURIComponent(String(args.sellerId))}/refresh${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "POST", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };