diff --git a/frontend/src/client/@tanstack/react-query.gen.ts b/frontend/src/client/@tanstack/react-query.gen.ts index 8a81f57..094cc5a 100644 --- a/frontend/src/client/@tanstack/react-query.gen.ts +++ b/frontend/src/client/@tanstack/react-query.gen.ts @@ -14,6 +14,18 @@ import { deleteEventTheme, getEventTheme, updateEventTheme, + getGuests, + createGuest, + deleteGuest, + getGuest, + updateGuest, + setGuestStatusApiV1EventsGuestsGuestIdStatusPatch, + getRsvps, + createRsvp, + deleteRsvp, + getRsvp, + updateRsvp, + updateRsvpStatus, createEvent, getUserEvents, getUpcomingEvents, @@ -53,6 +65,34 @@ import type { UpdateEventThemeData, UpdateEventThemeError, 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, CreateEventError, CreateEventResponse, @@ -455,6 +495,276 @@ export const updateEventThemeMutation = ( return mutationOptions; }; +export const getGuestsQueryKey = (options?: Options) => + createQueryKey("getGuests", options); + +export const getGuestsOptions = (options?: Options) => { + 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) => + createQueryKey("createGuest", options); + +export const createGuestOptions = (options: Options) => { + 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>, +) => { + const mutationOptions: UseMutationOptions< + CreateGuestResponse, + AxiosError, + Options + > = { + mutationFn: async (localOptions) => { + const { data } = await createGuest({ + ...options, + ...localOptions, + throwOnError: true, + }); + return data; + }, + }; + return mutationOptions; +}; + +export const deleteGuestMutation = ( + options?: Partial>, +) => { + const mutationOptions: UseMutationOptions< + DeleteGuestResponse, + AxiosError, + Options + > = { + mutationFn: async (localOptions) => { + const { data } = await deleteGuest({ + ...options, + ...localOptions, + throwOnError: true, + }); + return data; + }, + }; + return mutationOptions; +}; + +export const getGuestQueryKey = (options: Options) => + createQueryKey("getGuest", options); + +export const getGuestOptions = (options: Options) => { + 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>, +) => { + const mutationOptions: UseMutationOptions< + UpdateGuestResponse, + AxiosError, + Options + > = { + mutationFn: async (localOptions) => { + const { data } = await updateGuest({ + ...options, + ...localOptions, + throwOnError: true, + }); + return data; + }, + }; + return mutationOptions; +}; + +export const setGuestStatusApiV1EventsGuestsGuestIdStatusPatchMutation = ( + options?: Partial< + Options + >, +) => { + const mutationOptions: UseMutationOptions< + SetGuestStatusApiV1EventsGuestsGuestIdStatusPatchResponse, + AxiosError, + Options + > = { + mutationFn: async (localOptions) => { + const { data } = await setGuestStatusApiV1EventsGuestsGuestIdStatusPatch({ + ...options, + ...localOptions, + throwOnError: true, + }); + return data; + }, + }; + return mutationOptions; +}; + +export const getRsvpsQueryKey = (options?: Options) => + createQueryKey("getRsvps", options); + +export const getRsvpsOptions = (options?: Options) => { + 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) => + createQueryKey("createRsvp", options); + +export const createRsvpOptions = (options: Options) => { + 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>, +) => { + const mutationOptions: UseMutationOptions< + CreateRsvpResponse, + AxiosError, + Options + > = { + mutationFn: async (localOptions) => { + const { data } = await createRsvp({ + ...options, + ...localOptions, + throwOnError: true, + }); + return data; + }, + }; + return mutationOptions; +}; + +export const deleteRsvpMutation = ( + options?: Partial>, +) => { + const mutationOptions: UseMutationOptions< + DeleteRsvpResponse, + AxiosError, + Options + > = { + mutationFn: async (localOptions) => { + const { data } = await deleteRsvp({ + ...options, + ...localOptions, + throwOnError: true, + }); + return data; + }, + }; + return mutationOptions; +}; + +export const getRsvpQueryKey = (options: Options) => + createQueryKey("getRsvp", options); + +export const getRsvpOptions = (options: Options) => { + 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>, +) => { + const mutationOptions: UseMutationOptions< + UpdateRsvpResponse, + AxiosError, + Options + > = { + mutationFn: async (localOptions) => { + const { data } = await updateRsvp({ + ...options, + ...localOptions, + throwOnError: true, + }); + return data; + }, + }; + return mutationOptions; +}; + +export const updateRsvpStatusMutation = ( + options?: Partial>, +) => { + const mutationOptions: UseMutationOptions< + UpdateRsvpStatusResponse, + AxiosError, + Options + > = { + mutationFn: async (localOptions) => { + const { data } = await updateRsvpStatus({ + ...options, + ...localOptions, + throwOnError: true, + }); + return data; + }, + }; + return mutationOptions; +}; + export const createEventQueryKey = (options: Options) => createQueryKey("createEvent", options); diff --git a/frontend/src/client/schemas.gen.ts b/frontend/src/client/schemas.gen.ts index b5e191d..fc9c6e4 100644 --- a/frontend/src/client/schemas.gen.ts +++ b/frontend/src/client/schemas.gen.ts @@ -1073,6 +1073,427 @@ export const EventUpdateSchema = { title: "EventUpdate", } 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 = { properties: { detail: { @@ -1180,6 +1601,188 @@ export const PresignedUrlResponseSchema = { description: "Response model for presigned URL generation.", } 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 = { properties: { refresh_token: { diff --git a/frontend/src/client/sdk.gen.ts b/frontend/src/client/sdk.gen.ts index ed7f949..a78a7b9 100644 --- a/frontend/src/client/sdk.gen.ts +++ b/frontend/src/client/sdk.gen.ts @@ -40,6 +40,42 @@ import type { UpdateEventThemeData, UpdateEventThemeResponse, 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, CreateEventResponse, CreateEventError, @@ -366,6 +402,223 @@ export const updateEventTheme = ( }); }; +/** + * Read Guests + */ +export const getGuests = ( + options?: Options, +) => { + return (options?.client ?? _heyApiClient).get< + GetGuestsResponse, + GetGuestsError, + ThrowOnError + >({ + url: "/api/v1/events/guests/", + ...options, + }); +}; + +/** + * Create Guest + */ +export const createGuest = ( + options: Options, +) => { + 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 = ( + options: Options, +) => { + return (options.client ?? _heyApiClient).delete< + DeleteGuestResponse, + DeleteGuestError, + ThrowOnError + >({ + url: "/api/v1/events/guests/{guest_id}", + ...options, + }); +}; + +/** + * Read Guest + */ +export const getGuest = ( + options: Options, +) => { + return (options.client ?? _heyApiClient).get< + GetGuestResponse, + GetGuestError, + ThrowOnError + >({ + url: "/api/v1/events/guests/{guest_id}", + ...options, + }); +}; + +/** + * Update Guest + */ +export const updateGuest = ( + options: Options, +) => { + 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 = ( + options?: Options, +) => { + return (options?.client ?? _heyApiClient).get< + GetRsvpsResponse, + GetRsvpsError, + ThrowOnError + >({ + url: "/api/v1/events/rsvps/", + ...options, + }); +}; + +/** + * Create Rsvp + */ +export const createRsvp = ( + options: Options, +) => { + 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 = ( + options: Options, +) => { + return (options.client ?? _heyApiClient).delete< + DeleteRsvpResponse, + DeleteRsvpError, + ThrowOnError + >({ + url: "/api/v1/events/rsvps/{rsvp_id}", + ...options, + }); +}; + +/** + * Read Rsvp + */ +export const getRsvp = ( + options: Options, +) => { + return (options.client ?? _heyApiClient).get< + GetRsvpResponse, + GetRsvpError, + ThrowOnError + >({ + url: "/api/v1/events/rsvps/{rsvp_id}", + ...options, + }); +}; + +/** + * Update Rsvp + */ +export const updateRsvp = ( + options: Options, +) => { + 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 = ( + options: Options, +) => { + 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 a new event. diff --git a/frontend/src/client/types.gen.ts b/frontend/src/client/types.gen.ts index 43d9a3b..1b37e0a 100644 --- a/frontend/src/client/types.gen.ts +++ b/frontend/src/client/types.gen.ts @@ -167,6 +167,78 @@ export type EventUpdate = { 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 = { detail?: Array; }; @@ -219,6 +291,46 @@ export type PresignedUrlResponse = { 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 = { refresh_token: string; }; @@ -559,6 +671,337 @@ export type UpdateEventThemeResponses = { export type UpdateEventThemeResponse = 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; +}; + +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; +}; + +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 = { body: EventCreate; path?: never;