@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.cjs CHANGED
@@ -3346,9 +3346,10 @@ var EnumFoodFlavor = /* @__PURE__ */ ((EnumFoodFlavor22) => {
3346
3346
  var EnumResourceType = /* @__PURE__ */ ((EnumResourceType22) => {
3347
3347
  EnumResourceType22["AFFILIATE"] = "affiliate";
3348
3348
  EnumResourceType22["EVENT"] = "event";
3349
- EnumResourceType22["VENDOR"] = "vendor";
3350
3349
  EnumResourceType22["PARTNER"] = "partner";
3351
3350
  EnumResourceType22["SCHOOL"] = "school";
3351
+ EnumResourceType22["VENDOR"] = "vendor";
3352
+ EnumResourceType22["VISITOR"] = "visitor";
3352
3353
  return EnumResourceType22;
3353
3354
  })(EnumResourceType || {});
3354
3355
  var EnumEventType = /* @__PURE__ */ ((EnumEventType22) => {
@@ -3495,20 +3496,15 @@ var EnumReward = /* @__PURE__ */ ((EnumReward22) => {
3495
3496
  var OBJECT_ID_PATH_SEGMENT = "[a-f0-9]{24}";
3496
3497
  var OBJECT_ID_PATH_SEGMENT_END = `${OBJECT_ID_PATH_SEGMENT}$`;
3497
3498
  var gameScreenIdentifierList = [
3498
- {
3499
- clue: "Where your actions turn into a timeline.",
3500
- id: "activities",
3501
- match: "/profile/account/favourites"
3502
- },
3503
3499
  {
3504
3500
  clue: "Where conversations happen without speaking.",
3505
3501
  id: "chat",
3506
3502
  match: "/chat"
3507
3503
  },
3508
3504
  {
3509
- clue: "The place to redefine who you are.",
3510
- id: "edit-profile",
3511
- match: "/profile/account"
3505
+ clue: "Where you can find your loyalties.",
3506
+ id: "coupons",
3507
+ match: "/coupons"
3512
3508
  },
3513
3509
  {
3514
3510
  clue: "A single moment worth showing up for.",
@@ -3543,18 +3539,13 @@ var gameScreenIdentifierList = [
3543
3539
  {
3544
3540
  clue: "Your starting point for everything.",
3545
3541
  id: "home",
3546
- match: "/"
3542
+ match: "/home"
3547
3543
  },
3548
3544
  {
3549
3545
  clue: "Where the app whispers what you shouldn\u2019t miss.",
3550
3546
  id: "notifications",
3551
3547
  match: "/notifications"
3552
3548
  },
3553
- {
3554
- clue: "Where you fine-tune your experience.",
3555
- id: "options",
3556
- match: "/options"
3557
- },
3558
3549
  {
3559
3550
  clue: "An organisation or creator supporting the community.",
3560
3551
  id: "single-partner",
@@ -3566,15 +3557,30 @@ var gameScreenIdentifierList = [
3566
3557
  match: "/partners"
3567
3558
  },
3568
3559
  {
3569
- clue: "A single published post in full view.",
3570
- id: "single-visitor-post",
3571
- match: new RegExp(`^/visitors/post/${OBJECT_ID_PATH_SEGMENT_END}`)
3560
+ clue: "Where your actions turn into a timeline.",
3561
+ id: "activities",
3562
+ match: "/profile/account/favourites"
3563
+ },
3564
+ {
3565
+ clue: "The place to redefine who you are.",
3566
+ id: "edit-profile",
3567
+ match: "/profile/account"
3572
3568
  },
3573
3569
  {
3574
3570
  clue: "Your identity, on display.",
3575
3571
  id: "profile",
3576
3572
  match: "/profile"
3577
3573
  },
3574
+ {
3575
+ clue: "Where you can redeem your rewards.",
3576
+ id: "rewards",
3577
+ match: "/profile/account/rewards"
3578
+ },
3579
+ {
3580
+ clue: "A single published post in full view.",
3581
+ id: "single-visitor-post",
3582
+ match: new RegExp(`^/visitors/post/${OBJECT_ID_PATH_SEGMENT_END}`)
3583
+ },
3578
3584
  {
3579
3585
  clue: "One stallholder offering something valuable.",
3580
3586
  id: "single-vendor",
@@ -3589,6 +3595,11 @@ var gameScreenIdentifierList = [
3589
3595
  clue: "Where you browse articles and posts from around the platform.",
3590
3596
  id: "visitors",
3591
3597
  match: "/visitors"
3598
+ },
3599
+ {
3600
+ clue: "Where you fine-tune your experience.",
3601
+ id: "options",
3602
+ match: "/options"
3592
3603
  }
3593
3604
  ];
3594
3605
  var mapArrayToOptions = (items) => items.map((item) => ({
@@ -5184,6 +5195,7 @@ var USER_FIELDS_FRAGMENT = gql`
5184
5195
  firstName
5185
5196
  game
5186
5197
  isTester
5198
+ interests
5187
5199
  lastName
5188
5200
  nickName
5189
5201
  licences {
@@ -5469,11 +5481,13 @@ var GET_EVENTS_BY_REGION = gql`
5469
5481
  $region: String!
5470
5482
  $options: ResourcesByRegionOptions
5471
5483
  $dateStatus: EventDateStatusEnumType
5484
+ $tags: [String]
5472
5485
  ) {
5473
5486
  eventsByRegion(
5474
5487
  region: $region
5475
5488
  options: $options
5476
5489
  dateStatus: $dateStatus
5490
+ tags: $tags
5477
5491
  ) {
5478
5492
  ...EventListItemFields
5479
5493
  }
@@ -6752,6 +6766,20 @@ var GET_USER_RESOURCES = gql`
6752
6766
  }
6753
6767
  }
6754
6768
  `;
6769
+ var GET_USERS_BY_PROMO_CODE = gql`
6770
+ query getUsersByPromoCode($promoCode: String!, $limit: Int, $offset: Int) {
6771
+ usersByPromoCode(promoCode: $promoCode, limit: $limit, offset: $offset) {
6772
+ active
6773
+ avatar {
6774
+ ...ResourceImageFields
6775
+ }
6776
+ deletedAt
6777
+ nickName
6778
+ userId
6779
+ }
6780
+ }
6781
+ ${RESOURCE_IMAGE_FIELDS_FRAGMENT}
6782
+ `;
6755
6783
  var NOTIFICATION_FRAGMENT = gql`
6756
6784
  fragment NotificationFields on Notification {
6757
6785
  _id
@@ -7881,6 +7909,8 @@ var COUPON_PARTICIPANT_USER_FIELDS_FRAGMENT = gql`
7881
7909
  fragment CouponParticipantUserFields on CouponParticipantUserType {
7882
7910
  couponCollectedCount
7883
7911
  couponRedeemedAt
7912
+ couponRedeemedCount
7913
+ couponCycleRedeemed
7884
7914
  createdAt
7885
7915
  updatedAt
7886
7916
  userId
@@ -8869,7 +8899,7 @@ schema4.index({ isRead: 1, userId: 1 });
8869
8899
  schema4.index({ createdAt: -1, userId: 1 });
8870
8900
  var NotificationModel = import_mongoose8.default.models.Notification || import_mongoose8.default.model("Notification", schema4);
8871
8901
 
8872
- // node_modules/@timardex/cluemart-shared/dist/chunk-X3OLM35T.mjs
8902
+ // node_modules/@timardex/cluemart-shared/dist/chunk-D5BWQS2J.mjs
8873
8903
  var EnumInviteStatus2 = /* @__PURE__ */ ((EnumInviteStatus22) => {
8874
8904
  EnumInviteStatus22["ACCEPTED"] = "Accepted";
8875
8905
  EnumInviteStatus22["COMPLETED"] = "Completed";
@@ -9126,6 +9156,11 @@ var schema7 = new MongooseSchema11(
9126
9156
  required: false,
9127
9157
  type: import_mongoose11.default.Schema.Types.ObjectId
9128
9158
  },
9159
+ interests: {
9160
+ enum: Object.values(EnumResourceType),
9161
+ required: false,
9162
+ type: [String]
9163
+ },
9129
9164
  isTester: { default: false, required: true, type: Boolean },
9130
9165
  lastName: { required: true, type: String },
9131
9166
  licences: {
@@ -9975,7 +10010,9 @@ var couponCodeSchema = new MongooseSchema26(
9975
10010
  var couponParticipantUserSchema = new MongooseSchema26(
9976
10011
  {
9977
10012
  couponCollectedCount: { default: 0, required: true, type: Number },
10013
+ couponCycleRedeemed: { default: false, required: true, type: Boolean },
9978
10014
  couponRedeemedAt: { default: null, required: false, type: Date },
10015
+ couponRedeemedCount: { default: 0, required: true, type: Number },
9979
10016
  userId: {
9980
10017
  ref: "User",
9981
10018
  required: true,
@@ -10039,7 +10076,7 @@ async function activeAffiliateCodeExists(affiliateCode) {
10039
10076
  return existing !== null;
10040
10077
  }
10041
10078
 
10042
- // node_modules/@timardex/cluemart-shared/dist/chunk-SD42WIMV.mjs
10079
+ // node_modules/@timardex/cluemart-shared/dist/chunk-HAPY4NHC.mjs
10043
10080
  var import_dayjs3 = __toESM(require("dayjs"), 1);
10044
10081
  var import_customParseFormat2 = __toESM(require("dayjs/plugin/customParseFormat.js"), 1);
10045
10082
  var import_isSameOrAfter2 = __toESM(require("dayjs/plugin/isSameOrAfter.js"), 1);
@@ -10094,25 +10131,20 @@ var SHARE_RESOURCE_LABEL2 = {
10094
10131
  school: "School"
10095
10132
  };
10096
10133
 
10097
- // node_modules/@timardex/cluemart-shared/dist/chunk-NNHCOVND.mjs
10134
+ // node_modules/@timardex/cluemart-shared/dist/chunk-CAI7BTMN.mjs
10098
10135
  var PROMO_CODE_PREFIX2 = "CM-";
10099
10136
  var OBJECT_ID_PATH_SEGMENT2 = "[a-f0-9]{24}";
10100
10137
  var OBJECT_ID_PATH_SEGMENT_END2 = `${OBJECT_ID_PATH_SEGMENT2}$`;
10101
10138
  var gameScreenIdentifierList2 = [
10102
- {
10103
- clue: "Where your actions turn into a timeline.",
10104
- id: "activities",
10105
- match: "/profile/account/favourites"
10106
- },
10107
10139
  {
10108
10140
  clue: "Where conversations happen without speaking.",
10109
10141
  id: "chat",
10110
10142
  match: "/chat"
10111
10143
  },
10112
10144
  {
10113
- clue: "The place to redefine who you are.",
10114
- id: "edit-profile",
10115
- match: "/profile/account"
10145
+ clue: "Where you can find your loyalties.",
10146
+ id: "coupons",
10147
+ match: "/coupons"
10116
10148
  },
10117
10149
  {
10118
10150
  clue: "A single moment worth showing up for.",
@@ -10147,18 +10179,13 @@ var gameScreenIdentifierList2 = [
10147
10179
  {
10148
10180
  clue: "Your starting point for everything.",
10149
10181
  id: "home",
10150
- match: "/"
10182
+ match: "/home"
10151
10183
  },
10152
10184
  {
10153
10185
  clue: "Where the app whispers what you shouldn\u2019t miss.",
10154
10186
  id: "notifications",
10155
10187
  match: "/notifications"
10156
10188
  },
10157
- {
10158
- clue: "Where you fine-tune your experience.",
10159
- id: "options",
10160
- match: "/options"
10161
- },
10162
10189
  {
10163
10190
  clue: "An organisation or creator supporting the community.",
10164
10191
  id: "single-partner",
@@ -10170,15 +10197,30 @@ var gameScreenIdentifierList2 = [
10170
10197
  match: "/partners"
10171
10198
  },
10172
10199
  {
10173
- clue: "A single published post in full view.",
10174
- id: "single-visitor-post",
10175
- match: new RegExp(`^/visitors/post/${OBJECT_ID_PATH_SEGMENT_END2}`)
10200
+ clue: "Where your actions turn into a timeline.",
10201
+ id: "activities",
10202
+ match: "/profile/account/favourites"
10203
+ },
10204
+ {
10205
+ clue: "The place to redefine who you are.",
10206
+ id: "edit-profile",
10207
+ match: "/profile/account"
10176
10208
  },
10177
10209
  {
10178
10210
  clue: "Your identity, on display.",
10179
10211
  id: "profile",
10180
10212
  match: "/profile"
10181
10213
  },
10214
+ {
10215
+ clue: "Where you can redeem your rewards.",
10216
+ id: "rewards",
10217
+ match: "/profile/account/rewards"
10218
+ },
10219
+ {
10220
+ clue: "A single published post in full view.",
10221
+ id: "single-visitor-post",
10222
+ match: new RegExp(`^/visitors/post/${OBJECT_ID_PATH_SEGMENT_END2}`)
10223
+ },
10182
10224
  {
10183
10225
  clue: "One stallholder offering something valuable.",
10184
10226
  id: "single-vendor",
@@ -10193,10 +10235,15 @@ var gameScreenIdentifierList2 = [
10193
10235
  clue: "Where you browse articles and posts from around the platform.",
10194
10236
  id: "visitors",
10195
10237
  match: "/visitors"
10238
+ },
10239
+ {
10240
+ clue: "Where you fine-tune your experience.",
10241
+ id: "options",
10242
+ match: "/options"
10196
10243
  }
10197
10244
  ];
10198
10245
 
10199
- // node_modules/@timardex/cluemart-shared/dist/chunk-JZWO462D.mjs
10246
+ // node_modules/@timardex/cluemart-shared/dist/chunk-LYL3X7HT.mjs
10200
10247
  var import_dayjs4 = __toESM(require("dayjs"), 1);
10201
10248
  var statusOptions2 = [
10202
10249
  ...Object.values(EnumInviteStatus2).map((status) => ({