@timardex/cluemart-shared 1.7.62 → 1.7.64

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.
@@ -7,7 +7,7 @@ import {
7
7
  SCHOOL_MIN_STUDENT_COUNT,
8
8
  isValidIrdNumber,
9
9
  normalizeUrl
10
- } from "../chunk-H4UY76FG.mjs";
10
+ } from "../chunk-76HG44I2.mjs";
11
11
  import {
12
12
  dateFormat,
13
13
  timeFormat
@@ -20,10 +20,10 @@ import {
20
20
  EnumAffiliateParticipantType,
21
21
  EnumPostContentType,
22
22
  EnumPostType
23
- } from "../chunk-O2TNYFUH.mjs";
23
+ } from "../chunk-YG7YTCX5.mjs";
24
24
  import "../chunk-RAYUJODN.mjs";
25
25
  import "../chunk-DQ7ZHIXW.mjs";
26
- import "../chunk-GK773FVL.mjs";
26
+ import "../chunk-6BK45KML.mjs";
27
27
  import "../chunk-6ALUN6LP.mjs";
28
28
  import {
29
29
  EnumEventDateStatus,
package/dist/index.cjs CHANGED
@@ -443,6 +443,7 @@ __export(index_exports, {
443
443
  useRequestMarketingMaterial: () => useRequestMarketingMaterial,
444
444
  useRequestPasswordReset: () => useRequestPasswordReset,
445
445
  useResetPassword: () => useResetPassword,
446
+ useRewardCoupon: () => useRewardCoupon,
446
447
  useScanCoupon: () => useScanCoupon,
447
448
  useSearchEvents: () => useSearchEvents,
448
449
  useSearchPartners: () => useSearchPartners,
@@ -8602,8 +8603,18 @@ var COUPON = import_client78.gql`
8602
8603
  ${COUPON_DATA_FIELDS_FRAGMENT}
8603
8604
  `;
8604
8605
  var GET_COUPONS = import_client78.gql`
8605
- query getCoupons($region: String, $category: String) {
8606
- coupons(region: $region, category: $category) {
8606
+ query getCoupons(
8607
+ $region: String
8608
+ $category: String
8609
+ $resourceId: String
8610
+ $resourceType: ResourceTypeEnum
8611
+ ) {
8612
+ coupons(
8613
+ region: $region
8614
+ category: $category
8615
+ resourceId: $resourceId
8616
+ resourceType: $resourceType
8617
+ ) {
8607
8618
  active {
8608
8619
  listName
8609
8620
  data {
@@ -8682,6 +8693,14 @@ var SCAN_COUPON_MUTATION = import_client79.gql`
8682
8693
  }
8683
8694
  }
8684
8695
  `;
8696
+ var REWARD_COUPON_MUTATION = import_client79.gql`
8697
+ mutation rewardCoupon($input: ProductCouponInputType!, $userId: ID!) {
8698
+ rewardCoupon(input: $input, userId: $userId) {
8699
+ data
8700
+ message
8701
+ }
8702
+ }
8703
+ `;
8685
8704
 
8686
8705
  // src/graphql/hooks/coupon/hooksMutation.ts
8687
8706
  var useCreateCoupon = () => {
@@ -8712,6 +8731,13 @@ var useScanCoupon = () => {
8712
8731
  });
8713
8732
  return { error, loading, scanCoupon };
8714
8733
  };
8734
+ var useRewardCoupon = () => {
8735
+ const [rewardCoupon, { loading, error }] = (0, import_client80.useMutation)(REWARD_COUPON_MUTATION, {
8736
+ awaitRefetchQueries: true,
8737
+ refetchQueries: [{ query: GET_COUPONS }]
8738
+ });
8739
+ return { error, loading, rewardCoupon };
8740
+ };
8715
8741
 
8716
8742
  // src/graphql/hooks/coupon/hooksQuery.ts
8717
8743
  var import_client81 = require("@apollo/client");
@@ -9705,6 +9731,7 @@ function canAccessAdminPath(roles, pathname) {
9705
9731
  useRequestMarketingMaterial,
9706
9732
  useRequestPasswordReset,
9707
9733
  useResetPassword,
9734
+ useRewardCoupon,
9708
9735
  useScanCoupon,
9709
9736
  useSearchEvents,
9710
9737
  useSearchPartners,