Update generated api client
This commit is contained in:
@@ -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<CreateGiftCategoryData>,
|
||||
) => createQueryKey("createGiftCategory", options);
|
||||
|
||||
export const createGiftCategoryOptions = (
|
||||
options: Options<CreateGiftCategoryData>,
|
||||
) => {
|
||||
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<Options<CreateGiftCategoryData>>,
|
||||
) => {
|
||||
const mutationOptions: UseMutationOptions<
|
||||
CreateGiftCategoryResponse,
|
||||
AxiosError<CreateGiftCategoryError>,
|
||||
Options<CreateGiftCategoryData>
|
||||
> = {
|
||||
mutationFn: async (localOptions) => {
|
||||
const { data } = await createGiftCategory({
|
||||
...options,
|
||||
...localOptions,
|
||||
throwOnError: true,
|
||||
});
|
||||
return data;
|
||||
},
|
||||
};
|
||||
return mutationOptions;
|
||||
};
|
||||
|
||||
export const readGiftCategoriesQueryKey = (
|
||||
options: Options<ReadGiftCategoriesData>,
|
||||
) => createQueryKey("readGiftCategories", options);
|
||||
|
||||
export const readGiftCategoriesOptions = (
|
||||
options: Options<ReadGiftCategoriesData>,
|
||||
) => {
|
||||
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<Options<DeleteGiftCategoryData>>,
|
||||
) => {
|
||||
const mutationOptions: UseMutationOptions<
|
||||
DeleteGiftCategoryResponse,
|
||||
AxiosError<DeleteGiftCategoryError>,
|
||||
Options<DeleteGiftCategoryData>
|
||||
> = {
|
||||
mutationFn: async (localOptions) => {
|
||||
const { data } = await deleteGiftCategory({
|
||||
...options,
|
||||
...localOptions,
|
||||
throwOnError: true,
|
||||
});
|
||||
return data;
|
||||
},
|
||||
};
|
||||
return mutationOptions;
|
||||
};
|
||||
|
||||
export const readGiftCategoryQueryKey = (
|
||||
options: Options<ReadGiftCategoryData>,
|
||||
) => createQueryKey("readGiftCategory", options);
|
||||
|
||||
export const readGiftCategoryOptions = (
|
||||
options: Options<ReadGiftCategoryData>,
|
||||
) => {
|
||||
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<Options<UpdateGiftCategoryData>>,
|
||||
) => {
|
||||
const mutationOptions: UseMutationOptions<
|
||||
UpdateGiftCategoryResponse,
|
||||
AxiosError<UpdateGiftCategoryError>,
|
||||
Options<UpdateGiftCategoryData>
|
||||
> = {
|
||||
mutationFn: async (localOptions) => {
|
||||
const { data } = await updateGiftCategory({
|
||||
...options,
|
||||
...localOptions,
|
||||
throwOnError: true,
|
||||
});
|
||||
return data;
|
||||
},
|
||||
};
|
||||
return mutationOptions;
|
||||
};
|
||||
|
||||
export const associateCategoryWithEventQueryKey = (
|
||||
options: Options<AssociateCategoryWithEventData>,
|
||||
) => createQueryKey("associateCategoryWithEvent", options);
|
||||
|
||||
export const associateCategoryWithEventOptions = (
|
||||
options: Options<AssociateCategoryWithEventData>,
|
||||
) => {
|
||||
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<Options<AssociateCategoryWithEventData>>,
|
||||
) => {
|
||||
const mutationOptions: UseMutationOptions<
|
||||
AssociateCategoryWithEventResponse,
|
||||
AxiosError<AssociateCategoryWithEventError>,
|
||||
Options<AssociateCategoryWithEventData>
|
||||
> = {
|
||||
mutationFn: async (localOptions) => {
|
||||
const { data } = await associateCategoryWithEvent({
|
||||
...options,
|
||||
...localOptions,
|
||||
throwOnError: true,
|
||||
});
|
||||
return data;
|
||||
},
|
||||
};
|
||||
return mutationOptions;
|
||||
};
|
||||
|
||||
export const updateCategoryEventSettingsMutation = (
|
||||
options?: Partial<Options<UpdateCategoryEventSettingsData>>,
|
||||
) => {
|
||||
const mutationOptions: UseMutationOptions<
|
||||
UpdateCategoryEventSettingsResponse,
|
||||
AxiosError<UpdateCategoryEventSettingsError>,
|
||||
Options<UpdateCategoryEventSettingsData>
|
||||
> = {
|
||||
mutationFn: async (localOptions) => {
|
||||
const { data } = await updateCategoryEventSettings({
|
||||
...options,
|
||||
...localOptions,
|
||||
throwOnError: true,
|
||||
});
|
||||
return data;
|
||||
},
|
||||
};
|
||||
return mutationOptions;
|
||||
};
|
||||
|
||||
export const getEventsForCategoryQueryKey = (
|
||||
options: Options<GetEventsForCategoryData>,
|
||||
) => createQueryKey("getEventsForCategory", options);
|
||||
|
||||
export const getEventsForCategoryOptions = (
|
||||
options: Options<GetEventsForCategoryData>,
|
||||
) => {
|
||||
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<Options<ReorderGiftsInCategoryData>>,
|
||||
) => {
|
||||
const mutationOptions: UseMutationOptions<
|
||||
ReorderGiftsInCategoryResponse,
|
||||
AxiosError<ReorderGiftsInCategoryError>,
|
||||
Options<ReorderGiftsInCategoryData>
|
||||
> = {
|
||||
mutationFn: async (localOptions) => {
|
||||
const { data } = await reorderGiftsInCategory({
|
||||
...options,
|
||||
...localOptions,
|
||||
throwOnError: true,
|
||||
});
|
||||
return data;
|
||||
},
|
||||
};
|
||||
return mutationOptions;
|
||||
};
|
||||
|
||||
export const createGiftItemQueryKey = (options: Options<CreateGiftItemData>) =>
|
||||
createQueryKey("createGiftItem", options);
|
||||
|
||||
export const createGiftItemOptions = (options: Options<CreateGiftItemData>) => {
|
||||
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<Options<CreateGiftItemData>>,
|
||||
) => {
|
||||
const mutationOptions: UseMutationOptions<
|
||||
CreateGiftItemResponse,
|
||||
AxiosError<CreateGiftItemError>,
|
||||
Options<CreateGiftItemData>
|
||||
> = {
|
||||
mutationFn: async (localOptions) => {
|
||||
const { data } = await createGiftItem({
|
||||
...options,
|
||||
...localOptions,
|
||||
throwOnError: true,
|
||||
});
|
||||
return data;
|
||||
},
|
||||
};
|
||||
return mutationOptions;
|
||||
};
|
||||
|
||||
export const readGiftItemsQueryKey = (options: Options<ReadGiftItemsData>) =>
|
||||
createQueryKey("readGiftItems", options);
|
||||
|
||||
export const readGiftItemsOptions = (options: Options<ReadGiftItemsData>) => {
|
||||
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<Options<DeleteGiftItemData>>,
|
||||
) => {
|
||||
const mutationOptions: UseMutationOptions<
|
||||
DeleteGiftItemResponse,
|
||||
AxiosError<DeleteGiftItemError>,
|
||||
Options<DeleteGiftItemData>
|
||||
> = {
|
||||
mutationFn: async (localOptions) => {
|
||||
const { data } = await deleteGiftItem({
|
||||
...options,
|
||||
...localOptions,
|
||||
throwOnError: true,
|
||||
});
|
||||
return data;
|
||||
},
|
||||
};
|
||||
return mutationOptions;
|
||||
};
|
||||
|
||||
export const readGiftItemQueryKey = (options: Options<ReadGiftItemData>) =>
|
||||
createQueryKey("readGiftItem", options);
|
||||
|
||||
export const readGiftItemOptions = (options: Options<ReadGiftItemData>) => {
|
||||
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<Options<UpdateGiftItemData>>,
|
||||
) => {
|
||||
const mutationOptions: UseMutationOptions<
|
||||
UpdateGiftItemResponse,
|
||||
AxiosError<UpdateGiftItemError>,
|
||||
Options<UpdateGiftItemData>
|
||||
> = {
|
||||
mutationFn: async (localOptions) => {
|
||||
const { data } = await updateGiftItem({
|
||||
...options,
|
||||
...localOptions,
|
||||
throwOnError: true,
|
||||
});
|
||||
return data;
|
||||
},
|
||||
};
|
||||
return mutationOptions;
|
||||
};
|
||||
|
||||
export const updateGiftItemStatusMutation = (
|
||||
options?: Partial<Options<UpdateGiftItemStatusData>>,
|
||||
) => {
|
||||
const mutationOptions: UseMutationOptions<
|
||||
UpdateGiftItemStatusResponse,
|
||||
AxiosError<UpdateGiftItemStatusError>,
|
||||
Options<UpdateGiftItemStatusData>
|
||||
> = {
|
||||
mutationFn: async (localOptions) => {
|
||||
const { data } = await updateGiftItemStatus({
|
||||
...options,
|
||||
...localOptions,
|
||||
throwOnError: true,
|
||||
});
|
||||
return data;
|
||||
},
|
||||
};
|
||||
return mutationOptions;
|
||||
};
|
||||
|
||||
export const reserveGiftItemQueryKey = (
|
||||
options: Options<ReserveGiftItemData>,
|
||||
) => createQueryKey("reserveGiftItem", options);
|
||||
|
||||
export const reserveGiftItemOptions = (
|
||||
options: Options<ReserveGiftItemData>,
|
||||
) => {
|
||||
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<Options<ReserveGiftItemData>>,
|
||||
) => {
|
||||
const mutationOptions: UseMutationOptions<
|
||||
ReserveGiftItemResponse,
|
||||
AxiosError<ReserveGiftItemError>,
|
||||
Options<ReserveGiftItemData>
|
||||
> = {
|
||||
mutationFn: async (localOptions) => {
|
||||
const { data } = await reserveGiftItem({
|
||||
...options,
|
||||
...localOptions,
|
||||
throwOnError: true,
|
||||
});
|
||||
return data;
|
||||
},
|
||||
};
|
||||
return mutationOptions;
|
||||
};
|
||||
|
||||
export const cancelGiftReservationQueryKey = (
|
||||
options: Options<CancelGiftReservationData>,
|
||||
) => createQueryKey("cancelGiftReservation", options);
|
||||
|
||||
export const cancelGiftReservationOptions = (
|
||||
options: Options<CancelGiftReservationData>,
|
||||
) => {
|
||||
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<Options<CancelGiftReservationData>>,
|
||||
) => {
|
||||
const mutationOptions: UseMutationOptions<
|
||||
CancelGiftReservationResponse,
|
||||
AxiosError<CancelGiftReservationError>,
|
||||
Options<CancelGiftReservationData>
|
||||
> = {
|
||||
mutationFn: async (localOptions) => {
|
||||
const { data } = await cancelGiftReservation({
|
||||
...options,
|
||||
...localOptions,
|
||||
throwOnError: true,
|
||||
});
|
||||
return data;
|
||||
},
|
||||
};
|
||||
return mutationOptions;
|
||||
};
|
||||
|
||||
export const createGiftPurchaseQueryKey = (
|
||||
options: Options<CreateGiftPurchaseData>,
|
||||
) => createQueryKey("createGiftPurchase", options);
|
||||
|
||||
export const createGiftPurchaseOptions = (
|
||||
options: Options<CreateGiftPurchaseData>,
|
||||
) => {
|
||||
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<Options<CreateGiftPurchaseData>>,
|
||||
) => {
|
||||
const mutationOptions: UseMutationOptions<
|
||||
CreateGiftPurchaseResponse,
|
||||
AxiosError<CreateGiftPurchaseError>,
|
||||
Options<CreateGiftPurchaseData>
|
||||
> = {
|
||||
mutationFn: async (localOptions) => {
|
||||
const { data } = await createGiftPurchase({
|
||||
...options,
|
||||
...localOptions,
|
||||
throwOnError: true,
|
||||
});
|
||||
return data;
|
||||
},
|
||||
};
|
||||
return mutationOptions;
|
||||
};
|
||||
|
||||
export const readGiftPurchaseQueryKey = (
|
||||
options: Options<ReadGiftPurchaseData>,
|
||||
) => createQueryKey("readGiftPurchase", options);
|
||||
|
||||
export const readGiftPurchaseOptions = (
|
||||
options: Options<ReadGiftPurchaseData>,
|
||||
) => {
|
||||
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<ReadGiftPurchasesByGiftData>,
|
||||
) => createQueryKey("readGiftPurchasesByGift", options);
|
||||
|
||||
export const readGiftPurchasesByGiftOptions = (
|
||||
options: Options<ReadGiftPurchasesByGiftData>,
|
||||
) => {
|
||||
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<ReadGiftPurchasesByGuestData>,
|
||||
) => createQueryKey("readGiftPurchasesByGuest", options);
|
||||
|
||||
export const readGiftPurchasesByGuestOptions = (
|
||||
options: Options<ReadGiftPurchasesByGuestData>,
|
||||
) => {
|
||||
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<CreateEventData>) =>
|
||||
createQueryKey("createEvent", options);
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -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 = <ThrowOnError extends boolean = false>(
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Create Gift Category
|
||||
* Create new gift category and associate it with an event.
|
||||
*/
|
||||
export const createGiftCategory = <ThrowOnError extends boolean = false>(
|
||||
options: Options<CreateGiftCategoryData, ThrowOnError>,
|
||||
) => {
|
||||
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 = <ThrowOnError extends boolean = false>(
|
||||
options: Options<ReadGiftCategoriesData, ThrowOnError>,
|
||||
) => {
|
||||
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 = <ThrowOnError extends boolean = false>(
|
||||
options: Options<DeleteGiftCategoryData, ThrowOnError>,
|
||||
) => {
|
||||
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 = <ThrowOnError extends boolean = false>(
|
||||
options: Options<ReadGiftCategoryData, ThrowOnError>,
|
||||
) => {
|
||||
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 = <ThrowOnError extends boolean = false>(
|
||||
options: Options<UpdateGiftCategoryData, ThrowOnError>,
|
||||
) => {
|
||||
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<AssociateCategoryWithEventData, ThrowOnError>,
|
||||
) => {
|
||||
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<UpdateCategoryEventSettingsData, ThrowOnError>,
|
||||
) => {
|
||||
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 = <ThrowOnError extends boolean = false>(
|
||||
options: Options<GetEventsForCategoryData, ThrowOnError>,
|
||||
) => {
|
||||
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 = <ThrowOnError extends boolean = false>(
|
||||
options: Options<ReorderGiftsInCategoryData, ThrowOnError>,
|
||||
) => {
|
||||
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 = <ThrowOnError extends boolean = false>(
|
||||
options: Options<CreateGiftItemData, ThrowOnError>,
|
||||
) => {
|
||||
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 = <ThrowOnError extends boolean = false>(
|
||||
options: Options<ReadGiftItemsData, ThrowOnError>,
|
||||
) => {
|
||||
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 = <ThrowOnError extends boolean = false>(
|
||||
options: Options<DeleteGiftItemData, ThrowOnError>,
|
||||
) => {
|
||||
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 = <ThrowOnError extends boolean = false>(
|
||||
options: Options<ReadGiftItemData, ThrowOnError>,
|
||||
) => {
|
||||
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 = <ThrowOnError extends boolean = false>(
|
||||
options: Options<UpdateGiftItemData, ThrowOnError>,
|
||||
) => {
|
||||
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 = <ThrowOnError extends boolean = false>(
|
||||
options: Options<UpdateGiftItemStatusData, ThrowOnError>,
|
||||
) => {
|
||||
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 = <ThrowOnError extends boolean = false>(
|
||||
options: Options<ReserveGiftItemData, ThrowOnError>,
|
||||
) => {
|
||||
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 = <ThrowOnError extends boolean = false>(
|
||||
options: Options<CancelGiftReservationData, ThrowOnError>,
|
||||
) => {
|
||||
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 = <ThrowOnError extends boolean = false>(
|
||||
options: Options<CreateGiftPurchaseData, ThrowOnError>,
|
||||
) => {
|
||||
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 = <ThrowOnError extends boolean = false>(
|
||||
options: Options<ReadGiftPurchaseData, ThrowOnError>,
|
||||
) => {
|
||||
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 = <ThrowOnError extends boolean = false>(
|
||||
options: Options<ReadGiftPurchasesByGiftData, ThrowOnError>,
|
||||
) => {
|
||||
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 = <ThrowOnError extends boolean = false>(
|
||||
options: Options<ReadGiftPurchasesByGuestData, ThrowOnError>,
|
||||
) => {
|
||||
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.
|
||||
|
||||
@@ -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<GiftItem> | 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<GiftCategory>;
|
||||
};
|
||||
|
||||
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<GiftItem>;
|
||||
};
|
||||
|
||||
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<GiftPurchase>;
|
||||
};
|
||||
|
||||
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<GiftPurchase>;
|
||||
};
|
||||
|
||||
export type ReadGiftPurchasesByGuestResponse =
|
||||
ReadGiftPurchasesByGuestResponses[keyof ReadGiftPurchasesByGuestResponses];
|
||||
|
||||
export type CreateEventData = {
|
||||
body: EventCreate;
|
||||
path?: never;
|
||||
|
||||
Reference in New Issue
Block a user