@timardex/cluemart-server-shared 1.1.29 → 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
@@ -8871,7 +8899,7 @@ schema4.index({ isRead: 1, userId: 1 });
8871
8899
  schema4.index({ createdAt: -1, userId: 1 });
8872
8900
  var NotificationModel = import_mongoose8.default.models.Notification || import_mongoose8.default.model("Notification", schema4);
8873
8901
 
8874
- // node_modules/@timardex/cluemart-shared/dist/chunk-X3OLM35T.mjs
8902
+ // node_modules/@timardex/cluemart-shared/dist/chunk-D5BWQS2J.mjs
8875
8903
  var EnumInviteStatus2 = /* @__PURE__ */ ((EnumInviteStatus22) => {
8876
8904
  EnumInviteStatus22["ACCEPTED"] = "Accepted";
8877
8905
  EnumInviteStatus22["COMPLETED"] = "Completed";
@@ -9128,6 +9156,11 @@ var schema7 = new MongooseSchema11(
9128
9156
  required: false,
9129
9157
  type: import_mongoose11.default.Schema.Types.ObjectId
9130
9158
  },
9159
+ interests: {
9160
+ enum: Object.values(EnumResourceType),
9161
+ required: false,
9162
+ type: [String]
9163
+ },
9131
9164
  isTester: { default: false, required: true, type: Boolean },
9132
9165
  lastName: { required: true, type: String },
9133
9166
  licences: {
@@ -10043,7 +10076,7 @@ async function activeAffiliateCodeExists(affiliateCode) {
10043
10076
  return existing !== null;
10044
10077
  }
10045
10078
 
10046
- // node_modules/@timardex/cluemart-shared/dist/chunk-SD42WIMV.mjs
10079
+ // node_modules/@timardex/cluemart-shared/dist/chunk-HAPY4NHC.mjs
10047
10080
  var import_dayjs3 = __toESM(require("dayjs"), 1);
10048
10081
  var import_customParseFormat2 = __toESM(require("dayjs/plugin/customParseFormat.js"), 1);
10049
10082
  var import_isSameOrAfter2 = __toESM(require("dayjs/plugin/isSameOrAfter.js"), 1);
@@ -10098,25 +10131,20 @@ var SHARE_RESOURCE_LABEL2 = {
10098
10131
  school: "School"
10099
10132
  };
10100
10133
 
10101
- // node_modules/@timardex/cluemart-shared/dist/chunk-WS47NSTO.mjs
10134
+ // node_modules/@timardex/cluemart-shared/dist/chunk-CAI7BTMN.mjs
10102
10135
  var PROMO_CODE_PREFIX2 = "CM-";
10103
10136
  var OBJECT_ID_PATH_SEGMENT2 = "[a-f0-9]{24}";
10104
10137
  var OBJECT_ID_PATH_SEGMENT_END2 = `${OBJECT_ID_PATH_SEGMENT2}$`;
10105
10138
  var gameScreenIdentifierList2 = [
10106
- {
10107
- clue: "Where your actions turn into a timeline.",
10108
- id: "activities",
10109
- match: "/profile/account/favourites"
10110
- },
10111
10139
  {
10112
10140
  clue: "Where conversations happen without speaking.",
10113
10141
  id: "chat",
10114
10142
  match: "/chat"
10115
10143
  },
10116
10144
  {
10117
- clue: "The place to redefine who you are.",
10118
- id: "edit-profile",
10119
- match: "/profile/account"
10145
+ clue: "Where you can find your loyalties.",
10146
+ id: "coupons",
10147
+ match: "/coupons"
10120
10148
  },
10121
10149
  {
10122
10150
  clue: "A single moment worth showing up for.",
@@ -10151,18 +10179,13 @@ var gameScreenIdentifierList2 = [
10151
10179
  {
10152
10180
  clue: "Your starting point for everything.",
10153
10181
  id: "home",
10154
- match: "/"
10182
+ match: "/home"
10155
10183
  },
10156
10184
  {
10157
10185
  clue: "Where the app whispers what you shouldn\u2019t miss.",
10158
10186
  id: "notifications",
10159
10187
  match: "/notifications"
10160
10188
  },
10161
- {
10162
- clue: "Where you fine-tune your experience.",
10163
- id: "options",
10164
- match: "/options"
10165
- },
10166
10189
  {
10167
10190
  clue: "An organisation or creator supporting the community.",
10168
10191
  id: "single-partner",
@@ -10174,15 +10197,30 @@ var gameScreenIdentifierList2 = [
10174
10197
  match: "/partners"
10175
10198
  },
10176
10199
  {
10177
- clue: "A single published post in full view.",
10178
- id: "single-visitor-post",
10179
- 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"
10180
10208
  },
10181
10209
  {
10182
10210
  clue: "Your identity, on display.",
10183
10211
  id: "profile",
10184
10212
  match: "/profile"
10185
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
+ },
10186
10224
  {
10187
10225
  clue: "One stallholder offering something valuable.",
10188
10226
  id: "single-vendor",
@@ -10197,10 +10235,15 @@ var gameScreenIdentifierList2 = [
10197
10235
  clue: "Where you browse articles and posts from around the platform.",
10198
10236
  id: "visitors",
10199
10237
  match: "/visitors"
10238
+ },
10239
+ {
10240
+ clue: "Where you fine-tune your experience.",
10241
+ id: "options",
10242
+ match: "/options"
10200
10243
  }
10201
10244
  ];
10202
10245
 
10203
- // node_modules/@timardex/cluemart-shared/dist/chunk-G5T3Z6WT.mjs
10246
+ // node_modules/@timardex/cluemart-shared/dist/chunk-LYL3X7HT.mjs
10204
10247
  var import_dayjs4 = __toESM(require("dayjs"), 1);
10205
10248
  var statusOptions2 = [
10206
10249
  ...Object.values(EnumInviteStatus2).map((status) => ({