@timardex/cluemart-shared 1.2.33 → 1.2.35
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.
- package/dist/{ad-CiYcsJB7.d.mts → ad-CWAaH5Ql.d.mts} +1 -1
- package/dist/{ad-BZylIpez.d.ts → ad-D60cy5L4.d.ts} +1 -1
- package/dist/{auth-DDtMJHZw.d.mts → auth-BslKse3L.d.mts} +1 -1
- package/dist/{auth-CmaB99NK.d.ts → auth-Ch9Nt77g.d.ts} +1 -1
- package/dist/{chunk-NPHPFWQH.mjs → chunk-WWL2Q5DN.mjs} +3 -22
- package/dist/chunk-WWL2Q5DN.mjs.map +1 -0
- package/dist/formFields/index.cjs +0 -7
- package/dist/formFields/index.cjs.map +1 -1
- package/dist/formFields/index.d.mts +1 -1
- package/dist/formFields/index.d.ts +1 -1
- package/dist/formFields/index.mjs +0 -7
- package/dist/formFields/index.mjs.map +1 -1
- package/dist/{global-DVYSZ6LR.d.ts → global-DvxKMAQD.d.ts} +1 -1
- package/dist/{global-ExJZRDGR.d.mts → global-j9FEfVZs.d.mts} +1 -1
- package/dist/graphql/index.d.mts +2 -2
- package/dist/graphql/index.d.ts +2 -2
- package/dist/hooks/index.cjs +1 -0
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.d.mts +3 -3
- package/dist/hooks/index.d.ts +3 -3
- package/dist/hooks/index.mjs +1 -0
- package/dist/hooks/index.mjs.map +1 -1
- package/dist/index.cjs +1 -118
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +1 -3
- package/dist/index.d.ts +1 -3
- package/dist/index.mjs +1 -117
- package/dist/index.mjs.map +1 -1
- package/dist/mongoose/index.cjs.map +1 -1
- package/dist/mongoose/index.d.mts +3 -3
- package/dist/mongoose/index.d.ts +3 -3
- package/dist/mongoose/index.mjs +76 -60
- package/dist/mongoose/index.mjs.map +1 -1
- package/dist/service/index.cjs +6 -142
- package/dist/service/index.cjs.map +1 -1
- package/dist/service/index.d.mts +2 -4
- package/dist/service/index.d.ts +2 -4
- package/dist/service/index.mjs +3 -114
- package/dist/service/index.mjs.map +1 -1
- package/dist/types/index.d.mts +3 -3
- package/dist/types/index.d.ts +3 -3
- package/dist/utils/index.d.mts +1 -1
- package/dist/utils/index.d.ts +1 -1
- package/package.json +1 -2
- package/dist/chunk-NPHPFWQH.mjs.map +0 -1
package/dist/index.d.mts
CHANGED
|
@@ -1901,8 +1901,6 @@ declare const connectToDatabase: ({ appName, dbName, dbPassword, dbUser, mongodb
|
|
|
1901
1901
|
*/
|
|
1902
1902
|
declare function saveNotificationsInDb(payload: SchemaCreateBulkNotificationInput): Promise<ObjectId[]>;
|
|
1903
1903
|
|
|
1904
|
-
declare function sendPushNotifications({ data, message, title, userIds, }: SchemaCreateBulkNotificationInput): Promise<void>;
|
|
1905
|
-
|
|
1906
1904
|
declare const SAVED_PASSWORD_KEY = "savedPassword";
|
|
1907
1905
|
declare const SAVED_EMAIL_KEY = "savedEmail";
|
|
1908
1906
|
declare const SAVED_TOKEN_KEY = "savedToken";
|
|
@@ -2005,4 +2003,4 @@ declare const availableRegionOptions: OptionItem[];
|
|
|
2005
2003
|
declare const paymentMethodOptions: OptionItem[];
|
|
2006
2004
|
declare function normalizeUrl(url: string): string;
|
|
2007
2005
|
|
|
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,
|
|
2006
|
+
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, 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
|
@@ -1901,8 +1901,6 @@ declare const connectToDatabase: ({ appName, dbName, dbPassword, dbUser, mongodb
|
|
|
1901
1901
|
*/
|
|
1902
1902
|
declare function saveNotificationsInDb(payload: SchemaCreateBulkNotificationInput): Promise<ObjectId[]>;
|
|
1903
1903
|
|
|
1904
|
-
declare function sendPushNotifications({ data, message, title, userIds, }: SchemaCreateBulkNotificationInput): Promise<void>;
|
|
1905
|
-
|
|
1906
1904
|
declare const SAVED_PASSWORD_KEY = "savedPassword";
|
|
1907
1905
|
declare const SAVED_EMAIL_KEY = "savedEmail";
|
|
1908
1906
|
declare const SAVED_TOKEN_KEY = "savedToken";
|
|
@@ -2005,4 +2003,4 @@ declare const availableRegionOptions: OptionItem[];
|
|
|
2005
2003
|
declare const paymentMethodOptions: OptionItem[];
|
|
2006
2004
|
declare function normalizeUrl(url: string): string;
|
|
2007
2005
|
|
|
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,
|
|
2006
|
+
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, 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
|
@@ -926,13 +926,6 @@ var validateVerificationTokenFields = [
|
|
|
926
926
|
|
|
927
927
|
// src/formFields/user.ts
|
|
928
928
|
var profileFields = [
|
|
929
|
-
{
|
|
930
|
-
disabled: true,
|
|
931
|
-
helperText: "Email cannot be changed",
|
|
932
|
-
keyboardType: "email-address",
|
|
933
|
-
name: "email",
|
|
934
|
-
placeholder: "Email"
|
|
935
|
-
},
|
|
936
929
|
{
|
|
937
930
|
...emailField,
|
|
938
931
|
disabled: true,
|
|
@@ -4913,6 +4906,7 @@ var testersSchema = yup6.object().shape({
|
|
|
4913
4906
|
categories: yup6.array().nullable().when("resourceType", {
|
|
4914
4907
|
is: "vendor" /* VENDOR */,
|
|
4915
4908
|
then: () => categorySchema.min(1, "Category list must contain at least one item").required("Categories required"),
|
|
4909
|
+
// eslint-disable-next-line sort-keys
|
|
4916
4910
|
otherwise: () => yup6.array().nullable().notRequired()
|
|
4917
4911
|
}),
|
|
4918
4912
|
companyName: yup6.string().required("Company name is required"),
|
|
@@ -6886,115 +6880,6 @@ async function saveNotificationsInDb(payload) {
|
|
|
6886
6880
|
}
|
|
6887
6881
|
}
|
|
6888
6882
|
|
|
6889
|
-
// src/service/sendPushNotifications.ts
|
|
6890
|
-
import { Expo } from "expo-server-sdk";
|
|
6891
|
-
var expo = new Expo();
|
|
6892
|
-
function extractTokensFromMessage(message) {
|
|
6893
|
-
return Array.isArray(message.to) ? message.to : [message.to];
|
|
6894
|
-
}
|
|
6895
|
-
function createPushMessages({
|
|
6896
|
-
tokens,
|
|
6897
|
-
message,
|
|
6898
|
-
title,
|
|
6899
|
-
data
|
|
6900
|
-
}) {
|
|
6901
|
-
const messages = [];
|
|
6902
|
-
const invalidTokens = [];
|
|
6903
|
-
for (const token of tokens) {
|
|
6904
|
-
if (!Expo.isExpoPushToken(token)) {
|
|
6905
|
-
invalidTokens.push(token);
|
|
6906
|
-
continue;
|
|
6907
|
-
}
|
|
6908
|
-
messages.push({
|
|
6909
|
-
body: message,
|
|
6910
|
-
data: { ...data },
|
|
6911
|
-
sound: "default",
|
|
6912
|
-
title,
|
|
6913
|
-
to: token
|
|
6914
|
-
});
|
|
6915
|
-
}
|
|
6916
|
-
return { invalidTokens, messages };
|
|
6917
|
-
}
|
|
6918
|
-
function processChunkResults(tickets, chunk) {
|
|
6919
|
-
let successCount = 0;
|
|
6920
|
-
const failedTokens = [];
|
|
6921
|
-
for (const [ticketIndex, ticket] of tickets.entries()) {
|
|
6922
|
-
if (ticket.status === "error") {
|
|
6923
|
-
const message = chunk[ticketIndex];
|
|
6924
|
-
if (message) {
|
|
6925
|
-
const tokens = extractTokensFromMessage(message);
|
|
6926
|
-
if (ticket.details?.error === "DeviceNotRegistered") {
|
|
6927
|
-
failedTokens.push(...tokens);
|
|
6928
|
-
}
|
|
6929
|
-
console.log("Push notification error", {
|
|
6930
|
-
error: ticket.details?.error,
|
|
6931
|
-
tokens
|
|
6932
|
-
});
|
|
6933
|
-
}
|
|
6934
|
-
} else {
|
|
6935
|
-
successCount++;
|
|
6936
|
-
}
|
|
6937
|
-
}
|
|
6938
|
-
return { failedTokens, successCount };
|
|
6939
|
-
}
|
|
6940
|
-
async function sendChunk(chunk, chunkIndex) {
|
|
6941
|
-
try {
|
|
6942
|
-
const tickets = await expo.sendPushNotificationsAsync(chunk);
|
|
6943
|
-
const { successCount, failedTokens } = processChunkResults(tickets, chunk);
|
|
6944
|
-
console.log(
|
|
6945
|
-
`Chunk ${chunkIndex + 1}: Sent ${successCount}/${chunk.length} notifications successfully`
|
|
6946
|
-
);
|
|
6947
|
-
return { failedTokens, successCount };
|
|
6948
|
-
} catch (error) {
|
|
6949
|
-
console.log("Error sending Expo push notification chunk", {
|
|
6950
|
-
chunkIndex,
|
|
6951
|
-
chunkSize: chunk.length,
|
|
6952
|
-
error: error instanceof Error ? error.message : String(error)
|
|
6953
|
-
});
|
|
6954
|
-
return { failedTokens: [], successCount: 0 };
|
|
6955
|
-
}
|
|
6956
|
-
}
|
|
6957
|
-
async function sendPushNotifications({
|
|
6958
|
-
data,
|
|
6959
|
-
message,
|
|
6960
|
-
title,
|
|
6961
|
-
userIds
|
|
6962
|
-
}) {
|
|
6963
|
-
const pushTokens = await PushTokenModel.find({ userId: { $in: userIds } });
|
|
6964
|
-
const expoTokens = pushTokens.map((token) => token.token);
|
|
6965
|
-
if (!data) return;
|
|
6966
|
-
const { messages, invalidTokens } = createPushMessages({
|
|
6967
|
-
data,
|
|
6968
|
-
message,
|
|
6969
|
-
title,
|
|
6970
|
-
tokens: expoTokens
|
|
6971
|
-
});
|
|
6972
|
-
if (invalidTokens.length > 0) {
|
|
6973
|
-
console.log(`Found ${invalidTokens.length} invalid push tokens`);
|
|
6974
|
-
}
|
|
6975
|
-
if (messages.length === 0) {
|
|
6976
|
-
console.log("No valid messages to send after filtering tokens");
|
|
6977
|
-
return;
|
|
6978
|
-
}
|
|
6979
|
-
const chunks = expo.chunkPushNotifications(messages);
|
|
6980
|
-
let totalSuccessCount = 0;
|
|
6981
|
-
const allFailedTokens = [];
|
|
6982
|
-
for (const [chunkIndex, chunk] of chunks.entries()) {
|
|
6983
|
-
const { successCount, failedTokens } = await sendChunk(
|
|
6984
|
-
chunk,
|
|
6985
|
-
chunkIndex + 1
|
|
6986
|
-
);
|
|
6987
|
-
totalSuccessCount += successCount;
|
|
6988
|
-
allFailedTokens.push(...failedTokens);
|
|
6989
|
-
}
|
|
6990
|
-
console.log(
|
|
6991
|
-
`Sent push notification to ${totalSuccessCount}/${messages.length} tokens across ${chunks.length} chunks`
|
|
6992
|
-
);
|
|
6993
|
-
if (allFailedTokens.length > 0) {
|
|
6994
|
-
console.log(`Found ${allFailedTokens.length} failed push tokens`);
|
|
6995
|
-
}
|
|
6996
|
-
}
|
|
6997
|
-
|
|
6998
6883
|
// src/storage/index.ts
|
|
6999
6884
|
var SAVED_PASSWORD_KEY = "savedPassword";
|
|
7000
6885
|
var SAVED_EMAIL_KEY = "savedEmail";
|
|
@@ -7136,7 +7021,6 @@ export {
|
|
|
7136
7021
|
requirementsOptions,
|
|
7137
7022
|
resetPasswordFields,
|
|
7138
7023
|
saveNotificationsInDb,
|
|
7139
|
-
sendPushNotifications,
|
|
7140
7024
|
socialMediaFields,
|
|
7141
7025
|
sortDatesChronologically,
|
|
7142
7026
|
stallTypeOptions,
|