@timardex/cluemart-server-shared 2.1.2 → 2.1.4
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.cjs +8 -25
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +2 -10
- package/dist/index.d.ts +2 -10
- package/dist/index.mjs +12 -24
- package/dist/index.mjs.map +1 -1
- package/dist/service/index.cjs +8 -25
- package/dist/service/index.cjs.map +1 -1
- package/dist/service/index.d.mts +2 -10
- package/dist/service/index.d.ts +2 -10
- package/dist/service/index.mjs +12 -24
- package/dist/service/index.mjs.map +1 -1
- package/package.json +2 -2
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,
|
|
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,
|
|
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
|
@@ -3548,7 +3548,8 @@ import {
|
|
|
3548
3548
|
EnumNotificationResourceType as EnumNotificationResourceType4,
|
|
3549
3549
|
EnumNotificationType as EnumNotificationType3,
|
|
3550
3550
|
EnumSubscriptionStatus as EnumSubscriptionStatus3,
|
|
3551
|
-
EnumUserLicence as EnumUserLicence9
|
|
3551
|
+
EnumUserLicence as EnumUserLicence9,
|
|
3552
|
+
vendorLicences
|
|
3552
3553
|
} from "@timardex/cluemart-shared";
|
|
3553
3554
|
import dayjs4 from "dayjs";
|
|
3554
3555
|
|
|
@@ -3556,18 +3557,11 @@ import dayjs4 from "dayjs";
|
|
|
3556
3557
|
import {
|
|
3557
3558
|
EnumResourceType as EnumResourceType9,
|
|
3558
3559
|
EnumUserLicence as EnumUserLicence8,
|
|
3559
|
-
isNonVisitorResourceType
|
|
3560
|
+
isNonVisitorResourceType,
|
|
3561
|
+
LicenceExpiryDate
|
|
3560
3562
|
} from "@timardex/cluemart-shared";
|
|
3561
3563
|
import dayjs3 from "dayjs";
|
|
3562
3564
|
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
3565
|
var LicenceCategory = /* @__PURE__ */ ((LicenceCategory2) => {
|
|
3572
3566
|
LicenceCategory2["EVENT"] = "event";
|
|
3573
3567
|
LicenceCategory2["PARTNER"] = "partner";
|
|
@@ -3649,11 +3643,11 @@ function getHighestLicenceForCategory(licences, category) {
|
|
|
3649
3643
|
function createLicenceObject(expiryDate, licenceType) {
|
|
3650
3644
|
const today = dayjs3();
|
|
3651
3645
|
const expiryDateMapping = {
|
|
3652
|
-
[
|
|
3653
|
-
[
|
|
3654
|
-
[
|
|
3655
|
-
[
|
|
3656
|
-
[
|
|
3646
|
+
[LicenceExpiryDate.ONE_YEAR]: today.add(1, "year").endOf("day").toDate(),
|
|
3647
|
+
[LicenceExpiryDate.ONE_MONTH]: today.add(1, "month").endOf("day").toDate(),
|
|
3648
|
+
[LicenceExpiryDate.TWO_MONTHS]: today.add(2, "month").endOf("day").toDate(),
|
|
3649
|
+
[LicenceExpiryDate.THREE_MONTHS]: today.add(3, "month").endOf("day").toDate(),
|
|
3650
|
+
[LicenceExpiryDate.SIX_MONTHS]: today.add(6, "month").endOf("day").toDate()
|
|
3657
3651
|
};
|
|
3658
3652
|
const licenceObject = {
|
|
3659
3653
|
expiryDate: expiryDateMapping[expiryDate],
|
|
@@ -3905,11 +3899,6 @@ async function restoreVendorProFeatures(userId, licenceType) {
|
|
|
3905
3899
|
throw error;
|
|
3906
3900
|
}
|
|
3907
3901
|
}
|
|
3908
|
-
var vendorLicences = [
|
|
3909
|
-
EnumUserLicence9.STANDARD_VENDOR,
|
|
3910
|
-
EnumUserLicence9.PRO_VENDOR,
|
|
3911
|
-
EnumUserLicence9.PRO_PLUS_VENDOR
|
|
3912
|
-
];
|
|
3913
3902
|
function isProtectedByCurrentStripeSubscription(user, licenceType, now) {
|
|
3914
3903
|
const stripe = user.stripe;
|
|
3915
3904
|
if (!stripe || stripe.currentPlan !== licenceType) {
|
|
@@ -4173,7 +4162,8 @@ import {
|
|
|
4173
4162
|
EnumNotificationResourceType as EnumNotificationResourceType6,
|
|
4174
4163
|
EnumNotificationType as EnumNotificationType5,
|
|
4175
4164
|
EnumUserLicence as EnumUserLicence11,
|
|
4176
|
-
licenseNiceNames
|
|
4165
|
+
licenseNiceNames,
|
|
4166
|
+
vendorLicences as vendorLicences2
|
|
4177
4167
|
} from "@timardex/cluemart-shared";
|
|
4178
4168
|
import { formatDate } from "@timardex/cluemart-shared/utils";
|
|
4179
4169
|
import dayjs7 from "dayjs";
|
|
@@ -4261,7 +4251,7 @@ function getNotificationTypes(isVendorLicense, isPartnerLicense) {
|
|
|
4261
4251
|
};
|
|
4262
4252
|
}
|
|
4263
4253
|
async function getLicenseResourceInfo(user, licence) {
|
|
4264
|
-
const isVendorLicense =
|
|
4254
|
+
const isVendorLicense = vendorLicences2.includes(licence.licenceType);
|
|
4265
4255
|
const isPartnerLicense = partnerLicences.includes(licence.licenceType);
|
|
4266
4256
|
const licenceName = getLicenseName(licence.licenceType);
|
|
4267
4257
|
const { notificationType, resourceType } = getNotificationTypes(
|
|
@@ -4461,7 +4451,6 @@ export {
|
|
|
4461
4451
|
GameModel,
|
|
4462
4452
|
GoogleImportedMarketModel,
|
|
4463
4453
|
LicenceCategory,
|
|
4464
|
-
LicenceExpiryDate,
|
|
4465
4454
|
NotificationModel,
|
|
4466
4455
|
OwnerTypeSchema,
|
|
4467
4456
|
PartnerModel,
|
|
@@ -4553,7 +4542,6 @@ export {
|
|
|
4553
4542
|
updateSingleDateTimeStatus,
|
|
4554
4543
|
upgradeUserToLicence,
|
|
4555
4544
|
userLicenseSchema,
|
|
4556
|
-
vendorLicences,
|
|
4557
4545
|
vendorOwnerHasProLicence,
|
|
4558
4546
|
vendorProductTypeSchema
|
|
4559
4547
|
};
|