Update client with new guest rsvp endpoint
Some checks failed
Build and Push Docker Images / changes (push) Successful in 4s
Build and Push Docker Images / build-backend (push) Has been skipped
Build and Push Docker Images / build-frontend (push) Failing after 51s

This commit is contained in:
2025-03-16 12:06:43 +01:00
parent 2117655ec8
commit 8c1b737de9
4 changed files with 153 additions and 31 deletions

View File

@@ -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
*/