export type PatchApiV1CustomersCustomerIdRelationshipsOffersOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Replace offers for customer * * PATCH /v1/customers/{customer_id}/relationships/offers */ export const patchApiV1CustomersCustomerIdRelationshipsOffers = async (options?: PatchApiV1CustomersCustomerIdRelationshipsOffersOptions) => { const {baseUrl = "https://api.kajabi.com", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() const url = `${baseUrl.replace(/\/+$/, '')}/v1/customers/${encodeURIComponent(String(args.customer_id))}/relationships/offers${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 };