export type GetApiV1CentersCenterIdServicesServiceIdTherapistsArgs = {center_id: string, service_id: string}; export type GetApiV1CentersCenterIdServicesServiceIdTherapistsOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Retrieve therapist pricing and price scaling for a service of a center * * GET /v1/centers/{center_id}/services/{service_id}/therapists? */ export const getApiV1CentersCenterIdServicesServiceIdTherapists = async (args: GetApiV1CentersCenterIdServicesServiceIdTherapistsArgs, options?: GetApiV1CentersCenterIdServicesServiceIdTherapistsOptions) => { const {baseUrl = "https://api.zenoti.com", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('accept', "application/json") const url = `${baseUrl.replace(/\/+$/, '')}/v1/centers/${encodeURIComponent(String(args.center_id))}/services/${encodeURIComponent(String(args.service_id))}/therapists?${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 (await res.json()) as unknown };