@timardex/cluemart-server-shared 1.1.29 → 1.1.31

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.
@@ -41,7 +41,7 @@ import {
41
41
  termsAgreementSchema,
42
42
  userLicenseSchema,
43
43
  vendorProductTypeSchema
44
- } from "../chunk-HO5LGPTL.mjs";
44
+ } from "../chunk-IAFTMRVS.mjs";
45
45
  export {
46
46
  APP_SETTINGS_ID,
47
47
  AdModel,
@@ -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: "The place to redefine who you are.",
3465
- id: "edit-profile",
3466
- match: "/profile/account"
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: "A single published post in full view.",
3525
- id: "single-visitor-post",
3526
- match: new RegExp(`^/visitors/post/${OBJECT_ID_PATH_SEGMENT_END}`)
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
@@ -8826,7 +8854,7 @@ schema4.index({ isRead: 1, userId: 1 });
8826
8854
  schema4.index({ createdAt: -1, userId: 1 });
8827
8855
  var NotificationModel = import_mongoose8.default.models.Notification || import_mongoose8.default.model("Notification", schema4);
8828
8856
 
8829
- // node_modules/@timardex/cluemart-shared/dist/chunk-X3OLM35T.mjs
8857
+ // node_modules/@timardex/cluemart-shared/dist/chunk-7IB7QPVH.mjs
8830
8858
  var EnumInviteStatus2 = /* @__PURE__ */ ((EnumInviteStatus22) => {
8831
8859
  EnumInviteStatus22["ACCEPTED"] = "Accepted";
8832
8860
  EnumInviteStatus22["COMPLETED"] = "Completed";
@@ -9083,6 +9111,11 @@ var schema7 = new MongooseSchema11(
9083
9111
  required: false,
9084
9112
  type: import_mongoose11.default.Schema.Types.ObjectId
9085
9113
  },
9114
+ interests: {
9115
+ enum: Object.values(EnumResourceType),
9116
+ required: false,
9117
+ type: [String]
9118
+ },
9086
9119
  isTester: { default: false, required: true, type: Boolean },
9087
9120
  lastName: { required: true, type: String },
9088
9121
  licences: {
@@ -9998,7 +10031,7 @@ async function activeAffiliateCodeExists(affiliateCode) {
9998
10031
  return existing !== null;
9999
10032
  }
10000
10033
 
10001
- // node_modules/@timardex/cluemart-shared/dist/chunk-SD42WIMV.mjs
10034
+ // node_modules/@timardex/cluemart-shared/dist/chunk-2UNNIQIK.mjs
10002
10035
  var import_dayjs3 = __toESM(require("dayjs"), 1);
10003
10036
  var import_customParseFormat2 = __toESM(require("dayjs/plugin/customParseFormat.js"), 1);
10004
10037
  var import_isSameOrAfter2 = __toESM(require("dayjs/plugin/isSameOrAfter.js"), 1);
@@ -10053,25 +10086,20 @@ var SHARE_RESOURCE_LABEL2 = {
10053
10086
  school: "School"
10054
10087
  };
10055
10088
 
10056
- // node_modules/@timardex/cluemart-shared/dist/chunk-WS47NSTO.mjs
10089
+ // node_modules/@timardex/cluemart-shared/dist/chunk-CAI7BTMN.mjs
10057
10090
  var PROMO_CODE_PREFIX2 = "CM-";
10058
10091
  var OBJECT_ID_PATH_SEGMENT2 = "[a-f0-9]{24}";
10059
10092
  var OBJECT_ID_PATH_SEGMENT_END2 = `${OBJECT_ID_PATH_SEGMENT2}$`;
10060
10093
  var gameScreenIdentifierList2 = [
10061
- {
10062
- clue: "Where your actions turn into a timeline.",
10063
- id: "activities",
10064
- match: "/profile/account/favourites"
10065
- },
10066
10094
  {
10067
10095
  clue: "Where conversations happen without speaking.",
10068
10096
  id: "chat",
10069
10097
  match: "/chat"
10070
10098
  },
10071
10099
  {
10072
- clue: "The place to redefine who you are.",
10073
- id: "edit-profile",
10074
- match: "/profile/account"
10100
+ clue: "Where you can find your loyalties.",
10101
+ id: "coupons",
10102
+ match: "/coupons"
10075
10103
  },
10076
10104
  {
10077
10105
  clue: "A single moment worth showing up for.",
@@ -10106,18 +10134,13 @@ var gameScreenIdentifierList2 = [
10106
10134
  {
10107
10135
  clue: "Your starting point for everything.",
10108
10136
  id: "home",
10109
- match: "/"
10137
+ match: "/home"
10110
10138
  },
10111
10139
  {
10112
10140
  clue: "Where the app whispers what you shouldn\u2019t miss.",
10113
10141
  id: "notifications",
10114
10142
  match: "/notifications"
10115
10143
  },
10116
- {
10117
- clue: "Where you fine-tune your experience.",
10118
- id: "options",
10119
- match: "/options"
10120
- },
10121
10144
  {
10122
10145
  clue: "An organisation or creator supporting the community.",
10123
10146
  id: "single-partner",
@@ -10129,15 +10152,30 @@ var gameScreenIdentifierList2 = [
10129
10152
  match: "/partners"
10130
10153
  },
10131
10154
  {
10132
- clue: "A single published post in full view.",
10133
- id: "single-visitor-post",
10134
- match: new RegExp(`^/visitors/post/${OBJECT_ID_PATH_SEGMENT_END2}`)
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"
10135
10163
  },
10136
10164
  {
10137
10165
  clue: "Your identity, on display.",
10138
10166
  id: "profile",
10139
10167
  match: "/profile"
10140
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
+ },
10141
10179
  {
10142
10180
  clue: "One stallholder offering something valuable.",
10143
10181
  id: "single-vendor",
@@ -10152,10 +10190,15 @@ var gameScreenIdentifierList2 = [
10152
10190
  clue: "Where you browse articles and posts from around the platform.",
10153
10191
  id: "visitors",
10154
10192
  match: "/visitors"
10193
+ },
10194
+ {
10195
+ clue: "Where you fine-tune your experience.",
10196
+ id: "options",
10197
+ match: "/options"
10155
10198
  }
10156
10199
  ];
10157
10200
 
10158
- // node_modules/@timardex/cluemart-shared/dist/chunk-G5T3Z6WT.mjs
10201
+ // node_modules/@timardex/cluemart-shared/dist/chunk-HBJD6O7T.mjs
10159
10202
  var import_dayjs4 = __toESM(require("dayjs"), 1);
10160
10203
  var statusOptions2 = [
10161
10204
  ...Object.values(EnumInviteStatus2).map((status) => ({