@timardex/cluemart-server-shared 1.1.28 → 1.1.30
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-SKEMDS6Z.mjs → chunk-5A746NK4.mjs} +57 -20
- package/dist/chunk-5A746NK4.mjs.map +1 -0
- package/dist/index.cjs +86 -39
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +86 -39
- package/dist/index.mjs.map +1 -1
- package/dist/mongoose/index.cjs +56 -19
- package/dist/mongoose/index.cjs.map +1 -1
- package/dist/mongoose/index.mjs +1 -1
- package/dist/service/index.cjs +86 -39
- package/dist/service/index.cjs.map +1 -1
- package/dist/service/index.mjs +31 -21
- package/dist/service/index.mjs.map +1 -1
- package/package.json +2 -2
- package/dist/chunk-SKEMDS6Z.mjs.map +0 -1
package/dist/mongoose/index.mjs
CHANGED
package/dist/service/index.cjs
CHANGED
|
@@ -3301,9 +3301,10 @@ var EnumFoodFlavor = /* @__PURE__ */ ((EnumFoodFlavor22) => {
|
|
|
3301
3301
|
var EnumResourceType = /* @__PURE__ */ ((EnumResourceType22) => {
|
|
3302
3302
|
EnumResourceType22["AFFILIATE"] = "affiliate";
|
|
3303
3303
|
EnumResourceType22["EVENT"] = "event";
|
|
3304
|
-
EnumResourceType22["VENDOR"] = "vendor";
|
|
3305
3304
|
EnumResourceType22["PARTNER"] = "partner";
|
|
3306
3305
|
EnumResourceType22["SCHOOL"] = "school";
|
|
3306
|
+
EnumResourceType22["VENDOR"] = "vendor";
|
|
3307
|
+
EnumResourceType22["VISITOR"] = "visitor";
|
|
3307
3308
|
return EnumResourceType22;
|
|
3308
3309
|
})(EnumResourceType || {});
|
|
3309
3310
|
var EnumEventType = /* @__PURE__ */ ((EnumEventType22) => {
|
|
@@ -3450,20 +3451,15 @@ var EnumReward = /* @__PURE__ */ ((EnumReward22) => {
|
|
|
3450
3451
|
var OBJECT_ID_PATH_SEGMENT = "[a-f0-9]{24}";
|
|
3451
3452
|
var OBJECT_ID_PATH_SEGMENT_END = `${OBJECT_ID_PATH_SEGMENT}$`;
|
|
3452
3453
|
var gameScreenIdentifierList = [
|
|
3453
|
-
{
|
|
3454
|
-
clue: "Where your actions turn into a timeline.",
|
|
3455
|
-
id: "activities",
|
|
3456
|
-
match: "/profile/account/favourites"
|
|
3457
|
-
},
|
|
3458
3454
|
{
|
|
3459
3455
|
clue: "Where conversations happen without speaking.",
|
|
3460
3456
|
id: "chat",
|
|
3461
3457
|
match: "/chat"
|
|
3462
3458
|
},
|
|
3463
3459
|
{
|
|
3464
|
-
clue: "
|
|
3465
|
-
id: "
|
|
3466
|
-
match: "/
|
|
3460
|
+
clue: "Where you can find your loyalties.",
|
|
3461
|
+
id: "coupons",
|
|
3462
|
+
match: "/coupons"
|
|
3467
3463
|
},
|
|
3468
3464
|
{
|
|
3469
3465
|
clue: "A single moment worth showing up for.",
|
|
@@ -3498,18 +3494,13 @@ var gameScreenIdentifierList = [
|
|
|
3498
3494
|
{
|
|
3499
3495
|
clue: "Your starting point for everything.",
|
|
3500
3496
|
id: "home",
|
|
3501
|
-
match: "/"
|
|
3497
|
+
match: "/home"
|
|
3502
3498
|
},
|
|
3503
3499
|
{
|
|
3504
3500
|
clue: "Where the app whispers what you shouldn\u2019t miss.",
|
|
3505
3501
|
id: "notifications",
|
|
3506
3502
|
match: "/notifications"
|
|
3507
3503
|
},
|
|
3508
|
-
{
|
|
3509
|
-
clue: "Where you fine-tune your experience.",
|
|
3510
|
-
id: "options",
|
|
3511
|
-
match: "/options"
|
|
3512
|
-
},
|
|
3513
3504
|
{
|
|
3514
3505
|
clue: "An organisation or creator supporting the community.",
|
|
3515
3506
|
id: "single-partner",
|
|
@@ -3521,15 +3512,30 @@ var gameScreenIdentifierList = [
|
|
|
3521
3512
|
match: "/partners"
|
|
3522
3513
|
},
|
|
3523
3514
|
{
|
|
3524
|
-
clue: "
|
|
3525
|
-
id: "
|
|
3526
|
-
match:
|
|
3515
|
+
clue: "Where your actions turn into a timeline.",
|
|
3516
|
+
id: "activities",
|
|
3517
|
+
match: "/profile/account/favourites"
|
|
3518
|
+
},
|
|
3519
|
+
{
|
|
3520
|
+
clue: "The place to redefine who you are.",
|
|
3521
|
+
id: "edit-profile",
|
|
3522
|
+
match: "/profile/account"
|
|
3527
3523
|
},
|
|
3528
3524
|
{
|
|
3529
3525
|
clue: "Your identity, on display.",
|
|
3530
3526
|
id: "profile",
|
|
3531
3527
|
match: "/profile"
|
|
3532
3528
|
},
|
|
3529
|
+
{
|
|
3530
|
+
clue: "Where you can redeem your rewards.",
|
|
3531
|
+
id: "rewards",
|
|
3532
|
+
match: "/profile/account/rewards"
|
|
3533
|
+
},
|
|
3534
|
+
{
|
|
3535
|
+
clue: "A single published post in full view.",
|
|
3536
|
+
id: "single-visitor-post",
|
|
3537
|
+
match: new RegExp(`^/visitors/post/${OBJECT_ID_PATH_SEGMENT_END}`)
|
|
3538
|
+
},
|
|
3533
3539
|
{
|
|
3534
3540
|
clue: "One stallholder offering something valuable.",
|
|
3535
3541
|
id: "single-vendor",
|
|
@@ -3544,6 +3550,11 @@ var gameScreenIdentifierList = [
|
|
|
3544
3550
|
clue: "Where you browse articles and posts from around the platform.",
|
|
3545
3551
|
id: "visitors",
|
|
3546
3552
|
match: "/visitors"
|
|
3553
|
+
},
|
|
3554
|
+
{
|
|
3555
|
+
clue: "Where you fine-tune your experience.",
|
|
3556
|
+
id: "options",
|
|
3557
|
+
match: "/options"
|
|
3547
3558
|
}
|
|
3548
3559
|
];
|
|
3549
3560
|
var mapArrayToOptions = (items) => items.map((item) => ({
|
|
@@ -5139,6 +5150,7 @@ var USER_FIELDS_FRAGMENT = gql`
|
|
|
5139
5150
|
firstName
|
|
5140
5151
|
game
|
|
5141
5152
|
isTester
|
|
5153
|
+
interests
|
|
5142
5154
|
lastName
|
|
5143
5155
|
nickName
|
|
5144
5156
|
licences {
|
|
@@ -5424,11 +5436,13 @@ var GET_EVENTS_BY_REGION = gql`
|
|
|
5424
5436
|
$region: String!
|
|
5425
5437
|
$options: ResourcesByRegionOptions
|
|
5426
5438
|
$dateStatus: EventDateStatusEnumType
|
|
5439
|
+
$tags: [String]
|
|
5427
5440
|
) {
|
|
5428
5441
|
eventsByRegion(
|
|
5429
5442
|
region: $region
|
|
5430
5443
|
options: $options
|
|
5431
5444
|
dateStatus: $dateStatus
|
|
5445
|
+
tags: $tags
|
|
5432
5446
|
) {
|
|
5433
5447
|
...EventListItemFields
|
|
5434
5448
|
}
|
|
@@ -6707,6 +6721,20 @@ var GET_USER_RESOURCES = gql`
|
|
|
6707
6721
|
}
|
|
6708
6722
|
}
|
|
6709
6723
|
`;
|
|
6724
|
+
var GET_USERS_BY_PROMO_CODE = gql`
|
|
6725
|
+
query getUsersByPromoCode($promoCode: String!, $limit: Int, $offset: Int) {
|
|
6726
|
+
usersByPromoCode(promoCode: $promoCode, limit: $limit, offset: $offset) {
|
|
6727
|
+
active
|
|
6728
|
+
avatar {
|
|
6729
|
+
...ResourceImageFields
|
|
6730
|
+
}
|
|
6731
|
+
deletedAt
|
|
6732
|
+
nickName
|
|
6733
|
+
userId
|
|
6734
|
+
}
|
|
6735
|
+
}
|
|
6736
|
+
${RESOURCE_IMAGE_FIELDS_FRAGMENT}
|
|
6737
|
+
`;
|
|
6710
6738
|
var NOTIFICATION_FRAGMENT = gql`
|
|
6711
6739
|
fragment NotificationFields on Notification {
|
|
6712
6740
|
_id
|
|
@@ -7836,6 +7864,8 @@ var COUPON_PARTICIPANT_USER_FIELDS_FRAGMENT = gql`
|
|
|
7836
7864
|
fragment CouponParticipantUserFields on CouponParticipantUserType {
|
|
7837
7865
|
couponCollectedCount
|
|
7838
7866
|
couponRedeemedAt
|
|
7867
|
+
couponRedeemedCount
|
|
7868
|
+
couponCycleRedeemed
|
|
7839
7869
|
createdAt
|
|
7840
7870
|
updatedAt
|
|
7841
7871
|
userId
|
|
@@ -8824,7 +8854,7 @@ schema4.index({ isRead: 1, userId: 1 });
|
|
|
8824
8854
|
schema4.index({ createdAt: -1, userId: 1 });
|
|
8825
8855
|
var NotificationModel = import_mongoose8.default.models.Notification || import_mongoose8.default.model("Notification", schema4);
|
|
8826
8856
|
|
|
8827
|
-
// node_modules/@timardex/cluemart-shared/dist/chunk-
|
|
8857
|
+
// node_modules/@timardex/cluemart-shared/dist/chunk-D5BWQS2J.mjs
|
|
8828
8858
|
var EnumInviteStatus2 = /* @__PURE__ */ ((EnumInviteStatus22) => {
|
|
8829
8859
|
EnumInviteStatus22["ACCEPTED"] = "Accepted";
|
|
8830
8860
|
EnumInviteStatus22["COMPLETED"] = "Completed";
|
|
@@ -9081,6 +9111,11 @@ var schema7 = new MongooseSchema11(
|
|
|
9081
9111
|
required: false,
|
|
9082
9112
|
type: import_mongoose11.default.Schema.Types.ObjectId
|
|
9083
9113
|
},
|
|
9114
|
+
interests: {
|
|
9115
|
+
enum: Object.values(EnumResourceType),
|
|
9116
|
+
required: false,
|
|
9117
|
+
type: [String]
|
|
9118
|
+
},
|
|
9084
9119
|
isTester: { default: false, required: true, type: Boolean },
|
|
9085
9120
|
lastName: { required: true, type: String },
|
|
9086
9121
|
licences: {
|
|
@@ -9930,7 +9965,9 @@ var couponCodeSchema = new MongooseSchema26(
|
|
|
9930
9965
|
var couponParticipantUserSchema = new MongooseSchema26(
|
|
9931
9966
|
{
|
|
9932
9967
|
couponCollectedCount: { default: 0, required: true, type: Number },
|
|
9968
|
+
couponCycleRedeemed: { default: false, required: true, type: Boolean },
|
|
9933
9969
|
couponRedeemedAt: { default: null, required: false, type: Date },
|
|
9970
|
+
couponRedeemedCount: { default: 0, required: true, type: Number },
|
|
9934
9971
|
userId: {
|
|
9935
9972
|
ref: "User",
|
|
9936
9973
|
required: true,
|
|
@@ -9994,7 +10031,7 @@ async function activeAffiliateCodeExists(affiliateCode) {
|
|
|
9994
10031
|
return existing !== null;
|
|
9995
10032
|
}
|
|
9996
10033
|
|
|
9997
|
-
// node_modules/@timardex/cluemart-shared/dist/chunk-
|
|
10034
|
+
// node_modules/@timardex/cluemart-shared/dist/chunk-HAPY4NHC.mjs
|
|
9998
10035
|
var import_dayjs3 = __toESM(require("dayjs"), 1);
|
|
9999
10036
|
var import_customParseFormat2 = __toESM(require("dayjs/plugin/customParseFormat.js"), 1);
|
|
10000
10037
|
var import_isSameOrAfter2 = __toESM(require("dayjs/plugin/isSameOrAfter.js"), 1);
|
|
@@ -10049,25 +10086,20 @@ var SHARE_RESOURCE_LABEL2 = {
|
|
|
10049
10086
|
school: "School"
|
|
10050
10087
|
};
|
|
10051
10088
|
|
|
10052
|
-
// node_modules/@timardex/cluemart-shared/dist/chunk-
|
|
10089
|
+
// node_modules/@timardex/cluemart-shared/dist/chunk-CAI7BTMN.mjs
|
|
10053
10090
|
var PROMO_CODE_PREFIX2 = "CM-";
|
|
10054
10091
|
var OBJECT_ID_PATH_SEGMENT2 = "[a-f0-9]{24}";
|
|
10055
10092
|
var OBJECT_ID_PATH_SEGMENT_END2 = `${OBJECT_ID_PATH_SEGMENT2}$`;
|
|
10056
10093
|
var gameScreenIdentifierList2 = [
|
|
10057
|
-
{
|
|
10058
|
-
clue: "Where your actions turn into a timeline.",
|
|
10059
|
-
id: "activities",
|
|
10060
|
-
match: "/profile/account/favourites"
|
|
10061
|
-
},
|
|
10062
10094
|
{
|
|
10063
10095
|
clue: "Where conversations happen without speaking.",
|
|
10064
10096
|
id: "chat",
|
|
10065
10097
|
match: "/chat"
|
|
10066
10098
|
},
|
|
10067
10099
|
{
|
|
10068
|
-
clue: "
|
|
10069
|
-
id: "
|
|
10070
|
-
match: "/
|
|
10100
|
+
clue: "Where you can find your loyalties.",
|
|
10101
|
+
id: "coupons",
|
|
10102
|
+
match: "/coupons"
|
|
10071
10103
|
},
|
|
10072
10104
|
{
|
|
10073
10105
|
clue: "A single moment worth showing up for.",
|
|
@@ -10102,18 +10134,13 @@ var gameScreenIdentifierList2 = [
|
|
|
10102
10134
|
{
|
|
10103
10135
|
clue: "Your starting point for everything.",
|
|
10104
10136
|
id: "home",
|
|
10105
|
-
match: "/"
|
|
10137
|
+
match: "/home"
|
|
10106
10138
|
},
|
|
10107
10139
|
{
|
|
10108
10140
|
clue: "Where the app whispers what you shouldn\u2019t miss.",
|
|
10109
10141
|
id: "notifications",
|
|
10110
10142
|
match: "/notifications"
|
|
10111
10143
|
},
|
|
10112
|
-
{
|
|
10113
|
-
clue: "Where you fine-tune your experience.",
|
|
10114
|
-
id: "options",
|
|
10115
|
-
match: "/options"
|
|
10116
|
-
},
|
|
10117
10144
|
{
|
|
10118
10145
|
clue: "An organisation or creator supporting the community.",
|
|
10119
10146
|
id: "single-partner",
|
|
@@ -10125,15 +10152,30 @@ var gameScreenIdentifierList2 = [
|
|
|
10125
10152
|
match: "/partners"
|
|
10126
10153
|
},
|
|
10127
10154
|
{
|
|
10128
|
-
clue: "
|
|
10129
|
-
id: "
|
|
10130
|
-
match:
|
|
10155
|
+
clue: "Where your actions turn into a timeline.",
|
|
10156
|
+
id: "activities",
|
|
10157
|
+
match: "/profile/account/favourites"
|
|
10158
|
+
},
|
|
10159
|
+
{
|
|
10160
|
+
clue: "The place to redefine who you are.",
|
|
10161
|
+
id: "edit-profile",
|
|
10162
|
+
match: "/profile/account"
|
|
10131
10163
|
},
|
|
10132
10164
|
{
|
|
10133
10165
|
clue: "Your identity, on display.",
|
|
10134
10166
|
id: "profile",
|
|
10135
10167
|
match: "/profile"
|
|
10136
10168
|
},
|
|
10169
|
+
{
|
|
10170
|
+
clue: "Where you can redeem your rewards.",
|
|
10171
|
+
id: "rewards",
|
|
10172
|
+
match: "/profile/account/rewards"
|
|
10173
|
+
},
|
|
10174
|
+
{
|
|
10175
|
+
clue: "A single published post in full view.",
|
|
10176
|
+
id: "single-visitor-post",
|
|
10177
|
+
match: new RegExp(`^/visitors/post/${OBJECT_ID_PATH_SEGMENT_END2}`)
|
|
10178
|
+
},
|
|
10137
10179
|
{
|
|
10138
10180
|
clue: "One stallholder offering something valuable.",
|
|
10139
10181
|
id: "single-vendor",
|
|
@@ -10148,10 +10190,15 @@ var gameScreenIdentifierList2 = [
|
|
|
10148
10190
|
clue: "Where you browse articles and posts from around the platform.",
|
|
10149
10191
|
id: "visitors",
|
|
10150
10192
|
match: "/visitors"
|
|
10193
|
+
},
|
|
10194
|
+
{
|
|
10195
|
+
clue: "Where you fine-tune your experience.",
|
|
10196
|
+
id: "options",
|
|
10197
|
+
match: "/options"
|
|
10151
10198
|
}
|
|
10152
10199
|
];
|
|
10153
10200
|
|
|
10154
|
-
// node_modules/@timardex/cluemart-shared/dist/chunk-
|
|
10201
|
+
// node_modules/@timardex/cluemart-shared/dist/chunk-LYL3X7HT.mjs
|
|
10155
10202
|
var import_dayjs4 = __toESM(require("dayjs"), 1);
|
|
10156
10203
|
var statusOptions2 = [
|
|
10157
10204
|
...Object.values(EnumInviteStatus2).map((status) => ({
|