@timardex/cluemart-shared 1.2.31 → 1.2.33

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 (38) hide show
  1. package/dist/{ad-Cv1V8lgJ.d.ts → ad-BZylIpez.d.ts} +1 -1
  2. package/dist/{ad-IVwm5MLY.d.mts → ad-CiYcsJB7.d.mts} +1 -1
  3. package/dist/{auth-BCxQp_CF.d.ts → auth-CmaB99NK.d.ts} +1 -1
  4. package/dist/{auth-BczaOu28.d.mts → auth-DDtMJHZw.d.mts} +1 -1
  5. package/dist/{chunk-O6LVIQFK.mjs → chunk-NPHPFWQH.mjs} +3 -6
  6. package/dist/chunk-NPHPFWQH.mjs.map +1 -0
  7. package/dist/formFields/index.d.mts +1 -1
  8. package/dist/formFields/index.d.ts +1 -1
  9. package/dist/{global-Bnr6l_NH.d.ts → global-DVYSZ6LR.d.ts} +4 -4
  10. package/dist/{global-_89-F0iL.d.mts → global-ExJZRDGR.d.mts} +4 -4
  11. package/dist/graphql/index.d.mts +2 -2
  12. package/dist/graphql/index.d.ts +2 -2
  13. package/dist/hooks/index.d.mts +3 -3
  14. package/dist/hooks/index.d.ts +3 -3
  15. package/dist/index.cjs +25 -69
  16. package/dist/index.cjs.map +1 -1
  17. package/dist/index.d.mts +8 -23
  18. package/dist/index.d.ts +8 -23
  19. package/dist/index.mjs +23 -66
  20. package/dist/index.mjs.map +1 -1
  21. package/dist/mongoose/index.cjs +13 -28
  22. package/dist/mongoose/index.cjs.map +1 -1
  23. package/dist/mongoose/index.d.mts +5 -13
  24. package/dist/mongoose/index.d.ts +5 -13
  25. package/dist/mongoose/index.mjs +15 -27
  26. package/dist/mongoose/index.mjs.map +1 -1
  27. package/dist/service/index.cjs +18 -53
  28. package/dist/service/index.cjs.map +1 -1
  29. package/dist/service/index.d.mts +4 -11
  30. package/dist/service/index.d.ts +4 -11
  31. package/dist/service/index.mjs +11 -41
  32. package/dist/service/index.mjs.map +1 -1
  33. package/dist/types/index.d.mts +3 -3
  34. package/dist/types/index.d.ts +3 -3
  35. package/dist/utils/index.d.mts +1 -1
  36. package/dist/utils/index.d.ts +1 -1
  37. package/package.json +1 -1
  38. package/dist/chunk-O6LVIQFK.mjs.map +0 -1
package/dist/index.d.mts CHANGED
@@ -280,11 +280,11 @@ type NotificationCount = {
280
280
  unread: number;
281
281
  };
282
282
  type CreateBulkNotificationInput = {
283
- userIds: string[];
284
- title: string;
283
+ data: NotificationDataType | null;
285
284
  message: string;
285
+ title: string;
286
286
  type: EnumNotificationType;
287
- data: NotificationDataType | null;
287
+ userIds: string[];
288
288
  };
289
289
 
290
290
  interface PosterInputType {
@@ -1751,19 +1751,11 @@ declare const RelationModel: mongoose.Model<SchemaRelationType, {}, {}, {}, mong
1751
1751
  __v: number;
1752
1752
  }, any>;
1753
1753
 
1754
- declare const ResourceActivityModel: mongoose.Model<ResourceActivityType, {}, {}, {}, mongoose.Document<unknown, {}, ResourceActivityType, {}, mongoose.DefaultSchemaOptions> & ResourceActivityType & Required<{
1755
- _id: string;
1756
- }> & {
1757
- __v: number;
1758
- }, mongoose.Schema<ResourceActivityType, mongoose.Model<ResourceActivityType, any, any, any, mongoose.Document<unknown, any, ResourceActivityType, any, {}> & ResourceActivityType & Required<{
1754
+ declare const ResourceActivityModel: mongoose.Model<ResourceActivityType, {}, {}, {}, mongoose.Document<unknown, {}, ResourceActivityType, {}, {}> & ResourceActivityType & Required<{
1759
1755
  _id: string;
1760
1756
  }> & {
1761
1757
  __v: number;
1762
- }, any>, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, ResourceActivityType, mongoose.Document<unknown, {}, mongoose.FlatRecord<ResourceActivityType>, {}, mongoose.ResolveSchemaOptions<mongoose.DefaultSchemaOptions>> & mongoose.FlatRecord<ResourceActivityType> & Required<{
1763
- _id: string;
1764
- }> & {
1765
- __v: number;
1766
- }>>;
1758
+ }, any>;
1767
1759
 
1768
1760
  declare const TesterModel: mongoose.Model<TesterType, {}, {}, {}, mongoose.Document<unknown, {}, TesterType, {}, {}> & TesterType & Required<{
1769
1761
  _id: string;
@@ -1903,20 +1895,13 @@ declare const connectToDatabase: ({ appName, dbName, dbPassword, dbUser, mongodb
1903
1895
  mongodbUri: string;
1904
1896
  }) => Promise<void>;
1905
1897
 
1906
- declare function publishNotificationEvents(userId: ObjectId, context: GraphQLContext): Promise<void>;
1907
1898
  /**
1908
1899
  * Create notifications in the database for multiple users
1909
1900
  * This is typically called when sending push notifications
1910
1901
  */
1911
- declare function createNotifications(payload: SchemaCreateBulkNotificationInput, context: GraphQLContext): Promise<SchemaNotificationType[]>;
1902
+ declare function saveNotificationsInDb(payload: SchemaCreateBulkNotificationInput): Promise<ObjectId[]>;
1912
1903
 
1913
- interface SendPushNotificationOptions {
1914
- data: NotificationDataType;
1915
- message: string;
1916
- title: string;
1917
- userIds: ObjectId[];
1918
- }
1919
- declare function sendPushNotification({ data, message, title, userIds, }: SendPushNotificationOptions): Promise<void>;
1904
+ declare function sendPushNotifications({ data, message, title, userIds, }: SchemaCreateBulkNotificationInput): Promise<void>;
1920
1905
 
1921
1906
  declare const SAVED_PASSWORD_KEY = "savedPassword";
1922
1907
  declare const SAVED_EMAIL_KEY = "savedEmail";
@@ -2020,4 +2005,4 @@ declare const availableRegionOptions: OptionItem[];
2020
2005
  declare const paymentMethodOptions: OptionItem[];
2021
2006
  declare function normalizeUrl(url: string): string;
2022
2007
 
2023
- export { type AdFormData, AdModel, type AdType, type AdminUpdateResourceType, type AuthUser, type BaseResourceType, type BaseResourceTypeFormData, type Category, CategorySchema, type ChatMessageInput, type ChatMessageType, ChatModel, type ChatType, type ContactUsFormData, type CreateAdFormData, type CreateBulkNotificationInput, type CreateContactUsFormData, type CreateEventFormData, type CreateEventInfoFormData, type CreateFormData, type CreateLoginFormData, type CreateRegisterFormData, type CreateRequestPasswordResetFormData, type CreateResetPasswordFormData, type CreateTestersFormData, type CreateUserFormData, type CreateValidateVerificationTokenFormData, type CreateVendorFormData, type CreateVendorInfoFormData, type DateTimeType, type DateTimeWithPriceType, type DeviceInfo, EnumActivity, EnumAdShowOn, EnumAdStatus, EnumAdStyle, EnumAdType, EnumChatType, EnumEventType, EnumFoodFlavor, EnumInviteStatus, EnumNotificationResourceType, EnumNotificationType, EnumOSPlatform, EnumPaymentMethod, EnumPubSubEvents, EnumRegions, EnumRelationResource, EnumResourceType, EnumSocialMedia, EnumUserLicence, EnumUserRole, EnumVendorType, type EventFormData, type EventInfoFormData, EventInfoModel, type EventInfoType, EventModel, type EventType, type FormDateField, type FormField, type GeocodeLocation, type GraphQLContext, type ImageObjectType, ImageTypeEnum, type LocationType, type LoginFormData, type MapMultiLocation, type NotificationCount, type NotificationDataType, NotificationModel, type NotificationType, type Nullable, type ObjectId, type OptionItem, type OwnerType, ParticipantSchema, type ParticipantType, type PartnerType, type PaymentInfoType, type PlacePrediction, type PosterInputType, type PosterUsageType, PushTokenModel, type Region, type RegisterFormData, type RelationDate, RelationModel, type RelationType, RelationTypeSchema, type RequestPasswordResetFormData, type Requirement, type ResetPasswordFormData, type ResourceActivityEntry, type ResourceActivityInputType, ResourceActivityModel, type ResourceActivityType, type ResourceConnectionsType, type ResourceContactDetailsType, type ResourceImageType, ResourceImageTypeSchema, SAVED_EMAIL_KEY, SAVED_PASSWORD_KEY, SAVED_REFRESH_TOKEN_KEY, SAVED_TOKEN_KEY, type SchemaChatMessageType, type SchemaChatType, type SchemaCreateBulkNotificationInput, type SchemaEventInfoType, type SchemaEventType, type SchemaNotificationType, type SchemaOwnerType, type SchemaParticipantType, type SchemaPushTokenType, type SchemaRelationType, type SchemaUserActivityEvent, type SchemaUserType, type SchemaVendorInfoType, type SchemaVendorType, type SocialMediaType, SocialMediaTypeSchema, type StallType, StallTypeSchema, type Subcategory, type SubcategoryItems, type SubscriptionPayload, type TermsAgreement, TesterModel, type TesterType, type TestersFormData, USER_STORAGE_KEY, type UserActivity, type UserActivityEvent, type UserFormData, UserModel, type UserType, type ValidateVerificationTokenFormData, type VendorAttributes, type VendorFormData, type VendorInfoFormData, VendorInfoModel, type VendorInfoType, type VendorLocation, type VendorMenuType, VendorModel, type VendorType, VerificationTokenModel, type VerificationTokenType, availableCategories, availableCityOptions, availableRegionOptions, availableRegionTypes, availableTagTypes, baseResourceFields, capitalizeFirstLetter, categoryColors, companyContactFields, connectToDatabase, contactUsFields, createNotifications, darkColors, dateFormat, defaultEventFormValues, defaultEventInfoFormValues, defaultRegion, defaultVendorFormValues, defaultVendorInfoFormValues, emailField, eventBasicInfoFields, eventEndDateFields, eventInfo, eventInfoPaymentInfo, eventStartDateFields, fonts, foodFlavourOptions, formatDate, formatTimestamp, getCurrentAndFutureDates, globalDefaultValues, isFutureDatesBeforeThreshold, lightColors, loginFields, mapArrayToOptions, mapBaseResourceTypeToFormData, normalizeUrl, packagingOptions, partnersSchema, paymentMethodOptions, producedIngOptions, productLabelGroups, profileFields, publishNotificationEvents, registerFields, relationDatesSchema, removeTypename, requestPasswordResetFields, requirementsOptions, resetPasswordFields, sendPushNotification, socialMediaFields, sortDatesChronologically, stallTypeOptions, statusOptions, tagOptions, termsAgreementSchema, testersFields, timeFormat, truncateText, useAdForm, useAddParticipantToChat, useAddUserFavouriteResource, useAddUserGoingResource, useAddUserInterestResource, useAddUserPresentResource, useAdminUpdateResourceType, useContactUs, useContactUsForm, useCreateAd, useCreateBulkNotifications, useCreateEvent, useCreateEventInfo, useCreatePoster, useCreatePushToken, useCreateRelation, useCreateResourceActivity, useCreateTester, useCreateUser, useCreateVendor, useCreateVendorInfo, useDeleteAd, useDeleteAllNotifications, useDeleteChat, useDeleteEvent, useDeleteNotification, useDeleteRelation, useDeleteTester, useDeleteUser, useDeleteVendor, useEventForm, useEventInfoForm, useGetAd, useGetAds, useGetAdsByRegion, useGetChat, useGetChatSubscription, useGetEvent, useGetEventInfo, useGetEventRelations, useGetEvents, useGetEventsByRegion, useGetEventsNearMe, useGetNotificationCount, useGetNotificationCountSubscription, useGetRelation, useGetRelationByEventAndVendor, useGetResourceActivities, useGetResourceConnections, useGetTester, useGetTesters, useGetUser, useGetUserActivities, useGetUserChats, useGetUserEvents, useGetUserNotifications, useGetUserNotificationsSubscription, useGetUserVendors, useGetUsers, useGetVendor, useGetVendorInfo, useGetVendorRelations, useGetVendors, useGetVendorsByRegion, useLocationSearch, useLogin, useLoginForm, useLogout, useMarkAllNotificationsRead, useMarkNotificationRead, useRefreshToken, useRegister, useRegisterForm, useRemoveParticipantFromChat, useRemoveUserFavouriteResource, useRemoveUserGoingResource, useRemoveUserInterestResource, useRemoveUserPresentResource, useRequestPasswordReset, useRequestPasswordResetForm, useResetPassword, useResetPasswordForm, useSearchEvents, useSearchVendors, useSelectPackage, useSendChatMessage, useTestersForm, useUpdateAd, useUpdateEvent, useUpdateEventInfo, useUpdateRelation, useUpdateTester, useUpdateUser, useUpdateVendor, useUpdateVendorInfo, useUserForm, useValidateVerificationToken, useValidateVerificationTokenForm, useVendorForm, useVendorInfoForm, validateVerificationTokenFields, vendorAvailability, vendorBasicInfoFields, vendorCompliance, vendorElectricity, vendorEndDateFields, vendorFoodFlavour, vendorFullAddress, vendorGazebo, vendorLocationDescription, vendorMenuFields, vendorMultiLocation, vendorPackaging, vendorPriceRange, vendorProducedIn, vendorStallSize, vendorStartDateFields, vendorTable };
2008
+ export { type AdFormData, AdModel, type AdType, type AdminUpdateResourceType, type AuthUser, type BaseResourceType, type BaseResourceTypeFormData, type Category, CategorySchema, type ChatMessageInput, type ChatMessageType, ChatModel, type ChatType, type ContactUsFormData, type CreateAdFormData, type CreateBulkNotificationInput, type CreateContactUsFormData, type CreateEventFormData, type CreateEventInfoFormData, type CreateFormData, type CreateLoginFormData, type CreateRegisterFormData, type CreateRequestPasswordResetFormData, type CreateResetPasswordFormData, type CreateTestersFormData, type CreateUserFormData, type CreateValidateVerificationTokenFormData, type CreateVendorFormData, type CreateVendorInfoFormData, type DateTimeType, type DateTimeWithPriceType, type DeviceInfo, EnumActivity, EnumAdShowOn, EnumAdStatus, EnumAdStyle, EnumAdType, EnumChatType, EnumEventType, EnumFoodFlavor, EnumInviteStatus, EnumNotificationResourceType, EnumNotificationType, EnumOSPlatform, EnumPaymentMethod, EnumPubSubEvents, EnumRegions, EnumRelationResource, EnumResourceType, EnumSocialMedia, EnumUserLicence, EnumUserRole, EnumVendorType, type EventFormData, type EventInfoFormData, EventInfoModel, type EventInfoType, EventModel, type EventType, type FormDateField, type FormField, type GeocodeLocation, type GraphQLContext, type ImageObjectType, ImageTypeEnum, type LocationType, type LoginFormData, type MapMultiLocation, type NotificationCount, type NotificationDataType, NotificationModel, type NotificationType, type Nullable, type ObjectId, type OptionItem, type OwnerType, ParticipantSchema, type ParticipantType, type PartnerType, type PaymentInfoType, type PlacePrediction, type PosterInputType, type PosterUsageType, PushTokenModel, type Region, type RegisterFormData, type RelationDate, RelationModel, type RelationType, RelationTypeSchema, type RequestPasswordResetFormData, type Requirement, type ResetPasswordFormData, type ResourceActivityEntry, type ResourceActivityInputType, ResourceActivityModel, type ResourceActivityType, type ResourceConnectionsType, type ResourceContactDetailsType, type ResourceImageType, ResourceImageTypeSchema, SAVED_EMAIL_KEY, SAVED_PASSWORD_KEY, SAVED_REFRESH_TOKEN_KEY, SAVED_TOKEN_KEY, type SchemaChatMessageType, type SchemaChatType, type SchemaCreateBulkNotificationInput, type SchemaEventInfoType, type SchemaEventType, type SchemaNotificationType, type SchemaOwnerType, type SchemaParticipantType, type SchemaPushTokenType, type SchemaRelationType, type SchemaUserActivityEvent, type SchemaUserType, type SchemaVendorInfoType, type SchemaVendorType, type SocialMediaType, SocialMediaTypeSchema, type StallType, StallTypeSchema, type Subcategory, type SubcategoryItems, type SubscriptionPayload, type TermsAgreement, TesterModel, type TesterType, type TestersFormData, USER_STORAGE_KEY, type UserActivity, type UserActivityEvent, type UserFormData, UserModel, type UserType, type ValidateVerificationTokenFormData, type VendorAttributes, type VendorFormData, type VendorInfoFormData, VendorInfoModel, type VendorInfoType, type VendorLocation, type VendorMenuType, VendorModel, type VendorType, VerificationTokenModel, type VerificationTokenType, availableCategories, availableCityOptions, availableRegionOptions, availableRegionTypes, availableTagTypes, baseResourceFields, capitalizeFirstLetter, categoryColors, companyContactFields, connectToDatabase, contactUsFields, darkColors, dateFormat, defaultEventFormValues, defaultEventInfoFormValues, defaultRegion, defaultVendorFormValues, defaultVendorInfoFormValues, emailField, eventBasicInfoFields, eventEndDateFields, eventInfo, eventInfoPaymentInfo, eventStartDateFields, fonts, foodFlavourOptions, formatDate, formatTimestamp, getCurrentAndFutureDates, globalDefaultValues, isFutureDatesBeforeThreshold, lightColors, loginFields, mapArrayToOptions, mapBaseResourceTypeToFormData, normalizeUrl, packagingOptions, partnersSchema, paymentMethodOptions, producedIngOptions, productLabelGroups, profileFields, registerFields, relationDatesSchema, removeTypename, requestPasswordResetFields, requirementsOptions, resetPasswordFields, saveNotificationsInDb, sendPushNotifications, socialMediaFields, sortDatesChronologically, stallTypeOptions, statusOptions, tagOptions, termsAgreementSchema, testersFields, timeFormat, truncateText, useAdForm, useAddParticipantToChat, useAddUserFavouriteResource, useAddUserGoingResource, useAddUserInterestResource, useAddUserPresentResource, useAdminUpdateResourceType, useContactUs, useContactUsForm, useCreateAd, useCreateBulkNotifications, useCreateEvent, useCreateEventInfo, useCreatePoster, useCreatePushToken, useCreateRelation, useCreateResourceActivity, useCreateTester, useCreateUser, useCreateVendor, useCreateVendorInfo, useDeleteAd, useDeleteAllNotifications, useDeleteChat, useDeleteEvent, useDeleteNotification, useDeleteRelation, useDeleteTester, useDeleteUser, useDeleteVendor, useEventForm, useEventInfoForm, useGetAd, useGetAds, useGetAdsByRegion, useGetChat, useGetChatSubscription, useGetEvent, useGetEventInfo, useGetEventRelations, useGetEvents, useGetEventsByRegion, useGetEventsNearMe, useGetNotificationCount, useGetNotificationCountSubscription, useGetRelation, useGetRelationByEventAndVendor, useGetResourceActivities, useGetResourceConnections, useGetTester, useGetTesters, useGetUser, useGetUserActivities, useGetUserChats, useGetUserEvents, useGetUserNotifications, useGetUserNotificationsSubscription, useGetUserVendors, useGetUsers, useGetVendor, useGetVendorInfo, useGetVendorRelations, useGetVendors, useGetVendorsByRegion, useLocationSearch, useLogin, useLoginForm, useLogout, useMarkAllNotificationsRead, useMarkNotificationRead, useRefreshToken, useRegister, useRegisterForm, useRemoveParticipantFromChat, useRemoveUserFavouriteResource, useRemoveUserGoingResource, useRemoveUserInterestResource, useRemoveUserPresentResource, useRequestPasswordReset, useRequestPasswordResetForm, useResetPassword, useResetPasswordForm, useSearchEvents, useSearchVendors, useSelectPackage, useSendChatMessage, useTestersForm, useUpdateAd, useUpdateEvent, useUpdateEventInfo, useUpdateRelation, useUpdateTester, useUpdateUser, useUpdateVendor, useUpdateVendorInfo, useUserForm, useValidateVerificationToken, useValidateVerificationTokenForm, useVendorForm, useVendorInfoForm, validateVerificationTokenFields, vendorAvailability, vendorBasicInfoFields, vendorCompliance, vendorElectricity, vendorEndDateFields, vendorFoodFlavour, vendorFullAddress, vendorGazebo, vendorLocationDescription, vendorMenuFields, vendorMultiLocation, vendorPackaging, vendorPriceRange, vendorProducedIn, vendorStallSize, vendorStartDateFields, vendorTable };
package/dist/index.d.ts CHANGED
@@ -280,11 +280,11 @@ type NotificationCount = {
280
280
  unread: number;
281
281
  };
282
282
  type CreateBulkNotificationInput = {
283
- userIds: string[];
284
- title: string;
283
+ data: NotificationDataType | null;
285
284
  message: string;
285
+ title: string;
286
286
  type: EnumNotificationType;
287
- data: NotificationDataType | null;
287
+ userIds: string[];
288
288
  };
289
289
 
290
290
  interface PosterInputType {
@@ -1751,19 +1751,11 @@ declare const RelationModel: mongoose.Model<SchemaRelationType, {}, {}, {}, mong
1751
1751
  __v: number;
1752
1752
  }, any>;
1753
1753
 
1754
- declare const ResourceActivityModel: mongoose.Model<ResourceActivityType, {}, {}, {}, mongoose.Document<unknown, {}, ResourceActivityType, {}, mongoose.DefaultSchemaOptions> & ResourceActivityType & Required<{
1755
- _id: string;
1756
- }> & {
1757
- __v: number;
1758
- }, mongoose.Schema<ResourceActivityType, mongoose.Model<ResourceActivityType, any, any, any, mongoose.Document<unknown, any, ResourceActivityType, any, {}> & ResourceActivityType & Required<{
1754
+ declare const ResourceActivityModel: mongoose.Model<ResourceActivityType, {}, {}, {}, mongoose.Document<unknown, {}, ResourceActivityType, {}, {}> & ResourceActivityType & Required<{
1759
1755
  _id: string;
1760
1756
  }> & {
1761
1757
  __v: number;
1762
- }, any>, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, ResourceActivityType, mongoose.Document<unknown, {}, mongoose.FlatRecord<ResourceActivityType>, {}, mongoose.ResolveSchemaOptions<mongoose.DefaultSchemaOptions>> & mongoose.FlatRecord<ResourceActivityType> & Required<{
1763
- _id: string;
1764
- }> & {
1765
- __v: number;
1766
- }>>;
1758
+ }, any>;
1767
1759
 
1768
1760
  declare const TesterModel: mongoose.Model<TesterType, {}, {}, {}, mongoose.Document<unknown, {}, TesterType, {}, {}> & TesterType & Required<{
1769
1761
  _id: string;
@@ -1903,20 +1895,13 @@ declare const connectToDatabase: ({ appName, dbName, dbPassword, dbUser, mongodb
1903
1895
  mongodbUri: string;
1904
1896
  }) => Promise<void>;
1905
1897
 
1906
- declare function publishNotificationEvents(userId: ObjectId, context: GraphQLContext): Promise<void>;
1907
1898
  /**
1908
1899
  * Create notifications in the database for multiple users
1909
1900
  * This is typically called when sending push notifications
1910
1901
  */
1911
- declare function createNotifications(payload: SchemaCreateBulkNotificationInput, context: GraphQLContext): Promise<SchemaNotificationType[]>;
1902
+ declare function saveNotificationsInDb(payload: SchemaCreateBulkNotificationInput): Promise<ObjectId[]>;
1912
1903
 
1913
- interface SendPushNotificationOptions {
1914
- data: NotificationDataType;
1915
- message: string;
1916
- title: string;
1917
- userIds: ObjectId[];
1918
- }
1919
- declare function sendPushNotification({ data, message, title, userIds, }: SendPushNotificationOptions): Promise<void>;
1904
+ declare function sendPushNotifications({ data, message, title, userIds, }: SchemaCreateBulkNotificationInput): Promise<void>;
1920
1905
 
1921
1906
  declare const SAVED_PASSWORD_KEY = "savedPassword";
1922
1907
  declare const SAVED_EMAIL_KEY = "savedEmail";
@@ -2020,4 +2005,4 @@ declare const availableRegionOptions: OptionItem[];
2020
2005
  declare const paymentMethodOptions: OptionItem[];
2021
2006
  declare function normalizeUrl(url: string): string;
2022
2007
 
2023
- export { type AdFormData, AdModel, type AdType, type AdminUpdateResourceType, type AuthUser, type BaseResourceType, type BaseResourceTypeFormData, type Category, CategorySchema, type ChatMessageInput, type ChatMessageType, ChatModel, type ChatType, type ContactUsFormData, type CreateAdFormData, type CreateBulkNotificationInput, type CreateContactUsFormData, type CreateEventFormData, type CreateEventInfoFormData, type CreateFormData, type CreateLoginFormData, type CreateRegisterFormData, type CreateRequestPasswordResetFormData, type CreateResetPasswordFormData, type CreateTestersFormData, type CreateUserFormData, type CreateValidateVerificationTokenFormData, type CreateVendorFormData, type CreateVendorInfoFormData, type DateTimeType, type DateTimeWithPriceType, type DeviceInfo, EnumActivity, EnumAdShowOn, EnumAdStatus, EnumAdStyle, EnumAdType, EnumChatType, EnumEventType, EnumFoodFlavor, EnumInviteStatus, EnumNotificationResourceType, EnumNotificationType, EnumOSPlatform, EnumPaymentMethod, EnumPubSubEvents, EnumRegions, EnumRelationResource, EnumResourceType, EnumSocialMedia, EnumUserLicence, EnumUserRole, EnumVendorType, type EventFormData, type EventInfoFormData, EventInfoModel, type EventInfoType, EventModel, type EventType, type FormDateField, type FormField, type GeocodeLocation, type GraphQLContext, type ImageObjectType, ImageTypeEnum, type LocationType, type LoginFormData, type MapMultiLocation, type NotificationCount, type NotificationDataType, NotificationModel, type NotificationType, type Nullable, type ObjectId, type OptionItem, type OwnerType, ParticipantSchema, type ParticipantType, type PartnerType, type PaymentInfoType, type PlacePrediction, type PosterInputType, type PosterUsageType, PushTokenModel, type Region, type RegisterFormData, type RelationDate, RelationModel, type RelationType, RelationTypeSchema, type RequestPasswordResetFormData, type Requirement, type ResetPasswordFormData, type ResourceActivityEntry, type ResourceActivityInputType, ResourceActivityModel, type ResourceActivityType, type ResourceConnectionsType, type ResourceContactDetailsType, type ResourceImageType, ResourceImageTypeSchema, SAVED_EMAIL_KEY, SAVED_PASSWORD_KEY, SAVED_REFRESH_TOKEN_KEY, SAVED_TOKEN_KEY, type SchemaChatMessageType, type SchemaChatType, type SchemaCreateBulkNotificationInput, type SchemaEventInfoType, type SchemaEventType, type SchemaNotificationType, type SchemaOwnerType, type SchemaParticipantType, type SchemaPushTokenType, type SchemaRelationType, type SchemaUserActivityEvent, type SchemaUserType, type SchemaVendorInfoType, type SchemaVendorType, type SocialMediaType, SocialMediaTypeSchema, type StallType, StallTypeSchema, type Subcategory, type SubcategoryItems, type SubscriptionPayload, type TermsAgreement, TesterModel, type TesterType, type TestersFormData, USER_STORAGE_KEY, type UserActivity, type UserActivityEvent, type UserFormData, UserModel, type UserType, type ValidateVerificationTokenFormData, type VendorAttributes, type VendorFormData, type VendorInfoFormData, VendorInfoModel, type VendorInfoType, type VendorLocation, type VendorMenuType, VendorModel, type VendorType, VerificationTokenModel, type VerificationTokenType, availableCategories, availableCityOptions, availableRegionOptions, availableRegionTypes, availableTagTypes, baseResourceFields, capitalizeFirstLetter, categoryColors, companyContactFields, connectToDatabase, contactUsFields, createNotifications, darkColors, dateFormat, defaultEventFormValues, defaultEventInfoFormValues, defaultRegion, defaultVendorFormValues, defaultVendorInfoFormValues, emailField, eventBasicInfoFields, eventEndDateFields, eventInfo, eventInfoPaymentInfo, eventStartDateFields, fonts, foodFlavourOptions, formatDate, formatTimestamp, getCurrentAndFutureDates, globalDefaultValues, isFutureDatesBeforeThreshold, lightColors, loginFields, mapArrayToOptions, mapBaseResourceTypeToFormData, normalizeUrl, packagingOptions, partnersSchema, paymentMethodOptions, producedIngOptions, productLabelGroups, profileFields, publishNotificationEvents, registerFields, relationDatesSchema, removeTypename, requestPasswordResetFields, requirementsOptions, resetPasswordFields, sendPushNotification, socialMediaFields, sortDatesChronologically, stallTypeOptions, statusOptions, tagOptions, termsAgreementSchema, testersFields, timeFormat, truncateText, useAdForm, useAddParticipantToChat, useAddUserFavouriteResource, useAddUserGoingResource, useAddUserInterestResource, useAddUserPresentResource, useAdminUpdateResourceType, useContactUs, useContactUsForm, useCreateAd, useCreateBulkNotifications, useCreateEvent, useCreateEventInfo, useCreatePoster, useCreatePushToken, useCreateRelation, useCreateResourceActivity, useCreateTester, useCreateUser, useCreateVendor, useCreateVendorInfo, useDeleteAd, useDeleteAllNotifications, useDeleteChat, useDeleteEvent, useDeleteNotification, useDeleteRelation, useDeleteTester, useDeleteUser, useDeleteVendor, useEventForm, useEventInfoForm, useGetAd, useGetAds, useGetAdsByRegion, useGetChat, useGetChatSubscription, useGetEvent, useGetEventInfo, useGetEventRelations, useGetEvents, useGetEventsByRegion, useGetEventsNearMe, useGetNotificationCount, useGetNotificationCountSubscription, useGetRelation, useGetRelationByEventAndVendor, useGetResourceActivities, useGetResourceConnections, useGetTester, useGetTesters, useGetUser, useGetUserActivities, useGetUserChats, useGetUserEvents, useGetUserNotifications, useGetUserNotificationsSubscription, useGetUserVendors, useGetUsers, useGetVendor, useGetVendorInfo, useGetVendorRelations, useGetVendors, useGetVendorsByRegion, useLocationSearch, useLogin, useLoginForm, useLogout, useMarkAllNotificationsRead, useMarkNotificationRead, useRefreshToken, useRegister, useRegisterForm, useRemoveParticipantFromChat, useRemoveUserFavouriteResource, useRemoveUserGoingResource, useRemoveUserInterestResource, useRemoveUserPresentResource, useRequestPasswordReset, useRequestPasswordResetForm, useResetPassword, useResetPasswordForm, useSearchEvents, useSearchVendors, useSelectPackage, useSendChatMessage, useTestersForm, useUpdateAd, useUpdateEvent, useUpdateEventInfo, useUpdateRelation, useUpdateTester, useUpdateUser, useUpdateVendor, useUpdateVendorInfo, useUserForm, useValidateVerificationToken, useValidateVerificationTokenForm, useVendorForm, useVendorInfoForm, validateVerificationTokenFields, vendorAvailability, vendorBasicInfoFields, vendorCompliance, vendorElectricity, vendorEndDateFields, vendorFoodFlavour, vendorFullAddress, vendorGazebo, vendorLocationDescription, vendorMenuFields, vendorMultiLocation, vendorPackaging, vendorPriceRange, vendorProducedIn, vendorStallSize, vendorStartDateFields, vendorTable };
2008
+ export { type AdFormData, AdModel, type AdType, type AdminUpdateResourceType, type AuthUser, type BaseResourceType, type BaseResourceTypeFormData, type Category, CategorySchema, type ChatMessageInput, type ChatMessageType, ChatModel, type ChatType, type ContactUsFormData, type CreateAdFormData, type CreateBulkNotificationInput, type CreateContactUsFormData, type CreateEventFormData, type CreateEventInfoFormData, type CreateFormData, type CreateLoginFormData, type CreateRegisterFormData, type CreateRequestPasswordResetFormData, type CreateResetPasswordFormData, type CreateTestersFormData, type CreateUserFormData, type CreateValidateVerificationTokenFormData, type CreateVendorFormData, type CreateVendorInfoFormData, type DateTimeType, type DateTimeWithPriceType, type DeviceInfo, EnumActivity, EnumAdShowOn, EnumAdStatus, EnumAdStyle, EnumAdType, EnumChatType, EnumEventType, EnumFoodFlavor, EnumInviteStatus, EnumNotificationResourceType, EnumNotificationType, EnumOSPlatform, EnumPaymentMethod, EnumPubSubEvents, EnumRegions, EnumRelationResource, EnumResourceType, EnumSocialMedia, EnumUserLicence, EnumUserRole, EnumVendorType, type EventFormData, type EventInfoFormData, EventInfoModel, type EventInfoType, EventModel, type EventType, type FormDateField, type FormField, type GeocodeLocation, type GraphQLContext, type ImageObjectType, ImageTypeEnum, type LocationType, type LoginFormData, type MapMultiLocation, type NotificationCount, type NotificationDataType, NotificationModel, type NotificationType, type Nullable, type ObjectId, type OptionItem, type OwnerType, ParticipantSchema, type ParticipantType, type PartnerType, type PaymentInfoType, type PlacePrediction, type PosterInputType, type PosterUsageType, PushTokenModel, type Region, type RegisterFormData, type RelationDate, RelationModel, type RelationType, RelationTypeSchema, type RequestPasswordResetFormData, type Requirement, type ResetPasswordFormData, type ResourceActivityEntry, type ResourceActivityInputType, ResourceActivityModel, type ResourceActivityType, type ResourceConnectionsType, type ResourceContactDetailsType, type ResourceImageType, ResourceImageTypeSchema, SAVED_EMAIL_KEY, SAVED_PASSWORD_KEY, SAVED_REFRESH_TOKEN_KEY, SAVED_TOKEN_KEY, type SchemaChatMessageType, type SchemaChatType, type SchemaCreateBulkNotificationInput, type SchemaEventInfoType, type SchemaEventType, type SchemaNotificationType, type SchemaOwnerType, type SchemaParticipantType, type SchemaPushTokenType, type SchemaRelationType, type SchemaUserActivityEvent, type SchemaUserType, type SchemaVendorInfoType, type SchemaVendorType, type SocialMediaType, SocialMediaTypeSchema, type StallType, StallTypeSchema, type Subcategory, type SubcategoryItems, type SubscriptionPayload, type TermsAgreement, TesterModel, type TesterType, type TestersFormData, USER_STORAGE_KEY, type UserActivity, type UserActivityEvent, type UserFormData, UserModel, type UserType, type ValidateVerificationTokenFormData, type VendorAttributes, type VendorFormData, type VendorInfoFormData, VendorInfoModel, type VendorInfoType, type VendorLocation, type VendorMenuType, VendorModel, type VendorType, VerificationTokenModel, type VerificationTokenType, availableCategories, availableCityOptions, availableRegionOptions, availableRegionTypes, availableTagTypes, baseResourceFields, capitalizeFirstLetter, categoryColors, companyContactFields, connectToDatabase, contactUsFields, darkColors, dateFormat, defaultEventFormValues, defaultEventInfoFormValues, defaultRegion, defaultVendorFormValues, defaultVendorInfoFormValues, emailField, eventBasicInfoFields, eventEndDateFields, eventInfo, eventInfoPaymentInfo, eventStartDateFields, fonts, foodFlavourOptions, formatDate, formatTimestamp, getCurrentAndFutureDates, globalDefaultValues, isFutureDatesBeforeThreshold, lightColors, loginFields, mapArrayToOptions, mapBaseResourceTypeToFormData, normalizeUrl, packagingOptions, partnersSchema, paymentMethodOptions, producedIngOptions, productLabelGroups, profileFields, registerFields, relationDatesSchema, removeTypename, requestPasswordResetFields, requirementsOptions, resetPasswordFields, saveNotificationsInDb, sendPushNotifications, socialMediaFields, sortDatesChronologically, stallTypeOptions, statusOptions, tagOptions, termsAgreementSchema, testersFields, timeFormat, truncateText, useAdForm, useAddParticipantToChat, useAddUserFavouriteResource, useAddUserGoingResource, useAddUserInterestResource, useAddUserPresentResource, useAdminUpdateResourceType, useContactUs, useContactUsForm, useCreateAd, useCreateBulkNotifications, useCreateEvent, useCreateEventInfo, useCreatePoster, useCreatePushToken, useCreateRelation, useCreateResourceActivity, useCreateTester, useCreateUser, useCreateVendor, useCreateVendorInfo, useDeleteAd, useDeleteAllNotifications, useDeleteChat, useDeleteEvent, useDeleteNotification, useDeleteRelation, useDeleteTester, useDeleteUser, useDeleteVendor, useEventForm, useEventInfoForm, useGetAd, useGetAds, useGetAdsByRegion, useGetChat, useGetChatSubscription, useGetEvent, useGetEventInfo, useGetEventRelations, useGetEvents, useGetEventsByRegion, useGetEventsNearMe, useGetNotificationCount, useGetNotificationCountSubscription, useGetRelation, useGetRelationByEventAndVendor, useGetResourceActivities, useGetResourceConnections, useGetTester, useGetTesters, useGetUser, useGetUserActivities, useGetUserChats, useGetUserEvents, useGetUserNotifications, useGetUserNotificationsSubscription, useGetUserVendors, useGetUsers, useGetVendor, useGetVendorInfo, useGetVendorRelations, useGetVendors, useGetVendorsByRegion, useLocationSearch, useLogin, useLoginForm, useLogout, useMarkAllNotificationsRead, useMarkNotificationRead, useRefreshToken, useRegister, useRegisterForm, useRemoveParticipantFromChat, useRemoveUserFavouriteResource, useRemoveUserGoingResource, useRemoveUserInterestResource, useRemoveUserPresentResource, useRequestPasswordReset, useRequestPasswordResetForm, useResetPassword, useResetPasswordForm, useSearchEvents, useSearchVendors, useSelectPackage, useSendChatMessage, useTestersForm, useUpdateAd, useUpdateEvent, useUpdateEventInfo, useUpdateRelation, useUpdateTester, useUpdateUser, useUpdateVendor, useUpdateVendorInfo, useUserForm, useValidateVerificationToken, useValidateVerificationTokenForm, useVendorForm, useVendorInfoForm, validateVerificationTokenFields, vendorAvailability, vendorBasicInfoFields, vendorCompliance, vendorElectricity, vendorEndDateFields, vendorFoodFlavour, vendorFullAddress, vendorGazebo, vendorLocationDescription, vendorMenuFields, vendorMultiLocation, vendorPackaging, vendorPriceRange, vendorProducedIn, vendorStallSize, vendorStartDateFields, vendorTable };
package/dist/index.mjs CHANGED
@@ -6033,10 +6033,7 @@ var schema = new MongooseSchema(
6033
6033
  },
6034
6034
  { timestamps: true }
6035
6035
  );
6036
- var EventInfoModel = mongoose2.model(
6037
- "EventInfo",
6038
- schema
6039
- );
6036
+ var EventInfoModel = mongoose2.models.EventInfo || mongoose2.model("EventInfo", schema);
6040
6037
 
6041
6038
  // src/mongoose/Relation.ts
6042
6039
  var MongooseSchema2 = mongoose3.Schema;
@@ -6096,10 +6093,7 @@ RelationTypeSchema.index({
6096
6093
  "relationDates.startTime": 1,
6097
6094
  "relationDates.status": 1
6098
6095
  });
6099
- var RelationModel = mongoose3.model(
6100
- "Relation",
6101
- RelationTypeSchema
6102
- );
6096
+ var RelationModel = mongoose3.models.Relation || mongoose3.model("Relation", RelationTypeSchema);
6103
6097
 
6104
6098
  // src/mongoose/global.ts
6105
6099
  var MongooseSchema3 = mongoose4.Schema;
@@ -6314,7 +6308,7 @@ schema2.index({
6314
6308
  start: 1,
6315
6309
  status: 1
6316
6310
  });
6317
- var AdModel = mongoose5.model("Ad", schema2);
6311
+ var AdModel = mongoose5.models.Ad || mongoose5.model("Ad", schema2);
6318
6312
 
6319
6313
  // src/mongoose/Chat.ts
6320
6314
  import mongoose6 from "mongoose";
@@ -6374,7 +6368,7 @@ var ChatSchema = new MongooseSchema5(
6374
6368
  timestamps: true
6375
6369
  }
6376
6370
  );
6377
- var ChatModel = mongoose6.model("Chat", ChatSchema);
6371
+ var ChatModel = mongoose6.models.Chat || mongoose6.model("Chat", ChatSchema);
6378
6372
 
6379
6373
  // src/mongoose/Notification.ts
6380
6374
  import mongoose7 from "mongoose";
@@ -6409,10 +6403,7 @@ var schema3 = new MongooseSchema6(
6409
6403
  );
6410
6404
  schema3.index({ isRead: 1, userId: 1 });
6411
6405
  schema3.index({ createdAt: -1, userId: 1 });
6412
- var NotificationModel = mongoose7.model(
6413
- "Notification",
6414
- schema3
6415
- );
6406
+ var NotificationModel = mongoose7.models.Notification || mongoose7.model("Notification", schema3);
6416
6407
 
6417
6408
  // src/mongoose/PushToken.ts
6418
6409
  import mongoose8 from "mongoose";
@@ -6429,7 +6420,7 @@ var schema4 = new MongooseSchema7(
6429
6420
  },
6430
6421
  { timestamps: true }
6431
6422
  );
6432
- var PushTokenModel = mongoose8.model("PushToken", schema4);
6423
+ var PushTokenModel = mongoose8.models.PushToken || mongoose8.model("PushToken", schema4);
6433
6424
 
6434
6425
  // src/mongoose/ResourceActivity.ts
6435
6426
  import mongoose9 from "mongoose";
@@ -6479,7 +6470,7 @@ var schema5 = new MongooseSchema8(
6479
6470
  );
6480
6471
  schema5.index({ resourceId: 1, resourceType: 1 }, { unique: true });
6481
6472
  schema5.index({ "views.location": "2dsphere" });
6482
- var ResourceActivityModel = mongoose9.model("ResourceActivity", schema5);
6473
+ var ResourceActivityModel = mongoose9.models.ResourceActivity || mongoose9.model("ResourceActivity", schema5);
6483
6474
 
6484
6475
  // src/mongoose/Testers.ts
6485
6476
  import mongoose10 from "mongoose";
@@ -6508,7 +6499,7 @@ var TesterSchema = new MongooseSchema9(
6508
6499
  timestamps: true
6509
6500
  }
6510
6501
  );
6511
- var TesterModel = mongoose10.model("Tester", TesterSchema);
6502
+ var TesterModel = mongoose10.models.Tester || mongoose10.model("Tester", TesterSchema);
6512
6503
 
6513
6504
  // src/mongoose/User.ts
6514
6505
  import mongoose11 from "mongoose";
@@ -6608,7 +6599,7 @@ var schema6 = new MongooseSchema10(
6608
6599
  { timestamps: true }
6609
6600
  );
6610
6601
  schema6.index({ "partners.email": 1 });
6611
- var UserModel = mongoose11.model("User", schema6);
6602
+ var UserModel = mongoose11.models.User || mongoose11.model("User", schema6);
6612
6603
 
6613
6604
  // src/mongoose/VerificationToken.ts
6614
6605
  import mongoose12 from "mongoose";
@@ -6628,10 +6619,7 @@ var schema7 = new MongooseSchema11(
6628
6619
  },
6629
6620
  { timestamps: true }
6630
6621
  );
6631
- var VerificationTokenModel = mongoose12.model(
6632
- "VerificationToken",
6633
- schema7
6634
- );
6622
+ var VerificationTokenModel = mongoose12.models.VerificationToken || mongoose12.model("VerificationToken", schema7);
6635
6623
 
6636
6624
  // src/mongoose/vendor/Vendor.ts
6637
6625
  import mongoose13 from "mongoose";
@@ -6705,7 +6693,7 @@ schema8.index({ description: 1 });
6705
6693
  schema8.index({ region: 1 });
6706
6694
  schema8.index({ "categories.name": 1 });
6707
6695
  schema8.index({ "partners.email": 1 });
6708
- var VendorModel = mongoose13.model("Vendor", schema8);
6696
+ var VendorModel = mongoose13.models.Vendor || mongoose13.model("Vendor", schema8);
6709
6697
 
6710
6698
  // src/mongoose/vendor/VendorInfo.ts
6711
6699
  import mongoose14 from "mongoose";
@@ -6756,10 +6744,7 @@ var schema9 = new MongooseSchema13(
6756
6744
  },
6757
6745
  { timestamps: true }
6758
6746
  );
6759
- var VendorInfoModel = mongoose14.model(
6760
- "VendorInfo",
6761
- schema9
6762
- );
6747
+ var VendorInfoModel = mongoose14.models.VendorInfo || mongoose14.model("VendorInfo", schema9);
6763
6748
 
6764
6749
  // src/mongoose/event/Event.ts
6765
6750
  import mongoose15 from "mongoose";
@@ -6829,7 +6814,7 @@ schema10.index({ region: 1 });
6829
6814
  schema10.index({ location: "2dsphere" });
6830
6815
  schema10.index({ tags: 1 });
6831
6816
  schema10.index({ "partners.email": 1 });
6832
- var EventModel = mongoose15.model("Event", schema10);
6817
+ var EventModel = mongoose15.models.Event || mongoose15.model("Event", schema10);
6833
6818
 
6834
6819
  // src/service/database.ts
6835
6820
  import mongoose16 from "mongoose";
@@ -6878,32 +6863,8 @@ var connectToDatabase = async ({
6878
6863
  }
6879
6864
  };
6880
6865
 
6881
- // src/service/notificationService.ts
6882
- async function publishNotificationEvents(userId, context) {
6883
- try {
6884
- const userNotifications = await NotificationModel.find({
6885
- userId
6886
- }).sort({ createdAt: -1 });
6887
- const [total, unread] = await Promise.all([
6888
- NotificationModel.countDocuments({ userId }),
6889
- NotificationModel.countDocuments({ isRead: false, userId })
6890
- ]);
6891
- context.pubsub.publish("GET_NOTIFICATIONS" /* GET_NOTIFICATIONS */, {
6892
- getNotifications: userNotifications,
6893
- getNotificationsUserId: userId
6894
- });
6895
- context.pubsub.publish("GET_NOTIFICATIONS_COUNT" /* GET_NOTIFICATIONS_COUNT */, {
6896
- getNotificationsCount: { total, unread, userId }
6897
- });
6898
- console.log(`Published notification events for user: ${String(userId)}`);
6899
- } catch (error) {
6900
- console.error(
6901
- `Failed to publish notification events for user ${String(userId)}:`,
6902
- error
6903
- );
6904
- }
6905
- }
6906
- async function createNotifications(payload, context) {
6866
+ // src/service/saveNotificationsInDb.ts
6867
+ async function saveNotificationsInDb(payload) {
6907
6868
  const { data, message, title, type, userIds } = payload;
6908
6869
  try {
6909
6870
  const notifications = userIds.map((userId) => ({
@@ -6914,22 +6875,18 @@ async function createNotifications(payload, context) {
6914
6875
  type,
6915
6876
  userId
6916
6877
  }));
6917
- const savedNotifications = await NotificationModel.insertMany(notifications);
6878
+ await NotificationModel.insertMany(notifications);
6918
6879
  console.log(
6919
- `Created ${savedNotifications.length} notifications for ${userIds.length} users`
6880
+ `Created ${notifications.length} notifications for ${userIds.length} users`
6920
6881
  );
6921
- const uniqueUserIds = [...new Set(userIds)];
6922
- for (const userId of uniqueUserIds) {
6923
- await publishNotificationEvents(userId, context);
6924
- }
6925
- return savedNotifications;
6882
+ return [...new Set(userIds)];
6926
6883
  } catch (error) {
6927
6884
  console.error("Failed to create notifications:", error);
6928
6885
  return [];
6929
6886
  }
6930
6887
  }
6931
6888
 
6932
- // src/service/sendPushNotification.ts
6889
+ // src/service/sendPushNotifications.ts
6933
6890
  import { Expo } from "expo-server-sdk";
6934
6891
  var expo = new Expo();
6935
6892
  function extractTokensFromMessage(message) {
@@ -6997,7 +6954,7 @@ async function sendChunk(chunk, chunkIndex) {
6997
6954
  return { failedTokens: [], successCount: 0 };
6998
6955
  }
6999
6956
  }
7000
- async function sendPushNotification({
6957
+ async function sendPushNotifications({
7001
6958
  data,
7002
6959
  message,
7003
6960
  title,
@@ -7005,6 +6962,7 @@ async function sendPushNotification({
7005
6962
  }) {
7006
6963
  const pushTokens = await PushTokenModel.find({ userId: { $in: userIds } });
7007
6964
  const expoTokens = pushTokens.map((token) => token.token);
6965
+ if (!data) return;
7008
6966
  const { messages, invalidTokens } = createPushMessages({
7009
6967
  data,
7010
6968
  message,
@@ -7139,7 +7097,6 @@ export {
7139
7097
  companyContactFields,
7140
7098
  connectToDatabase,
7141
7099
  contactUsFields,
7142
- createNotifications,
7143
7100
  darkColors,
7144
7101
  dateFormat,
7145
7102
  defaultEventFormValues,
@@ -7172,14 +7129,14 @@ export {
7172
7129
  producedIngOptions,
7173
7130
  productLabelGroups,
7174
7131
  profileFields,
7175
- publishNotificationEvents,
7176
7132
  registerFields,
7177
7133
  relationDatesSchema,
7178
7134
  removeTypename,
7179
7135
  requestPasswordResetFields,
7180
7136
  requirementsOptions,
7181
7137
  resetPasswordFields,
7182
- sendPushNotification,
7138
+ saveNotificationsInDb,
7139
+ sendPushNotifications,
7183
7140
  socialMediaFields,
7184
7141
  sortDatesChronologically,
7185
7142
  stallTypeOptions,