Add schemas and APIs for Guest and RSVP management
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 50s

Introduced schemas and types for Guests and RSVPs, along with their create, read, update, and delete endpoints. This also includes React Query integrations for managing guest and RSVP data in the frontend.
This commit is contained in:
2025-03-15 02:26:04 +01:00
parent 85eed0eac0
commit c0516c1086
4 changed files with 1609 additions and 0 deletions

View File

@@ -14,6 +14,18 @@ import {
deleteEventTheme, deleteEventTheme,
getEventTheme, getEventTheme,
updateEventTheme, updateEventTheme,
getGuests,
createGuest,
deleteGuest,
getGuest,
updateGuest,
setGuestStatusApiV1EventsGuestsGuestIdStatusPatch,
getRsvps,
createRsvp,
deleteRsvp,
getRsvp,
updateRsvp,
updateRsvpStatus,
createEvent, createEvent,
getUserEvents, getUserEvents,
getUpcomingEvents, getUpcomingEvents,
@@ -53,6 +65,34 @@ import type {
UpdateEventThemeData, UpdateEventThemeData,
UpdateEventThemeError, UpdateEventThemeError,
UpdateEventThemeResponse, UpdateEventThemeResponse,
GetGuestsData,
CreateGuestData,
CreateGuestError,
CreateGuestResponse,
DeleteGuestData,
DeleteGuestError,
DeleteGuestResponse,
GetGuestData,
UpdateGuestData,
UpdateGuestError,
UpdateGuestResponse,
SetGuestStatusApiV1EventsGuestsGuestIdStatusPatchData,
SetGuestStatusApiV1EventsGuestsGuestIdStatusPatchError,
SetGuestStatusApiV1EventsGuestsGuestIdStatusPatchResponse,
GetRsvpsData,
CreateRsvpData,
CreateRsvpError,
CreateRsvpResponse,
DeleteRsvpData,
DeleteRsvpError,
DeleteRsvpResponse,
GetRsvpData,
UpdateRsvpData,
UpdateRsvpError,
UpdateRsvpResponse,
UpdateRsvpStatusData,
UpdateRsvpStatusError,
UpdateRsvpStatusResponse,
CreateEventData, CreateEventData,
CreateEventError, CreateEventError,
CreateEventResponse, CreateEventResponse,
@@ -455,6 +495,276 @@ export const updateEventThemeMutation = (
return mutationOptions; return mutationOptions;
}; };
export const getGuestsQueryKey = (options?: Options<GetGuestsData>) =>
createQueryKey("getGuests", options);
export const getGuestsOptions = (options?: Options<GetGuestsData>) => {
return queryOptions({
queryFn: async ({ queryKey, signal }) => {
const { data } = await getGuests({
...options,
...queryKey[0],
signal,
throwOnError: true,
});
return data;
},
queryKey: getGuestsQueryKey(options),
});
};
export const createGuestQueryKey = (options: Options<CreateGuestData>) =>
createQueryKey("createGuest", options);
export const createGuestOptions = (options: Options<CreateGuestData>) => {
return queryOptions({
queryFn: async ({ queryKey, signal }) => {
const { data } = await createGuest({
...options,
...queryKey[0],
signal,
throwOnError: true,
});
return data;
},
queryKey: createGuestQueryKey(options),
});
};
export const createGuestMutation = (
options?: Partial<Options<CreateGuestData>>,
) => {
const mutationOptions: UseMutationOptions<
CreateGuestResponse,
AxiosError<CreateGuestError>,
Options<CreateGuestData>
> = {
mutationFn: async (localOptions) => {
const { data } = await createGuest({
...options,
...localOptions,
throwOnError: true,
});
return data;
},
};
return mutationOptions;
};
export const deleteGuestMutation = (
options?: Partial<Options<DeleteGuestData>>,
) => {
const mutationOptions: UseMutationOptions<
DeleteGuestResponse,
AxiosError<DeleteGuestError>,
Options<DeleteGuestData>
> = {
mutationFn: async (localOptions) => {
const { data } = await deleteGuest({
...options,
...localOptions,
throwOnError: true,
});
return data;
},
};
return mutationOptions;
};
export const getGuestQueryKey = (options: Options<GetGuestData>) =>
createQueryKey("getGuest", options);
export const getGuestOptions = (options: Options<GetGuestData>) => {
return queryOptions({
queryFn: async ({ queryKey, signal }) => {
const { data } = await getGuest({
...options,
...queryKey[0],
signal,
throwOnError: true,
});
return data;
},
queryKey: getGuestQueryKey(options),
});
};
export const updateGuestMutation = (
options?: Partial<Options<UpdateGuestData>>,
) => {
const mutationOptions: UseMutationOptions<
UpdateGuestResponse,
AxiosError<UpdateGuestError>,
Options<UpdateGuestData>
> = {
mutationFn: async (localOptions) => {
const { data } = await updateGuest({
...options,
...localOptions,
throwOnError: true,
});
return data;
},
};
return mutationOptions;
};
export const setGuestStatusApiV1EventsGuestsGuestIdStatusPatchMutation = (
options?: Partial<
Options<SetGuestStatusApiV1EventsGuestsGuestIdStatusPatchData>
>,
) => {
const mutationOptions: UseMutationOptions<
SetGuestStatusApiV1EventsGuestsGuestIdStatusPatchResponse,
AxiosError<SetGuestStatusApiV1EventsGuestsGuestIdStatusPatchError>,
Options<SetGuestStatusApiV1EventsGuestsGuestIdStatusPatchData>
> = {
mutationFn: async (localOptions) => {
const { data } = await setGuestStatusApiV1EventsGuestsGuestIdStatusPatch({
...options,
...localOptions,
throwOnError: true,
});
return data;
},
};
return mutationOptions;
};
export const getRsvpsQueryKey = (options?: Options<GetRsvpsData>) =>
createQueryKey("getRsvps", options);
export const getRsvpsOptions = (options?: Options<GetRsvpsData>) => {
return queryOptions({
queryFn: async ({ queryKey, signal }) => {
const { data } = await getRsvps({
...options,
...queryKey[0],
signal,
throwOnError: true,
});
return data;
},
queryKey: getRsvpsQueryKey(options),
});
};
export const createRsvpQueryKey = (options: Options<CreateRsvpData>) =>
createQueryKey("createRsvp", options);
export const createRsvpOptions = (options: Options<CreateRsvpData>) => {
return queryOptions({
queryFn: async ({ queryKey, signal }) => {
const { data } = await createRsvp({
...options,
...queryKey[0],
signal,
throwOnError: true,
});
return data;
},
queryKey: createRsvpQueryKey(options),
});
};
export const createRsvpMutation = (
options?: Partial<Options<CreateRsvpData>>,
) => {
const mutationOptions: UseMutationOptions<
CreateRsvpResponse,
AxiosError<CreateRsvpError>,
Options<CreateRsvpData>
> = {
mutationFn: async (localOptions) => {
const { data } = await createRsvp({
...options,
...localOptions,
throwOnError: true,
});
return data;
},
};
return mutationOptions;
};
export const deleteRsvpMutation = (
options?: Partial<Options<DeleteRsvpData>>,
) => {
const mutationOptions: UseMutationOptions<
DeleteRsvpResponse,
AxiosError<DeleteRsvpError>,
Options<DeleteRsvpData>
> = {
mutationFn: async (localOptions) => {
const { data } = await deleteRsvp({
...options,
...localOptions,
throwOnError: true,
});
return data;
},
};
return mutationOptions;
};
export const getRsvpQueryKey = (options: Options<GetRsvpData>) =>
createQueryKey("getRsvp", options);
export const getRsvpOptions = (options: Options<GetRsvpData>) => {
return queryOptions({
queryFn: async ({ queryKey, signal }) => {
const { data } = await getRsvp({
...options,
...queryKey[0],
signal,
throwOnError: true,
});
return data;
},
queryKey: getRsvpQueryKey(options),
});
};
export const updateRsvpMutation = (
options?: Partial<Options<UpdateRsvpData>>,
) => {
const mutationOptions: UseMutationOptions<
UpdateRsvpResponse,
AxiosError<UpdateRsvpError>,
Options<UpdateRsvpData>
> = {
mutationFn: async (localOptions) => {
const { data } = await updateRsvp({
...options,
...localOptions,
throwOnError: true,
});
return data;
},
};
return mutationOptions;
};
export const updateRsvpStatusMutation = (
options?: Partial<Options<UpdateRsvpStatusData>>,
) => {
const mutationOptions: UseMutationOptions<
UpdateRsvpStatusResponse,
AxiosError<UpdateRsvpStatusError>,
Options<UpdateRsvpStatusData>
> = {
mutationFn: async (localOptions) => {
const { data } = await updateRsvpStatus({
...options,
...localOptions,
throwOnError: true,
});
return data;
},
};
return mutationOptions;
};
export const createEventQueryKey = (options: Options<CreateEventData>) => export const createEventQueryKey = (options: Options<CreateEventData>) =>
createQueryKey("createEvent", options); createQueryKey("createEvent", options);

View File

@@ -1073,6 +1073,427 @@ export const EventUpdateSchema = {
title: "EventUpdate", title: "EventUpdate",
} as const; } as const;
export const GuestCreateSchema = {
properties: {
event_id: {
type: "string",
format: "uuid",
title: "Event Id",
},
invited_by: {
type: "string",
format: "uuid",
title: "Invited By",
},
user_id: {
anyOf: [
{
type: "string",
format: "uuid",
},
{
type: "null",
},
],
title: "User Id",
},
full_name: {
type: "string",
title: "Full Name",
},
email: {
anyOf: [
{
type: "string",
format: "email",
},
{
type: "null",
},
],
title: "Email",
},
phone: {
anyOf: [
{
type: "string",
},
{
type: "null",
},
],
title: "Phone",
},
max_additional_guests: {
anyOf: [
{
type: "integer",
},
{
type: "null",
},
],
title: "Max Additional Guests",
default: 0,
},
dietary_restrictions: {
anyOf: [
{
type: "string",
},
{
type: "null",
},
],
title: "Dietary Restrictions",
},
notes: {
anyOf: [
{
type: "string",
},
{
type: "null",
},
],
title: "Notes",
},
custom_fields: {
anyOf: [
{
type: "object",
},
{
type: "null",
},
],
title: "Custom Fields",
},
can_bring_guests: {
anyOf: [
{
type: "boolean",
},
{
type: "null",
},
],
title: "Can Bring Guests",
default: false,
},
invitation_code: {
type: "string",
title: "Invitation Code",
},
},
type: "object",
required: ["event_id", "invited_by", "full_name", "invitation_code"],
title: "GuestCreate",
} as const;
export const GuestReadSchema = {
properties: {
event_id: {
type: "string",
format: "uuid",
title: "Event Id",
},
invited_by: {
type: "string",
format: "uuid",
title: "Invited By",
},
user_id: {
anyOf: [
{
type: "string",
format: "uuid",
},
{
type: "null",
},
],
title: "User Id",
},
full_name: {
type: "string",
title: "Full Name",
},
email: {
anyOf: [
{
type: "string",
format: "email",
},
{
type: "null",
},
],
title: "Email",
},
phone: {
anyOf: [
{
type: "string",
},
{
type: "null",
},
],
title: "Phone",
},
max_additional_guests: {
anyOf: [
{
type: "integer",
},
{
type: "null",
},
],
title: "Max Additional Guests",
default: 0,
},
dietary_restrictions: {
anyOf: [
{
type: "string",
},
{
type: "null",
},
],
title: "Dietary Restrictions",
},
notes: {
anyOf: [
{
type: "string",
},
{
type: "null",
},
],
title: "Notes",
},
custom_fields: {
anyOf: [
{
type: "object",
},
{
type: "null",
},
],
title: "Custom Fields",
},
can_bring_guests: {
anyOf: [
{
type: "boolean",
},
{
type: "null",
},
],
title: "Can Bring Guests",
default: false,
},
id: {
type: "string",
format: "uuid",
title: "Id",
},
status: {
$ref: "#/components/schemas/GuestStatus",
},
invitation_sent_at: {
anyOf: [
{
type: "string",
format: "date-time",
},
{
type: "null",
},
],
title: "Invitation Sent At",
},
response_date: {
anyOf: [
{
type: "string",
format: "date-time",
},
{
type: "null",
},
],
title: "Response Date",
},
actual_additional_guests: {
type: "integer",
title: "Actual Additional Guests",
},
is_blocked: {
type: "boolean",
title: "Is Blocked",
},
},
type: "object",
required: [
"event_id",
"invited_by",
"full_name",
"id",
"status",
"actual_additional_guests",
"is_blocked",
],
title: "GuestRead",
} as const;
export const GuestStatusSchema = {
type: "string",
enum: [
"invited",
"pending",
"confirmed",
"declined",
"waitlisted",
"cancelled",
],
title: "GuestStatus",
} as const;
export const GuestUpdateSchema = {
properties: {
full_name: {
anyOf: [
{
type: "string",
},
{
type: "null",
},
],
title: "Full Name",
},
email: {
anyOf: [
{
type: "string",
format: "email",
},
{
type: "null",
},
],
title: "Email",
},
phone: {
anyOf: [
{
type: "string",
},
{
type: "null",
},
],
title: "Phone",
},
status: {
anyOf: [
{
$ref: "#/components/schemas/GuestStatus",
},
{
type: "null",
},
],
},
max_additional_guests: {
anyOf: [
{
type: "integer",
},
{
type: "null",
},
],
title: "Max Additional Guests",
},
actual_additional_guests: {
anyOf: [
{
type: "integer",
},
{
type: "null",
},
],
title: "Actual Additional Guests",
},
dietary_restrictions: {
anyOf: [
{
type: "string",
},
{
type: "null",
},
],
title: "Dietary Restrictions",
},
notes: {
anyOf: [
{
type: "string",
},
{
type: "null",
},
],
title: "Notes",
},
custom_fields: {
anyOf: [
{
type: "object",
},
{
type: "null",
},
],
title: "Custom Fields",
},
is_blocked: {
anyOf: [
{
type: "boolean",
},
{
type: "null",
},
],
title: "Is Blocked",
},
can_bring_guests: {
anyOf: [
{
type: "boolean",
},
{
type: "null",
},
],
title: "Can Bring Guests",
},
},
type: "object",
title: "GuestUpdate",
} as const;
export const HTTPValidationErrorSchema = { export const HTTPValidationErrorSchema = {
properties: { properties: {
detail: { detail: {
@@ -1180,6 +1601,188 @@ export const PresignedUrlResponseSchema = {
description: "Response model for presigned URL generation.", description: "Response model for presigned URL generation.",
} as const; } as const;
export const RSVPSchemaSchema = {
properties: {
status: {
$ref: "#/components/schemas/RSVPStatus",
},
number_of_guests: {
type: "integer",
minimum: 1,
title: "Number Of Guests",
default: 1,
},
response_message: {
anyOf: [
{
type: "string",
},
{
type: "null",
},
],
title: "Response Message",
},
dietary_requirements: {
anyOf: [
{
type: "string",
},
{
type: "null",
},
],
title: "Dietary Requirements",
},
additional_info: {
title: "Additional Info",
},
id: {
type: "string",
format: "uuid",
title: "Id",
},
response_date: {
type: "string",
format: "date-time",
title: "Response Date",
},
created_at: {
type: "string",
format: "date-time",
title: "Created At",
},
updated_at: {
type: "string",
format: "date-time",
title: "Updated At",
},
},
type: "object",
required: ["status", "id", "response_date", "created_at", "updated_at"],
title: "RSVPSchema",
} as const;
export const RSVPSchemaCreateSchema = {
properties: {
status: {
$ref: "#/components/schemas/RSVPStatus",
},
number_of_guests: {
type: "integer",
minimum: 1,
title: "Number Of Guests",
default: 1,
},
response_message: {
anyOf: [
{
type: "string",
},
{
type: "null",
},
],
title: "Response Message",
},
dietary_requirements: {
anyOf: [
{
type: "string",
},
{
type: "null",
},
],
title: "Dietary Requirements",
},
additional_info: {
title: "Additional Info",
},
event_id: {
type: "string",
format: "uuid",
title: "Event Id",
},
guest_id: {
type: "string",
format: "uuid",
title: "Guest Id",
},
},
type: "object",
required: ["status", "event_id", "guest_id"],
title: "RSVPSchemaCreate",
} as const;
export const RSVPSchemaUpdateSchema = {
properties: {
status: {
anyOf: [
{
$ref: "#/components/schemas/RSVPStatus",
},
{
type: "null",
},
],
},
number_of_guests: {
anyOf: [
{
type: "integer",
minimum: 1,
},
{
type: "null",
},
],
title: "Number Of Guests",
},
response_message: {
anyOf: [
{
type: "string",
},
{
type: "null",
},
],
title: "Response Message",
},
dietary_requirements: {
anyOf: [
{
type: "string",
},
{
type: "null",
},
],
title: "Dietary Requirements",
},
additional_info: {
anyOf: [
{
type: "object",
},
{
type: "null",
},
],
title: "Additional Info",
},
},
type: "object",
title: "RSVPSchemaUpdate",
} as const;
export const RSVPStatusSchema = {
type: "string",
enum: ["attending", "not_attending", "maybe"],
title: "RSVPStatus",
} as const;
export const RefreshTokenRequestSchema = { export const RefreshTokenRequestSchema = {
properties: { properties: {
refresh_token: { refresh_token: {

View File

@@ -40,6 +40,42 @@ import type {
UpdateEventThemeData, UpdateEventThemeData,
UpdateEventThemeResponse, UpdateEventThemeResponse,
UpdateEventThemeError, UpdateEventThemeError,
GetGuestsData,
GetGuestsResponse,
GetGuestsError,
CreateGuestData,
CreateGuestResponse,
CreateGuestError,
DeleteGuestData,
DeleteGuestResponse,
DeleteGuestError,
GetGuestData,
GetGuestResponse,
GetGuestError,
UpdateGuestData,
UpdateGuestResponse,
UpdateGuestError,
SetGuestStatusApiV1EventsGuestsGuestIdStatusPatchData,
SetGuestStatusApiV1EventsGuestsGuestIdStatusPatchResponse,
SetGuestStatusApiV1EventsGuestsGuestIdStatusPatchError,
GetRsvpsData,
GetRsvpsResponse,
GetRsvpsError,
CreateRsvpData,
CreateRsvpResponse,
CreateRsvpError,
DeleteRsvpData,
DeleteRsvpResponse,
DeleteRsvpError,
GetRsvpData,
GetRsvpResponse,
GetRsvpError,
UpdateRsvpData,
UpdateRsvpResponse,
UpdateRsvpError,
UpdateRsvpStatusData,
UpdateRsvpStatusResponse,
UpdateRsvpStatusError,
CreateEventData, CreateEventData,
CreateEventResponse, CreateEventResponse,
CreateEventError, CreateEventError,
@@ -366,6 +402,223 @@ export const updateEventTheme = <ThrowOnError extends boolean = false>(
}); });
}; };
/**
* Read Guests
*/
export const getGuests = <ThrowOnError extends boolean = false>(
options?: Options<GetGuestsData, ThrowOnError>,
) => {
return (options?.client ?? _heyApiClient).get<
GetGuestsResponse,
GetGuestsError,
ThrowOnError
>({
url: "/api/v1/events/guests/",
...options,
});
};
/**
* Create Guest
*/
export const createGuest = <ThrowOnError extends boolean = false>(
options: Options<CreateGuestData, ThrowOnError>,
) => {
return (options.client ?? _heyApiClient).post<
CreateGuestResponse,
CreateGuestError,
ThrowOnError
>({
url: "/api/v1/events/guests/",
...options,
headers: {
"Content-Type": "application/json",
...options?.headers,
},
});
};
/**
* Delete Guest
*/
export const deleteGuest = <ThrowOnError extends boolean = false>(
options: Options<DeleteGuestData, ThrowOnError>,
) => {
return (options.client ?? _heyApiClient).delete<
DeleteGuestResponse,
DeleteGuestError,
ThrowOnError
>({
url: "/api/v1/events/guests/{guest_id}",
...options,
});
};
/**
* Read Guest
*/
export const getGuest = <ThrowOnError extends boolean = false>(
options: Options<GetGuestData, ThrowOnError>,
) => {
return (options.client ?? _heyApiClient).get<
GetGuestResponse,
GetGuestError,
ThrowOnError
>({
url: "/api/v1/events/guests/{guest_id}",
...options,
});
};
/**
* Update Guest
*/
export const updateGuest = <ThrowOnError extends boolean = false>(
options: Options<UpdateGuestData, ThrowOnError>,
) => {
return (options.client ?? _heyApiClient).put<
UpdateGuestResponse,
UpdateGuestError,
ThrowOnError
>({
url: "/api/v1/events/guests/{guest_id}",
...options,
headers: {
"Content-Type": "application/json",
...options?.headers,
},
});
};
/**
* Set Guest Status
*/
export const setGuestStatusApiV1EventsGuestsGuestIdStatusPatch = <
ThrowOnError extends boolean = false,
>(
options: Options<
SetGuestStatusApiV1EventsGuestsGuestIdStatusPatchData,
ThrowOnError
>,
) => {
return (options.client ?? _heyApiClient).patch<
SetGuestStatusApiV1EventsGuestsGuestIdStatusPatchResponse,
SetGuestStatusApiV1EventsGuestsGuestIdStatusPatchError,
ThrowOnError
>({
url: "/api/v1/events/guests/{guest_id}/status",
...options,
});
};
/**
* Read Rsvps
*/
export const getRsvps = <ThrowOnError extends boolean = false>(
options?: Options<GetRsvpsData, ThrowOnError>,
) => {
return (options?.client ?? _heyApiClient).get<
GetRsvpsResponse,
GetRsvpsError,
ThrowOnError
>({
url: "/api/v1/events/rsvps/",
...options,
});
};
/**
* Create Rsvp
*/
export const createRsvp = <ThrowOnError extends boolean = false>(
options: Options<CreateRsvpData, ThrowOnError>,
) => {
return (options.client ?? _heyApiClient).post<
CreateRsvpResponse,
CreateRsvpError,
ThrowOnError
>({
url: "/api/v1/events/rsvps/",
...options,
headers: {
"Content-Type": "application/json",
...options?.headers,
},
});
};
/**
* Delete Rsvp
*/
export const deleteRsvp = <ThrowOnError extends boolean = false>(
options: Options<DeleteRsvpData, ThrowOnError>,
) => {
return (options.client ?? _heyApiClient).delete<
DeleteRsvpResponse,
DeleteRsvpError,
ThrowOnError
>({
url: "/api/v1/events/rsvps/{rsvp_id}",
...options,
});
};
/**
* Read Rsvp
*/
export const getRsvp = <ThrowOnError extends boolean = false>(
options: Options<GetRsvpData, ThrowOnError>,
) => {
return (options.client ?? _heyApiClient).get<
GetRsvpResponse,
GetRsvpError,
ThrowOnError
>({
url: "/api/v1/events/rsvps/{rsvp_id}",
...options,
});
};
/**
* Update Rsvp
*/
export const updateRsvp = <ThrowOnError extends boolean = false>(
options: Options<UpdateRsvpData, ThrowOnError>,
) => {
return (options.client ?? _heyApiClient).put<
UpdateRsvpResponse,
UpdateRsvpError,
ThrowOnError
>({
url: "/api/v1/events/rsvps/{rsvp_id}",
...options,
headers: {
"Content-Type": "application/json",
...options?.headers,
},
});
};
/**
* Update Rsvp Status
*/
export const updateRsvpStatus = <ThrowOnError extends boolean = false>(
options: Options<UpdateRsvpStatusData, ThrowOnError>,
) => {
return (options.client ?? _heyApiClient).patch<
UpdateRsvpStatusResponse,
UpdateRsvpStatusError,
ThrowOnError
>({
url: "/api/v1/events/rsvps/{rsvp_id}/status",
...options,
headers: {
"Content-Type": "application/json",
...options?.headers,
},
});
};
/** /**
* Create Event * Create Event
* Create a new event. * Create a new event.

View File

@@ -167,6 +167,78 @@ export type EventUpdate = {
slug?: string | null; slug?: string | null;
}; };
export type GuestCreate = {
event_id: string;
invited_by: string;
user_id?: string | null;
full_name: string;
email?: string | null;
phone?: string | null;
max_additional_guests?: number | null;
dietary_restrictions?: string | null;
notes?: string | null;
custom_fields?: {
[key: string]: unknown;
} | null;
can_bring_guests?: boolean | null;
invitation_code: string;
};
export type GuestRead = {
event_id: string;
invited_by: string;
user_id?: string | null;
full_name: string;
email?: string | null;
phone?: string | null;
max_additional_guests?: number | null;
dietary_restrictions?: string | null;
notes?: string | null;
custom_fields?: {
[key: string]: unknown;
} | null;
can_bring_guests?: boolean | null;
id: string;
status: GuestStatus;
invitation_sent_at?: string | null;
response_date?: string | null;
actual_additional_guests: number;
is_blocked: boolean;
};
export type GuestStatus =
| "invited"
| "pending"
| "confirmed"
| "declined"
| "waitlisted"
| "cancelled";
export const GuestStatus = {
INVITED: "invited",
PENDING: "pending",
CONFIRMED: "confirmed",
DECLINED: "declined",
WAITLISTED: "waitlisted",
CANCELLED: "cancelled",
} as const;
export type GuestUpdate = {
full_name?: string | null;
email?: string | null;
phone?: string | null;
status?: GuestStatus | null;
max_additional_guests?: number | null;
actual_additional_guests?: number | null;
dietary_restrictions?: string | null;
notes?: string | null;
custom_fields?: {
[key: string]: unknown;
} | null;
is_blocked?: boolean | null;
can_bring_guests?: boolean | null;
};
export type HttpValidationError = { export type HttpValidationError = {
detail?: Array<ValidationError>; detail?: Array<ValidationError>;
}; };
@@ -219,6 +291,46 @@ export type PresignedUrlResponse = {
expires_in: number; expires_in: number;
}; };
export type RsvpSchema = {
status: RsvpStatus;
number_of_guests?: number;
response_message?: string | null;
dietary_requirements?: string | null;
additional_info?: unknown;
id: string;
response_date: string;
created_at: string;
updated_at: string;
};
export type RsvpSchemaCreate = {
status: RsvpStatus;
number_of_guests?: number;
response_message?: string | null;
dietary_requirements?: string | null;
additional_info?: unknown;
event_id: string;
guest_id: string;
};
export type RsvpSchemaUpdate = {
status?: RsvpStatus | null;
number_of_guests?: number | null;
response_message?: string | null;
dietary_requirements?: string | null;
additional_info?: {
[key: string]: unknown;
} | null;
};
export type RsvpStatus = "attending" | "not_attending" | "maybe";
export const RsvpStatus = {
ATTENDING: "attending",
NOT_ATTENDING: "not_attending",
MAYBE: "maybe",
} as const;
export type RefreshTokenRequest = { export type RefreshTokenRequest = {
refresh_token: string; refresh_token: string;
}; };
@@ -559,6 +671,337 @@ export type UpdateEventThemeResponses = {
export type UpdateEventThemeResponse = export type UpdateEventThemeResponse =
UpdateEventThemeResponses[keyof UpdateEventThemeResponses]; UpdateEventThemeResponses[keyof UpdateEventThemeResponses];
export type GetGuestsData = {
body?: never;
path?: never;
query?: {
skip?: number;
limit?: number;
};
url: "/api/v1/events/guests/";
};
export type GetGuestsErrors = {
/**
* Validation Error
*/
422: HttpValidationError;
};
export type GetGuestsError = GetGuestsErrors[keyof GetGuestsErrors];
export type GetGuestsResponses = {
/**
* Successful Response
*/
200: Array<GuestRead>;
};
export type GetGuestsResponse = GetGuestsResponses[keyof GetGuestsResponses];
export type CreateGuestData = {
body: GuestCreate;
path?: never;
query?: never;
url: "/api/v1/events/guests/";
};
export type CreateGuestErrors = {
/**
* Validation Error
*/
422: HttpValidationError;
};
export type CreateGuestError = CreateGuestErrors[keyof CreateGuestErrors];
export type CreateGuestResponses = {
/**
* Successful Response
*/
200: GuestRead;
};
export type CreateGuestResponse =
CreateGuestResponses[keyof CreateGuestResponses];
export type DeleteGuestData = {
body?: never;
path: {
guest_id: string;
};
query?: never;
url: "/api/v1/events/guests/{guest_id}";
};
export type DeleteGuestErrors = {
/**
* Validation Error
*/
422: HttpValidationError;
};
export type DeleteGuestError = DeleteGuestErrors[keyof DeleteGuestErrors];
export type DeleteGuestResponses = {
/**
* Successful Response
*/
200: GuestRead;
};
export type DeleteGuestResponse =
DeleteGuestResponses[keyof DeleteGuestResponses];
export type GetGuestData = {
body?: never;
path: {
guest_id: string;
};
query?: never;
url: "/api/v1/events/guests/{guest_id}";
};
export type GetGuestErrors = {
/**
* Validation Error
*/
422: HttpValidationError;
};
export type GetGuestError = GetGuestErrors[keyof GetGuestErrors];
export type GetGuestResponses = {
/**
* Successful Response
*/
200: GuestRead;
};
export type GetGuestResponse = GetGuestResponses[keyof GetGuestResponses];
export type UpdateGuestData = {
body: GuestUpdate;
path: {
guest_id: string;
};
query?: never;
url: "/api/v1/events/guests/{guest_id}";
};
export type UpdateGuestErrors = {
/**
* Validation Error
*/
422: HttpValidationError;
};
export type UpdateGuestError = UpdateGuestErrors[keyof UpdateGuestErrors];
export type UpdateGuestResponses = {
/**
* Successful Response
*/
200: GuestRead;
};
export type UpdateGuestResponse =
UpdateGuestResponses[keyof UpdateGuestResponses];
export type SetGuestStatusApiV1EventsGuestsGuestIdStatusPatchData = {
body?: never;
path: {
guest_id: string;
};
query: {
status: GuestStatus;
};
url: "/api/v1/events/guests/{guest_id}/status";
};
export type SetGuestStatusApiV1EventsGuestsGuestIdStatusPatchErrors = {
/**
* Validation Error
*/
422: HttpValidationError;
};
export type SetGuestStatusApiV1EventsGuestsGuestIdStatusPatchError =
SetGuestStatusApiV1EventsGuestsGuestIdStatusPatchErrors[keyof SetGuestStatusApiV1EventsGuestsGuestIdStatusPatchErrors];
export type SetGuestStatusApiV1EventsGuestsGuestIdStatusPatchResponses = {
/**
* Successful Response
*/
200: GuestRead;
};
export type SetGuestStatusApiV1EventsGuestsGuestIdStatusPatchResponse =
SetGuestStatusApiV1EventsGuestsGuestIdStatusPatchResponses[keyof SetGuestStatusApiV1EventsGuestsGuestIdStatusPatchResponses];
export type GetRsvpsData = {
body?: never;
path?: never;
query?: {
skip?: number;
limit?: number;
};
url: "/api/v1/events/rsvps/";
};
export type GetRsvpsErrors = {
/**
* Validation Error
*/
422: HttpValidationError;
};
export type GetRsvpsError = GetRsvpsErrors[keyof GetRsvpsErrors];
export type GetRsvpsResponses = {
/**
* Successful Response
*/
200: Array<RsvpSchema>;
};
export type GetRsvpsResponse = GetRsvpsResponses[keyof GetRsvpsResponses];
export type CreateRsvpData = {
body: RsvpSchemaCreate;
path?: never;
query?: never;
url: "/api/v1/events/rsvps/";
};
export type CreateRsvpErrors = {
/**
* Validation Error
*/
422: HttpValidationError;
};
export type CreateRsvpError = CreateRsvpErrors[keyof CreateRsvpErrors];
export type CreateRsvpResponses = {
/**
* Successful Response
*/
200: RsvpSchema;
};
export type CreateRsvpResponse = CreateRsvpResponses[keyof CreateRsvpResponses];
export type DeleteRsvpData = {
body?: never;
path: {
rsvp_id: string;
};
query?: never;
url: "/api/v1/events/rsvps/{rsvp_id}";
};
export type DeleteRsvpErrors = {
/**
* Validation Error
*/
422: HttpValidationError;
};
export type DeleteRsvpError = DeleteRsvpErrors[keyof DeleteRsvpErrors];
export type DeleteRsvpResponses = {
/**
* Successful Response
*/
200: RsvpSchema;
};
export type DeleteRsvpResponse = DeleteRsvpResponses[keyof DeleteRsvpResponses];
export type GetRsvpData = {
body?: never;
path: {
rsvp_id: string;
};
query?: never;
url: "/api/v1/events/rsvps/{rsvp_id}";
};
export type GetRsvpErrors = {
/**
* Validation Error
*/
422: HttpValidationError;
};
export type GetRsvpError = GetRsvpErrors[keyof GetRsvpErrors];
export type GetRsvpResponses = {
/**
* Successful Response
*/
200: RsvpSchema;
};
export type GetRsvpResponse = GetRsvpResponses[keyof GetRsvpResponses];
export type UpdateRsvpData = {
body: RsvpSchemaUpdate;
path: {
rsvp_id: string;
};
query?: never;
url: "/api/v1/events/rsvps/{rsvp_id}";
};
export type UpdateRsvpErrors = {
/**
* Validation Error
*/
422: HttpValidationError;
};
export type UpdateRsvpError = UpdateRsvpErrors[keyof UpdateRsvpErrors];
export type UpdateRsvpResponses = {
/**
* Successful Response
*/
200: RsvpSchema;
};
export type UpdateRsvpResponse = UpdateRsvpResponses[keyof UpdateRsvpResponses];
export type UpdateRsvpStatusData = {
body: RsvpSchemaUpdate;
path: {
rsvp_id: string;
};
query?: never;
url: "/api/v1/events/rsvps/{rsvp_id}/status";
};
export type UpdateRsvpStatusErrors = {
/**
* Validation Error
*/
422: HttpValidationError;
};
export type UpdateRsvpStatusError =
UpdateRsvpStatusErrors[keyof UpdateRsvpStatusErrors];
export type UpdateRsvpStatusResponses = {
/**
* Successful Response
*/
200: RsvpSchema;
};
export type UpdateRsvpStatusResponse =
UpdateRsvpStatusResponses[keyof UpdateRsvpStatusResponses];
export type CreateEventData = { export type CreateEventData = {
body: EventCreate; body: EventCreate;
path?: never; path?: never;