@timardex/cluemart-shared 1.7.68 → 1.7.70

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 (61) hide show
  1. package/dist/{ad-C8D-sSzF.d.ts → ad-Diu-U5pX.d.ts} +2 -2
  2. package/dist/{ad-DBlMup1m.d.mts → ad-qYFQNWmk.d.mts} +2 -2
  3. package/dist/{affiliate-DpjRNToN.d.mts → affiliate-BFiXC5wR.d.mts} +2 -2
  4. package/dist/{affiliate-B4dKY4oC.d.ts → affiliate-CELcBsj1.d.ts} +2 -2
  5. package/dist/auth/index.cjs +12 -0
  6. package/dist/auth/index.cjs.map +1 -1
  7. package/dist/auth/index.d.mts +3 -3
  8. package/dist/auth/index.d.ts +3 -3
  9. package/dist/auth/index.mjs +1 -1
  10. package/dist/{chunk-LZG5WM4M.mjs → chunk-5K35SL2Z.mjs} +3 -6
  11. package/dist/{chunk-LZG5WM4M.mjs.map → chunk-5K35SL2Z.mjs.map} +1 -1
  12. package/dist/{chunk-WS47NSTO.mjs → chunk-GWBDLKQC.mjs} +28 -18
  13. package/dist/{chunk-WS47NSTO.mjs.map → chunk-GWBDLKQC.mjs.map} +1 -1
  14. package/dist/{chunk-G5T3Z6WT.mjs → chunk-OYRT6IXI.mjs} +2 -2
  15. package/dist/{chunk-LMWIDQZ6.mjs → chunk-ZLSM7HEU.mjs} +24 -2
  16. package/dist/{chunk-LMWIDQZ6.mjs.map → chunk-ZLSM7HEU.mjs.map} +1 -1
  17. package/dist/{contactUs-Bm9Nx5L6.d.ts → contactUs-Btb-up0h.d.ts} +1 -1
  18. package/dist/{contactUs-w465ljSW.d.mts → contactUs-CUDo3Q-a.d.mts} +1 -1
  19. package/dist/formFields/index.cjs +27 -17
  20. package/dist/formFields/index.cjs.map +1 -1
  21. package/dist/formFields/index.d.mts +1 -1
  22. package/dist/formFields/index.d.ts +1 -1
  23. package/dist/formFields/index.mjs +2 -2
  24. package/dist/{global-B6l7Xvrj.d.ts → global-BjtC8RIp.d.ts} +23 -15
  25. package/dist/{global-Da36L_p3.d.mts → global-CG2xlh2k.d.mts} +23 -15
  26. package/dist/graphql/index.cjs +24 -4
  27. package/dist/graphql/index.cjs.map +1 -1
  28. package/dist/graphql/index.d.mts +14 -6
  29. package/dist/graphql/index.d.ts +14 -6
  30. package/dist/graphql/index.mjs +4 -2
  31. package/dist/hooks/index.cjs +39 -17
  32. package/dist/hooks/index.cjs.map +1 -1
  33. package/dist/hooks/index.d.mts +5 -5
  34. package/dist/hooks/index.d.ts +5 -5
  35. package/dist/hooks/index.mjs +4 -4
  36. package/dist/index.cjs +51 -21
  37. package/dist/index.cjs.map +1 -1
  38. package/dist/index.d.mts +37 -16
  39. package/dist/index.d.ts +37 -16
  40. package/dist/index.mjs +50 -21
  41. package/dist/index.mjs.map +1 -1
  42. package/dist/map/index.d.mts +1 -1
  43. package/dist/map/index.d.ts +1 -1
  44. package/dist/{resourceActivities-B3G__Pqn.d.ts → resourceActivities-B2EqmRwK.d.ts} +1 -1
  45. package/dist/{resourceActivities-BqxMTeyA.d.mts → resourceActivities-kmePhBMr.d.mts} +1 -1
  46. package/dist/sharing/index.d.mts +1 -1
  47. package/dist/sharing/index.d.ts +1 -1
  48. package/dist/types/index.cjs +27 -17
  49. package/dist/types/index.cjs.map +1 -1
  50. package/dist/types/index.d.mts +7 -7
  51. package/dist/types/index.d.ts +7 -7
  52. package/dist/types/index.mjs +1 -1
  53. package/dist/{user-S2zwTsVK.d.ts → user-BtuhHFYm.d.ts} +7 -2
  54. package/dist/{user-B8jYxHQ8.d.mts → user-C-CD89aZ.d.mts} +7 -2
  55. package/dist/utils/index.cjs +27 -17
  56. package/dist/utils/index.cjs.map +1 -1
  57. package/dist/utils/index.d.mts +3 -3
  58. package/dist/utils/index.d.ts +3 -3
  59. package/dist/utils/index.mjs +2 -2
  60. package/package.json +1 -1
  61. /package/dist/{chunk-G5T3Z6WT.mjs.map → chunk-OYRT6IXI.mjs.map} +0 -0
@@ -1,8 +1,8 @@
1
- import { L as LocationType, q as VendorFormData, r as CreateVendorFormData, s as VendorInfoFormData, t as CreateVendorInfoFormData, u as UnregisteredVendorFormData, v as CreateUnregisteredVendorFormData, w as EventFormData, x as CreateEventFormData, y as EventInfoFormData, z as CreateEventInfoFormData, B as BaseResourceTypeFormData, A as PostFormData, D as CreatePostFormData, H as CouponDefaultsFormData, I as CreateCouponFormData } from '../global-Da36L_p3.mjs';
2
- import { U as UserFormData, C as CreateUserFormData } from '../user-B8jYxHQ8.mjs';
3
- import { C as CreateLoginFormData, d as CreateRegisterFormData, e as CreateRequestPasswordResetFormData, f as CreateValidateVerificationTokenFormData, g as CreateResetPasswordFormData, h as PartnerFormData, i as AdFormData, j as CreateAdFormState, k as CreatePartnerFormData, l as AppSettingsFormData, m as CreateAppSettingsFormData, n as SchoolFormData, o as CreateSchoolFormData } from '../ad-DBlMup1m.mjs';
4
- import { a as AffiliateFormData, A as AffiliateType, C as CreateAffiliateFormData } from '../affiliate-DpjRNToN.mjs';
5
- import { C as ContactUsFormData, a as CreateContactUsFormData } from '../contactUs-w465ljSW.mjs';
1
+ import { L as LocationType, q as VendorFormData, r as CreateVendorFormData, s as VendorInfoFormData, t as CreateVendorInfoFormData, u as UnregisteredVendorFormData, v as CreateUnregisteredVendorFormData, w as EventFormData, x as CreateEventFormData, y as EventInfoFormData, z as CreateEventInfoFormData, B as BaseResourceTypeFormData, A as PostFormData, D as CreatePostFormData, H as CouponDefaultsFormData, I as CreateCouponFormData } from '../global-CG2xlh2k.mjs';
2
+ import { e as UserFormData, C as CreateUserFormData } from '../user-C-CD89aZ.mjs';
3
+ import { C as CreateLoginFormData, d as CreateRegisterFormData, e as CreateRequestPasswordResetFormData, f as CreateValidateVerificationTokenFormData, g as CreateResetPasswordFormData, h as PartnerFormData, i as AdFormData, j as CreateAdFormState, k as CreatePartnerFormData, l as AppSettingsFormData, m as CreateAppSettingsFormData, n as SchoolFormData, o as CreateSchoolFormData } from '../ad-qYFQNWmk.mjs';
4
+ import { a as AffiliateFormData, A as AffiliateType, C as CreateAffiliateFormData } from '../affiliate-BFiXC5wR.mjs';
5
+ import { C as ContactUsFormData, a as CreateContactUsFormData } from '../contactUs-CUDo3Q-a.mjs';
6
6
  import 'react-hook-form';
7
7
  import '../enums/index.mjs';
8
8
  import '../images/index.mjs';
@@ -1,8 +1,8 @@
1
- import { L as LocationType, q as VendorFormData, r as CreateVendorFormData, s as VendorInfoFormData, t as CreateVendorInfoFormData, u as UnregisteredVendorFormData, v as CreateUnregisteredVendorFormData, w as EventFormData, x as CreateEventFormData, y as EventInfoFormData, z as CreateEventInfoFormData, B as BaseResourceTypeFormData, A as PostFormData, D as CreatePostFormData, H as CouponDefaultsFormData, I as CreateCouponFormData } from '../global-B6l7Xvrj.js';
2
- import { U as UserFormData, C as CreateUserFormData } from '../user-S2zwTsVK.js';
3
- import { C as CreateLoginFormData, d as CreateRegisterFormData, e as CreateRequestPasswordResetFormData, f as CreateValidateVerificationTokenFormData, g as CreateResetPasswordFormData, h as PartnerFormData, i as AdFormData, j as CreateAdFormState, k as CreatePartnerFormData, l as AppSettingsFormData, m as CreateAppSettingsFormData, n as SchoolFormData, o as CreateSchoolFormData } from '../ad-C8D-sSzF.js';
4
- import { a as AffiliateFormData, A as AffiliateType, C as CreateAffiliateFormData } from '../affiliate-B4dKY4oC.js';
5
- import { C as ContactUsFormData, a as CreateContactUsFormData } from '../contactUs-Bm9Nx5L6.js';
1
+ import { L as LocationType, q as VendorFormData, r as CreateVendorFormData, s as VendorInfoFormData, t as CreateVendorInfoFormData, u as UnregisteredVendorFormData, v as CreateUnregisteredVendorFormData, w as EventFormData, x as CreateEventFormData, y as EventInfoFormData, z as CreateEventInfoFormData, B as BaseResourceTypeFormData, A as PostFormData, D as CreatePostFormData, H as CouponDefaultsFormData, I as CreateCouponFormData } from '../global-BjtC8RIp.js';
2
+ import { e as UserFormData, C as CreateUserFormData } from '../user-BtuhHFYm.js';
3
+ import { C as CreateLoginFormData, d as CreateRegisterFormData, e as CreateRequestPasswordResetFormData, f as CreateValidateVerificationTokenFormData, g as CreateResetPasswordFormData, h as PartnerFormData, i as AdFormData, j as CreateAdFormState, k as CreatePartnerFormData, l as AppSettingsFormData, m as CreateAppSettingsFormData, n as SchoolFormData, o as CreateSchoolFormData } from '../ad-Diu-U5pX.js';
4
+ import { a as AffiliateFormData, A as AffiliateType, C as CreateAffiliateFormData } from '../affiliate-CELcBsj1.js';
5
+ import { C as ContactUsFormData, a as CreateContactUsFormData } from '../contactUs-Btb-up0h.js';
6
6
  import 'react-hook-form';
7
7
  import '../enums/index.js';
8
8
  import '../images/index.js';
@@ -7,7 +7,7 @@ import {
7
7
  SCHOOL_MIN_STUDENT_COUNT,
8
8
  isValidIrdNumber,
9
9
  normalizeUrl
10
- } from "../chunk-G5T3Z6WT.mjs";
10
+ } from "../chunk-OYRT6IXI.mjs";
11
11
  import {
12
12
  dateFormat,
13
13
  timeFormat
@@ -20,11 +20,11 @@ import {
20
20
  EnumAffiliateParticipantType,
21
21
  EnumPostContentType,
22
22
  EnumPostType
23
- } from "../chunk-WS47NSTO.mjs";
23
+ } from "../chunk-GWBDLKQC.mjs";
24
24
  import "../chunk-RAYUJODN.mjs";
25
25
  import "../chunk-DQ7ZHIXW.mjs";
26
- import "../chunk-LZG5WM4M.mjs";
27
- import "../chunk-LMWIDQZ6.mjs";
26
+ import "../chunk-5K35SL2Z.mjs";
27
+ import "../chunk-ZLSM7HEU.mjs";
28
28
  import {
29
29
  EnumEventDateStatus,
30
30
  EnumEventType,
package/dist/index.cjs CHANGED
@@ -418,6 +418,7 @@ __export(index_exports, {
418
418
  useGetUserResources: () => useGetUserResources,
419
419
  useGetUserVendors: () => useGetUserVendors,
420
420
  useGetUsers: () => useGetUsers,
421
+ useGetUsersByPromoCode: () => useGetUsersByPromoCode,
421
422
  useGetVendor: () => useGetVendor,
422
423
  useGetVendorInfo: () => useGetVendorInfo,
423
424
  useGetVendorRelations: () => useGetVendorRelations,
@@ -962,20 +963,15 @@ var priceUnits = [
962
963
  var OBJECT_ID_PATH_SEGMENT = "[a-f0-9]{24}";
963
964
  var OBJECT_ID_PATH_SEGMENT_END = `${OBJECT_ID_PATH_SEGMENT}$`;
964
965
  var gameScreenIdentifierList = [
965
- {
966
- clue: "Where your actions turn into a timeline.",
967
- id: "activities",
968
- match: "/profile/account/favourites"
969
- },
970
966
  {
971
967
  clue: "Where conversations happen without speaking.",
972
968
  id: "chat",
973
969
  match: "/chat"
974
970
  },
975
971
  {
976
- clue: "The place to redefine who you are.",
977
- id: "edit-profile",
978
- match: "/profile/account"
972
+ clue: "Where you can find your loyalties.",
973
+ id: "coupons",
974
+ match: "/coupons"
979
975
  },
980
976
  {
981
977
  clue: "A single moment worth showing up for.",
@@ -1010,18 +1006,13 @@ var gameScreenIdentifierList = [
1010
1006
  {
1011
1007
  clue: "Your starting point for everything.",
1012
1008
  id: "home",
1013
- match: "/"
1009
+ match: "/home"
1014
1010
  },
1015
1011
  {
1016
1012
  clue: "Where the app whispers what you shouldn\u2019t miss.",
1017
1013
  id: "notifications",
1018
1014
  match: "/notifications"
1019
1015
  },
1020
- {
1021
- clue: "Where you fine-tune your experience.",
1022
- id: "options",
1023
- match: "/options"
1024
- },
1025
1016
  {
1026
1017
  clue: "An organisation or creator supporting the community.",
1027
1018
  id: "single-partner",
@@ -1033,15 +1024,30 @@ var gameScreenIdentifierList = [
1033
1024
  match: "/partners"
1034
1025
  },
1035
1026
  {
1036
- clue: "A single published post in full view.",
1037
- id: "single-visitor-post",
1038
- match: new RegExp(`^/visitors/post/${OBJECT_ID_PATH_SEGMENT_END}`)
1027
+ clue: "Where your actions turn into a timeline.",
1028
+ id: "activities",
1029
+ match: "/profile/account/favourites"
1030
+ },
1031
+ {
1032
+ clue: "The place to redefine who you are.",
1033
+ id: "edit-profile",
1034
+ match: "/profile/account"
1039
1035
  },
1040
1036
  {
1041
1037
  clue: "Your identity, on display.",
1042
1038
  id: "profile",
1043
1039
  match: "/profile"
1044
1040
  },
1041
+ {
1042
+ clue: "Where you can redeem your rewards.",
1043
+ id: "rewards",
1044
+ match: "/profile/account/rewards"
1045
+ },
1046
+ {
1047
+ clue: "A single published post in full view.",
1048
+ id: "single-visitor-post",
1049
+ match: new RegExp(`^/visitors/post/${OBJECT_ID_PATH_SEGMENT_END}`)
1050
+ },
1045
1051
  {
1046
1052
  clue: "One stallholder offering something valuable.",
1047
1053
  id: "single-vendor",
@@ -1056,6 +1062,11 @@ var gameScreenIdentifierList = [
1056
1062
  clue: "Where you browse articles and posts from around the platform.",
1057
1063
  id: "visitors",
1058
1064
  match: "/visitors"
1065
+ },
1066
+ {
1067
+ clue: "Where you fine-tune your experience.",
1068
+ id: "options",
1069
+ match: "/options"
1059
1070
  }
1060
1071
  ];
1061
1072
 
@@ -5835,6 +5846,18 @@ var GET_USER_RESOURCES = import_client23.gql`
5835
5846
  }
5836
5847
  }
5837
5848
  `;
5849
+ var GET_USERS_BY_PROMO_CODE = import_client23.gql`
5850
+ query getUsersByPromoCode($promoCode: String!) {
5851
+ usersByPromoCode(promoCode: $promoCode) {
5852
+ avatar {
5853
+ ...ResourceImageFields
5854
+ }
5855
+ userId
5856
+ nickName
5857
+ }
5858
+ }
5859
+ ${RESOURCE_IMAGE_FIELDS_FRAGMENT}
5860
+ `;
5838
5861
 
5839
5862
  // src/graphql/hooks/event/hooksMutation.ts
5840
5863
  var useCreateEvent = () => {
@@ -7042,6 +7065,15 @@ var useGetUserResources = (userId) => {
7042
7065
  const userResources = data?.userResources.resources || [];
7043
7066
  return { error, loading, refetch, userResources };
7044
7067
  };
7068
+ var useGetUsersByPromoCode = (promoCode) => {
7069
+ const { loading, error, data, refetch } = (0, import_client43.useQuery)(GET_USERS_BY_PROMO_CODE, {
7070
+ fetchPolicy: "network-only",
7071
+ skip: !promoCode || promoCode === "",
7072
+ variables: { promoCode }
7073
+ });
7074
+ const usersByPromoCode = data?.usersByPromoCode || [];
7075
+ return { error, loading, refetch, usersByPromoCode };
7076
+ };
7045
7077
 
7046
7078
  // src/graphql/hooks/ad/hooksMutation.ts
7047
7079
  var import_client46 = require("@apollo/client");
@@ -8731,10 +8763,7 @@ var useDeleteCoupon = () => {
8731
8763
  return { deleteCoupon, error, loading };
8732
8764
  };
8733
8765
  var useScanCoupon = () => {
8734
- const [scanCoupon, { loading, error }] = (0, import_client80.useMutation)(SCAN_COUPON_MUTATION, {
8735
- awaitRefetchQueries: true,
8736
- refetchQueries: [GET_COUPONS]
8737
- });
8766
+ const [scanCoupon, { loading, error }] = (0, import_client80.useMutation)(SCAN_COUPON_MUTATION);
8738
8767
  return { error, loading, scanCoupon };
8739
8768
  };
8740
8769
  var useRewardCoupon = () => {
@@ -9712,6 +9741,7 @@ function canAccessAdminPath(roles, pathname) {
9712
9741
  useGetUserResources,
9713
9742
  useGetUserVendors,
9714
9743
  useGetUsers,
9744
+ useGetUsersByPromoCode,
9715
9745
  useGetVendor,
9716
9746
  useGetVendorInfo,
9717
9747
  useGetVendorRelations,