export type DeleteApiV1PatientRelationshipsIdArgs = {id: number}; export type DeleteApiV1PatientRelationshipsIdOptions = {baseUrl?: string | undefined, ApiKeyAuth?: string | undefined, fetch?: typeof fetch | undefined}; /** * Remove a relationship * * DELETE /v1/patient_relationships/{id} */ export const deleteApiV1PatientRelationshipsId = async (args: DeleteApiV1PatientRelationshipsIdArgs, options?: DeleteApiV1PatientRelationshipsIdOptions) => { const {baseUrl = "https://developer.yezza.com", fetch: fetchFn = fetch, ApiKeyAuth} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (ApiKeyAuth !== undefined) headers.set("X-Api-Key", ApiKeyAuth) const url = `${baseUrl.replace(/\/+$/, '')}/v1/patient_relationships/${encodeURIComponent(String(args.id))}${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "DELETE", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };