export type GetApiApiCustomersCustomerIdCustomerIdIdIdArgs = {customerId: string, id: string}; export type GetApiApiCustomersCustomerIdCustomerIdIdIdOptions = {baseUrl: string, fetch?: typeof fetch | undefined}; /** * getEmbeddedCustomer * * GET /api/customers/customerId/{customerId}/id/{id} */ export const getApiApiCustomersCustomerIdCustomerIdIdId = async (args: GetApiApiCustomersCustomerIdCustomerIdIdIdArgs, options: GetApiApiCustomersCustomerIdCustomerIdIdIdOptions) => { const {baseUrl, fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('accept', "*/*") const url = `${baseUrl.replace(/\/+$/, '')}/api/customers/customerId/${encodeURIComponent(String(args.customerId))}/id/${encodeURIComponent(String(args.id))}${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "GET", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return res.blob() };