@timardex/cluemart-server-shared 1.0.303 → 1.0.305
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-GQWLGM2W.mjs → chunk-7X5A335O.mjs} +11 -1
- package/dist/chunk-7X5A335O.mjs.map +1 -0
- package/dist/index.cjs +17 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +5 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.mjs +16 -2
- package/dist/index.mjs.map +1 -1
- package/dist/mongoose/index.cjs +10 -0
- package/dist/mongoose/index.cjs.map +1 -1
- package/dist/mongoose/index.mjs +1 -1
- package/dist/service/index.cjs +17 -2
- package/dist/service/index.cjs.map +1 -1
- package/dist/service/index.d.mts +5 -1
- package/dist/service/index.d.ts +5 -1
- package/dist/service/index.mjs +7 -3
- package/dist/service/index.mjs.map +1 -1
- package/package.json +2 -2
- package/dist/chunk-GQWLGM2W.mjs.map +0 -1
package/dist/index.d.mts
CHANGED
|
@@ -878,6 +878,10 @@ declare function updateAdStatuses(): Promise<void>;
|
|
|
878
878
|
|
|
879
879
|
declare function updateVendorBasedOnUserLicense(userId: ObjectId, licenceType: EnumUserLicence): Promise<void>;
|
|
880
880
|
|
|
881
|
+
/**
|
|
882
|
+
* True when `value` is a valid Mongo ObjectId string.
|
|
883
|
+
*/
|
|
884
|
+
declare function isValidObjectId(value: string): boolean;
|
|
881
885
|
/**
|
|
882
886
|
* Recursively converts all ObjectId fields to strings in an object
|
|
883
887
|
* This is needed because GraphQL expects string IDs, not ObjectIds
|
|
@@ -918,4 +922,4 @@ declare function didRemoveAnyEventDates(previousDateTime: EventDateSlot[] | unde
|
|
|
918
922
|
*/
|
|
919
923
|
declare function updateRelationDatesToUnavailable(relationDates: SchemaRelationType["relationDates"], eventDateTime: DateTimeWithPriceType[] | undefined): SchemaRelationType["relationDates"];
|
|
920
924
|
|
|
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 };
|
|
925
|
+
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, isValidObjectId, 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
|
@@ -878,6 +878,10 @@ declare function updateAdStatuses(): Promise<void>;
|
|
|
878
878
|
|
|
879
879
|
declare function updateVendorBasedOnUserLicense(userId: ObjectId, licenceType: EnumUserLicence): Promise<void>;
|
|
880
880
|
|
|
881
|
+
/**
|
|
882
|
+
* True when `value` is a valid Mongo ObjectId string.
|
|
883
|
+
*/
|
|
884
|
+
declare function isValidObjectId(value: string): boolean;
|
|
881
885
|
/**
|
|
882
886
|
* Recursively converts all ObjectId fields to strings in an object
|
|
883
887
|
* This is needed because GraphQL expects string IDs, not ObjectIds
|
|
@@ -918,4 +922,4 @@ declare function didRemoveAnyEventDates(previousDateTime: EventDateSlot[] | unde
|
|
|
918
922
|
*/
|
|
919
923
|
declare function updateRelationDatesToUnavailable(relationDates: SchemaRelationType["relationDates"], eventDateTime: DateTimeWithPriceType[] | undefined): SchemaRelationType["relationDates"];
|
|
920
924
|
|
|
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 };
|
|
925
|
+
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, isValidObjectId, locationGeoSchema, locationsSchema, mapVendorLicenceToSubscriptionRewardType, normalizeAffiliatePromoCodes, normalizePromoCode, notifyUsers, publishNotificationEvents, refundPolicySchema, relatedPostSchema, relationDatesSchema, resourceRelationsSchema, saveNotificationsInDb, sendPushNotifications, socialShareResourceSchema, termsAgreementSchema, updateAdStatuses, updateAllEventDateTimeStatuses, updateRelationDatesToUnavailable, updateSingleDateTimeStatus, updateVendorBasedOnUserLicense, userLicenseSchema };
|
package/dist/index.mjs
CHANGED
|
@@ -7282,12 +7282,16 @@ var AFFILIATE_RESOURCE_FIELDS_FRAGMENT = gql`
|
|
|
7282
7282
|
resourceDeletedAt
|
|
7283
7283
|
resourceId
|
|
7284
7284
|
resourceName
|
|
7285
|
+
resourceOwner {
|
|
7286
|
+
...OwnerFields
|
|
7287
|
+
}
|
|
7285
7288
|
resourceType
|
|
7286
7289
|
rewards {
|
|
7287
7290
|
...AffiliateRewardFields
|
|
7288
7291
|
}
|
|
7289
7292
|
}
|
|
7290
7293
|
${AFFILIATE_REWARD_FIELDS_FRAGMENT}
|
|
7294
|
+
${OWNER_FIELDS_FRAGMENT}
|
|
7291
7295
|
`;
|
|
7292
7296
|
var AFFILIATE_BANK_ACCOUNT_DETAILS_FIELDS_FRAGMENT = gql`
|
|
7293
7297
|
fragment AffiliateBankAccountDetailsFields on AffiliateBankAccountDetailsType {
|
|
@@ -7342,6 +7346,7 @@ var AFFILIATE_FIELDS_FRAGMENT = gql`
|
|
|
7342
7346
|
createdAt
|
|
7343
7347
|
deletedAt
|
|
7344
7348
|
redeemHistory {
|
|
7349
|
+
paidAt
|
|
7345
7350
|
redeemedAt
|
|
7346
7351
|
rewardValue
|
|
7347
7352
|
}
|
|
@@ -9148,6 +9153,10 @@ var affiliateResourceSchema = new MongooseSchema25(
|
|
|
9148
9153
|
type: mongoose25.Schema.Types.ObjectId
|
|
9149
9154
|
},
|
|
9150
9155
|
resourceName: { required: true, type: String },
|
|
9156
|
+
resourceOwner: {
|
|
9157
|
+
required: true,
|
|
9158
|
+
type: OwnerTypeSchema
|
|
9159
|
+
},
|
|
9151
9160
|
resourceType: {
|
|
9152
9161
|
enum: Object.values(EnumResourceType),
|
|
9153
9162
|
required: true,
|
|
@@ -9199,6 +9208,7 @@ var affiliateDetailsSchema = new MongooseSchema25(
|
|
|
9199
9208
|
);
|
|
9200
9209
|
var redeemHistorySchema = new MongooseSchema25(
|
|
9201
9210
|
{
|
|
9211
|
+
paidAt: { default: null, required: false, type: Date },
|
|
9202
9212
|
redeemedAt: { required: true, type: Date },
|
|
9203
9213
|
rewardValue: { required: true, type: Number }
|
|
9204
9214
|
},
|
|
@@ -9313,7 +9323,7 @@ var SHARE_RESOURCE_LABEL2 = {
|
|
|
9313
9323
|
school: "School"
|
|
9314
9324
|
};
|
|
9315
9325
|
|
|
9316
|
-
// node_modules/@timardex/cluemart-shared/dist/chunk-
|
|
9326
|
+
// node_modules/@timardex/cluemart-shared/dist/chunk-OBZTGPBJ.mjs
|
|
9317
9327
|
var PROMO_CODE_PREFIX2 = "CM-";
|
|
9318
9328
|
var OBJECT_ID_PATH_SEGMENT2 = "[a-f0-9]{24}";
|
|
9319
9329
|
var OBJECT_ID_PATH_SEGMENT_END2 = `${OBJECT_ID_PATH_SEGMENT2}$`;
|
|
@@ -9415,7 +9425,7 @@ var gameScreenIdentifierList2 = [
|
|
|
9415
9425
|
}
|
|
9416
9426
|
];
|
|
9417
9427
|
|
|
9418
|
-
// node_modules/@timardex/cluemart-shared/dist/chunk-
|
|
9428
|
+
// node_modules/@timardex/cluemart-shared/dist/chunk-QBU7N4P2.mjs
|
|
9419
9429
|
import dayjs4 from "dayjs";
|
|
9420
9430
|
var statusOptions2 = [
|
|
9421
9431
|
...Object.values(EnumInviteStatus2).map((status) => ({
|
|
@@ -10983,6 +10993,9 @@ async function updateVendorBasedOnUserLicense(userId, licenceType) {
|
|
|
10983
10993
|
|
|
10984
10994
|
// src/service/objectIdToString.ts
|
|
10985
10995
|
import mongoose28 from "mongoose";
|
|
10996
|
+
function isValidObjectId(value) {
|
|
10997
|
+
return mongoose28.Types.ObjectId.isValid(value);
|
|
10998
|
+
}
|
|
10986
10999
|
function convertObjectIdsToStrings(obj) {
|
|
10987
11000
|
if (obj === null || obj === void 0) {
|
|
10988
11001
|
return obj;
|
|
@@ -11211,6 +11224,7 @@ export {
|
|
|
11211
11224
|
findAffiliateByPromoCode,
|
|
11212
11225
|
findEventOrImportedMarketById,
|
|
11213
11226
|
getSubscriptionRewardPeriodBounds,
|
|
11227
|
+
isValidObjectId,
|
|
11214
11228
|
locationGeoSchema,
|
|
11215
11229
|
locationsSchema,
|
|
11216
11230
|
mapVendorLicenceToSubscriptionRewardType,
|