@timardex/cluemart-shared 1.0.83 → 1.0.84

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/dist/{chunk-3LHMZDI4.mjs → chunk-JIL6JFWC.mjs} +1 -7
  2. package/dist/chunk-JIL6JFWC.mjs.map +1 -0
  3. package/dist/{chunk-ZDTBLK7U.mjs → chunk-ORGSRTC4.mjs} +2 -2
  4. package/dist/enums/index.cjs +0 -7
  5. package/dist/enums/index.cjs.map +1 -1
  6. package/dist/enums/index.d.mts +1 -5
  7. package/dist/enums/index.d.ts +1 -5
  8. package/dist/enums/index.mjs +1 -3
  9. package/dist/formFields/index.cjs.map +1 -1
  10. package/dist/formFields/index.mjs +2 -2
  11. package/dist/graphql/index.cjs +28 -45
  12. package/dist/graphql/index.cjs.map +1 -1
  13. package/dist/graphql/index.d.mts +6 -7
  14. package/dist/graphql/index.d.ts +6 -7
  15. package/dist/graphql/index.mjs +28 -45
  16. package/dist/graphql/index.mjs.map +1 -1
  17. package/dist/hooks/index.cjs.map +1 -1
  18. package/dist/hooks/index.mjs +2 -2
  19. package/dist/index.cjs +28 -52
  20. package/dist/index.cjs.map +1 -1
  21. package/dist/index.d.mts +6 -11
  22. package/dist/index.d.ts +6 -11
  23. package/dist/index.mjs +27 -50
  24. package/dist/index.mjs.map +1 -1
  25. package/dist/{notification-Dy46qobo.d.mts → notification-DDVH6HnE.d.mts} +1 -1
  26. package/dist/{notification-Dy46qobo.d.ts → notification-DDVH6HnE.d.ts} +1 -1
  27. package/dist/types/index.cjs.map +1 -1
  28. package/dist/types/index.d.mts +1 -1
  29. package/dist/types/index.d.ts +1 -1
  30. package/dist/types/index.mjs +1 -1
  31. package/dist/types/index.mjs.map +1 -1
  32. package/dist/utils/index.cjs.map +1 -1
  33. package/dist/utils/index.mjs +2 -2
  34. package/package.json +1 -1
  35. package/dist/chunk-3LHMZDI4.mjs.map +0 -1
  36. /package/dist/{chunk-ZDTBLK7U.mjs.map → chunk-ORGSRTC4.mjs.map} +0 -0
package/dist/index.d.mts CHANGED
@@ -38,10 +38,6 @@ declare enum EnumNotification {
38
38
  MARKET_INVITE_STALLHOLDER = "market_invite_stallholder",
39
39
  STALLHOLDER_APPLICATION_TO_MARKET = "stallholder_application_to_market"
40
40
  }
41
- declare enum EnumResourceTypeIcon {
42
- MARKET = "compass",
43
- STALLHOLDER = "store"
44
- }
45
41
  declare enum EnumRegions {
46
42
  Auckland = "Auckland",
47
43
  BayOfPlentyGisborne = "Bay of Plenty & Gisborne",
@@ -552,7 +548,7 @@ declare enum EnumNotificationType {
552
548
  SYSTEM = "system"
553
549
  }
554
550
  type NotificationType = {
555
- id: string;
551
+ _id: string;
556
552
  userId: string;
557
553
  title: string;
558
554
  message: string;
@@ -854,14 +850,13 @@ declare const useMarkAllNotificationsRead: () => {
854
850
  loading: boolean;
855
851
  markAllNotificationsRead: (options?: _apollo_client.MutationFunctionOptions<any, _apollo_client.OperationVariables, _apollo_client.DefaultContext, _apollo_client.ApolloCache<any>> | undefined) => Promise<_apollo_client.FetchResult<any>>;
856
852
  };
857
-
858
- declare const useGetUserNotifications: (userId: string, limit?: number, offset?: number, isRead?: boolean) => {
853
+ declare const useDeleteNotification: () => {
854
+ deleteNotification: (options?: _apollo_client.MutationFunctionOptions<any, _apollo_client.OperationVariables, _apollo_client.DefaultContext, _apollo_client.ApolloCache<any>> | undefined) => Promise<_apollo_client.FetchResult<any>>;
859
855
  error: _apollo_client.ApolloError | undefined;
860
856
  loading: boolean;
861
- notifications: NotificationType[];
862
- refetch: (variables?: Partial<_apollo_client.OperationVariables> | undefined) => Promise<_apollo_client.ApolloQueryResult<any>>;
863
857
  };
864
- declare const useGetUnreadNotifications: (userId: string, limit?: number) => {
858
+
859
+ declare const useGetUserNotifications: (userId: string, limit?: number, offset?: number) => {
865
860
  error: _apollo_client.ApolloError | undefined;
866
861
  loading: boolean;
867
862
  notifications: NotificationType[];
@@ -1271,4 +1266,4 @@ declare const availableRegionOptions: OptionItem[];
1271
1266
  declare const paymentMethodOptions: OptionItem[];
1272
1267
  declare function normalizeUrl(url: string): string;
1273
1268
 
1274
- export { type AdminUpdateResourceType, type BaseResourceType, type BaseResourceTypeFormData, type Category, type ChatInput, type ChatMessageInput, type ChatMessageType, type ChatType, type ContactUsFormData, type CreateBulkNotificationInput, type CreateContactUsFormData, type CreateLoginFormData, type CreateMarketFormData, type CreateMarketInfoFormData, type CreateNotificationInput, type CreateRegisterFormData, type CreateRequestPasswordResetFormData, type CreateResetPasswordFormData, type CreateStallholderFormData, type CreateStallholderInfoFormData, type CreateTestersFormData, type CreateUserFormData, type CreateValidateVerificationTokenFormData, type DateTimeType, type DateTimeWithPriceType, EnumInviteStatus, EnumNotification, EnumNotificationType, EnumOSType, EnumPaymentMethod, EnumRegions, EnumRelationResource, EnumResourceType, EnumResourceTypeIcon, EnumSocialMedia, EnumUserLicence, EnumUserRole, type FormDateField, type FormField, GET_CHAT_MESSAGE, type GeocodeLocation, type ImageObjectType, ImageTypeEnum, type LocationType, type LoginFormData, type MapMultiLocation, type MarkAllNotificationsReadInput, type MarkNotificationReadInput, type MarketFormData, type MarketInfoFormData, type MarketInfoType, type MarketType, type MarketWithConnectionDatesType, type NotificationCount, type NotificationType, type Nullable, type OptionItem, type PaymentInfoType, type PlacePrediction, type PosterInputType, type Region, type RegisterFormData, type RelationDate, type RelationType, type RequestPasswordResetFormData, type Requirement, type ResetPasswordFormData, type ResourceConnectionsType, type ResourceImageType, SAVED_EMAIL_KEY, SAVED_PASSWORD_KEY, SAVED_REFRESH_TOKEN_KEY, SAVED_TOKEN_KEY, type SatllholderWithConnectionDatesType, type SocialMediaType, type StallType, type StallholderAttributes, type StallholderFormData, type StallholderInfoFormData, type StallholderInfoType, type StallholderLocation, type StallholderType, type Subcategory, type SubcategoryItems, type TesterType, type TestersFormData, USER_STORAGE_KEY, type UserFormData, type UserType, type ValidateVerificationTokenFormData, availableCategories, availableCityOptions, availableRegionOptions, availableRegionTypes, availableTagTypes, capitalizeFirstLetter, categoryColors, contactUsFields, darkColors, dateFormat, defaultMarketFormValues, defaultMarketInfoFormValues, defaultRegion, defaultStallholderFormValues, defaultStallholderInfoFormValues, fonts, formatDate, formatTimestamp, getCurrentAndFutureDates, globalDefaultValues, isFutureDatesBeforeThreshold, lightColors, loginFields, mapArrayToOptions, mapBaseResourceTypeToFormData, marketBasicInfoFields, marketEndDateFields, marketInfo, marketInfoPaymentInfo, marketStartDateFields, normalizeUrl, packagingOptions, paymentMethodOptions, producedIngOptions, profileFields, registerFields, removeTypename, requestPasswordResetFields, requirementsOptions, resetPasswordFields, socialMediaFields, sortDatesChronologically, stallTypeOptions, stallholderBasicInfoFields, stallholderElectricity, stallholderEndDateFields, stallholderFullAddress, stallholderGazebo, stallholderLocationDescription, stallholderMultiLocation, stallholderPackaging, stallholderPaymentMethod, stallholderPriceRange, stallholderProducedIn, stallholderStallSize, stallholderStartDateFields, stallholderTable, statusOptions, tagOptions, testersFields, timeFormat, truncateText, useAddParticipantToChat, useAddUserFavouriteResource, useAdminUpdateResourceType, useContactUs, useContactUsForm, useCreateBulkNotifications, useCreateChat, useCreateMarket, useCreateMarketInfo, useCreateNotification, useCreatePoster, useCreatePushToken, useCreateRelation, useCreateStallholder, useCreateStallholderInfo, useCreateTester, useCreateUser, useDeleteChat, useDeleteMarket, useDeleteRelation, useDeleteStallholder, useDeleteTester, useDeleteUser, useGetChat, useGetChatSubscription, useGetMarket, useGetMarketInfo, useGetMarketRelations, useGetMarkets, useGetMarketsByRegion, useGetMarketsNearMe, useGetNotificationCount, useGetRelation, useGetRelationByMarketAndStallholder, useGetResourceConnections, useGetStallholder, useGetStallholderInfo, useGetStallholderRelations, useGetStallholders, useGetStallholdersByRegion, useGetTester, useGetTesters, useGetUnreadNotifications, useGetUser, useGetUserChats, useGetUserFavourites, useGetUserMarkets, useGetUserNotifications, useGetUserStallholder, useGetUsers, useLocationSearch, useLogin, useLoginForm, useLogout, useMarkAllNotificationsRead, useMarkNotificationRead, useMarketForm, useMarketInfoForm, useRefreshToken, useRegister, useRegisterForm, useRemoveParticipantFromChat, useRemoveUserFavouriteResource, useRequestPasswordReset, useRequestPasswordResetForm, useResetPassword, useResetPasswordForm, useSearchMarkets, useSearchStallholders, useSendChatMessage, useStallholderForm, useStallholderInfoForm, useTestersForm, useUpdateMarket, useUpdateMarketInfo, useUpdateRelation, useUpdateStallholder, useUpdateStallholderInfo, useUpdateTester, useUpdateUser, useUserForm, useValidateVerificationToken, useValidateVerificationTokenForm, validateVerificationTokenFields };
1269
+ export { type AdminUpdateResourceType, type BaseResourceType, type BaseResourceTypeFormData, type Category, type ChatInput, type ChatMessageInput, type ChatMessageType, type ChatType, type ContactUsFormData, type CreateBulkNotificationInput, type CreateContactUsFormData, type CreateLoginFormData, type CreateMarketFormData, type CreateMarketInfoFormData, type CreateNotificationInput, type CreateRegisterFormData, type CreateRequestPasswordResetFormData, type CreateResetPasswordFormData, type CreateStallholderFormData, type CreateStallholderInfoFormData, type CreateTestersFormData, type CreateUserFormData, type CreateValidateVerificationTokenFormData, type DateTimeType, type DateTimeWithPriceType, EnumInviteStatus, EnumNotification, EnumNotificationType, EnumOSType, EnumPaymentMethod, EnumRegions, EnumRelationResource, EnumResourceType, EnumSocialMedia, EnumUserLicence, EnumUserRole, type FormDateField, type FormField, GET_CHAT_MESSAGE, type GeocodeLocation, type ImageObjectType, ImageTypeEnum, type LocationType, type LoginFormData, type MapMultiLocation, type MarkAllNotificationsReadInput, type MarkNotificationReadInput, type MarketFormData, type MarketInfoFormData, type MarketInfoType, type MarketType, type MarketWithConnectionDatesType, type NotificationCount, type NotificationType, type Nullable, type OptionItem, type PaymentInfoType, type PlacePrediction, type PosterInputType, type Region, type RegisterFormData, type RelationDate, type RelationType, type RequestPasswordResetFormData, type Requirement, type ResetPasswordFormData, type ResourceConnectionsType, type ResourceImageType, SAVED_EMAIL_KEY, SAVED_PASSWORD_KEY, SAVED_REFRESH_TOKEN_KEY, SAVED_TOKEN_KEY, type SatllholderWithConnectionDatesType, type SocialMediaType, type StallType, type StallholderAttributes, type StallholderFormData, type StallholderInfoFormData, type StallholderInfoType, type StallholderLocation, type StallholderType, type Subcategory, type SubcategoryItems, type TesterType, type TestersFormData, USER_STORAGE_KEY, type UserFormData, type UserType, type ValidateVerificationTokenFormData, availableCategories, availableCityOptions, availableRegionOptions, availableRegionTypes, availableTagTypes, capitalizeFirstLetter, categoryColors, contactUsFields, darkColors, dateFormat, defaultMarketFormValues, defaultMarketInfoFormValues, defaultRegion, defaultStallholderFormValues, defaultStallholderInfoFormValues, fonts, formatDate, formatTimestamp, getCurrentAndFutureDates, globalDefaultValues, isFutureDatesBeforeThreshold, lightColors, loginFields, mapArrayToOptions, mapBaseResourceTypeToFormData, marketBasicInfoFields, marketEndDateFields, marketInfo, marketInfoPaymentInfo, marketStartDateFields, normalizeUrl, packagingOptions, paymentMethodOptions, producedIngOptions, profileFields, registerFields, removeTypename, requestPasswordResetFields, requirementsOptions, resetPasswordFields, socialMediaFields, sortDatesChronologically, stallTypeOptions, stallholderBasicInfoFields, stallholderElectricity, stallholderEndDateFields, stallholderFullAddress, stallholderGazebo, stallholderLocationDescription, stallholderMultiLocation, stallholderPackaging, stallholderPaymentMethod, stallholderPriceRange, stallholderProducedIn, stallholderStallSize, stallholderStartDateFields, stallholderTable, statusOptions, tagOptions, testersFields, timeFormat, truncateText, useAddParticipantToChat, useAddUserFavouriteResource, useAdminUpdateResourceType, useContactUs, useContactUsForm, useCreateBulkNotifications, useCreateChat, useCreateMarket, useCreateMarketInfo, useCreateNotification, useCreatePoster, useCreatePushToken, useCreateRelation, useCreateStallholder, useCreateStallholderInfo, useCreateTester, useCreateUser, useDeleteChat, useDeleteMarket, useDeleteNotification, useDeleteRelation, useDeleteStallholder, useDeleteTester, useDeleteUser, useGetChat, useGetChatSubscription, useGetMarket, useGetMarketInfo, useGetMarketRelations, useGetMarkets, useGetMarketsByRegion, useGetMarketsNearMe, useGetNotificationCount, useGetRelation, useGetRelationByMarketAndStallholder, useGetResourceConnections, useGetStallholder, useGetStallholderInfo, useGetStallholderRelations, useGetStallholders, useGetStallholdersByRegion, useGetTester, useGetTesters, useGetUser, useGetUserChats, useGetUserFavourites, useGetUserMarkets, useGetUserNotifications, useGetUserStallholder, useGetUsers, useLocationSearch, useLogin, useLoginForm, useLogout, useMarkAllNotificationsRead, useMarkNotificationRead, useMarketForm, useMarketInfoForm, useRefreshToken, useRegister, useRegisterForm, useRemoveParticipantFromChat, useRemoveUserFavouriteResource, useRequestPasswordReset, useRequestPasswordResetForm, useResetPassword, useResetPasswordForm, useSearchMarkets, useSearchStallholders, useSendChatMessage, useStallholderForm, useStallholderInfoForm, useTestersForm, useUpdateMarket, useUpdateMarketInfo, useUpdateRelation, useUpdateStallholder, useUpdateStallholderInfo, useUpdateTester, useUpdateUser, useUserForm, useValidateVerificationToken, useValidateVerificationTokenForm, validateVerificationTokenFields };
package/dist/index.d.ts CHANGED
@@ -38,10 +38,6 @@ declare enum EnumNotification {
38
38
  MARKET_INVITE_STALLHOLDER = "market_invite_stallholder",
39
39
  STALLHOLDER_APPLICATION_TO_MARKET = "stallholder_application_to_market"
40
40
  }
41
- declare enum EnumResourceTypeIcon {
42
- MARKET = "compass",
43
- STALLHOLDER = "store"
44
- }
45
41
  declare enum EnumRegions {
46
42
  Auckland = "Auckland",
47
43
  BayOfPlentyGisborne = "Bay of Plenty & Gisborne",
@@ -552,7 +548,7 @@ declare enum EnumNotificationType {
552
548
  SYSTEM = "system"
553
549
  }
554
550
  type NotificationType = {
555
- id: string;
551
+ _id: string;
556
552
  userId: string;
557
553
  title: string;
558
554
  message: string;
@@ -854,14 +850,13 @@ declare const useMarkAllNotificationsRead: () => {
854
850
  loading: boolean;
855
851
  markAllNotificationsRead: (options?: _apollo_client.MutationFunctionOptions<any, _apollo_client.OperationVariables, _apollo_client.DefaultContext, _apollo_client.ApolloCache<any>> | undefined) => Promise<_apollo_client.FetchResult<any>>;
856
852
  };
857
-
858
- declare const useGetUserNotifications: (userId: string, limit?: number, offset?: number, isRead?: boolean) => {
853
+ declare const useDeleteNotification: () => {
854
+ deleteNotification: (options?: _apollo_client.MutationFunctionOptions<any, _apollo_client.OperationVariables, _apollo_client.DefaultContext, _apollo_client.ApolloCache<any>> | undefined) => Promise<_apollo_client.FetchResult<any>>;
859
855
  error: _apollo_client.ApolloError | undefined;
860
856
  loading: boolean;
861
- notifications: NotificationType[];
862
- refetch: (variables?: Partial<_apollo_client.OperationVariables> | undefined) => Promise<_apollo_client.ApolloQueryResult<any>>;
863
857
  };
864
- declare const useGetUnreadNotifications: (userId: string, limit?: number) => {
858
+
859
+ declare const useGetUserNotifications: (userId: string, limit?: number, offset?: number) => {
865
860
  error: _apollo_client.ApolloError | undefined;
866
861
  loading: boolean;
867
862
  notifications: NotificationType[];
@@ -1271,4 +1266,4 @@ declare const availableRegionOptions: OptionItem[];
1271
1266
  declare const paymentMethodOptions: OptionItem[];
1272
1267
  declare function normalizeUrl(url: string): string;
1273
1268
 
1274
- export { type AdminUpdateResourceType, type BaseResourceType, type BaseResourceTypeFormData, type Category, type ChatInput, type ChatMessageInput, type ChatMessageType, type ChatType, type ContactUsFormData, type CreateBulkNotificationInput, type CreateContactUsFormData, type CreateLoginFormData, type CreateMarketFormData, type CreateMarketInfoFormData, type CreateNotificationInput, type CreateRegisterFormData, type CreateRequestPasswordResetFormData, type CreateResetPasswordFormData, type CreateStallholderFormData, type CreateStallholderInfoFormData, type CreateTestersFormData, type CreateUserFormData, type CreateValidateVerificationTokenFormData, type DateTimeType, type DateTimeWithPriceType, EnumInviteStatus, EnumNotification, EnumNotificationType, EnumOSType, EnumPaymentMethod, EnumRegions, EnumRelationResource, EnumResourceType, EnumResourceTypeIcon, EnumSocialMedia, EnumUserLicence, EnumUserRole, type FormDateField, type FormField, GET_CHAT_MESSAGE, type GeocodeLocation, type ImageObjectType, ImageTypeEnum, type LocationType, type LoginFormData, type MapMultiLocation, type MarkAllNotificationsReadInput, type MarkNotificationReadInput, type MarketFormData, type MarketInfoFormData, type MarketInfoType, type MarketType, type MarketWithConnectionDatesType, type NotificationCount, type NotificationType, type Nullable, type OptionItem, type PaymentInfoType, type PlacePrediction, type PosterInputType, type Region, type RegisterFormData, type RelationDate, type RelationType, type RequestPasswordResetFormData, type Requirement, type ResetPasswordFormData, type ResourceConnectionsType, type ResourceImageType, SAVED_EMAIL_KEY, SAVED_PASSWORD_KEY, SAVED_REFRESH_TOKEN_KEY, SAVED_TOKEN_KEY, type SatllholderWithConnectionDatesType, type SocialMediaType, type StallType, type StallholderAttributes, type StallholderFormData, type StallholderInfoFormData, type StallholderInfoType, type StallholderLocation, type StallholderType, type Subcategory, type SubcategoryItems, type TesterType, type TestersFormData, USER_STORAGE_KEY, type UserFormData, type UserType, type ValidateVerificationTokenFormData, availableCategories, availableCityOptions, availableRegionOptions, availableRegionTypes, availableTagTypes, capitalizeFirstLetter, categoryColors, contactUsFields, darkColors, dateFormat, defaultMarketFormValues, defaultMarketInfoFormValues, defaultRegion, defaultStallholderFormValues, defaultStallholderInfoFormValues, fonts, formatDate, formatTimestamp, getCurrentAndFutureDates, globalDefaultValues, isFutureDatesBeforeThreshold, lightColors, loginFields, mapArrayToOptions, mapBaseResourceTypeToFormData, marketBasicInfoFields, marketEndDateFields, marketInfo, marketInfoPaymentInfo, marketStartDateFields, normalizeUrl, packagingOptions, paymentMethodOptions, producedIngOptions, profileFields, registerFields, removeTypename, requestPasswordResetFields, requirementsOptions, resetPasswordFields, socialMediaFields, sortDatesChronologically, stallTypeOptions, stallholderBasicInfoFields, stallholderElectricity, stallholderEndDateFields, stallholderFullAddress, stallholderGazebo, stallholderLocationDescription, stallholderMultiLocation, stallholderPackaging, stallholderPaymentMethod, stallholderPriceRange, stallholderProducedIn, stallholderStallSize, stallholderStartDateFields, stallholderTable, statusOptions, tagOptions, testersFields, timeFormat, truncateText, useAddParticipantToChat, useAddUserFavouriteResource, useAdminUpdateResourceType, useContactUs, useContactUsForm, useCreateBulkNotifications, useCreateChat, useCreateMarket, useCreateMarketInfo, useCreateNotification, useCreatePoster, useCreatePushToken, useCreateRelation, useCreateStallholder, useCreateStallholderInfo, useCreateTester, useCreateUser, useDeleteChat, useDeleteMarket, useDeleteRelation, useDeleteStallholder, useDeleteTester, useDeleteUser, useGetChat, useGetChatSubscription, useGetMarket, useGetMarketInfo, useGetMarketRelations, useGetMarkets, useGetMarketsByRegion, useGetMarketsNearMe, useGetNotificationCount, useGetRelation, useGetRelationByMarketAndStallholder, useGetResourceConnections, useGetStallholder, useGetStallholderInfo, useGetStallholderRelations, useGetStallholders, useGetStallholdersByRegion, useGetTester, useGetTesters, useGetUnreadNotifications, useGetUser, useGetUserChats, useGetUserFavourites, useGetUserMarkets, useGetUserNotifications, useGetUserStallholder, useGetUsers, useLocationSearch, useLogin, useLoginForm, useLogout, useMarkAllNotificationsRead, useMarkNotificationRead, useMarketForm, useMarketInfoForm, useRefreshToken, useRegister, useRegisterForm, useRemoveParticipantFromChat, useRemoveUserFavouriteResource, useRequestPasswordReset, useRequestPasswordResetForm, useResetPassword, useResetPasswordForm, useSearchMarkets, useSearchStallholders, useSendChatMessage, useStallholderForm, useStallholderInfoForm, useTestersForm, useUpdateMarket, useUpdateMarketInfo, useUpdateRelation, useUpdateStallholder, useUpdateStallholderInfo, useUpdateTester, useUpdateUser, useUserForm, useValidateVerificationToken, useValidateVerificationTokenForm, validateVerificationTokenFields };
1269
+ export { type AdminUpdateResourceType, type BaseResourceType, type BaseResourceTypeFormData, type Category, type ChatInput, type ChatMessageInput, type ChatMessageType, type ChatType, type ContactUsFormData, type CreateBulkNotificationInput, type CreateContactUsFormData, type CreateLoginFormData, type CreateMarketFormData, type CreateMarketInfoFormData, type CreateNotificationInput, type CreateRegisterFormData, type CreateRequestPasswordResetFormData, type CreateResetPasswordFormData, type CreateStallholderFormData, type CreateStallholderInfoFormData, type CreateTestersFormData, type CreateUserFormData, type CreateValidateVerificationTokenFormData, type DateTimeType, type DateTimeWithPriceType, EnumInviteStatus, EnumNotification, EnumNotificationType, EnumOSType, EnumPaymentMethod, EnumRegions, EnumRelationResource, EnumResourceType, EnumSocialMedia, EnumUserLicence, EnumUserRole, type FormDateField, type FormField, GET_CHAT_MESSAGE, type GeocodeLocation, type ImageObjectType, ImageTypeEnum, type LocationType, type LoginFormData, type MapMultiLocation, type MarkAllNotificationsReadInput, type MarkNotificationReadInput, type MarketFormData, type MarketInfoFormData, type MarketInfoType, type MarketType, type MarketWithConnectionDatesType, type NotificationCount, type NotificationType, type Nullable, type OptionItem, type PaymentInfoType, type PlacePrediction, type PosterInputType, type Region, type RegisterFormData, type RelationDate, type RelationType, type RequestPasswordResetFormData, type Requirement, type ResetPasswordFormData, type ResourceConnectionsType, type ResourceImageType, SAVED_EMAIL_KEY, SAVED_PASSWORD_KEY, SAVED_REFRESH_TOKEN_KEY, SAVED_TOKEN_KEY, type SatllholderWithConnectionDatesType, type SocialMediaType, type StallType, type StallholderAttributes, type StallholderFormData, type StallholderInfoFormData, type StallholderInfoType, type StallholderLocation, type StallholderType, type Subcategory, type SubcategoryItems, type TesterType, type TestersFormData, USER_STORAGE_KEY, type UserFormData, type UserType, type ValidateVerificationTokenFormData, availableCategories, availableCityOptions, availableRegionOptions, availableRegionTypes, availableTagTypes, capitalizeFirstLetter, categoryColors, contactUsFields, darkColors, dateFormat, defaultMarketFormValues, defaultMarketInfoFormValues, defaultRegion, defaultStallholderFormValues, defaultStallholderInfoFormValues, fonts, formatDate, formatTimestamp, getCurrentAndFutureDates, globalDefaultValues, isFutureDatesBeforeThreshold, lightColors, loginFields, mapArrayToOptions, mapBaseResourceTypeToFormData, marketBasicInfoFields, marketEndDateFields, marketInfo, marketInfoPaymentInfo, marketStartDateFields, normalizeUrl, packagingOptions, paymentMethodOptions, producedIngOptions, profileFields, registerFields, removeTypename, requestPasswordResetFields, requirementsOptions, resetPasswordFields, socialMediaFields, sortDatesChronologically, stallTypeOptions, stallholderBasicInfoFields, stallholderElectricity, stallholderEndDateFields, stallholderFullAddress, stallholderGazebo, stallholderLocationDescription, stallholderMultiLocation, stallholderPackaging, stallholderPaymentMethod, stallholderPriceRange, stallholderProducedIn, stallholderStallSize, stallholderStartDateFields, stallholderTable, statusOptions, tagOptions, testersFields, timeFormat, truncateText, useAddParticipantToChat, useAddUserFavouriteResource, useAdminUpdateResourceType, useContactUs, useContactUsForm, useCreateBulkNotifications, useCreateChat, useCreateMarket, useCreateMarketInfo, useCreateNotification, useCreatePoster, useCreatePushToken, useCreateRelation, useCreateStallholder, useCreateStallholderInfo, useCreateTester, useCreateUser, useDeleteChat, useDeleteMarket, useDeleteNotification, useDeleteRelation, useDeleteStallholder, useDeleteTester, useDeleteUser, useGetChat, useGetChatSubscription, useGetMarket, useGetMarketInfo, useGetMarketRelations, useGetMarkets, useGetMarketsByRegion, useGetMarketsNearMe, useGetNotificationCount, useGetRelation, useGetRelationByMarketAndStallholder, useGetResourceConnections, useGetStallholder, useGetStallholderInfo, useGetStallholderRelations, useGetStallholders, useGetStallholdersByRegion, useGetTester, useGetTesters, useGetUser, useGetUserChats, useGetUserFavourites, useGetUserMarkets, useGetUserNotifications, useGetUserStallholder, useGetUsers, useLocationSearch, useLogin, useLoginForm, useLogout, useMarkAllNotificationsRead, useMarkNotificationRead, useMarketForm, useMarketInfoForm, useRefreshToken, useRegister, useRegisterForm, useRemoveParticipantFromChat, useRemoveUserFavouriteResource, useRequestPasswordReset, useRequestPasswordResetForm, useResetPassword, useResetPasswordForm, useSearchMarkets, useSearchStallholders, useSendChatMessage, useStallholderForm, useStallholderInfoForm, useTestersForm, useUpdateMarket, useUpdateMarketInfo, useUpdateRelation, useUpdateStallholder, useUpdateStallholderInfo, useUpdateTester, useUpdateUser, useUserForm, useValidateVerificationToken, useValidateVerificationTokenForm, validateVerificationTokenFields };
package/dist/index.mjs CHANGED
@@ -42,11 +42,6 @@ var EnumNotification = /* @__PURE__ */ ((EnumNotification2) => {
42
42
  EnumNotification2["STALLHOLDER_APPLICATION_TO_MARKET"] = "stallholder_application_to_market" /* STALLHOLDER_APPLICATION_TO_MARKET */;
43
43
  return EnumNotification2;
44
44
  })(EnumNotification || {});
45
- var EnumResourceTypeIcon = /* @__PURE__ */ ((EnumResourceTypeIcon2) => {
46
- EnumResourceTypeIcon2["MARKET"] = "compass";
47
- EnumResourceTypeIcon2["STALLHOLDER"] = "store";
48
- return EnumResourceTypeIcon2;
49
- })(EnumResourceTypeIcon || {});
50
45
  var EnumRegions = /* @__PURE__ */ ((EnumRegions2) => {
51
46
  EnumRegions2["Auckland"] = "Auckland";
52
47
  EnumRegions2["BayOfPlentyGisborne"] = "Bay of Plenty & Gisborne";
@@ -2769,7 +2764,7 @@ import { gql as gql13 } from "@apollo/client";
2769
2764
  import { gql as gql12 } from "@apollo/client";
2770
2765
  var USER_NOTIFICATION_FRAGMENT = gql12`
2771
2766
  fragment UserNotificationFields on Notification {
2772
- id
2767
+ _id
2773
2768
  userId
2774
2769
  title
2775
2770
  message
@@ -2781,26 +2776,8 @@ var USER_NOTIFICATION_FRAGMENT = gql12`
2781
2776
  }
2782
2777
  `;
2783
2778
  var GET_USER_NOTIFICATIONS = gql12`
2784
- query getUserNotifications(
2785
- $userId: String!
2786
- $limit: Int
2787
- $offset: Int
2788
- $isRead: String
2789
- ) {
2790
- userNotifications(
2791
- userId: $userId
2792
- limit: $limit
2793
- offset: $offset
2794
- isRead: $isRead
2795
- ) {
2796
- ...UserNotificationFields
2797
- }
2798
- }
2799
- ${USER_NOTIFICATION_FRAGMENT}
2800
- `;
2801
- var GET_UNREAD_NOTIFICATIONS = gql12`
2802
- query getUnreadNotifications($userId: String!, $limit: Int) {
2803
- unreadNotifications(userId: $userId, limit: $limit) {
2779
+ query getUserNotifications($userId: String!, $limit: Int, $offset: Int) {
2780
+ userNotifications(userId: $userId, limit: $limit, offset: $offset) {
2804
2781
  ...UserNotificationFields
2805
2782
  }
2806
2783
  }
@@ -2845,6 +2822,11 @@ var MARK_ALL_NOTIFICATIONS_READ = gql13`
2845
2822
  markAllNotificationsRead(input: $input)
2846
2823
  }
2847
2824
  `;
2825
+ var DELETE_NOTIFICATION = gql13`
2826
+ mutation deleteNotification($_id: ID!) {
2827
+ deleteNotification(_id: $_id)
2828
+ }
2829
+ `;
2848
2830
 
2849
2831
  // src/graphql/hooks/notifications/hooksMutation.ts
2850
2832
  var useCreateNotification = () => {
@@ -2859,25 +2841,39 @@ var useCreateBulkNotifications = () => {
2859
2841
  };
2860
2842
  var useMarkNotificationRead = () => {
2861
2843
  const [markNotificationRead, { loading, error }] = useMutation6(
2862
- MARK_NOTIFICATION_READ
2844
+ MARK_NOTIFICATION_READ,
2845
+ {
2846
+ refetchQueries: [{ query: GET_USER_NOTIFICATIONS }]
2847
+ }
2863
2848
  );
2864
2849
  return { error, loading, markNotificationRead };
2865
2850
  };
2866
2851
  var useMarkAllNotificationsRead = () => {
2867
2852
  const [markAllNotificationsRead, { loading, error }] = useMutation6(
2868
- MARK_ALL_NOTIFICATIONS_READ
2853
+ MARK_ALL_NOTIFICATIONS_READ,
2854
+ {
2855
+ refetchQueries: [{ query: GET_USER_NOTIFICATIONS }]
2856
+ }
2869
2857
  );
2870
2858
  return { error, loading, markAllNotificationsRead };
2871
2859
  };
2860
+ var useDeleteNotification = () => {
2861
+ const [deleteNotification, { loading, error }] = useMutation6(
2862
+ DELETE_NOTIFICATION,
2863
+ {
2864
+ refetchQueries: [{ query: GET_USER_NOTIFICATIONS }]
2865
+ }
2866
+ );
2867
+ return { deleteNotification, error, loading };
2868
+ };
2872
2869
 
2873
2870
  // src/graphql/hooks/notifications/hooksQuery.ts
2874
2871
  import { useQuery as useQuery3 } from "@apollo/client";
2875
- var useGetUserNotifications = (userId, limit, offset, isRead) => {
2872
+ var useGetUserNotifications = (userId, limit, offset) => {
2876
2873
  const { data, error, loading, refetch } = useQuery3(GET_USER_NOTIFICATIONS, {
2877
2874
  fetchPolicy: "no-cache",
2878
2875
  skip: !userId,
2879
2876
  variables: {
2880
- isRead,
2881
2877
  limit: limit ?? 50,
2882
2878
  offset: offset ?? 0,
2883
2879
  userId
@@ -2891,24 +2887,6 @@ var useGetUserNotifications = (userId, limit, offset, isRead) => {
2891
2887
  refetch
2892
2888
  };
2893
2889
  };
2894
- var useGetUnreadNotifications = (userId, limit) => {
2895
- const { data, error, loading, refetch } = useQuery3(GET_UNREAD_NOTIFICATIONS, {
2896
- fetchPolicy: "no-cache",
2897
- skip: !userId,
2898
- variables: {
2899
- limit: limit ?? 50,
2900
- offset: 0,
2901
- userId
2902
- }
2903
- });
2904
- const notifications = data?.unreadNotifications;
2905
- return {
2906
- error,
2907
- loading,
2908
- notifications,
2909
- refetch
2910
- };
2911
- };
2912
2890
  var useGetNotificationCount = (userId) => {
2913
2891
  const { data, error, loading, refetch } = useQuery3(GET_NOTIFICATION_COUNT, {
2914
2892
  fetchPolicy: "no-cache",
@@ -5055,7 +5033,6 @@ export {
5055
5033
  EnumRegions,
5056
5034
  EnumRelationResource,
5057
5035
  EnumResourceType,
5058
- EnumResourceTypeIcon,
5059
5036
  EnumSocialMedia,
5060
5037
  EnumUserLicence,
5061
5038
  EnumUserRole,
@@ -5147,6 +5124,7 @@ export {
5147
5124
  useCreateUser,
5148
5125
  useDeleteChat,
5149
5126
  useDeleteMarket,
5127
+ useDeleteNotification,
5150
5128
  useDeleteRelation,
5151
5129
  useDeleteStallholder,
5152
5130
  useDeleteTester,
@@ -5170,7 +5148,6 @@ export {
5170
5148
  useGetStallholdersByRegion,
5171
5149
  useGetTester,
5172
5150
  useGetTesters,
5173
- useGetUnreadNotifications,
5174
5151
  useGetUser,
5175
5152
  useGetUserChats,
5176
5153
  useGetUserFavourites,