@timardex/cluemart-shared 1.5.769 → 1.5.771

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.
Files changed (52) hide show
  1. package/dist/{ad-DZGYiwY-.d.ts → ad-6PrFQe2t.d.ts} +7 -2
  2. package/dist/{ad-8BNpjEcM.d.mts → ad-B8ZWiTsv.d.mts} +7 -2
  3. package/dist/{chunk-VQRZ4OJY.mjs → chunk-2X2YVFTH.mjs} +7 -2
  4. package/dist/chunk-2X2YVFTH.mjs.map +1 -0
  5. package/dist/{chunk-HPPIA4EM.mjs → chunk-7CIQ6AD4.mjs} +2 -2
  6. package/dist/{chunk-4SNW63TJ.mjs → chunk-KZTOISPA.mjs} +2 -1
  7. package/dist/chunk-KZTOISPA.mjs.map +1 -0
  8. package/dist/{chunk-AKX2AGMA.mjs → chunk-PPNVURC4.mjs} +3 -3
  9. package/dist/{chunk-EEZUTQ3V.mjs → chunk-VO2WRHJV.mjs} +11 -1
  10. package/dist/chunk-VO2WRHJV.mjs.map +1 -0
  11. package/dist/enums/index.cjs +1 -0
  12. package/dist/enums/index.cjs.map +1 -1
  13. package/dist/enums/index.d.mts +2 -1
  14. package/dist/enums/index.d.ts +2 -1
  15. package/dist/enums/index.mjs +1 -1
  16. package/dist/formFields/index.cjs +5 -0
  17. package/dist/formFields/index.cjs.map +1 -1
  18. package/dist/formFields/index.mjs +3 -3
  19. package/dist/graphql/index.cjs +10 -0
  20. package/dist/graphql/index.cjs.map +1 -1
  21. package/dist/graphql/index.d.mts +1 -1
  22. package/dist/graphql/index.d.ts +1 -1
  23. package/dist/graphql/index.mjs +2 -2
  24. package/dist/hooks/index.cjs +19 -3
  25. package/dist/hooks/index.cjs.map +1 -1
  26. package/dist/hooks/index.d.mts +1 -1
  27. package/dist/hooks/index.d.ts +1 -1
  28. package/dist/hooks/index.mjs +8 -8
  29. package/dist/hooks/index.mjs.map +1 -1
  30. package/dist/index.cjs +17 -0
  31. package/dist/index.cjs.map +1 -1
  32. package/dist/index.d.mts +11 -2
  33. package/dist/index.d.ts +11 -2
  34. package/dist/index.mjs +15 -0
  35. package/dist/index.mjs.map +1 -1
  36. package/dist/sharing/index.cjs +5 -0
  37. package/dist/sharing/index.cjs.map +1 -1
  38. package/dist/sharing/index.mjs +3 -3
  39. package/dist/types/index.d.mts +1 -1
  40. package/dist/types/index.d.ts +1 -1
  41. package/dist/types/index.mjs +1 -1
  42. package/dist/utils/index.cjs +9 -0
  43. package/dist/utils/index.cjs.map +1 -1
  44. package/dist/utils/index.d.mts +4 -1
  45. package/dist/utils/index.d.ts +4 -1
  46. package/dist/utils/index.mjs +6 -2
  47. package/package.json +1 -1
  48. package/dist/chunk-4SNW63TJ.mjs.map +0 -1
  49. package/dist/chunk-EEZUTQ3V.mjs.map +0 -1
  50. package/dist/chunk-VQRZ4OJY.mjs.map +0 -1
  51. /package/dist/{chunk-HPPIA4EM.mjs.map → chunk-7CIQ6AD4.mjs.map} +0 -0
  52. /package/dist/{chunk-AKX2AGMA.mjs.map → chunk-PPNVURC4.mjs.map} +0 -0
@@ -1,7 +1,7 @@
1
1
  import * as _apollo_client from '@apollo/client';
2
2
  import { DocumentNode } from 'graphql';
3
3
  import { EnumResourceType, EnumEventDateStatus } from '../enums/index.mjs';
4
- import { A as AuthPayloadType, R as RefreshTokenPayloadType, S as SafeUserType, a as RedeemRewardResponse, P as PartnerType, b as ResourceByUser, c as AdType, E as EnumAdStatus, d as SubscriptionPlansResponse, e as SubscriptionStatusData, f as AppSettingsType, g as SchoolReturnType, h as SchoolType } from '../ad-8BNpjEcM.mjs';
4
+ import { A as AuthPayloadType, R as RefreshTokenPayloadType, S as SafeUserType, a as RedeemRewardResponse, P as PartnerType, b as ResourceByUser, c as AdType, E as EnumAdStatus, d as SubscriptionPlansResponse, e as SubscriptionStatusData, f as AppSettingsType, g as SchoolReturnType, h as SchoolType } from '../ad-B8ZWiTsv.mjs';
5
5
  import { C as ChatType, R as ReportChatUser, N as NotificationCount, a as NotificationType, b as ResourceActivityType } from '../resourceActivities-zczOntNk.mjs';
6
6
  import { E as EventType, c as EventListItemType, d as EventInfoType, U as UseGetResourcesByRegionOptions, e as RelationType, f as ResourceConnectionsType, g as UnregisteredVendorType, V as VendorType, h as VendorInfoType, i as UserLicenceType, P as PostType, j as EnumPostType, G as GameDocType, k as GameLeaderboard } from '../global-BUUfmCo7.mjs';
7
7
  import '../images/index.mjs';
@@ -1,7 +1,7 @@
1
1
  import * as _apollo_client from '@apollo/client';
2
2
  import { DocumentNode } from 'graphql';
3
3
  import { EnumResourceType, EnumEventDateStatus } from '../enums/index.js';
4
- import { A as AuthPayloadType, R as RefreshTokenPayloadType, S as SafeUserType, a as RedeemRewardResponse, P as PartnerType, b as ResourceByUser, c as AdType, E as EnumAdStatus, d as SubscriptionPlansResponse, e as SubscriptionStatusData, f as AppSettingsType, g as SchoolReturnType, h as SchoolType } from '../ad-DZGYiwY-.js';
4
+ import { A as AuthPayloadType, R as RefreshTokenPayloadType, S as SafeUserType, a as RedeemRewardResponse, P as PartnerType, b as ResourceByUser, c as AdType, E as EnumAdStatus, d as SubscriptionPlansResponse, e as SubscriptionStatusData, f as AppSettingsType, g as SchoolReturnType, h as SchoolType } from '../ad-6PrFQe2t.js';
5
5
  import { C as ChatType, R as ReportChatUser, N as NotificationCount, a as NotificationType, b as ResourceActivityType } from '../resourceActivities-BL_12IAo.js';
6
6
  import { E as EventType, c as EventListItemType, d as EventInfoType, U as UseGetResourcesByRegionOptions, e as RelationType, f as ResourceConnectionsType, g as UnregisteredVendorType, V as VendorType, h as VendorInfoType, i as UserLicenceType, P as PostType, j as EnumPostType, G as GameDocType, k as GameLeaderboard } from '../global-fKbMmluy.js';
7
7
  import '../images/index.js';
@@ -148,8 +148,8 @@ import {
148
148
  useUpdateVendor,
149
149
  useUpdateVendorInfo,
150
150
  useValidateVerificationToken
151
- } from "../chunk-EEZUTQ3V.mjs";
152
- import "../chunk-4SNW63TJ.mjs";
151
+ } from "../chunk-VO2WRHJV.mjs";
152
+ import "../chunk-KZTOISPA.mjs";
153
153
  export {
154
154
  GET_EVENT,
155
155
  GET_EVENT_BY_SLUG,
@@ -254,6 +254,7 @@ var EnumUserRole = /* @__PURE__ */ ((EnumUserRole2) => {
254
254
  EnumUserRole2["MARKETING"] = "marketing";
255
255
  EnumUserRole2["MODERATOR"] = "moderator";
256
256
  EnumUserRole2["SUPPORT"] = "support";
257
+ EnumUserRole2["AFFILIATE"] = "affiliate";
257
258
  return EnumUserRole2;
258
259
  })(EnumUserRole || {});
259
260
  var EnumSocialMedia = /* @__PURE__ */ ((EnumSocialMedia2) => {
@@ -388,6 +389,9 @@ var import_isSameOrAfter = __toESM(require("dayjs/plugin/isSameOrAfter.js"));
388
389
  var import_timezone = __toESM(require("dayjs/plugin/timezone.js"));
389
390
  var import_utc = __toESM(require("dayjs/plugin/utc.js"));
390
391
 
392
+ // src/types/global.ts
393
+ var PROMO_CODE_PREFIX = "CM-";
394
+
391
395
  // src/types/ad.ts
392
396
  var EnumAdShowOn = /* @__PURE__ */ ((EnumAdShowOn2) => {
393
397
  EnumAdShowOn2["EVENTS_PAGE"] = "Events_page";
@@ -510,6 +514,8 @@ var PostTypeLabels = {
510
514
  ["clue_bites" /* CLUE_BITES */]: "Clue Bites",
511
515
  ["play_and_win" /* PLAY_AND_WIN */]: "Play & Win"
512
516
  };
517
+ var CM_SCHOOL_PROMO_CODE = `${PROMO_CODE_PREFIX}SCHOOL`;
518
+ var CM_AFFILIATE_PROMO_CODE = `${PROMO_CODE_PREFIX}AFFILIATE`;
513
519
 
514
520
  // src/utils/date.ts
515
521
  var dateFormat = "DD-MM-YYYY";
@@ -2488,6 +2494,12 @@ var REDEEMED_REWARD_FIELDS_FRAGMENT = import_client.gql`
2488
2494
  redeemedAt
2489
2495
  }
2490
2496
  `;
2497
+ var AFFILIATE_FIELDS_FRAGMENT = import_client.gql`
2498
+ fragment AffiliateFields on AffiliateType {
2499
+ affiliateCode
2500
+ pointsAvailable
2501
+ }
2502
+ `;
2491
2503
  var USER_FIELDS_FRAGMENT = import_client.gql`
2492
2504
  fragment UserFields on UserType {
2493
2505
  _id
@@ -2495,6 +2507,9 @@ var USER_FIELDS_FRAGMENT = import_client.gql`
2495
2507
  associates {
2496
2508
  ...AssociatesFields
2497
2509
  }
2510
+ affiliate {
2511
+ ...AffiliateFields
2512
+ }
2498
2513
  avatar {
2499
2514
  ...ResourceImageFields
2500
2515
  }
@@ -2538,6 +2553,7 @@ var USER_FIELDS_FRAGMENT = import_client.gql`
2538
2553
  ${LICENCE_FIELDS_FRAGMENT}
2539
2554
  ${LOCATION_FIELDS_FRAGMENT}
2540
2555
  ${REDEEMED_REWARD_FIELDS_FRAGMENT}
2556
+ ${AFFILIATE_FIELDS_FRAGMENT}
2541
2557
  `;
2542
2558
  var STALL_TYPE_FIELDS_FRAGMENT = import_client.gql`
2543
2559
  fragment StallTypeFields on StallTypeType {
@@ -5256,12 +5272,12 @@ function mapBaseResourceTypeToFormData(data) {
5256
5272
  associates: data.associates,
5257
5273
  contactDetails: data.contactDetails,
5258
5274
  cover: data.cover,
5259
- coverUpload: data.coverUpload,
5275
+ coverUpload: data.coverUpload ?? null,
5260
5276
  description: data.description,
5261
5277
  images: data.images,
5262
- imagesUpload: data.imagesUpload,
5278
+ imagesUpload: data.imagesUpload ?? null,
5263
5279
  logo: data.logo,
5264
- logoUpload: data.logoUpload,
5280
+ logoUpload: data.logoUpload ?? null,
5265
5281
  name: data.name,
5266
5282
  owner: data.owner,
5267
5283
  promoCodes: data.promoCodes,