@timardex/cluemart-server-shared 2.1.2 → 2.1.5

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,5 +1,5 @@
1
1
  import * as _timardex_cluemart_shared from '@timardex/cluemart-shared';
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, RelationDate, UserLicenceType, GoogleImportedMarket, PushTokenType, RelationType, 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 } from '@timardex/cluemart-shared';
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, RelationDate, UserLicenceType, GoogleImportedMarket, PushTokenType, RelationType, 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
3
  import * as mongoose from 'mongoose';
4
4
  import mongoose__default from 'mongoose';
5
5
  export { default as mongoose } from 'mongoose';
@@ -1215,7 +1215,6 @@ declare function downgradeVendorProFeatures(userId: ObjectId, licenceType: EnumU
1215
1215
  * no snapshot exists), and keeps all images active.
1216
1216
  */
1217
1217
  declare function restoreVendorProFeatures(userId: ObjectId, licenceType: EnumUserLicence): Promise<void>;
1218
- declare const vendorLicences: EnumUserLicence[];
1219
1218
  /**
1220
1219
  * Handles vendor licence compliance for a single user
1221
1220
  */
@@ -1323,13 +1322,6 @@ declare function getVendorResourceInfo(userId: ObjectId, vendorId: ObjectId): Pr
1323
1322
  resourceName: string;
1324
1323
  } | null>;
1325
1324
 
1326
- declare enum LicenceExpiryDate {
1327
- ONE_YEAR = "1 year",
1328
- ONE_MONTH = "1 month",
1329
- TWO_MONTHS = "2 months",
1330
- THREE_MONTHS = "3 months",
1331
- SIX_MONTHS = "6 months"
1332
- }
1333
1325
  declare enum LicenceCategory {
1334
1326
  EVENT = "event",
1335
1327
  PARTNER = "partner",
@@ -1373,4 +1365,4 @@ declare function checkOwnerHasLicence({ userId, resourceType, }: {
1373
1365
  resourceType: EnumResourceType;
1374
1366
  }): Promise<void>;
1375
1367
 
1376
- 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, EventInfoModel, EventModel, GameModel, GoogleImportedMarketModel, type GraphQLContext, LicenceCategory, LicenceExpiryDate, 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 SchemaBillingCatalogEntry, type SchemaBillingCatalogPriceHistoryEntry, type SchemaChatMessageReactionType, type SchemaChatMessageReplyPreviewType, type SchemaChatMessageSeenType, type SchemaChatMessageType, type SchemaChatReportType, type SchemaChatType, type SchemaCreateBulkNotificationInput, 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, 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, processLicenseReminder, processUserCompliance, processUserLicenseReminders, publishNotificationEvents, refundPolicySchema, relatedPostSchema, relationDatesSchema, remindUsersAboutLicenseExpiration, replaceUserLicenceWithObject, resourceRelationsSchema, restoreVendorProFeatures, saveNotificationsInDb, schemaAdresource, sendDeactivationNotification, sendLicenseReminder, sendPushNotifications, sendReminderSafely, socialShareResourceSchema, syncUserLicencesAfterExpiry, termsAgreementSchema, updateAdStatuses, updateAllEventDateTimeStatuses, updateRelationDatesToUnavailable, updateSingleDateTimeStatus, upgradeUserToLicence, userLicenseSchema, vendorLicences, vendorOwnerHasProLicence, vendorProductTypeSchema };
1368
+ 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, 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 SchemaBillingCatalogEntry, type SchemaBillingCatalogPriceHistoryEntry, type SchemaChatMessageReactionType, type SchemaChatMessageReplyPreviewType, type SchemaChatMessageSeenType, type SchemaChatMessageType, type SchemaChatReportType, type SchemaChatType, type SchemaCreateBulkNotificationInput, 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, 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, processLicenseReminder, processUserCompliance, processUserLicenseReminders, publishNotificationEvents, refundPolicySchema, relatedPostSchema, relationDatesSchema, remindUsersAboutLicenseExpiration, replaceUserLicenceWithObject, resourceRelationsSchema, restoreVendorProFeatures, saveNotificationsInDb, schemaAdresource, sendDeactivationNotification, sendLicenseReminder, sendPushNotifications, sendReminderSafely, socialShareResourceSchema, syncUserLicencesAfterExpiry, termsAgreementSchema, updateAdStatuses, updateAllEventDateTimeStatuses, updateRelationDatesToUnavailable, updateSingleDateTimeStatus, upgradeUserToLicence, userLicenseSchema, vendorOwnerHasProLicence, vendorProductTypeSchema };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as _timardex_cluemart_shared from '@timardex/cluemart-shared';
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, RelationDate, UserLicenceType, GoogleImportedMarket, PushTokenType, RelationType, 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 } from '@timardex/cluemart-shared';
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, RelationDate, UserLicenceType, GoogleImportedMarket, PushTokenType, RelationType, 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
3
  import * as mongoose from 'mongoose';
4
4
  import mongoose__default from 'mongoose';
5
5
  export { default as mongoose } from 'mongoose';
@@ -1215,7 +1215,6 @@ declare function downgradeVendorProFeatures(userId: ObjectId, licenceType: EnumU
1215
1215
  * no snapshot exists), and keeps all images active.
1216
1216
  */
1217
1217
  declare function restoreVendorProFeatures(userId: ObjectId, licenceType: EnumUserLicence): Promise<void>;
1218
- declare const vendorLicences: EnumUserLicence[];
1219
1218
  /**
1220
1219
  * Handles vendor licence compliance for a single user
1221
1220
  */
@@ -1323,13 +1322,6 @@ declare function getVendorResourceInfo(userId: ObjectId, vendorId: ObjectId): Pr
1323
1322
  resourceName: string;
1324
1323
  } | null>;
1325
1324
 
1326
- declare enum LicenceExpiryDate {
1327
- ONE_YEAR = "1 year",
1328
- ONE_MONTH = "1 month",
1329
- TWO_MONTHS = "2 months",
1330
- THREE_MONTHS = "3 months",
1331
- SIX_MONTHS = "6 months"
1332
- }
1333
1325
  declare enum LicenceCategory {
1334
1326
  EVENT = "event",
1335
1327
  PARTNER = "partner",
@@ -1373,4 +1365,4 @@ declare function checkOwnerHasLicence({ userId, resourceType, }: {
1373
1365
  resourceType: EnumResourceType;
1374
1366
  }): Promise<void>;
1375
1367
 
1376
- 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, EventInfoModel, EventModel, GameModel, GoogleImportedMarketModel, type GraphQLContext, LicenceCategory, LicenceExpiryDate, 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 SchemaBillingCatalogEntry, type SchemaBillingCatalogPriceHistoryEntry, type SchemaChatMessageReactionType, type SchemaChatMessageReplyPreviewType, type SchemaChatMessageSeenType, type SchemaChatMessageType, type SchemaChatReportType, type SchemaChatType, type SchemaCreateBulkNotificationInput, 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, 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, processLicenseReminder, processUserCompliance, processUserLicenseReminders, publishNotificationEvents, refundPolicySchema, relatedPostSchema, relationDatesSchema, remindUsersAboutLicenseExpiration, replaceUserLicenceWithObject, resourceRelationsSchema, restoreVendorProFeatures, saveNotificationsInDb, schemaAdresource, sendDeactivationNotification, sendLicenseReminder, sendPushNotifications, sendReminderSafely, socialShareResourceSchema, syncUserLicencesAfterExpiry, termsAgreementSchema, updateAdStatuses, updateAllEventDateTimeStatuses, updateRelationDatesToUnavailable, updateSingleDateTimeStatus, upgradeUserToLicence, userLicenseSchema, vendorLicences, vendorOwnerHasProLicence, vendorProductTypeSchema };
1368
+ 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, 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 SchemaBillingCatalogEntry, type SchemaBillingCatalogPriceHistoryEntry, type SchemaChatMessageReactionType, type SchemaChatMessageReplyPreviewType, type SchemaChatMessageSeenType, type SchemaChatMessageType, type SchemaChatReportType, type SchemaChatType, type SchemaCreateBulkNotificationInput, 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, 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, processLicenseReminder, processUserCompliance, processUserLicenseReminders, publishNotificationEvents, refundPolicySchema, relatedPostSchema, relationDatesSchema, remindUsersAboutLicenseExpiration, replaceUserLicenceWithObject, resourceRelationsSchema, restoreVendorProFeatures, saveNotificationsInDb, schemaAdresource, sendDeactivationNotification, sendLicenseReminder, sendPushNotifications, sendReminderSafely, socialShareResourceSchema, syncUserLicencesAfterExpiry, termsAgreementSchema, updateAdStatuses, updateAllEventDateTimeStatuses, updateRelationDatesToUnavailable, updateSingleDateTimeStatus, upgradeUserToLicence, userLicenseSchema, vendorOwnerHasProLicence, vendorProductTypeSchema };
package/dist/index.mjs CHANGED
@@ -1646,6 +1646,7 @@ var schema12 = new MongooseSchema12(
1646
1646
  schema12.index({ "licences.expiryDate": 1 });
1647
1647
  schema12.index({ "licences.licenceType": 1 });
1648
1648
  schema12.index({ promoCodes: 1, active: 1, deletedAt: 1 });
1649
+ schema12.index({ email: "text", firstName: "text", lastName: "text" });
1649
1650
  var UserModel = mongoose16.models.User || mongoose16.model("User", schema12);
1650
1651
 
1651
1652
  // src/mongoose/VerificationToken.ts
@@ -3548,7 +3549,8 @@ import {
3548
3549
  EnumNotificationResourceType as EnumNotificationResourceType4,
3549
3550
  EnumNotificationType as EnumNotificationType3,
3550
3551
  EnumSubscriptionStatus as EnumSubscriptionStatus3,
3551
- EnumUserLicence as EnumUserLicence9
3552
+ EnumUserLicence as EnumUserLicence9,
3553
+ vendorLicences
3552
3554
  } from "@timardex/cluemart-shared";
3553
3555
  import dayjs4 from "dayjs";
3554
3556
 
@@ -3556,18 +3558,11 @@ import dayjs4 from "dayjs";
3556
3558
  import {
3557
3559
  EnumResourceType as EnumResourceType9,
3558
3560
  EnumUserLicence as EnumUserLicence8,
3559
- isNonVisitorResourceType
3561
+ isNonVisitorResourceType,
3562
+ LicenceExpiryDate
3560
3563
  } from "@timardex/cluemart-shared";
3561
3564
  import dayjs3 from "dayjs";
3562
3565
  import { GraphQLError } from "graphql";
3563
- var LicenceExpiryDate = /* @__PURE__ */ ((LicenceExpiryDate2) => {
3564
- LicenceExpiryDate2["ONE_YEAR"] = "1 year";
3565
- LicenceExpiryDate2["ONE_MONTH"] = "1 month";
3566
- LicenceExpiryDate2["TWO_MONTHS"] = "2 months";
3567
- LicenceExpiryDate2["THREE_MONTHS"] = "3 months";
3568
- LicenceExpiryDate2["SIX_MONTHS"] = "6 months";
3569
- return LicenceExpiryDate2;
3570
- })(LicenceExpiryDate || {});
3571
3566
  var LicenceCategory = /* @__PURE__ */ ((LicenceCategory2) => {
3572
3567
  LicenceCategory2["EVENT"] = "event";
3573
3568
  LicenceCategory2["PARTNER"] = "partner";
@@ -3649,11 +3644,11 @@ function getHighestLicenceForCategory(licences, category) {
3649
3644
  function createLicenceObject(expiryDate, licenceType) {
3650
3645
  const today = dayjs3();
3651
3646
  const expiryDateMapping = {
3652
- ["1 year" /* ONE_YEAR */]: today.add(1, "year").endOf("day").toDate(),
3653
- ["1 month" /* ONE_MONTH */]: today.add(1, "month").endOf("day").toDate(),
3654
- ["2 months" /* TWO_MONTHS */]: today.add(2, "month").endOf("day").toDate(),
3655
- ["3 months" /* THREE_MONTHS */]: today.add(3, "month").endOf("day").toDate(),
3656
- ["6 months" /* SIX_MONTHS */]: today.add(6, "month").endOf("day").toDate()
3647
+ [LicenceExpiryDate.ONE_YEAR]: today.add(1, "year").endOf("day").toDate(),
3648
+ [LicenceExpiryDate.ONE_MONTH]: today.add(1, "month").endOf("day").toDate(),
3649
+ [LicenceExpiryDate.TWO_MONTHS]: today.add(2, "month").endOf("day").toDate(),
3650
+ [LicenceExpiryDate.THREE_MONTHS]: today.add(3, "month").endOf("day").toDate(),
3651
+ [LicenceExpiryDate.SIX_MONTHS]: today.add(6, "month").endOf("day").toDate()
3657
3652
  };
3658
3653
  const licenceObject = {
3659
3654
  expiryDate: expiryDateMapping[expiryDate],
@@ -3905,11 +3900,6 @@ async function restoreVendorProFeatures(userId, licenceType) {
3905
3900
  throw error;
3906
3901
  }
3907
3902
  }
3908
- var vendorLicences = [
3909
- EnumUserLicence9.STANDARD_VENDOR,
3910
- EnumUserLicence9.PRO_VENDOR,
3911
- EnumUserLicence9.PRO_PLUS_VENDOR
3912
- ];
3913
3903
  function isProtectedByCurrentStripeSubscription(user, licenceType, now) {
3914
3904
  const stripe = user.stripe;
3915
3905
  if (!stripe || stripe.currentPlan !== licenceType) {
@@ -4173,7 +4163,8 @@ import {
4173
4163
  EnumNotificationResourceType as EnumNotificationResourceType6,
4174
4164
  EnumNotificationType as EnumNotificationType5,
4175
4165
  EnumUserLicence as EnumUserLicence11,
4176
- licenseNiceNames
4166
+ licenseNiceNames,
4167
+ vendorLicences as vendorLicences2
4177
4168
  } from "@timardex/cluemart-shared";
4178
4169
  import { formatDate } from "@timardex/cluemart-shared/utils";
4179
4170
  import dayjs7 from "dayjs";
@@ -4261,7 +4252,7 @@ function getNotificationTypes(isVendorLicense, isPartnerLicense) {
4261
4252
  };
4262
4253
  }
4263
4254
  async function getLicenseResourceInfo(user, licence) {
4264
- const isVendorLicense = vendorLicences.includes(licence.licenceType);
4255
+ const isVendorLicense = vendorLicences2.includes(licence.licenceType);
4265
4256
  const isPartnerLicense = partnerLicences.includes(licence.licenceType);
4266
4257
  const licenceName = getLicenseName(licence.licenceType);
4267
4258
  const { notificationType, resourceType } = getNotificationTypes(
@@ -4461,7 +4452,6 @@ export {
4461
4452
  GameModel,
4462
4453
  GoogleImportedMarketModel,
4463
4454
  LicenceCategory,
4464
- LicenceExpiryDate,
4465
4455
  NotificationModel,
4466
4456
  OwnerTypeSchema,
4467
4457
  PartnerModel,
@@ -4553,7 +4543,6 @@ export {
4553
4543
  updateSingleDateTimeStatus,
4554
4544
  upgradeUserToLicence,
4555
4545
  userLicenseSchema,
4556
- vendorLicences,
4557
4546
  vendorOwnerHasProLicence,
4558
4547
  vendorProductTypeSchema
4559
4548
  };