export type PatchApiApiV1WalletConnectPathOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * PATCH /api/v1/wallet/connect/{path} * * PATCH /api/v1/wallet/connect/{path} */ export const patchApiApiV1WalletConnectPath = async (options?: PatchApiApiV1WalletConnectPathOptions) => { const {baseUrl = "https://swap-backend.stage.defi.ovh.gala.com", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() const url = `${baseUrl.replace(/\/+$/, '')}/api/v1/wallet/connect/${encodeURIComponent(String(args.path))}${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "PATCH", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };