@timardex/cluemart-server-shared 2.2.1 → 2.2.12

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/index.d.mts CHANGED
@@ -1,13 +1,14 @@
1
1
  import * as _timardex_cluemart_shared from '@timardex/cluemart-shared';
2
2
  import { AdType, AdDailyPriceType, AdBookingType, EnumAdShowOn, AdSettingsType, ChatType, ParticipantType, ChatMessageType, NotificationType, CreateBulkNotificationInput, EnumUserRole, BillingCatalogEntryType, BillingCatalogPriceHistoryEntry, EnumBillingPeriod, EnumUserLicence, BILLING_CATALOG_KEYS, ReportChatUser, OwnerType, Category, ResourceContactDetailsType, ResourceImageType, RelatedPostType, SocialMediaType, PosterUsageType, SocialShareResourceType, TermsAgreement, DateTimeType, LocationGeoType, LocationType, UserLicenceType, GoogleImportedMarket, PushTokenType, RelationType, RelationDate, ResourceActivityType, StripeSubscription, UserActivityEvent, UserType, VendorType, VendorProductList, VendorInfoType, UnregisteredVendorInvitationType, UnregisteredVendorType, EventType, EventInfoType, StallType, RefundPolicy, PartnerType, PostType, PostContentType, PostResource, AppSettingsType, GameDocType, GameType, SchoolType, AffiliateType, AffiliateResourceType, AffiliateRewardType, CouponType, CouponDataType, CouponParticipantUserType, PromoCodeType, EnumAffiliateRewardType, EventListItemType, DateTimeWithPriceType, EnumNotificationResourceType, EnumNotificationType, EnumResourceType, LicenceExpiryDate } from '@timardex/cluemart-shared';
3
+ export { updateSingleDateTimeStatus } from '@timardex/cluemart-shared';
3
4
  import * as mongoose from 'mongoose';
4
5
  import mongoose__default from 'mongoose';
5
6
  export { default as mongoose } from 'mongoose';
6
7
  import { NotificationCount, DateTimeType as DateTimeType$1 } from '@timardex/cluemart-shared/types';
7
8
  import express from 'express';
8
9
  export { default as express } from 'express';
9
- import dayjs, { Dayjs } from 'dayjs';
10
10
  import { EnumUserLicence as EnumUserLicence$1 } from '@timardex/cluemart-shared/enums';
11
+ import dayjs, { Dayjs } from 'dayjs';
11
12
 
12
13
  declare const schemaAdresource: mongoose__default.Schema<_timardex_cluemart_shared.AdResource, mongoose__default.Model<_timardex_cluemart_shared.AdResource, any, any, any, mongoose__default.Document<unknown, any, _timardex_cluemart_shared.AdResource, any, {}> & _timardex_cluemart_shared.AdResource & {
13
14
  _id: mongoose__default.Types.ObjectId;
@@ -1043,14 +1044,6 @@ declare function isValidObjectId(value: string): boolean;
1043
1044
  */
1044
1045
  declare function convertObjectIdsToStrings(obj: any): any;
1045
1046
 
1046
- /**
1047
- * Updates the dateStatus field for a single DateTimeType object based on the current date/time.
1048
- * Manual statuses (CANCELED, RE_SCHEDULED) are preserved and returned as-is.
1049
- * @param dateTime The date-time object to update
1050
- * @returns A new object with an updated dateStatus value, or the original
1051
- * object when the stored status is a manual override
1052
- */
1053
- declare function updateSingleDateTimeStatus<T extends DateTimeType>(dateTime: T, now?: dayjs.Dayjs): T;
1054
1047
  /**
1055
1048
  * Recomputes dateStatus for every dateTime slot on events and google imported
1056
1049
  * markets, moves ended event date slots into the event date archive, and keeps
@@ -1385,4 +1378,4 @@ declare function checkOwnerHasLicence({ userId, resourceType, }: {
1385
1378
  resourceType: EnumResourceType;
1386
1379
  }): Promise<void>;
1387
1380
 
1388
- export { ACTIVE_NOT_DELETED_FILTER, AD_BILLING_CATALOG_COLLECTION_NAME, APP_SETTINGS_ID, AdBillingCatalogModel, AdBookingModel, type AdImpressionEntry, AdImpressionModel, AdModel, AdSettingsModel, AffiliateModel, AppSettingModel, type AuthUser, type AwardAffiliateVendorSubscriptionRewardsResult, BILLING_CATALOG_COLLECTION_NAME, BillingCatalogModel, CategorySchema, ChatModel, ChatReportModel, ContactDetailsSchema, type CouponDocument, CouponModel, DEFAULT_AD_SETTINGS, EnumPubSubEvents, EventDateArchiveModel, EventInfoModel, EventModel, GameModel, GoogleImportedMarketModel, type GraphQLContext, LicenceCategory, NotificationModel, type NotificationPubSub, type ObjectId, OwnerTypeSchema, PartnerModel, PostModel, PushTokenModel, REMINDER_WINDOW_MAX_HOURS, REMINDER_WINDOW_MIN_HOURS, RelationModel, RelationTypeSchema, ResourceActivityModel, ResourceImageTypeSchema, SUBSCRIPTION_REWARD_TIMEZONE, type SchemaAffiliateResourceType, type SchemaAffiliateReward, type SchemaAppSettingsType, type SchemaBillingCatalogEntry, type SchemaBillingCatalogPriceHistoryEntry, type SchemaChatMessageReactionType, type SchemaChatMessageReplyPreviewType, type SchemaChatMessageSeenType, type SchemaChatMessageType, type SchemaChatReportType, type SchemaChatType, type SchemaCreateBulkNotificationInput, type SchemaEventDateArchiveType, type SchemaEventInfoType, type SchemaEventType, type SchemaGameType, type SchemaGoogleImportedMarket, type SchemaNotificationType, type SchemaOwnerType, type SchemaParticipantType, type SchemaPartnerType, type SchemaPostType, type SchemaPushTokenType, type SchemaRelatedPostType, type SchemaRelationType, type SchemaStripeSubscription, type SchemaUnregisteredVendorInvitationType, type SchemaUnregisteredVendorType, type SchemaUserActivityEvent, type SchemaUserType, type SchemaVendorInfoType, type SchemaVendorType, SchoolModel, SocialMediaTypeSchema, StallTypeSchema, type SubscriptionPayload, UnregisteredVendorModel, UserModel, VendorInfoModel, VendorModel, VerificationTokenModel, type VerificationTokenType, activeAffiliateCodeExists, awardAffiliateVendorSubscriptionRewards, baseResourceFields, buildInitialBillingCatalogEntries, buildLicenceExpiryPipeline, checkOwnerHasLicence, connectToDatabase, convertObjectIdsToStrings, createLicenceObject, dateTimeSchema, dedupeArchivedSlotsByStartDateTime, didRemoveAnyEventDates, downgradeVendorProFeatures, ensureUserLicenseCompliance, ensureUserLicenseComplianceForUser, eventLicences, findAffiliateByPromoCode, findEventOrImportedMarketById, getBillingCatalogDefinition, getEventResourceInfo, getHighestLicenceForCategory, getLicenceCategory, getLicenceExpiryMode, getPartnerResourceInfo, getPayingEventStripeSubscriptionPlan, getPayingStripeSubscriptionPlan, getPayingVendorStripeSubscriptionPlan, getSubscriptionRewardPeriodBounds, getVendorResourceInfo, handleEventLicenceCompliance, handlePartnerLicenceCompliance, handleVendorLicenceCompliance, hasValidLicence, isStandardLicence, isValidObjectId, licenceCategoryMapping, licencePriority, locationGeoSchema, locationsSchema, mapVendorLicenceToSubscriptionRewardType, normalizeAffiliatePromoCodes, normalizePromoCode, notifyUsers, partnerLicences, persistArchivedEventDates, processLicenseReminder, processUserCompliance, processUserLicenseReminders, publishNotificationEvents, refundPolicySchema, relatedPostSchema, relationDatesSchema, remindUsersAboutLicenseExpiration, replaceUserLicenceWithObject, restoreVendorProFeatures, saveNotificationsInDb, schemaAdresource, sendDeactivationNotification, sendLicenseReminder, sendPushNotifications, sendReminderSafely, socialShareResourceSchema, splitEventDatesForArchive, syncUserLicencesAfterExpiry, termsAgreementSchema, updateAdStatuses, updateAllEventDateTimeStatuses, updateRelationDatesToUnavailable, updateSingleDateTimeStatus, upgradeUserToLicence, userLicenseSchema, vendorOwnerHasProLicence, vendorProductTypeSchema };
1381
+ export { ACTIVE_NOT_DELETED_FILTER, AD_BILLING_CATALOG_COLLECTION_NAME, APP_SETTINGS_ID, AdBillingCatalogModel, AdBookingModel, type AdImpressionEntry, AdImpressionModel, AdModel, AdSettingsModel, AffiliateModel, AppSettingModel, type AuthUser, type AwardAffiliateVendorSubscriptionRewardsResult, BILLING_CATALOG_COLLECTION_NAME, BillingCatalogModel, CategorySchema, ChatModel, ChatReportModel, ContactDetailsSchema, type CouponDocument, CouponModel, DEFAULT_AD_SETTINGS, EnumPubSubEvents, EventDateArchiveModel, EventInfoModel, EventModel, GameModel, GoogleImportedMarketModel, type GraphQLContext, LicenceCategory, NotificationModel, type NotificationPubSub, type ObjectId, OwnerTypeSchema, PartnerModel, PostModel, PushTokenModel, REMINDER_WINDOW_MAX_HOURS, REMINDER_WINDOW_MIN_HOURS, RelationModel, RelationTypeSchema, ResourceActivityModel, ResourceImageTypeSchema, SUBSCRIPTION_REWARD_TIMEZONE, type SchemaAffiliateResourceType, type SchemaAffiliateReward, type SchemaAppSettingsType, type SchemaBillingCatalogEntry, type SchemaBillingCatalogPriceHistoryEntry, type SchemaChatMessageReactionType, type SchemaChatMessageReplyPreviewType, type SchemaChatMessageSeenType, type SchemaChatMessageType, type SchemaChatReportType, type SchemaChatType, type SchemaCreateBulkNotificationInput, type SchemaEventDateArchiveType, type SchemaEventInfoType, type SchemaEventType, type SchemaGameType, type SchemaGoogleImportedMarket, type SchemaNotificationType, type SchemaOwnerType, type SchemaParticipantType, type SchemaPartnerType, type SchemaPostType, type SchemaPushTokenType, type SchemaRelatedPostType, type SchemaRelationType, type SchemaStripeSubscription, type SchemaUnregisteredVendorInvitationType, type SchemaUnregisteredVendorType, type SchemaUserActivityEvent, type SchemaUserType, type SchemaVendorInfoType, type SchemaVendorType, SchoolModel, SocialMediaTypeSchema, StallTypeSchema, type SubscriptionPayload, UnregisteredVendorModel, UserModel, VendorInfoModel, VendorModel, VerificationTokenModel, type VerificationTokenType, activeAffiliateCodeExists, awardAffiliateVendorSubscriptionRewards, baseResourceFields, buildInitialBillingCatalogEntries, buildLicenceExpiryPipeline, checkOwnerHasLicence, connectToDatabase, convertObjectIdsToStrings, createLicenceObject, dateTimeSchema, dedupeArchivedSlotsByStartDateTime, didRemoveAnyEventDates, downgradeVendorProFeatures, ensureUserLicenseCompliance, ensureUserLicenseComplianceForUser, eventLicences, findAffiliateByPromoCode, findEventOrImportedMarketById, getBillingCatalogDefinition, getEventResourceInfo, getHighestLicenceForCategory, getLicenceCategory, getLicenceExpiryMode, getPartnerResourceInfo, getPayingEventStripeSubscriptionPlan, getPayingStripeSubscriptionPlan, getPayingVendorStripeSubscriptionPlan, getSubscriptionRewardPeriodBounds, getVendorResourceInfo, handleEventLicenceCompliance, handlePartnerLicenceCompliance, handleVendorLicenceCompliance, hasValidLicence, isStandardLicence, isValidObjectId, licenceCategoryMapping, licencePriority, locationGeoSchema, locationsSchema, mapVendorLicenceToSubscriptionRewardType, normalizeAffiliatePromoCodes, normalizePromoCode, notifyUsers, partnerLicences, persistArchivedEventDates, processLicenseReminder, processUserCompliance, processUserLicenseReminders, publishNotificationEvents, refundPolicySchema, relatedPostSchema, relationDatesSchema, remindUsersAboutLicenseExpiration, replaceUserLicenceWithObject, restoreVendorProFeatures, saveNotificationsInDb, schemaAdresource, sendDeactivationNotification, sendLicenseReminder, sendPushNotifications, sendReminderSafely, socialShareResourceSchema, splitEventDatesForArchive, syncUserLicencesAfterExpiry, termsAgreementSchema, updateAdStatuses, updateAllEventDateTimeStatuses, updateRelationDatesToUnavailable, upgradeUserToLicence, userLicenseSchema, vendorOwnerHasProLicence, vendorProductTypeSchema };
package/dist/index.d.ts CHANGED
@@ -1,13 +1,14 @@
1
1
  import * as _timardex_cluemart_shared from '@timardex/cluemart-shared';
2
2
  import { AdType, AdDailyPriceType, AdBookingType, EnumAdShowOn, AdSettingsType, ChatType, ParticipantType, ChatMessageType, NotificationType, CreateBulkNotificationInput, EnumUserRole, BillingCatalogEntryType, BillingCatalogPriceHistoryEntry, EnumBillingPeriod, EnumUserLicence, BILLING_CATALOG_KEYS, ReportChatUser, OwnerType, Category, ResourceContactDetailsType, ResourceImageType, RelatedPostType, SocialMediaType, PosterUsageType, SocialShareResourceType, TermsAgreement, DateTimeType, LocationGeoType, LocationType, UserLicenceType, GoogleImportedMarket, PushTokenType, RelationType, RelationDate, ResourceActivityType, StripeSubscription, UserActivityEvent, UserType, VendorType, VendorProductList, VendorInfoType, UnregisteredVendorInvitationType, UnregisteredVendorType, EventType, EventInfoType, StallType, RefundPolicy, PartnerType, PostType, PostContentType, PostResource, AppSettingsType, GameDocType, GameType, SchoolType, AffiliateType, AffiliateResourceType, AffiliateRewardType, CouponType, CouponDataType, CouponParticipantUserType, PromoCodeType, EnumAffiliateRewardType, EventListItemType, DateTimeWithPriceType, EnumNotificationResourceType, EnumNotificationType, EnumResourceType, LicenceExpiryDate } from '@timardex/cluemart-shared';
3
+ export { updateSingleDateTimeStatus } from '@timardex/cluemart-shared';
3
4
  import * as mongoose from 'mongoose';
4
5
  import mongoose__default from 'mongoose';
5
6
  export { default as mongoose } from 'mongoose';
6
7
  import { NotificationCount, DateTimeType as DateTimeType$1 } from '@timardex/cluemart-shared/types';
7
8
  import express from 'express';
8
9
  export { default as express } from 'express';
9
- import dayjs, { Dayjs } from 'dayjs';
10
10
  import { EnumUserLicence as EnumUserLicence$1 } from '@timardex/cluemart-shared/enums';
11
+ import dayjs, { Dayjs } from 'dayjs';
11
12
 
12
13
  declare const schemaAdresource: mongoose__default.Schema<_timardex_cluemart_shared.AdResource, mongoose__default.Model<_timardex_cluemart_shared.AdResource, any, any, any, mongoose__default.Document<unknown, any, _timardex_cluemart_shared.AdResource, any, {}> & _timardex_cluemart_shared.AdResource & {
13
14
  _id: mongoose__default.Types.ObjectId;
@@ -1043,14 +1044,6 @@ declare function isValidObjectId(value: string): boolean;
1043
1044
  */
1044
1045
  declare function convertObjectIdsToStrings(obj: any): any;
1045
1046
 
1046
- /**
1047
- * Updates the dateStatus field for a single DateTimeType object based on the current date/time.
1048
- * Manual statuses (CANCELED, RE_SCHEDULED) are preserved and returned as-is.
1049
- * @param dateTime The date-time object to update
1050
- * @returns A new object with an updated dateStatus value, or the original
1051
- * object when the stored status is a manual override
1052
- */
1053
- declare function updateSingleDateTimeStatus<T extends DateTimeType>(dateTime: T, now?: dayjs.Dayjs): T;
1054
1047
  /**
1055
1048
  * Recomputes dateStatus for every dateTime slot on events and google imported
1056
1049
  * markets, moves ended event date slots into the event date archive, and keeps
@@ -1385,4 +1378,4 @@ declare function checkOwnerHasLicence({ userId, resourceType, }: {
1385
1378
  resourceType: EnumResourceType;
1386
1379
  }): Promise<void>;
1387
1380
 
1388
- export { ACTIVE_NOT_DELETED_FILTER, AD_BILLING_CATALOG_COLLECTION_NAME, APP_SETTINGS_ID, AdBillingCatalogModel, AdBookingModel, type AdImpressionEntry, AdImpressionModel, AdModel, AdSettingsModel, AffiliateModel, AppSettingModel, type AuthUser, type AwardAffiliateVendorSubscriptionRewardsResult, BILLING_CATALOG_COLLECTION_NAME, BillingCatalogModel, CategorySchema, ChatModel, ChatReportModel, ContactDetailsSchema, type CouponDocument, CouponModel, DEFAULT_AD_SETTINGS, EnumPubSubEvents, EventDateArchiveModel, EventInfoModel, EventModel, GameModel, GoogleImportedMarketModel, type GraphQLContext, LicenceCategory, NotificationModel, type NotificationPubSub, type ObjectId, OwnerTypeSchema, PartnerModel, PostModel, PushTokenModel, REMINDER_WINDOW_MAX_HOURS, REMINDER_WINDOW_MIN_HOURS, RelationModel, RelationTypeSchema, ResourceActivityModel, ResourceImageTypeSchema, SUBSCRIPTION_REWARD_TIMEZONE, type SchemaAffiliateResourceType, type SchemaAffiliateReward, type SchemaAppSettingsType, type SchemaBillingCatalogEntry, type SchemaBillingCatalogPriceHistoryEntry, type SchemaChatMessageReactionType, type SchemaChatMessageReplyPreviewType, type SchemaChatMessageSeenType, type SchemaChatMessageType, type SchemaChatReportType, type SchemaChatType, type SchemaCreateBulkNotificationInput, type SchemaEventDateArchiveType, type SchemaEventInfoType, type SchemaEventType, type SchemaGameType, type SchemaGoogleImportedMarket, type SchemaNotificationType, type SchemaOwnerType, type SchemaParticipantType, type SchemaPartnerType, type SchemaPostType, type SchemaPushTokenType, type SchemaRelatedPostType, type SchemaRelationType, type SchemaStripeSubscription, type SchemaUnregisteredVendorInvitationType, type SchemaUnregisteredVendorType, type SchemaUserActivityEvent, type SchemaUserType, type SchemaVendorInfoType, type SchemaVendorType, SchoolModel, SocialMediaTypeSchema, StallTypeSchema, type SubscriptionPayload, UnregisteredVendorModel, UserModel, VendorInfoModel, VendorModel, VerificationTokenModel, type VerificationTokenType, activeAffiliateCodeExists, awardAffiliateVendorSubscriptionRewards, baseResourceFields, buildInitialBillingCatalogEntries, buildLicenceExpiryPipeline, checkOwnerHasLicence, connectToDatabase, convertObjectIdsToStrings, createLicenceObject, dateTimeSchema, dedupeArchivedSlotsByStartDateTime, didRemoveAnyEventDates, downgradeVendorProFeatures, ensureUserLicenseCompliance, ensureUserLicenseComplianceForUser, eventLicences, findAffiliateByPromoCode, findEventOrImportedMarketById, getBillingCatalogDefinition, getEventResourceInfo, getHighestLicenceForCategory, getLicenceCategory, getLicenceExpiryMode, getPartnerResourceInfo, getPayingEventStripeSubscriptionPlan, getPayingStripeSubscriptionPlan, getPayingVendorStripeSubscriptionPlan, getSubscriptionRewardPeriodBounds, getVendorResourceInfo, handleEventLicenceCompliance, handlePartnerLicenceCompliance, handleVendorLicenceCompliance, hasValidLicence, isStandardLicence, isValidObjectId, licenceCategoryMapping, licencePriority, locationGeoSchema, locationsSchema, mapVendorLicenceToSubscriptionRewardType, normalizeAffiliatePromoCodes, normalizePromoCode, notifyUsers, partnerLicences, persistArchivedEventDates, processLicenseReminder, processUserCompliance, processUserLicenseReminders, publishNotificationEvents, refundPolicySchema, relatedPostSchema, relationDatesSchema, remindUsersAboutLicenseExpiration, replaceUserLicenceWithObject, restoreVendorProFeatures, saveNotificationsInDb, schemaAdresource, sendDeactivationNotification, sendLicenseReminder, sendPushNotifications, sendReminderSafely, socialShareResourceSchema, splitEventDatesForArchive, syncUserLicencesAfterExpiry, termsAgreementSchema, updateAdStatuses, updateAllEventDateTimeStatuses, updateRelationDatesToUnavailable, updateSingleDateTimeStatus, upgradeUserToLicence, userLicenseSchema, vendorOwnerHasProLicence, vendorProductTypeSchema };
1381
+ export { ACTIVE_NOT_DELETED_FILTER, AD_BILLING_CATALOG_COLLECTION_NAME, APP_SETTINGS_ID, AdBillingCatalogModel, AdBookingModel, type AdImpressionEntry, AdImpressionModel, AdModel, AdSettingsModel, AffiliateModel, AppSettingModel, type AuthUser, type AwardAffiliateVendorSubscriptionRewardsResult, BILLING_CATALOG_COLLECTION_NAME, BillingCatalogModel, CategorySchema, ChatModel, ChatReportModel, ContactDetailsSchema, type CouponDocument, CouponModel, DEFAULT_AD_SETTINGS, EnumPubSubEvents, EventDateArchiveModel, EventInfoModel, EventModel, GameModel, GoogleImportedMarketModel, type GraphQLContext, LicenceCategory, NotificationModel, type NotificationPubSub, type ObjectId, OwnerTypeSchema, PartnerModel, PostModel, PushTokenModel, REMINDER_WINDOW_MAX_HOURS, REMINDER_WINDOW_MIN_HOURS, RelationModel, RelationTypeSchema, ResourceActivityModel, ResourceImageTypeSchema, SUBSCRIPTION_REWARD_TIMEZONE, type SchemaAffiliateResourceType, type SchemaAffiliateReward, type SchemaAppSettingsType, type SchemaBillingCatalogEntry, type SchemaBillingCatalogPriceHistoryEntry, type SchemaChatMessageReactionType, type SchemaChatMessageReplyPreviewType, type SchemaChatMessageSeenType, type SchemaChatMessageType, type SchemaChatReportType, type SchemaChatType, type SchemaCreateBulkNotificationInput, type SchemaEventDateArchiveType, type SchemaEventInfoType, type SchemaEventType, type SchemaGameType, type SchemaGoogleImportedMarket, type SchemaNotificationType, type SchemaOwnerType, type SchemaParticipantType, type SchemaPartnerType, type SchemaPostType, type SchemaPushTokenType, type SchemaRelatedPostType, type SchemaRelationType, type SchemaStripeSubscription, type SchemaUnregisteredVendorInvitationType, type SchemaUnregisteredVendorType, type SchemaUserActivityEvent, type SchemaUserType, type SchemaVendorInfoType, type SchemaVendorType, SchoolModel, SocialMediaTypeSchema, StallTypeSchema, type SubscriptionPayload, UnregisteredVendorModel, UserModel, VendorInfoModel, VendorModel, VerificationTokenModel, type VerificationTokenType, activeAffiliateCodeExists, awardAffiliateVendorSubscriptionRewards, baseResourceFields, buildInitialBillingCatalogEntries, buildLicenceExpiryPipeline, checkOwnerHasLicence, connectToDatabase, convertObjectIdsToStrings, createLicenceObject, dateTimeSchema, dedupeArchivedSlotsByStartDateTime, didRemoveAnyEventDates, downgradeVendorProFeatures, ensureUserLicenseCompliance, ensureUserLicenseComplianceForUser, eventLicences, findAffiliateByPromoCode, findEventOrImportedMarketById, getBillingCatalogDefinition, getEventResourceInfo, getHighestLicenceForCategory, getLicenceCategory, getLicenceExpiryMode, getPartnerResourceInfo, getPayingEventStripeSubscriptionPlan, getPayingStripeSubscriptionPlan, getPayingVendorStripeSubscriptionPlan, getSubscriptionRewardPeriodBounds, getVendorResourceInfo, handleEventLicenceCompliance, handlePartnerLicenceCompliance, handleVendorLicenceCompliance, hasValidLicence, isStandardLicence, isValidObjectId, licenceCategoryMapping, licencePriority, locationGeoSchema, locationsSchema, mapVendorLicenceToSubscriptionRewardType, normalizeAffiliatePromoCodes, normalizePromoCode, notifyUsers, partnerLicences, persistArchivedEventDates, processLicenseReminder, processUserCompliance, processUserLicenseReminders, publishNotificationEvents, refundPolicySchema, relatedPostSchema, relationDatesSchema, remindUsersAboutLicenseExpiration, replaceUserLicenceWithObject, restoreVendorProFeatures, saveNotificationsInDb, schemaAdresource, sendDeactivationNotification, sendLicenseReminder, sendPushNotifications, sendReminderSafely, socialShareResourceSchema, splitEventDatesForArchive, syncUserLicencesAfterExpiry, termsAgreementSchema, updateAdStatuses, updateAllEventDateTimeStatuses, updateRelationDatesToUnavailable, upgradeUserToLicence, userLicenseSchema, vendorOwnerHasProLicence, vendorProductTypeSchema };
package/dist/index.mjs CHANGED
@@ -3132,14 +3132,11 @@ function convertObjectIdsToStrings(obj) {
3132
3132
 
3133
3133
  // src/service/event/updateAllEventDateTimeStatuses.ts
3134
3134
  import {
3135
- dateFormat,
3136
3135
  EnumEventDateStatus as EnumEventDateStatus7,
3137
3136
  filterDatesByFutureStatus,
3138
- timeFormat
3137
+ updateSingleDateTimeStatus
3139
3138
  } from "@timardex/cluemart-shared";
3140
3139
  import dayjs2 from "dayjs";
3141
- import customParseFormat from "dayjs/plugin/customParseFormat";
3142
- import isoWeek from "dayjs/plugin/isoWeek";
3143
3140
 
3144
3141
  // src/service/event/archiveEndedEventDates.ts
3145
3142
  import { EnumEventDateStatus as EnumEventDateStatus6 } from "@timardex/cluemart-shared";
@@ -3182,73 +3179,6 @@ async function persistArchivedEventDates(eventId, slots) {
3182
3179
  }
3183
3180
 
3184
3181
  // src/service/event/updateAllEventDateTimeStatuses.ts
3185
- dayjs2.extend(customParseFormat);
3186
- dayjs2.extend(isoWeek);
3187
- var MANUAL_DATE_STATUSES = /* @__PURE__ */ new Set([
3188
- EnumEventDateStatus7.CANCELED,
3189
- EnumEventDateStatus7.RE_SCHEDULED
3190
- ]);
3191
- function getFutureEventStatus(startDateTime, now) {
3192
- const hoursUntilStart = startDateTime.diff(now, "hour", true);
3193
- if (hoursUntilStart > 0 && hoursUntilStart <= 4) {
3194
- return EnumEventDateStatus7.STARTING_SOON;
3195
- }
3196
- if (startDateTime.isSame(now, "day")) {
3197
- return EnumEventDateStatus7.TODAY;
3198
- }
3199
- if (startDateTime.isSame(now.add(1, "day"), "day")) {
3200
- return EnumEventDateStatus7.TOMORROW;
3201
- }
3202
- if (startDateTime.isSame(now, "isoWeek")) {
3203
- return EnumEventDateStatus7.THIS_WEEK;
3204
- }
3205
- if (startDateTime.isSame(now.add(1, "week"), "isoWeek")) {
3206
- return EnumEventDateStatus7.NEXT_WEEK;
3207
- }
3208
- return EnumEventDateStatus7.UPCOMING;
3209
- }
3210
- function updateSingleDateTimeStatus(dateTime, now = dayjs2()) {
3211
- if (MANUAL_DATE_STATUSES.has(dateTime.dateStatus)) {
3212
- return dateTime;
3213
- }
3214
- const dateTimeFormat = `${dateFormat} ${timeFormat}`;
3215
- const startDateTime = dayjs2(
3216
- `${dateTime.startDate} ${dateTime.startTime}`,
3217
- dateTimeFormat,
3218
- true
3219
- );
3220
- const endDateTime = dayjs2(
3221
- `${dateTime.endDate} ${dateTime.endTime}`,
3222
- dateTimeFormat,
3223
- true
3224
- );
3225
- if (!startDateTime.isValid() || !endDateTime.isValid()) {
3226
- return {
3227
- ...dateTime,
3228
- dateStatus: EnumEventDateStatus7.INVALID
3229
- };
3230
- }
3231
- if (endDateTime.isBefore(startDateTime)) {
3232
- return {
3233
- ...dateTime,
3234
- dateStatus: EnumEventDateStatus7.INVALID
3235
- };
3236
- }
3237
- let dateStatus;
3238
- if (endDateTime.isAfter(now)) {
3239
- if (startDateTime.isAfter(now)) {
3240
- dateStatus = getFutureEventStatus(startDateTime, now);
3241
- } else {
3242
- dateStatus = EnumEventDateStatus7.STARTED;
3243
- }
3244
- } else {
3245
- dateStatus = EnumEventDateStatus7.ENDED;
3246
- }
3247
- return {
3248
- ...dateTime,
3249
- dateStatus
3250
- };
3251
- }
3252
3182
  var dateTimeStatusFilter = {
3253
3183
  dateTime: { $ne: [], $type: "array" },
3254
3184
  deletedAt: null
@@ -3427,6 +3357,9 @@ async function updateAllEventDateTimeStatuses() {
3427
3357
  }
3428
3358
  }
3429
3359
 
3360
+ // src/service/index.ts
3361
+ import { updateSingleDateTimeStatus as updateSingleDateTimeStatus2 } from "@timardex/cluemart-shared";
3362
+
3430
3363
  // src/service/event/findEventOrImportedMarketById.ts
3431
3364
  async function findEventOrImportedMarketById(resourceId) {
3432
3365
  if (!resourceId) {
@@ -4318,7 +4251,7 @@ var REMINDER_WINDOW_MAX_HOURS = 7.5 * 24;
4318
4251
 
4319
4252
  // src/service/license/reminder/utils.ts
4320
4253
  import {
4321
- dateFormat as dateFormat2,
4254
+ dateFormat,
4322
4255
  EnumNotificationResourceType as EnumNotificationResourceType6,
4323
4256
  EnumNotificationType as EnumNotificationType5,
4324
4257
  EnumUserLicence as EnumUserLicence11,
@@ -4463,7 +4396,7 @@ function getLicenceExpiryMode(licenceType) {
4463
4396
  }
4464
4397
  async function sendLicenseReminder(user, licence) {
4465
4398
  const licenceName = getLicenseName(licence.licenceType);
4466
- const expiryDate = dayjs7(licence.expiryDate).format(dateFormat2);
4399
+ const expiryDate = dayjs7(licence.expiryDate).format(dateFormat);
4467
4400
  const userId = String(user._id);
4468
4401
  const resourceInfo = await getLicenseResourceInfo(user, licence);
4469
4402
  if (!resourceInfo) {
@@ -4702,7 +4635,7 @@ export {
4702
4635
  updateAdStatuses,
4703
4636
  updateAllEventDateTimeStatuses,
4704
4637
  updateRelationDatesToUnavailable,
4705
- updateSingleDateTimeStatus,
4638
+ updateSingleDateTimeStatus2 as updateSingleDateTimeStatus,
4706
4639
  upgradeUserToLicence,
4707
4640
  userLicenseSchema,
4708
4641
  vendorOwnerHasProLicence,