@timardex/cluemart-server-shared 1.0.301 → 1.0.303
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/{chunk-LOZFYYVW.mjs → chunk-GQWLGM2W.mjs} +85 -1
- package/dist/chunk-GQWLGM2W.mjs.map +1 -0
- package/dist/index.cjs +1417 -178
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +3 -40
- package/dist/index.d.ts +3 -40
- package/dist/index.mjs +1416 -175
- package/dist/index.mjs.map +1 -1
- package/dist/mongoose/index.cjs +32 -0
- package/dist/mongoose/index.cjs.map +1 -1
- package/dist/mongoose/index.mjs +1 -1
- package/dist/service/index.cjs +1417 -178
- package/dist/service/index.cjs.map +1 -1
- package/dist/service/index.d.mts +4 -41
- package/dist/service/index.d.ts +4 -41
- package/dist/service/index.mjs +1214 -49
- package/dist/service/index.mjs.map +1 -1
- package/package.json +2 -2
- package/dist/chunk-LOZFYYVW.mjs.map +0 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _timardex_cluemart_shared from '@timardex/cluemart-shared';
|
|
2
|
-
import { AdType, CreateBulkNotificationInput, NotificationType, EnumUserRole, ChatMessageType, ParticipantType, ChatType, ReportChatUser, RelatedPostType, OwnerType, SocialMediaType, ResourceImageType, Category, UserLicenceType, ResourceContactDetailsType, TermsAgreement, RelationDate, DateTimeType, LocationGeoType, LocationType, SocialShareResourceType, PosterUsageType, GoogleImportedMarket, PushTokenType, RelationType, ResourceActivityType, UserActivityEvent, UserType, VendorType, VendorInfoType, UnregisteredVendorInvitationType, UnregisteredVendorType, EventType, StallType, RefundPolicy, EventInfoType, PartnerType, PostType, PostContentType, PostResource, AppSettingsType, GameType, GameDocType, SchoolType, AffiliateRewardType, AffiliateResourceType, AffiliateType,
|
|
2
|
+
import { AdType, CreateBulkNotificationInput, NotificationType, EnumUserRole, ChatMessageType, ParticipantType, ChatType, ReportChatUser, RelatedPostType, OwnerType, SocialMediaType, ResourceImageType, Category, UserLicenceType, ResourceContactDetailsType, TermsAgreement, RelationDate, DateTimeType, LocationGeoType, LocationType, SocialShareResourceType, PosterUsageType, GoogleImportedMarket, PushTokenType, RelationType, ResourceActivityType, UserActivityEvent, UserType, VendorType, VendorInfoType, UnregisteredVendorInvitationType, UnregisteredVendorType, EventType, StallType, RefundPolicy, EventInfoType, PartnerType, PostType, PostContentType, PostResource, AppSettingsType, GameType, GameDocType, SchoolType, AffiliateRewardType, AffiliateResourceType, AffiliateType, PromoCodeType, EnumAffiliateRewardType, EnumUserLicence, EventListItemType, DateTimeWithPriceType } 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';
|
|
@@ -765,7 +765,7 @@ type AwardAffiliateVendorSubscriptionRewardsResult = {
|
|
|
765
765
|
* - Vendor owner has a non-expired Standard / Pro / Pro+ vendor licence
|
|
766
766
|
*
|
|
767
767
|
* Reward type follows the owner's highest valid licence + Stripe paying status:
|
|
768
|
-
* - Pro / Pro+ with
|
|
768
|
+
* - Pro / Pro+ with paying Stripe (ACTIVE/TRIALING) → `ACTIVE_VENDOR_PRO_SUBSCRIPTION` (3 pts)
|
|
769
769
|
* - Pro / Pro+ without paying Stripe → `ACTIVE_VENDOR_STANDARD_SUBSCRIPTION` (1 pt)
|
|
770
770
|
* - Standard → `ACTIVE_VENDOR_STANDARD_SUBSCRIPTION` (1 pt)
|
|
771
771
|
*
|
|
@@ -777,43 +777,6 @@ type AwardAffiliateVendorSubscriptionRewardsResult = {
|
|
|
777
777
|
*/
|
|
778
778
|
declare function awardAffiliateVendorSubscriptionRewards(now?: Date): Promise<AwardAffiliateVendorSubscriptionRewardsResult>;
|
|
779
779
|
|
|
780
|
-
declare const AFFILIATE_REWARDS: {
|
|
781
|
-
NEW_EVENT_REGISTRATION: {
|
|
782
|
-
description: string;
|
|
783
|
-
value: number;
|
|
784
|
-
};
|
|
785
|
-
NEW_VENDOR_REGISTRATION: {
|
|
786
|
-
description: string;
|
|
787
|
-
value: number;
|
|
788
|
-
};
|
|
789
|
-
ACTIVE_VENDOR_PRO_SUBSCRIPTION: {
|
|
790
|
-
description: string;
|
|
791
|
-
value: number;
|
|
792
|
-
};
|
|
793
|
-
ACTIVE_VENDOR_STANDARD_SUBSCRIPTION: {
|
|
794
|
-
description: string;
|
|
795
|
-
value: number;
|
|
796
|
-
};
|
|
797
|
-
ACTIVE_VENDOR_BONUS_REWARD: {
|
|
798
|
-
description: string;
|
|
799
|
-
value: number;
|
|
800
|
-
};
|
|
801
|
-
ACTIVE_EVENT_WITH_VENDOR_REGISTRATIONS: {
|
|
802
|
-
description: string;
|
|
803
|
-
value: number;
|
|
804
|
-
};
|
|
805
|
-
};
|
|
806
|
-
/**
|
|
807
|
-
* Create an affiliate reward
|
|
808
|
-
* @param rewardType - The type of reward
|
|
809
|
-
* @param createdAt - The date the reward was received
|
|
810
|
-
* @returns The affiliate reward
|
|
811
|
-
* @example
|
|
812
|
-
* const reward = createAffiliateReward(EnumAffiliateRewardType.NEW_EVENT_REGISTRATION, new Date());
|
|
813
|
-
* console.log(reward);
|
|
814
|
-
*/
|
|
815
|
-
declare function createAffiliateReward(rewardType: EnumAffiliateRewardType, createdAt: Date): AffiliateRewardType;
|
|
816
|
-
|
|
817
780
|
/**
|
|
818
781
|
* Loads the affiliate whose `affiliateCode` matches the given promo code.
|
|
819
782
|
*
|
|
@@ -955,4 +918,4 @@ declare function didRemoveAnyEventDates(previousDateTime: EventDateSlot[] | unde
|
|
|
955
918
|
*/
|
|
956
919
|
declare function updateRelationDatesToUnavailable(relationDates: SchemaRelationType["relationDates"], eventDateTime: DateTimeWithPriceType[] | undefined): SchemaRelationType["relationDates"];
|
|
957
920
|
|
|
958
|
-
export { ACTIVE_NOT_DELETED_FILTER,
|
|
921
|
+
export { ACTIVE_NOT_DELETED_FILTER, APP_SETTINGS_ID, AdModel, AffiliateModel, AppSettingModel, type AuthUser, type AwardAffiliateVendorSubscriptionRewardsResult, CategorySchema, ChatModel, ChatReportModel, ContactDetailsSchema, EnumPubSubEvents, EventInfoModel, EventModel, GameModel, GoogleImportedMarketModel, type GraphQLContext, NotificationModel, type NotificationPubSub, type ObjectId, OwnerTypeSchema, PartnerModel, PostModel, PushTokenModel, RelationModel, RelationTypeSchema, ResourceActivityModel, ResourceImageTypeSchema, type SchemaAffiliateResourceType, type SchemaAffiliateReward, 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 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, connectToDatabase, convertObjectIdsToStrings, dateTimeSchema, didRemoveAnyEventDates, findAffiliateByPromoCode, findEventOrImportedMarketById, getSubscriptionRewardPeriodBounds, locationGeoSchema, locationsSchema, mapVendorLicenceToSubscriptionRewardType, normalizeAffiliatePromoCodes, normalizePromoCode, notifyUsers, publishNotificationEvents, refundPolicySchema, relatedPostSchema, relationDatesSchema, resourceRelationsSchema, saveNotificationsInDb, sendPushNotifications, socialShareResourceSchema, termsAgreementSchema, updateAdStatuses, updateAllEventDateTimeStatuses, updateRelationDatesToUnavailable, updateSingleDateTimeStatus, updateVendorBasedOnUserLicense, userLicenseSchema };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _timardex_cluemart_shared from '@timardex/cluemart-shared';
|
|
2
|
-
import { AdType, CreateBulkNotificationInput, NotificationType, EnumUserRole, ChatMessageType, ParticipantType, ChatType, ReportChatUser, RelatedPostType, OwnerType, SocialMediaType, ResourceImageType, Category, UserLicenceType, ResourceContactDetailsType, TermsAgreement, RelationDate, DateTimeType, LocationGeoType, LocationType, SocialShareResourceType, PosterUsageType, GoogleImportedMarket, PushTokenType, RelationType, ResourceActivityType, UserActivityEvent, UserType, VendorType, VendorInfoType, UnregisteredVendorInvitationType, UnregisteredVendorType, EventType, StallType, RefundPolicy, EventInfoType, PartnerType, PostType, PostContentType, PostResource, AppSettingsType, GameType, GameDocType, SchoolType, AffiliateRewardType, AffiliateResourceType, AffiliateType,
|
|
2
|
+
import { AdType, CreateBulkNotificationInput, NotificationType, EnumUserRole, ChatMessageType, ParticipantType, ChatType, ReportChatUser, RelatedPostType, OwnerType, SocialMediaType, ResourceImageType, Category, UserLicenceType, ResourceContactDetailsType, TermsAgreement, RelationDate, DateTimeType, LocationGeoType, LocationType, SocialShareResourceType, PosterUsageType, GoogleImportedMarket, PushTokenType, RelationType, ResourceActivityType, UserActivityEvent, UserType, VendorType, VendorInfoType, UnregisteredVendorInvitationType, UnregisteredVendorType, EventType, StallType, RefundPolicy, EventInfoType, PartnerType, PostType, PostContentType, PostResource, AppSettingsType, GameType, GameDocType, SchoolType, AffiliateRewardType, AffiliateResourceType, AffiliateType, PromoCodeType, EnumAffiliateRewardType, EnumUserLicence, EventListItemType, DateTimeWithPriceType } 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';
|
|
@@ -765,7 +765,7 @@ type AwardAffiliateVendorSubscriptionRewardsResult = {
|
|
|
765
765
|
* - Vendor owner has a non-expired Standard / Pro / Pro+ vendor licence
|
|
766
766
|
*
|
|
767
767
|
* Reward type follows the owner's highest valid licence + Stripe paying status:
|
|
768
|
-
* - Pro / Pro+ with
|
|
768
|
+
* - Pro / Pro+ with paying Stripe (ACTIVE/TRIALING) → `ACTIVE_VENDOR_PRO_SUBSCRIPTION` (3 pts)
|
|
769
769
|
* - Pro / Pro+ without paying Stripe → `ACTIVE_VENDOR_STANDARD_SUBSCRIPTION` (1 pt)
|
|
770
770
|
* - Standard → `ACTIVE_VENDOR_STANDARD_SUBSCRIPTION` (1 pt)
|
|
771
771
|
*
|
|
@@ -777,43 +777,6 @@ type AwardAffiliateVendorSubscriptionRewardsResult = {
|
|
|
777
777
|
*/
|
|
778
778
|
declare function awardAffiliateVendorSubscriptionRewards(now?: Date): Promise<AwardAffiliateVendorSubscriptionRewardsResult>;
|
|
779
779
|
|
|
780
|
-
declare const AFFILIATE_REWARDS: {
|
|
781
|
-
NEW_EVENT_REGISTRATION: {
|
|
782
|
-
description: string;
|
|
783
|
-
value: number;
|
|
784
|
-
};
|
|
785
|
-
NEW_VENDOR_REGISTRATION: {
|
|
786
|
-
description: string;
|
|
787
|
-
value: number;
|
|
788
|
-
};
|
|
789
|
-
ACTIVE_VENDOR_PRO_SUBSCRIPTION: {
|
|
790
|
-
description: string;
|
|
791
|
-
value: number;
|
|
792
|
-
};
|
|
793
|
-
ACTIVE_VENDOR_STANDARD_SUBSCRIPTION: {
|
|
794
|
-
description: string;
|
|
795
|
-
value: number;
|
|
796
|
-
};
|
|
797
|
-
ACTIVE_VENDOR_BONUS_REWARD: {
|
|
798
|
-
description: string;
|
|
799
|
-
value: number;
|
|
800
|
-
};
|
|
801
|
-
ACTIVE_EVENT_WITH_VENDOR_REGISTRATIONS: {
|
|
802
|
-
description: string;
|
|
803
|
-
value: number;
|
|
804
|
-
};
|
|
805
|
-
};
|
|
806
|
-
/**
|
|
807
|
-
* Create an affiliate reward
|
|
808
|
-
* @param rewardType - The type of reward
|
|
809
|
-
* @param createdAt - The date the reward was received
|
|
810
|
-
* @returns The affiliate reward
|
|
811
|
-
* @example
|
|
812
|
-
* const reward = createAffiliateReward(EnumAffiliateRewardType.NEW_EVENT_REGISTRATION, new Date());
|
|
813
|
-
* console.log(reward);
|
|
814
|
-
*/
|
|
815
|
-
declare function createAffiliateReward(rewardType: EnumAffiliateRewardType, createdAt: Date): AffiliateRewardType;
|
|
816
|
-
|
|
817
780
|
/**
|
|
818
781
|
* Loads the affiliate whose `affiliateCode` matches the given promo code.
|
|
819
782
|
*
|
|
@@ -955,4 +918,4 @@ declare function didRemoveAnyEventDates(previousDateTime: EventDateSlot[] | unde
|
|
|
955
918
|
*/
|
|
956
919
|
declare function updateRelationDatesToUnavailable(relationDates: SchemaRelationType["relationDates"], eventDateTime: DateTimeWithPriceType[] | undefined): SchemaRelationType["relationDates"];
|
|
957
920
|
|
|
958
|
-
export { ACTIVE_NOT_DELETED_FILTER,
|
|
921
|
+
export { ACTIVE_NOT_DELETED_FILTER, APP_SETTINGS_ID, AdModel, AffiliateModel, AppSettingModel, type AuthUser, type AwardAffiliateVendorSubscriptionRewardsResult, CategorySchema, ChatModel, ChatReportModel, ContactDetailsSchema, EnumPubSubEvents, EventInfoModel, EventModel, GameModel, GoogleImportedMarketModel, type GraphQLContext, NotificationModel, type NotificationPubSub, type ObjectId, OwnerTypeSchema, PartnerModel, PostModel, PushTokenModel, RelationModel, RelationTypeSchema, ResourceActivityModel, ResourceImageTypeSchema, type SchemaAffiliateResourceType, type SchemaAffiliateReward, 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 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, connectToDatabase, convertObjectIdsToStrings, dateTimeSchema, didRemoveAnyEventDates, findAffiliateByPromoCode, findEventOrImportedMarketById, getSubscriptionRewardPeriodBounds, locationGeoSchema, locationsSchema, mapVendorLicenceToSubscriptionRewardType, normalizeAffiliatePromoCodes, normalizePromoCode, notifyUsers, publishNotificationEvents, refundPolicySchema, relatedPostSchema, relationDatesSchema, resourceRelationsSchema, saveNotificationsInDb, sendPushNotifications, socialShareResourceSchema, termsAgreementSchema, updateAdStatuses, updateAllEventDateTimeStatuses, updateRelationDatesToUnavailable, updateSingleDateTimeStatus, updateVendorBasedOnUserLicense, userLicenseSchema };
|