@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/index.mjs CHANGED
@@ -3241,9 +3241,10 @@ var EnumFoodFlavor = /* @__PURE__ */ ((EnumFoodFlavor22) => {
3241
3241
  var EnumResourceType = /* @__PURE__ */ ((EnumResourceType22) => {
3242
3242
  EnumResourceType22["AFFILIATE"] = "affiliate";
3243
3243
  EnumResourceType22["EVENT"] = "event";
3244
- EnumResourceType22["VENDOR"] = "vendor";
3245
3244
  EnumResourceType22["PARTNER"] = "partner";
3246
3245
  EnumResourceType22["SCHOOL"] = "school";
3246
+ EnumResourceType22["VENDOR"] = "vendor";
3247
+ EnumResourceType22["VISITOR"] = "visitor";
3247
3248
  return EnumResourceType22;
3248
3249
  })(EnumResourceType || {});
3249
3250
  var EnumEventType = /* @__PURE__ */ ((EnumEventType22) => {
@@ -3390,20 +3391,15 @@ var EnumReward = /* @__PURE__ */ ((EnumReward22) => {
3390
3391
  var OBJECT_ID_PATH_SEGMENT = "[a-f0-9]{24}";
3391
3392
  var OBJECT_ID_PATH_SEGMENT_END = `${OBJECT_ID_PATH_SEGMENT}$`;
3392
3393
  var gameScreenIdentifierList = [
3393
- {
3394
- clue: "Where your actions turn into a timeline.",
3395
- id: "activities",
3396
- match: "/profile/account/favourites"
3397
- },
3398
3394
  {
3399
3395
  clue: "Where conversations happen without speaking.",
3400
3396
  id: "chat",
3401
3397
  match: "/chat"
3402
3398
  },
3403
3399
  {
3404
- clue: "The place to redefine who you are.",
3405
- id: "edit-profile",
3406
- match: "/profile/account"
3400
+ clue: "Where you can find your loyalties.",
3401
+ id: "coupons",
3402
+ match: "/coupons"
3407
3403
  },
3408
3404
  {
3409
3405
  clue: "A single moment worth showing up for.",
@@ -3438,18 +3434,13 @@ var gameScreenIdentifierList = [
3438
3434
  {
3439
3435
  clue: "Your starting point for everything.",
3440
3436
  id: "home",
3441
- match: "/"
3437
+ match: "/home"
3442
3438
  },
3443
3439
  {
3444
3440
  clue: "Where the app whispers what you shouldn\u2019t miss.",
3445
3441
  id: "notifications",
3446
3442
  match: "/notifications"
3447
3443
  },
3448
- {
3449
- clue: "Where you fine-tune your experience.",
3450
- id: "options",
3451
- match: "/options"
3452
- },
3453
3444
  {
3454
3445
  clue: "An organisation or creator supporting the community.",
3455
3446
  id: "single-partner",
@@ -3461,15 +3452,30 @@ var gameScreenIdentifierList = [
3461
3452
  match: "/partners"
3462
3453
  },
3463
3454
  {
3464
- clue: "A single published post in full view.",
3465
- id: "single-visitor-post",
3466
- match: new RegExp(`^/visitors/post/${OBJECT_ID_PATH_SEGMENT_END}`)
3455
+ clue: "Where your actions turn into a timeline.",
3456
+ id: "activities",
3457
+ match: "/profile/account/favourites"
3458
+ },
3459
+ {
3460
+ clue: "The place to redefine who you are.",
3461
+ id: "edit-profile",
3462
+ match: "/profile/account"
3467
3463
  },
3468
3464
  {
3469
3465
  clue: "Your identity, on display.",
3470
3466
  id: "profile",
3471
3467
  match: "/profile"
3472
3468
  },
3469
+ {
3470
+ clue: "Where you can redeem your rewards.",
3471
+ id: "rewards",
3472
+ match: "/profile/account/rewards"
3473
+ },
3474
+ {
3475
+ clue: "A single published post in full view.",
3476
+ id: "single-visitor-post",
3477
+ match: new RegExp(`^/visitors/post/${OBJECT_ID_PATH_SEGMENT_END}`)
3478
+ },
3473
3479
  {
3474
3480
  clue: "One stallholder offering something valuable.",
3475
3481
  id: "single-vendor",
@@ -3484,6 +3490,11 @@ var gameScreenIdentifierList = [
3484
3490
  clue: "Where you browse articles and posts from around the platform.",
3485
3491
  id: "visitors",
3486
3492
  match: "/visitors"
3493
+ },
3494
+ {
3495
+ clue: "Where you fine-tune your experience.",
3496
+ id: "options",
3497
+ match: "/options"
3487
3498
  }
3488
3499
  ];
3489
3500
  var mapArrayToOptions = (items) => items.map((item) => ({
@@ -5079,6 +5090,7 @@ var USER_FIELDS_FRAGMENT = gql`
5079
5090
  firstName
5080
5091
  game
5081
5092
  isTester
5093
+ interests
5082
5094
  lastName
5083
5095
  nickName
5084
5096
  licences {
@@ -5364,11 +5376,13 @@ var GET_EVENTS_BY_REGION = gql`
5364
5376
  $region: String!
5365
5377
  $options: ResourcesByRegionOptions
5366
5378
  $dateStatus: EventDateStatusEnumType
5379
+ $tags: [String]
5367
5380
  ) {
5368
5381
  eventsByRegion(
5369
5382
  region: $region
5370
5383
  options: $options
5371
5384
  dateStatus: $dateStatus
5385
+ tags: $tags
5372
5386
  ) {
5373
5387
  ...EventListItemFields
5374
5388
  }
@@ -6647,6 +6661,20 @@ var GET_USER_RESOURCES = gql`
6647
6661
  }
6648
6662
  }
6649
6663
  `;
6664
+ var GET_USERS_BY_PROMO_CODE = gql`
6665
+ query getUsersByPromoCode($promoCode: String!, $limit: Int, $offset: Int) {
6666
+ usersByPromoCode(promoCode: $promoCode, limit: $limit, offset: $offset) {
6667
+ active
6668
+ avatar {
6669
+ ...ResourceImageFields
6670
+ }
6671
+ deletedAt
6672
+ nickName
6673
+ userId
6674
+ }
6675
+ }
6676
+ ${RESOURCE_IMAGE_FIELDS_FRAGMENT}
6677
+ `;
6650
6678
  var NOTIFICATION_FRAGMENT = gql`
6651
6679
  fragment NotificationFields on Notification {
6652
6680
  _id
@@ -7776,6 +7804,8 @@ var COUPON_PARTICIPANT_USER_FIELDS_FRAGMENT = gql`
7776
7804
  fragment CouponParticipantUserFields on CouponParticipantUserType {
7777
7805
  couponCollectedCount
7778
7806
  couponRedeemedAt
7807
+ couponRedeemedCount
7808
+ couponCycleRedeemed
7779
7809
  createdAt
7780
7810
  updatedAt
7781
7811
  userId
@@ -8764,7 +8794,7 @@ schema4.index({ isRead: 1, userId: 1 });
8764
8794
  schema4.index({ createdAt: -1, userId: 1 });
8765
8795
  var NotificationModel = mongoose8.models.Notification || mongoose8.model("Notification", schema4);
8766
8796
 
8767
- // node_modules/@timardex/cluemart-shared/dist/chunk-X3OLM35T.mjs
8797
+ // node_modules/@timardex/cluemart-shared/dist/chunk-D5BWQS2J.mjs
8768
8798
  var EnumInviteStatus2 = /* @__PURE__ */ ((EnumInviteStatus22) => {
8769
8799
  EnumInviteStatus22["ACCEPTED"] = "Accepted";
8770
8800
  EnumInviteStatus22["COMPLETED"] = "Completed";
@@ -9021,6 +9051,11 @@ var schema7 = new MongooseSchema11(
9021
9051
  required: false,
9022
9052
  type: mongoose11.Schema.Types.ObjectId
9023
9053
  },
9054
+ interests: {
9055
+ enum: Object.values(EnumResourceType),
9056
+ required: false,
9057
+ type: [String]
9058
+ },
9024
9059
  isTester: { default: false, required: true, type: Boolean },
9025
9060
  lastName: { required: true, type: String },
9026
9061
  licences: {
@@ -9870,7 +9905,9 @@ var couponCodeSchema = new MongooseSchema26(
9870
9905
  var couponParticipantUserSchema = new MongooseSchema26(
9871
9906
  {
9872
9907
  couponCollectedCount: { default: 0, required: true, type: Number },
9908
+ couponCycleRedeemed: { default: false, required: true, type: Boolean },
9873
9909
  couponRedeemedAt: { default: null, required: false, type: Date },
9910
+ couponRedeemedCount: { default: 0, required: true, type: Number },
9874
9911
  userId: {
9875
9912
  ref: "User",
9876
9913
  required: true,
@@ -9934,7 +9971,7 @@ async function activeAffiliateCodeExists(affiliateCode) {
9934
9971
  return existing !== null;
9935
9972
  }
9936
9973
 
9937
- // node_modules/@timardex/cluemart-shared/dist/chunk-SD42WIMV.mjs
9974
+ // node_modules/@timardex/cluemart-shared/dist/chunk-HAPY4NHC.mjs
9938
9975
  import dayjs3 from "dayjs";
9939
9976
  import customParseFormat2 from "dayjs/plugin/customParseFormat.js";
9940
9977
  import isSameOrAfter2 from "dayjs/plugin/isSameOrAfter.js";
@@ -9989,25 +10026,20 @@ var SHARE_RESOURCE_LABEL2 = {
9989
10026
  school: "School"
9990
10027
  };
9991
10028
 
9992
- // node_modules/@timardex/cluemart-shared/dist/chunk-NNHCOVND.mjs
10029
+ // node_modules/@timardex/cluemart-shared/dist/chunk-CAI7BTMN.mjs
9993
10030
  var PROMO_CODE_PREFIX2 = "CM-";
9994
10031
  var OBJECT_ID_PATH_SEGMENT2 = "[a-f0-9]{24}";
9995
10032
  var OBJECT_ID_PATH_SEGMENT_END2 = `${OBJECT_ID_PATH_SEGMENT2}$`;
9996
10033
  var gameScreenIdentifierList2 = [
9997
- {
9998
- clue: "Where your actions turn into a timeline.",
9999
- id: "activities",
10000
- match: "/profile/account/favourites"
10001
- },
10002
10034
  {
10003
10035
  clue: "Where conversations happen without speaking.",
10004
10036
  id: "chat",
10005
10037
  match: "/chat"
10006
10038
  },
10007
10039
  {
10008
- clue: "The place to redefine who you are.",
10009
- id: "edit-profile",
10010
- match: "/profile/account"
10040
+ clue: "Where you can find your loyalties.",
10041
+ id: "coupons",
10042
+ match: "/coupons"
10011
10043
  },
10012
10044
  {
10013
10045
  clue: "A single moment worth showing up for.",
@@ -10042,18 +10074,13 @@ var gameScreenIdentifierList2 = [
10042
10074
  {
10043
10075
  clue: "Your starting point for everything.",
10044
10076
  id: "home",
10045
- match: "/"
10077
+ match: "/home"
10046
10078
  },
10047
10079
  {
10048
10080
  clue: "Where the app whispers what you shouldn\u2019t miss.",
10049
10081
  id: "notifications",
10050
10082
  match: "/notifications"
10051
10083
  },
10052
- {
10053
- clue: "Where you fine-tune your experience.",
10054
- id: "options",
10055
- match: "/options"
10056
- },
10057
10084
  {
10058
10085
  clue: "An organisation or creator supporting the community.",
10059
10086
  id: "single-partner",
@@ -10065,15 +10092,30 @@ var gameScreenIdentifierList2 = [
10065
10092
  match: "/partners"
10066
10093
  },
10067
10094
  {
10068
- clue: "A single published post in full view.",
10069
- id: "single-visitor-post",
10070
- match: new RegExp(`^/visitors/post/${OBJECT_ID_PATH_SEGMENT_END2}`)
10095
+ clue: "Where your actions turn into a timeline.",
10096
+ id: "activities",
10097
+ match: "/profile/account/favourites"
10098
+ },
10099
+ {
10100
+ clue: "The place to redefine who you are.",
10101
+ id: "edit-profile",
10102
+ match: "/profile/account"
10071
10103
  },
10072
10104
  {
10073
10105
  clue: "Your identity, on display.",
10074
10106
  id: "profile",
10075
10107
  match: "/profile"
10076
10108
  },
10109
+ {
10110
+ clue: "Where you can redeem your rewards.",
10111
+ id: "rewards",
10112
+ match: "/profile/account/rewards"
10113
+ },
10114
+ {
10115
+ clue: "A single published post in full view.",
10116
+ id: "single-visitor-post",
10117
+ match: new RegExp(`^/visitors/post/${OBJECT_ID_PATH_SEGMENT_END2}`)
10118
+ },
10077
10119
  {
10078
10120
  clue: "One stallholder offering something valuable.",
10079
10121
  id: "single-vendor",
@@ -10088,10 +10130,15 @@ var gameScreenIdentifierList2 = [
10088
10130
  clue: "Where you browse articles and posts from around the platform.",
10089
10131
  id: "visitors",
10090
10132
  match: "/visitors"
10133
+ },
10134
+ {
10135
+ clue: "Where you fine-tune your experience.",
10136
+ id: "options",
10137
+ match: "/options"
10091
10138
  }
10092
10139
  ];
10093
10140
 
10094
- // node_modules/@timardex/cluemart-shared/dist/chunk-JZWO462D.mjs
10141
+ // node_modules/@timardex/cluemart-shared/dist/chunk-LYL3X7HT.mjs
10095
10142
  import dayjs4 from "dayjs";
10096
10143
  var statusOptions2 = [
10097
10144
  ...Object.values(EnumInviteStatus2).map((status) => ({