From 9a58a3890336dc79973c3fc978ba13acb6ae9ff4 Mon Sep 17 00:00:00 2001 From: Felipe Cardoso Date: Sun, 16 Mar 2025 15:46:28 +0100 Subject: [PATCH] Update generated api client --- .../src/client/@tanstack/react-query.gen.ts | 613 ++++++++++ frontend/src/client/schemas.gen.ts | 1077 +++++++++++++++++ frontend/src/client/sdk.gen.ts | 575 +++++++++ frontend/src/client/types.gen.ts | 805 ++++++++++++ 4 files changed, 3070 insertions(+) diff --git a/frontend/src/client/@tanstack/react-query.gen.ts b/frontend/src/client/@tanstack/react-query.gen.ts index e43d877..f333930 100644 --- a/frontend/src/client/@tanstack/react-query.gen.ts +++ b/frontend/src/client/@tanstack/react-query.gen.ts @@ -27,6 +27,27 @@ import { getRsvp, updateRsvp, updateRsvpStatus, + createGiftCategory, + readGiftCategories, + deleteGiftCategory, + readGiftCategory, + updateGiftCategory, + associateCategoryWithEvent, + updateCategoryEventSettings, + getEventsForCategory, + reorderGiftsInCategory, + createGiftItem, + readGiftItems, + deleteGiftItem, + readGiftItem, + updateGiftItem, + updateGiftItemStatus, + reserveGiftItem, + cancelGiftReservation, + createGiftPurchase, + readGiftPurchase, + readGiftPurchasesByGift, + readGiftPurchasesByGuest, createEvent, getUserEvents, getUpcomingEvents, @@ -97,6 +118,53 @@ import type { UpdateRsvpStatusData, UpdateRsvpStatusError, UpdateRsvpStatusResponse, + CreateGiftCategoryData, + CreateGiftCategoryError, + CreateGiftCategoryResponse, + ReadGiftCategoriesData, + DeleteGiftCategoryData, + DeleteGiftCategoryError, + DeleteGiftCategoryResponse, + ReadGiftCategoryData, + UpdateGiftCategoryData, + UpdateGiftCategoryError, + UpdateGiftCategoryResponse, + AssociateCategoryWithEventData, + AssociateCategoryWithEventError, + AssociateCategoryWithEventResponse, + UpdateCategoryEventSettingsData, + UpdateCategoryEventSettingsError, + UpdateCategoryEventSettingsResponse, + GetEventsForCategoryData, + ReorderGiftsInCategoryData, + ReorderGiftsInCategoryError, + ReorderGiftsInCategoryResponse, + CreateGiftItemData, + CreateGiftItemError, + CreateGiftItemResponse, + ReadGiftItemsData, + DeleteGiftItemData, + DeleteGiftItemError, + DeleteGiftItemResponse, + ReadGiftItemData, + UpdateGiftItemData, + UpdateGiftItemError, + UpdateGiftItemResponse, + UpdateGiftItemStatusData, + UpdateGiftItemStatusError, + UpdateGiftItemStatusResponse, + ReserveGiftItemData, + ReserveGiftItemError, + ReserveGiftItemResponse, + CancelGiftReservationData, + CancelGiftReservationError, + CancelGiftReservationResponse, + CreateGiftPurchaseData, + CreateGiftPurchaseError, + CreateGiftPurchaseResponse, + ReadGiftPurchaseData, + ReadGiftPurchasesByGiftData, + ReadGiftPurchasesByGuestData, CreateEventData, CreateEventError, CreateEventResponse, @@ -808,6 +876,551 @@ export const updateRsvpStatusMutation = ( return mutationOptions; }; +export const createGiftCategoryQueryKey = ( + options: Options, +) => createQueryKey("createGiftCategory", options); + +export const createGiftCategoryOptions = ( + options: Options, +) => { + return queryOptions({ + queryFn: async ({ queryKey, signal }) => { + const { data } = await createGiftCategory({ + ...options, + ...queryKey[0], + signal, + throwOnError: true, + }); + return data; + }, + queryKey: createGiftCategoryQueryKey(options), + }); +}; + +export const createGiftCategoryMutation = ( + options?: Partial>, +) => { + const mutationOptions: UseMutationOptions< + CreateGiftCategoryResponse, + AxiosError, + Options + > = { + mutationFn: async (localOptions) => { + const { data } = await createGiftCategory({ + ...options, + ...localOptions, + throwOnError: true, + }); + return data; + }, + }; + return mutationOptions; +}; + +export const readGiftCategoriesQueryKey = ( + options: Options, +) => createQueryKey("readGiftCategories", options); + +export const readGiftCategoriesOptions = ( + options: Options, +) => { + return queryOptions({ + queryFn: async ({ queryKey, signal }) => { + const { data } = await readGiftCategories({ + ...options, + ...queryKey[0], + signal, + throwOnError: true, + }); + return data; + }, + queryKey: readGiftCategoriesQueryKey(options), + }); +}; + +export const deleteGiftCategoryMutation = ( + options?: Partial>, +) => { + const mutationOptions: UseMutationOptions< + DeleteGiftCategoryResponse, + AxiosError, + Options + > = { + mutationFn: async (localOptions) => { + const { data } = await deleteGiftCategory({ + ...options, + ...localOptions, + throwOnError: true, + }); + return data; + }, + }; + return mutationOptions; +}; + +export const readGiftCategoryQueryKey = ( + options: Options, +) => createQueryKey("readGiftCategory", options); + +export const readGiftCategoryOptions = ( + options: Options, +) => { + return queryOptions({ + queryFn: async ({ queryKey, signal }) => { + const { data } = await readGiftCategory({ + ...options, + ...queryKey[0], + signal, + throwOnError: true, + }); + return data; + }, + queryKey: readGiftCategoryQueryKey(options), + }); +}; + +export const updateGiftCategoryMutation = ( + options?: Partial>, +) => { + const mutationOptions: UseMutationOptions< + UpdateGiftCategoryResponse, + AxiosError, + Options + > = { + mutationFn: async (localOptions) => { + const { data } = await updateGiftCategory({ + ...options, + ...localOptions, + throwOnError: true, + }); + return data; + }, + }; + return mutationOptions; +}; + +export const associateCategoryWithEventQueryKey = ( + options: Options, +) => createQueryKey("associateCategoryWithEvent", options); + +export const associateCategoryWithEventOptions = ( + options: Options, +) => { + return queryOptions({ + queryFn: async ({ queryKey, signal }) => { + const { data } = await associateCategoryWithEvent({ + ...options, + ...queryKey[0], + signal, + throwOnError: true, + }); + return data; + }, + queryKey: associateCategoryWithEventQueryKey(options), + }); +}; + +export const associateCategoryWithEventMutation = ( + options?: Partial>, +) => { + const mutationOptions: UseMutationOptions< + AssociateCategoryWithEventResponse, + AxiosError, + Options + > = { + mutationFn: async (localOptions) => { + const { data } = await associateCategoryWithEvent({ + ...options, + ...localOptions, + throwOnError: true, + }); + return data; + }, + }; + return mutationOptions; +}; + +export const updateCategoryEventSettingsMutation = ( + options?: Partial>, +) => { + const mutationOptions: UseMutationOptions< + UpdateCategoryEventSettingsResponse, + AxiosError, + Options + > = { + mutationFn: async (localOptions) => { + const { data } = await updateCategoryEventSettings({ + ...options, + ...localOptions, + throwOnError: true, + }); + return data; + }, + }; + return mutationOptions; +}; + +export const getEventsForCategoryQueryKey = ( + options: Options, +) => createQueryKey("getEventsForCategory", options); + +export const getEventsForCategoryOptions = ( + options: Options, +) => { + return queryOptions({ + queryFn: async ({ queryKey, signal }) => { + const { data } = await getEventsForCategory({ + ...options, + ...queryKey[0], + signal, + throwOnError: true, + }); + return data; + }, + queryKey: getEventsForCategoryQueryKey(options), + }); +}; + +export const reorderGiftsInCategoryMutation = ( + options?: Partial>, +) => { + const mutationOptions: UseMutationOptions< + ReorderGiftsInCategoryResponse, + AxiosError, + Options + > = { + mutationFn: async (localOptions) => { + const { data } = await reorderGiftsInCategory({ + ...options, + ...localOptions, + throwOnError: true, + }); + return data; + }, + }; + return mutationOptions; +}; + +export const createGiftItemQueryKey = (options: Options) => + createQueryKey("createGiftItem", options); + +export const createGiftItemOptions = (options: Options) => { + return queryOptions({ + queryFn: async ({ queryKey, signal }) => { + const { data } = await createGiftItem({ + ...options, + ...queryKey[0], + signal, + throwOnError: true, + }); + return data; + }, + queryKey: createGiftItemQueryKey(options), + }); +}; + +export const createGiftItemMutation = ( + options?: Partial>, +) => { + const mutationOptions: UseMutationOptions< + CreateGiftItemResponse, + AxiosError, + Options + > = { + mutationFn: async (localOptions) => { + const { data } = await createGiftItem({ + ...options, + ...localOptions, + throwOnError: true, + }); + return data; + }, + }; + return mutationOptions; +}; + +export const readGiftItemsQueryKey = (options: Options) => + createQueryKey("readGiftItems", options); + +export const readGiftItemsOptions = (options: Options) => { + return queryOptions({ + queryFn: async ({ queryKey, signal }) => { + const { data } = await readGiftItems({ + ...options, + ...queryKey[0], + signal, + throwOnError: true, + }); + return data; + }, + queryKey: readGiftItemsQueryKey(options), + }); +}; + +export const deleteGiftItemMutation = ( + options?: Partial>, +) => { + const mutationOptions: UseMutationOptions< + DeleteGiftItemResponse, + AxiosError, + Options + > = { + mutationFn: async (localOptions) => { + const { data } = await deleteGiftItem({ + ...options, + ...localOptions, + throwOnError: true, + }); + return data; + }, + }; + return mutationOptions; +}; + +export const readGiftItemQueryKey = (options: Options) => + createQueryKey("readGiftItem", options); + +export const readGiftItemOptions = (options: Options) => { + return queryOptions({ + queryFn: async ({ queryKey, signal }) => { + const { data } = await readGiftItem({ + ...options, + ...queryKey[0], + signal, + throwOnError: true, + }); + return data; + }, + queryKey: readGiftItemQueryKey(options), + }); +}; + +export const updateGiftItemMutation = ( + options?: Partial>, +) => { + const mutationOptions: UseMutationOptions< + UpdateGiftItemResponse, + AxiosError, + Options + > = { + mutationFn: async (localOptions) => { + const { data } = await updateGiftItem({ + ...options, + ...localOptions, + throwOnError: true, + }); + return data; + }, + }; + return mutationOptions; +}; + +export const updateGiftItemStatusMutation = ( + options?: Partial>, +) => { + const mutationOptions: UseMutationOptions< + UpdateGiftItemStatusResponse, + AxiosError, + Options + > = { + mutationFn: async (localOptions) => { + const { data } = await updateGiftItemStatus({ + ...options, + ...localOptions, + throwOnError: true, + }); + return data; + }, + }; + return mutationOptions; +}; + +export const reserveGiftItemQueryKey = ( + options: Options, +) => createQueryKey("reserveGiftItem", options); + +export const reserveGiftItemOptions = ( + options: Options, +) => { + return queryOptions({ + queryFn: async ({ queryKey, signal }) => { + const { data } = await reserveGiftItem({ + ...options, + ...queryKey[0], + signal, + throwOnError: true, + }); + return data; + }, + queryKey: reserveGiftItemQueryKey(options), + }); +}; + +export const reserveGiftItemMutation = ( + options?: Partial>, +) => { + const mutationOptions: UseMutationOptions< + ReserveGiftItemResponse, + AxiosError, + Options + > = { + mutationFn: async (localOptions) => { + const { data } = await reserveGiftItem({ + ...options, + ...localOptions, + throwOnError: true, + }); + return data; + }, + }; + return mutationOptions; +}; + +export const cancelGiftReservationQueryKey = ( + options: Options, +) => createQueryKey("cancelGiftReservation", options); + +export const cancelGiftReservationOptions = ( + options: Options, +) => { + return queryOptions({ + queryFn: async ({ queryKey, signal }) => { + const { data } = await cancelGiftReservation({ + ...options, + ...queryKey[0], + signal, + throwOnError: true, + }); + return data; + }, + queryKey: cancelGiftReservationQueryKey(options), + }); +}; + +export const cancelGiftReservationMutation = ( + options?: Partial>, +) => { + const mutationOptions: UseMutationOptions< + CancelGiftReservationResponse, + AxiosError, + Options + > = { + mutationFn: async (localOptions) => { + const { data } = await cancelGiftReservation({ + ...options, + ...localOptions, + throwOnError: true, + }); + return data; + }, + }; + return mutationOptions; +}; + +export const createGiftPurchaseQueryKey = ( + options: Options, +) => createQueryKey("createGiftPurchase", options); + +export const createGiftPurchaseOptions = ( + options: Options, +) => { + return queryOptions({ + queryFn: async ({ queryKey, signal }) => { + const { data } = await createGiftPurchase({ + ...options, + ...queryKey[0], + signal, + throwOnError: true, + }); + return data; + }, + queryKey: createGiftPurchaseQueryKey(options), + }); +}; + +export const createGiftPurchaseMutation = ( + options?: Partial>, +) => { + const mutationOptions: UseMutationOptions< + CreateGiftPurchaseResponse, + AxiosError, + Options + > = { + mutationFn: async (localOptions) => { + const { data } = await createGiftPurchase({ + ...options, + ...localOptions, + throwOnError: true, + }); + return data; + }, + }; + return mutationOptions; +}; + +export const readGiftPurchaseQueryKey = ( + options: Options, +) => createQueryKey("readGiftPurchase", options); + +export const readGiftPurchaseOptions = ( + options: Options, +) => { + return queryOptions({ + queryFn: async ({ queryKey, signal }) => { + const { data } = await readGiftPurchase({ + ...options, + ...queryKey[0], + signal, + throwOnError: true, + }); + return data; + }, + queryKey: readGiftPurchaseQueryKey(options), + }); +}; + +export const readGiftPurchasesByGiftQueryKey = ( + options: Options, +) => createQueryKey("readGiftPurchasesByGift", options); + +export const readGiftPurchasesByGiftOptions = ( + options: Options, +) => { + return queryOptions({ + queryFn: async ({ queryKey, signal }) => { + const { data } = await readGiftPurchasesByGift({ + ...options, + ...queryKey[0], + signal, + throwOnError: true, + }); + return data; + }, + queryKey: readGiftPurchasesByGiftQueryKey(options), + }); +}; + +export const readGiftPurchasesByGuestQueryKey = ( + options: Options, +) => createQueryKey("readGiftPurchasesByGuest", options); + +export const readGiftPurchasesByGuestOptions = ( + options: Options, +) => { + return queryOptions({ + queryFn: async ({ queryKey, signal }) => { + const { data } = await readGiftPurchasesByGuest({ + ...options, + ...queryKey[0], + signal, + throwOnError: true, + }); + return data; + }, + queryKey: readGiftPurchasesByGuestQueryKey(options), + }); +}; + 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 f8aa7f2..e0d8b52 100644 --- a/frontend/src/client/schemas.gen.ts +++ b/frontend/src/client/schemas.gen.ts @@ -1073,6 +1073,1083 @@ export const EventUpdateSchema = { title: "EventUpdate", } as const; +export const GiftCategorySchema = { + properties: { + name: { + type: "string", + title: "Name", + }, + description: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Description", + }, + icon: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Icon", + }, + color: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Color", + }, + custom_fields: { + anyOf: [ + { + type: "object", + }, + { + type: "null", + }, + ], + title: "Custom Fields", + }, + id: { + type: "string", + format: "uuid", + title: "Id", + }, + created_by: { + type: "string", + format: "uuid", + title: "Created By", + }, + created_at: { + type: "string", + format: "date-time", + title: "Created At", + }, + updated_at: { + type: "string", + format: "date-time", + title: "Updated At", + }, + total_gifts: { + anyOf: [ + { + type: "integer", + }, + { + type: "null", + }, + ], + title: "Total Gifts", + }, + available_gifts: { + anyOf: [ + { + type: "integer", + }, + { + type: "null", + }, + ], + title: "Available Gifts", + }, + gifts: { + anyOf: [ + { + items: { + $ref: "#/components/schemas/GiftItem", + }, + type: "array", + }, + { + type: "null", + }, + ], + title: "Gifts", + }, + display_order: { + anyOf: [ + { + type: "integer", + }, + { + type: "null", + }, + ], + title: "Display Order", + }, + is_visible: { + anyOf: [ + { + type: "boolean", + }, + { + type: "null", + }, + ], + title: "Is Visible", + }, + }, + type: "object", + required: ["name", "id", "created_by", "created_at", "updated_at"], + title: "GiftCategory", +} as const; + +export const GiftCategoryCreateSchema = { + properties: { + name: { + type: "string", + title: "Name", + }, + description: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Description", + }, + icon: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Icon", + }, + color: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Color", + }, + custom_fields: { + anyOf: [ + { + type: "object", + }, + { + type: "null", + }, + ], + title: "Custom Fields", + }, + created_by: { + type: "string", + format: "uuid", + title: "Created By", + }, + }, + type: "object", + required: ["name", "created_by"], + title: "GiftCategoryCreate", +} as const; + +export const GiftCategoryUpdateSchema = { + properties: { + name: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Name", + }, + description: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Description", + }, + icon: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Icon", + }, + color: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Color", + }, + custom_fields: { + anyOf: [ + { + type: "object", + }, + { + type: "null", + }, + ], + title: "Custom Fields", + }, + }, + type: "object", + title: "GiftCategoryUpdate", +} as const; + +export const GiftItemSchema = { + properties: { + name: { + type: "string", + title: "Name", + }, + description: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Description", + }, + price: { + anyOf: [ + { + type: "number", + }, + { + type: "null", + }, + ], + title: "Price", + }, + currency: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Currency", + default: "USD", + }, + quantity_requested: { + anyOf: [ + { + type: "integer", + }, + { + type: "null", + }, + ], + title: "Quantity Requested", + default: 1, + }, + quantity_received: { + anyOf: [ + { + type: "integer", + }, + { + type: "null", + }, + ], + title: "Quantity Received", + default: 0, + }, + status: { + anyOf: [ + { + $ref: "#/components/schemas/GiftStatus", + }, + { + type: "null", + }, + ], + default: "available", + }, + priority: { + anyOf: [ + { + $ref: "#/components/schemas/GiftPriority", + }, + { + type: "null", + }, + ], + default: "medium", + }, + purchase_url: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Purchase Url", + }, + store_name: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Store Name", + }, + brand: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Brand", + }, + model: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Model", + }, + image_url: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Image Url", + }, + display_order: { + anyOf: [ + { + type: "integer", + }, + { + type: "null", + }, + ], + title: "Display Order", + }, + is_visible: { + anyOf: [ + { + type: "boolean", + }, + { + type: "null", + }, + ], + title: "Is Visible", + default: true, + }, + notes: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Notes", + }, + custom_fields: { + anyOf: [ + { + type: "object", + }, + { + type: "null", + }, + ], + title: "Custom Fields", + }, + id: { + type: "string", + format: "uuid", + title: "Id", + }, + event_id: { + type: "string", + format: "uuid", + title: "Event Id", + }, + added_by: { + type: "string", + format: "uuid", + title: "Added By", + }, + category_id: { + anyOf: [ + { + type: "string", + format: "uuid", + }, + { + type: "null", + }, + ], + title: "Category Id", + }, + last_status_change: { + anyOf: [ + { + type: "string", + format: "date-time", + }, + { + type: "null", + }, + ], + title: "Last Status Change", + }, + created_at: { + type: "string", + format: "date-time", + title: "Created At", + }, + updated_at: { + type: "string", + format: "date-time", + title: "Updated At", + }, + remaining_quantity: { + type: "integer", + title: "Remaining Quantity", + }, + is_fully_received: { + type: "boolean", + title: "Is Fully Received", + }, + formatted_price: { + type: "string", + title: "Formatted Price", + }, + reserved: { + type: "boolean", + title: "Reserved", + default: false, + }, + }, + type: "object", + required: [ + "name", + "id", + "event_id", + "added_by", + "created_at", + "updated_at", + "remaining_quantity", + "is_fully_received", + "formatted_price", + ], + title: "GiftItem", +} as const; + +export const GiftItemCreateSchema = { + properties: { + name: { + type: "string", + title: "Name", + }, + description: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Description", + }, + price: { + anyOf: [ + { + type: "number", + }, + { + type: "null", + }, + ], + title: "Price", + }, + currency: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Currency", + default: "USD", + }, + quantity_requested: { + anyOf: [ + { + type: "integer", + }, + { + type: "null", + }, + ], + title: "Quantity Requested", + default: 1, + }, + quantity_received: { + anyOf: [ + { + type: "integer", + }, + { + type: "null", + }, + ], + title: "Quantity Received", + default: 0, + }, + status: { + anyOf: [ + { + $ref: "#/components/schemas/GiftStatus", + }, + { + type: "null", + }, + ], + default: "available", + }, + priority: { + anyOf: [ + { + $ref: "#/components/schemas/GiftPriority", + }, + { + type: "null", + }, + ], + default: "medium", + }, + purchase_url: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Purchase Url", + }, + store_name: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Store Name", + }, + brand: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Brand", + }, + model: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Model", + }, + image_url: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Image Url", + }, + display_order: { + anyOf: [ + { + type: "integer", + }, + { + type: "null", + }, + ], + title: "Display Order", + }, + is_visible: { + anyOf: [ + { + type: "boolean", + }, + { + type: "null", + }, + ], + title: "Is Visible", + default: true, + }, + notes: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Notes", + }, + custom_fields: { + anyOf: [ + { + type: "object", + }, + { + type: "null", + }, + ], + title: "Custom Fields", + }, + event_id: { + type: "string", + format: "uuid", + title: "Event Id", + }, + added_by: { + type: "string", + format: "uuid", + title: "Added By", + }, + category_id: { + anyOf: [ + { + type: "string", + format: "uuid", + }, + { + type: "null", + }, + ], + title: "Category Id", + }, + }, + type: "object", + required: ["name", "event_id", "added_by"], + title: "GiftItemCreate", +} as const; + +export const GiftItemUpdateSchema = { + properties: { + name: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Name", + }, + description: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Description", + }, + price: { + anyOf: [ + { + type: "number", + }, + { + type: "null", + }, + ], + title: "Price", + }, + currency: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Currency", + }, + quantity_requested: { + anyOf: [ + { + type: "integer", + }, + { + type: "null", + }, + ], + title: "Quantity Requested", + }, + quantity_received: { + anyOf: [ + { + type: "integer", + }, + { + type: "null", + }, + ], + title: "Quantity Received", + }, + status: { + anyOf: [ + { + $ref: "#/components/schemas/GiftStatus", + }, + { + type: "null", + }, + ], + }, + priority: { + anyOf: [ + { + $ref: "#/components/schemas/GiftPriority", + }, + { + type: "null", + }, + ], + }, + purchase_url: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Purchase Url", + }, + store_name: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Store Name", + }, + brand: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Brand", + }, + model: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Model", + }, + image_url: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Image Url", + }, + display_order: { + anyOf: [ + { + type: "integer", + }, + { + type: "null", + }, + ], + title: "Display Order", + }, + is_visible: { + anyOf: [ + { + type: "boolean", + }, + { + type: "null", + }, + ], + title: "Is Visible", + }, + notes: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Notes", + }, + custom_fields: { + anyOf: [ + { + type: "object", + }, + { + type: "null", + }, + ], + title: "Custom Fields", + }, + category_id: { + anyOf: [ + { + type: "string", + format: "uuid", + }, + { + type: "null", + }, + ], + title: "Category Id", + }, + }, + type: "object", + title: "GiftItemUpdate", +} as const; + +export const GiftPrioritySchema = { + type: "string", + enum: ["low", "medium", "high", "must_have"], + title: "GiftPriority", +} as const; + +export const GiftPurchaseSchema = { + properties: { + gift_id: { + type: "string", + format: "uuid", + title: "Gift Id", + }, + guest_id: { + type: "string", + format: "uuid", + title: "Guest Id", + }, + quantity: { + type: "integer", + title: "Quantity", + default: 1, + }, + purchase_price: { + anyOf: [ + { + type: "number", + }, + { + type: "null", + }, + ], + title: "Purchase Price", + }, + purchase_currency: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Purchase Currency", + }, + notes: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Notes", + }, + id: { + type: "string", + format: "uuid", + title: "Id", + }, + purchased_at: { + type: "string", + format: "date-time", + title: "Purchased At", + }, + }, + type: "object", + required: ["gift_id", "guest_id", "id", "purchased_at"], + title: "GiftPurchase", +} as const; + +export const GiftPurchaseCreateSchema = { + properties: { + gift_id: { + type: "string", + format: "uuid", + title: "Gift Id", + }, + guest_id: { + type: "string", + format: "uuid", + title: "Guest Id", + }, + quantity: { + type: "integer", + title: "Quantity", + default: 1, + }, + purchase_price: { + anyOf: [ + { + type: "number", + }, + { + type: "null", + }, + ], + title: "Purchase Price", + }, + purchase_currency: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Purchase Currency", + }, + notes: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Notes", + }, + }, + type: "object", + required: ["gift_id", "guest_id"], + title: "GiftPurchaseCreate", +} as const; + +export const GiftStatusSchema = { + type: "string", + enum: ["available", "reserved", "purchased", "received", "removed"], + title: "GiftStatus", +} as const; + export const GuestCreateSchema = { properties: { event_id: { diff --git a/frontend/src/client/sdk.gen.ts b/frontend/src/client/sdk.gen.ts index 7b2f5d7..56a115f 100644 --- a/frontend/src/client/sdk.gen.ts +++ b/frontend/src/client/sdk.gen.ts @@ -79,6 +79,69 @@ import type { UpdateRsvpStatusData, UpdateRsvpStatusResponse, UpdateRsvpStatusError, + CreateGiftCategoryData, + CreateGiftCategoryResponse, + CreateGiftCategoryError, + ReadGiftCategoriesData, + ReadGiftCategoriesResponse, + ReadGiftCategoriesError, + DeleteGiftCategoryData, + DeleteGiftCategoryResponse, + DeleteGiftCategoryError, + ReadGiftCategoryData, + ReadGiftCategoryResponse, + ReadGiftCategoryError, + UpdateGiftCategoryData, + UpdateGiftCategoryResponse, + UpdateGiftCategoryError, + AssociateCategoryWithEventData, + AssociateCategoryWithEventResponse, + AssociateCategoryWithEventError, + UpdateCategoryEventSettingsData, + UpdateCategoryEventSettingsResponse, + UpdateCategoryEventSettingsError, + GetEventsForCategoryData, + GetEventsForCategoryResponse, + GetEventsForCategoryError, + ReorderGiftsInCategoryData, + ReorderGiftsInCategoryResponse, + ReorderGiftsInCategoryError, + CreateGiftItemData, + CreateGiftItemResponse, + CreateGiftItemError, + ReadGiftItemsData, + ReadGiftItemsResponse, + ReadGiftItemsError, + DeleteGiftItemData, + DeleteGiftItemResponse, + DeleteGiftItemError, + ReadGiftItemData, + ReadGiftItemResponse, + ReadGiftItemError, + UpdateGiftItemData, + UpdateGiftItemResponse, + UpdateGiftItemError, + UpdateGiftItemStatusData, + UpdateGiftItemStatusResponse, + UpdateGiftItemStatusError, + ReserveGiftItemData, + ReserveGiftItemResponse, + ReserveGiftItemError, + CancelGiftReservationData, + CancelGiftReservationResponse, + CancelGiftReservationError, + CreateGiftPurchaseData, + CreateGiftPurchaseResponse, + CreateGiftPurchaseError, + ReadGiftPurchaseData, + ReadGiftPurchaseResponse, + ReadGiftPurchaseError, + ReadGiftPurchasesByGiftData, + ReadGiftPurchasesByGiftResponse, + ReadGiftPurchasesByGiftError, + ReadGiftPurchasesByGuestData, + ReadGiftPurchasesByGuestResponse, + ReadGiftPurchasesByGuestError, CreateEventData, CreateEventResponse, CreateEventError, @@ -637,6 +700,518 @@ export const updateRsvpStatus = ( }); }; +/** + * Create Gift Category + * Create new gift category and associate it with an event. + */ +export const createGiftCategory = ( + options: Options, +) => { + return (options.client ?? _heyApiClient).post< + CreateGiftCategoryResponse, + CreateGiftCategoryError, + ThrowOnError + >({ + security: [ + { + scheme: "bearer", + type: "http", + }, + ], + url: "/api/v1/events/gifts/categories/", + ...options, + headers: { + "Content-Type": "application/json", + ...options?.headers, + }, + }); +}; + +/** + * Read Gift Categories + * Retrieve gift categories for an event. + */ +export const readGiftCategories = ( + options: Options, +) => { + return (options.client ?? _heyApiClient).get< + ReadGiftCategoriesResponse, + ReadGiftCategoriesError, + ThrowOnError + >({ + security: [ + { + scheme: "bearer", + type: "http", + }, + ], + url: "/api/v1/events/gifts/categories/event/{event_id}", + ...options, + }); +}; + +/** + * Delete Gift Category + * Delete a gift category. If event_id is provided, only removes the association with that event. + * If force=True and no event_id is provided, deletes the category completely. + */ +export const deleteGiftCategory = ( + options: Options, +) => { + return (options.client ?? _heyApiClient).delete< + DeleteGiftCategoryResponse, + DeleteGiftCategoryError, + ThrowOnError + >({ + security: [ + { + scheme: "bearer", + type: "http", + }, + ], + url: "/api/v1/events/gifts/categories/{category_id}", + ...options, + }); +}; + +/** + * Read Gift Category + * Get gift category by ID. If event_id is provided, includes event-specific display settings. + */ +export const readGiftCategory = ( + options: Options, +) => { + return (options.client ?? _heyApiClient).get< + ReadGiftCategoryResponse, + ReadGiftCategoryError, + ThrowOnError + >({ + security: [ + { + scheme: "bearer", + type: "http", + }, + ], + url: "/api/v1/events/gifts/categories/{category_id}", + ...options, + }); +}; + +/** + * Update Gift Category + * Update a gift category. If event_id is provided, also updates the event-specific settings. + */ +export const updateGiftCategory = ( + options: Options, +) => { + return (options.client ?? _heyApiClient).put< + UpdateGiftCategoryResponse, + UpdateGiftCategoryError, + ThrowOnError + >({ + security: [ + { + scheme: "bearer", + type: "http", + }, + ], + url: "/api/v1/events/gifts/categories/{category_id}", + ...options, + headers: { + "Content-Type": "application/json", + ...options?.headers, + }, + }); +}; + +/** + * Associate Category With Event + * Associate an existing category with an event. + */ +export const associateCategoryWithEvent = < + ThrowOnError extends boolean = false, +>( + options: Options, +) => { + return (options.client ?? _heyApiClient).post< + AssociateCategoryWithEventResponse, + AssociateCategoryWithEventError, + ThrowOnError + >({ + security: [ + { + scheme: "bearer", + type: "http", + }, + ], + url: "/api/v1/events/gifts/events/{event_id}/categories/{category_id}", + ...options, + }); +}; + +/** + * Update Category Event Settings + * Update the display settings for a category in an event. + */ +export const updateCategoryEventSettings = < + ThrowOnError extends boolean = false, +>( + options: Options, +) => { + return (options.client ?? _heyApiClient).put< + UpdateCategoryEventSettingsResponse, + UpdateCategoryEventSettingsError, + ThrowOnError + >({ + security: [ + { + scheme: "bearer", + type: "http", + }, + ], + url: "/api/v1/events/gifts/events/{event_id}/categories/{category_id}", + ...options, + }); +}; + +/** + * Get Events For Category + * Get all events that use a specific category. + */ +export const getEventsForCategory = ( + options: Options, +) => { + return (options.client ?? _heyApiClient).get< + GetEventsForCategoryResponse, + GetEventsForCategoryError, + ThrowOnError + >({ + security: [ + { + scheme: "bearer", + type: "http", + }, + ], + url: "/api/v1/events/gifts/categories/{category_id}/events", + ...options, + }); +}; + +/** + * Reorder Gifts In Category + * Reorder gifts within a category. + */ +export const reorderGiftsInCategory = ( + options: Options, +) => { + return (options.client ?? _heyApiClient).put< + ReorderGiftsInCategoryResponse, + ReorderGiftsInCategoryError, + ThrowOnError + >({ + security: [ + { + scheme: "bearer", + type: "http", + }, + ], + url: "/api/v1/events/gifts/categories/{category_id}/reorder", + ...options, + headers: { + "Content-Type": "application/json", + ...options?.headers, + }, + }); +}; + +/** + * Create Gift Item + * Create new gift item. + */ +export const createGiftItem = ( + options: Options, +) => { + return (options.client ?? _heyApiClient).post< + CreateGiftItemResponse, + CreateGiftItemError, + ThrowOnError + >({ + security: [ + { + scheme: "bearer", + type: "http", + }, + ], + url: "/api/v1/events/gifts/items/", + ...options, + headers: { + "Content-Type": "application/json", + ...options?.headers, + }, + }); +}; + +/** + * Read Gift Items + * Retrieve gift items for an event. + */ +export const readGiftItems = ( + options: Options, +) => { + return (options.client ?? _heyApiClient).get< + ReadGiftItemsResponse, + ReadGiftItemsError, + ThrowOnError + >({ + security: [ + { + scheme: "bearer", + type: "http", + }, + ], + url: "/api/v1/events/gifts/items/event/{event_id}", + ...options, + }); +}; + +/** + * Delete Gift Item + * Delete a gift item. + */ +export const deleteGiftItem = ( + options: Options, +) => { + return (options.client ?? _heyApiClient).delete< + DeleteGiftItemResponse, + DeleteGiftItemError, + ThrowOnError + >({ + security: [ + { + scheme: "bearer", + type: "http", + }, + ], + url: "/api/v1/events/gifts/items/{item_id}", + ...options, + }); +}; + +/** + * Read Gift Item + * Get gift item by ID. + */ +export const readGiftItem = ( + options: Options, +) => { + return (options.client ?? _heyApiClient).get< + ReadGiftItemResponse, + ReadGiftItemError, + ThrowOnError + >({ + security: [ + { + scheme: "bearer", + type: "http", + }, + ], + url: "/api/v1/events/gifts/items/{item_id}", + ...options, + }); +}; + +/** + * Update Gift Item + * Update a gift item. + */ +export const updateGiftItem = ( + options: Options, +) => { + return (options.client ?? _heyApiClient).put< + UpdateGiftItemResponse, + UpdateGiftItemError, + ThrowOnError + >({ + security: [ + { + scheme: "bearer", + type: "http", + }, + ], + url: "/api/v1/events/gifts/items/{item_id}", + ...options, + headers: { + "Content-Type": "application/json", + ...options?.headers, + }, + }); +}; + +/** + * Update Gift Item Status + * Update a gift item's status. + */ +export const updateGiftItemStatus = ( + options: Options, +) => { + return (options.client ?? _heyApiClient).put< + UpdateGiftItemStatusResponse, + UpdateGiftItemStatusError, + ThrowOnError + >({ + security: [ + { + scheme: "bearer", + type: "http", + }, + ], + url: "/api/v1/events/gifts/items/{item_id}/status", + ...options, + }); +}; + +/** + * Reserve Gift Item + * Reserve a gift item for a guest. + */ +export const reserveGiftItem = ( + options: Options, +) => { + return (options.client ?? _heyApiClient).post< + ReserveGiftItemResponse, + ReserveGiftItemError, + ThrowOnError + >({ + security: [ + { + scheme: "bearer", + type: "http", + }, + ], + url: "/api/v1/events/gifts/items/{item_id}/reserve", + ...options, + }); +}; + +/** + * Cancel Gift Reservation + * Cancel a gift reservation. + */ +export const cancelGiftReservation = ( + options: Options, +) => { + return (options.client ?? _heyApiClient).post< + CancelGiftReservationResponse, + CancelGiftReservationError, + ThrowOnError + >({ + security: [ + { + scheme: "bearer", + type: "http", + }, + ], + url: "/api/v1/events/gifts/items/{item_id}/cancel-reservation", + ...options, + }); +}; + +/** + * Create Gift Purchase + * Create a gift purchase record. + */ +export const createGiftPurchase = ( + options: Options, +) => { + return (options.client ?? _heyApiClient).post< + CreateGiftPurchaseResponse, + CreateGiftPurchaseError, + ThrowOnError + >({ + security: [ + { + scheme: "bearer", + type: "http", + }, + ], + url: "/api/v1/events/gifts/purchases/", + ...options, + headers: { + "Content-Type": "application/json", + ...options?.headers, + }, + }); +}; + +/** + * Read Gift Purchase + * Get a gift purchase by ID. + */ +export const readGiftPurchase = ( + options: Options, +) => { + return (options.client ?? _heyApiClient).get< + ReadGiftPurchaseResponse, + ReadGiftPurchaseError, + ThrowOnError + >({ + security: [ + { + scheme: "bearer", + type: "http", + }, + ], + url: "/api/v1/events/gifts/purchases/{purchase_id}", + ...options, + }); +}; + +/** + * Read Gift Purchases By Gift + * Get all purchases for a specific gift. + */ +export const readGiftPurchasesByGift = ( + options: Options, +) => { + return (options.client ?? _heyApiClient).get< + ReadGiftPurchasesByGiftResponse, + ReadGiftPurchasesByGiftError, + ThrowOnError + >({ + security: [ + { + scheme: "bearer", + type: "http", + }, + ], + url: "/api/v1/events/gifts/purchases/gift/{gift_id}", + ...options, + }); +}; + +/** + * Read Gift Purchases By Guest + * Get all purchases made by a specific guest. + */ +export const readGiftPurchasesByGuest = ( + options: Options, +) => { + return (options.client ?? _heyApiClient).get< + ReadGiftPurchasesByGuestResponse, + ReadGiftPurchasesByGuestError, + ThrowOnError + >({ + security: [ + { + scheme: "bearer", + type: "http", + }, + ], + url: "/api/v1/events/gifts/purchases/guest/{guest_id}", + ...options, + }); +}; + /** * Create Event * Create a new event. diff --git a/frontend/src/client/types.gen.ts b/frontend/src/client/types.gen.ts index b2e271c..d599a78 100644 --- a/frontend/src/client/types.gen.ts +++ b/frontend/src/client/types.gen.ts @@ -167,6 +167,171 @@ export type EventUpdate = { slug?: string | null; }; +export type GiftCategory = { + name: string; + description?: string | null; + icon?: string | null; + color?: string | null; + custom_fields?: { + [key: string]: unknown; + } | null; + id: string; + created_by: string; + created_at: string; + updated_at: string; + total_gifts?: number | null; + available_gifts?: number | null; + gifts?: Array | null; + display_order?: number | null; + is_visible?: boolean | null; +}; + +export type GiftCategoryCreate = { + name: string; + description?: string | null; + icon?: string | null; + color?: string | null; + custom_fields?: { + [key: string]: unknown; + } | null; + created_by: string; +}; + +export type GiftCategoryUpdate = { + name?: string | null; + description?: string | null; + icon?: string | null; + color?: string | null; + custom_fields?: { + [key: string]: unknown; + } | null; +}; + +export type GiftItem = { + name: string; + description?: string | null; + price?: number | null; + currency?: string | null; + quantity_requested?: number | null; + quantity_received?: number | null; + status?: GiftStatus | null; + priority?: GiftPriority | null; + purchase_url?: string | null; + store_name?: string | null; + brand?: string | null; + model?: string | null; + image_url?: string | null; + display_order?: number | null; + is_visible?: boolean | null; + notes?: string | null; + custom_fields?: { + [key: string]: unknown; + } | null; + id: string; + event_id: string; + added_by: string; + category_id?: string | null; + last_status_change?: string | null; + created_at: string; + updated_at: string; + remaining_quantity: number; + is_fully_received: boolean; + formatted_price: string; + reserved?: boolean; +}; + +export type GiftItemCreate = { + name: string; + description?: string | null; + price?: number | null; + currency?: string | null; + quantity_requested?: number | null; + quantity_received?: number | null; + status?: GiftStatus | null; + priority?: GiftPriority | null; + purchase_url?: string | null; + store_name?: string | null; + brand?: string | null; + model?: string | null; + image_url?: string | null; + display_order?: number | null; + is_visible?: boolean | null; + notes?: string | null; + custom_fields?: { + [key: string]: unknown; + } | null; + event_id: string; + added_by: string; + category_id?: string | null; +}; + +export type GiftItemUpdate = { + name?: string | null; + description?: string | null; + price?: number | null; + currency?: string | null; + quantity_requested?: number | null; + quantity_received?: number | null; + status?: GiftStatus | null; + priority?: GiftPriority | null; + purchase_url?: string | null; + store_name?: string | null; + brand?: string | null; + model?: string | null; + image_url?: string | null; + display_order?: number | null; + is_visible?: boolean | null; + notes?: string | null; + custom_fields?: { + [key: string]: unknown; + } | null; + category_id?: string | null; +}; + +export type GiftPriority = "low" | "medium" | "high" | "must_have"; + +export const GiftPriority = { + LOW: "low", + MEDIUM: "medium", + HIGH: "high", + MUST_HAVE: "must_have", +} as const; + +export type GiftPurchase = { + gift_id: string; + guest_id: string; + quantity?: number; + purchase_price?: number | null; + purchase_currency?: string | null; + notes?: string | null; + id: string; + purchased_at: string; +}; + +export type GiftPurchaseCreate = { + gift_id: string; + guest_id: string; + quantity?: number; + purchase_price?: number | null; + purchase_currency?: string | null; + notes?: string | null; +}; + +export type GiftStatus = + | "available" + | "reserved" + | "purchased" + | "received" + | "removed"; + +export const GiftStatus = { + AVAILABLE: "available", + RESERVED: "reserved", + PURCHASED: "purchased", + RECEIVED: "received", + REMOVED: "removed", +} as const; + export type GuestCreate = { event_id: string; invited_by: string; @@ -1041,6 +1206,646 @@ export type UpdateRsvpStatusResponses = { export type UpdateRsvpStatusResponse = UpdateRsvpStatusResponses[keyof UpdateRsvpStatusResponses]; +export type CreateGiftCategoryData = { + body: GiftCategoryCreate; + path?: never; + query: { + event_id: string; + }; + url: "/api/v1/events/gifts/categories/"; +}; + +export type CreateGiftCategoryErrors = { + /** + * Validation Error + */ + 422: HttpValidationError; +}; + +export type CreateGiftCategoryError = + CreateGiftCategoryErrors[keyof CreateGiftCategoryErrors]; + +export type CreateGiftCategoryResponses = { + /** + * Successful Response + */ + 200: GiftCategory; +}; + +export type CreateGiftCategoryResponse = + CreateGiftCategoryResponses[keyof CreateGiftCategoryResponses]; + +export type ReadGiftCategoriesData = { + body?: never; + path: { + event_id: string; + }; + query?: { + skip?: number; + limit?: number; + include_hidden?: boolean; + include_gifts?: boolean; + }; + url: "/api/v1/events/gifts/categories/event/{event_id}"; +}; + +export type ReadGiftCategoriesErrors = { + /** + * Validation Error + */ + 422: HttpValidationError; +}; + +export type ReadGiftCategoriesError = + ReadGiftCategoriesErrors[keyof ReadGiftCategoriesErrors]; + +export type ReadGiftCategoriesResponses = { + /** + * Successful Response + */ + 200: Array; +}; + +export type ReadGiftCategoriesResponse = + ReadGiftCategoriesResponses[keyof ReadGiftCategoriesResponses]; + +export type DeleteGiftCategoryData = { + body?: never; + path: { + category_id: string; + }; + query?: { + event_id?: string | null; + force?: boolean; + }; + url: "/api/v1/events/gifts/categories/{category_id}"; +}; + +export type DeleteGiftCategoryErrors = { + /** + * Validation Error + */ + 422: HttpValidationError; +}; + +export type DeleteGiftCategoryError = + DeleteGiftCategoryErrors[keyof DeleteGiftCategoryErrors]; + +export type DeleteGiftCategoryResponses = { + /** + * Successful Response + */ + 200: GiftCategory; +}; + +export type DeleteGiftCategoryResponse = + DeleteGiftCategoryResponses[keyof DeleteGiftCategoryResponses]; + +export type ReadGiftCategoryData = { + body?: never; + path: { + category_id: string; + }; + query?: { + event_id?: string | null; + include_gifts?: boolean; + }; + url: "/api/v1/events/gifts/categories/{category_id}"; +}; + +export type ReadGiftCategoryErrors = { + /** + * Validation Error + */ + 422: HttpValidationError; +}; + +export type ReadGiftCategoryError = + ReadGiftCategoryErrors[keyof ReadGiftCategoryErrors]; + +export type ReadGiftCategoryResponses = { + /** + * Successful Response + */ + 200: GiftCategory; +}; + +export type ReadGiftCategoryResponse = + ReadGiftCategoryResponses[keyof ReadGiftCategoryResponses]; + +export type UpdateGiftCategoryData = { + body: GiftCategoryUpdate; + path: { + category_id: string; + }; + query?: { + event_id?: string | null; + }; + url: "/api/v1/events/gifts/categories/{category_id}"; +}; + +export type UpdateGiftCategoryErrors = { + /** + * Validation Error + */ + 422: HttpValidationError; +}; + +export type UpdateGiftCategoryError = + UpdateGiftCategoryErrors[keyof UpdateGiftCategoryErrors]; + +export type UpdateGiftCategoryResponses = { + /** + * Successful Response + */ + 200: GiftCategory; +}; + +export type UpdateGiftCategoryResponse = + UpdateGiftCategoryResponses[keyof UpdateGiftCategoryResponses]; + +export type AssociateCategoryWithEventData = { + body?: never; + path: { + event_id: string; + category_id: string; + }; + query?: { + display_order?: number; + is_visible?: boolean; + }; + url: "/api/v1/events/gifts/events/{event_id}/categories/{category_id}"; +}; + +export type AssociateCategoryWithEventErrors = { + /** + * Validation Error + */ + 422: HttpValidationError; +}; + +export type AssociateCategoryWithEventError = + AssociateCategoryWithEventErrors[keyof AssociateCategoryWithEventErrors]; + +export type AssociateCategoryWithEventResponses = { + /** + * Successful Response + */ + 200: GiftCategory; +}; + +export type AssociateCategoryWithEventResponse = + AssociateCategoryWithEventResponses[keyof AssociateCategoryWithEventResponses]; + +export type UpdateCategoryEventSettingsData = { + body?: never; + path: { + event_id: string; + category_id: string; + }; + query?: { + display_order?: number | null; + is_visible?: boolean | null; + }; + url: "/api/v1/events/gifts/events/{event_id}/categories/{category_id}"; +}; + +export type UpdateCategoryEventSettingsErrors = { + /** + * Validation Error + */ + 422: HttpValidationError; +}; + +export type UpdateCategoryEventSettingsError = + UpdateCategoryEventSettingsErrors[keyof UpdateCategoryEventSettingsErrors]; + +export type UpdateCategoryEventSettingsResponses = { + /** + * Successful Response + */ + 200: GiftCategory; +}; + +export type UpdateCategoryEventSettingsResponse = + UpdateCategoryEventSettingsResponses[keyof UpdateCategoryEventSettingsResponses]; + +export type GetEventsForCategoryData = { + body?: never; + path: { + category_id: string; + }; + query?: never; + url: "/api/v1/events/gifts/categories/{category_id}/events"; +}; + +export type GetEventsForCategoryErrors = { + /** + * Validation Error + */ + 422: HttpValidationError; +}; + +export type GetEventsForCategoryError = + GetEventsForCategoryErrors[keyof GetEventsForCategoryErrors]; + +export type GetEventsForCategoryResponses = { + /** + * Successful Response + */ + 200: Array<{ + [key: string]: unknown; + }>; +}; + +export type GetEventsForCategoryResponse = + GetEventsForCategoryResponses[keyof GetEventsForCategoryResponses]; + +export type ReorderGiftsInCategoryData = { + body: { + [key: string]: number; + }; + path: { + category_id: string; + }; + query?: never; + url: "/api/v1/events/gifts/categories/{category_id}/reorder"; +}; + +export type ReorderGiftsInCategoryErrors = { + /** + * Validation Error + */ + 422: HttpValidationError; +}; + +export type ReorderGiftsInCategoryError = + ReorderGiftsInCategoryErrors[keyof ReorderGiftsInCategoryErrors]; + +export type ReorderGiftsInCategoryResponses = { + /** + * Successful Response + */ + 200: GiftCategory; +}; + +export type ReorderGiftsInCategoryResponse = + ReorderGiftsInCategoryResponses[keyof ReorderGiftsInCategoryResponses]; + +export type CreateGiftItemData = { + body: GiftItemCreate; + path?: never; + query?: never; + url: "/api/v1/events/gifts/items/"; +}; + +export type CreateGiftItemErrors = { + /** + * Validation Error + */ + 422: HttpValidationError; +}; + +export type CreateGiftItemError = + CreateGiftItemErrors[keyof CreateGiftItemErrors]; + +export type CreateGiftItemResponses = { + /** + * Successful Response + */ + 200: GiftItem; +}; + +export type CreateGiftItemResponse = + CreateGiftItemResponses[keyof CreateGiftItemResponses]; + +export type ReadGiftItemsData = { + body?: never; + path: { + event_id: string; + }; + query?: { + skip?: number; + limit?: number; + include_hidden?: boolean; + category_id?: string | null; + }; + url: "/api/v1/events/gifts/items/event/{event_id}"; +}; + +export type ReadGiftItemsErrors = { + /** + * Validation Error + */ + 422: HttpValidationError; +}; + +export type ReadGiftItemsError = ReadGiftItemsErrors[keyof ReadGiftItemsErrors]; + +export type ReadGiftItemsResponses = { + /** + * Successful Response + */ + 200: Array; +}; + +export type ReadGiftItemsResponse = + ReadGiftItemsResponses[keyof ReadGiftItemsResponses]; + +export type DeleteGiftItemData = { + body?: never; + path: { + item_id: string; + }; + query?: never; + url: "/api/v1/events/gifts/items/{item_id}"; +}; + +export type DeleteGiftItemErrors = { + /** + * Validation Error + */ + 422: HttpValidationError; +}; + +export type DeleteGiftItemError = + DeleteGiftItemErrors[keyof DeleteGiftItemErrors]; + +export type DeleteGiftItemResponses = { + /** + * Successful Response + */ + 200: GiftItem; +}; + +export type DeleteGiftItemResponse = + DeleteGiftItemResponses[keyof DeleteGiftItemResponses]; + +export type ReadGiftItemData = { + body?: never; + path: { + item_id: string; + }; + query?: never; + url: "/api/v1/events/gifts/items/{item_id}"; +}; + +export type ReadGiftItemErrors = { + /** + * Validation Error + */ + 422: HttpValidationError; +}; + +export type ReadGiftItemError = ReadGiftItemErrors[keyof ReadGiftItemErrors]; + +export type ReadGiftItemResponses = { + /** + * Successful Response + */ + 200: GiftItem; +}; + +export type ReadGiftItemResponse = + ReadGiftItemResponses[keyof ReadGiftItemResponses]; + +export type UpdateGiftItemData = { + body: GiftItemUpdate; + path: { + item_id: string; + }; + query?: never; + url: "/api/v1/events/gifts/items/{item_id}"; +}; + +export type UpdateGiftItemErrors = { + /** + * Validation Error + */ + 422: HttpValidationError; +}; + +export type UpdateGiftItemError = + UpdateGiftItemErrors[keyof UpdateGiftItemErrors]; + +export type UpdateGiftItemResponses = { + /** + * Successful Response + */ + 200: GiftItem; +}; + +export type UpdateGiftItemResponse = + UpdateGiftItemResponses[keyof UpdateGiftItemResponses]; + +export type UpdateGiftItemStatusData = { + body?: never; + path: { + item_id: string; + }; + query: { + status: GiftStatus; + }; + url: "/api/v1/events/gifts/items/{item_id}/status"; +}; + +export type UpdateGiftItemStatusErrors = { + /** + * Validation Error + */ + 422: HttpValidationError; +}; + +export type UpdateGiftItemStatusError = + UpdateGiftItemStatusErrors[keyof UpdateGiftItemStatusErrors]; + +export type UpdateGiftItemStatusResponses = { + /** + * Successful Response + */ + 200: GiftItem; +}; + +export type UpdateGiftItemStatusResponse = + UpdateGiftItemStatusResponses[keyof UpdateGiftItemStatusResponses]; + +export type ReserveGiftItemData = { + body?: never; + path: { + item_id: string; + }; + query: { + guest_id: string; + notes?: string | null; + }; + url: "/api/v1/events/gifts/items/{item_id}/reserve"; +}; + +export type ReserveGiftItemErrors = { + /** + * Validation Error + */ + 422: HttpValidationError; +}; + +export type ReserveGiftItemError = + ReserveGiftItemErrors[keyof ReserveGiftItemErrors]; + +export type ReserveGiftItemResponses = { + /** + * Successful Response + */ + 200: GiftItem; +}; + +export type ReserveGiftItemResponse = + ReserveGiftItemResponses[keyof ReserveGiftItemResponses]; + +export type CancelGiftReservationData = { + body?: never; + path: { + item_id: string; + }; + query: { + guest_id: string; + }; + url: "/api/v1/events/gifts/items/{item_id}/cancel-reservation"; +}; + +export type CancelGiftReservationErrors = { + /** + * Validation Error + */ + 422: HttpValidationError; +}; + +export type CancelGiftReservationError = + CancelGiftReservationErrors[keyof CancelGiftReservationErrors]; + +export type CancelGiftReservationResponses = { + /** + * Successful Response + */ + 200: GiftItem; +}; + +export type CancelGiftReservationResponse = + CancelGiftReservationResponses[keyof CancelGiftReservationResponses]; + +export type CreateGiftPurchaseData = { + body: GiftPurchaseCreate; + path?: never; + query?: never; + url: "/api/v1/events/gifts/purchases/"; +}; + +export type CreateGiftPurchaseErrors = { + /** + * Validation Error + */ + 422: HttpValidationError; +}; + +export type CreateGiftPurchaseError = + CreateGiftPurchaseErrors[keyof CreateGiftPurchaseErrors]; + +export type CreateGiftPurchaseResponses = { + /** + * Successful Response + */ + 200: GiftPurchase; +}; + +export type CreateGiftPurchaseResponse = + CreateGiftPurchaseResponses[keyof CreateGiftPurchaseResponses]; + +export type ReadGiftPurchaseData = { + body?: never; + path: { + purchase_id: string; + }; + query?: never; + url: "/api/v1/events/gifts/purchases/{purchase_id}"; +}; + +export type ReadGiftPurchaseErrors = { + /** + * Validation Error + */ + 422: HttpValidationError; +}; + +export type ReadGiftPurchaseError = + ReadGiftPurchaseErrors[keyof ReadGiftPurchaseErrors]; + +export type ReadGiftPurchaseResponses = { + /** + * Successful Response + */ + 200: GiftPurchase; +}; + +export type ReadGiftPurchaseResponse = + ReadGiftPurchaseResponses[keyof ReadGiftPurchaseResponses]; + +export type ReadGiftPurchasesByGiftData = { + body?: never; + path: { + gift_id: string; + }; + query?: never; + url: "/api/v1/events/gifts/purchases/gift/{gift_id}"; +}; + +export type ReadGiftPurchasesByGiftErrors = { + /** + * Validation Error + */ + 422: HttpValidationError; +}; + +export type ReadGiftPurchasesByGiftError = + ReadGiftPurchasesByGiftErrors[keyof ReadGiftPurchasesByGiftErrors]; + +export type ReadGiftPurchasesByGiftResponses = { + /** + * Successful Response + */ + 200: Array; +}; + +export type ReadGiftPurchasesByGiftResponse = + ReadGiftPurchasesByGiftResponses[keyof ReadGiftPurchasesByGiftResponses]; + +export type ReadGiftPurchasesByGuestData = { + body?: never; + path: { + guest_id: string; + }; + query?: never; + url: "/api/v1/events/gifts/purchases/guest/{guest_id}"; +}; + +export type ReadGiftPurchasesByGuestErrors = { + /** + * Validation Error + */ + 422: HttpValidationError; +}; + +export type ReadGiftPurchasesByGuestError = + ReadGiftPurchasesByGuestErrors[keyof ReadGiftPurchasesByGuestErrors]; + +export type ReadGiftPurchasesByGuestResponses = { + /** + * Successful Response + */ + 200: Array; +}; + +export type ReadGiftPurchasesByGuestResponse = + ReadGiftPurchasesByGuestResponses[keyof ReadGiftPurchasesByGuestResponses]; + export type CreateEventData = { body: EventCreate; path?: never;