Update client with new guest rsvp endpoint
This commit is contained in:
@@ -55,9 +55,12 @@ import type {
|
||||
UpdateGuestData,
|
||||
UpdateGuestResponse,
|
||||
UpdateGuestError,
|
||||
SetGuestStatusApiV1EventsGuestsGuestIdStatusPatchData,
|
||||
SetGuestStatusApiV1EventsGuestsGuestIdStatusPatchResponse,
|
||||
SetGuestStatusApiV1EventsGuestsGuestIdStatusPatchError,
|
||||
SetGuestStatusData,
|
||||
SetGuestStatusResponse,
|
||||
SetGuestStatusError,
|
||||
CreateGuestRsvpData,
|
||||
CreateGuestRsvpResponse,
|
||||
CreateGuestRsvpError,
|
||||
GetRsvpsData,
|
||||
GetRsvpsResponse,
|
||||
GetRsvpsError,
|
||||
@@ -493,17 +496,12 @@ export const updateGuest = <ThrowOnError extends boolean = false>(
|
||||
/**
|
||||
* Set Guest Status
|
||||
*/
|
||||
export const setGuestStatusApiV1EventsGuestsGuestIdStatusPatch = <
|
||||
ThrowOnError extends boolean = false,
|
||||
>(
|
||||
options: Options<
|
||||
SetGuestStatusApiV1EventsGuestsGuestIdStatusPatchData,
|
||||
ThrowOnError
|
||||
>,
|
||||
export const setGuestStatus = <ThrowOnError extends boolean = false>(
|
||||
options: Options<SetGuestStatusData, ThrowOnError>,
|
||||
) => {
|
||||
return (options.client ?? _heyApiClient).patch<
|
||||
SetGuestStatusApiV1EventsGuestsGuestIdStatusPatchResponse,
|
||||
SetGuestStatusApiV1EventsGuestsGuestIdStatusPatchError,
|
||||
SetGuestStatusResponse,
|
||||
SetGuestStatusError,
|
||||
ThrowOnError
|
||||
>({
|
||||
url: "/api/v1/events/guests/{guest_id}/status",
|
||||
@@ -511,6 +509,26 @@ export const setGuestStatusApiV1EventsGuestsGuestIdStatusPatch = <
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Process Guest Rsvp
|
||||
*/
|
||||
export const createGuestRsvp = <ThrowOnError extends boolean = false>(
|
||||
options: Options<CreateGuestRsvpData, ThrowOnError>,
|
||||
) => {
|
||||
return (options.client ?? _heyApiClient).post<
|
||||
CreateGuestRsvpResponse,
|
||||
CreateGuestRsvpError,
|
||||
ThrowOnError
|
||||
>({
|
||||
url: "/api/v1/events/guests/{guest_id}/rsvp",
|
||||
...options,
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
...options?.headers,
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Read Rsvps
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user