export type DeleteApiV1GuestsGuestIdRelationshipsGuestRelationshipIdArgs = {guest_id: string, guest_relationship_id: string}; export type DeleteApiV1GuestsGuestIdRelationshipsGuestRelationshipIdOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Delete relationship between guests * * DELETE / v1/guests/{guest_id}/relationships/{guest_relationship_id} */ export const deleteApiV1GuestsGuestIdRelationshipsGuestRelationshipId = async (args: DeleteApiV1GuestsGuestIdRelationshipsGuestRelationshipIdArgs, options?: DeleteApiV1GuestsGuestIdRelationshipsGuestRelationshipIdOptions) => { 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/guests/${encodeURIComponent(String(args.guest_id))}/relationships/${encodeURIComponent(String(args.guest_relationship_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 (await res.json()) as unknown };